cancel
Showing results for 
Search instead for 
Did you mean: 

Pin PB4 is pulled high during reset for a stm32F103

JGaby.1
Associate II

I am using an stm32F103 and have configured PB4 as a output pin and this works correctly. However when the chip is reset, this pin is automatically pulled high. It appears that this behavior exists because of the pin's dual use as NJTRST. Is there a way I can reconfigure the chip so that this pin will no longer be pulled high when the NRST pin is pulled low?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

https://www.st.com/resource/en/reference_manual/rm0008-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=171

Ok, not seeing that in the RM, are you sure it's not running the System Loader based on BOOTx pins.

Not saying you're wrong, but not used the F1's in projects for over a decade..

Ok, so mentioned as a PU here, looks like you're SOL

https://www.st.com/resource/en/reference_manual/rm0008-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=161

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

View solution in original post

8 REPLIES 8
Trevor Jones
Senior

You might have to move the function to another pin.

You can set the initial state of most of the pins, but not Reset.

This is a hardware function. It needs to be high to accept an incoming Reset signal.

Is it from a component on your JTAG header, or from the Pod?

I don't recollect it being a pull-high at reset pin, but the RM (RM0008) might be more specific, including the initial states for GPIO bank registers.

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

I am using Serial Wire for debugging, not JTAG. PB4 definitely goes high when I pull the reset low. It will also go high if I download a new program using STM32CubeMX with an ST Link V2. It will stay high until I run the program which configures PB4 to be an output pin with the low state.

https://www.st.com/resource/en/reference_manual/rm0008-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=171

Ok, not seeing that in the RM, are you sure it's not running the System Loader based on BOOTx pins.

Not saying you're wrong, but not used the F1's in projects for over a decade..

Ok, so mentioned as a PU here, looks like you're SOL

https://www.st.com/resource/en/reference_manual/rm0008-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=161

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

I guess I was hoping there was a way to override that behavior but I guess not. I may need to reassign the pin but since I am using every single pin atm that may be difficult.

Anyway, thanks for the help.

Its all bad news, sorry to say..

I found these in the manual

TrevorJones_0-1740286484659.png

TrevorJones_2-1740286619018.png

TrevorJones_3-1740286663318.png

 

it looks like this stuff is only available after Reset:

TrevorJones_1-1740286546171.png

 

Perhaps reassign less critical pins, say ones you've connected to LEDs

Yeah the F1's a bit of a pig when it comes to peripherals and pin mapping/remapping options. It was the first design, subsequent ones had much simpler AF muxing/mapping options at a pin level.

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

Thanks all for your help.