AN2295 Serial Bootloader error for 9S08GT60A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried programming on a computer with a serial port on the motherboard, but the same result occured. Initial communications worked, asked if I wanted to program it, I replied 'y', but then it stopped on the line
"Memory programming: E 0x182C 0%"
I am somewhat glad I didn't have success because many computers now don't have a built in serial port, so that could have been a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FPROT $1824 is $80
for reference the memory for that area is:
1820 00 00 00 00 80 C0 00 00
I tried changing the address area, but when I changed it to being 1 block of flash from $2000 to $FDC0 the program still tried to erase 182C
So then I tried programming it as a GT32, the initial communications succeeded, but it failed to erase 8000.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if the lowest address present in S19 is 0x2000, first Erase operation will be at 0x2000 (its modulo 0x0200 - Erase page size, 512B). Please, double check the S19 file content that you're presenting to hc08sprg.exe.
Anyway, it seems that this is a general problem that you are having with Erase. Do you use the original code from AN2295SW or is it modified somehow?
The part of memory mentioned does not show FCDIV to be set properly - and this could be the reason for Erase to fail.
Pavel
Message Edited by ok2ucx on 2007-10-04 08:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
New GT8A is the same as GT16A (it allows the protection boundary to be at any Erase page boundary).
The update for GT16A and GT8A will soon appear in AN2295SW and will try to test also GT60A/GT32A.
Pavel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran into a new problem today. For some reason when I try to run the serial bootloader I get a new error. After
"received 0xfc (good).
Calibration break pulse sent. Count: 1"
I receive this error:
"Can't read MCU info. Could be protocol error.
(Or forgot to set single wire mode?)"
I have no idea where this came from. I was going to change
NVOPT_ROM: SECTION
NVOPT DC.B %00000000 ; backdoor enable, redirection enable, (un)secured flash [last 10]
to
NVOPT_ROM: SECTION
NVOPT DC.B %00000010 ; backdoor enable, redirection enable, (un)secured flash [last 10]
But I put it back to how it was and it didn't help anything. I'm going to keep messing with it trying to get it to work. Any suggestions on a solution would be good. What does FDIV need to be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17F8 FF FF FF FF FF FF FF FF
1800 00 00 D3 00 12 00 80 02
1808 00 1C 00 00 00 00 00 00
1810 00 00 00 00 pp pp 00 00
1818 00 00 00 00 00 00 00 00
1820 00 02 00 00 80 C0 00 00
1828 00 00 00 00 FF FF FF FF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Calibration break pulse sent. Count: 30"
Then if I power it off and back on at this point it returns
"Can't read MCU info. Could be protocol error.
(Or forgot to set single wire mode?)"
I'm not sure if anyone else has used the code, but that is as far as I get after about 6 tries. I run it in Command Prompt so the window doesn't close.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CLR SCC3 ; OPTIONAL DELAY - if your RS232 hardware is lazy, uncomment following delay ; lazy means that probably RS232 receiver is not still ready to receive ACK from PC ; CLRX ;DLY2: CLRA ;DLY1: NOP ; DBNZA DLY1 ; DBNZX DLY2 LDA SCS1 MOV #ACK,SCDR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But I tried enabling the delay, but it behaved the same as previously. I'm grateful for the help. Any other suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use a USB/RS232 converter.
I have tried running the bootloader on Win 98 using a regular RS232 serial port, but received the same results.
The board hardware uses a ICL3221 for the RS232 driver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set for 9600baud
At power up the reset line begins to climb, but is pulled low then released high. This should simply be the low voltage protection.
Just after power up
The Transmit line (from microprocessor to PC) sends a 336us pulse - I believe this is the 0xFC
After 1.920ms the Receive line (from PC to uP) sends a 316us pulse then it seems to be stuck
The Reset line stays high
The code gets stuck in "Calibration break pulse sent. Count: xx" the count simply increments.
The Transmit line (from microprocessor to PC) sits at 0 Volts
The Receive line (from PC to uP) is at -8 Volts and will cause a 1ms pulse that causes the uP to reset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- power up the device
- press RESET button (and do not release it)
- start hc08sprg.exe
- release RESET button
This way the level shifters should be functional once the MCU starts executing bootloader code.
Regards, Pavel ok2ucx, Freescale CZ
P.S. You've indicated that the transmit line (from MCU to PC) stays at 0V. This is illegal RS232 level, which should be below -3V for log. "1" and above 3V for log. "0", if I remember well. Anything else may not be interpreted correctly.
Please, double check your RS232 level shifter if it's working properly.
P.S.2: I also don't understand this "The Receive line (from PC to uP) is at -8 Volts and will cause a 1ms pulse that causes the uP to reset." - no RS232 signal cannot and will not reset the MCU (directly). -8V level (from PC) will be translated to log. "1" (3V) level
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been tring to get work the bootloader in a GT16A 32-Pin QFN Package
i used the Mar-14-2008 slfprg-s08gbgt.asm code update and open the hc08sprg.exe, initially
the message that I get is:"received 0xF8 not 0xFC", then i change the rate
to 7200, the ACK is OK but then i got:
"Can't read MCU info. Could be protocol error.
(Or forgot to set single wire mode?)"
so i would like to know first of all if a i have to edit some line in the slfprg-s08gbgt.asm
or if there is another issue.
my test aplication is just a blinking LED
thanks
by
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After examining the behavior I believe that the code is executing, but the baud rate isn't correct. I reprogrammed the unit with my software and everything behaves properly, then reloaded an2295 and used it to load my software and it appears the baudrate was changed. It just seems off to where you get strange characters displaying. I'm setting the ICG1 and ICG2 in my code, so I don't believe the bootload software would effect me. Is there another register that is changed by the an2295 software that I need to set?