firmware upload on 13213 board with MCU 9S08AW60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

firmware upload on 13213 board with MCU 9S08AW60

4,689 Views
labsondrio
Contributor I

Hi, I’m using Codewarrior 5.1 for programming 13213-SRB and 13213-NCB board.

First I load the Bootloader_embebbed with TestTool successful on either boards.

Then I load a demo application (Start Network Demo (Coordinator and End Devices)) with Freescale Beekit: I export these solutions for compiling and uploading the code.

 

With Codewarrior I import the file created with Beekit and create a new project: I specify the MCU model (HCS08, MCU 9S08AW60). I compile the code successful and when I try to upload the application on the boards with True-Time Simulator and Real-Time Debugger the tool stops with this message (during memory programming):

 

Error 18 during script!

 

Moreover the tool doesn’t erase the memory before programming.

In Codewarrior I use BDM programmer cable with USB Multilink interface.

 

I’ve tried many modifications, but no success.

 

Thank you  

Labels (1)
Tags (1)
0 Kudos
16 Replies

1,144 Views
labsondrio
Contributor I
Ok, now I am able to upload the firmware and the demo applications work correctly.

A last question: when I have to upload an application, usually I must repeat the debug operations (upload the firmware) many times, because the tool stops without message.  What do you tell me about this problem?

Very thanks.

Labsondrio
0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi Labsondrio,
 
Glad to here you got it going, at least sort of.
 
Please get the terminology correct. It is especially important in forums like this, a lot of effort can be wasted! You _download_ from the PC to the microcontroller and _upload_ from the microcontroller to the PC.
 
My experience with a P&E USB Multilink and S08's is programming is VERY reliable, monitoring in electrically noisy enviroments is a bit suspect. So without some more details I don't know.
 
0 Kudos

1,144 Views
labsondrio
Contributor I
I am not solve the problem with the download of the firmware from the PC to the boards by P&E USB Multilink with Codewarrior.

Only sometimes I successful download  correctly  the  firmware:
-usually I erase the memory (correctly) but the True-Time Simulator and Real-Time Debugger tool stops during the programming (without any message) around the memory address 9XXX;
- sometimes the True-Time Simulator and Real-Time Debugger tool program the flash memory of the boards, but during the checksum stop and appear the following message: error during the checksum in memory block 9E00 - B100.
- sometimes the download works correctly and the demo tool works.

I try to screen the BDM cable but the behavior does't change.


Which is the problem?


Thanks.

Labsondrio
0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi Labsondrio,
 
I think the only way to proceed here is by substitution until you find the culprit.
Try a completely new/different project, preferrably an example one.
Try CW on a different computer, or a clean out/re-install on the same one.
Different hardware.
Different BDM adapter.
 
0 Kudos

1,144 Views
labsondrio
Contributor I
I have solved the problem: the USB ports of my PC don't work correctly so I must use a USB HUB. I connect the USB Multilink Interface to  the HUB: now I am able to download the firmware.

Very thanks for support.

Labsondrio
0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi,
 
I now remember hearing that people have fixed problems like this by using a USB1.1 compliant only hub. It seems that in some setups the speed needs to be limited. Anyway glad you solved it.
 
0 Kudos

1,144 Views
labsondrio
Contributor I
I attach upload_example.s19, when I try to upload network_start_demo application for SRB-13213.
I make this file with Upload Module command.

Thanks

0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi,
 
It seems as though the little FLASH area is not being erased, the big area is.
I don't know why though. What flash algorithm are you using (the version of the .s08 file)
What s19 where you downloading? Is this all of the code? (i.e. does the programme end at prior to $17FF?)
 
 
Alban, this is a AW60 so the s19 file is all flash. Also the upload module command only does the flash areas.
 
0 Kudos

1,144 Views
labsondrio
Contributor I
I am able now to erase memory. I obtain the .s19 file of the previous replay when I try to program memory (with an application of 45000 bytes): the tool stops, while programming, without message. So the .s19 file isn't complete.
If I erase the memory and upload module, the .s19 file contain only F.


Before this I want understand a thing: I buy the 13213 NSK-BDM kit with one 13213-NCB and two 13213-SRB. In the kit there aren't any specifications about the MCU. When I connect the board with PC by BDM, the tool True-Time Simulator and Real-Time Debugger says me that on the board there is MCU 9S08AW60. So I think that this is the MCU on my boards.

When I use thr 9S08AW60.s8p file I am not able to erase memory and the programming stops with error 18; otherwise if I use MCU13213.s8p file I am able to erase memory but the programming stops without any message.

How can understand I which MCU I had buy and I am using? The flash memory of these two device is different. Is this the problem?

Thanks.
Labsondrio







0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi,
 
I now realise what is going on here. I should have checked when you first mentioned a 13213 AND a 9S08AW!
 
A 13213 is basically a zigbee radio and a 9S08GT60 MPU in one package. I don't know where you are getting the reference to an AW from???)
 
The upload of the code shows that it starts at $1080, this is the start of flash in a GB/GT60 which makes sense. (if it were for an AW why wouldn't it start at $870 ?)
 
The only reason the simulator says its an AW is because YOU told it that in the first place!
You should be using the 08p file for the 13213!
 
Back in your first post here you said you set up CW telling it you had an AW. This is possibly why the thing won't programme as you have compiled the code for an AW and now your trying to put it into a GB/GT/13213!
 
I suggest you go back to square 1 and start again. Good Luck!
 
0 Kudos

1,144 Views
Alban
Senior Contributor II
Hello,

I see a problem in this S-Record.
The vector table is blank.

No Reset vector (0xFFFF) means the software cannot start.

You seem not to work from Flash, as firware is between 0x1000 and 0x16AF.
I don't know if it is important as I have to admit I did not read all the messages of the thread...

Cheers,
Alban.
0 Kudos

1,144 Views
labsondrio
Contributor I
The recommended trim is $AF
Version number of the .s8p file (9s08aw60.s8p) is 1.06

Then appear

Loading Programming algorithm ... Done


If I try to do a blank check, appears this message:

Module byte not erase at address $1080 byte is $00

If I try to Upload module appears a window that ask me (s19 file?),  without the possibility of choice a file.

Thanks
0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi,
 
This little window is asking you to make up a filename that it will write the contents of flash to in s19 format.
Examining the contents of this file MAY assist in figuring out what is going wrong.
 
0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi labsondrio,
Error 18 is error during programming which is probanly due to trying to programme unerased flash.
Have you tried it from Expert programmer mode?
You can erase then programme from here.
Access this from Multilink/Cyclone Pro menu.
 
0 Kudos

1,144 Views
labsondrio
Contributor I

I try to erase memory with expert programmer mode, but the command ERASE MODULE gives me a error (couldn't erase memory). So I try to use ERASE BYTE and ERASE WORD, but these aren't active: I try to modify the file .S8P for change the set up without success. I don't find in www.pemicro.com a user's guide for this tool, so I find difficult to understand how work and change set up.

I decided use RESET CHIP and this command appears work correctly: but when I try to program the memory I always find the error 18. I try many times and only one I successful program the board.


How can I resolve this problem?


Thanks

0 Kudos

1,144 Views
peg
Senior Contributor IV
Hi,
 
When the BDM module connects does it:
 
Show the recommended trim?
Show the version number of the .s08 file?
End with Loading Programming algorithm ... Done.?
 
Can you do a blank check?
Can you do an Upload Module? What do you get in the s19?
 
0 Kudos