def flash_id(self):
self.flash_begin(0, 0)
self.write_reg(0x60000240, 0x0, 0xffffffff)
self.write_reg(0x60000200, 0x10000000, 0xffffffff)
flash_id = self.read_reg(0x60000240)
self.flash_finish(False)
return flash_id
Does anyone know how they figured that out?
I can see its:
- Clearing 0x60000240 (W0), where the result of SPI commands is usually stored, I guess clearing it prior to the instruction?
- Writing 0x10000000 to 0x60000200 which I think is the SPI CMD register (rather than using USER/USER1 which I'd have expected). 0x10000000 must be the instruction but I don't know how it can be just one bit.
- Reading the result from 0x60000240 (W0). As expected.
My main question is what is the 0x10000000 and how do we know we can write it to CMD? Is there any documentation of these as I can't find any!
Cheers,
Liam.