This simple example demonstrates how to configure and handle UART interrupts using the LPUART module on the S32K312-EVB. It sets up a UART callback function and initiates reception in single-byte mode. After each byte is received, the buffer is updated using Lpuart_Uart_Ip_SetRxBuffer(), unless a newline character ('\n') is detected, in which case a reception flag is set to signal the main loop.
When the LPUART_UART_IP_EVENT_END_TRANSFER event occurs, reception is re-enabled using Lpuart_Uart_Ip_AsyncReceive().
Only basic event handling is implemented; other UART events are acknowledged but not processed.
The example uses LPUART instance 6, enabling serial communication via the USB port (J40) on the S32K312-EVB. If using TeraTerm, ensure the transmit setting is configured to LF (Line Feed) to properly send newline characters when pressing Enter.
------------------------------------------------------------------------------
* Test HW: S32K312EVB-Q172
* MCU: S32K312
* IDE: S32DS3.6.2
* RTD release: 6.0.0
* Debugger: PE Micro
* Target: internal_FLASH
------------------------------------------------------------------------------
Test result: