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

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

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

716件の閲覧回数
BRK_Y
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 返答(返信)