AN2295 Serial Bootloader error for 9S08GT60A

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

AN2295 Serial Bootloader error for 9S08GT60A

9,562 Views
Risan
Contributor I
When I run hc08sprg.exe it fails to program.  Please refer to the following jpg

After asking "Are you sure to program part? [y/N]:"  I respond with "y" enter
Then it responds "Memory programming: E 0x182C 0%"  It will sit here for over 2hrs, so I'm pretty sure the E is meaning some sort of error.  The AN2295.pdf is no help in this regard.  My code works when programmed over the BDM. 

I have three projects, the serial bootloader "hc08sprg-s08gbgt.mcp" and then my project "MSCA(M).mcp", and also an edited MSCA(M).mcp to include the serial bootloader "SerBootloader.mcp" 

The plain serial bootloader project, and combined project program the same and provide the same error when I run hc08sprg.exe

My code MSCA(M) and combined code both operate my user code properly.   

I am unable to program with the serial bootloader.  I'm using a USB to RS232 port, but that shouldn't be the problem since it establishes comunication properly.  I've even tried different *.s19 files thinking maybe mine was a problem, but that didn't change anything.

Also I am using SCI2 of the MCU



Message Edited by Risan on 2007-09-24 09:52 PM

SCIBootloader.JPG

Message Edited by t.dowe on 2009-09-03 05:41 PM
Labels (1)
0 Kudos
Reply
23 Replies

578 Views
Risan
Contributor I
I changed my chip baud rate from 0x001D to 0x001E.  This fixed the problem.  I reloaded my software directly and it still works.  I guess the value 0x001D was on the edge and the serial bootloader added a slight change in speed. 

Thanks everyone to helping on this.  I'm really glad to have it working.
0 Kudos
Reply

578 Views
ok2ucx
Contributor IV
Excellent,
 
good to hear about your success :smileywink: Actually it seems that the only register which remains modified after bootloader's job is done is ICGTRM (0x004E). After POR it is at middle value (0x80), then modified by bootloader (but only if some bootloading takes places) and finally remains set to that value. After subsequent power-on-reset it should be back at 0x80.
 
I would suggest to copy factory preloaded value from address 0xFFBE to ICGTRM register otherwise you can trap yourself into a trouble once you use a different silicon (with different untrimmed bus frequency) - which I gues you don't do in your init code.
 
Alternatively you could move the line:
 
Code:
  MOV     #$80, ICGTRM ; trim to middle (+-25%) so our trim will work OK

 
right after main label as a first instruction. This would correct the modification (I will bring this change to the next release of AN2295SW anyway).
 
Regards, Pavel
0 Kudos
Reply

578 Views
Risan
Contributor I
Well, I got a new board today and tested it out.  The programming went fine.  Got the message that verification was ok.

But for some reason my code is NOT executing.  Am I missing something obvious?  I wasn't supposed to change my code or anything was I?  Do I need to rename my main?  I'm going back through the an2295.pdf looking for something that I missed, but not seeing it yet. 

Just going through the programming was a big step.  It seems it was a hardware issue that was resolved with the new board.  I even used the original an2295 software and it behaved the same.

Thanks again for all the help, I'm almost there.

Bobby
0 Kudos
Reply