From: Bernhard Urban Date: Sun, 13 Dec 2009 04:58:33 +0000 (+0100) Subject: okay, big fat note: clear the fucking watchdog timer...... DAMN ;) X-Git-Tag: v0.1~52 X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=pyfrprog.git;a=commitdiff_plain;h=ead5166c90ac088cbd05156bc7219174391e418a okay, big fat note: clear the fucking watchdog timer...... DAMN ;) --- diff --git a/frprog.py b/frprog.py index 1f0a1fb..b90465f 100755 --- 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