Hello @WeActStudio.
When designing the board on which BlackPill stm32f401ccu6 was planned to be placed, I made a mistake when creating the CH340G circuit.
It was necessary to power the microcircuit from 3.3 volt, either through a converter, or two diodes.
Or use a level shifter.
But that's all I'll do in the next PCB.
In general, I soldered the board, and it turns out that 5 volts were supplied to PA9 and PA10.
My schematic(((
Pins TX/RX have a voltage level of the CH340G microcircuit, namely about 4.7-4.9 volts.
And this level was fed to the inputs PA9/PA10, where 3.3. volt...
The most interesting thing is that the whole scheme worked and gave me data from the gyroscope sensor in serial port.
I had an MPU9250 sensor connecting by I2C bus SDA-PB7, SCL-PB6 and the microcontroller received data on this bus from the sensor and transferred them to the UART port, i.e. COM port, which was created by the CH340G chip.
I tested the board for about a week, and today the serial port stopped outputting data...only garbage.
I began to figure it out - when there is no device on the I2C bus, then the data quietly goes to the UART on the CH340G in the serial port, but even when there are devices, and the sketch is launched to check the address of the device, everything works.
When I install an MPU9250 sensor or another device on the I2C bus and issue a port to the serial, nothing is output to the UART.
I have three BlackPills and I compared them.
If the debug board is not in DFU mode, then on the legs PA9 and PA10 3.2 volts each.
If I switch the board to DFU mode, then on two "serviceable" BlackPills I have voltage levels on PA9 and PA10 near zero (to be precise, 0.12 volts), and on the "faulty" BlackPlil one on PA9 0 volts, and on PA10 3.2 volts .
If I press the RESET button, then the voltage level drops to PA9, and 3.2 volts remains on PA10.
On the other two BlackPills and on PA9 and PA10, the level drops by 0 volts.
I wrote a sketch to press the legs to a low level, and played around with the PA10 leg - and it is pressed to zero, only up to 0.45 volts, and then 3.2 volts.
Sketch below.
The documentation says that PA10 is needed for OTG_USB.
In general, PA10 is data reception, how does it affect the output of information from the serial port?
And I2C also fails ... maybe I have something with the timer?
What am I doing wrong, or did I spoil the stm32f401ccu6 output of PA10?
The documentation says that all pins are 5 volt tolerant...
It’s very strange, if I don’t use the I2C bus, then I get the output to the serial PA10 without problems, as soon as the I2C bus works, except for the sketch address scanner, the serial port does not output anything.
Hello @WeActStudio. When designing the board on which BlackPill
stm32f401ccu6
was planned to be placed, I made a mistake when creating theCH340G
circuit. It was necessary to power the microcircuit from3.3 volt
, either through a converter, or two diodes. Or use a level shifter. But that's all I'll do in the next PCB. In general, I soldered the board, and it turns out that 5 volts were supplied toPA9
andPA10
. My schematic((( PinsTX/RX
have a voltage level of theCH340G
microcircuit, namely about4.7-4.9
volts. And this level was fed to the inputsPA9/PA10
, where 3.3. volt... The most interesting thing is that the whole scheme worked and gave me data from the gyroscope sensor in serial port.I had an
MPU9250
sensor connecting by I2C busSDA-PB7
,SCL-PB6
and the microcontroller received data on this bus from the sensor and transferred them to theUART
port, i.e.COM
port, which was created by theCH340G
chip. I tested the board for about a week, and today the serial port stopped outputting data...only garbage. I began to figure it out - when there is no device on theI2C
bus, then the data quietly goes to theUART
on theCH340G
in the serial port, but even when there are devices, and the sketch is launched to check the address of the device, everything works. When I install anMPU9250
sensor or another device on theI2C
bus and issue a port to the serial, nothing is output to theUART
. I have threeBlackPills
and I compared them. If the debug board is not inDFU
mode, then on the legsPA9
andPA10
3.2 volts each. If I switch the board toDFU
mode, then on two "serviceable" BlackPills I have voltage levels onPA9
andPA10
near zero (to be precise, 0.12 volts), and on the "faulty" BlackPlil one onPA9
0 volts, and onPA10
3.2 volts . If I press theRESET
button, then the voltage level drops toPA9
, and 3.2 volts remains onPA10
. On the other two BlackPills and onPA9
andPA10
, the level drops by 0 volts. I wrote a sketch to press the legs to a low level, and played around with thePA10
leg - and it is pressed to zero, only up to 0.45 volts, and then 3.2 volts. Sketch below.The documentation says that
PA10
is needed for OTG_USB. In general,PA10
is data reception, how does it affect the output of information from theserial port
? AndI2C
also fails ... maybe I have something with the timer? What am I doing wrong, or did I spoil thestm32f401ccu6
output ofPA10
? The documentation says that all pins are 5 volt tolerant... It’s very strange, if I don’t use theI2C
bus, then I get the output to the serialPA10
without problems, as soon as theI2C
bus works, except for the sketch address scanner, the serial port does not output anything.