-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 flash problems with STM32 #10
Comments
Hi, I think that it has nothing to do with Arduino IDE. Perhaps, you could somehow share the whole project, as I am not able to reproduce this issue based on provided snippet of code. Do you get Another option is to try |
Hi,
cleans the input buffer (I had problems if i don't clean it). I've made a repo with the full project for you: https://github.com/CURTLab/ESP32FlasherUSBMassStorage
If I flash the ESP using the Arduino IDE and a serial adapter everything works fine. I can even upload the same binary with my project but as soon as I try to upload a binary that is different from the uploaded one I get the |
I've had a similar issue with an STM32 and it was caused by the STM32 dropping some bytes from UART. The default STM32 HAL code isn't good for receiving bursts of data of an unknown length because you have to start/stop a receive for every byte. There's a lot of time where we can lose data. I fixed this by configuring the UART to use a circular DMA buffer and then polling |
Do you have any example code? I have only found one github repo (https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx) but I have no idea how to implement the |
Although, I have not encountered data loss using polling mode so far, @campbell-seer has a point. It is much more robust with DMA. I could re-implement STM32 port layer to use DMA, but you would have to use |
I was also trying to compile your project in VS code in order to reproduce the issue, however, I was not able download Arduino library via platformIO. |
That would be much appreciated, i use HAL and the platform is STM32F411, which is somewhat slower than F429, currently it cannot achieve a full programming without error, after 10 attempts at various bitrate, always end up with INVALID_CRC or Packet could not be written! Error 2 at one point or another, tried from 57600 to 460800bps. The STM32F411 is set to 96MHz. The target in my case is ESP8285 with 2MB onboard flash, so its the same as ESP8266. |
Hi Hoel, Indeed, flash detection failed when ESP8266 was used as target. Thank you for pointing that out. |
thank you for the promp reply, where is that bugfix? i would like to implment it directly. EDIT : OK i found it, it works well now. |
I have some flash problems using a custom STM32 board with an ESP32 on it.
I'm using the Arduino Framework for both and for the moment I use the Arduino IDE (Export compiled Binary) for the ESP32.
What I want to do is to write a USB mass storage to upload the binary (which works except the flashing).
Sometimes the
esp_loader_flash_start
fails and sometimeesp_loader_flash_write
with error 7 (ESP_LOADER_ERROR_INVALID_RESPONSE) and FLASH_WRITE_ERR.Should I comple it with another IDE instead of Arduino?
Maybe my Arduino implementation of the esp-serial-flasher is incorrect.
I would be thankful for every comment or help!
The text was updated successfully, but these errors were encountered: