diff --git a/module/V2-Application/qt.pri b/module/V2-Application/qt.pri index 91a77a5..2ca3335 100644 --- a/module/V2-Application/qt.pri +++ b/module/V2-Application/qt.pri @@ -1,8 +1,8 @@ !isEmpty(QT_PRI_INCLUDED):error("qt.pri already included") QT_PRI_INCLUDED = 1 -OPENMVSWD_VERSION = 1.3.0 -OPENMVSWD_COMPAT_VERSION = 1.3.0 +OPENMVSWD_VERSION = 1.5.0 +OPENMVSWD_COMPAT_VERSION = 1.5.0 # enable c++11 CONFIG += c++11 diff --git a/module/V2-Application/share/firmware/OPENMV2/bootloader.elf b/module/V2-Application/share/firmware/OPENMV2/bootloader.elf index 3a14c51..6c55a04 100644 Binary files a/module/V2-Application/share/firmware/OPENMV2/bootloader.elf and b/module/V2-Application/share/firmware/OPENMV2/bootloader.elf differ diff --git a/module/V2-Application/share/firmware/OPENMV2/firmware.bin b/module/V2-Application/share/firmware/OPENMV2/firmware.bin index e0976da..40e1f80 100644 Binary files a/module/V2-Application/share/firmware/OPENMV2/firmware.bin and b/module/V2-Application/share/firmware/OPENMV2/firmware.bin differ diff --git a/module/V2-Application/share/firmware/OPENMV2/firmware.dfu b/module/V2-Application/share/firmware/OPENMV2/firmware.dfu index 91a1645..b0199e9 100644 Binary files a/module/V2-Application/share/firmware/OPENMV2/firmware.dfu and b/module/V2-Application/share/firmware/OPENMV2/firmware.dfu differ diff --git a/module/V2-Application/share/firmware/OPENMV2/firmware.elf b/module/V2-Application/share/firmware/OPENMV2/firmware.elf index 080ef95..001d393 100644 Binary files a/module/V2-Application/share/firmware/OPENMV2/firmware.elf and b/module/V2-Application/share/firmware/OPENMV2/firmware.elf differ diff --git a/module/V2-Application/share/firmware/OPENMV2/openmv.bin b/module/V2-Application/share/firmware/OPENMV2/openmv.bin index 9f1f49f..e4352ef 100644 Binary files a/module/V2-Application/share/firmware/OPENMV2/openmv.bin and b/module/V2-Application/share/firmware/OPENMV2/openmv.bin differ diff --git a/module/V2-Application/share/firmware/OPENMV2/openmv.dfu b/module/V2-Application/share/firmware/OPENMV2/openmv.dfu index f5fccd0..0e40465 100644 Binary files a/module/V2-Application/share/firmware/OPENMV2/openmv.dfu and b/module/V2-Application/share/firmware/OPENMV2/openmv.dfu differ diff --git a/module/V2-Application/share/firmware/OPENMV3/bootloader.elf b/module/V2-Application/share/firmware/OPENMV3/bootloader.elf index 93b9b81..4574dfa 100644 Binary files a/module/V2-Application/share/firmware/OPENMV3/bootloader.elf and b/module/V2-Application/share/firmware/OPENMV3/bootloader.elf differ diff --git a/module/V2-Application/share/firmware/OPENMV3/firmware.bin b/module/V2-Application/share/firmware/OPENMV3/firmware.bin index c52131c..5a8baac 100644 Binary files a/module/V2-Application/share/firmware/OPENMV3/firmware.bin and b/module/V2-Application/share/firmware/OPENMV3/firmware.bin differ diff --git a/module/V2-Application/share/firmware/OPENMV3/firmware.dfu b/module/V2-Application/share/firmware/OPENMV3/firmware.dfu index 2dc9688..169ac99 100644 Binary files a/module/V2-Application/share/firmware/OPENMV3/firmware.dfu and b/module/V2-Application/share/firmware/OPENMV3/firmware.dfu differ diff --git a/module/V2-Application/share/firmware/OPENMV3/firmware.elf b/module/V2-Application/share/firmware/OPENMV3/firmware.elf index 6fb58e1..97d358a 100644 Binary files a/module/V2-Application/share/firmware/OPENMV3/firmware.elf and b/module/V2-Application/share/firmware/OPENMV3/firmware.elf differ diff --git a/module/V2-Application/share/firmware/OPENMV3/openmv.bin b/module/V2-Application/share/firmware/OPENMV3/openmv.bin index 8b7a384..fd79616 100644 Binary files a/module/V2-Application/share/firmware/OPENMV3/openmv.bin and b/module/V2-Application/share/firmware/OPENMV3/openmv.bin differ diff --git a/module/V2-Application/share/firmware/OPENMV3/openmv.dfu b/module/V2-Application/share/firmware/OPENMV3/openmv.dfu index 981988f..aa6ea61 100644 Binary files a/module/V2-Application/share/firmware/OPENMV3/openmv.dfu and b/module/V2-Application/share/firmware/OPENMV3/openmv.dfu differ diff --git a/module/V2-Application/share/firmware/TOP.binary b/module/V2-Application/share/firmware/TOP.binary index f51da12..95ebff1 100644 Binary files a/module/V2-Application/share/firmware/TOP.binary and b/module/V2-Application/share/firmware/TOP.binary differ diff --git a/module/V2-Application/share/firmware/firmware.txt b/module/V2-Application/share/firmware/firmware.txt index ccbccc3..276cbf9 100644 --- a/module/V2-Application/share/firmware/firmware.txt +++ b/module/V2-Application/share/firmware/firmware.txt @@ -1 +1 @@ -2.2.0 +2.3.0 diff --git a/module/V2/bin/TOP.binary b/module/V2/bin/TOP.binary index f51da12..95ebff1 100644 Binary files a/module/V2/bin/TOP.binary and b/module/V2/bin/TOP.binary differ diff --git a/module/V2/bin/TOP.eeprom b/module/V2/bin/TOP.eeprom index 5f62c7c..778bbc8 100644 Binary files a/module/V2/bin/TOP.eeprom and b/module/V2/bin/TOP.eeprom differ diff --git a/module/V2/src/TOP.spin b/module/V2/src/TOP.spin index 89f040b..3d8e654 100644 --- a/module/V2/src/TOP.spin +++ b/module/V2/src/TOP.spin @@ -117,7 +117,7 @@ pub main | i, x, r command_state := constant(0 + 1) outa[swd_sel_pin[0]] := 1 outa[swd_pwr_pin[0]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW0 On", com#Carriage_Return, com#Line_Feed)) quit @@ -127,7 +127,7 @@ pub main | i, x, r command_state := constant(1 + 1) outa[swd_sel_pin[1]] := 1 outa[swd_pwr_pin[1]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW1 On", com#Carriage_Return, com#Line_Feed)) quit @@ -137,7 +137,7 @@ pub main | i, x, r command_state := constant(2 + 1) outa[swd_sel_pin[2]] := 1 outa[swd_pwr_pin[2]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW2 On", com#Carriage_Return, com#Line_Feed)) quit @@ -147,12 +147,12 @@ pub main | i, x, r command_state := constant(3 + 1) outa[swd_sel_pin[3]] := 1 outa[swd_pwr_pin[3]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW3 On", com#Carriage_Return, com#Line_Feed)) quit $53_57_44_39: ' Ping - com.writeString(string("Hello World - v2.2.0", com#Carriage_Return, com#Line_Feed)) + com.writeString(string("Hello World - v2.3.0", com#Carriage_Return, com#Line_Feed)) quit repeat i from 0 to constant(NUM_SWD - 1) @@ -204,7 +204,7 @@ pri kill_port | x x := command_state - 1 outa[swd_sel_pin[x]] := 0 outa[swd_pwr_pin[x]] := 1 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW")) com.writeString(DECOut(x)) com.writeString(string(" Off", com#Carriage_Return, com#Line_Feed)) @@ -231,6 +231,14 @@ pri heart_beat | i com.writeString(DECOut(i)) com.writeString(string(" [Testing] 0%", com#Carriage_Return, com#Line_Feed)) +pri debounce_reset_wait | i, tmp + + tmp := cnt + + repeat until (cnt - tmp) > (clkfreq >> 1) + repeat i from 0 to constant(NUM_SWD - 1) + debounce_reset(i) + pri debounce_reset(port) if (cnt - debounce_cnt[port]) > (clkfreq / 1000) @@ -514,4 +522,4 @@ PRI HEXIn(stringPointer) ' String to integer. quit result += constant(($A - ("A" & $F)) -> 4) - result := ((result <- 4) + (byte[stringPointer++] & $F)) + result := ((result <- 4) + (byte[stringPointer++] & $F)) \ No newline at end of file diff --git a/module/V2/src/TOP_2.spin b/module/V2/src/TOP_2.spin index 22ca56e..568c065 100644 --- a/module/V2/src/TOP_2.spin +++ b/module/V2/src/TOP_2.spin @@ -117,7 +117,7 @@ pub main | i, x, r command_state := constant(0 + 1) outa[swd_sel_pin[0]] := 1 outa[swd_pwr_pin[0]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW0 On", com#Carriage_Return, com#Line_Feed)) quit @@ -127,7 +127,7 @@ pub main | i, x, r command_state := constant(1 + 1) outa[swd_sel_pin[1]] := 1 outa[swd_pwr_pin[1]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW1 On", com#Carriage_Return, com#Line_Feed)) quit @@ -137,7 +137,7 @@ pub main | i, x, r command_state := constant(2 + 1) outa[swd_sel_pin[2]] := 1 outa[swd_pwr_pin[2]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW2 On", com#Carriage_Return, com#Line_Feed)) quit @@ -147,12 +147,12 @@ pub main | i, x, r command_state := constant(3 + 1) outa[swd_sel_pin[3]] := 1 outa[swd_pwr_pin[3]] := 0 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW3 On", com#Carriage_Return, com#Line_Feed)) quit $53_57_44_39: ' Ping - com.writeString(string("Hello World - v2.2.0", com#Carriage_Return, com#Line_Feed)) + com.writeString(string("Hello World - v2.3.0", com#Carriage_Return, com#Line_Feed)) quit repeat i from 0 to constant(NUM_SWD - 1) @@ -204,7 +204,7 @@ pri kill_port | x x := command_state - 1 outa[swd_sel_pin[x]] := 0 outa[swd_pwr_pin[x]] := 1 - waitcnt((clkfreq << 1) + cnt) + debounce_reset_wait com.writeString(string("ROW")) com.writeString(DECOut(x)) com.writeString(string(" Off", com#Carriage_Return, com#Line_Feed)) @@ -231,6 +231,14 @@ pri heart_beat | i com.writeString(DECOut(i)) com.writeString(string(" [Testing] 0%", com#Carriage_Return, com#Line_Feed)) +pri debounce_reset_wait | i, tmp + + tmp := cnt + + repeat until (cnt - tmp) > (clkfreq >> 1) + repeat i from 0 to constant(NUM_SWD - 1) + debounce_reset(i) + pri debounce_reset(port) if (cnt - debounce_cnt[port]) > (clkfreq / 1000) @@ -514,4 +522,4 @@ PRI HEXIn(stringPointer) ' String to integer. quit result += constant(($A - ("A" & $F)) -> 4) - result := ((result <- 4) + (byte[stringPointer++] & $F)) + result := ((result <- 4) + (byte[stringPointer++] & $F)) \ No newline at end of file