Using S08QD4 BDM Pin as TPM2 Output Compare Function

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

Using S08QD4 BDM Pin as TPM2 Output Compare Function

ソリューションへジャンプ
806件の閲覧回数
GaugeGuy
Contributor I

Hi all,

 

I have never done this, and do not see much information about using the BDM pin as a TPM2 Output Capture Function.

I see that the SOPT1 is a write once register. I am using the P&E BDM Interface to program the MCU. So my question is:

What is the proper sequence to disable the BDM pin and enable the TPM2 Ouput Compare?

 

My thought is that one running in code, I would disable the BDM Pin, but the SOPT1 Register has already been written to in the MCU_Init function. (Using CW Device Intializer)

 

If I disable the BDM pin initially, will I then not be able to reprogram the device?

 

Any assistance is appreciated!

 

Thanks,

David

ラベル(1)
0 件の賞賛
返信
1 解決策
573件の閲覧回数
pgo
Senior Contributor V

David,

 

First question - I would suggest modifying the SOPT register value first in the startup code.  You may be able to delay this but the COP may also be an issue (I haven't checked the chip details).

 

Second question -

Disabling the the BDM pin will cause the debugger to lose connection to the target so debugging will obviously be unusable.

 

However,  this will happen after the programming stage so shouldn't be a problem if you are happy for a load&run style debugging.

 

The BDM interface can always regain a connection by resetting the target directly into Debug mode (holding BKGD low while doing a reset or if necessary a power-on-reset).

 

You may find that you are prompted to cycle the target power when initially connecting as some targets can only be forced into debug mode in this fashion if the BKGD pin is disabled.

 

bye

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
574件の閲覧回数
pgo
Senior Contributor V

David,

 

First question - I would suggest modifying the SOPT register value first in the startup code.  You may be able to delay this but the COP may also be an issue (I haven't checked the chip details).

 

Second question -

Disabling the the BDM pin will cause the debugger to lose connection to the target so debugging will obviously be unusable.

 

However,  this will happen after the programming stage so shouldn't be a problem if you are happy for a load&run style debugging.

 

The BDM interface can always regain a connection by resetting the target directly into Debug mode (holding BKGD low while doing a reset or if necessary a power-on-reset).

 

You may find that you are prompted to cycle the target power when initially connecting as some targets can only be forced into debug mode in this fashion if the BKGD pin is disabled.

 

bye

0 件の賞賛
返信
573件の閲覧回数
GaugeGuy
Contributor I

Thanks pgo!

 

I have my new PCB with the S08QD4 and it works as you posted.

 

Now I am off to working with some PDP code using the TPM2 in OC mode.

I have some questions that I will post in a new thread.

 

Thanks,

David

0 件の賞賛
返信