mcan - DRX (Message Stored to Dedicated Rx Buffer) interrupt cannot be triggered
The measurement wave line received two pieces of data, but did not trigger the interrupt DRX (Message Stored to Dedicated Rx Buffer)
Print the value of intrStatus as follows
intrStatus = 0x80
The relevant code is as follows:
/* Maximum TX Buffer + TX FIFO, combined can be configured is 32 */
#define APP_MCAN_TX_BUFF_CNT (1U)
#define APP_MCAN_TX_FIFO_CNT (0U)
/* Maximum TX Event FIFO can be configured is 32 */
#define APP_MCAN_TX_EVENT_FIFO_CNT (0U)
/* Maximum RX FIFO 0 can be configured is 64 */
#define APP_MCAN_FIFO_0_CNT (0U)
/* Maximum RX FIFO 1 can be configured is 64 and
* rest of the memory is allocated to RX buffer which is again of max size 64 */
#define APP_MCAN_FIFO_1_CNT (0U)
static void App_mcanIntrISR(void *arg)
{
uint32_t intrStatus;
intrStatus = MCAN_getIntrStatus(gMcanBaseAddr);
MCAN_clearIntrStatus(gMcanBaseAddr, intrStatus);
if (MCAN_INTR_SRC_TRANS_COMPLETE ==
(intrStatus & MCAN_INTR_SRC_TRANS_COMPLETE))
{
SemaphoreP_post(&gMcanTxDoneSem);
}
/* If FIFO0/FIFO1 is used, then MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG macro
* needs to be replaced by MCAN_INTR_SRC_RX_FIFO0_NEW_MSG/
* MCAN_INTR_SRC_RX_FIFO1_NEW_MSG respectively */
if (MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG ==
(intrStatus & MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG))
{
SemaphoreP_post(&gMcanRxDoneSem);
}
return;
}