简体   繁体   English

STM32F407 Disc E31 调试中的错误信息

[英]STM32F407 Disc E31 Error message in debugging

I will ask a question about my STM32F407 Discovery board.我会问一个关于我的 STM32F407 探索板的问题。 I want to learn about external interrupts and I was making a small circuit.我想了解外部中断,我正在制作一个小电路。 I connected PH0 to my button and PH1 to the LED.我将 PH0 连接到我的按钮,将 PH1 连接到 LED。 But these pins are connected to the mcu's crystal pins.但是这些引脚连接到单片机的晶体引脚。 But I didn't know it at that time.但当时我并不知道。 I was press button that is connectet to 5V.我按下连接到 5V 的按钮。 And my IDE won't connect to my board for debugging debugging.而且我的 IDE 不会连接到我的板进行调试调试。 I can connecting to my board via ST Link Utility and I can do a full chip erase with no errors.我可以通过 ST Link Utility 连接到我的电路板,并且可以毫无错误地进行完整的芯片擦除。 Then I turn back to code in Atollic, press the debugging button and I get this error messages:然后我回到 Atollic 中的代码,按下调试按钮,我收到以下错误消息:

Error in executing 'cont' command ... 
CM4 Failed to read all registers
FAILED to REGISTER Values from the target
Target is not responding, retrying...

*some messages in between*

warning: Remote failure reply: E31
Remote failure reply: E31
Remote connection closed
Quit

And then I turned off the debug screen to try again but I can't because Atollic can't find any ST Link devices.然后我关闭了调试屏幕再试一次,但我不能,因为 Atollic 找不到任何 ST Link 设备。 This is the error message:这是错误消息:

Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.

Note: My PC recognize my board in Device Manager.注意:我的电脑在设备管理器中识别我的主板。

How can I solve this problem.我怎么解决这个问题。 ST Link Utility connects to my board succesfully, My PC connects to my board. ST Link Utility 成功连接到我的开发板,我的 PC 连接到我的开发板。 I tried St link firmware upgrade but I got more errors.我尝试了 St link 固件升级,但出现了更多错误。 Like this.像这样。

Failure at line: 13 in "Target Software Startup Scripts"

You probably have ST Utility still connected to your MCU.您可能仍将 ST Utility 连接到您的 MCU。 This results in Atollic not beeing able to connet to the MCU.这导致 Atollic 无法连接到 MCU。 Either close ST Utillity or press the disconnet button.关闭 ST Utility 或按下断开按钮。

Since you can erase it your MCU should be ok and you chose one of the few 5V tolerant pins but it would be better practice to use 3V.由于您可以擦除它,因此您的 MCU 应该没问题,并且您选择了少数可承受 5V 的引脚之一,但使用 3V 会更好。

Another reason might be the option bytes if the read out protection got set to level 1 or 2 the debugger is sometimes not able to reset those and is therefore not able to read out the register.另一个原因可能是选项字节,如果读出保护设置为级别 1 或 2,调试器有时无法重置这些,因此无法读取寄存器。

I was solve a lot of problem.我解决了很多问题。 Firstly I found a problem.首先我发现了一个问题。 This is a my DCMI_Config function.这是我的 DCMI_Config function。 In this function I have a lot of pin definition.在这个 function 我有很多引脚定义。 GPIOA caused my problem. GPIOA引起了我的问题。

GPIOA-> MODER = 0x00002200; //GPIOA 4,6 Set Alternate Function for DCMI

This line has my problem.这条线有我的问题。 I was search Discovery schematic and I found something.我正在搜索 Discovery 示意图,我发现了一些东西。 PA4 pin connected to Discovery's voice uc as I2S3_WS. PA4 引脚作为 I2S3_WS 连接到 Discovery 的语音 uc。 Is this cause any problem?这会导致任何问题吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM