cancel
Showing results for 
Search instead for 
Did you mean: 

Writing and reading flash

marccollin7379
Associate II
Posted on February 04, 2015 at 14:06

hi

i have an

stm32f4 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
0 REPLIES 0