33 #include "STM32LowPower.h"
34 #include <IWatchdog.h>
42 #ifdef _USE_FREERTOS_LOW_POWER
46 extern "C" void xTaskSleepPrivate(TickType_t *xExpectedIdleTime) {
47 #if (LOWPOWER_MODE==SLEEP_IDLE)
48 LowPower.idle(*xExpectedIdleTime);
49 #elif (LOWPOWER_MODE==SLEEP_LOWPOWER)
50 LowPower.sleep(*xExpectedIdleTime - 10);
51 #elif (LOWPOWER_MODE==SLEEP_STOP2)
52 LowPower.deepSleep(*xExpectedIdleTime - 10);
54 *xExpectedIdleTime = 0;
60 extern "C" void xTaskWakeUpPrivate(TickType_t *xExpectedIdleTime) {
72 #if ( configUSE_TICKLESS_IDLE == 2 )
73 extern "C" void osSystickHandler()
87 static void delayMS(uint32_t millis) {
88 uint32_t iterations = millis * (F_CPU/7000);
90 for(i = 0; i < iterations; ++i) {
97 static void faultStimaV4(
int n) {
100 pinMode(HFLT_PIN, OUTPUT);
107 for (i = 0; i < n; i++) {
108 digitalWrite(HFLT_PIN, 1);
110 digitalWrite(HFLT_PIN, 0);
122 #if ( configCHECK_FOR_STACK_OVERFLOW >= 1 )
130 extern "C" void vApplicationStackOverflowHook(TaskHandle_t pxTask,
char *pcTaskName) {
132 Serial.print(
"Error stack overflow form task: ");
133 Serial.print(pcTaskName);
147 #if(ERROR_HANDLER_CB)
148 extern "C" void _Error_Handler(
const char *msg,
int val)
152 Serial.print(
"Error handler: ");
void UsageFault_Handler()
void MemManage_fault_isr()
Interface STM32 hardware_hal STIMAV4 Header config.