2021-03-24 04:36 AM
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?
2021-03-24 05:52 AM
> STM32L151
Which one, exactly? What's written on the chip?
JW
2021-03-24 06:01 AM
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
2021-03-24 07:06 AM
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