Writing and reading flash
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-02-04 5:06 AM
Posted on February 04, 2015 at 14:06
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
Labels:
- Labels:
-
Flash
-
STM32F4 Series
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
