Dear all,
I'm trying to port some code which has worked for years on MPC57xx and S32K1xx devices to the S32K322. I am setting up 2 consecutive DMA channels to play ping-pong with each other.
The problem is the first channel's initial source read is causing the SBE bit to be set, and I can't work out why.
I have set a breakpoint at the instruction which will cause the START bit of the first channel to request service, and a second breakpoint at the next sw instruction. The two pictures show the DMA configuration for the two channels in the before and after condition.
The intention of the first channel (TCD0) is to read 4 bytes of memory from RAM (at 0x2000A248), and put the contents of that memory in the second channel's source address (see TCD0's DADDR is 0x40214020, which is the address of SADDR for TCD1).
I would therefore expect the content of the TCD1 SADDR to become the contents of the memory at 0x2000A248.
As you can see, CITER is being decremented, but the transfer is not taking place; TCD1 SADDR is not altered and the CH0_ES bits become set.
D-cache is turned off, so the RAM is not being cached. And the DMA mux for channels 0 and 1 has the ENBL bit set (Addresses 0x40280002 and 0x40280003 are 0x80).
Does anyone have any thoughts on what I might be missing?
This is a bare-metal project, no RTD or anything else at play.
Thanks and Regards,
Andrew