1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

AT32 MCU DFU added

This commit is contained in:
Ernest Stepanov (ErNis) 2023-02-02 15:05:34 +02:00
parent 5a6c2d7040
commit cf35bd6142
5 changed files with 17 additions and 6 deletions

View file

@ -336,6 +336,8 @@ STM32DFU_protocol.prototype.getChipInfo = function (_interface, callback) {
// H750 SPRacing H7 EXST: "@External Flash /0x90000000/998*128Kg,1*128Kg,4*128Kg,21*128Ka"
// H750 SPRacing H7 EXST: "@External Flash /0x90000000/1001*128Kg,3*128Kg,20*128Ka" - Early BL firmware with incorrect string, treat as above.
// AT32F435: "@Internal Flash /0x08000000/512*002Kg,@Option byte /0x1FFFC000/01*512 g"
// H750 Partitions: Flash, Config, Firmware, 1x BB Management block + x BB Replacement blocks)
if (str == "@External Flash /0x90000000/1001*128Kg,3*128Kg,20*128Ka") {
str = "@External Flash /0x90000000/998*128Kg,1*128Kg,4*128Kg,21*128Ka";
@ -617,6 +619,11 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
});
break;
case 1:
// workaroud for AT32
if (typeof self.chipInfo.option_bytes === "undefined" && typeof self.chipInfo.option_byte !== "undefined") {
self.chipInfo.option_bytes = self.chipInfo.option_byte;
}
if (typeof self.chipInfo.option_bytes === "undefined") {
console.log('Failed to detect option bytes');
self.cleanup();