Skip to main content
marccollin7379
Associate II
February 4, 2015
Question

Writing and reading flash

  • February 4, 2015
  • 0 replies
  • 387 views
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
This topic has been closed for replies.