We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello I´m currently trying to set up the UART3 of my LPC 1788. The transmission of any messages works perfectly but I can´t recieve any messages. The input-signal is on the pin which means I wouldn´t consider the hardware to cause troubles.
The config looks as follows:
LPC_SC->PCONP |= (0x01 << 25); //Power UART3 LPC_IOCON->P0_25 = 0x03; //U3_TxD LPC_IOCON->P0_26 = 0x03; //U3_RxD LPC_UART3->LCR = (0x01 << 7); //Enable Baud-Rate config LPC_UART3->DLM = 0x00; LPC_UART3->DLL = 0x57; LPC_UART3->FDR = 0x21; //MulVal = 2, DivVal = 1 LPC_UART3->FCR = 0x07; //Enable FIFO & Reset RX/TX Fifo LPC_UART3->LCR = 0x03; //8 Data-Bit, 1 Stop-Bit, NO-Parity, DLAB = 0 --> IR-Enable /* Enable Interrupt for UART3 channel */ NVIC_EnableIRQ(UART3_IRQn); LPC_UART3->TER = 0x80; //Enable UART3 Transmit LPC_UART3->IER = 0x05; //Enable receive Data available Interrupt & Line Status IR /* preemption = 1, sub-priority = 1 */ NVIC_SetPriority(UART3_IRQn, ((0x01<<3)|0x01));
The value of the line-staus registe is 0x98 which means: Framing error status is active. Break interrupt status is active. UARTn RBR contains at least one UARTn RX error.
I´m thankful for any help I can get!
Check baudrate on both sides of the bus. Check peripheral clock.
Thank you for your reply!
The Baudrate shouldn´t be the problem because when I send messages to the pc there is no problem and the PC also sends the messages with 57600, I already checked that with an oscillocope.
Since the Baudrate is fine the clock should be correct aswell, or could the pclock also lead to another problem?
Check the voltage level on the PC side (RS-485, RS-232, converter...) Maybe your parity is not correct?
I disabled the parity bit on both sides.
The voltage is 0-5V after a RS 232 converter and -6 to +6V before the converter which means those level should be fine aswell! No bits are altered during that conversion!
If I look at your suggestions there seems little hope for me that the configuration is somehow wrong, am I right? I was really hoping the error would be one false bit...
Has anyone maybe any other suggestions? I tested the port aswell so thats not the problem either!
Go back a step. Try it without FIFO.
Ok so you mean recieve char after char? I will try that! Thanks!