ARM Cortex Design Considerations for Debug

JTAG was the traditional mechanism for debug connections for ARM7/9 parts, but with the Cortex-M family, ARM introduced the Serial Wire Debug (SWD) Interface. SWD is designed to reduce the pin count required for debug from the 5 used by JTAG (including GND) down to 3. In addition, one of the pins freed up by this can be used for the low cost SWO tracing technology - for more details see the FAQ "Overview of Trace support in LPCXpresso IDE".

The SWD/SWV pins are overlaid on top of the JTAG pins as follows:

Some MCUs do not include internal pull-up or pull-down resistors on JTAG/SWD pins. You  will need to review the datasheet for the specific MCU being used to confirm. Where internal resistors are not provided, these should be added externally onto your board as detailed above. You may use resistors between 10K and 100K for these signals. This will prevent the signals from floating when they are not connected to anything. Failure to do this will lead to, at best, unreliable debug connections, or more likely no ability to debug at all.

If an internal resistor is provided for a pin by the MCU, then an external resistor  is not required for that pin. But if external resistor is provided in such cases, then it must match that provided internally by the MCU.

Note for TCK/SWCLK, although a pull-down is recommended, you can alternatively use a pull-up. The main thing is that it does not float. Note in particular that if the MCU provides an internal pull-up on this signal, then adding an external pull-down on the board is not recommended.

Note that Cortex-M0/M0+ parts does not support SWV trace.

Other important debug related signals

When designing your board, you should also take the following signals into account for debug purposes. Failure to do this will lead to, at best, unreliable debug connections, or more likely no ability to debug at all.

  • RESET
    • Connect this pin to the (active low) reset input of the target MCU
    • We would strongly recommend also including RESET in addition to SWDIO, CLK and GND. For debugging, the tools may try to pull this in certain circumstances (depending upon debug probe, debug configuration settings and tools).
  • ISP
    • Most NXP MCU‘s have an ISP pin which (when pulled low) can be used to cause the MCU to enter a bootloader on reset.
    • For example on LPC17xx this is P2.10 and on LPC11xx and LPC13xx it is P0.1.
    • Always ensure that you have a 10K to 100K Ohm pull up resistor on the ISP pin, otherwise you are unlikely to be able to make a successful debug connection.
  • VTref
    • The Voltage Target Reference pin supplies some debug probes (such as LPC-Link2) with the debug rail voltage of the target to match its I/O logic level. For more information, see "Logic Levels and Ground" below.
  • RTCK, DBGSEL
    • Some NXP LPC2000 devices have special pins that enable the JTAG interface. For example, on the NXP LPC2129 the signal RTCK must be driven low during RESET to enable the JTAG interface. You may want to add jumpers to your hardware to accomplish this.

Logic Levels and Ground

VTref (the Voltage Target Reference pin, direction from target to debug probe) supplies some debug probes such as LPC-Link2 and Red Probe+ with the debug rail voltage of the target to match its I/O logic level.  VTref can be tied directly to the target VDDIO rail or through a resistor.  If VTref is tied high through a resistor, its value must be no greater than 100Ω.

The original LPC-Link1 only supported 3.3V and did not require VTref whereas the LPC-Link2 uses dual-supply buffers that allows the Link2 to work with targets using a different voltage (between 1.8V - 4.3V).

On the LPC-Link2, when JP2 is shunted this will power the target side of the dual-supply buffer and provide power to the target through a diode on VTref.  With JP2 open the target must supply the VTref to power the target side of the dual-supply buffer.

When a debug probe attempts to adjust logic levels based on the voltage it sees on VTref, this is referenced to whatever GND it has to work with. The voltage at VTref is coming from your target, thus you need a good GND, shared with your target hardware.

Note that debug probes can be killed (like most USB devices) by excessive over current through ground of the probe and back through the PC used for debugging. The usual cause of this is that your target has it‘s own PSU and has a ground differential slightly different from your debug PC. Please do not rely on your debug probe to ground your PC to the same potential as your target.

Power

Even when you have designed your debug circuit according to the above considerations, you should also check that sufficient power is being supplied to your target in order to obtain a reliable debug connection. If you are using a USB port on your PC to power your target, make sure that your PC is able to supply the required power over USB - many PC USB ports do not meet USB power requirements.

Debug Connector Pinouts

ARM has defined three debug connector pinouts that are in common use, a "traditional" 20 pin connector, a Cortex 10 pin connector and a Cortex 20 pin Debug+ETM connector...

  • This connector was originally defined for connection to ARM7/9 parts over JTAG, but is still sometimes found in Cortex-M systems (for connections over JTAG or SWD).
  • Note that RTCK (Return clock) is only used on older ARM cores (ARM7TDMI and ARM9 family) before the debug was properly decoupled from the core clock domain.
  • Dimensions of the ARM JTAG connector are 1.29" x 0.722" (33mm x 18.5mm).

  • Suitable connector headers include :
    • Harwin: M50-3500542
    • Mouser: 855-M50-3500542
    • Samtec shrouded header: FTSH-105-01-F-D-K
  • The 10-pin Samtec FTSH-105-01 connector has the dimensions: 0.25" x 0.188" (6.35mm x 4.78mm).
  • Some boards use un-shrouded 10-pin headers. Always ensure that you connect your cable correctly, typically by matching the "1" marked on the board to the red -stripe on the cable.
  • The 10-pin cable is Samtec part number FFSD-05-D-12.00.01-N

  • This small 20-pin (0.05") connector provides access to SWD, SWV, JTAG, and ETM (4-bit) signals available on Cortex-M3/M4 devices.
  • The 20-pin header (Samtec FTSH-110-01) has the dimensions: 0.50" x 0.188" (12.70mm x 4.78mm).
  • Although LPCXpresso IDE does not currently support the direct use of the ETM (Embedded Trace Macrocell), a number of boards use this form of connector as one of or as their main debug connector.
  • A special Cortex 10-pin debug -> Cortex 20-pin debug+ETM connector cable will typically be required to debug such boards.
时间: 2024-10-05 01:58:54

ARM Cortex Design Considerations for Debug的相关文章

ARM7与ARM Cortex比较

ARM7与ARM Cortex比较  1.ARM实现方法 ARM Cortex是一种基于ARM7v架构的最新ARM嵌入式内核,它采用哈佛结构,使用分离的指令和数据总线(冯诺伊曼结构下,数据和指令共用一条总 线).从本质上来说,哈佛结构在物理上更为复杂,但是处理速度明显加快.根据摩尔定理,复杂性并不是一件非常重要的事,而吞吐量的增加却极具价值. ARM公司对Cortex的定位是:向专业嵌入式市场提供低成本.低功耗的芯片.在成本和功耗方面,Cortex具有相当好的性能,ARM公司认为它特别适用于汽车

ARM Cortex M0权威指南_PDF电子书下载 带书签目录 高清完整版 http://pan.baidu.com/s/1jGKQSwY MariaDB入门很简单_PDF电子书下载 带

ARM  Cortex  M0权威指南_PDF电子书下载 带书签目录 高清完整版   http://pan.baidu.com/s/1jGKQSwY MariaDB入门很简单_PDF电子书下载 带书签目录 高清完整版  http://pan.baidu.com/s/1hqpgV20 管理就是走流程__没有规范流程,管理一切为零_PDF电子书下载 带书签目录 高清完整版  http://pan.baidu.com/s/1bntuLyf 搜索引擎优化  SEO  方法与技巧  第5版_PDF电子书下

ARM cortex a 之时钟系统1

ARM cortex a系列的时钟系统是一个非常复杂而且麻烦的东西,下面我们首先明确一些概念和东西. 本部分主要介绍一下时钟系统的初始化工作,以及里面的一些原理. S5PV210的时钟系统是一个非常麻烦的东西,首先需要时钟信号的产生,时钟发生器只有和晶振一起工作才能产生时钟信号,这两个单独使用的话是没有任何作用的. 时钟系统分为三个大域:即主系统(MSYS),显示系统(DSYS),和外围系统(PSYS). (1)MSYS域包括cortexA8处理器,DRAM内存控制器(DMC0和DMC1),3D

翻译: Clustered Index Design Considerations 聚集索引设计注意事项

原文出自:<Pro SQL Server Internals, 2nd edition>的CHAPTER 7 Designing and Tuning the Indexes中的Clustered Index Design Considerations一节(即P155~P165),Dmitri Korotkevitch,侵删 每次更改聚集索引键的值时,都会发生两件事. 首先,SQL Server将行移动到聚集索引页链和数据文件中的不同位置. 其次,它更新了row-id,它是聚集索引键. 存储的

STM32 32-bit Arm Cortex MCUs&amp;&amp;MPUS

一.STM32 32-bit Arm Cortex MCUs 二.STM32 Arm Cortex MPUs 原文地址:https://www.cnblogs.com/TonyJia/p/12677712.html

ARM cortex M3寄存器及指令集

1.cortex M3拥有通用寄存器R0-R15及一些特殊寄存器: R0‐R7 也被称为低组寄存器.所有指令都能访问它们.它们的字长全是 32 位,复位后的初始值是不可预料的. R8‐R12 也被称为高组寄存器.这是因为只有很少的 16 位 Thumb 指令能访问它们, 32位的指令则不受限制.它们也是 32 位字长,且复位后的初始值是不可预料的 . R13 是堆栈指针.在 CM3 处理器内核中共有两个堆栈指针,于是也就支持两个堆栈.当引用 R13(或写作 SP)时,你引用到的是当前正在使用的那

vxworks 7 arm cortex a15 bsp

[email protected],更多内容请关注http://user.qzone.qq.com/2692407267 今天查了半天的release note,才发现vx69对arm的支持只到a9,支持a15的只有vx7

ARM Cortex A9-工业开发板

Cortex-A9 是性能最高的 ARM 处理器,可实现受到广泛支持的 ARMv7 体系结构的丰富功能.Cortex-A9 处理器的设计旨在打造最先进的.高效率的.长度动态可变的.多指令执行超标量体系结构,提供采用乱序猜测方式执行的 8 阶段管道处理器,凭借范围广泛的消费类.网络.企业和移动应用中的前沿产品所需的功能,它可以提供史无前例的高性能和高能效. Cortex-A9 微体系结构既可用于可伸缩的多核处理器(Cortex-A9 MPCore? 多核处理器),也可用于更传统的处理器(Corte

ARM cortex a 之串口通信2

现在开始编程. 先写一个大的函数: void main(void) { uart_init(); uart_putc('a');  //发送数据 //uart_getc():  //接收数据 } 然后分别写三个小的子函数 先在宏定义中声明各个寄存器的地址,然后我们开始使用它们. #define GPA0CON 0xE0200000 #define UCON0 0xE2900004 #define ULCON0 0xE2900000 #define UMCON0 0xE290000C #defin