dma software trigger

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

dma software trigger

1,282 Views
AsafTv
Contributor II

can i trigger DMA by software if the DMA is linked to other DMA that triggered by Hardware?

0 Kudos
6 Replies

1,226 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @AsafTv ,

Thank you in advance for providing the requested information.

Yes DMA cn be triggered by software. In the Reference Manual of the MK64 you will find the chapter 21 - 22 about DMA. If you have any other question related to DMA please let me know in order to assist you. Also on the SDK of the FRDM-K64 we have some DMA examples that you can use as a reference.

Reference Manual 

FRDM-K64F SDK 

0 Kudos

1,275 Views
nxf45548
NXP Employee
NXP Employee

Hi @AsafTv

To provide you with better support, can you please let us know what is the part number that you are using, S32K, Kinetis, iMX, other? 

Regards, 
Susi

0 Kudos

1,266 Views
AsafTv
Contributor II

MK64FN1M0xx12

0 Kudos

1,252 Views
nxf45548
NXP Employee
NXP Employee

@AsafTv 
Thank you for the clarification.
I'll assign the post with our product specialist engineers and they will further assist you. 
Regards, 
Susi

0 Kudos

1,178 Views
AsafTv
Contributor II

Hi,

the application is two multiplexer connected to ADC 16 bit for extend ADC 16 bit pins.

the control of the mux and mux Enabled pin controlled by PORTD.

i configure ADC To work with DMA and the ADC Conversion is triggered by Timer 2.

Timer configure to 65536Hz - 15.258usec

ADC minor loop is 2 bytes and major loop is 480bytes

ADC DMA configure to work as ping pong with two buffers.

PORTD minor loop is 4 bytes and major loop is 64 bytes.

i configured PORTD To work with DMA linked to minor loop of ADC DMA.

PORTD DMA configure to work as ping pong with the same buffer.(circular buffer)

it work properly except when the major loop of the ADC is finish, its look like the next minor loop of PORTD is missing.

the first time OF PORTD DMA is triggered by software for the first channel.

PORTD DMA Ram Data buf:

const U32 Recording_AvailableChannelSelction_Tbl[] = {

  0x00000001,//0x00000080,

  0x00000002,//0x00002080,

  0x00000003,//0x00001080,

  0x00000004,//0x00003080,

  0x00000005,//0x00000880,

  0x00000006,//0x00002880,

  0x00000007,//0x00001880,

  0x00000008,//0x00003880,

  0x00000009,//0x00004080,

  0x0000000A,//0x00006080,

  0x0000000B,//0x00005080,

  0x0000000C,//0x00007080,

  0x0000000D,//0x00004880,

  0x0000000E,//0x00006880,

  0x0000000F,//0x00005880,

  0x00000000,//0x00007880

};

i configure toggle pin on ADC DMA major loop callback and examine the change on PORTD0

i see when i get trigger on the pin in the ADC DMA callback PORTD0 is not change.

i see that the interrupt is triggered on the correct point but the DMA not start the second TCD on time.

what I'm doing wrong?

advice

0 Kudos

1,126 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @AsafTv ,

 

Thank you in advance for your information. Can you please provide the configuration of the trigger sequence you are doing. This is for me to understand better the problem.

0 Kudos