1
\$\begingroup\$

I designed an stm32mp1 mpu based pcb. When I connect from the m4 core and send the uart message, everything is as it should be. However, when I start the first stage bootloader from the a7 core, a one-character parasitic symbol appears as soon as I power the power supply.enter image description here How can ı solve that?

enter image description here

My cable connection is like this. I put a 220uF capacitor on the power line of the Board, but the result is still the same.

enter image description here

more closer

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

\$\endgroup\$
10
  • 2
    \$\begingroup\$ What makes you think it's a hardware problem? Does the program clear all flags etc before enabling the UART? What does the signal look like when you probe it with your scope? \$\endgroup\$
    – Lundin
    Commented Jul 3 at 9:40
  • \$\begingroup\$ The problem will not be solved by sprinkling big honking capacitors randomly. You need to show the connections between and around the MCU and the RS-232 transceiver, but even without it it may be guessed easily. \$\endgroup\$
    – Justme
    Commented Jul 3 at 9:54
  • \$\begingroup\$ I add scope startup image, my gnd probe is springed (so there is no big loop),I also boot from SD card, no SD card inserted \$\endgroup\$
    – Electronx
    Commented Jul 3 at 10:02
  • 1
    \$\begingroup\$ @Electronx The scope pic confirms that is what is output from RS-232 TXD to PC, i.e. garbage. What is needed to see what causes it is in the schematics or missing from the schematics. \$\endgroup\$
    – Justme
    Commented Jul 3 at 10:05
  • \$\begingroup\$ @Electronx PCB design files do not show anything relevant to the problem. Schematics do. You need to tell which RS-232 chip you used and what are the connections between MCU and the chip, preferably how they are powered too. It seems that you are using diferent supplies for MCU and transceiver so then you need to show how the supplies start up in relation to each other too. \$\endgroup\$
    – Justme
    Commented Jul 3 at 10:36

1 Answer 1

1
\$\begingroup\$

First issue is that there is no pull-up resistor on MCU TX pin.

Therefore when the board powers up or the MCU resets, the MCU TXD pin is floating and can be in any state and the RS-232 transceiver will transmit that garbage as it does not know it is invalid transmission.

Second issue is that also the unused DIN2 input pin of MAX3232 has no pull-up resistor and it floats at random voltage. I recall reading here questions why MAX3232 (or clones of it) designs got fried without explanation and on those designs the pull-ups were missing. The difference is, MAX3232 requires external pull-ups and MAX232 does not because it has internal pull-ups.

Since you are powering the MAX3232 chip with 5V, you might be able to change it directly into a MAX232 so you don't need to add pull-up resistors. But the downside is, the MCU pins would be pulled up to 5V. They should be 5V tolerant pins, but it is also true that a 3.3V output pin should not be pulled up to 5V.

Perhaps try putting two 10k to 100k pull-ups, one to 3.3V for the TXD and one to 5V for the unused DIN pin.

Another reason why the MAX3232 may send out garbage is that the power supplies may start with 5V first and 3.3V for the MCU later, so that also makes the MAX3232 see that it should transmit out garbage when TXD is still 0V from unpowered MCU.

It is also weird that you used a 3.3V capable MAX3232 chip but decided to power it separately with 5V, it might be simpler to keep using MAX3232 but add the pull-ups and change to power it from same 3.3V as the MCU.

If you do change to MAX232 or change the MAX3232 supply voltage to 3.3V, you also need to change the charge pump capacitor values to match the chip and/or supply voltage.

Generally, many designs may send out garbage or at least make the PC see garbage when they power up, so that's not a huge issue.

The huge issue is that there are no mandatory pull-ups on MAX3232 DIN pins.

\$\endgroup\$
4
  • \$\begingroup\$ Should be pull-up on the Rx line too. And well, they probably shouldn't switch to MAX232 either, since that's a dinosaur part. MAX202 or some such is the least bad, allows for smaller caps etc. \$\endgroup\$
    – Lundin
    Commented Jul 3 at 11:24
  • \$\begingroup\$ @Lundin Why a pull-up on MAX3232 output to MCU input, makes little sense - either it outputs 5V or 0V based on received data or being powered at all - the pull-up will be useless. And I guess you are right, I don't mean the original MAX232 but MAX232A or a any similar modern version of it with 100nF caps. \$\endgroup\$
    – Justme
    Commented Jul 3 at 14:10
  • \$\begingroup\$ Ah yeah nevermind I confused it with another half duplex MAX part. Pull up on Tx from MCU should be sufficient indeed. \$\endgroup\$
    – Lundin
    Commented Jul 3 at 14:14
  • \$\begingroup\$ @Lundin And on the unused floating MAX input. But still it will send garbage if 5V turns on first while MCU pins are at 0V, though, 5V tolerant MCU pins don't have ESD clamps to supply. I did forget to check if 5V tolerant pins tolerate 5V while MCU is unpowered, thanks for reminding. \$\endgroup\$
    – Justme
    Commented Jul 3 at 14:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.