lpc54102 UART stat TXRDY (not ready)

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

lpc54102 UART stat TXRDY (not ready)

ソリューションへジャンプ
4,599件の閲覧回数
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,376件の閲覧回数
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,377件の閲覧回数
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 件の賞賛
返信