Hello,
How to set up the UART1 to receive a 9-bit data (RS485) message for LPC1754?
1 start bit, 9 data bits, 1 stop bit
Is setting parity needed? I get every byte I receive an parity error?
Regards, Stijn
I set: UART_InitStruct->Baud_rate = 460800; UART_InitStruct->Databits = UART_DATABIT_8; UART_InitStruct->Parity = UART_PARITY_SP_1; UART_InitStruct->Stopbits = UART_STOPBIT_1;
UART_FIFOInitStruct->FIFO_DMAMode = DISABLE; UART_FIFOInitStruct->FIFO_Level = UART_FIFO_TRGLEV0; UART_FIFOInitStruct->FIFO_ResetRxBuf = ENABLE; UART_FIFOInitStruct->FIFO_ResetTxBuf = ENABLE;
rs485cfg.AutoDirCtrl_State = ENABLE; rs485cfg.DirCtrlPin = UART1_RS485_DIRCTRL_DTR; rs485cfg.DirCtrlPol_Level = SET; rs485cfg.DelayValue = 50; rs485cfg.NormalMultiDropMode_State = ENABLE; rs485cfg.AutoAddrDetect_State = DISABLE; //rs485cfg.MatchAddrValue = 0; rs485cfg.Rx_State = ENABLE;
That really has nothing to do with Keil!
For details of how to setup NXP's product - LPC1754 - you will have to consult the product documentation, and contact NXP for any support/clarification ...
www.nxp.com/.../scalable-mainstream-32-bit-microcontroller-mcu-based-on-arm-cortex-m3-core:LPC1754FBD80
www.youtube.com/watch