Serial UART problems on MCF54418

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial UART problems on MCF54418

Jump to solution
1,139 Views
kalexander
Contributor I

I am preparing to build a serial driver for 10 UART ports on MCF54418 (including flexbus). Most code examples I have seen have been related to using the console or other similar applications, however they don't seem to lend themselves well to writing a driver which will run all the UART ports at once. I am sure I can size the buffers appropriately and get this working with the MQX serial drivers, but ideally I would prefer to port code that I have written in the past to this platform and avoid complete use of the MQX driver. This is for a few reasons, most importantly is portability.

 

If it is at all possible what I would like to get for each UART is a data register, a Tx complete interrupt, and an Rx complete interrupt. Having access to those three items would make me feel more comfortable. Additionally I would like to be able to initialize a UART with a single function call which will take the UART to be initialized and a baud rate.

 

Inside of this, how can the MQX RTOS help me? I feel like there is little documentation that translates to the way I am used to dealing with UARTs.

 

I am open to suggestions and advice regarding how to implement this solution.

 

Thank you in advance,

Kurt

0 Kudos
1 Solution
107 Views
PavelM
NXP Employee
NXP Employee

Kurt,

If you from some reason don't wont use our serial driver, which can be installed on every UART, you can write your own. For inspiration, how to get access to UARD registers, please see into serl_pol_mcf54xx.c file for polled mode, and serl_int_mcf54xx.c file for interrupt mode. Especially see functions 

_mcf54xx_uart_serial_polled_getc and

_mcf54xx_uart_serial_polled_putc.

Best regards,

Pavel

View solution in original post

0 Kudos
2 Replies
108 Views
PavelM
NXP Employee
NXP Employee

Kurt,

If you from some reason don't wont use our serial driver, which can be installed on every UART, you can write your own. For inspiration, how to get access to UARD registers, please see into serl_pol_mcf54xx.c file for polled mode, and serl_int_mcf54xx.c file for interrupt mode. Especially see functions 

_mcf54xx_uart_serial_polled_getc and

_mcf54xx_uart_serial_polled_putc.

Best regards,

Pavel

View solution in original post

0 Kudos
107 Views
kalexander
Contributor I

Thank you Pavel, this pointed me in the correct direction. I should be able to port my driver over to the MQX platform with this information. I'll let you know if I run into any roadblocks.

0 Kudos