Writing an embedded application for msp430?

I would like to have a base OS and a base file system for the high-end MSP430, possibly MSP430F5438 . I know that I can go with something like FreeRTOS , IAR PowerPac or Micrium , to name only a few options for the OS and file system. However, I would like to be able to also be able to download small applets or threads for the last time, ideally removing this extra code from the file system. My goal is not to reprogram the entire device to change or implement a function on the embedded device. You don’t know where to go to realize this ability, or I need to switch to another processor, such as ARM.

+6
embedded rtos msp430
source share
5 answers

The MSP430 is a great controller, but if you want to run the OS and download applications without writing them to flash, you should probably switch to ARM (another great platform with many ARM-based microcontrollers).

+3
source share

I am sure that you will always have to reprogram the MSP 430 every time you want to change the program code. Of course, the loader can update the flash on its own, so you just want to make a program that acts like a loader, but only updates some parts of the program memory - that is, where you want your applets to be placed. And then you will need to find out in what area of ​​memory each area of ​​flash memory is located, where is your applet code so you can name it.

You will also have a problem running code in these applets. If there is only one memory cell with which you want to start it, you can compile them with this in mind. If you need several different applets that can be run from any “applet space” in memory, then you may run into problems because they won’t know what address they start from.

And, of course, none of these applets can be very large. How much will your RTOS cost?

+2
source share

The Msp430 controller is supported by several OS-es, which can provide the desired functions. Some of them provide OTA (over the air). Some of them provide (flash files) file systems. However, this often means using flash memory to store the downloaded program.

Here are a couple of active active OS-es supporting msp430:

Contiki - OS for the Internet of Things. Provides protopins.

MansOS is a unix-like OS that supports streams and OTA for msp430 devices.

+2
source share

Flash
On msp430, you can erase / overwrite the built-in flash memory with a capacity of 512 bytes (a user flash drive can handle smaller chunks).
Thus, your bootloader / stable RTOS can reprogram the chip using these “applications”.
It's a little tricky to redirect interrupts, but it can be done with a redirect from the "real" vector table to the application vector table.

Call Stable / RTOS
You can also call the functions of the stable part from applications, you can build a fixed transition table for each function in the stable part, so the application knows how to call this function, even if you create another version of the stable version / RTOS.

RAM
If you allow only one application, this is easy.
You need to reserve some RAM for your stable RTOS, and the rest of the RAM can be used by the application.

But to solve the problem of placing your variables can be difficult if you want to use multiple applications.
To reserve RAM from an application, I would prefer dynamic allocation then, but even then you need a pointer to dynamically allocated blocks, and these pointers are fixed or your applications use variables on the stack.

+1
source share

There are some FRAM msp430 parts that may also be worth a look. However, this is not so much.

0
source share

All Articles