okay, big fat note: clear the fucking watchdog timer...... DAMN ;)
authorBernhard Urban <lewurm@gmx.net>
Sun, 13 Dec 2009 04:58:33 +0000 (05:58 +0100)
committerBernhard Urban <lewurm@gmx.net>
Sun, 13 Dec 2009 04:58:33 +0000 (05:58 +0100)
frprog.py

index 1f0a1fbb07a9ea2949c2afdcaa3dd4b876f163d0..b90465f8dcb2e15f5275e60e52aa221a9decc782 100755 (executable)
--- a/frprog.py
+++ b/frprog.py
@@ -129,10 +129,10 @@ while 1:
                pass
 
 print "OK, trying to set baudrate..."
-
 # set baudrate
 cmdBAUDRATE(REAL_BAUDRATE)
 tty = SerialPort(DEVICE, 100, REAL_BAUDRATE)
+
 """
 print
 sendByte(0x01)
@@ -219,22 +219,24 @@ print
 """
 
 
-"""
-S006000066756AB4
-S20E0F40009B000D4ECFF11601E0FFF6
-S214148000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF67
-S804000000FB
-
-NOP = 0x9fa0
-"""
 # write some data in the iram and try to execute it
-# ATTENTION: before running this, run a program on the board (e.g. flashdemo).
-# the bytecode will be executed after copied into iram, however it won't stop
-# and executes the stuff after it in the iram. after a powerreset this can be
-# randomcrap and this could be very dangerous! so pay attention please
-data_wr =[0x9B,0x00,0x0D,0x4e,0xcf,0xf1,0x16,0x01,0xe0,0xff,0xf6,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0xe0,
-               0xcb,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,
-               0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,0x9f,0xa0]
+data_wr =[
+               0x9B,0x00,
+               0x0D,0x4e,
+               0xcf,0xf1,
+               0x16,0x01,
+               0x9b,0x05,
+               0x04,0xc7,
+               0xc1,0x06,
+               0x16,0x56,
+               0xe0,0xfb, #branch
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0, #nop
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0,
+               0x9f,0xa0,0x9f,0xa0,0x9f,0xa0]
 print "Writing", data_wr, "to the IRAM..."
 cmdWRITE(0x00030000, len(data_wr), data_wr)
 print "Received Checksum:", last_checksum