Hi,
I think I found another "WTF?":
For the SPI driver, Peripherals Tool provides a callback function template:

Select a Flexcomm instance and click on "Copy to clipboard".
This is what you'll get:
/* FLEXCOMM3 signal event callback function */
void SPI_SignalEvent(uint32_t event) {
/* Master/Slave Transmit/Receive finished */
if (event & ARM_SPI_EVENT_TRANSFER_DONE) {
/* Place your code here */
}
/* Master/Slave Transmit/Receive incomplete transfer */
if (event & ARM_SPI_EVENT_TRANSFER_INCOMPLETE) {
/* Place your code here */
}
/* Address not acknowledged from Slave */
if (event & ARM_SPI_EVENT_ADDRESS_NACK) {
/* Place your code here */
}
/* Master lost arbitration */
if (event & ARM_SPI_EVENT_ARBITRATION_LOST) {
/* Place your code here */
}
}
However, this does not compile as none of the "event macros" is defined.
The file Driver_SPI.h defines only:
/****** SPI Event *****/
#define ARM_SPI_EVENT_TRANSFER_COMPLETE (1UL << 0) ///< Data Transfer completed
#define ARM_SPI_EVENT_DATA_LOST (1UL << 1) ///< Data lost: Receive overflow / Transmit underflow
#define ARM_SPI_EVENT_MODE_FAULT (1UL << 2) ///< Master Mode Fault (SS deactivated when Master)
These are the "official" SPI event macros as specified in the ARM template driver.
NXP, please fix this.
Thanks.
Best regards
Daniel