Continue to Site

Programming and debugging pins on microcontrollers?

cupoftea

Advanced Member level 6
Advanced Member level 6
Joined
Jun 13, 2021
Messages
3,348
Helped
65
Reputation
132
Reaction score
154
Trophy points
63
Activity points
17,308
Hi,
Is there any way to know which pins on any microcontroller are useable for debugging and/or programming?
The PIC micros used to give a doc that told you, but others don't seem to.
With PICs, the programming pins were always RESET, VCC, VSS, ProgClk, ProgData.
Is it the same with others?
The datasheets often pinpoints some , but not all of the pins that are needed to be brought
out for debugging and programming of prototypes.

In any case, I think I will just make a line of 5 SMD pads and that will have to do for prototype
debugging and programming as we don't have room for connectors for these.
Do you think this will suffice?....they can be "flying wired" off to whatever connector can be used for programming/
debugging.
 
Old school debugging takes almost any gpio pins and a soft uart in code to drive
them. Prog usually had to be specific pins years ago because of HV needed and
process limitations. "Usually" there is an accompanying doc on programming,
I would post on their site, part specific, for a response. Newer parts more JTAG
oriented, and usually dedicated pins for that.

Regards, Dana.
 
Is there any way to know which pins on any microcontroller are useable for debugging and/or programming?
Yes, it´s called RTFM.

I mean:
* programming pins are "dedicated" programming pins, unless you talk about the use of pins for any code for self programming (bootloader)
* debugging pins are for connection with a debugger (hardware, interface) ... unless you talk about proprietary debugging circuits.

For any "dedicated" functions you need to consult the datasheet.
For any "prorietary" functions .. you need to define them in first place.

Klaus
 
Yes, it´s called RTFM.
Thanks, thats what i thought, but for STM32L073 i read the datasheet and all the Eval board docs, but nowhere is it clearly stated which exact pins are needed to be brought to the programming header.
I went to the STM32L073 web page and looked through every link...absolutely nowhere does it tell exactly which pins are needed for programming or for debugging.

STM32L073CBU6 (LQFP48)

With PIC microcontrollers you are left in no doubt whatsoever about which exact pins are needed.

As for debugging, its the same.

We have a new board coming out and i want to put prog/debug on there in case there are problems and the software guys need to look into the processor (debug it) and reprogram it.
 
Last edited:
This board manual calls out programing and debug connector, its user manual should have
schematic to find what the pins are...
 

Attachments

  • dm00171429-evaluation-board-with-stm32l073vz-mcu-stmicroelectronics.pdf
    2.5 MB · Views: 32
There´s more than the "datasheet",
Just go to this micorocontrollers site at the manufacurers and do a document search for "debug" .. and wihtin seconds you get this document: AN4989

Klaus
 
Thanks Klaus and danadakk, but ive looked through all the docs you kindly refer to...yesterday i looked through all of those........i cannot find which pins are needed to be brought out for the software engineer to be able to do debugging, or programming.
In Microchip, you get a clear-as-daylight picture of the programming pins being brought out.

I can see reference to certain pins which look likely to be involved in debugging or programming, but there is no specific reference to a debug header or programming header, and which pins must be brought out to those.
 
Hi,
Is there any way to know which pins on any microcontroller are useable for debugging and/or programming?
The PIC micros used to give a doc that told you, but others don't seem to.
With PICs, the programming pins were always RESET, VCC, VSS, ProgClk, ProgData.
Is it the same with others?
The datasheets often pinpoints some , but not all of the pins that are needed to be brought
out for debugging and programming of prototypes.

In any case, I think I will just make a line of 5 SMD pads and that will have to do for prototype
debugging and programming as we don't have room for connectors for these.
Do you think this will suffice?....they can be "flying wired" off to whatever connector can be used for programming/
debugging.
If you are using PIC, the programming pins are MCLR/RESET, VCC, VSS, PGC, PGD. Debugging is usually done via the same lines, often with the same header. Please tell us the name of the particular chip that you are using.
 
Hi,

AN4989:
Index:

4 Connecting to the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.1 SWD/JTAG pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

....

@ page40:
SWD is always mapped on PA13 (SWDIO) and PA14 (SWCLK). This is the default state after reset.

....

Datasheet:
Page52.

****

Datasheets are PDFs. Almost any PDF viewer has a search function: serch for "SWD"...

Klaus
 


Write your reply...

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top