I am currently using an STM32F401RE that I have to interface with a SIM800L GSM module via UART. In a first "toy example" I used Arduino and found no problems, but passing to the STM MCU I am unable to receive any kind of answer from the module. I am starting to suspect that the output voltage levels of the board are incorrect for the GSM module. SIM800L requires an input signal between 2.5 and 2.8 Volts, that Arduino (5V) can easily provide, and that I was able to provide also with a converter from my PC USB. Trying to dig into the MCU datasheet I got stuck into this table. Honestly speaking I am not properly an electronics guy so I am not able to fully understand my MCU UART TX pins to which line of the table belong, but however it is quite obvious that potentially in none of the reported cases I can really get the voltage required by GSM board. So my questions are:
- May my suspect about wrong logic levels really be the fault in my connection?
- If so, how can I adjust my MCU pin voltage to adapt to the GSM module?
EDIT: I connected the MCU to the GSM module as suggested by the datasheet of the productor for 3.3 interfaces (obviously rx-tx, tx-rx the image is faulty). The only pins involved in my case are transmission and reception and ground and supply, so ignore the rest for the UART protocol.
For what concerns the code there is not so much to speak about, simple transmit and wait for a response in polling or interrupt mode. UART is set in 8N1, as Arduino SoftwareSerial that I successfully used does by default. Peripherals initialization code was automatically generated by CubeMX. Messages are correctly send by the MCU, just by checking with a terminal. Doubting about hardware is my last idea, but in this case I can't see other options for my short experience.