yes, i knew this example.
But i think it´s more complexity in my case. I am now in the 3rd week to solve the EDMA problem.
I have made some changes. I use only one Paramset for the 28Byte frame.
My RXbuffer is everytime correctly updated.
My TXBuffer is not correctly send out (first time it´s korrekt, then there is one Byte-error every TX)
I get in theEDMA Completio ISR when the SPI TX Event occurs (EDMA Interrupt Pending Register / Interrupt Enable Register) The SPI RX Event is also enabled.
My EDMA Completion ISR does the following:
If the SPI TX event in EDMA Interrupt Pending Register is set then clear this event. (that in the next SPI cycle this register can be set)
Then i change the TX Data frame, that in the next SPI cycle, other Data will be send.
Then i wait still the SPI RX event is set in EDMA IPR. After this i clear this event.
The AM3359 as SPI slave get in 16kHz period the data with 8MBaud.
Every time after the datatransfer is finish, the Edma ISR would be called (when the last 4bits get transmit/receive), this is the SPI TX EDMA Event. 2µs later the SPI RX EDMA Event occurs.
The Problem at the SPI TX is, after the Paramset is done, it reloads a copy paramset which is given in the LINK.
When this is done, the EDMA TX counts "1" (BCNT) down, and write the first TX Byte to the SPI TX Buffer (Shift Register) from the TXArray (old) before i can update this array.
In the ISR i make an TXArray update, but EDMA already pushed one byte into TX SPI Buffer. ...
This causes that 1 Byte error ...
Where is the mistake in my program ? Have i take a look to the paramset, what i have to change there? I am in continous mode.
I also can try a single shot mode, that the paramset is not automatically reloaded..
In this case: How i must configure the param set?
Maybe i must disable the EDMA completely, or i have to use other functions, that stop and start the transfer.
As slave the TI gets the clock and hast to respond to it.
Thank you.