chibios

Disabling the STM32 IWDG during debugging

拥有回忆 提交于 2020-11-30 12:55:53
问题 I have a ChibiOS 3.x program on a STM32F4 microcontroller where I use the IWDG watchdog to reset the MCU on errors like this: int main() { iwdgInit(); iwdgStart(&IWDGD, &wd_cfg); while(true) { // ... do stuff } } If I now attach my debugger and, at any point, stop the program (manually or via a breakpoint), the microcontroller will reset after the timeout defined by the watchdog configuration (and therefore cause issues in my debugging process) How can I disable this behaviour, i.e. how can I

Disabling the STM32 IWDG during debugging

白昼怎懂夜的黑 提交于 2020-11-30 12:54:26
问题 I have a ChibiOS 3.x program on a STM32F4 microcontroller where I use the IWDG watchdog to reset the MCU on errors like this: int main() { iwdgInit(); iwdgStart(&IWDGD, &wd_cfg); while(true) { // ... do stuff } } If I now attach my debugger and, at any point, stop the program (manually or via a breakpoint), the microcontroller will reset after the timeout defined by the watchdog configuration (and therefore cause issues in my debugging process) How can I disable this behaviour, i.e. how can I

Disabling the STM32 IWDG during debugging

不想你离开。 提交于 2020-11-30 12:52:26
问题 I have a ChibiOS 3.x program on a STM32F4 microcontroller where I use the IWDG watchdog to reset the MCU on errors like this: int main() { iwdgInit(); iwdgStart(&IWDGD, &wd_cfg); while(true) { // ... do stuff } } If I now attach my debugger and, at any point, stop the program (manually or via a breakpoint), the microcontroller will reset after the timeout defined by the watchdog configuration (and therefore cause issues in my debugging process) How can I disable this behaviour, i.e. how can I

malloc() always returns NULL in ChibiOS

ε祈祈猫儿з 提交于 2019-12-25 06:47:01
问题 I have a ChibiOS application where I'm using dynamic memory allocation via malloc() . However, I observed that 100% of the time I call malloc() , it returns NULL . I have confirmed that: The microcontroller memory is not full The error also occurs for size-1 malloc calls, so the memory chunk size is not the cause of the issues. errno is always ENOMEM after the malloc() call How can I resolve this issue? 回答1: When you look at the definition of _sbrk in os/various/syscalls.c , you can clearly