908QB8

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

908QB8

7,265 Views
milan_madzarac
Contributor I

Hi,
I download the program to the 908QB8 using Codewarrior 5.0 in monitor mode.
When I try to reprogram it using monitor mode again it can not connect anymore.
Am I erasing the monitor code and how to setup the code in Codewarrior
to avoid erasing the monitor?
Thank you,
Milan

 

Labels (1)
0 Kudos
Reply
10 Replies

1,433 Views
alex_spotw
Contributor III
Hi:

Are you using a BDM programmer?
If so, the BDM will erase the Monitor program.

Regards,

Alex
0 Kudos
Reply

1,433 Views
Alban
Senior Contributor II
Hi,

QB8 is a member of the HC08 family and not of the HCS08 or S08.
It does not feature a BDM = Background Debug Module.

MC68HC908QB8 uses MON08 = Monitor Mode to communicate with an host, a simple level translation is enough to plug it to RS232.

The MON08 software is in ROm and therefore cannot be deleted by anyone.

What probably happens is that when the part is new, you enter the FORCED Monitor Mode because the Reset vector is empty/erased = 0xFF.
Once you programmed your software the reset vector is expected to be different to 0xFF and should include the lower part of the startup address. You need to enter NORMAL Monitor Mode.
The second is not 'forced' because not automatic, you need to apply certain level to certain pins to tell the MCU which mode you want. The Developpment Support of the datasheet explains the Monitor Mode Entry.

Cheers,
Alban.
0 Kudos
Reply

1,433 Views
milan_madzarac
Contributor I

Hi Guys,
That was fast response.

alex_spotw I am using the monitor mode not BDM.

Alban I understand now completely what is happening and
where I have to do the fix.

This forum looks like works very good.

Thank you, both for the fast response.
Thank you, Alban for solving my problem.

Best regards, to all.

Milan


 

0 Kudos
Reply

1,433 Views
rhinoceroshead
Contributor I
I think the 'forced' monitor entry that Alban is speaking of is intended to be used in the factory for programming a brand new blank device that is fixed to a PC board with all of the pins already connected for the intended application.  It usually uses only one pin to communicate serially to the programmer and one pin to set the mode.  I think the idea is that there will be jumpers on the PC board or pullup/down resistors to set the mode when the device is being programmed and after that it will go into user mode since the startup vector will no longer be blank.  There is another way to go into the monitor mode when the device has already been programmed, but you have to use a specific clock, and there are more pins that get used to tell the monitor software what type of clock is being supplied, whether to disable the COP, etc.
 
When I program the HC08 devices, I usually comment out the startup vector in the .prm file so that I can use more of the pins for debugging.  Then when I think I have everything just right, I'll uncomment the startup vector and do a final test in user mode.  If I need to change something after that, I'll put the microcontroller into a separate board with the extra pins already set to go into monitor mode and then I'll erase the flash back to all 0xFF - which then makes it work again in the original setup, just as if the microcontroller is brand new.  The BDM setup on the HC(S)12 and the HCS08 devices is far superior, but the HC08 DIP devices are handy if you want to build things on a breadboard and you don't want to buy/build a development board.
0 Kudos
Reply

1,433 Views
kevin
Contributor I
Rather than move the processor to another pcb, why not write a software routine to erase the flash and set the reset vector back to 0xFF based on a serial command or I/O condition.  Then repeat entry using forced monitor mode.
0 Kudos
Reply

1,433 Views
rhinoceroshead
Contributor I
I suppose you could configure an interrupt that would erase the startup vector.  But, you'd have to give up a pin (IRQ, SCI, or KWI) in order to do that.  The only reason I like the 'forced' monitor mode is because it leaves all but two pins open for the application being tested.
0 Kudos
Reply

1,433 Views
peg
Senior Contributor IV

Hi all,

Refer to AN-HK-32 for implementing the scheme proposed by Kevin which I have used a variation of successfully for many years. With some planning you don't need to burn any pins.

BR Peg

 

0 Kudos
Reply

1,433 Views
rhinoceroshead
Contributor I
AN-HK-32...  This is pretty slick!  This way you don't lose any pins, and you get a gauranteed blank microcontroller after testing in user mode.  The only cost is that it uses a small amount of Flash (which isn't a big deal on the GP32).  Of course, if you want to step through the program and look at registers, you still need to sacrifice PTA0 and PTA7, but I was doing that anyway.  Why is this application note not listed on the GP32 page?
 
Thanks for the tip!  This will save lots of time.
0 Kudos
Reply

1,433 Views
Alban
Senior Contributor II

Hi Rhino,

I submitted your utmost pertinent remark to FSL Technical Publications.
AN-HK-32
In-Circuit Programming of FLASH Memory in the MC68HC908GP32will very shortly be appearing in the MC68HC908GP32 page.:smileyhappy:

Cheers,
Alban.

0 Kudos
Reply

1,433 Views
eckhard
Contributor V

Hello,

 

Iám having troble programming the QB8 too. I can Programm them, but I cant get into monitor mode twice. When I try to programm an debug them I get Error 48. If I power the MCU off and wait a long time ( lnger than 10 minutes)  I can programm it again, but next entry into monitor mode fails. So far I put them aside and use JK8 chips for now, they work fine with the same programmer.

 

Eckhard

0 Kudos
Reply