Segger J-Link User Manual page 212

Hide thumbs Also See for J-Link:
Table of Contents

Advertisement

212
For JTAG
The SWD -> JTAG switching sequence is output. This also triggers a TAP reset on the
target (TAP controller goes through -> Reset -> Idle state)
The IRPre, DRPre, IRPost, DRPost parameters describe which device inside the JTAG
chain is currently selected for communication.
For SWD
The JTAG -> SWD switching sequence is output.
It is also made sure that the "overrun mode enable" bit in the SW-DP CTRL/STAT reg-
ister is cleared, as in SWD mode J-Link always assumes that overrun detection mode
is disabled.
Make sure that this bit is NOT set by accident when writing the SW-DP CTRL/STAT
register via the _CORESIGHT_ functions.
Prototype
int JLINK_CORESIGHT_Configure(const char* sConfig);
Example
if (MAIN_ActiveTIF == JLINK_TIF_JTAG) {
// Simple setup where we have TDI -> Cortex-M (4-bits IRLen) -> TDO
JLINK_CORESIGHT_Configure("IRPre=0;DRPre=0;IRPost=0;DRPost=0;IRLenDevice=4");
} else {
// For SWD, no special setup is needed, just output the switching sequence
JLINK_CORESIGHT_Configure("");
}
v = JLINK_CORESIGHT_ReadDP(JLINK_CORESIGHT_DP_REG_CTRL_STAT);
Report1("DAP-CtrlStat: " v);
// Complex setup where we have TDI -> ICEPick (6-bits IRLen) -> Cortex-M (4-bits
IRLen) -> TDO
JLINK_CORESIGHT_Configure("IRPre=0;DRPre=0;IRPost=6;DRPost=1;IRLenDevice=4;");
v = JLINK_CORESIGHT_ReadDP(JLINK_CORESIGHT_DP_REG_CTRL_STAT);
Report1("DAP-CtrlStat: " v)
Known setup parameters
Parameter
IRPre
DRPre
IRPost
DRPost
IRLenDevice
PerformTIFInit DecValue
5.11.2.20JLINK_CORESIGHT_ReadAP()
Description
Reads a specific AP register.
For JTAG, makes sure that AP is selected automatically.
Makes sure that actual data is returned, meaning for register read-accesses which
usually only return data on the second access, this function performs this automati-
cally, so the user will always see valid data.
J-Link / J-Trace (UM08001)
CHAPTER 5
Type
DecValue
Sum of IRLen of all JTAG devices in the JTAG chain,
closer to TDO than the actual one J-Link shall commu-
nicate with.
DecValue
Number of JTAG devices in the JTAG chain, closer to
TDO than the actual one, J-Link shall communicate
with.
DecValue
Sum of IRLen of all JTAG devices in the JTAG chain, fol-
lowing the actual one, J-Link shall communicate with.
DecValue
Number of JTAG devices in the JTAG chain, following
the actual one, J-Link shall communicate with.
DecValue
IRLen of the actual device, J-Link shall communicate
with.
0: Do not output switching sequence etc. once
JLINK_CORESIGHT_Configure() completes.
Working with J-Link and J-Trace
Explanation
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the J-Link and is the answer not in the manual?

This manual is also suitable for:

J-trace

Table of Contents

Save PDF