1.27.18 Low Power Asynchronous Receiver (RXLP)

The Low Power Asynchronous Receiver (RXLP) is a low-power UART with a slow clock. It works only in Receive mode. It features a Receive Data (RXD) pin that can be used to wake up the system. The wakeup occurs only on data matching—expected data can be a single value, two values, or a range of values. The RXLP operates on a slow clock domain to reduce power consumption.

Using The Library

The following example demonstrates the waking of the processor using RXLP. UART transmitter is connected to RXD pin of the processor. RXLP is initialized as part of SYS_Initialize() API call. Application is configured such that the processor asserts SHDWN signal upon a key press. When . It can then be woken up by sending a character using the UART transmitter connected to the RXD pin.

void switchHandler( PIO_PIN pin, uintptr_t context)
{
 SHDWC_Shutdown();
}

int main ( void )
{
 /* Initialize all modules */
 SYS_Initialize ( NULL );
 PIO_PinInterruptCallbackRegister(SWITCH_PIN, switchHandler, 0);
 PIO_PinInterruptEnable(SWITCH_PIN);
 while ( true )
 {
 PIT_DelayMs(500);
 LED_Toggle();
 /* Maintain state machines of all polled MPLAB Harmony modules. */
 SYS_Tasks ( );
 }
 /* Execution should not come here during normal operation */
 return ( EXIT_FAILURE );
}

Library Interface

Low Power Asynchronous Receiver peripheral library provides the following interfaces:

Functions

Name Description
RXLP_Initialize Initialize the RXLP