AnsweredAssumed Answered

Mapped SWD pins and bricked the device

Question asked by dripburn on Jan 19, 2016
Latest reply on Jan 19, 2016 by Clive One
Hello, ST community!

I'm developing firmware for a custom board (schematics not available) based on a STM32F207VCTx MCU. Everything worked fine until I uncommented and executed a piece of code responsible for initializing a pair of motor controller boards:

    GPIO_InitTypeDef GPIO_InitStructure;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
    GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
    GPIO_Init(GPIOA, &GPIO_InitStructure);
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
    GPIO_Init(GPIOB, &GPIO_InitStructure);
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
    GPIO_Init(GPIOB, &GPIO_InitStructure);
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
    GPIO_Init(GPIOA, &GPIO_InitStructure);
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;
    GPIO_Init(GPIOA, &GPIO_InitStructure);

Normally, PA13 is SWDIO, PA14 is SWCLK for serial debug, however the board constructor has reused them due to pin shortage. 

After enabling the code everything was initially working fine. The third time I flashed the chip, it stopped responding, blank OLED, no signs of activity. Keil reports a "SWD Communication Failure" error. Perhaps opening the port introduced some sort of interference that corrupted the firmware? Or did I genuinely burn the chip?

I've pulled the BOOT0 pin to high, BOOT1 to ground and also a couple of permutations, tried connecting under reset, but to no avail, Keil still gives the same error message.

Using the ULINK2 probe. Any suggestions on how to resurrect my board would be appreciated.