Setting parity of peripheral uart BCM20732s

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

cross mob
Anonymous
Not applicable

Hi,

can i set the parity of the peripheral uart to even? Haven't found it in the API

0 Likes
1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Unfortunately, only Baud Rate and Flow Control can be set for the Peripheral UART (within BLE_PROFILE_PUART_CFG).

The hardware supports parity, but the firmware hardcodes it to no parity always.

We will consider providing a new API to set parity within the next release of the SDK.

View solution in original post

0 Likes
5 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Unfortunately, only Baud Rate and Flow Control can be set for the Peripheral UART (within BLE_PROFILE_PUART_CFG).

The hardware supports parity, but the firmware hardcodes it to no parity always.

We will consider providing a new API to set parity within the next release of the SDK.

0 Likes
Anonymous
Not applicable

Hi, do you have a release date for the new SDK. Will it be implemented for sure?

At the moment i can't use the chip, because i have to pair the chip with our current modules and i need  even parity.

0 Likes

At this point, SDK 2.0.1 is still relatively brand new.

I'm not sure what the release date will be for the next rev of this SDK.

0 Likes
Anonymous
Not applicable

Can you check? It's important as it's breaking some applications connecting to serial ports where owner can't re-configure the remote serial port.

0 Likes

The firmware team was able to come up with a patch that may resolve the issue with fixed parity on the UART.

After invoking puart_init(), try adding the following:

// Defaults
UINT16 lcr = P_UART_LCR_TXOEN_MASK | P_UART_LCR_RXEN_MASK | P_UART_LCR_RTSOEN_MASK;

if(odd_parity_needed)
{
lcr |= (P_UART_LCR_PEN_MASK);        //////// Set the parity enable bit. Default parity is odd.
}
else
{
lcr |= (P_UART_LCR_PEN_MASK | P_UART_LCR_EPS_MASK);        //////// Set parity enable bit and enable even parity
}

// Now program the uart register with the new configuration values.
P_UART_LINE_CONTROL(lcr);