projects
/
pyfrprog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dbfe534
)
sendByte()-sleep is only needed in bootloader-mode
author
theStack
<sebastian.falbesoner@gmail.com>
Tue, 15 Dec 2009 01:59:35 +0000
(
02:59
+0100)
committer
theStack
<sebastian.falbesoner@gmail.com>
Tue, 15 Dec 2009 01:59:35 +0000
(
02:59
+0100)
frprog.py
patch
|
blob
|
history
diff --git
a/frprog.py
b/frprog.py
index 6c394183aecaf4680ff1f0b6d235ef62552ac31f..4959ea201a145074df46bf20f67b0c6de35d3e62 100755
(executable)
--- a/
frprog.py
+++ b/
frprog.py
@@
-13,9
+13,12
@@
KERNEL_BAUDRATE=115200
# contains the last received checksum from a READ, WRITE or CHECKSUM command
last_checksum = 0
# contains the last received checksum from a READ, WRITE or CHECKSUM command
last_checksum = 0
+# is set to True if we are already communicating with the pkernel
+pkernelmode = False
def sendByte(byte):
def sendByte(byte):
- time.sleep(0.001) # just to get sure, wait 1ms
+ if pkernelmode == False:
+ time.sleep(0.001) # just to get sure, wait 1ms
tty.write(chr(byte))
def sendWord(word):
tty.write(chr(byte))
def sendWord(word):
@@
-234,6
+237,7
@@
print
cmdCALL(0x30000)
time.sleep(0.5) # just to get sure that the pkernel is really running!
del tty
cmdCALL(0x30000)
time.sleep(0.5) # just to get sure that the pkernel is really running!
del tty
+pkernelmode = True
tty = SerialPort(DEVICE, None, KERNEL_BAUDRATE)
print "Performing ChipErase..."
tty = SerialPort(DEVICE, None, KERNEL_BAUDRATE)
print "Performing ChipErase..."