MPC5744P eTimer-CTU0-ADC-DMA

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

MPC5744P eTimer-CTU0-ADC-DMA

1,408件の閲覧回数
boshimao
Contributor II

I now have a very difficult problem, please help me. My IDE is S32. I now use eTimer every 100us trigger CTU0, and then start 4 channels of the ADC0  conversion, and then CTU0 FIFO0 to the threshold to start the DMA transfer, and now DMA can not start or power on once, turn off the DMA when the ADC0 conversion is normal. Annex is my project, please help me look,  I have been debugging for a week.thanks

Original Attachment has been moved to: Test_eTimer_CTU_ADC_DMA.rar

タグ(1)
0 件の賞賛
返信
5 返答(返信)

1,065件の閲覧回数
boshimao
Contributor II

Hi,

Thank you for your answer. The data inside the array does not change, AD conversion out of the results should be a small change in the number. And the results of the array 0 and 1 is 0, see annex. Picture 1 is in the S32 variable window to see , The picture 2 is the computer through the CAN bus to receive the data.

1.png

Picture 1

2.png

Picture 2

0 件の賞賛
返信

1,065件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Disable the Data cache. It is enabled during the startup. Go to startup.S file and comment section of code where data cache is enabled (lines 207-233)

BR, Petr

0 件の賞賛
返信

1,065件の閲覧回数
boshimao
Contributor II

I turned the community, to find a similar problem, the answer is to close the buffer, but inside the code is not complete, you can help me see,https://community.nxp.com/thread/432340 

0 件の賞賛
返信

1,065件の閲覧回数
boshimao
Contributor II

Close the data cache has no effect, the following figure is a comment code screenshot.3.png

0 件の賞賛
返信

1,065件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I was not able to compile your code. So I created new project in DS and copy your code.

Then I just enabled DMA channel request within DMA init function, and the code is working. Destination buffer is getting apdated with ADC result. See attached example.

 

BR Petr

0 件の賞賛
返信