cancel
Showing results for 
Search instead for 
Did you mean: 

SWCLK AND SWDIO ?

vitthal muddapur
Associate II
Posted on June 07, 2018 at 21:58

Hi,

i am beginner in stm32

I configured SWCLK AND SWDIO for Serial Debugging.

Can I Change SWCLK and SWDIO as input and output at runtime?

If Change the MCU is RESET or Not?

11 REPLIES 11
Posted on June 08, 2018 at 12:43

PA4 for EEPROM CS line and PA15 for GSM Control

Posted on June 08, 2018 at 12:48

Writing 0x8000 or 0x0000 into GPIOA->ODR in most cases shouldn't cause the part to reset. That it resets in your situation suggests some other external connectivity, or paths, that result in the part resetting. For example one of the pins shorting with VDD, or causing some other chip to assert NRST causing a global reset. In the case of a GSM modem perhaps the massive draw of current beyond the capacity of the regulators/supply to sustain an operating voltage, causing a brown-out where the POR circuit thresholds.

Look at the design and implementation of the board at a higher level.

Try different bit patterns on GPIOA->ODR to identify the specific pin(s) being the issue, ie write 0xFFFE, 0xFFFD, 0xFFFB, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..