JLink debugging blue pill using the Sloeber IDE

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: JLink debugging blue pill using the Sloeber IDE

Post by kostbill » Sat Aug 12, 2017 3:12 pm

Hi victor, now I understand what you say, that even if I am connected with JTAG, as soon as it hits the instructions that disable JTAG and enable SWD, I will no longer be able to use JTAG.

I was under the impression that normal code would not bother to do that, and that it would happen only when this is configured from the debug configuration that SWD will be used.

If this is not the case, do you happen to know where is this piece of code located? I searched for AFIO_MAPR (this is the register, in which the fields SWJ_CFG[2:0] are controlling the JTAG-SWD configuration) but didn't find anything related in the libraries.

Theses are the bits:

Code: Select all

Bits 26:24 SWJ_CFG[2:0]: Serial wire JTAG configuration
These bits are write-only (when read, the value is undefined). They are used to configure the
SWJ and trace alternate function I/Os. The SWJ (Serial Wire JTAG) supports JTAG or SWD
access to the Cortex® debug port. The default state after reset is SWJ ON without trace.
This allows JTAG or SW mode to be enabled by sending a specific sequence on the JTMS /
JTCK pin.
000: Full SWJ (JTAG-DP + SW-DP): Reset State
001: Full SWJ (JTAG-DP + SW-DP) but without NJTRST
010: JTAG-DP Disabled and SW-DP Enabled
100: JTAG-DP Disabled and SW-DP Disabled
Other combinations: no effect
But the more I read this, the more I get confused. How is it possible that both JTAG and SWD be enabled at the same time?

kostbill
Posts: 51
Joined: Mon Aug 07, 2017 7:56 am

Re: JLink debugging blue pill using the Sloeber IDE

Post by kostbill » Sat Aug 12, 2017 10:07 pm

OK made it.

Pito's guide was very nice, however Sloeber (or Eclipse) is not very good. It will randomly decide to leave a perspective blank, no matter how many times you restart. Then, out of the sudden it will restore it, and many other things like that.

I also saw what victor was saying and of course he was right, Pito also spotted this some time ago, I saw it on his guide.

Now I am having other problems but hopefully these will be solved as well :).

Thanks everyone for your help.

Bill.

User avatar
Pito
Posts: 1592
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: JLink debugging blue pill using the Sloeber IDE

Post by Pito » Sun Aug 13, 2017 7:49 am

It will randomly decide to leave a perspective blank, no matter how many times you restart. Then, out of the sudden it will restore it, and many other things like that.
Not seen here at least for last 4 months..
Pukao Hats Cleaning Services Ltd.

Post Reply