2024-01-16 07:18 AM
Hello everyone, I need help .I noticed a very interesting problem, which is this.
I use STM32F429I-DISCO1 when I activated I2S_2 in the master mode PORTB_13 pin = CLK , but in reality it was always = HIGH level , after that I deactivated I2S_2 and configured it as an output pin , speed= very_high . Also no reaction, when checked with a tester that pin again everything is fine, the pin is brought out , then I looked at the board schematic, it turns out that this pin is connected to the USB OTG as VBUS_FS, I also disabled the USB_OTG function, it didn’t help either. On the other hand, I think if it’s not possible to use this pin, why in CubeMX is this pin not disabled?
Thanks in advance.
Solved! Go to Solution.
2024-01-18 07:42 AM
Thank you very very much, when I OTG_FS_PSO = PC4 pin configured as OUTPUT and HIGH level , then the pin PORTB_13 started working normally. But I think in the future , somewhere about communications of these pins(PC4 and PORTB_13) , it is worth mentioning in some manual document .
2024-01-16 07:49 AM
The main problem with PB13 is, that there's a relatively big capacitor, C53, connected to it.
You have to remove it (and of course you must not switch on the power switch).
JW
2024-01-17 08:26 AM
Thank you very much for your response, I removed the capacitor C53, configured PORTB_13 pin as an output,
in the main loop while(1) I do HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_13); ,
the interesting thing is that when I set the pin speed = very High or low,
then the pin to not working(always is HIGH) when pin speed = Medium or High , then it starts to work but very crookedly, say ~1.5 mSec
does not work (the level is only HIGH), then ~0.2 mSec works, again ~2.1 mSec does not work,
then ~0.3 mSec works, again ~1.8 mSec does not works , ... . Maybe the
microcircuits(chips) U8(STMPS2141STR) or U7(EMIF02-USB03F2) or R65 give affects
the normal operation of this PIN_13. ?
Is it possible to somehow disable this part of the circuit?
2024-01-18 01:23 AM
How do you observe the pin, exactly?
If it's a logic analyzer, make sure its decision level is at around 3V/2=1.5V, and sampling frequency is up to the output frequency of the pin, or, try to run the mcu slower.
> Maybe the microcircuits(chips) U8(STMPS2141STR) or U7(EMIF02-USB03F2) or R65 give affects
the normal operation of this PIN_13. ?
They should not. R65 has a big enough value to not cause any significant effect; EMIF02-USB03F2 is just a protection diode array which won't interfere with a signal below 5V.
STMPS2141 is switched off as long as OTG_FS_PSO = PC4 is default/input (thanks to the pullup) and unconnected; or set as output and high.
JW
2024-01-18 07:42 AM
Thank you very very much, when I OTG_FS_PSO = PC4 pin configured as OUTPUT and HIGH level , then the pin PORTB_13 started working normally. But I think in the future , somewhere about communications of these pins(PC4 and PORTB_13) , it is worth mentioning in some manual document .