Please find more detailed explanation of the problem.
Setup:
Reproduction steps:
Problem:
Note:
Questions to be answered:
I've attached:
Interesting observation:
The imx28 datascheet:
https://www.nxp.com/docs/en/data-sheet/IMX28CEC.pdf
in point "3.5.14.4 SPI AC Timing" recommends using SPI CLK frequency (for SSP2) not higher than 20 MHz. In my application 40 MHz was set (as it is also present on the Linux kernel DTS - for example for imx28-evk.dts)
I've debugged more thoroughly the AHB-to-APBH DMA state for the Channel 2 (SSP2).
The dump of its registers can be found in the file attached in the above file - those are the next instruction after the SSP2 PIO transfer hangs.
HW_SSP_STATUS:
(gdb) p/x *0x80014100
$3 = 0xe00c0020
Here we do have set the: `ssp_dmareq` and `ssp_dmaend` signals
The same signals are visible on the APBH debug registers:
HW_APBH_CH2_DEBUG1
(gdb) p/x *0x80004230
$15 = 0x90a00000
HW_APBH_CH2_DEBUG2
(gdb) p/x *0x80004240
$16 = 0x0
In the CH2_DEBUG1 register the "REQ" [bit31] and "END" [bit28] are set.
Please correct my understanding - does this mean that the SSP2 IP block first requested
DMA CMD/DATA and then (immediately?) signaled the END of this transfer?
Other IP blocks have the CHX_DEBUG1 as 0xb0a0_0000 (REQ, KICK,END) or just 0x00a0_0000 (IDLE, no operation).
I also assume the WR|RD_FIFO_EMPTY are correctly set to indicate that nothing has left for the transfer?