S32K144 DMA Mode Conflict with ADC and CAN

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K144 DMA Mode Conflict with ADC and CAN

Jump to solution
351 Views
李风heart
Contributor II

Hello!

  In my project, There are 15 Channels on ADC1 module and 8 channel on ADC0, 3 FLEXCAN and SPI0 in use.  AD convert are triggered by PDB module, PDB will trigger AD channel one by one in times of PDB counter. SPI0 is used to communication with other chip with DMA mode. When I didnot use SPI0 in my project, AD and CAN are able to work normally, but after I use SPI transmit and recive date ,The ADC1 channel 0-7 goes stop when there are some frames received by CAN0 and there is a error flag when I use "PDB_DRV_GetAdcPreTriggerSeqErrFlags" check the PDB error register, the error also shows there are some error happened on PDB1 channel 0-7. When I close the DMA channels which SPI0 used after initialize SPI, the ADC1 0-7 goes down and PDBSeqErrFlag are set also. I didnot use DMA in AD and CAN module , Are there any matters that need to be attention in using DMA and AD convert ? Or anyone could help me with this question?

Tags (4)
0 Kudos
1 Solution
205 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can read ADC result in burst, but you should do it before new conversions will be triggered to do not lost a data.

A possible mechanisms to abort conversions are given in chapter 44.5.4.3 Aborting conversions of the RM.

BR, Petr

View solution in original post

3 Replies
205 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

which SDK version do you use in fact?

Generally, the PDB sequence error happen if insufficient delays is between the pre-triggers or ADC result registers are not read in time and pretriggers lock is not inactived.

So probably when more resources are used ADC reading should not be handled in time. Try to check this.

BR, Petr

0 Kudos
205 Views
李风heart
Contributor II

Hi,

   I am using RTM3.0.0 in my project.

   I want to trigger each ADC channel  by PDB module one by one like this:

pastedImage_1.png

   And read AD convert result one-time independent. should that be OK? Or I must read each channel's result after one channel converts end, and start next channel's convert?

   I have another question is that does DMA or other module will break AD convert process when there is an AD channel in converting?

0 Kudos
206 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can read ADC result in burst, but you should do it before new conversions will be triggered to do not lost a data.

A possible mechanisms to abort conversions are given in chapter 44.5.4.3 Aborting conversions of the RM.

BR, Petr

View solution in original post