MSP430 in-circuit firmware upgrade question

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I am trying to implement the in-circuit firmware upgrade feature on a
MSP430148 based system. The firmware consists of a boot loader and
application. boot loader will be able to receive new application firmware
over UART and program it into the flash to replace the older application.

I have a few questions related to this:
1. Can the boot loader program flash while executing in flash? Or does it
have to be copied to RAM first?
2. Both of my boot loader and application need to communicate over UART, how
do I change the interrupt handler at run time? I am using IAR's tool. Its
"interrupt" keyword sets up interrupt vector at compile time.
3. In IAR's Embedded Workbench, I will have two projects for boot loader and
application. If I use the linker script to place boot loader and application
into different location, can I use C-Spy to download them into flash?
4. When build the application firmware for field upgrade, what link output
format should I choose that's good for download and flash programming?
5. When the system goes to production, how do I get a complete flash image
so we can program it on MSP430 chips before populate it on the board?

Thanks
Weiyang Zhou



Re: MSP430 in-circuit firmware upgrade question
Weiyang Zhou schrieb in Nachricht ...
Quoted text here. Click to load it
how
and
application
I think you should work on it and not ask school questions. The people are
very busy here!

Sorry -
Henry

--

<Schau auch mal auf meine Homepage www.ehydra.dyndns.info>
<u.a. Versand von Wasserflohzuchtansatz, Wasserpflanzen/-schnecken,
We've slightly trimmed the long signature. Click to see the full one.
Re: MSP430 in-circuit firmware upgrade question
Quoted text here. Click to load it

While you are programming the flash, it can't execute from it, so it
automatically executes marching on the spot until the write is finished.
So you have two choices: copy your loader to RAM, or turn off all
interrupts while actually writing.

Quoted text here. Click to load it

Just a flag to steer to mthe appropriate routine from the interrupt. Or
make the interrupt vector table point to a table of pointers (in RAM) to
the approriate routine.

Quoted text here. Click to load it

Something with checking would probably be better than the Texas .txt
format. OPerhaps add a CRC to each block.

Quoted text here. Click to load it

Don't. All the flash MSP430s have a built in serial bootloader, for the
cost of 4 extra pins on the board (tx, rx, reset, gnd). Or use the JTAG
if serial is too slow.

Paul Burke

Re: MSP430 in-circuit firmware upgrade question
I still don't quite understand what you mean by make the interrupt vector
table
point to a table of pointers (in RAM) to the appropriate routine, may I have
a little
more details?

In our hardware design, not all pins required foe bootstrap loader are
available.
There is not JTAG connector either. We need to program the chip before put
it on
the board. How can I do this?

Thanks
Weiyang


Quoted text here. Click to load it



Re: MSP430 in-circuit firmware upgrade question
Quoted text here. Click to load it

Declare a pointer to your interrupt function, it's just an ordinary
function::

void (*CCR12ISR_hook)();

Write a routine that does your bootloader interrupt stuff:

void BootloaderCCR12ISR()
{
WhateverPleasesYou();
}

In your initialisation for the bootloader, make the hook point to the
ISR (before you enable the interrupts):

CCR12ISR_hook = BootloaderCCR12ISR;

Then the interrupt routine calls the hook (this is in MSPGCC format):

interrupt(TIMERA1_VECTOR) INTERRUPT_MODE CCR12ISR (void)
{
(*CCR12ISR_hook)();
}

and similarly when you call the app, change the hook to point to the
app's ISR.

Quoted text here. Click to load it

You'll have to get a socket for a TQFP. They aren't at all cheap. You
should have put the pins on the PCB.

Paul Burke

Quoted text here. Click to load it

Re: MSP430 in-circuit firmware upgrade question
I plan to create to separate projects for bootloader and application. But
CCR12ISR_hook needs to be variable visible to both projects, how do I do
that? Should I put it into a fixed RAM location?

Thanks
Weiyang

Quoted text here. Click to load it
vector
have
put



Re: MSP430 in-circuit firmware upgrade question

Quoted text here. Click to load it

You could usefully do that, say in the flash page below the vectors.
You'll probably also need to create a custom startup module for the app.

Paul Burke

Site Timeline