https://github.com/tomaskovacik/IS2020/wiki/Upgrading-firmware-on-BM62
P2_0 and P2_4 pulled to ground
EAN pulled high directly to VDD_IO (this is required even that datasheet stated there is pullup!)
22uF cap on VDD_IO (check erata)
5V connected to 5V
gnd to gnd
rx to B10 of stm32
tx to B11 of stm32
power up the module or reset it, both leds will be blinking simultaneously
run isbtflash.exe (BM6x Software & Tools(DSPKv2.1.3)\DSPK v2.1.3 Package\Tools\FlashUpdate Tool)
select com port, speed 115200:240, banks: 16 hit connect
browse-> select firmware files (from BM6x Software & Tools(DSPKv2.1.3)\DSPK v2.1.3 Package\Software\Firmware Image\BM64 Firmware yes BM64 als for BM62)
BT5506_SHS_FLASH.H00
BT5506_SHS_FLASH.H01
BT5506_SHS_FLASH.H02
BT5506_SHS_FLASH.H03
BT5506_SHS_FLASH.H04
BT5506_SHS_FLASH.H05
BT5506_SHS_FLASH.H06
BT5506_SHS_FLASH.H07
BT5506_SHS_FLASH.H08
BT5506_SHS_FLASH.H09
BT5506_SHS_FLASH.H10
BT5506_SHS_FLASH.H11
BT5506_SHS_FLASH.H12
BT5506_SHS_FLASH.H13
BT5506_SHS_FLASH.H14
BT5506_SHS_FLASH.H15
hit update button
after the update, remove the jumper from P2_4, hit reset, both LEDs will light solid
EEPRom_tool.exe reports module as IS2064S_012_SPK02_V2.1_BETA which is probably ROM firmware, not one in flash, but this is not important.
Run isUpdate.exe, select com port, baudrate 115200:240, memory: eeprom and subtype: default, hit connect.
Using browse button in "Flash/EEPRom/MCU/AHB Access" find MCHP_DSPKv2.1.3_BM62_StandAlone
after write is successful, remove jumper from ENA pin and disconnect power from module, then connect it back, it will boot with both LEDs light up but
EEPRom_tool.exe will report module as IS206X_012_DUALMODESPK2.1_E1.0, now you can update eeprom with your configuration or one from my kicad-library, write new eeprom:
Do not forget check "Load default in into IP" on third screen of MPET.exe when generating eeprom (consult BM62 dev board datasheet from microchip website)
code for stm32:
#define BLUETOOTH_EEPROM_UPLOAD PA4 //goes to P2_0
#define BLUETOOTH_FLASH_UPLOAD PA5 //goes to P2_4
#define BLUETOOTH_EAN PA6 //goes to EAN
#define BLUETOOTH_RESET PB14
void setup() {
Serial.begin(115200);
Serial3.begin(115200); //Serial3 => TX = PB10, RX = PB11
// pinMode(BLUETOOTH_EEPROM_UPLOAD, OUTPUT);
// digitalWrite(BLUETOOTH_EEPROM_UPLOAD, LOW);
// pinMode(BLUETOOTH_FLASH_UPLOAD, OUTPUT);
// digitalWrite(BLUETOOTH_FLASH_UPLOAD, LOW);
// pinMode(BLUETOOTH_RESET, OUTPUT);
// digitalWrite(BLUETOOTH_RESET, LOW);
delay(100);
digitalWrite(BLUETOOTH_RESET, HIGH);
}
void loop() {
// Serial.println("Start\nsending 0x0120fc00:");
// delay(1000);
// Serial3.write(0x01);
// Serial3.write(0x20);
// Serial3.write(0xFC);
// Serial3.write(0x00);
// Serial.println("responce:");
// while (Serial3.available()) { // If anything comes in Serial1 (pins 0 & 1)
// Serial.write(Serial3.read()); // read it and send it out Serial (USB)
// }
// delay(1000);
while (1) {
if (Serial3.available()) { // If anything comes in Serial1 (pins 0 & 1)
Serial.write(Serial3.read()); // read it and send it out Serial (USB)
}
if (Serial.available()) { // If anything comes in Serial (USB),
Serial3.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
}
}
//delay(100);
}