Boot load for stm32

johanan
Posts: 5
Joined: Thu Sep 28, 2017 4:37 am

Boot load for stm32

Postby johanan » Mon Mar 11, 2019 3:53 am

I have esp32 as Wi-Fi system for an stm32f4 system.
I would like to be able to update the esp from the stm32 via uart or spi. Is there any sample code how to do it?. I can use factory uart bootloader but need the stm side in c. Is there any such example code?
Thanks

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Boot load for stm32

Postby ESP_igrr » Mon Mar 11, 2019 4:26 am

There isn't any example available for interfacing with the ROM bootloader of the ESP32 from STM. A simpler option (if you control the firmware of the ESP32) would be to implement your own UART update protocol. On the ESP32 side, you can use UART driver and esp_ota APIs. See system/ota/native_ota_example example. This example downloads the firmware from a remote server, but same APIs can be just as well used to implement OTA over UART or over SPI.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Boot load for stm32

Postby PeterR » Thu Aug 22, 2019 11:02 am

Hi,
We have a similar setup and have ported the relevant parts of esptool to STM C/C++.
I will check with commercial to see if we can make this project open.
I would agree that your own protocol is probably easier. Just make sure that your ESP side will not allow you to write to the factory partition!

How did you get on with the hardware side? I would be quite interested in your circuit.
We also have wired Ethernet on the ESP using a LAN8710A. We have both the STM and a USB/TTL debug cable connected to the ESP TX/RX and we have problems with the RIO0/50MHz clock. The PHY initialisation times out with status registers FFFF. Probably clock not getting through.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: No registered users and 136 guests