SPIM uses EasyDMA to fetch data to transmit from RAM or store received data in RAM.
| Channel | Type | Register Cluster |
|---|---|---|
| TXD | READER | DMA.TX.PTR |
| RXD | WRITER | DMA.RX.PTR |
The .PTR and .MAXCNT registers are double-buffered. After receiving the STARTED event, the registers can be written to before the next transmission.
SPIM automatically stops transmitting after TXD.MAXCNT bytes have been transmitted and RXD.MAXCNT bytes have been received. If RXD.MAXCNT is larger than TXD.MAXCNT, the remaining transmitted bytes will contain the value defined in the ORC register. If TXD.MAXCNT is larger than RXD.MAXCNT, the additional received bytes will be discarded.
The RX.END and TX.END events indicate that EasyDMA has finished accessing buffers in RAM. Both RX and TX must be finished before the END event is generated.
If several AHB bus masters try to access the same AHB slave at the same time, AHB bus congestion can occur. In this case, the EasyDMA channel behavior will depend on the SPIM instance. Refer to Instances for information about what behavior is expected in each instance.
See EasyDMA for more detailed information.