LPC54S018's UART : how to force parity bit ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC54S018's UART : how to force parity bit ?

801件の閲覧回数
belmontbob59
Contributor IV

I need to force the parity bit when transmitting data via USART. Older NXP MCUs (LPC17xx, LPC18xx) have 4 options for parity setting. Example for LPC17xx:

pastedImage_1.png

However, LPC54s018 does not:

pastedImage_6.png

I thought about using the 9th bit by setting DATALEN to 2, but the FIFO write data register only accepts 8bits. 

pastedImage_8.png

pastedImage_7.png

Please advise.

ラベル(3)
0 件の賞賛
返信
2 返答(返信)

662件の閲覧回数
belmontbob59
Contributor IV

Never mind, FIFOWR is 9bit wide. However, Please note a shortcoming in the SDK's fsl_usart.h, the API does not allow for 9bits data transfer. (only 7 or 8bits are allowed):

pastedImage_1.png

0 件の賞賛
返信

662件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello bob belmont

 

Although the enum only enumerates until 8bits you can add a variable to add the 9bit. The usar_data_len_t gets written at the CFG register. So writing a 2 will allow the 9bit transfer.

pastedImage_2.png

 

Let me know if this is helpful.

Best Regards,

Omar