cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to wirelessly upload program to the CPU?

LMI2
Lead
Posted on June 18, 2015 at 16:54

In one project there is a large rotating machine. It would help a lot if programs could be uploaded wirelessly(, while the motor is on). We would like to do other things, so doing our own solution is not good idea.

It would have to be a card or some other accessory, plain ARM cannot do this I think.

There is an other CPU card we use now but a self made STM32 booard would be more flexible.
7 REPLIES 7
Posted on June 18, 2015 at 17:18

No, I think you're going to have to code/manage this completely on your own.

Erasing/writing the flash breaks some of the real-time functionality of the device, the process itself is going to take several seconds. If your motor code can function from RAM, ie executable code, vector table, etc then you might be able to manage to reprogram it while remaining functional.

Which STM32? they make a few.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LMI2
Lead
Posted on June 18, 2015 at 18:28

I think almost every CPU could handle our other tasks, so we would use whatever could do this.

This processor does not drive the motor, so it is possible to just reprogram the chip while the motor runs.

We would have to download the new SW via Ethernet into RAM and then flash it into program memory. And keep the download SW in the RAM too.

Does not sound simple, what do you think? I would rather flip some bits with 200MHZ cpu than build a new bootloader..

Posted on June 18, 2015 at 18:39

Does not sound simple, what do you think?

Embedded software/design engineering is complicated.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LMI2
Lead
Posted on June 18, 2015 at 19:57

Yeah.

Is there library or C function to store a byte into certain address of program memory. Or is it assembler only.

From: clive1

Posted: Thursday, June 18, 2015 6:39 PM

Subject: Is it possible to wirelessly upload program to the CPU?

Does not sound simple, what do you think?

Embedded software/design engineering is complicated.

Posted on June 18, 2015 at 20:11

The Standard Peripheral Library has code for programming the FLASH memory, and it can done with C and/or assembler depending on what you want to do.

http://www.st.com/web/en/catalog/tools/PF257901

Externally you can access the System Loader via USART, CAN, etc. This uses a byte stream protocol you can use on whatever platform you choose.

http://www.st.com/web/en/resource/technical/document/application_note/CD00264342.pdf

You could also build your own firmware to do OTA updates.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LMI2
Lead
Posted on June 18, 2015 at 20:48

Thank you.

That protocoll does not look too bad. Either using two CPUs or find out how the compiler handles starting addresses. Scatter file, I think.

By the way, what is OTA?

Posted on June 18, 2015 at 21:03

OTA - Over the Air

https://en.wikipedia.org/wiki/Over-the-air_programming

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..