Disabling JTAG PINS on STM32f103RCT6

100 views Asked by At

In my newest project with STM32f103rct6 I have to use all Pins, including JTAG ones. I've checked reference manual, I know I have to deal with AFIO registers. So to completely disable JTAG pins, I have to write 100 on SWJ_CFG[2:0] which is the bit 24,25 and 26 on AFIO->MAPR register. So I coded:

AFIO->MAPR|=(1<<25);
AFIO->MAPR&=~(1<<24);
AFIO->MAPR&=~(1<<23);

The problem is after doing this the console on CUBEIDE shows:

Target is not responding, retrying...

What Am I doing wrong? I have to use all PA13,14,15 and PB3,4 Pins. Any help would be appreciated!

I checked Reference manual it didn't work.

0

There are 0 answers