LPC800 rom driver questions.

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

LPC800 rom driver questions.

569件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ppx on Thu Jan 23 05:28:45 MST 2014
I am thinking of using the LPCopen uart interrupt driven example as a base for a new program.

Can you easily set different baudrates on two UARTs? I need 600 baud at start up on one UART to reprogram the baudrate on a chip and 115K on the other UART.
Can both UARTs be used at the same time with LPCopen drivers?
Are there any better examples I can look at?
0 件の賞賛
返信
1 返信

539件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Sat Jan 25 07:07:49 MST 2014
I'm not working with LPCopen but I do work with LPC800 devices.
You have 2 clock dividers for UART. One found in SYSCON (UARTCLKDIV = 1..255) for all UARTS and one for each UART (1..65536)
Also the fractional divider is shared amoung all UARTs. Look into the LPC800 User Manual, chapter 15.

You probably need the fractional generator to generate 115200bd. You use the biggest possible divider for UARTCLKDIV (e.g. 6 if running at 12MHz for example). Then one UART runs with 115200, the other can run at a frequency 115200 / n, where n is integral and in the range of 1..65536. Decide yourself, if n = 192 does the trick  ;-)

And of course, yes, the ROM-API can handle that, because YOU have to dispatch the correct ISR and it's nobody else than YOU who calls the ROM-API and there's no such thing as a 'close()' for ROM-UART structure.
0 件の賞賛
返信