2020-05-17 03:49 AM
tst= 0x121212121212
HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD,0x8000000,tst);
the address i took from the manual as well.
i cant understand whats going on, please help me.
thanks a lot
2020-05-17 07:29 AM
No, you did not.
What are the results of steps 4,5,6?
2020-05-17 07:38 AM
Probably going to want to look at reported error codes, and work on better diagnostic/telemetry output.
2020-05-17 08:04 AM
The thing is that i can write only to OTP address which i can not change after that
2020-05-17 08:04 AM
The thing is that i can write only to OTP address which i can not change after that
2020-05-17 08:35 AM
Fine, it works properly then.
2020-05-17 07:37 PM
OTP stands for one-time programmable. You can only program them once.
2020-05-17 11:25 PM
yes, the thing is i cant write it after that, i can write once and then read as many as i want. but i cant write in place that has been written before
2020-05-18 03:25 AM
my problem is that i can write only, i can not erase the data i wrote. i trying to delete it but i cant..
for (int i = 0; i < 10; i++){
EraseInitStruct.TypeErase=FLASH_TYPEERASE_PAGES;
EraseInitStruct.Banks=(uint32_t)0x01;
EraseInitStruct.Page=60+i;
EraseInitStruct.NbPages=2;
HAL_FLASHEx_Erase(&EraseInitStruct, &pageError);
}
2020-05-20 09:22 AM
Are you using your own board, or one of ST's reference boards?
I had a similar problem trying to consistently write to EEPROM and the problem turned out to be a noisy power rail. I needed to add a filter cap, and also a decoupling cap, to my board in order to get stable enough power for the writes to succeed. There is likely a similar requirement when erasing or writing to flash.
I hope that helps....