2017-01-23 07:19 AM
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
#st-link #stm32f407 #pcb-design Note: this post was migrated and contained many threaded conversations, some content may be missing.2017-01-24 03:09 AM
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.
2017-01-24 03:24 AM
Hello
gregonv
,Could you please precise the STLINK/V2 and the ST-LINK Utility versions you are using?
Best regards,
Khouloud
2017-01-24 04:38 AM
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
2017-01-24 04:49 AM
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
2017-01-24 05:40 AM
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.
2017-01-24 07:13 AM
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
2017-01-24 07:37 AM
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?
2017-01-24 09:30 AM
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 00Error (19) in ReadMemory_32Bit (4 bytes from 0x5c001000)Error (0x12) after target cmd F2 3E 00 00 00 00 00 00 00 00Error (19) in ReadMemory_32Bit (4 bytes from 0xe00e1000)Error (0x12) after target cmd F2 3E 00 00 00 00 00 00 00 00Error (19) in ReadMemory_32Bit (4 bytes from 0x40004000)W at 0xe000edf0: 0xa05f0000Error (0x12) after target cmd F2 35 F0 ED 00 E0 00 00 5F A0cErrLog::SetLogTraceOnSTLinkUSBDriver.dll loadedST-Link/V2 device detectedTarget voltage detected: 2.904680Driving NRST lowError getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeAbout 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
2017-01-24 10:46 AM
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..