I am dropping by just to say that ST released a new version of AN4221 where bootloader v1.2 is "documented" https://www.st.com/resource/en/application_note/an4221-i2c-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
I would be in favor of integrating this patch, we use it as a local patch and so far it works great to flash our stm32f723.
I think our ST tools (stflash) use stlink probe which itself I am guessing is using JTAG. With another tool (dfu util) we use stm32's bootloader USB DFU function.
This patch looks good to me :)
Hello Tormod, About your v2, I prefer my version because I make it explicit about the "10 ms steps". For instance with the v2 patch if I do "-t 9" I get 0 timeout. If I do "-t 19" I get 10 ms. Or maybe round it to superior bound?
Hello, I've asked the question on ST forum: https://community.st.com/s/question/0D53W00001BTueOSAT/stm32f723-i2c-bootloader-nostretch-erase-command-leads-to-long-clock-stretching-anyway-how-to-deal-with-it
What can I do to make this patch progress forward?
I replaced the sleep(10) with sleep(1) and I don't get the NACK anymore, I am back to the timeout due to clock being stretched a very long time. Now I get : Write FF FF 00 ; 1 second idle on the I2C lines (logical level 1) ; then the master tries to issue a Read, but the ACK bit is clock stretched (like the original issue). Then I end up seeing 0x76 on the lines but it's too late, the master abandoned because of a timeout in the Linux driver stack. btw 0x76 seems to mean "BUSY" so I get both a big...