pass
print "OK, trying to set baudrate..."
-
# set baudrate
cmdBAUDRATE(REAL_BAUDRATE)
tty = SerialPort(DEVICE, 100, REAL_BAUDRATE)
+
"""
print
sendByte(0x01)
"""
-"""
-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