QG8 debugging problems with OSBDM

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

QG8 debugging problems with OSBDM

6,250 Views
jarin
Contributor I
Hello,
After successful test of OSMBDM with CW5.1 and RD16 part I ran into problems with QG8 device. First evening I spent searching why it doesn't work with QG8 at all, then I found 2K2 pull-up resistors are needed for both BKGD and RST lines (interesting it's not mentioned in datasheet, or I just can't find it - by the way, RD16 worked with schematic as in datasheet), then it finally started to work and I was able to debug and program it in application. After a few reprogramming device stopped to work as before. I captured screenshot to illustrate what happens when I press F5 and try to start debugger in OSBDM mode http://www.jednocipy.kvalitne.cz/a/bdm_problem_1.jpg On the other hand I can upload .s19 file into flash (I built just a small program to change state of port A to see some activity) selecting the properly s-record file http://www.jednocipy.kvalitne.cz/a/bdm_problem_2.jpg
Can somebody help me with this problem? Next week, when new QG8 parts arrive I'll test the new ones, but I'm afraid of getting into similar situation with them too.

Thanks,
Jarin
Tags (2)
0 Kudos
Reply
6 Replies

1,089 Views
thm59
Contributor II
Hello,

At the POR (power on), the QG8 enter in normal user mode.
In order to use the OSBDM debugger (and load the flash), the QG8 must be in active background mode, and to do that, the pin BKGD must be held low (->gnd)during power-on.
See the datasheet chapt. 3.3 and 3.4.

thierry
0 Kudos
Reply

1,089 Views
jarin
Contributor I
Hello Thierry,
thanks for your help, in fact you suggested real solution in your first post - so, maybe the fact that English is not my native language or maybe too much of work (and lack of sleep) caused the fact I didn't understand it well.
Now everything works perfectly. Shame on me, for next time I have to pay more attention to other's posts.

Thanks again
Jarin
0 Kudos
Reply

1,089 Views
thm59
Contributor II

Hello,

I have buit an OSBDM08 and it works fine with the QG8, but there is a special way to connect a QG8 because the QG8 has shared reset and bkgd pins. The procedure is as follows:

1. put a jumper between pin 1 (BDM) and pin 6 (GND) of the BDM connector of the target
2. turn the target power on
3. remove the jumper and connect the 6-pin connector of the OSBDM

To load an application, go to menu "HCS08 Open Source BDM" >> "Load" and select your "project.abs"

more detailed explanations on www.68hc08.net (sorry, in french)

thierry

0 Kudos
Reply

1,089 Views
jarin
Contributor I
I'm not using shared pins yet, those pins are directly connected to BDM POD connector (also the pull-up resistors as I wrote before).

When you look on second picture (web links included in my original post) you can see the possibility of loading project.abs is disabled in File->Load, in the same way as in HCS08 Open Source BDM -> Load (the second scenario is not documented in pictures).

I'm really confused, I just hope there is a way to get QG8 from this bizarre state.
0 Kudos
Reply

1,089 Views
peg
Senior Contributor IV
Hi jarin,
I'm getting "Cannot find server or DNS Error" on your link.
 
I believe you have missunderstood Thierry, he is referring to the fact that the reset pin has shared functions INSIDE the device, not on your board.
 
This leads to the problem that a QG has no reset pin out of reset and so a BDM pod can't try and use it to reset the processor into Active BDM mode. This is why he is forcing it directly on power up.
 
Regards
Peg
 
0 Kudos
Reply

1,089 Views
jarin
Contributor I
Peg, try it here and here
I understand that RESET and BKGD pin is shared, it means it can be used also as general I/O pin or whatever function belongs to it. But I think it's default state after reset can be changed in SOPT1 register and I don't change this register. And more, it's only RAM register, written by user firmware after entering normal execution mode, and not in BDM mode.
Maybe I'm wrong in my assumptions so please correct me.

How could I prevent QG8 from entering BDM mode?


My code looks like this, but I don't think there could be something wrong.

void main(void) {
PTADD_PTADD0=1;
for(;:smileywink: {
PTAD_PTAD0=~PTAD_PTAD0;
WaitNms(200);
}
}

Function WaitNms() just waits a number of millisecons.
0 Kudos
Reply