testato
Sat Dec 10, 2016 6:44 pm
the SWD pins is actually disabled after you load an arduino sketch.
I propose to change this behavior, because the Bluepill, and the F103 in general, have many pins available.
Obtain two many pins from the SWD reconfiguration is not a big improvement respect the problem derived from ST-Link usability.
I know that is there the “under reset” way to connect the ST-link, but it is not a simple solution (timing problem) and normally a user expect that the SWD is always available, like ICSP on arduino.
I propose to change this behavior, because the Bluepill, and the F103 in general, have many pins available.
Obtain two many pins from the SWD reconfiguration is not a big improvement respect the problem derived from ST-Link usability.
I know that is there the “under reset” way to connect the ST-link, but it is not a simple solution (timing problem) and normally a user expect that the SWD is always available, like ICSP on arduino.
So I propose to remove this feature and leave the SWD always working.
When an user will need two gpio in more, he can implement manually this behavior, but he will know the contraindications.
Rick Kimball
Sat Dec 10, 2016 7:26 pm
I agree, the only people who care about this are people using the maple mini.
-rick
RogerClark
Sat Dec 10, 2016 8:07 pm
I’d need to double check, but AFIK all of the SWD options e.g Stlink and BMP leave those pins enabled.
I dont quite understand a workflow where you upload via the bootloader and then debug via stlink or BMP?
testato
Mon Dec 19, 2016 6:28 pm
yes, it is good for debug, or simply for upload a new bootloader.
it is always good have an swd connection available, and also for consistency, all kind of upload methods should have the same swd pin behavior, instead now if you upload in a way you lost the swd, instead in another way you do not lost it.
It is not user-friendly
it is always good have an swd connection available, and also for consistency, all kind of upload methods should have the same swd pin behavior, instead now if you upload in a way you lost the swd, instead in another way you do not lost it.
It is not user-friendly
Do you prefer that i open an Issue on github ?
Rick Kimball
Mon Dec 19, 2016 6:59 pm
You can always gain SWD access by setting boot0 to 1 and pressing reset.
-rick
testato
Tue Dec 20, 2016 6:35 pm
yes, I already writed it on my first post 
but have swd always available on all kind of upload method is a good improvement imho
but have swd always available on all kind of upload method is a good improvement imho
Rick Kimball
Tue Dec 20, 2016 8:11 pm
testato wrote:yes, I already writed it on my first post 
but have swd always available on all kind of upload method is a good improvement imho
but have swd always available on all kind of upload method is a good improvement imho
ahull
Tue Dec 20, 2016 8:29 pm
Perhaps a Wiki article detailing how these things work, and what to do if you want to change their function might be a more flexible way to go.
The mysteries of booting, the different bootloaders and the multitude of methods for flashing and booting are a little confusing for the novice.
The mysteries of booting, the different bootloaders and the multitude of methods for flashing and booting are a little confusing for the novice.
RogerClark
Fri Dec 23, 2016 1:20 am
The problem with this request, is that the “Blue Pill” is not a board type in the menu.
I guess for 99% of users this would not be an issue, as “generic stm32f103c” means Blue Pill, or Red Pill or Black Pill.
But for some users, Generic STM32F103C means their board, which is not one of the above.
However I suppose that very few board break out the SWD pins as GPIO, so perhaps we should bite the bullet and do this now.
testato
Sun Dec 25, 2016 5:24 pm
yes, sorry, i used Bluepill name only because this is the most famous STM32 board,
But like you said, this will be a good things for all board, not only the generic ones,
I mean that it is good remove this behavior from all the stm32duino core, on every board, also for F3/F4 (if it is present on that board also)
But like you said, this will be a good things for all board, not only the generic ones,
I mean that it is good remove this behavior from all the stm32duino core, on every board, also for F3/F4 (if it is present on that board also)
ahull
Sun Dec 25, 2016 10:48 pm
RogerClark wrote:
However I suppose that very few board break out the SWD pins as GPIO, so perhaps we should bite the bullet and do this now.
However I suppose that very few board break out the SWD pins as GPIO, so perhaps we should bite the bullet and do this now.
RogerClark
Mon Dec 26, 2016 9:52 am
I pushed a change for this.
Please feel free to test this change ![]()

