Skip to main content
Visitor II
January 23, 2017
Question

ST-LINK does not communicate with STM32F407VGT

  • January 23, 2017
  • 5 replies
  • 5464 views
Posted on January 23, 2017 at 16:19

Hi everybody,

I have a problem with my project. I designed and produced a PCB with two MCUs, the STMF401RB and the STM32F407VGT. I am using the ST-LINK V2 to program them and SWDIO and SWCLK. The problem that I have is that I can connect to the STMF401 but I can't connect to the STMF4 I checked the VDD and VSS in every pin and they seem to be ok. I think the design is ok but may be i missed something. I have attached the schematic that I used for the STMF4 I would be grateful if you can help me.

Thank you very much

Regards

Gregorio

0690X000006067RQAQ.png

#st-link #stm32f407 #pcb-design

Note: this post was migrated and contained many threaded conversations, some content may be missing.
    This topic has been closed for replies.

    5 replies

    January 24, 2017
    Posted on January 24, 2017 at 12:09

    To make things easier, could you please add the Pins for the ST-Link-Header? So it's hard without Datasheet or Cube to find them. Just a little Hint: maybe you have a Problem with the Reset-Pin (NRST)? Often something with this Pin and the Configuration in your cfg-File is wrong. Search for 'reset_config none', maybe this helps.

    Visitor II
    January 24, 2017
    Posted on January 24, 2017 at 12:38

    Hi sch.nor,

    Thank you for your reply. I have attached a image of the ST-Link header in the PCB. I am using the SWDIO and SCLK signal which are connected to the pins PA13 (SWDIO) and PA14 (SWCLK) of the STM32F407. I am using the same header and the same configuration for both MCUs and I am using a switch to swap between them.  The STM32F401, which I can connect to, has pin SWDIO in high level and the SWCLK pin in low level before connecting  to the ST-LINK. However the STM32F407 has both pins in high level.

    I used the osciloscope to see both signal(SWDIO and SWCLK) when the MCU is connected to the ST-LINK. For the STM32F401 they both change between high and low level, which is normal, but for the STM32F407 there is not change in the signals

    In my configuration the reset pin is floating. Anyway i will have a look at this as you told me.

    Thank you for your help

    0690X000006067WQAQ.png
    Graduate
    January 25, 2017
    Posted on January 25, 2017 at 07:06

    Dear Gregorio Vidal,

    Wire NRST on target board to STLink/V2's RST output.

    And use ST-Link Utility with 'connect under reset' option.

    Connect under reset is useful for recovery from any unstable state.

    Technical Moderator
    January 24, 2017
    Posted on January 24, 2017 at 12:24

    Hello

    gregonv

    ,

    Could you please precise the STLINK/V2 and the ST-LINK Utility versions you are using?

    Best regards,

    Khouloud

    Visitor II
    January 24, 2017
    Posted on January 24, 2017 at 12:49

    Hi Khouloud,

    I am using the ST-LINK /V2 with the firmware version V2.J27.56. I upgraded it today. And the ST-LINK utility is the version v 4.0.0.0.

    Thanks

    Regards

    Gregorio

    Visitor II
    January 24, 2017
    Posted on January 24, 2017 at 14:40

    R40 & R41 are I2C pull-ups connected to 5v0 rail for this 3v3 powered CPU. Confirm this is acceptable for the I2C port pins. Test by removing R40 & R41 for now or connect to +3v3 till you have your ST-Link working with this custom PCB.

    On I2C, the caps C44 & C45 are not required and can impact your performance of this interface.

    Visitor II
    January 24, 2017
    Posted on January 24, 2017 at 15:13

    Hi bhatia.kumar,

    The I2C ports are 5V compatible and i think the most of the ports in the STM32F07 are 5V compatible. Anyway to test this part of my costume board I am using just the 3.3V, not the 5V.

    About the I2C configuration with the capacitors, I tried it in the other MCU in the board and It seems to work ok, but If I have problems I will remove the capacitors.

    Thank you

    Graduate II
    January 24, 2017
    Posted on January 24, 2017 at 16:37

    What exactly does the ST-Utilities report with regard to the failure?

    Have you done any other basic signs-of-life testing of the F407? ie Can you pull BOOT0 High, reset and talk to the boot-loader via USART1 PA9/PA10? What level do you see on the NRST pin? What voltages do you see on the VCAP pins?

    Visitor II
    January 24, 2017
    Posted on January 24, 2017 at 17:30

    The ST-utilities report that 'can not connect to target'. In the setting windows you can see Target:Detectio fail and Target voltage: Detection fail

    This is the trace log:

    Error (0x16) after target cmd F2 3E 00 00 00 00 00 00 00 00

    Error (19) in ReadMemory_32Bit (4 bytes from 0xe0042000)

    Error (0x12) after target cmd F2 3E 00 00 00 00 00 00 00 00

    Error (19) in ReadMemory_32Bit (4 bytes from 0x5c001000)

    Error (0x12) after target cmd F2 3E 00 00 00 00 00 00 00 00

    Error (19) in ReadMemory_32Bit (4 bytes from 0xe00e1000)

    Error (0x12) after target cmd F2 3E 00 00 00 00 00 00 00 00

    Error (19) in ReadMemory_32Bit (4 bytes from 0x40004000)

    W at 0xe000edf0: 0xa05f0000

    Error (0x12) after target cmd F2 35 F0 ED 00 E0 00 00 5F A0

    cErrLog::SetLogTraceOn

    STLinkUSBDriver.dll loaded

    ST-Link/V2 device detected

    Target voltage detected: 2.904680

    Driving NRST low

    Error getting target IDCODE: if SWD, check SWD connection

    Error (4) while initializing ST-Link in SWD mode

    About the signs-of-life testing , the NRST level is HIGH and the voltages for both Vcap is 1.27 V. I am going to try to communicate using USART. The problem is that the PA9 and PA10 are not available in my board, Can I used the USART3 PB10/PB11? 

    Thank you

    Graduate II
    January 24, 2017
    Posted on January 24, 2017 at 18:57

    >>

    Can I used the USART3 PB10/PB11? 

    Yes, these should be viable. We always make the System Loader accessible in our designs

    The quick test with RealTerm is to send the 0x7F character at 9600 8E1 (Even Parity), and see if you get the 0x79 response.

    Visitor II
    January 24, 2017
    Posted on January 24, 2017 at 19:46

    About I2C bus. It has max capacitance of 200pF. Stray and components total. The pull-up resistors can't pull up the pins fast enough if capacitance is large..