stm32f1 bootloader write memory command
Hello,
i'm trying to implement firmware upgrade in my Windows application via USART for stm32f103 following AN3155. My issue is with the Write Command. More specifically:
- if i send 1 byte of user data at time it works, it's just slow cause i have to introduce 1ms delay or shorter between each write (or it stucks and i get no message from the bootloader):
//PSEUDO CODE:
for (i=0 to N_byte){
USB_Out_Buffer[0] = FirmwareBytes[current_chunk_num, i];
USB_write(1); //sends 1 byte
delayms(1);
}- if i send the whole 256 byte block (or lower) it stucks after sending the checksum and i get no message from the bootloader:
//PSEUDO CODE:
for (i=0 to N_byte){
USB_Out_Buffer[i] = FirmwareBytes[current_chunk_num, i];
}
USB_write(N_byte+1); //sends 256 bytesI'm using USART on PA9, PA10. i tried everything, reduce baudrate, adding delay etc.
Any idea what could be the issue?
