Error DMA SPI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error DMA SPI

Jump to solution
1,444 Views
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 Solution
1,298 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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

View solution in original post

5 Replies
1,298 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,298 Views
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 Kudos
1,298 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,298 Views
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 Kudos
1,299 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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