MPC5744P eTimer-CTU0-ADC-DMA

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5744P eTimer-CTU0-ADC-DMA

1,468 次查看
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,125 次查看
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,125 次查看
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,125 次查看
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,125 次查看
boshimao
Contributor II

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

0 项奖励
回复

1,125 次查看
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 项奖励
回复