Error DMA SPI

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

Error DMA SPI

跳至解决方案
1,472 次查看
ailtonlopes
Contributor III

Hi, 

So I have a driver for the spi that is similar to the driver offer by the nxp and it works perfectly using interrupts to send and receive data, right now I'm having this issue when i try to use the dma do handle the writing and copying of the data from the spi registers. I realized that after i set the RSER bits to generate the spi request in tx and rx (the same way as done in the nxp drivers) as soon as i write the RSER register an error is raised to the tx channel the tx Source address and some configurations are also changed and I have no clue on what it is raising the error.

Kind regards, 

Ailton Lopes

1 解答
1,326 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

DSPIx_PUSHR register needs to be accessed by 32-bit write. Then it'll work for you.

在原帖中查看解决方案

5 回复数
1,326 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you provide details about mentioned error? Which device is this question related to?

0 项奖励
1,326 次查看
ailtonlopes
Contributor III

davidtosenovjan‌ Thanks for the quick reply, In this message is annexed to code im having the error. 

The project it is for the MPC5748g

kind regards, 

0 项奖励
1,326 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you rather show me how your configure TCD descriptors causing the error? Ideally debugger screenshots. Thanks

0 项奖励
1,326 次查看
ailtonlopes
Contributor III

So in the first 3 screenshots there's the state of the DMA registers before writing the the SPI RSER registerDMA_PRIOR_ERROR.PNG

The error is occurring in channel 3

TCD_PRIOR_ERROR.PNG

The line of code causing the error 

LINE_OF_CODE_CAUSING_DMA_ERROR.PNG

This is the dma regs after writing the RSER reg 

DMA_AFTER_ERROR.PNG

And finally the TCD after the error 

TCD_AFTER_ERROR.PNG

Kind regards, 

Ailton Lopes

0 项奖励
1,327 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

DSPIx_PUSHR register needs to be accessed by 32-bit write. Then it'll work for you.