mpremote on a STM32WL5x board, can't load files #13157
-
Because I couldn’t talk to a STM32WL5x board using rshell I started using mpremote. This seems to work most of the time, except when trying to copy files bigger than say 500-1000 bytes. The only observation is that every time I try the transfer it will get to a different percentage, ie 4% - 75%. Often it will never transfer anything. This distro is using LFS2 and I appear to have 30-45K of flash to play with. I have been using mpremote on a STM32F411 board without this problem. Do you have to do something special to use mpremote on a NUCLEO_WL55 board? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Found a clue here:
Maybe, this should go into the docs? |
Beta Was this translation helpful? Give feedback.
-
This is a problem on all ports / boards which use UART for repl and internal flash for storage. With internal flash, when code is running from the same flash the CPU is paused while flash write / erase operations take place. These pauses can cause UART bytes to be dropped. I've got a fix for this on STM32 in #9054 (which has links to earlier discussions and investigations) but it's a rather involved change. Note the F411 doesn't have this issue because it's using USB rather than UART, the USB has flow control so pauses the communication while flash operations take place. |
Beta Was this translation helpful? Give feedback.
This is a problem on all ports / boards which use UART for repl and internal flash for storage. With internal flash, when code is running from the same flash the CPU is paused while flash write / erase operations take place. These pauses can cause UART bytes to be dropped.
I've got a fix for this on STM32 in #9054 (which has links to earlier discussions and investigations) but it's a rather involved change.
Note the F411 doesn't have this issue because it's using USB rather than UART, the USB has flow control so pauses the communication while flash operations take place.
UART with RTS/CTS flow control also fixes the problem, but most stm boards like all the nucleo ones don't wire these li…