diff options
author | AJM <poslathian@poslathian.(none)> | 2010-05-21 20:02:22 -0400 |
---|---|---|
committer | AJM <poslathian@poslathian.(none)> | 2010-05-21 20:02:22 -0400 |
commit | 4197727c10c0a6bb01034458754376104c9ec7e8 (patch) | |
tree | f6899b2c53e32daeaed630aff81dc035116e512e | |
parent | d44f856baffd72742d2287f75df5c2c5dff07a73 (diff) | |
download | librambutan-4197727c10c0a6bb01034458754376104c9ec7e8.tar.gz librambutan-4197727c10c0a6bb01034458754376104c9ec7e8.zip |
minor mods to adjust the driver number and the vendor product id's (serial port now 1eaf:0004) and fixed a bug in reset.py,
added a no-delay usb serial loop to main.cpp as an example. has no problem at 115200 in minicom!
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | libmaple/usb/usb_config.h | 4 | ||||
-rw-r--r-- | notes/45-maple.rules | 1 | ||||
-rwxr-xr-x | reset.py | 23 |
4 files changed, 18 insertions, 12 deletions
@@ -205,7 +205,7 @@ program_ram: ram program_flash: flash ./reset.py ./wait.py - $(DFU) -a1 -d 0110:1001 -D build/main.bin -R + $(DFU) -a1 -d $(VENDOR_ID):$(PRODUCT_ID) -D build/main.bin -R program_jtag: jtag openocd -f stm32conf/flash.cfg diff --git a/libmaple/usb/usb_config.h b/libmaple/usb/usb_config.h index 5cdbcd7..db549e5 100644 --- a/libmaple/usb/usb_config.h +++ b/libmaple/usb/usb_config.h @@ -5,8 +5,8 @@ #include "usb_lib.h" -#define VCOM_ID_VENDOR 0x0110 -#define VCOM_ID_PRODUCT 0x1003 +#define VCOM_ID_VENDOR 0x1EAF +#define VCOM_ID_PRODUCT 0x1004 #define USB_CONFIG_MAX_POWER (100 >> 1) diff --git a/notes/45-maple.rules b/notes/45-maple.rules index e3032b9..c2e6c56 100644 --- a/notes/45-maple.rules +++ b/notes/45-maple.rules @@ -3,5 +3,6 @@ BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="maple_rules_end" SYSFS{idProduct}=="1001", SYSFS{idVendor}=="0110", MODE="664", GROUP="plugdev" SYSFS{idProduct}=="1002", SYSFS{idVendor}=="0110", MODE="664", GROUP="plugdev" SYSFS{idProduct}=="0003", SYSFS{idVendor}=="1EAF", MODE="664", GROUP="plugdev" +SYSFS{idProduct}=="0004", SYSFS{idVendor}=="1EAF", MODE="664", GROUP="plugdev" LABEL="maple_rules_end" @@ -3,16 +3,21 @@ import serial import time -ser = serial.Serial('/dev/ttyACM0', baudrate=115200) -ser.open() -# pull dtr and rts low -ser.setRTS(0) -ser.setDTR(0) +try: + ser = serial.Serial('/dev/ttyACM0', baudrate=115200) + ser.open() -# toggle DTR -ser.setDTR(1) + # pull dtr and rts low + ser.setRTS(0) + ser.setDTR(0) -# close -ser.close() + # toggle DTR + ser.setDTR(1) + + # close + ser.close() + +except: + print "Failed to open the serial port for reset, perhaps this is your first upload or the board was already in bootloader mode" |