这两天给开发板焊接了排针,准备跑一下ADCdemo;
下载ME32F103系列\me32f103 sdk 20220311\me32f103 sdk\me32f103 lib 20220110\demo adc btimer0 trigger这个程序后,芯片无法下载程序,报错
网上说是调试端口被占用。用Jflash可以恢复。试了没用
依旧是无法连接。
用ISP工具也无法烧录
换了个芯片OK可以正常下载。
跑了demo adc measure vdd ,电压在3354-3378之间。
跑了demo adc software trigger,在PC2脚上加1.49V电压,采集值在3000左右,
跑了demo adc btimer trigger,在PC2脚上加1.49V电压,采集值在1800左右.基本可以。
再次下载demo adc btimer0 trigger。
再次报错:
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
唉,有没有高手指点一下,突然想起来不是还有boot模式,试试boot模式下是否可以恢复调试功能,短接boot脚,重新上电,OK可以下载了。
打开了这个注释又报错
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: DPIDR: 0x2BA01477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x24770011)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x412FC231. Implementer code: 0x41 (ARM)
* JLink Info: Found Cortex-M3 r2p1, Little endian.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB000 SCS
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
* JLink Info: Reset: SYSRESETREQ has confused core.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: Reset: Using fallback: VECTRESET.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.VECTRESET.
* JLink Info: Reset: VECTRESET has confused core.
* JLink Info: Reset: Using fallback: Reset pin.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via reset pin
* JLink Info: Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
* JLink Info: Reset: Reconnecting and manually halting CPU.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: CPU could not be halted
* JLink Info: Reset: Core did not halt after reset, trying to disable WDT.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via reset pin
* JLink Info: Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
* JLink Info: Reset: Reconnecting and manually halting CPU.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: CPU could not be halted
* JLink Info: Reset: Failed. Toggling reset pin and trying reset strategy again.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
* JLink Info: Reset: SYSRESETREQ has confused core.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: Reset: Using fallback: VECTRESET.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.VECTRESET.
* JLink Info: Reset: VECTRESET has confused core.
* JLink Info: Reset: Using fallback: Reset pin.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via reset pin
* JLink Info: Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
* JLink Info: Reset: Reconnecting and manually halting CPU.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: CPU could not be halted
* JLink Info: Reset: Core did not halt after reset, trying to disable WDT.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via reset pin
* JLink Info: Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
* JLink Info: Reset: Reconnecting and manually halting CPU.
* JLink Info: Found SW-DP with ID 0x2BA01477
* JLink Info: Failed to power up DAP
* JLink Info: CPU could not be halted
* JLink Info: CPU could not be halted
***JLink Error: Failed to halt CPU.
* JLink Info: CPU could not be halted
Error: Flash Download failed - Target DLL has been cancelled
注释掉外部晶振选项OK可以正常下载。
确认就是主时钟配置为锁相环输出频率就挂逼了。