cancel
Showing results for 
Search instead for 
Did you mean: 

stm32L562 error connection SWD

dlpPavlo
Associate II

Hi! I have custom board with new mcu stm32l562ve. Board has out pins - SWDIO and SWCLK.

I am try connect by st-link v3. But mcu not connected. Also, i tested with connect nRST ( setting "Under Reset" in st-link ). But this variant same as first. MCVU new from Mouser. Do you have any idea?

8 REPLIES 8
TDK
Super User

Need to connect GND, SWDIO and SWCLK for minimum viable SWD connection.

 

Here are some possibilities:

  • Design is not viable.
  • Part orientation is incorrect.
  • Pins are not connected to what you think they are.
  • Bad soldering or board manufacturing.
  • Bad USB cable.
  • Bad programmer.
If you feel a post has answered your question, please click "Accept as Solution".
dlpPavlo
Associate II

Thank you for replay! I have over 10 years of experience with sim. But 32l5xx series work first. If this series has no distinction - I think mcu is bad. All connection I checked. Also. I check signals by oscilloscope on pins swdio and swclk. Signal is ok...

Regardless of experience level, everything needs to be set up correctly. I also have many years of experience and still make mistakes, sometimes "dumb" ones. Hardware doesn't care about experience level. You haven't shown much information here, so it's going to be difficult to diagnose the issue.

You can throw your hands up and think the chip is bad. Unlikely. Up to you. Choose your reality.

 

If you want to further diagnose the issue here, show some pictures of the setup, and enough to verify the connections are correct. Verify voltages are as expected. Programmer does not supply power.

If you feel a post has answered your question, please click "Accept as Solution".
dlpPavlo
Associate II

Thank you for your reply. I agree with you about the experience. Today is a day off. Tomorrow I will show a schematic and a photo of the board assembly. I will also add the measured parameters. I will be grateful for your help. I read from the description of this controller that it has JTAG port enabled by default. To switch to SWD mode, the debugger must send a certain packet of a large number of units. This is what made me suspicious.

dlpPavlo
Associate II

By default the JTAG-DP is selected after a system or a power-on reset. The five IO pins are configured by hardware in debug alternative function mode. The SWJ-DP incorporates pull-up resistors on JTDI, JTMS/SWDIO, and nJTRST, as well as a pull-down resistor on JTCK/SWCLK. A debugger can select the SW-DP by transmitting the following serial data sequence on JTMS/SWDIO: ... (50 or more ones) ..., 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, ... (50 or more ones) ... JTCK/SWCLK must be cycled for each data bit.  - I talk about this...

 

A schematic along with an in focus high resolution picture of the board is generally enough to figure out what is going wrong, and maybe another picture showing external connections.

The software will do what it needs to do to get SWD working when you press "connect". No user configuration needed.

Cheers.

If you feel a post has answered your question, please click "Accept as Solution".

Hi! I am attach pdf with my schematic. I check connection on board. It's the same as in this pdf...

I found problem. My schematic not need down convertor (SMPS). In schematic not connect pin 50. It's must be connected to VDD. ( this pin powered core cpu ) I connected pin to vdd and cpu work with SWD. 

Thank you for all proposition check schematic.