I have a s6e1c32b0agp20000, and I am trying to program the flash over sw-dp interface. The sw-dp is fully functional, and I have complete access to the micro's memory map. I proved this by accessing the GPIO registers over sw-dp to enable an LED, as well as reading unique ID registers, and I've halted the CPU.
I am trying to follow the algorithm in document 002-05028 Rev C to program a single flash byte. I have already performed the erase command, and verified that the flash memory reverted to all 0xffffffff. However, when I follow the write command sequence in table 1-2, the data never changes.
The exact sequence I am using is: writeByte(0xaa8,0xaa), writeByte(0x554,0x55), writeByte(0xaa8,0xa0), writeByte(0x000,0x12)
So at that point I would expect the byte at address 0 to become 0x12, but it stays at 0xff.
Other things I've checked: I checked the Flash Security Code registers, which can lock you out, but it reads all F's as well. I believe that since this is not the exact value 0x00100000, it should be unlocked.
Also, I have verified that writeByte is truly performing an 8-bit access as opposed to a 32-bit access.
Also, I've checked the flash status register immediately after writing the 4th command sequence byte, and it remains at a value of 0x01 (Ready flag asserted). So no obvious issues there.
Does anyone know if there's an additional step I should perform, or any reason why all commands work except writing to flash?