Closed dzid26 closed 1 week ago
Overriding this register also doesn't seem to be possible:
>fill io_chip 0x0005f 0x0005f 0x3
or
> fill io_chip 0x0005f 0x0005f 0x4c
results in 0x08:
> dump 0x0505f
0x0505f 08 e1 31 00 ab 00 23 b1 ..1...#
Simulatin EOP bit is now fixed.
Command:
ucsim_stm8 -t stm8s105 bin/main
I have this program https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/blob/ad782fd3b5691bbf9400e01387ef65ae0ceded79/src/eeprom.c#L115
It gets stuck in the while loop expecting for the FLASH_FLAG_EOP bit to be raised.
Looking at the dump of the FLASH->IAPSR register, which is 48 and so indeed the FLASH_FLAG_EOP bit is not set.
Again,
FLASH_FLAG_EOP
is third bit:And the eeprom is never written:
If I comment out the offending line the program goes further and eeprom is actually written:
Reference: