S32K312 - ADC-BCTU with DMA major loop destination address writing problem.

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

S32K312 - ADC-BCTU with DMA major loop destination address writing problem.

297 次查看
BrK_
Contributor III
Hi,

I am trying to read 6 adc channels with DMA in  s32k312. That's why I use BCTU. BCTU makes DMA configurations automatically, but I manually change the major loop counter to 10. I allow new ADC readings by reopening the DMA hw request within the DMA loop major interrupt. My problem is this: The buffer I gave in the first DMA interrupt is filled with 60 values ​​(6 channels * 10 major loops count) as it should be. However, the second interrupt fills the buffer with 66 values.

To understand the reason, I reset the DMA buffer in each interrupt and checked it with debug. The events take place as follows:
1- 60 values ​​are filled with the first interrupt.
2- With the second interrupt, 60 values ​​are filled again, but starting from the 48th element, values ​​are written to the buffer by shifting 6 elements. (The destination address in the 8th major loop is updated as if it were the 9th major loop.)
3 - In subsequent interruptions, 54 values ​​are written to the buffer. My theory here is that values ​​are written to the same destination address in the two major loops.

This problem occurs when the major loop counter is set to any value other than 1. Shouldn't we change the configurations when used with BCTU? If we can change it, which configuration should I change in addition to the major loop counter to get rid of this error?
标签 (1)
0 项奖励
回复
0 回复数