AnsweredAssumed Answered

STM32F072 - Hard Fault when reading from System Memory

Question asked by Salieri on Jul 20, 2015
Latest reply on Jul 20, 2015 by Salieri
Hi.

I'm looking for some help with the STM32F072.

Q: What are you trying to do?
A: I'm trying to read the factory measured voltage of the bandgap voltage reference in order to calculate the VDD as exactly as possible. As per the STM32F072xx datasheet:

The internal voltage reference provides a stable (bandgap) voltage output for the ADC. Vrefint is internally connected to the ADC_IN17 input channel. The precise voltage of Vrefint is individually measured for each part by ST during producton test and stored in the system memory area. It is accesible in read only mode.

The datasheet also provides the memory addresses for the calibration values:

Vrefint_cal: 0x1FFF F7BA - 0x1FFF F7BB

Q: So what's the problem?
A: I'm trying to read the values at these registers but I'm consistently getting the system Hard Fault error.

Q: How are you reading the data?
A: I'm not doing anything special. I'm simply trying this:

float vref = *((float *) 0x1FFFF7BA);

Is there anything that I'm missing? Any help would be greatly appreciated.

Outcomes