Skip to content

Instantly share code, notes, and snippets.

Avatar
🍊
Working from home

David Racl LordOfDav11

🍊
Working from home
View GitHub Profile
@LordOfDav11
LordOfDav11 / stm32_sleep.ino
Created May 16, 2020 — forked from tomtor/stm32_sleep.ino
stm32 low power sleep code
View stm32_sleep.ino
#include <libmaple/pwr.h>
#include <libmaple/scb.h>
#include <RTClock.h>
// Define the Base address of the RTC registers (battery backed up CMOS Ram), so we can use them for config of touch screen or whatever.
// See http://stm32duino.com/viewtopic.php?f=15&t=132&hilit=rtc&start=40 for a more details about the RTC NVRam
// 10x 16 bit registers are available on the STM32F103CXXX more on the higher density device.
#define BKP_REG_BASE ((uint32_t *)(0x40006C00 + 0x04))
You can’t perform that action at this time.