Loading color scheme

How to Reset STM32 MCU Programatically?

stm32 nucleo

While the STM32 controller is reset at the power cycle, sometimes it is needed to reset the controller programmatically. This is needed in the process of severe system failure, misconfiguration of internal hardware, or during the firmware update process. So, how can we reset the STM32 Microcontroller programmatically?

The answer to the question on How to Reset the STM32 Microcontroller is the following. The correct function for this is NVIC_SystemReset(). Call this function from any place of code and it will never return, but reset the controller. The alternate function is HAL_NVIC_SystemReset(), just an alias for the above.

Read more
[Code Sample] Retrieve C++ Application Version from VS_VERSION Resource

Version Resource

Sometimes you may need to retrieve the application version from its own resources. While sounding trivial, this task is not so easy to solve. While you can easily access string resources or dialog resources using the dedicated WinAPI functions, the version resource retrieval is not so easy. That's because the corresponding function VerQueryValue is intended for retrieving versions from another loaded module, not from own executable. So, how would you retrieve the application version from your own executable then?

Read more
Get all interesting articles to your inbox
Please wait