Question
STM32F407ZGT, SPI3 and Debugging with SWD
Posted on January 12, 2015 at 10:52
However when I set a breakpoint SPI3 fails as SCK outputs something. I can also see that AFRL3 is always changed back to 0 and OSPEEDR3 is always changed back to 3. Can anybody give me advice how to solve this issue?
Hello,
i'm using an STM32F407ZET6 with SPI1, SPI2, SP3 and SWD. SPI1 and SPI2 are always working fine. SPI3 works when the CPU is running without debugging. Whenever I set a breakpoint SPI3 Clock (PortB3) has strange pulses. I checked how to disable JTAG on STM32F4 in RM0090. It shoud be done automatically when Changing the Pin Configuration: ... GIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; ... And changing the Alternate Function mapping: GPIO_PinAFConfig(SCK->GetPort(), SCK->GetPinSource(), GPIO_AF_SPI3); Both is done in my code and as SPI3 is working (logic analizer and SPI-Chip is responding) as long as I break debugging via breakpoint or halt.
However when I set a breakpoint SPI3 fails as SCK outputs something. I can also see that AFRL3 is always changed back to 0 and OSPEEDR3 is always changed back to 3. Can anybody give me advice how to solve this issue?
