Debugging problems with STM32F4 VCP

Publisher:王大雷Latest update time:2017-02-24 Source: eefocusKeywords:Debug  STM32F4  VCP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

        The board has been made, and its function is: accurate positioning using sensors and GPS. The board uses the debugging STM32F4 VCP, which is USB to serial port. The problems and solutions that occurred when transplanting ST official programs are listed below:


    1. Because the download interface is 5-pin SWD, and the downloader is st-link v2  ST-LINK/V2 . First of all, we need to figure out how to connect the SWD interface and st-link v2. The key point here is to connect the VCC pin of SWD to the first pin of st-link v2. If it is not connected in this way, an internal command error will occur. This error sometimes occurs because of a reset problem. If the download can be carried out normally, then the following problems will be easy to solve! I was entangled here for a long time.

    2. Check whether the crystal oscillator of the board is oscillating, and measure it with an oscilloscope. The modification places are HSE_VAlUE and PLL_M in system_stm32f4xx.c.

    3. Because the default USB configuration of ST company uses high-speed USB port, we need to remove the macro definition of HS in the c/c++ option of keil options. As shown below:


           4. When configuring your own serial port, pay attention to which serial port to use, the baud rate (LINE_CODING linecoding), the serial port clock enable function, and the serial port interrupt. There must be an interrupt program. If there is no interrupt program, the program will freeze when it runs to B.ENDP ALIGN of startup_stm32f4xx.s.

           5. If the program cannot run after jumping to 0x08001460 BEAB BKPT 0xAB, you need to set the microlibrary Use MicroLIB.


Keywords:Debug  STM32F4  VCP Reference address:Debugging problems with STM32F4 VCP

Previous article:STM32F4 serial IAP firmware update
Next article:STM32F4 TIM1 7-channel PWM signal output

Recommended ReadingLatest update time:2024-11-16 14:34

Based on STM32F4 transplant W5500 official driver library ioLibrary_Driver
1. About ioLibrary_Driver 1.1. ioLibrary Overview The ioLibrary means “Internet Offload Library” for WIZnet chip. It includes drivers and application protocols. The driver (ioLibrary) can be used for the application design of WIZnet TCP/IP chips as W5500, W5300, W5200 and W5100. For more information, refer to the ioLi
[Microcontroller]
stm32f4 RAM read protection settings for running programs
The main purpose is to run the program in RAM to remove the read protection. I didn't expect that ST-Link Utility can do it directly. ST-Link Utility: target-- options bytes-- you can see the read protection.  To disable the read protection, select Level 0. Leave everything else unchanged (WDG_SW, nRST_STDBY, nRST_STO
[Microcontroller]
stm32f4 RAM read protection settings for running programs
Testing STM32F4 EVNETOUT
I saw that many pins can be configured as EVENTOUT. There happened to be a pin that wanted to output a high-level pulse, so I tested it: Environment: STM32F407, IAR 7.4, STM32CubeF4 GPIO configuration code: GPIO_InitStruct.Pin = GPIO_PIN_10; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_P
[Microcontroller]
Testing STM32F4 EVNETOUT
STM32F4 Development Notes 8: Solving the USB CDC "The device cannot start" problem
    I have debugged the USB CDC device of STM32 many times. You can look at the logs written earlier. I have debugged different STM32 MCUs. I thought STM32F4 would be very simple, but it was full of pitfalls. I debugged it until midnight to solve the problem. I sorted out the problem again.     The chip I am using now
[Microcontroller]
DMA data transfer of STM32F4 ADC collected data
      Continuing from the previous article, let's start to play with ADC's DMA transmission. Because everyone is talking about DMA, even ST's examples use DMA.         The data collected by the ADC is stored in a fixed register. When the conventional sampling method samples multiple channels, using DMA can better avoi
[Microcontroller]
STM32F429 LTDC Optimization
Several optimizations for SDRAM when used as Framebuffer. 1. Increase the SDRAM bandwidth as much as possible (enable burst access, increase the length of burst access, increase the data bus width). 2. The framebuffer row length is aligned to 64 bytes because the LTDC burst access length is 64 bytes. 3. The FSMC bus i
[Microcontroller]
Use J-FLASH to burn stm32F407
open data file- connect- program- start application Hardware connection completed open data file The software file box appears connected The software displays connected successfully. program (Do not operate this item and proceed directly to the next step without hardware response) start ap
[Microcontroller]
Use J-FLASH to burn stm32F407
STM32F4 half-baked DMA/USART sending data
Half-life: because the data was sent out. Unfamiliarity: because I don't understand it well. I just used a few simple things to configure the DMA operation steps as follows: 1. Turn on the clock. RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2,ENABLE); 2. Configure the DMA data structure. There are a few points to be clear
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号