Sir:
used sci parity check function , but it can't change parity
the function call as below:
/* UART Parity Check , Enable == (sciParityEnable = 1) , Disable == (sciParityEnable = 0)
sciParity==0 is Odd , sciParity==1 is Even */
void sciSetParity( sciBASE_t *sci, uint8 sciParityEnable, uint8 sciParity )
{
uint32 sci_temp;
sci_temp = sci->GCR1 ;
sci_temp = (sci_temp & 0xfffffff3U); //GCR1 bit3=0 & bits2=0
if (sciParityEnable == 1) // Enable Parity
{
if (sciParity ==1 )
{
sci->GCR1 = sci_temp | (uint32)((uint32) 1U << 2U) // Enable Parity
| (uint32)((uint32) 1U << 3U); // Even parity
}
else
{
sci->GCR1 = sci_temp | (uint32)((uint32) 1U << 2U) // Enable Parity
| (uint32)((uint32) 0U << 3U); // Odd parity
}
}
else // Disable Parity
{
sci->GCR1 = sci_temp | (uint32)((uint32)0U << 2U); /* disable parity */
}
}
Best Regard
By Ken Lin