![]() |
GaIA BIOS Library
|
This example demonstrates how to read and write digital I/O on the GaIA board.
The application continuously writes the value of a counter every 200 ms to:
It also reads digital inputs continuously into the variable digital_input, which can be inspected in the Keil watch window or CubeIDE debugger.
At startup, the program checks whether all DIP switches are high. If they are, the board is reset and enters the bootloader mode so that new firmware can be downloaded via USB using the ST DFuSe application or STM32CubeProgrammer.
To enable this behavior, add the following code around SystemInit.
Just before SystemInit:
As the first instructions inside SystemInit: