cancel
Showing results for 
Search instead for 
Did you mean: 

I use a STM32L151 in a battery application, i have to measure VCC. To do this exactly i try to read the Vrefint-calibration Value, stored at 0x1ff80078/9 (STM32L151 Datasheet pg. 56) But if i try to access to this address via a pointer, i read 0x0.

SGass.1
Associate

Memory Dump with STM32CubeIDE shows also 0x0 at this addess. The Errata shows no entry to this problem.

uint32_t* ptr = 0x1FF80078;

VREFINT_CAL_VAL = *ptr;

Is it a typo in the dataheet?

3 REPLIES 3

> STM32L151

Which one, exactly? What's written on the chip?

JW

stm32l100xb.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF80078 
stm32l100xba.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF80078
stm32l100xc.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l151xb.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF80078 
stm32l151xba.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF80078
stm32l151xc.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l151xca.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8
stm32l151xd.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l151xdx.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8
stm32l151xe.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l152xb.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF80078 
stm32l152xba.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF80078
stm32l152xc.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l152xca.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8
stm32l152xd.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l152xdx.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8
stm32l152xe.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l162xc.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l162xca.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8
stm32l162xd.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 
stm32l162xdx.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8
stm32l162xe.h:#define VREFINT_CAL_ADDR_CMSIS                    0x1FF800F8 

SGass.1
Associate

That's it!!

I have the 151xc-type, so the VREFINT_CAL_ADR ist 0x1FF0800F8/9

I spent hours in searching all documents/net, even the application notes don't mention the define VREFINT_CAL_ADR_CMSIS . Poorly documented!

The next problem: i have two devices. The one shows 0x684 as VREFINT_CAL_value and measures 0x6F4 as the value for vrefint. The other also shows 0x684 as VREFINT_CAL_value and 0x6F0 (128 measurements).

In the datasheet is written, the chip is calibrated at VCC = 3.0 V. My VCC is 3.36V and therefore the measured vrefint_val should be less then VREFINT_CAL_VAL.

Where is the mistake?

Anyway, you helped me a lot!

Sigi