STM32 bindings for Ada language: register descriptions, startup routines etc.
Go to file
Vovanium c4de546006 + Ignore gnatprove output 2021-07-15 19:42:09 +03:00
examples + Baud rate calculation function 2021-07-15 19:39:51 +03:00
library Initial, enough to flash a led 2019-01-16 01:46:42 +03:00
objects Initial, enough to flash a led 2019-01-16 01:46:42 +03:00
source + Baud rate calculation function 2021-07-15 19:39:51 +03:00
.gitignore + Ignore gnatprove output 2021-07-15 19:42:09 +03:00
LICENSE Initial commit 2019-01-15 21:23:45 +03:00
README.md * Changed Volatile_Full_Access attribute to pragma to mantain portability. 2021-07-15 18:26:58 +03:00
stm32_library.gpr Small reorganizing 2019-04-18 00:38:38 +03:00

README.md

stm32-ada

Ada bindings for STM32 internals

Hardware quirks and workarounds

APB

APB does not support writes of parts of 32-bit registers. The library provides acess to register fields as records. This could lead compiler to emit byte and half-word writes to APB registers causing erroneous effects. As a workaround those registers should be read to local variable, this variable altered, and then written back to hardware. GNAT users may not need the workaround, because of its pragma Volatile_Full_Access used in this library.

Compiler specific notes

There are compiler-specific pragmas so your compiler may complain about them.

GNAT

Volatile_Full_Access pragma is used on (at least writable) APB registers as byte- and half-wide writes are not supported by APB. Read STM docs on what those accesses actually do.