2025-02-22 06:33 PM
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.
Solved! Go to Solution.
2025-02-22 08:16 PM
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
2025-02-22 07:45 PM
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.
2025-02-22 07:52 PM
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.
2025-02-22 08:03 PM
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.
2025-02-22 08:16 PM
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
2025-02-22 08:44 PM
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.
2025-02-22 08:58 PM
Its all bad news, sorry to say..
I found these in the manual
it looks like this stuff is only available after Reset:
2025-02-22 09:09 PM
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.
2025-02-22 09:28 PM
Thanks all for your help.