2017-08-20 09:48 PM
Hi.
I would like to use FLASH Data(Write, Read, Erase) in Flash memory of STM32F301C8T6. I follow to an example
STM32Cube\Repository\STM32Cube_FW_F3_V1.9.0\Projects\STM32303C_EVAL\Examples\FLASH\FLASH_EraseProgram\MDK-ARM
So It's not working. Please show me how I can do it.
Thank you.
Best regard.
#stm32 #flash #stm32f3 #flash-writing2017-08-21 06:00 PM
FLASH_EraseInitTypeDef erase_pages;
erase_pages.TypeErase= FLASH_TYPEERASE_PAGES;erase_pages.NbPages=4;erase_pages.PageAddress = 0x08008000;uint32_t Error;uint32_t pageAddress = 0x08008000;uint16_t buffer1 = 0xAAAA;uint16_t buffer2 = 12423; /* USER CODE END 2 */HAL_FLASH_Unlock();HAL_FLASHEx_Erase(&erase_pages,&Error);HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, pageAddress, buffer2);HAL_FLASH_Lock();X = *(uint16_t *)pageAddress;I tried so I have a solution. It's s
uccess.