0
\$\begingroup\$

I have STM32L053 (link to overview) and I have been using STM32CubeL0 as UART examples. Also I connected FT232RL FTDI module.

Scheme

Everything was fine. SIM800L and FTDI modules were working fine. Next day with same configuration modules didn't respond. I connected STM32 TX (PA9) pin to oscilloscope. So it is sending something.

enter image description here

Ok, I thought maybe FTDI went down so I tested with Arduino. It worked perfectly. Then I tried STM32 TX connect to Arduino RX. There are the results. A few symbols for some reason received wrong. FTDI does not respond to this and also Sim800L because it doesn't recognized as serial communication?

Here are my code: link

enter image description here

\$\endgroup\$
0
\$\begingroup\$

It seems to be signal level issue. If the oscope screenshot indicates correctly, then you have 1V difference between low/high (1 division), which is definitely too low (SIM800L has 0.7V max for low and 2.1 min for high. Everything inbetween is noise.

Disconnect FTDI monitoring and measure levels. You might need pull-up on UART lines to some known level (say 3V3).

Even if you have 2V/div setting on oscilloscope, it seems rather close to 2V1 minimum. And the short (not full-level) peaks in the middle of the packet also are in the gray area.


EDIT

There seems to be a typo in the spec sheet of SIM800L. It's 2.4V high and 0.4V low. Another thing is that arduino uses TTL (5V), while STM has 3V3. Some of the bits might be fine from the STM perspective, while for Arduino they are in the gray area and are discarded as noise, hence the weird characters

\$\endgroup\$
  • \$\begingroup\$ If that's the case then setting the output speed on TX might help - higher speeds increase drive strength \$\endgroup\$ – Jan Dorniak Nov 9 '18 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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