SPC5748G CAN DMA FIFO data erro

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

SPC5748G CAN DMA FIFO data erro

ソリューションへジャンプ
1,686件の閲覧回数
longfeiwang
Contributor III

I use the project "flexcan_dma_receive" _for CAN DMA data handling and enable continuous interruption of DMA ,and 

modification of below lines in DMA_Init() function. 

EDMA.TCD[DMA_CHANNEL].SLAST.R = -16; /* address Adjustment after major loops */

EDMA.TCD[DMA_CHANNEL].DLASTSGA.R = -16; /* addr adjustment after major loop */

EDMA.TCD[DMA_CHANNEL].CSR.B.DREQ = 0; /* do not Disable Request */

When i send data for the first time   ID: 0X555  data:FF 02 03 04 05 06 07 08 The data in the FIFO buffer is as follows。

pastedImage_2.png

The data in the RxDATA[] buffer is as follows。

pastedImage_3.png

 

When i send data for the second time   ID: 0X555  data:EE 02 03 04 05 06 07 08 The data in the FIFO buffer is as follows。

pastedImage_4.png

The data in the RxDATA[] buffer is as follows。

pastedImage_5.png

 

Summary: Both DMA interrupts can be entered normally,The first time the data received by the FIFO is normal, the data carried by the DMA is also normal。The data received in the second FIFO is significantly different from the data sent,The DMA entry interrupt seems to indicate that the DMA has carried out the handling operation normally,But the data in RxDATA[]  seems to be the first data sent,When the second DMA interrupt is completed, there is a problem with the data received by the CAN FIFO And DMA did not carry the wrong data received。

What is the problem that caused the CAN FIFO to store the correct data for the second time?

Is there something wrong with the settings?

0 件の賞賛
返信
1 解決策
1,555件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is caused by data cache enabled. You can disable it by making D_CACHE symbol undefined within project setting

pastedImage_1.png

 

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,556件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is caused by data cache enabled. You can disable it by making D_CACHE symbol undefined within project setting

pastedImage_1.png

 

BR, Petr

0 件の賞賛
返信