FLASH Protection Technique Not Usable
The bootloader uses a FLASH block protection technique to protect itself from being overwritten, therefore this feature is not available for the user code. This includes FLASH memory security related registers (namely NVPROT, NVOPT, and NVBACKKEY), which are used for protection and interrupt vector relocation by bootloader.
Basically all Flash above 0xFDBF is occupied by Bootloader. No user code should be present above this address, just except interrupt vectors that are automagically redirected to 0xFDC0-0xFDFF area.
That also explains why bootloader complains about NVOPT and NVPROT memory locations. And it always will. Actually nothing wrong happens, these Flash memory locations are protected and cannot be overwritten. And your values are simply ignored.
Regards, Pavel, ok2ucx
P.S. AN2295 rev. 8 will go officially on web these days. QG8 bootloader already included.
hey,
what is PE in "Rewrote the simple application w/o the PE and it works."
cause I am having similar problem right now
Nope,
AN2295 bootloader is an independent software and will not be programmed into shipped devices (as far as I know). Originally it has been intended as a simple help tool for developper for quick flash re-programming and it comes on a as-is basis. Some people actually use it in production allowing end user to update firmware on their own.
The Freescale devices are usually sold blank, in large volumes any user code (e.g. bootloader) can be factory programmed during the final tests. It costs some buck$ but at the end it brings some further savings during manufacturing (design of BDM interface not needed, actual programming does not need to be done, etc.).
Normally, use P&E Micro tools, TBDML, Open Source BDM or alike tools for production programming.
Regards, Pavel (ok2ucx)
Freescale Roznov
Well,
I'm using the AN2295 bootloader on a QB8 uC, but I'm not sure about the "Re"-programming part of that bootloader: It worked fine the first time I'm loading user code with that bootloader, but after that it appears that I can't get back in the "hook" to re-program another user program.
Anyone any idea on why I can't seem to re-program after I programmed my user code?
Anyway.....I also want to switch to the QG8, would love to use this bootloader (if I can make it work), but the SCI is not included in the 8 pin package, so I'll have to port the code to IIC on the uC, use a SCI-IIC bridge (e.g. a uC with both interfaces like the GB60A). This way, the PC won't know about the different interface, the GB60A is bridging data from the IIC and SCI, I just have to work on the IIC.
Btw: I got a message from Freescale support stating that they won't have the porting to 8 pin QG8 until May 2006.
buxi
Hi,
re-programming should definitely work, it's a main feature. If initial hook won't occur once there's some code already in the MCU, it may be caused by RS232 level shifters not properly working fast enough after power-on. Then PC won't see initial ACK from the micro.
To confirm this, try to use RESET pin of QB8 (if enabled) or power RS232 shifters from separate supply (dirty way is to short-connect MCU Vdd for a short while).
For 8-pin QG8, porting code to IIC would be a huge effort instead of adding software SCI functionality (that was me promissing doing it in May ; ). Similar way like on QT/QY family. Once this alpha software is available, I'll let the forum know.
Regards,
Pavel, ok2ucx
Freescale Roznov, AN2295 author
Hi,
I've just finished alpha version of software SCI bootloader for S08QG family. It has been briefly tested using demo board. Works up to 57600Bd. I haven't tested a single wire feature since I have no hardware setup quickly available.
Please find the source files in freegeeks download section:
http://www.freegeeks.net/modules.php?name=Downloads&d_op=viewdownload&cid=1#cat
All comments please via personal messages.
Nice weekend,
Pavel, ok2ucx
Freescale Roznov p.R., CZ
AN2295 bootloader developer
Hi guys,
just for convenience I've attached both versions of S08QG bootloaders here before they go officially into AN2295SW. Note that both versions of QG8 bootloaders are in alpha version, any bugs should be reported to me (preferrably via personal message). Thanks.
'Standard' version uses hardware SCI module, second emulates SCI using software (good for 8-pin device and/or if you want to use another pin or single-wire communication).
Regards, Pavel ok2ucx
Developer of AN2295 HC(S)08 Developer's Bootloader
hc08sprg-s08qg-alpha1-bootloaders.zip
Hello, do you know if there is available the single wire bootloader for 9S08QGx via hardware SCI!?!
I've only found the software version, while the hw one is available for other 9S08's
Regards
Paolo
Hi Marco,
Why are you going to so much trouble to avoid using a BDM based solution?
To me the only reasons for using a serial bootloader are:
1: You can't afford a BDM based device.
2: You want to enable field upgrades with just a serial cable (presuming the user in the future can find a serial port!)
I can see no reason to bother to build a piece of hardware to avoid the BDM solution.
You could build the OSBDM.
BR Peg