I use ESP-12F as master to update STM32 mcu through UART bootloader (built-in smt32).
To do it ESP sends specific byte-command. For example to activate bootloader we use 0x7F byte and is answer with 0x79 if Ok. Everything is ok and i can do it and read memory but is one moment.
Problem appears whet i try to activate bootloader second (and every even) run of 'start_bootloader' function. There appears 0xFF returned from stm32 but if we see to scope it is not true. This byte breaks the bootloader running until reload mcu.
No glitches i see (but i don't use oscil).
Thank for answering. Now i edit receive function so it has no input pointer and all data goes trough global variable. Has no affect, the same behavior.
Yes. Scope show everything ok, but Serial of ESP returns 0xFF even faster than real answer.
7F -> FF (error)
7F -> 79 (read old answer. This moment STM bootloader already broken by twice sent 7F
00+FF -> 1F (STM rejects read command)
I put new version of the func. It does not change result.
oh yes, of course it was. at some point I decided that this is a code from STM32. but now i have no more idea why ESP reads empty buffer and naturally get int -1 back. from 0xFFFF will only least 0xFF stored.
no idea except