Skip to main content
Moamen Ayman
Associate III
June 30, 2016
Question

STM32F407VGT6 programming and debugging

  • June 30, 2016
  • 9 replies
  • 1979 views
Posted on June 30, 2016 at 22:25

Hello, I have developed my code using IAR workbench, tried it on STM32F4 discovery board and it worked well. Now I want to download the code on STM32F407VGT6 chip I bought from digikey.com directly without the develop board, I connected it with hardware as described by st documentations and used SWD for programming and debugging but I always get an error message (No MC device found). Could someone help me to find what can cause this error? 

Thanks in advance 
    This topic has been closed for replies.

    9 replies

    Tesla DeLorean
    Guru
    June 30, 2016
    Posted on June 30, 2016 at 23:12

    I've gone over this type of thing dozens of times on the forum, please review some of the other threads.

    1-minute recap.

    Make sure the analogue supplies are connected.

    Review state on NRST pin.

    Make sure you have capacitors on the VCAP pins, and that you can see 1.25V on them.

    Check supplies.

    Check orientation.

    Check open/shorts.

    Provide a schematic, we have no idea what you've actually wired up.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Moamen Ayman
    Associate III
    June 30, 2016
    Posted on July 01, 2016 at 00:08

    Here you are the schematic I used:

    -I connect 6 capacitors 0.1uF in addition to 10uF between VDD and VSS and connected all VDD together and all VSS together,

    -I connected 2 capacitor 2.2uF ESR <2 Ohm between VCAP1, VCAP2 and VSS

    -I connected BOOT0 through 10KOhm resistor to VSS

    -I connected VDDA, VREF+ as shown in picture and VSSA to VSS

    -I connected NRST through 0.1uF to VSS

    -I used external crystal 8MHz with load capacitance 20pF and series resistance of 80Ohm, so I connected them to PH0, PH1 and used 400Ohm resistor

    -I connected st-link V2 programmer using SWD interface so I used PA14 as SWDCLK and PA13 as SWDIO but I put 2 resistors of 22Ohm between pins and programmer

    ________________

    Attachments :

    schematics_001.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0jm&d=%2Fa%2F0X0000000bd5%2FBZaUQ6hgH710as6QVE9pYj.Shd4iK4eg8eXyW1dxnwE&asPdf=false
    Tesla DeLorean
    Guru
    June 30, 2016
    Posted on July 01, 2016 at 01:27

    The VCAP voltage test will tell you very quickly if the part is orientated correctly, and there is some potential the core will function/respond to SWD comms.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Moamen Ayman
    Associate III
    July 1, 2016
    Posted on July 01, 2016 at 02:34

    I tested the VCAP voltage but I got zero voltage so that means orientation  may be wrong but if VDD and VSS were opposed that will damage the IC?

    Tesla DeLorean
    Guru
    July 1, 2016
    Posted on July 01, 2016 at 03:53

    Verify the power pins and orientationHere are a couple of examples of pin/marking

    https://community.st.com/0D50X00009Xka68SAB

     

    Edit: Fixed DEAD LINK, original post from 30-Jun-2016

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Moamen Ayman
    Associate III
    August 7, 2016
    Posted on August 07, 2016 at 02:06

    Hello, I have checked the orientation of the IC and it's soldered well with no short or open circuit, also I can get 1.25V on VCAP and NRST in high state. but when I try to download the code from IAR I get (fatal error:ST-link, No MCU device found, session aborted!)

    Now where the problem is in?

     

    Tesla DeLorean
    Guru
    August 7, 2016
    Posted on August 07, 2016 at 05:43

    I would probably use the ST-LINK Utilities to do the testing here.

    Is this the ST-LINK portion of the STM32F4-DISCO board? Have you disconnected the jumpers so it doesn't talk to the F4 part on the board? Your debug connectivity compose of NRST, SWDIO, SWCLK and GND?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Moamen Ayman
    Associate III
    August 7, 2016
    Posted on August 07, 2016 at 17:05

    Yet I use the

     ST-LINK 

    portion of the STM32F4-DISCO board, I had disconnected Jumper one(JP1) and connector three(CN3) to use this board as programmer. I use SWDCLK to PA14, SWDIO to PA13 plus 3.3V to VDD and GND to GND -first from discovery board and second to my circuit-. I tried to use this discovery as programmer to another discovery board with the same pins and it works, just removed JP1 from target board but I didn't use NRST pin while programming a discovery board with another one and every thing goes okay but I can't get the same result with my new circuit which is connect as recommended in hardware guide of ST.

    Moamen Ayman
    Associate III
    August 7, 2016
    Posted on August 07, 2016 at 19:00

    Thanks a lot, When I connected the NRST pin with the ST-Link programmer, it works well.