Why do I have to send a UART bootloader command twice to get an answer ?
Hello,
I am using a STM32L432KC to control the UART bootloader of a STM32F446RE.
First, I am sending Get and Get ID command to check if I get the recquired answer. It works, but not as I wish.
To begin I Initialize the bootloader sending 0x7F and that works too.
What I don't understand is why do I have to send the command twice to get an answer. It's the case for the 0x7F as well as for the get and Get ID. The first request never works, but all the following does.
Example :
Me : 0x7F
Res : Anything.. (not specially 1F)
Me : 0x7F
Res : 0x79
Me : 0xFD & 0x02
Res : 1F
Me : 0xFD & 0x02
Res : 79 01 04 21 79
Me : 0xFD & 0x02
Res : 79 01 04 21 79
Me : 0xFD & 0x02
Res : 79 01 04 21 79
...
It's exactly the same for the Get command...
I don't know if it's a normal situation or not, but I don't think it is really ergonomic..
Maybe someone could explain me, thus I could improve my program to overcome that.
Thanks in advance for your answer.
Regards
