2019-08-15 02:41 AM
I am thinking about a new control unit for my project and want to use 2 STM32 controllers
Controller 1: STM32F413 or maybe some lowpower STM32 with 6 Uart/USart
• Messurements
o 10x ADC
o 12x IO Outputs
o 4x pulse input
o 5 x different 485 and 232 Ports
o 8x PWM
o 4x powerless dc output (external)
o 4x 4-20mA out (external)
o 2x I2C lanes (RTC, EERPM, some power meter)
• Programming in FREERTOS with STM32CubeIDE 1.0
• Update over OTA (Essential)
• Main function: controller for the system and data collection
Controller 2: STM32F769
• Display controller and interface menu configuration and gateway to the internet
• Programming in FREERTOS with STM32CubeIDE 1.0 in combination with Touchgfx
• Update over OTA (Essential)
• EEPROM for variables
• Collect all Values from Controller 1
• Flash 2gbit or equial for save the values if the system is offline and resend it online
I think it will be easier for programming and coordinating all stuff to do it with 2 controllers.
Both controller are connected via USART
Following questions are unsolved:
Are there some bootloader with two partitions for failsafe update?
How to update controller1 and failsafe? This is maybe possible with controller2 to reflash controller1?
How to update controller2 and what how can be a failsafe look like?
Are there some concrete examples how to the OTA Updates works (code snaps).
I have some experience with esp32 and OTA, and it works well.
2019-08-15 04:29 AM
The ROM based loader has its function described in app note AN2606
The are multiple IAP (In Application Programming) examples, you can determine the split between loader/app, based on complexity and minimum sector/page sizes.
Integrity can be checked via signing, ie CRC32 or SHA or whatever.
Some parts have dual bank flash allowing for transparent switching.
Best to have somewhere to stage a complete update, and check integrity before application.
Likely to need to engineer your own solution.