MCU detecting if an SWD programmer is attached

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

MCU detecting if an SWD programmer is attached

ソリューションへジャンプ
2,303件の閲覧回数
plong44
Contributor II

I am trying to find a way for the LPC55S69 to determine if an SWD programmer is connected to it. I want to avoid some sleep modes and other things when the programmer is attached.

The MCULink pulls SWCLK high (and the LPC's pin is pulled low internally) but unfortunately the JLINK programmers (at least the one I have) do not pull SWCLK high normally, it drives the line high only when clocking. Is there a registers in the LPC55S69 that might give me a some indication of whether or not a programmer is attached? I have been looking but I haven't found anything yet.

Thanks in advance for any help!  

ラベル(1)
0 件の賞賛
返信
1 解決策
2,295件の閲覧回数
carstengroen
Senior Contributor II

Check DHCSR register. Bit 0 is '1' if device is running under debug control. I use that in my designs to disable powerdown etc.

Page 1535 in: https://developer.arm.com/documentation/ddi0553/br/

 

carstengroen_0-1645519811788.png

 

元の投稿で解決策を見る

2 返答(返信)
2,296件の閲覧回数
carstengroen
Senior Contributor II

Check DHCSR register. Bit 0 is '1' if device is running under debug control. I use that in my designs to disable powerdown etc.

Page 1535 in: https://developer.arm.com/documentation/ddi0553/br/

 

carstengroen_0-1645519811788.png

 

2,286件の閲覧回数
plong44
Contributor II

Thanks, that works!

0 件の賞賛
返信