BKGD

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

BKGD

3,230件の閲覧回数
abhishek_gupta
Contributor II

hoe to use this pin as GPIO pin in MC9S08QE8 microcontroller.

ラベル(1)
タグ(2)
7 返答(返信)

2,562件の閲覧回数
abhishek_gupta
Contributor II

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.

0 件の賞賛
返信

2,562件の閲覧回数
kef2
Senior Contributor V

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

2,562件の閲覧回数
tonyp
Senior Contributor II

I think you got the states backwards.  BKGDPE=1 means enable the BDM

0 件の賞賛
返信

2,562件の閲覧回数
kef2
Senior Contributor V

Hi Tony, thanks, you are right, I reversed states, not something I would have to use a lot.

Edward

0 件の賞賛
返信

2,562件の閲覧回数
abhishek_gupta
Contributor II

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. 

0 件の賞賛
返信

2,562件の閲覧回数
kef2
Senior Contributor V

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

0 件の賞賛
返信

2,562件の閲覧回数
kef2
Senior Contributor V

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