sai
sai

Reputation: 41

N_CR and N_AS Timeout in LIN communication

I am new to LIN protocol so far understood LIN communication and implemented the stack which is working fine for me now I want to implement N_CR and N_AS timeout. I want to know where this timeout is implemented in what condition. the timeout is 1000ms.

From my CAPL the master request (3C) and next request time is 50ms.

I am using timer2 with 1000ms.

when I use TIMER_Enable(TIM2) in main function and sending multiple MasterReq from CAPL the debug hits here in the middle of transmission.

void TIM2_IRQHandler()
{
if(timeout_type == N_CR_TIMEOUT)
{
timout_type = N_CR_ERROR;
}

So where should I enable the timer here whether in after receiving the FirstFrame and next consecutive frame.

Upvotes: 0

Views: 68

Answers (0)

Related Questions