S32K144 DMA Mode Conflict with ADC and CAN

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144 DMA Mode Conflict with ADC and CAN

ソリューションへジャンプ
1,478件の閲覧回数
李风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?

タグ(4)
0 件の賞賛
1 解決策
1,332件の閲覧回数
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

元の投稿で解決策を見る

3 返答(返信)
1,332件の閲覧回数
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 件の賞賛
1,332件の閲覧回数
李风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 件の賞賛
1,333件の閲覧回数
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