MK24FN1M UART1 7Mbit/s with DMA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK24FN1M UART1 7Mbit/s with DMA

1,578 Views
cerma
Contributor IV

Hi All,
I'm trying to configure UART via DMA in MCUxpresso using SDK on MK24FN1M0VLQ12. I need a UART run 7Mbit/s without interruption with minimal core load.
I want UART in FreeRun mode with circular buffer 8192Bytes. Received data without any intervention by the service SW. I do not know in advance the length of the frame RX.
The SW will only look at the position pointer to write the DMA to the ring buffer. I tried to edit project MK24FN1M0xxx12 .zip\boards\twrk64f120m\driver_examples\uart\edma_transfer\.   Without success :-(  . Can I find a project example with this configuration somewhere? With SDK, without SDK or with PEx?

Labels (1)
0 Kudos
Reply
5 Replies

1,410 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Jaroslav,

With the UART there's no posible way to reach the frequency you want in this MCU, the maximum input frequency for the UART module is 60MHz.

Bus Clock = 120 MHz (Maximum MCU frequency) / 2 = 60 MHz.

And the maximum baudrate in the UART module should be less than 3.75 MHz.

UART baud rate =  Bus Clock / 16 = 3.75 MHz.

Best Regards,

Alexis Andalon

0 Kudos
Reply

1,410 Views
cerma
Contributor IV
Hi Alexis,
 
I want to use UART1. I'm reading in datasheet (K24P144M120SF5RM.pdf):
"UART0 and UART1 are clocked from the core clock, the remaining UARTs are clocked on the bus clock. The maximum baud rate is 1/16 of related source clock frequency."
I should be able to use UART1 up to 7.5Mbit?!
Can I find a project example with this configuration somewhere? With SDK, without SDK or with PEx?
Thanks a lot.
0 Kudos
Reply

1,410 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Jaroslav,

You're right Jaroslav, this UART indeed works with the core clock. Unfortunately, there's any UART example using this frequency. But did you try using the peripheral config tools? Maybe this could help you to set the baudrate.

pastedImage_1.png

Best Regards,

Alexis Andalon

0 Kudos
Reply

1,410 Views
cerma
Contributor IV

Hi Alexis,

I know how to set the UART baud rate. This isn't my problem. I don't know how to set UART in FreeRun mode with circular buffer 8192 with DMA. Are you able to show me set ConfigTools for UART in FreeRun mode with circular buffer 8192 with DMA? (Received data without any intervention by the service SW. I do not know in advance the length of the frame RX.)

Thanks a lot.

0 Kudos
Reply

1,410 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Jaroslav,

You're application is very specific so the code generated with the tool will need to be modified. But as a hint I will suggest to do the next:

Set the UART to function in DMA mode and set the channel, as the next image shows:

pastedImage_1.png

The next document explain how to set a circular buffer using the DMA feature, check ti for more information:

https://community.nxp.com/docs/DOC-329546

I hope this helps you.

Best Regards,

Alexis Andalon

0 Kudos
Reply