Question
Usage of (uint32_t) in device headers.
Posted on March 10, 2016 at 16:14
STM32 device headers use e.g.
#define FLASH_BASE ((uint32_t)0x08000000U) /*!< FLASH(up to 1 MB) base address in the alias region */ while e.g. Freescale uses in a similar situation #define ADC0_BASE (0x4003B000u) The usage of the (uint32_t) cast by ST denied to use FLASH_BASE in preprocessor expressions. Please consider dropping the sometimes harmfull (uint32_t) cast where not explicit needed!