2016-01-19 07:08 AM
Hello, ST community!
I'm developing firmware for a custom board (schematics not available) based on ahttp://www.st.com/web/catalog/mmc/FM141/SC1169/SS1575/LN9/PF250188?sc=internet/mcu/product/250jsp
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;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOA, ENABLE);
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.
#swd #stm32f207vc #brick
2016-01-19 07:51 AM
If the BOOT0 pin high trick doesn't work it's more indicative of an issue with NRESET or power pins.
You could also try via USART1 or USART3 into the ROM's System Loader and check for signs-of-life that way, Send 0x7F at 9600 baud 8E1