Some pins not usable when using ST-Link ?

stevestrong
Posts: 892
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Some pins not usable when using ST-Link ?

Postby stevestrong » Mon Jan 16, 2017 5:42 pm

Rick, I did not overlooked that post, I just wanted to repeat the solution for people who browse this thread, looking for the solution. ;)

Rick Kimball wrote:There is no majority way to use these boards. There are many different people using many different boards all in different ways.

I totally agree.

But there are different use cases, dependent on the selected upload method:
1. Use STlink (or other probe) - in this case I also would expect the debug pins to be enabled, as debugging is possible, it makes sense.
2. use DFU - in this case I have no debug intentions, otherwise I would have used STlink or other probes. But I also expect that I don't have any pins assigned for debugging.

You (and several others) are case 1. If you generally disable debug, you disturb these users.
Me (and several others) case 2. If you generally enable debug, you disturb these users.

I really see discomfort for half of the users if you generally enable or disable debugging.

So, in my opinion, the clear solution would be either:
a) the way it was before 12.2016 - only allocate those pins for debug when any probe involved upload method is selected - this is an automatic process, the user is not confronted with the burden of selecting anything.
or
b) allow the user to select debugging over menu - leave free hand to user in allocating port pins involved by debugging.

User avatar
Rick Kimball
Posts: 754
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Some pins not usable when using ST-Link ?

Postby Rick Kimball » Mon Jan 16, 2017 5:54 pm

Which board are you using?
-rick

stevestrong
Posts: 892
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Some pins not usable when using ST-Link ?

Postby stevestrong » Mon Jan 16, 2017 6:43 pm

I really don't see why the used board would be here relevant.
But anyway, I am using alternatively Maple Mini clone or Blue Pill. I am using the pill alternatively with DFU (if I need 5V and USB serial) or STlink if I want to debug, very rarely.

User avatar
Rick Kimball
Posts: 754
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Some pins not usable when using ST-Link ?

Postby Rick Kimball » Mon Jan 16, 2017 6:48 pm

stevestrong wrote:I don't see why the used board would be here relevant.
But anyway, I am using alternatively Maple Mini clone or Blue Pill. I am using the pill alternatively with DFU (if I need 5V and USB serial) or STlink if I want to debug, very rarely.

I ask because it would be very strange to use the SCLK and SDIO pins as datapins if you were using the blue pill. Can you show me a picture of this board in use? How about other pins, do you use the BOOT1 pin as a data pin?
-rick

stevestrong
Posts: 892
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Some pins not usable when using ST-Link ?

Postby stevestrong » Mon Jan 16, 2017 7:02 pm

Yes, I am using PB2 (BOOT1) together with PB0..7 as data pins for 8 bit parallel display interface, the problematic case was PB4 which didn't toggle because of enabled debug interface.
And I wouldn't wonder if someone would use PA0/PA8..15 as data pins instead. I mean, why not, if it is available on the board? Even if it would cancel the serial 1 and serial USB functionality, on which one could again discuss infinitely...
Sorry, Rick, but I still don't see what do you want to say, why the used board would be here relevant.
Last edited by stevestrong on Mon Jan 16, 2017 7:06 pm, edited 1 time in total.

User avatar
Rick Kimball
Posts: 754
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Some pins not usable when using ST-Link ?

Postby Rick Kimball » Mon Jan 16, 2017 7:06 pm

stevestrong wrote:Sorry, Rick, but I still don't see what do you want to say, why the used board would be here relevant.


It seems like you are using the board in a minority way not a majority way.
-rick

stevestrong
Posts: 892
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Some pins not usable when using ST-Link ?

Postby stevestrong » Mon Jan 16, 2017 7:07 pm

OK, so please let know what is the "majority way" to use a board, where is specified.
Especially, where is the user warned that he cannot to use PB4 because of the enabled JTAG (debug) interface, which seems to have priority over DFU/serial USB. :?
And I wouldn't mind to (maybe) enable JTAG pins (where PB4 is involved), if the pill would have a JTAG interface connector...
But the pill only has mounted SWD interface connector, which would only involve PA13/14, but not PB3/PB4 at all.
Last edited by stevestrong on Mon Jan 16, 2017 7:23 pm, edited 1 time in total.

User avatar
Rick Kimball
Posts: 754
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Some pins not usable when using ST-Link ?

Postby Rick Kimball » Mon Jan 16, 2017 7:23 pm

stevestrong wrote:OK, so please let know what is the "majority way", where is specified.

I honestly don't know. I can only guess.
-rick

User avatar
martinayotte
Posts: 1163
Joined: Mon Apr 27, 2015 1:45 pm

Re: Some pins not usable when using ST-Link ?

Postby martinayotte » Mon Jan 16, 2017 9:12 pm

stevestrong wrote:But the pill only has mounted SWD interface connector, which would only involve PA13/14, but not PB3/PB4 at all.

Are you aware that SWD can be enabled while JTAG disabled ?

Code: Select all

typedef enum afio_debug_cfg {
    /** Full Serial Wire and JTAG debug */
    AFIO_DEBUG_FULL_SWJ          = AFIO_MAPR_SWJ_CFG_FULL_SWJ,
    /** Full Serial Wire and JTAG, but no NJTRST. */
    AFIO_DEBUG_FULL_SWJ_NO_NJRST = AFIO_MAPR_SWJ_CFG_FULL_SWJ_NO_NJRST,
    /** Serial Wire debug only (JTAG-DP disabled, SW-DP enabled) */
    AFIO_DEBUG_SW_ONLY           = AFIO_MAPR_SWJ_CFG_NO_JTAG_SW,
    /** No debug; all JTAG and SW pins are free for use as GPIOs. */
    AFIO_DEBUG_NONE              = AFIO_MAPR_SWJ_CFG_NO_JTAG_NO_SW,
} afio_debug_cfg;

stevestrong
Posts: 892
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Some pins not usable when using ST-Link ?

Postby stevestrong » Tue Jan 17, 2017 7:58 am

Yes, I am aware of this.
Still, when using DFU upload method, the full JTAG debug pins are assigned for debugging even if only SWD connector is on board, and I don't really see why would be this useful for "majority users", someone can please explain.


Return to “STLink”

Who is online

Users browsing this forum: No registered users and 1 guest