Is there a way to generate falling and rising events on the reset pin of STM32L0xx? The idea is to do a regular hw reset it when quick pressed when pressed and hold to load the factory settings. Thank you!
STM32 reset events handling
285 Views Asked by Daniel Nik At
2
There are 2 best solutions below
Related Questions in STM32
- Build issue in my STM32-NUCLEO project using the Eclipse IDE
- STM32 ADC DMA low raw/Voltage readings
- Program doesn't run after DFU
- STM32G030 refuses write to flash
- STM32 - Serial Audio Interface (SAI) - dual data line transmit possible?
- CLion: Debug via St-Link
- STM32 RTC3 Mixed Mode: Writing TR resets SSR
- Ran on an MCU (STM32F1), doubly-linked list code results in a call of HardFault() due to stack overflow
- i want to display voltage of ADC with " ssd1306 OLED " in STM32 when i change the voltage with potentiometer
- spi5 of my STM32MP157F-K2 CAN'T read data from the RC522 CARD
- STM32 unable to be read
- Enabling one timer using another
- Confusion with thumb instructions while compiling recipe for cortexm4 CPU
- How to setup Interface Encoder mode for the STM32F0
- UART Driver for STM32MP25 by EDK2
Related Questions in CORTEX-M
- Why veneer code generated by gcc for cortex-m0 seems 8-byte aligned?
- STM32G030 refuses write to flash
- Unable to read value from gpio set as input
- Microcontroller hangs with LWIP UDP
- Can't connect ST-Link with APM32F003 through OpenOCD
- programming and debugging of different sam types
- VTOR not found in STM32F030
- Unit tests on registers with bare metal programming
- Force .bss section to be in last program header
- J-Link script to flash program in S32K144 (allow security)
- Cortex-M external interrupt occurs when executing fault handler with higher priority
- Why gcc is not using S16-S31 registers of Cortex M7?
- Issue with measuring ARM MCU interrupt latency
- What is the most efficient way to write two (for example) bits of a register using cortex-m0 instruction set?
- How to do unaligned int store on ARM Cortex M4?
Related Questions in STM32LDISCOVERY
- Custom Join request on LoRaWAN End Node STM32L0
- How to implement Brown-Out Reset, in STM32L496 MicroControler With STM32 Cube IDE Tool
- implementing BLE communication using B-L475E-IOT01A
- How to use I/O pins on the STM32L496G-Disco board using Zephyr
- STM32 reset events handling
- Can't get the analogue watchdog to trigger an interrupt on the DFSDM peripheral of a STM32L475
- What exactly we want to achieve in delay function?
- Using Rust crates for an STM32 microcontroller board
- how to add stm32l4s5 to IAR Embedded Work Bench?
- LIS2DW12 accelerometer tilt angle detection using STM32L496AG
- Inexplicable "error: expected ')' before '*' token" error in Device header file when trying to compile STM32duino project using LoRaFi library
- flash a ST board with STLINK and Linux
- Advantage of the interrupt when there is a busy waiting?
- How can i start the GDB server in stm32cubeide?
- How to display a variable (here the temperature) in the console of STM32CubeIDE?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The falling edge "event" is that your software stops running and all the volatile registers (apart from in the backup domain) return to their default value. DRAM may also be corrupted but SRAM should retain its contents as long as power is not interrupted.
The rising edge "event" is that your software starts running again from the reset handler function in the interrupt vector.
If you want to time how long the reset was, then you need a clock that carries on counting through the reset. The RTC meets this requirement.
You can read the value of the RTC at startup, and compare it to the value it had before reset.
The hard part is how to know after reset what the value of the RTC was before reset, when the reset clears or corrupts various memory and comes when you aren't expecting it.
One approach would be that while your application is running, you copy the RTC clock value to the RTC backup registers on a regular basis, for example from the SysTick interrupt. The backup registers behave just like normal RAM except that they retain their value when the main regulator is turned off. This means the value in them after reset will be the RTC value of the last time the systick interrupt ran before the reset.