2018-05-23 01:05 AM
Hello evry body , i can write a byte on flash of stm32f429ZI WÄ°TH success . for info i use nucleo 144 and sector 23 the last sector .
for example :
with these adresses
uint32_t locip1_adress=0x081E0001;//LAST sector for STM32429ZI sector 23
uint32_t locip2_adress=0x081E0002;//LAST sector for STM32429ZI sector 23uint32_t locip3_adress=0x081E0003;//LAST sector for STM32429ZI sector 23uint32_t locip4_adress=0x081E0004;//LAST sector for STM32429ZI sector 23uint32_t remip1_adress=0x081E0005;//LAST sector for STM32429ZI sector 23
uint32_t remip2_adress=0x081E0006;//LAST sector for STM32429ZI sector 23uint32_t remip3_adress=0x081E0007;//LAST sector for STM32429ZI sector 23uint32_t remip4_adress=0x081E0008;//LAST sector for STM32429ZI sector 23uint32_t ROV_min_adress=0x081E0009;//LAST sector for STM32429ZI sector 23 this data needs two bytes
uint32_t ROV_max_adress=0x081E00B;//LAST sector for STM32429ZI sector 23 this data needs two bytes/* Unlock the Flash to enable the flash control register access *************/
HAL_FLASH_Unlock(); /* Fill EraseInit structure*/ EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS; EraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_3; EraseInitStruct.Sector = FLASH_SECTOR_23; EraseInitStruct.NbSectors = 1; //you need to erase entire sector before write anything HAL_FLASHEx_Erase(&EraseInitStruct, &SECTORError);//we need to erase the sector before writeHAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, locip1_adress,locip1);//write one byte
HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, locip2_adress,locip2);//write one byte HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, locip3_adress,locip3);//write one byte HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, locip4_adress,locip4);//write one byte HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, remip1_adress,remip1);//write one byte// we need to write also all other parameter because we delete all sector 23 HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, remip2_adress,remip2);//write one byte HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, remip3_adress,remip3);//write one byte HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, remip4_adress,remip4);//write one byte HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD,ROV_min_adress,Rover_ID_min[0]);//write one 16 bit HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD,ROV_max_adress,Rover_ID_max[0]);//write one 16 bit HAL_FLASH_Lock();But in THE HALFWORD writing i have prblm with 16 bit writing looks these adresses are not accepted
uint32_t ROV_min_adress=0x081E0009; ----> in my idea for one word ill use 0x081E0009+ 0x081E000A Two bytes --->is it right
uint32_t ROV_max_adress=0x081E00B;-----> WÄ°LL use 0x081E000B+0x081E000C two bytesbut the data at the reading of ROV_max_adress are wrong strangely ??
how should i select the adresses separation between them for writing half word can someone give me an example . thanks
could not find detail about mem data adresses in detail .
Solved! Go to Solution.
2018-05-24 07:51 AM
TARHAN SAMAH wrote:
much much cleaaaaaaaaaaaaaar thanks much
2018-05-24 09:17 AM
Thank you madame nesrine )))
2019-03-29 03:28 AM
Anyone done with STM32F429ZI LwIP_TFTP_Server application ?
Using Ethernet i want to transfer file on host server to target board memory or USB.
I'm using Linux with eclipse IDE, USB with OTG.
How to done this ?
Thanks in advance
2019-03-29 03:29 AM
Anyone done with STM32F429ZI LwIP_TFTP_Server application ?
Using Ethernet i want to transfer file on host server to target board memory or USB.
I'm using Linux with eclipse IDE, USB with OTG.
How to done this ?