loosing up verification for interface init
parent
83726bc392
commit
04ee01f057
|
@ -337,12 +337,18 @@ STM32_protocol.prototype.upload_procedure = function(step) {
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case 1:
|
case 1:
|
||||||
// initialize serial interface on the MCU side, auto baud rate settings
|
// initialize serial interface on the MCU side, auto baud rate settings
|
||||||
|
// we could probably use interval timer here to try 2-3 times and then fail afterwards
|
||||||
self.send([0x7F], 1, function(reply) {
|
self.send([0x7F], 1, function(reply) {
|
||||||
if (self.verify_response(self.status.ACK, reply)) {
|
if (reply[0] == self.status.ACK || reply[0] == self.status.NACK) {
|
||||||
console.log('STM32 - Serial interface initialized on the MCU side');
|
console.log('STM32 - Serial interface initialized on the MCU side');
|
||||||
|
|
||||||
// proceed to next step
|
// proceed to next step
|
||||||
self.upload_procedure(2);
|
self.upload_procedure(2);
|
||||||
|
} else {
|
||||||
|
STM32.GUI_status('STM32 Communication with bootloader <span style="color: red">failed</span>');
|
||||||
|
|
||||||
|
// disconnect
|
||||||
|
this.upload_procedure(99);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue