N32H762IIL调试中遇到的错误

目录

一、读/写保护错误

1、检查Jlink连接的电路

2、确认JLink正确安装

3、BOOT0电平状态确认

4、预留USART1当芯片出现读写保护时,使用官方工具解除保护接口

二、第二次碰到同类型的错误

三、出现的问题原因


一、读/写保护错误

Connecting to target via SWD

InitTarget() start

Error! Failed to prepare target CPU

Active read and/or write protected N32H7xx device detected.

This could cause problems during flash download.

Note: Unsecuring will trigger a mass erase of the internal flash.

Executing default behavior previously saved in the registry.

Device will be unsecured now.

Error! Failed to prepare target CPU

InitTarget() end - Took 2.87s

Jlink.exe中提示的错误

复制代码
Connecting to target via SWD
InitTarget() start
Error! Failed to prepare target CPU
Active read and/or write protected N32H7xx device detected.
This could cause problems during flash download.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Error! Failed to prepare target CPU
InitTarget() end - Took 2.74s
Failed to attach to CPU. Trying connect under reset.
InitTarget() start
Error! Failed to prepare target CPU
Active read and/or write protected N32H7xx device detected.
This could cause problems during flash download.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Error! Failed to prepare target CPU
InitTarget() end - Took 2.68s
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: https://kb.segger.com/J-Link_Troubleshooting

Kile 5中提示的错误

复制代码
DLL: V8.86 , compiled Nov 12 2025 12:19:42
Firmware: J-Link V9 compiled May  7 2021 16:26:12
Hardware: V9.40
S/N : 69405637 
Feature(s) : RDI, GDB, FlashDL, FlashBP, JFlash 
 
* JLink Info: InitTarget() start
* JLink Info: Error! Failed to prepare target CPU
* JLink Info: Active read and/or write protected N32H7xx device detected.
This could cause problems during flash download.
Note: Unsecuring will trigger a mass erase of the internal flash.
* JLink Info: Executing default behavior previously saved in the registry.
* JLink Info: Device will be unsecured now.
* JLink Info: Error! Failed to prepare target CPU
* JLink Info: InitTarget() end - Took 2.67s
* JLink Info: Failed to attach to CPU. Trying connect under reset.
* JLink Info: InitTarget() start
* JLink Info: Error! Failed to prepare target CPU
* JLink Info: Active read and/or write protected N32H7xx device detected.
This could cause problems during flash download.
Note: Unsecuring will trigger a mass erase of the internal flash.
* JLink Info: Executing default behavior previously saved in the registry.
* JLink Info: Device will be unsecured now.
* JLink Info: Error! Failed to prepare target CPU
* JLink Info: InitTarget() end - Took 2.71s
Error: Flash Download failed  -  Target DLL has been cancelled
Flash Load finished at 19:37:25

1、检查Jlink连接的电路

使用万用表一个个点。

2、确认JLink正确安装

官方给的文件放置正确的放置目录

3、BOOT0电平状态确认

确认BOOT0为低电平,才能在线调试程序。

flsah 用户主闪存区

AXI SRAM 是 N32H762 系列里 挂接在 AXI 总线上的一块片上静态 RAM

AXI全称 Advanced eXtensible Interface 扩展接口

4、预留USART1当芯片出现读写保护时,使用官方工具解除保护接口

二、第二次碰到同类型的错误

使用工具向falsh中烧录空程序

复制代码
Connecting to target via SWD
InitTarget() start
Error! Failed to prepare target CPU
Active read and/or write protected N32H7xx device detected.
This could cause problems during flash download.
Note: Unsecuring will trigger a mass erase of the internal flash.
Executing default behavior previously saved in the registry.
Device will be unsecured now.
Error! Failed to prepare target CPU
InitTarget() end - Took 2.55s
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011, ADDR: 0x00000000)
AP[1]: AHB-AP (IDR: 0x24770011, ADDR: 0x01000000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Invalid implementer code read from CPUIDVal[31:24] = 0x00
Attach to CPU failed. Executing connect under reset.
Failed to power up DAP
InitTarget() start
Error! Failed to prepare target CPU

三、出现的问题原因

这个芯片是高电平使能、上一次给的是低电平、导致这个0.9V时有时无。在线调试不了程序并触发读写保护、官方给的工具也连接不上。这个0.9V还是挺重要哈、整错了真的是搞死个人。

第二次出现的原因:估计是这段代码出现了问题。

相关推荐
华玥作者17 小时前
[特殊字符] VitePress 对接 Algolia AI 问答(DocSearch + AI Search)完整实战(下)
前端·人工智能·ai
Mr Xu_17 小时前
告别冗长 switch-case:Vue 项目中基于映射表的优雅路由数据匹配方案
前端·javascript·vue.js
前端摸鱼匠17 小时前
Vue 3 的toRefs保持响应性:讲解toRefs在解构响应式对象时的作用
前端·javascript·vue.js·前端框架·ecmascript
lang2015092817 小时前
JSR-340 :高性能Web开发新标准
java·前端·servlet
好家伙VCC18 小时前
### WebRTC技术:实时通信的革新与实现####webRTC(Web Real-TimeComm
java·前端·python·webrtc
未来之窗软件服务19 小时前
未来之窗昭和仙君(六十五)Vue与跨地区多部门开发—东方仙盟练气
前端·javascript·vue.js·仙盟创梦ide·东方仙盟·昭和仙君
嘿起屁儿整19 小时前
面试点(网络层面)
前端·网络
VT.馒头19 小时前
【力扣】2721. 并行执行异步函数
前端·javascript·算法·leetcode·typescript
phltxy20 小时前
Vue 核心特性实战指南:指令、样式绑定、计算属性与侦听器
前端·javascript·vue.js
Byron070721 小时前
Vue 中使用 Tiptap 富文本编辑器的完整指南
前端·javascript·vue.js