Difference between revisions of "84PCE:OS:Serial Flash Commands"

From WikiTI
Jump to: navigation, search
(Created page with "Serial Flash Commands The Python Edition calculator contains a new serial flash chip with an entirely new interface. For pre-Py...")
 
Line 9: Line 9:
 
=== Erasing ===
 
=== Erasing ===
 
<pre>
 
<pre>
00000000 00000001 00000000 02000006 |
+
00000000 00000001 00000000 02000006
XXXXXXXX 03000001 00000000 020000D8 | X is the address of the block to erase.
+
XXXXXXXX 03000001 00000000 020000D8
00000000 00000001 00000000 04000005 |
+
00000000 00000001 00000000 04000005
 
</pre>
 
</pre>
 +
X is the address of the block to erase.
  
 
=== Writing ===
 
=== Writing ===
Line 18: Line 19:
  
 
<pre>
 
<pre>
00000000 00000001 00000000 02000006 |
+
00000000 00000001 00000000 02000006
XXXXXXXX 03000001 YYYYYYYY 42000032 | X is the address to write to, Y is the number of bytes to write (maximum 256)
+
XXXXXXXX 03000001 YYYYYYYY 42000032
Write each byte to $E00900, followed by a normal wait.
+
 
</pre>
 
</pre>
 +
X is the address to write to, Y is the number of bytes to write (maximum 256).
 +
Afterwards, write each byte to $E00900, followed by a normal wait.

Revision as of 23:50, 29 June 2019

The Python Edition calculator contains 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.

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 (maximum 256). Afterwards, write each byte to $E00900, followed by a normal wait.