Renesas EK-RA6M3 Getting Started

Renesas EK-RA6M3 Getting Started

Low power applications for ra6 and ra4 groups
Hide thumbs Also See for EK-RA6M3:

Advertisement

Quick Links

Renesas RA Family
Getting Started with Low Power Applications for RA6 and
RA4 Groups
Introduction
This Application Note describes how you can reduce the effective power consumption of the RA
Microcontroller using Low Power Modes (LPMs). Two accompanying application projects show common use
cases of entering Low Power Modes and configuring the various peripherals to exit the entered mode. Upon
completion of this guide, you will be able to add an LPM module to your own design, configure it correctly for
the target application, and write code using the included application project as a reference and efficient
starting point.
• This application note describes LPM module usage in different modes and supported peripherals
• Application overview for the different use cases
• FSP configuration steps for LPM
• Application design highlights
• Importing, loading, and running the application project
• Project migration steps to other RA Kits.
Required Resources
• e
2
studio ISDE v2021-07 or later
• Flexible Software Package (FSP) v3.3.0 or later
• J-Link RTT viewer V7.54a or later
Primary Target Devices
• EK-RA6M3 kit
• FPB-RA6E1 board
• FPB-RA4E1 board
Table 1. RA Kits Tested with LPM Application
Kit
Operable Long Timer in LPM
EK-RA6M3
Yes
FPB-RA6E1
Yes
FPB-RA4E1
Yes
EK-RA6M2
Yes
EK-RA6M1
Yes
EK-RA4M1
Yes
EK-RA2A1
Yes
R11AN0471EU0104 Rev.1.04
Oct.1.21
LPM Transition and Clock Changing at Run-Time
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Application Note
Page 1 of 37

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EK-RA6M3 and is the answer not in the manual?

Questions and answers

Summary of Contents for Renesas EK-RA6M3

  • Page 1 ISDE v2021-07 or later • Flexible Software Package (FSP) v3.3.0 or later • J-Link RTT viewer V7.54a or later Primary Target Devices • EK-RA6M3 kit • FPB-RA6E1 board • FPB-RA4E1 board Table 1. RA Kits Tested with LPM Application...
  • Page 2: Table Of Contents

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Contents Application Overview ....................... 4 Low Power Modes ..........................4 1.1.1 Sleep Mode ............................5 1.1.2 Software Standby Mode ........................5 1.1.3 Snooze Mode ............................5 1.1.4...
  • Page 3 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups 7.2.3 Using Renesas Flash Programmer ..................... 27 User Interface ............................27 7.3.1 LED Indication ............................. 27 7.3.2 User Push Button Input ........................27 7.3.3 RTT Console ............................27 Debugging Low Power Modes ......................
  • Page 4: Application Overview

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups 1. Application Overview Application projects accompanying this document serve as references to operate the microcontroller (MCU) in various Low Power Modes demonstrating different levels of power consumption often required to maximize battery life.
  • Page 5: Sleep Mode

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups In LPM, the CPU stops, but on-chip peripherals and oscillator states may be operational depending on the LPM selected. Therefore, their effects on MCU power consumption are very different. The typical current consumption when the MCU is in a Low Power Mode is found in the MCU Hardware User’s Manual section...
  • Page 6: Activation And Cancel Sources

    Low power modes are canceled by various interrupt sources such as RES pin reset, power-on reset, voltage monitor reset, and peripheral interrupts. Refer to the Low Power Modes section in Renesas RA MCU User’s Manual for list of interrupt sources for different LPMs.
  • Page 7: Use Case: Lpm Transition At Run-Time

    Low Power Mode. The count source of the timer is another element that should be considered carefully. In Renesas RA MCUs, the 16-bit Asynchronous General-Purpose Timer channel 0 (AGT0) and 16- bit channel 1 (AGT1) can be used in cascade mode to create a 32-bit timer. In the cascade mode, AGT0 underflow interrupt will trigger the counter of AGT1.
  • Page 8: Lpm Hal Module

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups 2. LPM HAL Module The LPM HAL module in FSP provides a method to include the LPM driver into the application and to configure them for different modes. It also allows configuring different trigger/cancel signals as required for LPM activation/cancellation.
  • Page 9: Components Tab

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 4. Summary of the Operable Long Timer Configuration 3.1 Components Tab Even though the Components tab is the last tab showing, it is important to visit and verify that the configured components are checked against the desired FSP version.
  • Page 10: Stacks Tab

    Figure 6. This shows that the application requires multiple drivers. For example, the r_lpm driver is the driver for Low Power Modes of a Renesas RA MCU. The LPM applications do not use RTOS, hence there is only one HAL/Common thread is available in this type of application.
  • Page 11: Module Configuration

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 6. Drivers Usage in LPM Application You can add additional modules to a thread by clicking the button. As an example, Figure 7 shows you how to add a AGT timer.
  • Page 12: Lpm Configuration

    MCU into Snooze mode from Software Standby mode. These sources are interrupt sources. Refer to the Low Power Modes section in Renesas RA MCU Hardware Manual for more details on what interrupts are available in the LPM.
  • Page 13 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 8. Software Standby Properties Configuration using the Properties Tab 3.3.1.4 Snooze Mode Configuration The Snooze Request source triggers a transition from Software Standby mode to Snooze mode. The Snooze End source cancels Snooze Mode and transition the MCU back to Software Standby mode.
  • Page 14 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 9. Snooze Properties Configuration using the Properties Tab 3.3.1.5 Deep Software Standby Configuration Figure 10 shows Deep Software Standby Mode with AGT1 underflow interrupt as cancel source.
  • Page 15: Timer Configuration

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups supply to most of the internal peripherals. For example, Maintain the internal power supply is needed to keep AGT timer running in the Operable Long Timer application as shown in Figure 11.
  • Page 16 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups The following figures show the configurations of AGT0 and AGT1. The count source of AGT0 is the Sub- Clock, which is available in Low Power modes, and the count source for AGT1 is the AGT0 underflow interrupt.
  • Page 17: Pin Configuration

    3.4.1 Pin Configuration in Normal Mode The pin configuration in normal mode is the MCU pin functions that you want to use in normal operating condition. Figure 15 shows the pin configuration of the EK-RA6M3 kit which is used in normal mode. R11AN0471EU0104 Rev.1.04 Page 17 of 40 Oct.1.21...
  • Page 18 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 15. Pin Configuration of EK-RA6M3 Kit in Normal Mode R11AN0471EU0104 Rev.1.04 Page 18 of 40 Oct.1.21...
  • Page 19: Pin Configuration In Lpm

    Refer to the “Handling of Unused Pins” section of the MCU Hardware user manual for more details. Figure 16 shows the pin configuration of the EK-RA6M3 kit in LPM named RA6M3-EK-LPM.pincfg with unused pins disabled. You may observe that most pins are disabled, except for the IRQ pins, and CGC pins, which are used to wake up the MCU and provide clock input through the XTAL and EXTAL pins.
  • Page 20: Application Architectures

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups 4. Application Architectures Figure 17 shows transitions between LPM and Normal mode in LPM applications. The WFI instructions activate LPM, the configured interrupt such as AGT1 underflow interrupt or external interrupt IRQ13-DS cancels LPM and wakes up the MCU.
  • Page 21 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Internal Reset State (LP) – Long Press Event (SP) – Short Press Event Power On Clock Sources (RTC) – RTC Event Reset (Timer) – Timer Event...
  • Page 22: Rtc Timer Operation In Lpm

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Note: The clock can only be changed in the Normal Mode. Changing clock in the LPM mode is not allowed. Note: For FPB-RA6E1 and FPB-RA4E1 boards, .
  • Page 23: Operable Long Timer In Software Standby And Deep Software Standby Modes

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups 4.3 Operable Long Timer in Software Standby and Deep Software Standby Modes The Operable Long Timer Application uses LPM configurations in Software Standby and Deep Software Standby modes.
  • Page 24 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Unused IO ports in LPM other than in Deep Software Standby mode should be put into input mode before entering the LPM by using the g_bsp_pin_lpm_cfg, which is generated from the RA6M3-EK- LPM.pincfg.
  • Page 25: Change System Clock At Run-Time

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 24. Release IO from IOKEEP State MCU Reset The following code stops the LOCO clock when it is not used as count source for AGT0 as shown in Figure Figure 25.
  • Page 26: Importing And Building The Project

    To connect and run the code, follow the steps in the following sections. Board Setups The EK-RA6M3 kit contains a few switch settings which must be configured prior to running the application associated with this application note. In addition to these switch settings, it has a USB debug port and ®...
  • Page 27: Downloading The Executables

    MCU. Refer to User Manuals UM08001 and UM08003 on www.segger.com. 7.2.3 Using Renesas Flash Programmer The Renesas Flash Programmer provides usable and functional support for programming the on-chip flash memory of Renesas microcontrollers in each phase of development and mass production. The software supports all RA MCUs.
  • Page 28 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 29. RTT Console for User Print Messages Note: While invoking the RTT console for FPB-RA6E1 and FPB-RA4E1 kits, the target device, RTT control block needs to be selected along with the debugger script for the LPM as shown in Figure 30.
  • Page 29: Debugging Low Power Modes

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 30. RTT Console for (Cortex M33 Devices) User Print Messages 7.4 Debugging Low Power Modes By default, it is not possible to debug the low power modes of an RA device. If an application tries to enter Sleep mode, pending a peripheral interrupt to wake it, this will not happen as it will be woken almost immediately by a debug interrupt.
  • Page 30: Steps To Run The Application

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 31. Debugger Settings for LPM Application Debugging 7.5 Steps to Run the Application The following table shows the steps to run the Clock Changing and LPM Transition application. On power up, when the board is connected to RTT, it will display the welcome message.
  • Page 31: Lpm Transition

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups 7.5.2 LPM Transition In the LPM application, the user switch has two functions based on how long you pressed, held, and released it. If the MCU is in the LPM modes (Sleep or Deep Software Standby) and the user button is pressed, held, and released, MCU exits the LPM mode and enters the Normal mode whether it was a short press or long press.
  • Page 32: Operable Long Timer

    Migrating LPM Applications to Different MCU/Kit Even though the LPM applications are created for the EK-RA6M3 kit, they are designed to easily migrate to other Renesas RA Kits. Refer to Table 1 of this document for more details about the supported Renesas RA kits.
  • Page 33 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 32. Rename and Import Project into e studio R11AN0471EU0104 Rev.1.04 Page 33 of 40 Oct.1.21...
  • Page 34 Getting Started with Low Power Applications for RA6 and RA4 Groups Open the project configuration and change the board BSP from EK-RA6M3 to EK-RA6M2 in the BSP tab. Figure 33. Change Board BSP Click at the Pins tab, select RA6M2-EK.pincfg and generate project content.
  • Page 35 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Create a new pin configuration file named RA6M2-EK-LPM.pincfg in the same project folder by using Manage configuration, duplicating RA6M2-EK.pincfg and renaming it to RA6M2-EK.pincfg. Figure 35. Create a New Pin Configuration Select the RA6M3-EK-LPM.pincfg and uncheck the Generate Data box to deselect the old pin configuration.
  • Page 36 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Figure 37. Select the New Pin Configuration and Disable Unused Peripherals Figure 38 shows an example of placing P106 into input mode. Figure 38. Place Unused in Input Mode R11AN0471EU0104 Rev.1.04...
  • Page 37 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Change the r_icu driver configuration and other peripheral configurations if needed. This is necessary since the user pushbutton S1 used in the applications may be different from board to board.
  • Page 38: References

    Build, run and clean up the migrated project. 9. References • Renesas FSP User’s Manual: https://renesas.github.io/fsp • Renesas RA MCU Datasheets: See http://renesas.com/ra and select the relevant MCU • LPM Example Projects on Renesas RA GitHub: https://github.com/renesas/ra-fsp-examples R11AN0471EU0104 Rev.1.04 Page 38 of 40 Oct.1.21...
  • Page 39 Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Website and Support Visit the following vanity URLs to learn about key elements of the RA family, download components and related documentation, and get support. RA Product Information www.renesas.com/ra...
  • Page 40: Revision History

    Renesas RA Family Getting Started with Low Power Applications for RA6 and RA4 Groups Revision History Description Rev. Date Page Summary 1.00 Sep.29.20 Initial version 1.01 Dec.02.20 Updated for RA6M3 1.02 Jan.26.21 General updates 1.03 Sep.24.21 Changed document name, updated for RA6E1, RA4E1 1.04...
  • Page 41 Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.

This manual is also suitable for:

Fpb-ra6e1Fpb-ra4e1Ek-ra6m2Ek-ra6m1Ek-ra4m1Ek-ra2a1

Table of Contents