ARM SWD doesn't need nRESET?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was looking at various small ARM Cortex boards on eBay and I noticed that many of them bring out Vdd, GND, SWCLK and SWDIO, but not nRESET.  The ARM SWD interface includes nRESET:

 

SWD pinout:

https://developer.arm.com/docume...

 

Some example boards

https://www.ebay.com/itm/ARM-Cor...

https://www.ebay.com/itm/STM32F0...

https://www.ebay.com/itm/STM32F1...

 

Can anybody explain why these boards don't bring out nRESET?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not needed, but it can get you out of some problems.

 

I wouldn't recommend it!

 

Why not ask ARM themselves:

 

https://community.arm.com/developer/ip-products/processors/f/cortex-m-forum

 

Or, as those examples are all STM32, ask ST:

 

https://community.st.com/s/

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Sep 29, 2020 - 04:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Likewise AVR JTAG does not need a nRST pin.   But it can gain control of an AVR with JTD

It is unlikely that you disable SWD on your STM32 but that is why feet and bullets were invented

 

You simply connect 4 SWD pins to your SWD dongle

If you decide that you need a nRST you connect nRST on the dongle to the RESET pin on your STM32.

 

Oh,  I suggest that you start with a Cortex-M4 chip.

 

David.

Last Edited: Tue. Sep 29, 2020 - 04:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
It is unlikely that you disable SWD on your STM32

Actually, that's quite a common cause of problems on STM32-related forums!

 

In particular, people going for low power and disabling the pins used by the SWD.

 

Been there, done that!   blush

 

All of the ebay boards shown do give access to RESET on the headers

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Sep 29, 2020 - 04:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
AVR JTAG does not need a nRST pin

https://www.avrfreaks.net/commen...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes it can do without the reset line.

But at least if you can connect it do so.

 

I think there is a timing thing when you disable the SWD interface through code.

So technically you have it at hand, but if the SWD interface is not taking over the chip quick enough the connection is gone.

 

and there was something else, but it has been ages since we decided that we would use it everywhere no exceptions(ok 1, but that has been a real battle and was due to lack of PCB space).

A colleague who no longer works here investigated but never did real documentation on things :( so I doubt if I would find anything back when I would go and search for it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meslomp wrote:
I think there is a timing thing when you disable the SWD interface through code.

Anything done in code will take a finite time to execute, so yes - that has to be the case

 

But, as you say:

if the SWD interface is not taking over the chip quick enough the connection is gone.

 

I would always recommend not to disable the debug interface but, when it's absolutely unavoidable, be sure to put in a delay that will allow you to get the debugger connected.

 

Been there, done that.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

We tend to do this on first customer samples that by them are used for internal system testing only.

We switch the SWD interface off as soon as possible in FW so we have a back door into the units if they need to be FW updated for any reason.

When we go to final production we disable all programming interfaces through the security settings so no longer can get in.

Might be that that is why we always attach reset to make sure we can connect to the chip again.