HELLO I USE STM32F100RB
I WANT write and read from flash mem : /********************FLASH MEMORY******************************/ //WRITE DATA TO FLASH MEMORY /* Unlock the Flash to enable the flash control register access *************/ HAL_FLASH_Unlock(); /* Unlock the Options Bytes *************************************************/ HAL_FLASH_OB_Unlock();
FLASH_PageErase(0);//uint32_t PageAddress HAL_FLASHEx_OBErase(); test3=FLASH_OB_ProgramData(0x080000FFU,0x12);
//HAL_FLASH_OB_Launch();//reserts the system
HAL_FLASH_OB_Lock(); HAL_FLASH_Lock(); //READ THE DATA FROM FLASH MEMORY flash_data=HAL_FLASHEx_OBGetUserData(0x080000FFU);
/********************FLASH MEMORY******************************/
but the software doesnt compile
SDT_LCD_KEYPAD\SDT_LCD_KEYPAD.axf: Error: L6218E: Undefined symbol FLASH_OB_ProgramData (referred from main.o). ?????
is there someone leaved this situation can u help me find solution pl zdid i forget something
(hope it is not dnagerous, generaly i dint like changing any driver file , but i didnt have choice ) :
That change actually is dangerous, at your apparaent level of understanding. That function was explicitly not supposed to be called from outside the driver module. You changed that without understanding the consequences, and your excuse for doing so is rather unconvincing.
The choice you had, but didn't see, must have been to use some other function that the module's designer provided for doing what you think you need this function for.
thanks much i think no need to touch the options byte at all!!
... just i wannt to know can i use all the pages for exemple page 0 to page 31 ,, is there a specification for saving an appication data ,,, im using stm 32f100rb
where is the prgm position in the flash ,,, i get a lot to pdf docs it desnt tell exactly where i can use or not .,, can you advice im new in the stm ,
just need to write one byte and then read it :)
thanks
what about this program ;why it doesnt give me any result doesnt do any thing and my program bloks looks like not going on while 1 loop ???plz advice stm32f100rb
// /********************FLASH MEMORY******************************/ //WRITE DATA TO FLASH MEMORY ///* Unlock the Flash to enable the flash control register access *************/ HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); FLASH_PageErase(0);//uint32_t PageAddress erasing page 0 :0x0800 0000 - 0x0800 03FF FLASH_Program_HalfWord(0x080000FFU, 0x0012); HAL_FLASH_OB_Lock(); HAL_FLASH_Lock(); // READ THE DATA FROM FLASH MEMORY flash32_data=HAL_FLASHEx_OBGetUserData(0x080000FFU); // flash_data=0x0001411; //key=(flash_data & 0x0000FF00 )>> 8;//high byte key=flash32_data & 0x000000FF;//low byte lcd_clear(); //write key to lcd// lcd_write_char(key+48,1,1,8); HAL_FLASH_OB_Launch(); /********************FLASH MEMORY******************************/
.