Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to detect a bare STM32L412K8T6 from a breakout board #860

Closed
6 tasks done
lukebayes opened this issue Feb 10, 2020 · 1 comment
Closed
6 tasks done

Unable to detect a bare STM32L412K8T6 from a breakout board #860

lukebayes opened this issue Feb 10, 2020 · 1 comment

Comments

@lukebayes
Copy link

lukebayes commented Feb 10, 2020

  • Programmer/board type: Stlink/v2 (official blue and white version)
  • Programmer firmware version: V2J35S7 STM8/STM32 Debugger
  • Operating system: Linux

Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
Linux beefcake 5.3.0-29-generic #31-Ubuntu SMP Fri Jan 17 17:27:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

  • Stlink tools version: v1.5.1-50-g3690de9
  • Stlink commandline tool name: st-info, st-flash and st-util
  • Target chip: STM32L412K8T6 on a bare QFP32 breakout board.

In a terminal, run:

st-info --probe

Output:

Found 1 stlink programmers
 serial: xxx[manually obscured]0267
openocd: "\x50\x3f\x72\x06\x77\x3f\x54\x54\x35\x37\x02\x67"
  flash: 0 (pagesize: 0)
   sram: 0
 chipid: 0x0000
  descr: unknown device

When I attempt to flash & debug from the STM32CUBEIDE (Eclipse), using SWD debugger get a pop-up error with the following:

Error in initializing ST-LINK device.
Reason: (4) No device found on target.

Expected/description:
Expected the device to be found and flashed.

I'm almost certainly missing something simple, but I've been at this for a couple of days now and can't seem to find the secret key.

I have tried many different wire and configuration combinations.

I'm currently using the 20 pin connector from the STLINK/V2 as follows:

STLINK/V2 STML412Kx LQFP32
1 1/VDD
2 NC
3 32/VSS
4 32/VSS
5 NC
6 32/VSS
7 23/SWDIO
8 32/VSS
9 24/SWCLK
10 32/VSS
11 NC
12 32/VSS
13 26/SWO
14 NC
15 NC
16 NC
17 NC
18 32/VSS
19 NC
20 32/VSS

I'm powering the board with either an LM317T configured to give me 3.3V (reading at 3.4V), or directly from the STLINK at 3.1V.

I have 100nF caps bridging VDD and VSS next to each power line.

I'm (hopefully) using the internal oscillator.

Other than that, it's a bare IC that's on a breakout board, which is attached to a breadboard.

I've been able to successfully flash and debug the STM32L412 Nucleo-32 (with built-in STLINK) over USB on this computer with no issues at all.

Any tips for flashing (and debugging) a bare chip would be greatly appreciated!

@lukebayes
Copy link
Author

lukebayes commented Feb 10, 2020

Problem solved.

The root issue was that I was reading the connector pinouts backwards, and I've had some incorrect diagrams floating around. The real confusion is whether one should read these pinouts as if looking into the ribbon cable or looking down at the header?

For posterity and anyone else struggling with the same issue, here's the JTAG connection table for an STM32L412K8T6 (LQFP32/UFQFPN32) board and the official ST-Link/V2 debugger and programmer 20-pin connector.

The best connector diagrams I found are at STM32-Base.

STLINK/V2 STML412Kx LQFP32
1 NC
2 NC
3 TRST/27
4 GND
5 TDI/25
6 GND
7 TMS/SWDIO/23
8 GND
9 TCK/SWCLK/24
10 GND
11 NC
12 GND
13 TDO/SWO/26
14 GND
15 NRST/4
16 GND
17 NC
18 GND
19 VDD/3.3V PWR
20 GND

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants