Hi,
I'm using CAN PAL Example code in S32K144 EVB with S32DS.ARM.2018.R1 IDE.
I want to enable the CAN Receiver interrupt in CAN PAL Example code, i don't want to block my code with while loop like below
CAN_ConfigRxBuff(INST_CAN_PAL1, RX_MAILBOX, &buffCfg, Rx_Id);
/* Start receiving data in RX_MAILBOX. */
CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &recvMsg);
while(1)
{
/* Wait until the previous FlexCAN receive is completed */
if(CAN_GetTransferStatus(INST_CAN_PAL1, RX_MAILBOX) == STATUS_SUCCESS)
{
CAN_Rx_test_ID = recvMsg.id;
CAN_Receive(INST_CAN_PAL1, RX_MAILBOX, &recvMsg);
}
}
Here my requirement is when ever the CAN Message is received on CAN Bus, CAN Receiver Interrupt need to Trigger so that without blocking of my code with while loop, i can handle the received CAN Messages
Hope you understand my requirement, please share your suggestion or code with required config settings to fulfill my requirement.
Thanks in Advance.