cancel
Showing results for 
Search instead for 
Did you mean: 

ROM constants pointers for ADC calibration values not defined as const pointers

I noticed that the ROM constants for ADC calibration values in the LL headers (*_ll_adc.h) are not defined as const.

e.g.

#define VREFINT_CAL_ADDR ((uint16_t*) (0x1FF07A2A))
#define TEMPSENSOR_CAL1_ADDR ((uint16_t*) (0x1FF07A2C))
#define TEMPSENSOR_CAL2_ADDR ((uint16_t*) (0x1FF07A2E))

 

And it should be:

#define VREFINT_CAL_ADDR ((const uint16_t*) (0x1FF07A2A))
#define TEMPSENSOR_CAL1_ADDR ((const uint16_t*) (0x1FF07A2C))
#define TEMPSENSOR_CAL2_ADDR ((const uint16_t*) (0x1FF07A2E))

 

Trying to write to it probably results in hardfault errors, but it should raise compile errors too in my opinion.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
0 REPLIES 0