SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
Step | Register/Bit Field/Programming Model | Value |
---|---|---|
Start the channel | MCSPI_CHCTRL_0/1/2/3[0] EN | 1 |
Wait until last transfer = TRUE | ||
Wait for end of transfer | MCSPI_CHSTAT_0/1/2/3[2] EOT | =1 |
Stop the channel | MCSPI_CHCTRL_0/1/2/3[0] EN | 0 |
Step | Register/Bit Field/Programming Model | Value |
---|---|---|
Read MCSPI_IRQSTATUS | MCSPI_IRQSTATUS | 0x- |
Write MCSPI_IRQSTATUS to reset channel status bits | MCSPI_IRQSTATUS[channel i bits] | 0b1111 |
IF: TXx_EMPTY AND write_count < N | ||
Write the transmitter register with data | MCSPI_TX_0/1/2/3 | 0x- |
Increment write_count +1 | ||
ELSEIF: write_count ≥ N | ||
last_transfer = TRUE | ||
ENDIF |