Hi,
Indeed, eCSPI1 (and the other eSPCIs, and UARTs etc.) is a shared peripheral. Looking at the same Figure 2 you pointed at, there is only one set of eCSPI peripherals, and they are behind the SPBA.
This is exactly why 0x2000 was my first choice. Only this address seems unrelated.
My full test script was simply:
| start:
0000 1801 (0001100000000001) | addi r0, 1
0001 69c3 (0110100111000011) | stf r1, 0xc3 # PSA = r1 for 32-bit frozen periheral read
0002 62c8 (0110001011001000) | ldf r2, 0xc8 # Read peripheral register into r2
0003 0401 (0000010000000001) | notify 4 # Turn off event, don't reschedule
0004 0300 (0000001100000000) | done 3 # Quit MCU execution
0005 7cfa (0111110011111010) | bf start # One of these will branch
0006 7df9 (0111110111111001) | bt start
I set the context before enabling it, so r1 is either 0x2000 or 0x2008000, and then configured SDMA to trigger this script on an event. Then sent some data to the SPI (which acts as a slave, by the way). Later on, I disabled the script, and fetched the context.
r0 gave me the number of script executions
r1 stayed the same as I configured it: The address loaded to PSA (and PSA carried this address indeed)
r2 had the result. When r1 was set to 0x2008000, I had some reasonable input data there. When it was set to 0x2000, it was always 0x5c29e003, which has nothing to do with the data on the SPI bus. I also had other indications that the SPI's data register wasn't read from by the SDMA.
So we're still on square one: Why is there a DMA address at all, and why does the (NXP official) kernel driver not use it?
This isn't a question about custom scripts. The same issue exactly arises when using the scripts on the ROM, as done by the kernel driver. You still need to choose the source address.
Regards,
Eli