硬汉嵌入式论坛

 找回密码
 立即注册
查看: 3893|回复: 17
收起左侧

[脱机烧录] 带看门狗或进入低功耗的程序再次烧录失败问题【已解决】

  [复制链接]

747

主题

1049

回帖

3295

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3295
发表于 2020-6-20 18:46:59 | 显示全部楼层 |阅读模式
客户反映烧录失败问题,如果已烧写带看门狗的程序,则会烧录失败。
问题现象描述:
1、如果不接硬件RESET口线,J-LINK可以烧录,但是ST-LINK无法识别到芯片。H7-TOOL可以识别但是无法正常烧录
2、如果接了硬件RESET口线。J-LINK和ST-LINK均可以烧录。H7-TOOL启用硬件复位模式,部分芯片比如STM32F103可以烧录,STM32F407不能烧录。
3、如果芯片是空的或者已有程序但是没启用看门狗,H7-TOOL无论软件复位还是硬件复位模式,都可以正常烧录。
4、分析ST提供的FLM算法文件, 在擦除、编程、校验函数中均有喂狗指令。执行FLM的init初始化函数时,如果ption bytes启用了硬件看门狗,则修改看门狗时钟分频
    让CPU看门狗周期为最大。因为硬件看门狗不掉电复位是关闭不了的。缺省是软件看门狗,复位后会关闭。

这几天我将分析下J-LINK的处理机制。特别是SWD接口初始化部分,最好能自动尝试两种复位机制。
回复

使用道具 举报

2

主题

76

回帖

82

积分

初级会员

积分
82
发表于 2020-6-20 20:47:19 | 显示全部楼层
记得 swd可以让mcu hlod住  不运行
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106997
QQ
发表于 2020-6-20 21:06:32 | 显示全部楼层
STM32的独立看门狗和窗口看门狗停止计数有个寄存器的,这个是专门给调试准备的,就怕用户的应用程序有开独立看门狗,专门准备的这个,所有STM32系列貌似都有。
看看能不能派上用场:

1.jpg
回复

使用道具 举报

36

主题

2040

回帖

2148

积分

至尊会员

积分
2148
发表于 2020-6-21 09:46:18 | 显示全部楼层
TOOL可以自己轮番测试硬件或者软件复位非常有意义,提升TOOL自动化效率,用户就不需要为复位问题操心了。
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.
回复

使用道具 举报

747

主题

1049

回帖

3295

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3295
 楼主| 发表于 2020-6-21 22:45:28 | 显示全部楼层
再次确认了下板子状态和问题现象:
1、STM32F407目标板无硬件RESET,未设置读保护。启用了看门狗(不清楚是独立看门狗还是窗口看门狗)。
2、ST-LINK无法应对无硬件RESET的情况,但是加上硬件RESET就可以成功连接。
3、J-LINK不用硬件复位也可以成功连接。

为此抓取了J-LINK Connect STM32F407的波形,解码数据如下:

Time        Type        R/W        AP/DP        Register        Request byte        ACK        WData        WData details
-0.00        Line reset                                                        
0.00        Line reset                                                        
0.00        Line reset                                                        
0.00        Operation        read        DebugPort        IDCODE        0xA5        OK        0x2BA01477        DESIGNER=0x477, PARTNO=0xBA01, Version=0x2
0.00        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.00        Operation        write        DebugPort        CTRL/STAT        0xA9        OK        0x50000000        CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.00        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.00        Operation        write        DebugPort        CTRL/STAT        0xA9        OK        0x50000000        CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.00        Operation        read        DebugPort        CTRL/STAT        0x8D        OK        0xF0000000        CSYSPWRUPACK=1, CSYSPWRUPREQ=1, CDBGPWRUPACK=1, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.00        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.00        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED00        
0.00        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.00        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x410FC241        
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE0042004        
0.00        Operation        read        AccessPort        DRW        0x9F        OK        0x410FC241        
0.00        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE0042004        
0.00        Operation        write        AccessPort        DRW        0xBB        OK        0x00000007        
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE0042008        
0.00        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.00        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE0042008        
0.00        Operation        write        AccessPort        DRW        0xBB        OK        0x00001800        
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.00        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.00        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x03010000        
0.00        Operation        write        AccessPort        TAR        0x8B        OK        0xE0042000        
0.00        Operation        read        AccessPort        DRW        0x9F        OK        0x03010000        
0.00        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x100F6413        
0.01        Operation        write        AccessPort        TAR        0x8B        OK        0x40023C14        
0.01        Operation        read        AccessPort        DRW        0x9F        OK        0x100F6413        
0.01        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x0FFFAAED        
0.01        Line reset                                                        
0.01        Line reset                                                        
0.01        Line reset                                                        
0.01        Operation        read        DebugPort        IDCODE        0xA5        OK        0x2BA01477        DESIGNER=0x477, PARTNO=0xBA01, Version=0x2
0.01        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.01        Operation        write        DebugPort        CTRL/STAT        0xA9        OK        0x50000000        CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.01        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.01        Operation        write        DebugPort        CTRL/STAT        0xA9        OK        0x50000000        CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.01        Operation        read        DebugPort        CTRL/STAT        0x8D        OK        0xF0000040        CSYSPWRUPACK=1, CSYSPWRUPREQ=1, CDBGPWRUPACK=1, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=1, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.01        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.01        Operation        write        DebugPort        SELECT        0xB1        OK        0x000000F0        APSEL=0x00, APBANKSEL=0xF, PRESCALER=0x0
0.01        Operation        read        AccessPort        IDR        0x9F        OK        0x0FFFAAED        Revision=0x0, JEP-106 continuation=0xF, JEP-106 identity=0x7F, Class=This AP is a Memory Acces Port, AP Identfication=0xED
0.01        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x24770011        
0.01        Operation        write        DebugPort        SELECT        0xB1        OK        0x010000F0        APSEL=0x01, APBANKSEL=0xF, PRESCALER=0x0
0.01        Operation        read        AccessPort        IDR        0x9F        OK        0x24770011        Revision=0x2, JEP-106 continuation=0x4, JEP-106 identity=0x3B, Class=This AP is a Memory Acces Port, AP Identfication=0x11
0.01        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.01        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.01        Operation        write        DebugPort        SELECT        0xB1        OK        0x000000F0        APSEL=0x00, APBANKSEL=0xF, PRESCALER=0x0
0.01        Operation        write        DebugPort        SELECT        0xB1        OK        0x000000F0        APSEL=0x00, APBANKSEL=0xF, PRESCALER=0x0
0.02        Operation        read        AccessPort        BASE        0xB7        OK        0x00000000        BASEADDR=0x00000, Format=0, Entry present=No debug entry present
0.02        Operation        read        AccessPort        BASE        0xB7        OK        0xE00FF003        BASEADDR=0xE00FF, Format=1, Entry present=Debug entry present
0.02        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.02        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.02        Operation        write        AccessPort        CSW        0xA3        OK        0x23000002        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Auto-increment off, Size=Word (32 bits)
0.02        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED00        
0.02        Operation        read        AccessPort        DRW        0x9F        OK        0xE00FF003        
0.02        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x410FC241        
0.02        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.02        Operation        write        AccessPort        CSW        0xA3        OK        0x23000002        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Auto-increment off, Size=Word (32 bits)
0.02        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED0C        
0.02        Operation        read        AccessPort        DRW        0x9F        OK        0x410FC241        
0.02        Operation        read        DebugPort        RDBUFF        0xBD        OK        0xFA050000        
0.12        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.12        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.12        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.12        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.12        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.12        Operation        read        AccessPort        DRW        0x9F        OK        0xFA050000        
0.12        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x01010000        
0.12        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.12        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.12        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.12        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.12        Operation        write        AccessPort        DRW        0xBB        OK        0xA05F0001        
0.12        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x01010000        
0.12        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.12        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.12        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.12        Operation        write        AccessPort        TAR        0x8B        OK        0xE0002000        
0.12        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.12        Operation        read        AccessPort        DRW        0x9F        OK        0x01010000        
0.12        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000260        
0.12        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.12        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.12        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.12        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDFC        
0.12        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.12        Operation        read        AccessPort        DRW        0x9F        OK        0x00000260        
0.12        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.12        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.12        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.12        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.12        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDFC        
0.12        Operation        write        AccessPort        DRW        0xBB        OK        0x01000000        
0.12        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.12        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.12        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.12        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.12        Operation        write        AccessPort        TAR        0x8B        OK        0xE0001000        
0.12        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.12        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.12        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x40000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0001000        
0.13        Operation        write        AccessPort        DRW        0xBB        OK        0x40000001        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x40000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED88        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x40000000        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00F00000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED88        
0.13        Operation        write        AccessPort        DRW        0xBB        OK        0x00F00000        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00F00000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED88        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00F00000        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00F00000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED88        
0.13        Operation        write        AccessPort        DRW        0xBB        OK        0x00F00000        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00F00000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE00FF000        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00F00000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0xFFF0F003        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0xFFF02003        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0xFFF03003        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0xFFF01003        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EFF0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0xFFF01003        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000D        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000E0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000005        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x000000B1        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EFE0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000C        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000B        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0001FF0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000D        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000E0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000005        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x000000B1        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0001FE0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000002        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000003B        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0002FF0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000D        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000E0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000005        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x000000B1        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0002FE0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000003        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000002B        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0000FF0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000D        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000E0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000005        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x000000B1        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0000FE0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000001        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B0        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000003B        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE00FF010        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0xFFF41003        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0xFFF42003        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0040FF0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000D        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000090        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000005        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x000000B1        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0040FE0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000A1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B9        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000B        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0041FF0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000D        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000090        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000005        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x000000B1        
0.13        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.13        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.13        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.13        Operation        write        AccessPort        TAR        0x8B        OK        0xE0041FE0        
0.13        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B1        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x00000025        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x000000B9        
0.13        Operation        read        AccessPort        DRW        0x9F        OK        0x0000000B        
0.13        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.14        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.14        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.14        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.14        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.14        Operation        write        AccessPort        DRW        0xBB        OK        0xA05F0003        
0.14        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.14        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.14        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.14        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.14        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDFC        
0.14        Operation        write        AccessPort        DRW        0xBB        OK        0x01000001        
0.14        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.14        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.14        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.14        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.14        Operation        write        AccessPort        CSW        0xA3        OK        0x23000002        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Auto-increment off, Size=Word (32 bits)
0.14        Operation        write        AccessPort        TAR        0x8B        OK        0xE000ED0C        
0.14        Operation        write        AccessPort        DRW        0xBB        OK        0x05FA0004        
0.14        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.19        Operation        write        DebugPort        CTRL/STAT        0xA9        OK        0xF0000000        CSYSPWRUPACK=1, CSYSPWRUPREQ=1, CDBGPWRUPACK=1, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.19        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.19        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.19        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.19        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.19        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.19        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.19        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x02030003        
0.19        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.19        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.19        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.19        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.19        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.19        Operation        read        AccessPort        DRW        0x9F        OK        0x02030003        
0.19        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00030003        
0.19        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.19        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.19        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.19        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.19        Operation        write        AccessPort        DRW        0xBB        OK        0xA05F0003        
0.19        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00030003        
0.19        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.19        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.19        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.19        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDFC        
0.19        Operation        write        AccessPort        DRW        0xBB        OK        0x01000000        
0.19        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00030003        
0.20        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.20        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.20        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.20        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.20        Operation        read        AccessPort        DRW        0x9F        OK        0x00030003        
0.20        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00030003        
0.20        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.20        Operation        write        AccessPort        CSW        0xA3        OK        0x23000002        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Auto-increment off, Size=Word (32 bits)
0.20        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.20        Operation        write        DebugPort        SELECT        0xB1        WAIT               
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000010        APSEL=0x00, APBANKSEL=0x1, PRESCALER=0x0
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.20        Operation        write        AccessPort        CSW        0xA3        OK        0x23000002        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Auto-increment off, Size=Word (32 bits)
0.20        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDF0        
0.20        Operation        write        DebugPort        SELECT        0xB1        WAIT               
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000010        APSEL=0x00, APBANKSEL=0x1, PRESCALER=0x0
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000001        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000002        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000003        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000004        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000005        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000006        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000007        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000008        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000009        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x0000000A        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x0000000B        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x0000000C        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x0000000E        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0xFFFFFFFF        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x0000000F        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0xFFFFFFFF        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x08000238        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000010        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x08000238        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x01000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000011        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x01000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x20001C00        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000012        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x20001C00        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        AccessPort        BD1        0x8B        OK        0x00000014        
0.20        Operation        read        AccessPort        BD0        0x87        WAIT               
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00000000        
0.20        Operation        read        AccessPort        BD0        0x87        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00030003        
0.20        Operation        read        AccessPort        BD2        0xB7        OK        0x00000000        
0.20        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.20        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.20        Operation        write        AccessPort        TAR        0x8B        OK        0xE0002000        
0.20        Operation        write        AccessPort        DRW        0xBB        OK        0x00000003        
0.20        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x00000000        
0.20        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.20        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.20        Operation        write        AccessPort        TAR        0x8B        OK        0xE000EDFC        
0.20        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.20        Operation        read        AccessPort        DRW        0x9F        OK        0x00000000        
0.20        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x01000000        
0.20        Operation        write        DebugPort        ABORT        0x81        OK        0x0000001E        ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.20        Operation        write        DebugPort        SELECT        0xB1        OK        0x00000000        APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.20        Operation        write        AccessPort        CSW        0xA3        OK        0x23000012        DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)
0.20        Operation        write        AccessPort        TAR        0x8B        OK        0xE0001000        
0.20        Operation        read        AccessPort        DRW        0x9F        WAIT               
0.20        Operation        read        AccessPort        DRW        0x9F        OK        0x01000000        
0.20        Operation        read        DebugPort        RDBUFF        0xBD        OK        0x40000001        
0.20        Operation        read        DebugPort        IDCODE        0xA5        OK        0x2BA01477        DESIGNER=0x477, PARTNO=0xBA01, Version=0x2



回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106997
QQ
发表于 2020-6-22 01:17:21 | 显示全部楼层
5.jpg
回复

使用道具 举报

335

主题

2037

回帖

3047

积分

版主

Rank: 7Rank: 7Rank: 7

积分
3047
发表于 2020-6-22 09:33:38 | 显示全部楼层

研究的好细致啊。。。。都是专业人士用的。
调试命令接口应该是arm公司统一定义的吧?
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106997
QQ
发表于 2020-6-22 11:34:25 | 显示全部楼层
caicaptain2 发表于 2020-6-22 09:33
研究的好细致啊。。。。都是专业人士用的。
调试命令接口应该是arm公司统一定义的吧?

调试内核是ARM整的。
回复

使用道具 举报

747

主题

1049

回帖

3295

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3295
 楼主| 发表于 2020-6-23 01:32:04 | 显示全部楼层
事情反转。第3次确认。如果没有硬件RESET口线,J-Link也无法connect。
这次测试是将目标板断电并完全放电完毕再上电进行测试。前2次估计是没完全放电完毕。

通过观察RESET波形。发现关闭调试期间看门狗的语句是在RESET = 0电平期间执行。关闭了以后再释放复位口线。这样CPU才能在DEBUG状态完全关闭看门狗。

这说明了SWD烧录接口加上硬件RESET口的必要性。如果你的程序开启了看门狗或启用了低功耗停机等模式。
那么再次烧录时,可能需要硬件RESET口线参与才能再次烧录。
为啥是可能,我想如果只是开启独立看门狗并且周期很长也许没事,因为FLM算法中也有喂狗动作。
当然如果程序启用了窗口看门狗只能在特定周期内喂狗,那FLM算法中的喂狗必要导致错误的喂狗动作。

如果程序上电就进入低功耗停机模式估计对烧录也是有影响的。

回复

使用道具 举报

3

主题

163

回帖

172

积分

初级会员

积分
172
发表于 2020-6-23 08:23:50 | 显示全部楼层
armfly 发表于 2020-6-23 01:32
事情反转。第3次确认。如果没有硬件RESET口线,J-Link也无法connect。
这次测试是将目标板断电并完全放电 ...

应该就是这样的,公司的好多产品都是4线的下载口,程序内部添加了独立看门狗,超时都在1以上,所以平时下载固件没问题,但是一些低功耗的会睡眠的产品就不行了,必须短接下复位引脚才能正常下载。我记得当时我发现的一个规律是用J-flash下载的时候先连接,在执行下载就可以下载了,而不是直接F7下载。当然这个有待考证。
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106997
QQ
发表于 2020-6-23 08:30:32 | 显示全部楼层
armfly 发表于 2020-6-23 01:32
事情反转。第3次确认。如果没有硬件RESET口线,J-Link也无法connect。
这次测试是将目标板断电并完全放电 ...

如果情况是这样的话,那就有一个STLINK和JLINK无法下载时(特别是STLINK,JLINK也有,但是非常少),弹出Invalid Rom Table的解决思路,他的解决办法就是保持under reset,使用硬件复位才可以解决。
这个是MDK专门提供的一种解决思路:

http://www.keil.com/support/docs/3566.htm

5.jpg
回复

使用道具 举报

747

主题

1049

回帖

3295

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3295
 楼主| 发表于 2020-6-24 01:32:28 | 显示全部楼层
模仿J-Link的操作步骤,终于烧录成功了。虽然有些寄存器的含义还不太懂,但是不影响我完成这个功能了。
后面就是要整理代码,优化框架,将对CPU的特殊处理代码抽取到lua文件中。
因为每个CPU关停看门狗和低功耗状态开启时钟的操作方式不同。适配所有的cpu,这部分工作量太大,需要阅读芯片手册每款或每个系列的CPU手册。
几个关键点:
1、这种状态出现,只有在RESET = 0时,才能hold cpu
2、判断这种状态的方法: 读NVIC_CPUID寄存器,0值表示异常. (不知道其他CPU是否这样)
3、只有识别出这种情况后才需要进行解锁处理。如果没问题按常规流程走。

逻辑分析仪抓取的时序:
2020-06-21_22-13-20_jlink 解锁407低功耗停机和看门狗的时序_1.TXT (40.17 KB, 下载次数: 4)

人工分析如下:
Time    Type    R/W AP/DP   Register    Request byte    ACK WData   WData details
-0.00   Line reset
0.00    Line reset
0.00    Line reset
0.00    Operation   read    DebugPort   IDCODE          0xA5    OK  0x2BA01477  DESIGNER=0x477, PARTNO=0xBA01, Version=0x2   ----读ID成功
0.00    Operation   write   DebugPort   ABORT           0x81    OK  0x0000001E  ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.00    Operation   write   DebugPort   CTRL/STAT       0xA9    OK  0x50000000  CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.00    Operation   write   DebugPort   ABORT           0x81    OK  0x0000001E  ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.00    Operation   write   DebugPort   CTRL/STAT       0xA9    OK  0x50000000  CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.00    Operation   read    DebugPort   CTRL/STAT       0x8D    OK  0xF0000000  CSYSPWRUPACK=1, CSYSPWRUPREQ=1, CDBGPWRUPACK=1, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.00    Operation   write   DebugPort   SELECT          0xB1    OK  0x00000000  APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.00    Operation   write   AccessPort  CSW             0xA3    OK  0x23000012  DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)


0.00    Operation   write   AccessPort  TAR             0x8B    OK  0xE000ED00  --设置目标地址为 NVIC_CPUID寄存器
0.00    Operation   read    AccessPort  DRW             0x9F    OK  0x00000000  --哑读
0.00    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x00000000  --返回数据


--------------------------------------------------------------------------------------------------------------------------------------
                                                                                --硬件复位口线拉低 50ms, 后面一直保持为复位状态
0.05    Line reset                                                              --重新复位SWD总线
0.05    Line reset
0.05    Line reset
0.05    Operation   read    DebugPort   IDCODE          0xA5    OK  0x2BA01477  ----读ID成功  DESIGNER=0x477, PARTNO=0xBA01, Version=0x2
0.05    Operation   write   DebugPort   ABORT           0x81    OK  0x0000001E  ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.05    Operation   write   DebugPort   CTRL/STAT       0xA9    OK  0x50000000  CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.05    Operation   write   DebugPort   ABORT           0x81    OK  0x0000001E  ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0
0.05    Operation   write   DebugPort   CTRL/STAT       0xA9    OK  0x50000000  CSYSPWRUPACK=0, CSYSPWRUPREQ=1, CDBGPWRUPACK=0, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=0, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.05    Operation   read    DebugPort   CTRL/STAT       0x8D    OK  0xF0000040  CSYSPWRUPACK=1, CSYSPWRUPREQ=1, CDBGPWRUPACK=1, CDBGPWRUPREQ=1, CDBGRSTACK=0, CDBGRSTREQ=0, TRNCNT=0x000, MASKLANE=0x0, WDATAERR=0, READOK=1, STICKYERR=0, STICKYCMP=0, TRNMODE=Normal, STICKYORUN=0, ORUNDETECT=0
0.06    Operation   write   DebugPort   SELECT          0xB1    OK  0x00000000  APSEL=0x00, APBANKSEL=0x0, PRESCALER=0x0
0.06    Operation   write   AccessPort  CSW             0xA3    OK  0x23000012  DbgSwEnable=0, Prot=0x23, SPIDEN=0, Mode=0x0, TrInProg=0, DeviceEn=0, AddrInc=Increment single, Size=Word (32 bits)


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE000ED00  --设置目标地址为 NVIC_CPUID寄存器
0.06    Operation   read    AccessPort  DRW             0x9F    OK  0x00000000  --哑读(上次无效数据)
0.06    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x410FC241  --返回数据, 非0值正常


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE0042004  --读 0xE0042004 寄存器, 返回 0x00000000
0.06    Operation   read    AccessPort  DRW             0x9F    OK  0x410FC241
0.06    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x00000000


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE0042004  --写寄存器 0xE0042004 = 0x00000007, 在 DBG_STANDBY,DBG_STOP,DBG_SLEEP低功耗模式下强制开启时钟 FCLK=On, HCLK=on
0.06    Operation   write   AccessPort  DRW             0xBB    OK  0x00000007


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE0042008  --读 0xE0042008 寄存器, 返回 0x00000000
0.06    Operation   read    AccessPort  DRW             0x9F    OK  0x00000000
0.06    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x00000000


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE0042008  --写寄存器 0xE0042008 = 0x00001800, DBG_IWDG_STOP,DBG_WWDG_STOP,内核HALT时,独立看门狗和窗口看门狗计数器暂停
0.06    Operation   write   AccessPort  DRW             0xBB    OK  0x00001800


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE000EDF0  --读寄存器 DBG_HCSR = 0x02010000
0.06    Operation   read    AccessPort  DRW             0x9F    OK  0x00000000
0.06    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x02010000


0.06    Operation   write   AccessPort  TAR             0x8B    OK  0xE000EDF0  --写寄存器 DBG_HCSR = 0xA05F0001
0.07    Operation   write   AccessPort  DRW             0xBB    OK  0xA05F0001


0.07    Operation   write   AccessPort  TAR             0x8B    OK  0xE000EDFC  --读寄存器 DBG_EMCR = 0x00000000
0.07    Operation   read    AccessPort  DRW             0x9F    OK  0x02010000
0.07    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x00000000


0.07    Operation   write   AccessPort  TAR             0x8B    OK  0xE000EDFC  --写寄存器 DBG_EMCR = 0xA05F0001
0.07    Operation   write   AccessPort  DRW             0xBB    OK  0x00000001


------------------------------------------------------------------------------- 此时,RESET = 1,复位状态解除. 并延时50ms


0.12    Operation   write   AccessPort  TAR             0x8B    OK  0xE000EDF0  --读寄存器 DBG_HCSR = 0x02030003
0.12    Operation   read    AccessPort  DRW             0x9F    OK  0x00000000
0.12    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x02030003


0.12    Operation   write   AccessPort  TAR             0x8B    OK  0xE0042000  --读寄存器 0xE0042000  STM32F407 芯片型号标识 0x100F6413
0.12    Operation   read    AccessPort  DRW             0x9F    OK  0x02030003
0.12    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x100F6413


0.12    Operation   write   AccessPort  TAR             0x8B    OK  0x40023C14  --读寄存器 0x40023C14,STM32F407 的 FLASH_OPTCR寄存器,包含读保护写保护看门狗等设置
0.12    Operation   read    AccessPort  DRW             0x9F    OK  0x100F6413
0.12    Operation   read    DebugPort   RDBUFF          0xBD    OK  0x0FFFAAED


------------------------------------------------------------------------------  延迟50ms


0.17    Operation   write   AccessPort  TAR             0x8B    OK  0xE000EDFC  --写寄存器 DBG_EMCR = 0x00000000
0.17    Operation   write   AccessPort  DRW             0xBB    OK  0x00000000


------------------------------------------------------------------------------  SWD总线复位
0.18    Line reset
0.18    Line reset
0.18    Line reset
0.18    Operation   read    DebugPort   IDCODE  0xA5    OK  0x2BA01477  DESIGNER=0x477, PARTNO=0xBA01, Version=0x2
0.18    Operation   write   DebugPort   ABORT   0x81    OK  0x0000001E  ORUNERRCLR=1, WDERRCLR=1, STKERRCLR=1, STKCMPCLR=1, DAPABORT=0


后面没必要解析了,大家看附件



回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106997
QQ
发表于 2020-6-24 09:12:37 | 显示全部楼层
armfly 发表于 2020-6-24 01:32
模仿J-Link的操作步骤,终于烧录成功了。虽然有些寄存器的含义还不太懂,但是不影响我完成这个功能了。
后 ...



太强了。
回复

使用道具 举报

36

主题

2040

回帖

2148

积分

至尊会员

积分
2148
发表于 2020-6-24 10:35:21 | 显示全部楼层
很给力
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.
回复

使用道具 举报

747

主题

1049

回帖

3295

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3295
 楼主| 发表于 2020-7-2 00:36:00 | 显示全部楼层
STM32全系列冻结看门狗时钟的lua指令梳理完毕,共分5类。
--【F4 F2 F3 F7 G4 L1 L4】复位期间执行的函数. 目的:debug期间冻结看门狗时钟,低功耗模式启动HCLK和FCLK
function InitUnderReset(void)

        local value;
        local mcu_id;
        local re
        local str = "error"
        local s1

        print("InitUnderReset()")

        if (pg_write32(0xE0042004, 0x00000007) == 0) then
                goto quit_err
        end

        if (pg_write32(0xE0042008, 0x00001800) == 0) then
                goto quit_err
        end

        mcu_id = pg_read32(0xE0042000)
        if (mcu_id == 0) then
                goto quit_err
        end

::quit_ok::
        str = "OK"

::quit_err::
        print(str)

        return str
end

--【F0 G0】复位期间执行的函数. 目的:debug期间冻结看门狗时钟,低功耗模式启动HCLK和FCLK
function InitUnderReset(void)

        local value;
        local mcu_id;
        local re
        local str = "error"
        local s1

        print("InitUnderReset()")

        if (pg_write32(0x40015804, 0x00000006) == 0) then
                goto quit_err
        end

        if (pg_write32(0x40015808, 0x00001800) == 0) then
                goto quit_err
        end

        mcu_id = pg_read32(0x40015800)
        if (mcu_id == 0) then
                goto quit_err
        end

::quit_ok::
        str = "OK"

::quit_err::
        print(str)

        return str
end

--【L0】复位期间执行的函数. 目的:debug期间冻结看门狗时钟,低功耗模式启动HCLK和FCLK
function InitUnderReset(void)

        local value;
        local mcu_id;
        local re
        local str = "error"
        local s1

        print("InitUnderReset()")

        if (pg_write32(0x40015804, 0x00000007) == 0) then
                goto quit_err
        end

        if (pg_write32(0x40015808, 0x00001800) == 0) then
                goto quit_err
        end

        mcu_id = pg_read32(0x40015800)
        if (mcu_id == 0) then
                goto quit_err
        end

::quit_ok::
        str = "OK"

::quit_err::
        print(str)

        return str
end

--【F1】复位期间执行的函数. 目的:debug期间冻结看门狗时钟,低功耗模式启动HCLK和FCLK
function InitUnderReset(void)

        local value;
        local mcu_id;
        local re
        local str = "error"
        local s1

        print("InitUnderReset()")

        if (pg_write32(0xE0042004, 0x00000307) == 0) then
                goto quit_err
        end

        mcu_id = pg_read32(0xE0042000)
        if (mcu_id == 0) then
                goto quit_err
        end

::quit_ok::
        str = "OK"

::quit_err::
        print(str)

        return str
end

--【H7】复位期间执行的函数. 目的:debug期间冻结看门狗时钟,低功耗模式启动HCLK和FCLK
function InitUnderReset(void)

        local value;
        local mcu_id;
        local re
        local str = "error"
        local s1

        print("InitUnderReset()")

        if (pg_write32(0xE00E1004, 0x00000007) == 0) then
                goto quit_err
        end

        if (pg_write32(0xE00E1034, 0x00000040) == 0) then
                goto quit_err
        end

        if (pg_write32(0xE00E1054, 0x00040000) == 0) then
                goto quit_err
        end

        mcu_id = pg_read32(0xE00E1000)
        if (mcu_id == 0) then
                goto quit_err
        end

::quit_ok::
        str = "OK"

::quit_err::
        print(str)

        return str
end

回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106997
QQ
发表于 2020-7-2 09:35:52 | 显示全部楼层
armfly 发表于 2020-7-2 00:36
STM32全系列冻结看门狗时钟的lua指令梳理完毕,共分5类。
--【F4 F2 F3 F7 G4 L1 L4】复位期间执行的函数. ...

回复

使用道具 举报

82

主题

402

回帖

668

积分

金牌会员

积分
668
QQ
发表于 2020-7-2 10:09:36 | 显示全部楼层
armfly 发表于 2020-7-2 00:36
STM32全系列冻结看门狗时钟的lua指令梳理完毕,共分5类。
--【F4 F2 F3 F7 G4 L1 L4】复位期间执行的函数. ...

大佬 太厉害了
武汉天纵鹏元科技有限公司。承接嵌入式项目开发,相关技术交流。STM32,物联网,工业控制方向。QQ  408137104
回复

使用道具 举报

747

主题

1049

回帖

3295

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3295
 楼主| 发表于 2020-7-5 01:40:33 | 显示全部楼层
function InitUnderReset(void)

        local value;
        local mcu_id;
        local re
        local str = "error"
        local s1

        print("InitUnderReset()")

        if (pg_write32(0xE0042004, 0x00000307) == 0) then
                goto quit_err
        end

        mcu_id = pg_read32(0xE0042000)
        if (mcu_id == 0) then
                goto quit_err
        end


::quit_ok::
        str = "OK"

::quit_err::
        print(str)

        return str
end

本想简化下 InitUnderReset()函数,只写寄存器,不读寄存器,因为读寄存器需要区分单路模式和4路模式。等我将全部的芯片lua脚本都修改完毕,测试发现写入成功,但是后续的代码会执行异常。原因未知。

于是脚本变得复杂了,这样子的:
--【F4 F2 F3 F7 G4 L1 L4】复位期间执行的函数. 目的:debug期间冻结看门狗时钟,低功耗模式启动HCLK和FCLK
function InitUnderReset(void)
        local str = "error"


        print("InitUnderReset()")


        if (pg_write32(0xE0042004, 0x00000007) == 0) then
                goto quit_err
        end


        if (pg_write32(0xE0042008, 0x00001800) == 0) then
                goto quit_err
        end


        if (ReadDeviceID() ~= 0) then
                goto quit_err
        end


::quit_ok::
        str = "OK"


::quit_err::
        print(str)


        return str
end


--读芯片ID
function ReadDeviceID(void)
        local str
        local err = 0


        g_DevID1 = 0
        g_DevID2 = 0
        g_DevID3 = 0
        g_DevID4 = 0


        if (MULTI_MODE == 0) then
                g_DevID1 = pg_read32(0xE0042000)
                if (g_DevID1 > 0) then


                else
                        err = 1
                end
                str = string.format("..DeviceID = %08X", g_DevID1)
                print(str)
        else
                g_DevID1,g_DevID2,g_DevID3,g_DevID4 = pg_read32(0xE0042000)
                if ((MULTI_MODE == 1 and g_DevID1 > 0) or
                        (MULTI_MODE == 2 and g_DevID1 > 0 and g_DevID2 > 0) or
                        (MULTI_MODE == 3 and g_DevID1 > 0 and g_DevID2 > 0 and g_DevID3 > 0) or
                        (MULTI_MODE == 4 and g_DevID1 > 0 and g_DevID2 > 0 and g_DevID3 > 0 and g_DevID4 > 0)) then


                else
                        err = 1
                end
                str = string.format("..DeviceID = %08X %08X %08X %08X", g_DevID1, g_DevID2, g_DevID3, g_DevID4)
                print(str)
        end
        return err
end









回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-14 05:20 , Processed in 0.236399 second(s), 28 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表