This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200: How to set parity bit in Energia

Part Number: CC3200
Other Parts Discussed in Thread: ENERGIA,

I want to set even parity for Modbus communication between an energy meter and cc3200 in Energia, please guide me , how can I set my parity bit? I have already posted this question on energia forum here at 

 

but nobody has answered to my query.  I tried to change the HardwareSerial.cpp file to UART parity to be EVEN. But on serial monitor I'm not getting correct results with some garbage looking characters.There is provision with Arduino to set a parity bit as Serial.begin(9600,SERIAL_8E1) but it does not work with Energia. It seems like that Energia uses NONE parity with 8 data bits and 1 stop bit. and it is non-configurable. So if I want to set an Even parity, how should I do that? Please guide.

Thanks.

  • Hi Techinspired,

    Thanks for your question. Please allow some time for us to respond.
  • I'm sorry nobody has answered on the forum--maybe try posting again in a few days?  From what I can tell from the energia API the command Serial.begin(9600,SERIAL_8E1) isn't supported.  Unfortunately I am not familiar enough with the API, but it looks like you find more info below.  This also just may not be a supported feature.

  • Hi Austin,

    Thanks a lot for your reply!

    Yes, you are right ! Serial.begin with parity set bit is not supported by Energia version 1.6.10E18 and also in previous versions But you can change it in Hardware.Serial.cpp for cc3200 . Since I was unable to find Hardware.Serial.cpp for cc3200 in Energia version 1.6.10E18, So I downloaded the Energia 0101E0016, where I changed the Hardware.Serial.cpp for cc3200 for EVEN parity ....and it works!

    Thanks for your help.