This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

R AND D

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

Parents
  • 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

Reply
  • 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

Children
  • 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******************************/
    

    .