DMA with UART for MK10DN512VLQ10 with processor Expert 10.4

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

DMA with UART for MK10DN512VLQ10 with processor Expert 10.4

979 Views
aalakh_devari
Contributor I

Hello All,

Problem Statement /Requirements : 

I am using MK10DN512VLQ10 Controller for simple application as follows:

1) I want to use UART to transmit data with the help of eDMA channel 4 (so that my CPU is free) for my Modbus Application

2) I want to generate interrupt at the end of transmission of last byte

3) Number of bytes to be transfer to UART by DMA will change as per modbus query

4) I want use Process Expert 10.4 for code generation
                              Version: 10.4.0
                              Build: b140319

i want create UART and eDMA configuration using Processor Expert 10.4

Following are the snapshot :

1) Configuration of eDMA (Settings tab)

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

here i have tried to use eDMA Channel 4 for UART:

UART Configuration:

pastedImage_4.png

I cannot see the DMA request link in this....

pastedImage_5.png

pastedImage_6.png

I have following question:

1) I cannot find how to link UART and eDMA... Is it possible to link eDMA Channel with UART for K10 series controller

2) With this configuration, UART is not requesting eDMA for data transfer when UART transmit is initiated

3) Is it possible to change the configuration of eDMA to change the number of bytes to be transferred to UART

I cannot see the link of DMA with UART as it can be seen for ADC :

pastedImage_7.png

please let me know if I have missed anything...

With Regards,

Aalakh Devari

Labels (1)
0 Kudos
2 Replies

928 Views
aalakh_devari
Contributor I

Thanks Sebastian,

Can this configuration be done using processor Expert 10.4 instead of developing or resuing the driver from somewhere else...

With Regards,

Aalakh Devari

0 Kudos

928 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Aalakh, I hope you're doing well!

 

We have included an example configuration for the DMA using the UART driver in the SDK package for the MK10DN512VLQ10.

 

This example is made for the TWR-K60D evaluation board, however, the code can be adapted to the MK10D as they share the same SDK version and some functionality.

 

It can be found in the following path after downloading and extracting the SDK package:

 

<...\SDK_2.2.0_MK10DN512xxx10\boards\twrk60d100m\driver_examples\uart\edma_transfer>

 

It configures and initializes the UART and eDMA modules in the device, and it then configures the transfer of an N-size string (contained in the g_tipString array).

    /* Send g_tipString out. */
    xfer.data = g_tipString;
    xfer.dataSize = sizeof(g_tipString) - 1;
    txOnGoing = true;
    UART_SendEDMA(DEMO_UART, &g_uartEdmaHandle, &xfer);
 

Then, the transfer is triggered using the UART_SendEDMA function, and the program waits until this is completed to then start echoing the user's input in a Terminal emulator.

 

The rest of the configuration can be found in the uart_edma_transfer.c source file of the example project.

 

Please let me know if you need any more information.

 

Best regards,

Sebastian

0 Kudos