I am using gsm module with arduino/teensy at higher baud rate(921600). I want to know,which is the best way to handle uart errors, parity check or crc check and how can i implement it while communicating with gsm device?
I do not know the gsm module. Be sure to set the gsm to parity odd or even and then the arduino the same. Be sure the baud rates are right on, miss match causes problems. The second option is to set the gsm device to CRC then properly process it on the arduino side. If you cannot program the gsm you have to take what it gives you. Baud becomes extremely important as there is no error checking. The only thing left that I can think of is range and rate of change testing. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
I cannot program GSM module, so does that mean i can only read whatever is coming from gsm and cannot perform any error checking on that? I have implemented hardware flow control to limit error while sending or reading from gsm.
MohitB:
I want to know,which is the best way to handle uart errors
What makes you think there might be UART errors?
Can you change the baud rate?
I am not familiar with the Teensy but I know the Uno and Mega work best at either 500,000 or 1,000,000 baud because it is an even multiple (or is is divide?) of the 16MHz clock. Perhaps the Teensy also has preferred baud rates?
...R
I have read people mentioning on several forums that operating uart at higher baud rates may have errors while reading data. I just wanted to know if we can implement any error checking for slave devices like gsm. Also, if anyone can tell how to use parity check while reading data from Serial1.read() function, it will be helpful.
You can only implement error checking if the device sending the data implements some system - for example if it includes a CRC byte in every message or if it implements parity checking.
The most usual serial communication system is 8 bits, No parity and 1 stop bit (8N1).
...R