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?
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.
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.
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:
I hope this helps you.