uart 9bit data 62,5kbps

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

cross mob
HeKa_1704711
Level 2
Level 2
First like given Welcome!

Hi

I try to receive 9 bit Data on uart.

I know that the 9th data is in the Mark/Space reg.. Unfortunately I do not find out how I got there.

An other problem is that I not receive a Buffer sice. what am I doing wrong? I use the uart(SCB-Mode) v4.0 on the CYBLE-224116-01

SW:

CyGlobalIntEnable;

UART_2_Start();

for(;;)

{

     if(UART_2_SpiUartGetRxBufferSize()!=0)// data received?

     {

          test_pin_Write(1);     //set pin 1

          ZentralIn=UART_2_UartGetByte(); // read out 8 bit

    

          //read out 9th data??

    

     }

}

thanks

Heidi

0 Likes
1 Solution
HeKa_1704711
Level 2
Level 2
First like given Welcome!

So I've tried a lot now. I am now convinced that it can be easily read out of the function. Sometimes it is better not to read the datasheet, then I would have to tried it immediately.

uint32 test;test=UART_2_UartGetByte();

if (<= 0x1FF)//no error

{

     if (test>=0x100)//bit 9 set

     {

              

     }

     else//bit 9 clear

     {

     }

    

}

else// error
{

    

}

View solution in original post

0 Likes
3 Replies
HeKa_1704711
Level 2
Level 2
First like given Welcome!

So today i try it with an clock form terminal, and now it works.

I get the buffersize and the 8 databits.

But how to read out the 9th data bit?

can sohome one help me?

what i found in the forum is:

if(UART_1_ReadRxStatus() & UART_1_in_RX_STS_MRKSPC)

but thease are undefined funktion. So have I to adjust something?

also in the uart functions I find nothing with mark oder parity.

0 Likes
lock attach
Attachments are accessible only for community members.

hier ist the the complett project

0 Likes
HeKa_1704711
Level 2
Level 2
First like given Welcome!

So I've tried a lot now. I am now convinced that it can be easily read out of the function. Sometimes it is better not to read the datasheet, then I would have to tried it immediately.

uint32 test;test=UART_2_UartGetByte();

if (<= 0x1FF)//no error

{

     if (test>=0x100)//bit 9 set

     {

              

     }

     else//bit 9 clear

     {

     }

    

}

else// error
{

    

}

0 Likes