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?
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
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.
Best Regards,
Alexis Andalon
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.
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:
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