summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-07-03 23:55:18 +0000
committerChristian Pointner <equinox@spreadspace.org>2013-07-03 23:55:18 +0000
commite16b94678da7686c05845143e60f1cef3dad832c (patch)
treedf319b5b0802f04db6cd6e86c3dc4bb77de5d3d3
parentadded command code translation (diff)
added 'mess' value to identify
git-svn-id: https://svn.spreadspace.org/pic/trunk@29 a09c6847-51d9-44de-8ef2-e725cf50f3c7
-rwxr-xr-xdownloader/downloader.py5
-rw-r--r--downloader/proto.txt13
2 files changed, 13 insertions, 5 deletions
diff --git a/downloader/downloader.py b/downloader/downloader.py
index 936f459..c918357 100755
--- a/downloader/downloader.py
+++ b/downloader/downloader.py
@@ -158,8 +158,9 @@ def exec_command(dev, cmd, answer):
### Commands
def identify(dev):
- data = exec_command(dev, 'i', 'BB10sHBB')
- id = { 'ver_maj': data[0], 'ver_min': data[1], 'name': data[2], 'devid': data[3], 'fss': data[4], 'supported': data[5] }
+ data = exec_command(dev, 'i', 'BB10sHBHH')
+ id = { 'ver_maj': data[0], 'ver_min': data[1], 'name': data[2], 'devid': data[3],
+ 'fss': data[4], 'mess': data[5], 'supported': data[6] }
if id['ver_maj'] != VERSION_MAJ:
print "incompatible protocol version, expected: %d, got: %d" % (VERSION_MAJ, id['ver_maj'])
diff --git a/downloader/proto.txt b/downloader/proto.txt
index 826be5f..5afe572 100644
--- a/downloader/proto.txt
+++ b/downloader/proto.txt
@@ -39,7 +39,7 @@ identify:
'i' | <csum> (in this case <csum> will always be 'i')
answer:
- 'i' | <ret> | version | name | devid | fss | supported | <csum>
+ 'i' | <ret> | version | name | devid | fss | mess | supported | <csum>
version:
2bytes, protocol version
@@ -61,8 +61,15 @@ identify:
The downloader can fill up holes by supplying the illegal code word 0xFFFF
for some addresses. The bootloader will skip those areas.
+ mess:
+ 2bytes, maximum eeprom segment size
+ This represents the maximum number of eeprom bytes which may be written at
+ once. Unlike <fss> value it is ok to write less than <mess> bytes. Also
+ this only applies to eeprom writes, reading the eeprom is much faster and
+ therefore not subject to this limitation.
+
supported:
- 1byte, a bitmap showing supported commands
+ 2bytes, a bitmap showing supported commands
The commands 'identify' and 'boot' are always supported by the bootloader,
others may not (i.e.: not all PICs allow to update the configurtion words)
@@ -151,7 +158,7 @@ write eeprom:
'E' | <ret> | <csum>
The bootloader writes <data> (which has to contain exactly <len> bytes) to address
- <addr> inside the eeprom. len is 2bytes long.
+ <addr> inside the eeprom. len is 2bytes long and the value must not exceed <mess> bytes.
read config: