cancel
Showing results for 
Search instead for 
Did you mean: 

Space Parity Setting on STM32L010RB

Purnima_wbe
Associate II

I want to send data from my STM32 to another micro controller and I want to enable space parity, there is no setting to enable it, the only settings are none, odd and even. For space parity i want the parity bit to always be 0.  I am using 9 bit UART including parity bit. I have tried to maintain even parity meaning the data has even number of 1s so even parity is 0 always but that doesn't help. I am using Barry terminal to check the transmitted data in that when parity is set even or none then only data is received, with space parity settings its not received. Is there any way in which i can ensure that the parity bit is 0 always and I get the data with space parity settings?

Any help is appreciated. Thanks.

13 REPLIES 13
PGump.1
Senior III

Hi,

Just use 9 bit setting with parity disabled... Data bit 8 is your parity... (make sure you are using 16 bit transfers if you want to write to bit 8).

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.

Hi,

I tried that but in that case parity setting as NONE is working. I want it to work with space parity . Here is the screen shot of the terminal. when i set parity as none only in that case I am getting the data not under space.

Purnima_wbe_0-1729834423943.png

 

PGump.1
Senior III

Hi,

What do you get if you select Mark parity?

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.

Hello, I do not get anything.

Hi,

Without an oscilloscope image of the TX data, I'm going to say you have a bug with your Terminal program...

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.

Actually, I don't think "standard" PC uarts can do Mark/ Space parity...

 

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.

Actually ,I have an 8051 which will be on the receiving end, I have checked with it, I am able to transmit data from that and get the data when parity is set as space on PC . And due requirements I am not able to change this UART settings on 8051 (9 bit including parity where parity bit is 0).  

PGump.1
Senior III

Hi,

Then you'll need to post an oscilloscope view of the TX data...

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.

Hi, here it is, i am transmitting

 

Purnima_wbe_0-1729841511773.png