cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L412 UART Interrupt not working

VinodJoshi
Associate

Hi,

I am new to STM32. I am facing problem with UART interfacing.

I have connected UART to GSM modem and I am using AT Commands to interface with modem. To test the commands and its response, I have connected the serial sniffer (UART to USB converter) which is connected to terminal on PC to check the commands. Entire system works fine when I connect the USB to UART converter and receiving data on PC terminal. 

But when I remove the terminal, my received data gets corrupt and I receive wrong characters on the UART. May I know what care I need to take. Many received characters are correct, but few of the characters either missed out or incorrect, this makes packet either incomplete or wrong which creates problem in the data parsing.

We have also checked the UART packets on CRO and voltage lines are connect and there is no noise in the data packet.

I checked following: 

1. I checked the ground, both grounds are connected, i also tried with only ground pin of UART to USB converter and removing the UART lines.

2. I also checked that controllers BOOT 0  line is pulled down,

 I have also tried with HEX file and elf file.

Please help me in getting this problem resolved.

Regards

Vinod Joshi.

1 REPLY 1

Not sure how the HEX / ELF file has any relevance to the issue. BOOT0 pin would only impact if your code runs, or not, not really indicating that it's not running, just not working properly/well.

Show your code. Show a circuit diagram of what you've implemented.

You can get data loss if you're using blocking functions, and basically forcing half-duplex communication where you want concurrent receive and transmit.

At a guess you're doing a poor job at forwarding the data back and forth. You don't mention a board, but guessing a NUCLEO-L412 of one model or another. Be specific.

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..