Difference between revisions of "84PCE:OS:Serial Flash Commands"
m (rev M clarificaiton) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Category:84PCE:General_Hardware_Information|Serial Flash Commands]] | [[Category:84PCE:General_Hardware_Information|Serial Flash Commands]] | ||
− | + | CE calculators in hardware revision M and later (which corresponds to the Python Edition for the 83PCE) contain a new serial flash chip with an entirely new interface. For pre-Python calculators see the old [[83Plus:OS:Raw_Flash_Commands|parallel interface]]. | |
For reference, pages are 256 bytes, sectors are 4KB, and blocks are 64KB. | For reference, pages are 256 bytes, sectors are 4KB, and blocks are 64KB. | ||
Line 29: | Line 29: | ||
Afterwards, write each byte to $E00900, followed by a normal wait. | Afterwards, write each byte to $E00900, followed by a normal wait. | ||
+ | |||
+ | === Read Status Register === | ||
+ | <pre> | ||
+ | 00000000 00000001 01000000 000000XX | ||
+ | </pre> | ||
+ | |||
+ | X is $05 for register 1, $35 for register 2, or $15 for register 3. | ||
+ | |||
+ | Afterwards, wait for $E00818 bit 1 to be set and read register value from $E00900. | ||
+ | |||
+ | === Read Unique ID === | ||
+ | <pre> | ||
+ | 00000000 00000401 08000000 0000004B | ||
+ | </pre> | ||
+ | |||
+ | Afterwards, wait for $E00818 bit 1 to be set and read id from $E00900 8 times. | ||
+ | |||
+ | === Read Device ID === | ||
+ | <pre> | ||
+ | 00000000 03000411 02000000 8000B094 | ||
+ | </pre> | ||
+ | |||
+ | Afterwards, wait for $E00818 bit 1 to be set and read id from $E00900 2 times, which should read $EF $15. |
Latest revision as of 12:19, 13 December 2019
CE calculators in hardware revision M and later (which corresponds to the Python Edition for the 83PCE) contain a new serial flash chip with an entirely new interface. For pre-Python calculators see the old parallel interface.
For reference, pages are 256 bytes, sectors are 4KB, and blocks are 64KB.
Datasheet for the W25Q32JV is here.
Contents
Basic Flash Commands
You write a command to the range $E00800-$E0080F and then wait until $E00824 bit 0 is set at which point you acknowledge by setting the same bit.
Erasing
00000000 00000001 00000000 02000006 XXXXXXXX 03000001 00000000 020000D8 00000000 00000001 00000000 04000005
X is the address of the block to erase.
Writing
Writes can only happen within a single page at a time.
00000000 00000001 00000000 02000006 XXXXXXXX 03000001 YYYYYYYY 42000032
X is the address to write to.
Y is the number of bytes to write, at most the number of bytes remaining in the page.
Afterwards, write each byte to $E00900, followed by a normal wait.
Read Status Register
00000000 00000001 01000000 000000XX
X is $05 for register 1, $35 for register 2, or $15 for register 3.
Afterwards, wait for $E00818 bit 1 to be set and read register value from $E00900.
Read Unique ID
00000000 00000401 08000000 0000004B
Afterwards, wait for $E00818 bit 1 to be set and read id from $E00900 8 times.
Read Device ID
00000000 03000411 02000000 8000B094
Afterwards, wait for $E00818 bit 1 to be set and read id from $E00900 2 times, which should read $EF $15.