S32k144 LPUART is not giving interrupt.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32k144 LPUART is not giving interrupt.

396 Views
charan_123
Contributor I

we have 20 bytes of data to be received from another controller. So in the ISR, is as below

if(event == UART_EVENT_RX_FULL){
    if(buffer[buffer_id] == 0x01){
      buffer_id = 1;
      LPUART_DRV_SetRxBuffer(INST_LPUART_2, &buffer[1], 19U);
    }
    else if(buffer_id == 1){
                     copy_to_local_buffer();
      buffer_id = 0;
      LPUART_DRV_SetRxBuffer(INST_LPUART_2, &buffer[0], 1U);

                     Notify_task();   

               }
    else{
      buffer_neg++;
    }
  }
}

 

but if we receive 21 bytes, for continuously few times, then the UART is not hitting the ISR at all.  Please help in this regards. 

0 Kudos
Reply
1 Reply

379 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

how was LPUART_DRV_ReceiveData called and do you also check for end of transfer anyhow/anywhere? Is a buffer_id modified or incremented anywhere too?

You can try to add UART_EVENT_END_TRANSFER event as well to know LPUART_DRV_ReceiveData will be needed to call again to allow further receiving.

BR, Petr

0 Kudos
Reply