protocol related argument bit for auto data format in xmc4400

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello Everyone,
I am a newbie to XMC controllers. I am using xmc4400 series controller for my project in which I am using uart peripheral. in USIC communication I didn't understand the meaning of PAR(Protocol related argument) bit in RBUFSR(Receive buffer status register). I need to understand the meaning of this bit as it is related to parity error. I want to do auto format detection in my project.
if anyone have understood meaning of this bit please help me with this and also if anyone has the algorithm for auto format detection can u please provide me , I am using the following algorithm.
suppose master sends the data with following data format------8 data bits,2 stop bits, parity disabled baud rate fixed at 115200.

my algorithm
default case- data format 8 data bits, even parity , 1 stop bit
case 1: data format 8 data bits, odd parity , 1 stop bit
case 2: data format 8 data bits, parity disabled , 2 stop bit
Steps:
1. wait for data to be received.
2.data received- if parity error change to next case of data format go to step 1, if no error go to step 2
3.(valid data so the present data format is the right data format, save it)process the received data.

but sometimes even if the data format of master and slave is not same RBUFSR.PERR is not getting set and RBUFSR.PAR is getting set.
can someone plz give me detailed understanding of this both bits or at least of RBUFSR.PAR bit .
I am using DAVE IDE.

thank you.
0 Likes
1 Reply
Not applicable
Hi asma,

The RBUFSR.PAR indicated the parity value, so it could be either 1 or 0 depending on received data.
As for RBUFSR.PERR, this is indicated whether there is parity error on the received data or not.
0 Likes