USB port for debug and programming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 9:59 AM
Hello,
I've been using the NUCLEO-L476RG board for development. Now I want to design my own PCB with the same component. My question is about the JTAG port - in the NUCLEO board it is implemented as a USB connector but they used an additional uC for that. I would like to use only the stm32l476RG. I see in its datasheet that it has USB connectivity but I can't find the USB pins in the pinout section.
Would appreciate some kind of reference or application notes for USB connector for this coponent, so that I'll be able to connect it to a PC in order to program it, debug and read data over serial.
Thank you,
David
Solved! Go to Solution.
- Labels:
-
STM32L4 series
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 10:28 PM
You can choose your own connector. Needs only 3 pins at minimum: SWDIO, SWDCLK, GND.
Some additional pins may be helpful: NRST, SWO, Vdd
For testing, you may even reconfigure the SWD interface on the NUCLEO-L476RG board to connect to your PCB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 10:15 AM
You'll need an external ST-LINK debugger dongle. Its interface to the MCU is described here (both JTAG and SWD modes)
These dongles come with their own USB connector.
-- pa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 10:21 AM
Thanks for the prompt answer. In the link you provided I see a standard 20-pin JTAG connector. Does it mean that I need to place that connector on my board and purchase a debugger?
I'm trying to make my board as small as possible, would it be possible to route the JTAG and SWD signals to a USB (or any other small) connector?
Can I use SWD mode for data transmission and not only debug?
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 11:56 AM
I would use a STLINKV3-MINI or similar for flashing and debugging your PCB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 12:04 PM
PA11/PA12 are the D-/D+ pins, OTG_FS_DM, OTG_FS_DP https://www.st.com/resource/en/datasheet/stm32l476je.pdf
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 6:19 PM
> Does it mean that I need to place that connector on my board and purchase a debugger?
Basically yes, For the connector you have options.
SWD interface needs only 4 pins: SWDIO, SWCLK, VCC, ground. Two more are optional (nRST, SWO).
For the cheepest ST-LINK dongles you need only these 4 pins.
Some designers prefer 6-hole connector for this cable. It is cool... but quite expensive.
-- pa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 9:06 PM
Thanks. If I connect those pins directly to a PC (with VBUS and GND), can I use this connection for programming, debug and data transmission? If so, do I need a special tool, or a simple USB cable will do?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 9:57 PM
programming: yes (USB DFU bootloader)
data transmission: yes, must be implemented in SW
debug: no
There are many app notes... on st.com, pls. check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 10:07 PM
That looks like a good solution, my only concern is that the connector is quite big, while I'm trying to make my board as compact as possible. Is there anything similar with a smaller connector?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-08 10:28 PM
You can choose your own connector. Needs only 3 pins at minimum: SWDIO, SWDCLK, GND.
Some additional pins may be helpful: NRST, SWO, Vdd
For testing, you may even reconfigure the SWD interface on the NUCLEO-L476RG board to connect to your PCB.
