In a project I am using the PB3 pin (STM32F103V) for the SPI3 port. As this pin, by default, is configured for JTAG, I have to change the function of it when booting.
According to the RM0008 manual the SWJ_CFG bits of the AFIO_MAPR register must be set with the following values:
- 000: Full SWJ (JTAG-DP + SW-DP): Reset State
001: Full SWJ (JTAG-DP + SW-DP) but without NJTRST >> Free PB4
010: JTAG-DP Disabled and SW-DP Enabled >> Free PA15, PB3 & PB4
100: JTAG-DP Disabled and SW-DP Disabled >> Free PA13, PA14, PA15, PB3 & PB4
Other combinations: no effect
With this configuration the spi3 port works fine but it is impossible to debug the program because the debugger crash with "No device" message.
MikroProg for ARM is configured for SWD and I use st-link as hardware.
Any suggestions to fix the problem?