BKGD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hoe to use this pin as GPIO pin in MC9S08QE8 microcontroller.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then How it is possible to code in the controller while using the BKGD Pin as output .
Since i want to do code from it and also want to use it as GPO after code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Debugger is not available while BKGDPE is 0. You need to debug required pin function perhaps on another pin, on device having spare pins, or just being careful about coding. For debugging the rest of your code you need to use some define to avoid clearing BKGDPE. Yes, it's not very comfortable, but you win extra output pin. On S12 devices there's a MODE register, which helps detecting are you using debugger or not. I don't see such feature on QE8, you need to recompile you code for debug with BKGDPE=1.
BTW you should not load BKGD pin with external pull down load. On power up until you clear BKGDPE this pin still functions as MS/BKGD. Having it pulled low MCU won't start and keep waiting for BDM commands.
Edward
Edit: fixed BKGDPE, 0 - GPO, 1 - BKGD

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you got the states backwards. BKGDPE=1 means enable the BDM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tony, thanks, you are right, I reversed states, not something I would have to use a lot.
Edward
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Than How can I use the BKGD pin in both work.
I want that this pin can be used as GPO after programming and when i need to program again than i can able to use it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Abhishek,
When not able to connect debugger should ask you to cycle power of your device. Before asking to cycle power debugger should pull BKGD low, when you power up your device again MCU will detect background mode request (BKGD/MS=0 at power on) and won't run you code but wait instead for BDM commands. See 2.2.4 in QE8 reference manual.
Edward

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GPO, output only. Did you search through QE8 reference manual? See SOPT1 register. Please note that SOPT1 bits are write once, which means all SOPT1 bits have to be setup simultaneously in same write access.
Edward
