lpc54102 UART stat TXRDY (not ready)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

lpc54102 UART stat TXRDY (not ready)

跳至解决方案
4,601 次查看
svensavic
Contributor III

I have issue with developing UART comm from scratch. I don't use any libraries, as I am not big fan of them, so I go bare metal way.

Anyway, I don't know whether I am missing some config or not, but when I try to send string via UART, it got stuck after first char. Well, first char is not sent as well.

I went through the data sheet couple of times, and I just can't see what I am missing.

enable ASYNCAPB

set ASYNCAPBCLKCTRL to enable UART0,

disable reset via ASYNCPRESETCTRL,

set RX,TX pins

USART CFG, baud rate and enable uart.

And then just write to TXDAT. Everything seems to be OK from debugger point in MCUXPRESSO, but UART seems to get stuck on sending the char and next cycle STAT = b'10010' or RXRDY, TXIDLE.

Why doesn't it change to TXRDY I don't understand...

Attached is memory dump of UART.

标签 (2)
标记 (2)
0 项奖励
回复
1 解答
1,378 次查看
svensavic
Contributor III

I really hope NXP will sort their UM because as much as I like mcu's I hate when some things are not written in user manual or assumed to be known or whatnot... 

Anyway, I was missing enabling the fractional divider in async clkctrl ... which I havent saw mentioned anywhere in UART basic configuration chapter...

LPC_ASYNC_SYSCON->ASYNCAPBCLKCTRLSET |= _BV(15);

Hope it will help someone who will be having a same mind boggling exercise.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,379 次查看
svensavic
Contributor III

I really hope NXP will sort their UM because as much as I like mcu's I hate when some things are not written in user manual or assumed to be known or whatnot... 

Anyway, I was missing enabling the fractional divider in async clkctrl ... which I havent saw mentioned anywhere in UART basic configuration chapter...

LPC_ASYNC_SYSCON->ASYNCAPBCLKCTRLSET |= _BV(15);

Hope it will help someone who will be having a same mind boggling exercise.

0 项奖励
回复