AnsweredAssumed Answered

S32K148 CAN Rx issue

Question asked by he wei on Sep 4, 2018
Latest reply on Sep 18, 2018 by Alexandru Nan

Hello NXP,

 

I can correctly receive CAN messages with the FLEXCAN_DRV_RxFifo function, 
but I can't receive any messages with the FLEXCAN_DRV_RxFifoBlocking function.
I don't know what the difference between the two is?
I use them like this:
(1)if(FLEXCAN_DRV_RxFifoBlocking(INST_CANCOM1,&recvBuff,100)==STATUS_SUCCESS)
{
   Test++;
}

 

(2) if(FLEXCAN_DRV_RxFifo(INST_CANCOM1,&recvBuff)==STATUS_SUCCESS)

     {

         Test++;

    }

 

The case (1) can't receive any messages,but the case (2) can correctly receive CAN messages.

The Case(1) seems to be dead in the function : OSIF_SemaWait(&state->mbs[FLEXCAN_MB_HANDLE_RXFIFO].mbSema, timeout_ms)

,Enter this function,but can't jump out.

 

What is the cause of this problem.
I want to use interrupt reception, which function should I use?

Thanks!

Owen

Outcomes