MKE17Z256 Interrupts of UART1 and UART2

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

MKE17Z256 Interrupts of UART1 and UART2

503 Views
samueldionisiod
Contributor II

I'm using MKE17Z256 in my project with MCUXpresso

The microcontroller runs for a few seconds and break. This happens when I use the new data interrupts on reception.

I'm using an interrupt from UART 1 and UART 2 to signal when to get to a new buffer.

In other families I have like MKL15 or MKL25 this never happened.

Here is my code for analysis:

USB:

void INT_USB_LPUART_IRQHandler(void) {

/* If new data arrived. */
if ((kLPUART_RxDataRegFullFlag) & LPUART_GetStatusFlags(LPUART_USB)) {

LPUART_ReadBlocking(LPUART_USB, &buffer_usb_rx,
NUM_BYTES_USB_RX);

flag_novo_dado_usb_rx = 1;

LED_USB(2);

}

SDK_ISR_EXIT_BARRIER;


}

 

RS485:

void INT_RS485_LPUART_IRQHandler(void) {


/* If new data arrived. */
if ((kLPUART_RxDataRegFullFlag) & LPUART_GetStatusFlags(LPUART_RS485)) {

LPUART_ReadBlocking(LPUART_RS485, &rs485_buffer_rx1,
RS485_TAMANHO_BUFFER_RX);

LED_RS232_TELEMETRY(2);

flag_novo_buffer_rx = 1;

}

SDK_ISR_EXIT_BARRIER;

}

0 Kudos
Reply
1 Reply

495 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @samueldionisiod,

In what is there a specific line where the execution halts? Does it result in a hard fault?  We might get a better insight of the error by looking into the LPUART Status Register for more insight on the state of the LPUART module as this happens.

BR,

Edwin.

0 Kudos
Reply