All About Circuits

Industry White Paper

Wake Up on Serial Input: Receiving UART Data in Software Standby Mode on the FPB-RA0E1

Learn how to wake the Renesas FPB-RA0E1 from Software Standby mode with UART input, using the LOCO clock and the Low Power Modes driver in e² studio.


November 21, 2026 by Renesas Electronics

Battery-powered sensor nodes and smart utility meters spend most of their operational life asleep, waiting for a command packet from a host controller or wireless modem. If you leave the main CPU and high-speed oscillators running just to listen to a serial receive pin, your standby current budget evaporates in hours. Conversely, if you shut down the entire microcontroller to save power, standard UART peripherals lose their clock source and ignore incoming bytes until an external GPIO interrupt wakes the chip.

This walkthrough demonstrates how to receive serial data and wake the microcontroller from Software Standby mode on the Renesas FPB-RA0E1 Fast Prototyping Board. Using the e² studio IDE and the Flexible Software Package (FSP), you will configure the Low Power Modes (r_lpm) and Serial Interface UARTA (r_uarta) stacks, drive UARTA0 from the 32.768 kHz Low-Speed On-Chip Oscillator (LOCO) at 8192 bps, enable UARTA0 reception transfer end as a hardware wake-up source, and verify 10-byte wake-up transfers using the Termite serial terminal and the e² studio Expressions view.

 

Project Specs

Target Board FPB-RA0E1
MCU Family Renesas RA0 Series (R7FA0E1073CFJ, 32-pin Arm Cortex-M23)
Peripheral Covered Serial Interface UARTA (r_uarta) and Low Power Modes (r_lpm)
IDE / Toolchain e² studio + LLVM Embedded Toolchain for Arm (21.1.1)
FSP Version 6.3.0
Interface Used UARTA0 (P207 / RXDA, P208 / TXDA) via COM port (COM10)
Baud Rate 8192 bps (8 bits, None parity, 1 bit stop, clocked by LOCO)
Skill Level Intermediate
Build Time 25 minutes
Prerequisites e² studio installed, Termite (3.4) or serial terminal supporting 8192 bps installed

 

Why Does Low-Power UART Wake-Up Matter on the FPB-RA0E1?

In a typical sleep architecture, entering a deep standby state halts the high-speed system clocks that feed standard serial peripherals. Waking the processor over UART usually requires reconfiguring the RXD pin as an external edge interrupt, sacrificing the first incoming byte as a dummy wake-up pulse while the main oscillator stabilizes. That workaround forces you to modify the host protocol with preamble bytes or retry logic.

The Renesas RA family solves this at the silicon level on the Renesas RA0E1 through the dedicated UARTA peripheral. As documented in Section 9 (Low Power Modes) and Section 23 (Serial Interface UARTA (UARTA)) of the RA0E1 Group User’s Manual: Hardware [PDF], UARTA0 can derive its operating clock directly from the 32.768 kHz Low-Speed On-Chip Oscillator (LOCO), which remains active during Software Standby mode. While the Cortex-M23 core and high-speed clocks are stopped, UARTA0 continues shifting in serial bits in the background and fires the UARTA0_RXI (UARTA0 reception transfer end) interrupt to return the microcontroller to Normal mode once the receive transfer finishes.

 

What You’ll Need

Hardware

 

Software

 

The Concept in 60 Seconds

Operating a UART peripheral inside Software Standby mode requires matching the baud rate to the low-power oscillator frequency. According to page 548 (23. Serial Interface UARTA (UARTA)) of the RA0E1 Group User’s Manual: Hardware, the baud-rate generator calculates the serial bit rate using the formula Baud rate = f_UTAn / (2 * k), where f_UTAn is the operating clock frequency and k is the 8-bit BRGCAn register divider (k = 2, 3, 4, ..., 255).

When UARTA0 is clocked by LOCO at 32.768 kHz (32768 Hz), the minimum divider (k = 2) yields a maximum achievable baud rate of 32768 / (2 * 2) = 8192 bps with 0.00% baud-rate error. If you leave the FSP stack at its default 115200 baud rate, the configurator flags a range error (Valid range: [200, 8192] (bps)). By setting the baud rate to 8192 bps and enabling UARTA0 reception transfer end under Wake Sources in the r_lpm stack, the MCU halts in Software Standby mode after calling R_LPM_LowPowerModeEnter and wakes automatically once R_UARTA_Read captures the requested 10-byte payload.

 

Step-by-Step: Building the Standby UART Project

Step 1: Create a Minimal Bare-Metal Project in e² studio

  1. On the Welcome to e² studio screen, click Create a new C/C++ project.
  2. In the New C/C++ Project (Templates for New C/C++ Project) dialog, select Renesas RA > Renesas RA C/C++ Project and click Next >.
  3. In the Project Name and Location dialog, type FPB_RA0E1_uartA_SS into the Project name field and click Next >.
  4. In the Device and Tools Selection dialog (Figure 1), confirm FSP Version is set to 6.3.0 and select FPB-RA0E1 from the Board drop-down menu, which selects the 32-pin R7FA0E1073CFJ device and CM23 core (TrustZone: No). Confirm C is selected as the language along with LLVM Embedded Toolchain for Arm (21.1.1) and J-Link ARM, then click Next >.

     

    The Device and Tools Selection dialog with FSP 6.3.0 and the FPB-RA0E1 board selected. Device Details confirms the 32-pin Cortex-M23 part with TrustZone listed as No.

    Figure 1. The Device and Tools Selection dialog with FSP 6.3.0 and the FPB-RA0E1 board selected. Device Details confirms the 32-pin Cortex-M23 part with TrustZone listed as No. Image used courtesy of Renesas

     

  5. In the SmartBundle and Preceding Project Selection dialog, keep None selected and click Next >. Choose Executable and No RTOS, click Next >, select Bare Metal - Minimal, and click Finish. Click Open Perspective when prompted to open the FSP Configuration perspective.

Because the Cortex-M23 core on the RA0E1 does not implement TrustZone, e² studio automatically configures the project as a flat bare-metal application.

 

Step 2: Add and Configure the Low Power Modes Stack

  1. In the FSP Configuration editor (configuration.xml), switch to the Stacks tab and click New Stack > Power > Low Power Modes (r_lpm).
  2. Click the g_lpm0 Low Power Modes (r_lpm) block and open its Properties window.
  3. Expand Module g_lpm0 Low Power Modes (r_lpm) > General and change Low Power Mode from Sleep mode to Software Standby mode (Figure 2).

     

    The g_lpm0 Low Power Modes (r_lpm) properties with Low Power Mode changed from Sleep mode to Software Standby mode.

    Figure 2. The g_lpm0 Low Power Modes (r_lpm) properties with Low Power Mode changed from Sleep mode to Software Standby mode. Image used courtesy of Renesas

     

Selecting Software Standby mode instructs the r_lpm driver to shut down the CPU and high-speed oscillators when R_LPM_LowPowerModeEnter is called, while retaining SRAM and selected low-power peripherals.

 

Step 3: Add the UARTA Stack and Select the LOCO Clock Source

  1. In the Stacks tab, click New Stack > Connectivity > UART (r_uarta).
  2. Hover your cursor over the newly added g_uart0 UART (r_uarta) stack block to inspect the initial error tooltip: Error: UARTA clock source must be selected on Clocks tab.
  3. Open the Clocks tab, scroll down to UARTA0 Src: Disabled, click its drop-down menu, and select UARTA0 Src: LOCO/SOSC, which sets the output clock to UARTA 32.768 kHz (Figure 3).

     

    The Clocks tab with UARTA0 Src set to LOCO/SOSC, which feeds the peripheral from the 32.768 kHz oscillator.

    Figure 3. The Clocks tab with UARTA0 Src set to LOCO/SOSC, which feeds the peripheral from the 32.768 kHz oscillator. Image used courtesy of Renesas

     

Routing LOCO/SOSC to UARTA0 supplies the serial peripheral with a 32.768 kHz clock that continues oscillating inside Software Standby mode.

 

Step 4: Verify Baud-Rate Limits and Wake-Up Sources in the Hardware Manual

  1. Open the RA0E1 Group User’s Manual: Hardware [PDF] (R01UH1040EJ0100) to page 548 (Section 23. Serial Interface UARTA (UARTA)) and inspect the (3) Baud rate calculation formulas and Table 23.9 through Table 23.12 (Set data of baud rate generator) on page 549 to verify the supported baud rates and error percentages.
  2. Navigate to Section 9. Low Power Modes and inspect Table 9.1 (Specifications of the low power mode functions), Table 9.2 (Operating conditions of each low power mode), Table 9.3 (Available interrupt sources to transition to Normal mode from Snooze mode and Software Standby mode), and Figure 9.1 (Low power mode transitions). Confirm in Table 9.3 that UARTA (UARTA0_ERRI, UARTA0_RXI, and UARTA0_TXI) is marked Yes under Software Standby mode (Figure 4).

     

    Table 9.3 of the RA0E1 Group User’s Manual: Hardware, showing UARTA0_ERRI, UARTA0_TXI, and UARTA0_RXI marked Yes under Software Standby mode.

    Figure 4. Table 9.3 of the RA0E1 Group User’s Manual: Hardware, showing UARTA0_ERRI, UARTA0_TXI, and UARTA0_RXI marked Yes under Software Standby mode. Image used courtesy of Renesas

     

Checking the baud-rate generator tables and Table 9.3 confirms that 8192 bps is supported by LOCO within permissible baud-rate error limits and that UARTA0_RXI can wake the processor.

 

Step 5: Configure the UARTA Baud Rate, Callback, and LPM Wake Source

  1. Return to the Stacks tab in e² studio and hover over g_uart0 UART (r_uarta) to observe the remaining error tooltip (Figure 5): Error: Requested baud rate not achievable. Valid range: [200, 8192] (bps).

     

    The error tooltip on the g_uart0 UART (r_uarta) stack, reporting that the requested baud rate falls outside the achievable range.

    Figure 5. The error tooltip on the g_uart0 UART (r_uarta) stack, reporting that the requested baud rate falls outside the achievable range. Image used courtesy of Renesas

     

  2. Select g_uart0 UART (r_uarta) and open its Properties window. Expand Module g_uart0 UART (r_uarta) > Baud and change Baud Rate from 115200 to 8192 (note that Pins at the bottom of the properties view automatically maps RXDA to P207 and TXDA to P208).
  3. Expand the Interrupts section and change Callback from NULL to UARTA_CALLBACK (Figure 6), leaving Receive Interrupt Priority and Transmit Interrupt Priority at Priority 2.

     

    The g_uart0 properties after setting Baud Rate to 8192 and Callback to UARTA_CALLBACK, with RXDA and TXDA mapped to P207 and P208.

    Figure 6. The g_uart0 properties after setting Baud Rate to 8192 and Callback to UARTA_CALLBACK, with RXDA and TXDA mapped to P207 and P208. Image used courtesy of Renesas

     

  4. Click g_lpm0 Low Power Modes (r_lpm) in the Stacks tab, open its Properties window, expand Deep Sleep and Standby Options > Wake Sources, and check the box next to UARTA0 reception transfer end (Figure 7).

     

    The Wake Sources list in the g_lpm0 stack properties, with UARTA0 reception transfer end checked.

    Figure 7. The Wake Sources list in the g_lpm0 stack properties, with UARTA0 reception transfer end checked. Image used courtesy of Renesas

     

  5. Click Generate Project Content and click Proceed. In Project Explorer, expand the src folder and open hal_entry.c.

Enabling UARTA0 reception transfer end links the UARTA0_RXI interrupt to the system standby controller so completing a UART read wakes the CPU.

 

Step 6: Implement the Initial UART Write, Standby Loop, and Callback

  1. Inside void hal_entry(void) in hal_entry.c, declare the status variable and startup string:
    fsp_err_t status;
    uint8_t message[] = "UART-A configured correctly \n";
  2. Expand Developer Assistance > HAL/Common > g_uart0 UART (r_uarta), drag Call R_UARTA_Open() into hal_entry() (status = R_UARTA_Open(&g_uart0_ctrl, &g_uart0_cfg);), and add assert(FSP_SUCCESS == status);.
  3. Expand g_lpm0 Low Power Modes (r_lpm) under Developer Assistance, drag Call R_LPM_Open() below the UART open check (status = R_LPM_Open(&g_lpm0_ctrl, &g_lpm0_cfg);), and add assert(FSP_SUCCESS == status);.
  4. Drag Call R_UARTA_Write() from Developer Assistance (g_uart0), pass message and sizeof(message) as the initial arguments (status = R_UARTA_Write(&g_uart0_ctrl, message, sizeof(message));), and add assert(FSP_SUCCESS == status);.
  5. Add a while(1) loop below the write check. Inside the loop, drag Call R_UARTA_Read() and pass data_received and 10 (status = R_UARTA_Read(&g_uart0_ctrl, data_received, 10);). At the top of hal_entry.c below #include "hal_data.h", declare the 10-byte receive buffer uint8_t data_received[10] = {0};, and then add assert(FSP_SUCCESS == status); below R_UARTA_Read.
  6. Below the read assertion inside while(1), add a 2-second delay R_BSP_SoftwareDelay(2000, BSP_DELAY_UNITS_MILLISECONDS);, drag Call R_LPM_LowPowerModeEnter() (status = R_LPM_LowPowerModeEnter(&g_lpm0_ctrl);), and add assert(FSP_SUCCESS == status);.
  7. Drag Callback function definition from g_uart0 UART (r_uarta) in Developer Assistance above void hal_entry(void). Inside void UARTA_CALLBACK(uart_callback_args_t *p_args), expand g_ioport I/O Port (r_ioport) in Developer Assistance and drag Call R_IOPORT_PinWrite() to turn on LED1: R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_HIGH);
  8. Back inside the while(1) loop, between R_BSP_SoftwareDelay(2000, BSP_DELAY_UNITS_MILLISECONDS); and status = R_LPM_LowPowerModeEnter(&g_lpm0_ctrl);, add R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_LOW); to turn off LED1 before entering standby (you can click the hammer icon at this point to verify that the baseline implementation compiles cleanly).

 

Step 7: Add the Post-Wakeup Verification Logic

  1. In hal_entry(), update the byte-count argument of the initial R_UARTA_Write call from sizeof(message) to sizeof(message) - 1, and declare the wake-up confirmation string below message[]: uint8_t wakeup_m[] = “UART-A receive interrupt wake from Software standby mode \n”;
  2. Inside UARTA_CALLBACK(uart_callback_args_t *p_args) below R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_HIGH);, add an if condition that checks whether p_args->event equals UART_EVENT_RX_COMPLETE and sets wake_up = 1;:
    if(p_args->event == UART_EVENT_RX_COMPLETE){ wake_up = 1; }
  3. At the top of hal_entry.c below uint8_t data_received[10] = {0};, declare the global wake-up flag: uint8_t wake_up = 0;.
  4. Inside the while(1) loop in hal_entry(), reset wake_up = 0; right before R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_LOW);.
  5. Directly after status = R_LPM_LowPowerModeEnter(&g_lpm0_ctrl); and its assert(FSP_SUCCESS == status); check, add a 100-millisecond delay (R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);) so the UART callback finishes executing, then check if(wake_up == 1) and transmit wakeup_m (Figure 8): if(wake_up == 1){ status = R_UARTA_Write(&g_uart0_ctrl, wakeup_m, sizeof(wakeup_m) - 1); assert(FSP_SUCCESS == status); }

     

    The completed hal_entry.c, with the wake-up flag cleared before standby and wakeup_m transmitted once the MCU returns to Normal mode.

    Figure 8. The completed hal_entry.c, with the wake-up flag cleared before standby and wakeup_m transmitted once the MCU returns to Normal mode. Image used courtesy of Renesas

     

 

Step 8: Build, Debug, and Verify Standby Wake-Up

  1. Select FPB_RA0E1_uartA_SS in Project Explorer and click the hammer icon to build the project.
  2. Right-click FPB_RA0E1_uartA_SS, select Debug As > Renesas GDB Hardware Debugging, and click Switch to enter the Debug perspective (initially paused at SystemInit() inside Reset_Handler() in startup.c).
  3. Click Window > Show View > Expressions, add data_received, expand data_received[0] through data_received[9], and select the rows to monitor the data_received array in real time.
  4. Click Resume once (which executes the startup initialization, advances to hal_entry() in main.c, and resets all elements of data_received from uninitialized SRAM values to 0), and then click Resume a second time to start execution.
  5. Open Termite 3.4 configured for your board’s COM port at 8192 bps (COM10 8192 bps, 8N1, no handshake). Press the physical reset button on the FPB-RA0E1 board to observe “UART-A configured correctly” in the terminal, wait two seconds for the board to enter Software Standby mode, and then send the 10-byte string 0123456789 from Termite.

 

Code Snippet

For complete driver API references, consult the FSP Documentation.

void UARTA_CALLBACK(uart_callback_args_t *p_args) {
    R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_HIGH);
    if(p_args->event == UART_EVENT_RX_COMPLETE) {
        wake_up = 1;
    }
}

// Inside while(1) in hal_entry(): arm 10-byte read, enter Software Standby, and log wake-up
status = R_UARTA_Read(&g_uart0_ctrl, data_received, 10);
assert(FSP_SUCCESS == status);
R_BSP_SoftwareDelay(2000, BSP_DELAY_UNITS_MILLISECONDS);
wake_up = 0;
R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_LOW);
status = R_LPM_LowPowerModeEnter(&g_lpm0_ctrl);
assert(FSP_SUCCESS == status);

 

What You Should See

Pressing the reset button on the FPB-RA0E1 prints UART-A configured correctly in Termite (COM10 8192 bps, 8N1, no handshake), after which LED1 turns off and the MCU enters Software Standby mode. When you transmit 0123456789 (10 bytes) from Termite, the UARTA0 receive interrupt wakes the processor, turns LED1 high inside UARTA_CALLBACK, prints UART-A receive interrupt wake from Software standby mode in the terminal, and populates data_received[0] through data_received[9] in the e² studio Expressions window with ASCII values 48 '0' through 57 '9' (Figure 9).

 

Termite showing the startup message, the transmitted 0123456789, and the wake-up confirmation, beside the Expressions view holding the received ASCII values.

Figure 9. Termite showing the startup message, the transmitted 0123456789, and the wake-up confirmation, beside the Expressions view holding the received ASCII values. Image used courtesy of Renesas

 

Troubleshooting

The g_uart0 UART (r_uarta) stack displays “Requested baud rate not achievable. Valid range: [200, 8192] (bps)”

When UARTA0 is clocked from the 32.768 kHz LOCO oscillator, the maximum baud rate is 8192 bps. Open the g_uart0 Properties view, expand Baud, and change Baud Rate from 115200 to 8192.

 

The MCU enters Software Standby mode but never wakes up when bytes are sent

Check two settings: first, ensure UARTA0 reception transfer end is checked under Deep Sleep and Standby Options > Wake Sources in the g_lpm0 stack properties; second, ensure you send at least 10 bytes (0123456789) so R_UARTA_Read(&g_uart0_ctrl, data_received, 10) completes its 10-byte transfer and triggers the UART_EVENT_RX_COMPLETE interrupt.

 

Received characters in termite are garbled

The terminal’s baud rate must match the board exactly. A standard preset such as 9600 bps is about 17% off from the 8192 bps UARTA0 rate, so received characters are garbled. Type 8192 directly into the Baud rate field in Termite’s Settings dialog.

 

Where to Take It Next

Once your FPB-RA0E1 can wake from Software Standby mode on a 10-byte UARTA0 frame, you can pair r_uarta with the Data Transfer Controller (DTC) by clicking Add DTC Driver for Transmission in the Stacks view to offload outgoing data, such as the wake-up message, from the CPU. The Stacks view marks this option “Recommended but optional,” while the reception DTC option is marked “Not recommended.” To explore power consumption figures and additional wake-up sources such as the 32-bit Interval Timer (TML32) or Real-Time Clock (RTC), check out the RA0E1 Group User’s Manual: Hardware and the FSP Documentation.

 

Frequently Asked Questions

Why must UARTA0 use the LOCO clock for Software Standby wake-up on the RA0E1?

High-speed oscillators (HOCO and MOCO) stop during Software Standby mode to minimize current draw. The 32.768 kHz Low-Speed On-Chip Oscillator (LOCO) remains operational during Software Standby mode, allowing UARTA0 to continue clocking in serial bits while the CPU sleeps.

 

Why Is the baud rate set to 8192 bps instead of 9600 or 115200 bps?

The UARTA baud-rate generator divides the operating clock by 2 * k, where k is an integer between 2 and 255. With a 32768 Hz LOCO clock and k = 2, the highest achievable rate is 32768 / 4 = 8192 bps.

 

When does UARTA0 reception transfer end wake the microcontroller?

Because R_UARTA_Read(&g_uart0_ctrl, data_received, 10) is called before entering standby, the driver arms UARTA0 to receive 10 bytes, and the UARTA0_RXI transfer-end condition wakes the system and sets wake_up = 1 inside UARTA_CALLBACK once the 10-byte reception completes.

 

Related Resources