# Identify JTAG device in S/W?

**URL:** <https://forums.digi.com/t/identify-jtag-device-in-s-w/3621>\
**Category:** NET+OS\
**Tags:** jtag\
**Created:** [April 8, 2009, 9:57am UTC](https://forums.digi.com/t/identify-jtag-device-in-s-w/3621 "2009-04-08T09:57:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steved1](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@steved1](https://forums.digi.com/u/steved1)\
**Post date:** [April 8, 2009, 9:57am UTC](https://forums.digi.com/t/identify-jtag-device-in-s-w/3621/1 "2009-04-08T09:57:37Z")

</div>

Is there a way to determine whether the code’s running on a JTAG-enabled or a ‘regular’ ME/ME9210?

(I’m talking about when running the code from flash in a standalone situation, not during debugging)

---

<div class="post-metadata">

**Author:** ![sbrown](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sbrown](https://forums.digi.com/u/sbrown)\
**Post date:** [April 10, 2009, 3:12pm UTC](https://forums.digi.com/t/identify-jtag-device-in-s-w/3621/2 "2009-04-10T15:12:26Z")

</div>

The following API call may help you out. The function, are\_we\_in\_debugger, located in netos7X/src/bsp/init/armX/NCC\_INIT.c returns a Boolean indicating if a debugger is present or not. More information on this function can be found in the API reference guide under the Miscellaneous category.

Declaration  
BOOLEAN are\_we\_in\_debugger (void);  
Return values  
Value Description  
0 No debugger detected  
1 Debugger detected

---

<div class="post-metadata">

**Author:** ![steved1](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@steved1](https://forums.digi.com/u/steved1)\
**Post date:** [April 14, 2009, 7:38am UTC](https://forums.digi.com/t/identify-jtag-device-in-s-w/3621/3 "2009-04-14T07:38:17Z")

</div>

Thanks for that, but not quite what I’m looking for. I want to tell whether or not I’m running on the JTAG hardware platform, even with the JTAG emulator not connected (so that I can enable/disable use of the second serial port)
