Write, Read code for STM32L412 elusive
What code works for the STM32L412 device?
I want to load an RTC calibration value into flash memory and retrieve it on subsequent running of the firmware.
I've got the reading of specific calibration values working in a different IC, for ADC calibration,
ICTempCal1 = (*((volatile uint16_t*)(0x1FF8007A)));
Will this work with the L412 IC?
But I cannot get programming of a page to work.
I tried 'HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 0x080E0000,1000);'
But that fails within the routine. I'm assuming the Erase routine worked, but I haven't got far enough to check.
I tried the 'STM32CubeL4/Projects/NUCLEO-L4P5ZG/Examples/FLASH
/FLASH_FastProgram' code and found it to fail in the last section, the GetBank routine.
Different IC also.
Can anyone give me the code for these operations?
