cancel
Showing results for 
Search instead for 
Did you mean: 

When I set the AF to 5 on GPIO PB4 of my STM32F769 it hangs. Why?

Posted on March 17, 2017 at 14:34

As per the title, setting the AF of GPIO PB4 to 5 on my STM32F769 hangs the micro. The code was generated by the STM32Cube tool, and all the other GPIO pins get configured fine. I tried changing the code to set the AF to 8 and that hangs, but 'changing' it to 0 (the default) works fine? I've checked the datasheet and AF=5 is what I want because I want to use PB4 for SPI1_MISO.

Any clues?

2 REPLIES 2
S.Ma
Principal
Posted on March 17, 2017 at 18:20

Is it a custom board or a Nucleo/Discovery? The alternate 0 is the JTAG reset input signal.

Wonder if the JTAG pin should be disabled first prior to using different alternate, or if there is a specific sequence for this? It might be the same as when developpers want to reuse SWD debug pins for the application (and no longer be able to debug)

Posted on March 18, 2017 at 12:13

It's a custom board. I think you've put your finger on it regarding the JTAG TRST. The debug pods don't seem to need TRST, so I didn't try and hook it up to anything and promptly forgot about it. The STMCube32 tool also didn't throw up any warnings...