Hello,
this is related to SDK for LPC5526. I don't know the CMSIS implementation for other MCUs. I assume that it's pretty similar at least for the same MCU family.
TL;DR: SDK does not implement all mandatory "Signal USART Events" but only ARM_USART_EVENT_SEND_COMPLETE and ARM_USART_EVENT_RECEIVE_COMPLETE. For example, search the SDK code base for ARM_USART_EVENT_RX_OVERFLOW. It is defined but not used.
Long story:
Peripheral tool uses CMSIS USART API to initialize serial interface:
static void FLEXCOMM0_init(void) {
/* Interrupt vector FLEXCOMM0_IRQn priority settings in the NVIC. */
NVIC_SetPriority(FLEXCOMM0_IRQN, FLEXCOMM0_IRQ_PRIORITY);
/* Initialize CMSIS USART */
FLEXCOMM0_PERIPHERAL.Initialize(USART0_SignalEvent);
The signature of Initialize() is
int32_t ARM_USART_Initialize ( ARM_USART_SignalEvent_t cb_event )
The callback cb_event is called from the SDK in fsl_usart_cmsis.c:
static void KSDK_USART_NonBlockingCallback(USART_Type *base, usart_handle_t *handle, status_t status, void *userData)
{
uint32_t event = 0U;
if (kStatus_USART_TxIdle == status)
{
event = ARM_USART_EVENT_SEND_COMPLETE;
}
if (kStatus_USART_RxIdle == status)
{
event = ARM_USART_EVENT_RECEIVE_COMPLETE;
}
/* User data is actually CMSIS driver callback. */
if (userData != NULL)
{
((ARM_USART_SignalEvent_t)userData)(event);
}
}
As you can see, this function supports only the two events I listed above.
Conclusion: This implementation does not support all events that are declared "always supported" in ARM's CMSIS driver documentation. The implementation is thus incomplete.
Or am I missing something?