2015-02-04 05:06 AM
hi
i have anstm32f4 and i try to write and read flash value.
#include <
stm32f4xx_hal.h
>
#include <
stm32f4xx.h
>
#include <
stm32f4-hal
/stm32f4xx_hal_flash.h>
float dataflash1 = 12;
float gain;
uint32_t Address= 0x08008000;
HAL_FLASH_Unlock();
HAL_FLASH_Program(TYPEPROGRAM_WORD, Address, *(uint32_t *)&dataflash1);
//HAL_FLASH_Lock();
gain=*(float*)Address;
trace_printf(''gain: %f\n'', gain)
program run but i never see the trace of gain but i see the one after gain...
any idea?
#stm32f4 #flash