Add notes about STC12A and STC89 protocols

Nothing is implemented yet, but this should help with the
implementation when I finally get the chips from China.
This commit is contained in:
Grigori Goronzy 2014-01-12 01:39:14 +01:00
parent 386f833da1
commit cf0d93b179
2 changed files with 58 additions and 0 deletions

24
doc/stc12a-protocol.txt Normal file
View File

@ -0,0 +1,24 @@
STC12A
This is an early STC12 protocol variant; It seems to be used on STC12Cx052 and
possibly other models. It is a mix of STC89 and STC12 protocol versions.
Differences to STC12:
* Uses NONE parity instead of EVEN parity.
* Checksum calculations are different: only a single-byte modular sum is used.
* Baudrate handshake isn't initiated with a type 0x50 packet; this is simply
skipped.
* After the handshake a special ping-pong sequence of 0x80 type packets needs
to be sent.
This doesn't appear to serve any purpose - possibly this is just done to
verify that the connection works reliably. STC12 doesn't require it anymore
because parity and the improved checksum ensure correct operation.
* Erase is acknowledged with type 0x80 packet instead of type 0x00
* After flash programming, there is no finish packet, type 0x69, sent; this
is simply skipped.

34
doc/stc89-protocol.txt Normal file
View File

@ -0,0 +1,34 @@
STC89
This is the first generation protocol of STC MCUs.
Differences to STC12:
* Uses NONE parity instead of EVEN parity.
* Checksum calculations are different: only a single-byte modular sum is used.
* Baudrate handshake isn't initiated with a type 0x50 packet; this is simply
skipped.
* After the handshake a special ping-pong sequence of 0x80 type packets needs
to be sent.
This doesn't appear to serve any purpose - possibly this is just done to
verify that the connection works reliably. STC12 doesn't require it anymore
because parity and the improved checksum ensure correct operation.
* Erase is acknowledged with type 0x80 packet instead of type 0x00
* After flash programming, there is no finish packet, type 0x69, sent; this
is simply skipped.
* Baudrate handshake
- Uses normal speed (/32) UART timing instead of double speed (/16)
- IAP delay has some differences (see datasheet)
* Erase procedure
- A different magic sequence is used
(6 bytes with value 0x33)
- No size/range is supplied
- response code has type 0x80