Victor Gaburov

MC9S08SG32 and AN2295 bootloader

Discussion created by Victor Gaburov on Dec 15, 2010
Latest reply on Jan 11, 2011 by bigmac

Hello everyone,

 

Currently I am developing a bootloader for this (MC9S08SG32) MCU. There is an application developed by my co-workers that runs perfectly if it is flashed directly to MCU.

 

MCU is connected via UART to serial usb connector using serializer and deserializer (serializer is next to MCU and deserializer on the board where serial usb connector is connected)

I used  S08SH .mcp (codewarrior project) and TB1RB0 platform

 

What I need bootloader to execute:

- establish UART connection between MCU and serial connector through serializer-deserializer

- make bootloader load the application to the MCU through this UART connection

- application should be running

 

What have I accomplished:

- UART connetion is stable. I set the pins needed for Rx-Tx transfer; implemented the delay, needed to set stable connection between serializer and deserializer

this took me a lot of ROM memory so I increased with the values in .prm file and set boundries in .asm file.

Result: bootloader is flashed to MCU and $ACK is visible in Tx and Rx, means UART is established and running (also there is LED that lits up when there is no link).

- Application is loaded to the MCU through this UART by serial usb connector, even though, in the beginning, it was saying that there is not enough space for .s19 file, but increasing memory worked like charm and no more notifications like this. Tx and Rx still show $ACK, which is ok if we need to reload the application

 

My problem:

the application does not run from MCU, even the very simple one that sets some unused pin to high, so it can be seen in the osciloscope.

 

any ideas why it is not running?

Outcomes