Jump to content

How to check error when using UART?

Recommended Posts

You could get the MSP430 to echo back what it's received (or a checksum byte). It depends what the rest of your application is doing.


I dont want it to echo all income data back because I will send another data back.


I want to know how the parity works in this situation.

Link to post
Share on other sites

If your question is how to enable parity and check it, I don't think there's anything in energia to make this happen (or the documentation is outdated)

If you don't need all 8 bits, you could use the msb as a parity bit and implement it in software.

So how to enable parity checking in ENERGIA?


In the other word, I want to make CRC checking while TX and RX.

Anyone has done this before?

Link to post
Share on other sites

I just checked the serial code in energia, you can't do it directly.


I suppose you could play with the registers after doing a serial.begin to enable the parity bit but I don't know if this would conflict with the interrupt routines.


Try this way:

Computer transmits another byte named CRC.

On MCU, it will generate a CRC to check whether it matches with CRC code from Computer.


But I don't know where to find CRC function in energia.


I need CRC 8 Function.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...