AN0018.1: Supply Voltage Monitoring

Similar documents
AN0018.0: Supply Voltage Monitoring

EFM8 Laser Bee Family QSG110: EFM8LB1-SLSTK2030A Quick Start Guide

EFM8 Universal Bee Family EFM8UB2 Errata

QSG144: CP2615-EK2 Quick-Start Guide

EFM32 Pearl Gecko Family QSG118: EFM32PG1 SLSTK3401A Quick- Start Guide

QSG123: CP2102N Evaluation Kit Quick- Start Guide

QSG114: CPT007B SLEX8007A Kit Quick- Start Guide

AN999: WT32i Current Consumption

AN0015.0: EFM32 and EZR32 Wireless

AN0059.1: UART Flow Control

AN125 INTEGRATING RAISONANCE 8051 TOOLS INTO THE S ILICON LABS IDE. 4. Configure the Tool Chain Integration Dialog. 1. Introduction. 2.

SMBus. Target Bootloader Firmware. Master Programmer Firmware. Figure 1. Firmware Update Setup

EFM8 Busy Bee Family EFM8BB2-SLSTK2021A Quick Start Guide

QSG159: EFM32TG11-SLSTK3301A Quick- Start Guide

EFM32 Happy Gecko Family EFM32HG-SLSTK3400A Quick-Start Guide

EFM8 Universal Bee Family EFM8UB1 Errata

UG294: CPT213B SLEXP8019A Kit User's Guide

QSG153: Micrium s μc/probe Tool Quick- Start Guide

AN976: CP2101/2/3/4/9 to CP2102N Porting Guide

EFR32 Mighty Gecko Family EFR32MG1 with Integrated Serial Flash Errata History

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

QSG155: Using the Silicon Labs Dynamic Multiprotocol Demonstration Applications

Translate HCSL to LVPECL, LVDS or CML levels Reduce Power Consumption Simplify BOM AVL. silabs.com Building a more connected world. Rev. 0.

UG345: Si72xx Eval Kit User's Guide

UG369: Wireless Xpress BGX13P SLEXP8027A Kit User's Guide

Humidity/Temp/Optical EVB UG

CP2104-EK CP2104 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

QSG119: Wizard Gecko WSTK Quick-Start Guide

CP2103-EK CP2103 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

EFM32 Zero Gecko EFM32ZG Errata

AN0059.0: UART Flow Control

Figure 1. CP2108 USB-to-Quad UART Bridge Controller Evaluation Board

CP2105-EK CP2105 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

EFM8 Busy Bee EFM8BB1 Errata

Date CET Initials Name Justification

EFR32MG13, EFR32BG13 & EFR32FG13 Revision C and Data Sheet Revision 1.0

8-Bit MCU C8051F85x/86x Errata

Software Release Note

UG254: CP2102N-MINIEK Kit User's Guide

EFM32 EFM32GG11 Giant Gecko Family QSG149: EFM32GG11-SLSTK3701A Quick-Start Guide

UG271: CP2615-EK2 User's Guide

AN1160: Project Collaboration with Simplicity Studio

Figure 1. Precision32 AppBuilder

UG313: Thunderboard Sense 2 Bluetooth Low Energy Demo User's Guide

CP2114 Family CP2114 Errata

QSG107: SLWSTK6101A/B Quick-Start Guide

WT12 EVALUATION KIT DATA SHEET. Monday, 09 September Version 1.7

UG322: Isolated CAN Expansion Board User Guide

USBXpress Family CP2102N Errata

AN1139: CP2615 I/O Protocol

UG365: GATT Configurator User s Guide

The process also requires the use of the following files found in the Micriµm Quick Start Package for the FRDM-KL46Z:

BRD4300B Reference Manual MGM111 Mighty Gecko Module

QSG107: SLWSTK6101A/B Quick-Start Guide

QSG107: SLWSTK6101A Quick-Start Guide

UG274: Isolated USB Expansion Board User Guide

EFM32 Pearl Gecko Family EFM32PG1 Errata

Date CET Initials Name Justification

AN888: EZR32 Quick Start Guide

µc/probe on the Freescale FRDM-KL05Z without an RTOS

Wireless Development Suite (WDS) is a software utility used to configure and test the Silicon Labs line of ISM band RFICs.

AN1106: Optimizing Jitter in 10G/40G Data Center Applications

AN1143: Using Micrium OS with Silicon Labs Thread

QSG126: Bluetooth Developer Studio Quick-Start Guide

AN719 PRECISION32 IDE AND APPBUILDER DETAILED TUTORIAL AND WALKTHROUGH. 1. Introduction. Figure 1. Precision32 IDE and AppBuilder Walkthrough Overview

AN116. Power Management Techniques and Calculation. Introduction. Key Points. Power Saving Methods. Reducing System Clock Frequency

Bluegiga WF111 Software Driver Release Notes

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

AN324 ADVANCED ENCRYPTION STANDARD RELEVANT DEVICES. 1. Introduction. 2. Implementation Potential Applications Firmware Organization

8-bit MCU Family C8051F93x/92x Errata

AN1117: Migrating the Zigbee HA Profile to Zigbee 3.0

TS9004 Demo Board FEATURES ORDERING INFORMATION

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

Not Recommended for New Designs. Si Data Sheet Errata for Product Revision B

EFM32G Product Revision E

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

AN1095: What to Do When the I2C Master Does Not Support Clock Stretching

2. Key Points. F93x F92x F91x F90x. Figure 1. C8051F93x-C8051F90x MCU Family Memory Size Options

UG366: Bluetooth Mesh Node Configuration User s Guide

Date CET Initials Name Justification

UG352: Si5391A-A Evaluation Board User's Guide

AN1083: Creating and Using a Secure CoAP Connection with ARM s mbed TLS

Router-E and Router-E-PA Wireless Router PRODUCT MANUAL

AN1083: Creating and Using a Secure CoAP Connection with ARM s mbed TLS

C8051F411-EK C8051F411 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Kit Overview. 3. Evaluation Board Interface LCD User Interface

The Si50122-Ax-EVB is used to evaluate the Si50122-Ax. Table 1 shows the device part number and corresponding evaluation board part number.

Si1146 UVIRSlider2EK Demo Kit

Figure 1. Traditional Biasing and Termination for LVPECL Output Buffers

AN1119: Using RAIL for Wireless M-Bus Applications with EFR32

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

AN1006: Differences Between Si534x/8x Revision B and Revision D Silicon

UG370: Wireless Xpress AMW007 Kit User's Guide

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

AN0042: USB/UART Bootloader

AN888: EZR32 Simple TRX Application Quick Start Guide

UDP UPPI Card UG UDP UPPI CARD USER S GUIDE. 1. Introduction. Figure 1. UPPI Cards with and without Radio

Programming Options for Si5332

C8051F00x/01x-DK C8051F00X/01X DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. 2. Hardware Setup using a USB Debug Adapter

UG232: Si88xxxISO-EVB User's Guide

QSG166: WF200 Wi-Fi Development Kit Quick Start Guide

Transcription:

This application note will demonstrate how to use the EFM32 EMU's Voltage Monitor monitor the supply voltage and the Reset Management Unit to determine if a brown-out reset has occurred. This application note includes: This PDF document Source files (zip) Example c-code Multiple IDE projects KEY POINTS Observe RMU to determine if a brown-out has occurred Monitor power rails for low voltage conditions with VMON Low-current voltage monitoring down to EM4 with VMON Falling Interrupt Rising Interrupt volts Supply Voltage VMON Threshold Brown Out Threshold t Device Held In Reset silabs.com Building a more connected world. Rev. 1.09

Device Compatibility 1. Device Compatibility This application note supports multiple device families, and some functionality is different depending on the device. MCU Series 1 consists of: EFM32 Jade Gecko (EFM32JG1/EFM32JG12) EFM32 Pearl Gecko (EFM32PG1/EFM32PG12) EFM32 Giant Gecko (EFM32GG11) Wireless SoC Series 1 consists of: EFR32 Blue Gecko (EFR32BG1/EFR32BG12/EFR32BG13) EFR32 Flex Gecko (EFR32FG1/EFR32FG12/EFR32FG13) EFR32 Mighty Gecko (EFR32MG1/EFR32MG12/EFR32MG13) silabs.com Building a more connected world. Rev. 1.09 2

Reset Management Unit 2. Reset Management Unit The Reset Management Unit (RMU) monitors the reset lines and ensures reliable operation by resetting the microcontroller if any of the supply voltages are insufficient or if certain events occur. Such events are activation of the external reset pin, watchdog timeout, kernel lockup or a system reset request. In addition, the RMU sets the reset cause register which can be used to determine the cause of the last reset at startup. 2.1 Power-on Reset (POR) and Brown-out Detection The POR ensures that the device does not start up before the AVDD supply voltage has reached the threshold voltage VPOR thr (roughly 1.2V). Before the POR threshold voltage is reached, the device is kept in reset state. Once the POR threshold is reached, the device's Brown Out Detectors engage, keeping the device in reset until their thresholds are met. If, during device operation, the supply voltage falls below the one of the brown-out detector threshold voltages, a "brown-out" has occurred. The brown-out detector that has had its threshold crossed will pull the microcontroller into reset to prevent unexpected program execution and data corruption. EFM32 and EFR32 Series 1 devices feature two brown-out detectors, one each for the DVDD and AVDD rails. Once the RMU initiates a reset, the reset cause register is written to specify the reset source. If the supply voltage has fallen below the BOD threshold, but not below the POR threshold, the RMU will report the corresponding brown-out reset cause. If the supply voltage has fallen below the POR threshold, a POR reset cause will be reported. 2.2 Reading the Reset Cause Register The reset cause register indicates which reset source triggered the last reset. Because several bits can be set at once and multiple reset causes can occur simultaneously, it is important to look for the reset cause in the following order to discover the main cause of reset: 1. Power-on reset 2. AVDD brown-out reset 3. DVDD brown-out reset 4. Pin reset 5. Lockup and system request reset 6. Watchdog reset When following this list from the smallest to largest number, the first indicated reset cause will be the actual reset cause. The reset cause register needs to be cleared after it has been read, otherwise it may indicate a wrong cause of reset at the next startup. To clear the reset cause register a 1 has to be written to the RCCLR bit in RMU_CMD and the HRCCLR bit in EMU_AUXCTRL. The EFM32 software library contains functions to read and clear the reset cause register. silabs.com Building a more connected world. Rev. 1.09 3

Voltage Monitor 3. Voltage Monitor The EFM32 features an extremely low energy Voltage Monitor (VMON) capable of running down to EM4 Hibernate. Trigger points are preloaded but may be reconfigured. Voltage monitors exist for the following rails: AVDD X 2 1 DVDD IOVDD 2 BUVDD 3 Note: 1. Some devices only have one AVDD rail and, thus, one AVDD voltage monitor. 2. Separate IOVDD monitors exist for each IOVDD rail, on those devices with multiple IOVDD rails. 3. BUVDD monitor is not available on all devices. The voltage monitor provides an easy way to warn if the supply voltage reaches a critical level. While the RMU automatically initiates a reset if the voltage level is too low, the voltage monitor compares the supply voltage to an internal production-calibrated bandgap reference. The trigger voltage level can be scaled in 20 mv increments between 1.62 V and 3.4 V. By adjusting the trigger level it is possible to take action before the microcontroller enters a brown-out reset or to verify that the supply voltage is within a specified range. Additionally, the AVDD rail has separate rising and falling threshold settings. The voltage monitor threshold status can be read from the VMON interrupt flag bits in the EMU_IF register. This register contains separate flags for both rising and falling edges for each threshold, and can be used to interrupt the system when a threshold is crossed. 3.1 VMON Events Table 3.1. VMON Events Feature Condition AVDD DVDD BUVDD IOVDD Hysteresis (separate rise and fall triggers) Supply switch to/ from Backup - Yes - - - Fall/Rise Yes - - - Interrupt Fall or Rise Yes Yes Yes Yes Wake-Up from EM4 Hibernate Fall or Rise Yes Yes Yes Yes The enable status of each VMON channel is reflected in the EMU_STATUS register. The status of the sticky interrupt can be found at EMU_IF. These interrupt flags also serve as the wake-up source of EM4H when the associated RISEWU and FALLWU bits are set. This means that if these flags are set, EM4H entry will result in an immediate wake-up. To prevent this, these must be cleared by software before EM4H entry. silabs.com Building a more connected world. Rev. 1.09 4

Voltage Monitor 3.2 Calibration VMON channels are calibrated at two voltages: 1.86 V and 2.98 V. The calibration results (coarse thresholds and fine thresholds for 1.86 V and 2.98 V) are placed in the VMONCAL registers in the DI page. Using these thresholds it is possible to calculate thresholds for the entire supported VMON VDD range, i.e., 1.62 V to 3.4 V. Using the values given in VMONCAL registers, one can calculate T 1.86, T 2.98, V a and V b. Note: Calibration is automatically performed by the emlib functions EMU_VmonInit() and EMU_VmonHystInit(), so manual calibration is not needed if using these functions to initialize VMON channels. T 1.86 = ( 10 VMONCALX_XVDD1V86THRESCOARSE ) + VMONCALX_XVDD1V86THRESFINE T 2.98 = ( 10 VMONCALX_XVDD2V98THRESCOARSE ) + VMONCALX_XVDD2V98THRESFINE V a = 1.12 / ( T 2.98 - T 1.86) V b = 1.86 - ( V a x T 1.86) Figure 3.1. VMON Calibration Equations Now if it is required to find the coarse and fine thresholds for a certain voltage Y, following equation can be used: Thres Y = ( Y - V b) / V a Y calib = ( Thres Y x V a) + V b Figure 3.2. VMON Threshold Equations Thres Y should be rounded to the nearest integer. The least significant digit of the rounded Thres Y gives the fine threshold and remaining digits give the coarse threshold for Y. These can now be programmed in the relevant EMU_VMONXVDDCTRL register as the coarse and fine thresholds. It may not be possible to set threshold exactly for Y. In that case the closest possible voltage is used. Y calib gives the value of this closest possible voltage. Consider the example where it is required to set the AVDD rise threshold to 2.2 V (so Y=2.2 V). This means that the EMU_VMO- NAVDDCTRL_RISETHRESCOARSE and EMU_VMONAVDDCTRL_RISETHRESFINE need to be programmed. Here are the steps that should be followed: Check VMONCAL0 register. It has the VMON AVDD channel calibrated thresholds for 1.86 V and 2.98 V. Lets assume that the following values are present in the associated bitfields: AVDD1V86THRESCOARSE = 3 AVDD1V86THRESFINE = 5 AVDD2V98THRESCOARSE = 8 AVDD2V98THRESFINE = 7 Using the above numbers and the VMON calibration equations: T 1.86 = 35 T 2.98 = 87 V a = 21.53 mv V b = 1.106 mv Using the VMON threshold equations (with Y=2.2 V), Thres Y = 51 (rounded from 50.8) and Y calib = 2.204 V EMU_VMONAVDDCTRL_RISETHRESCOARSE should be programmed to 5 and EMU_VMONAVDDCTRL_RISETHRESFINE should be programmed to 1 (since Thres Y = 51). With these programmed values, VMON AVDD rise threshold is set for Y calib = 2.204 V, which is the closest programmable threshold. silabs.com Building a more connected world. Rev. 1.09 5

Example 1: VMON Demo 4. Example 1: VMON Demo This example demonstrates the usage of the Voltage Monitor in the EMU on Series 1 devices. The VMON is enabled and monitors AVDD, DVDD, and IOVDD rails and displays their status to the STK's memory LCD. The thresholds for each rail, in millivolts, are set by the #defines at the top of the example vmon_demo.c file: VMON_AVDD_RISE_THRESHOLD_mV VMON_AVDD_FALL_THRESHOLD_mV VMON_DVDD_THRESHOLD_mV VMON_IOVDD_THRESHOLD_mV Note: Only the AVDD rail has separate rising and falling thresholds. When a voltage threshold is crossed, the EMU generates an interrupt which is handled by the EMU_IRQHandler function. This sets flags to indicate whether a voltage rail is 'good' (above its threshold) or 'bad' (below its threshold). In the main while loop, this status is then printed to the LCD, and the device enters EM3 to wait for the next interrupt. To test: 1. Place the STK power switch into BAT to disconnect the debugger's power supply. 2. Attach a power supply to GND and VMCU (pins 1 and 2 on the expansion header) 3. Vary the power supply voltage above/below the defined thresholds. The device will update the status on the LCD when a voltage crosses a threshold. Note: When applying voltages independently to supply rails, please observe the operating conditions in the device's datasheet, which maintain the following requirements: VREGVDD must be the highest voltage in the system VREGVDD = AVDD DVDD AVDD IOVDD AVDD silabs.com Building a more connected world. Rev. 1.09 6

Revision History 5. Revision History Revision 1.09 November, 2017 Split appnote into Series 0 and Series 1 versions. Updated to new appnote format. Revision 1.08 May, 2014 Updated example code to CMSIS 3.20.5. Changed to Silicon Labs license on code examples. Added example projects for Simplicity IDE. Removed example makefiles for Sourcery CodeBench Lite. Updated project files with shorter filenames. Revision 1.07 October, 2013 New cover layout. Revision 1.06 May, 2013 Added software projects for ARM-GCC and Atollic TrueStudio. Revision 1.05 November, 2012 Adapted software projects to new kit-driver and bsp structure. Added software support for Tiny and Giant Gecko STKs. Revision 1.04 April, 2012 Adapted software projects to new peripheral library naming and CMSIS_V3. Revision 1.03 October, 2011 Updated IDE project paths with new kits directory. Revision 1.02 May, 2011 Updated projects to align with new bsp version. Revision 1.01 November, 2010 Changed example folder structure, removed build and src folders. Added chip-init function. Updated register defines in code to match newest efm32lib release. silabs.com Building a more connected world. Rev. 1.09 7

Revision History Revision 1.00 September, 2010 Initial revision. silabs.com Building a more connected world. Rev. 1.09 8

Simplicity Studio One-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux! IoT Portfolio www.silabs.com/iot SW/HW www.silabs.com/simplicity Quality www.silabs.com/quality Support and Community community.silabs.com Disclaimer Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Labs shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Labs. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc., Silicon Laboratories, Silicon Labs, SiLabs and the Silicon Labs logo, Bluegiga, Bluegiga Logo, Clockbuilder, CMEMS, DSPLL, EFM, EFM32, EFR, Ember, Energy Micro, Energy Micro logo and combinations thereof, "the world s most energy friendly microcontrollers", Ember, EZLink, EZRadio, EZRadioPRO, Gecko, ISOmodem, Micrium, Precision32, ProSLIC, Simplicity Studio, SiPHY, Telegesis, the Telegesis Logo, USBXpress, Zentri and others are trademarks or registered trademarks of Silicon Labs. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA http://www.silabs.com