cancel
Showing results for 
Search instead for 
Did you mean: 

SPC58: Is there a way to know if UART has started a reception?

Yannek
Associate III

I am implementing a semi-duplex multimaster communication (based on RS-485), so before start sending message I need to know if any other node isn't transmitting anything. As far as I see the first information about any received transmission is UARTSR.DTF bit, which is set after reception of full byte.

I need to know if UART has started a reception (start bit received) or if any activity appears on RX line.

Checking RX line state is not sufficient, because I can miss the moment when it is in '0' state. I'd rather avoid to engage external interrupts too, because it would use significant time of CPU and make solution very complex.

10 REPLIES 10
Erwan YVIN
ST Employee

Hello ,

is this bit could be useful ?

RFNE : Receive FIFO Not Empty RFNE bit is set by hardware in UART FIFO mode (RFBM = 1), when there is at least one data byte present in the receive FIFO. RFNE is a read-only bit for debugging purposes. This flag can be used by software in case of a timeout event.

Best Regards

Erwan

Yannek
Associate III

Thank you Erwan, but no, it is not what I need.

I need to know when UART starts receiving a byte, not when it has been completed. Reception starts at the moment of negative edge of "start bit" and I need to know when this happens.

Is it possible?

Best,

Yannek

Yannek
Associate III

Any update please?

Thank you Erwan, but no, it is not what I need.

I need to know when UART starts receiving a byte, not when it has been completed. Reception starts at the moment of negative edge of "start bit" and I need to know when this happens.

Is it possible?

Erwan YVIN
ST Employee

Sorry ,

I do not see any clue except the chapter 45.3.4.7 UART Transmitter from RM SPC582Bx (i assume)

on BDR0

0693W00000GY1KYQA1.png Best regards

Erwan

And why are you writing about transmitter while I am asking about RECEIVING data?

Uwe Bonnes
Principal III

Can you activate an additional interrupt on the RX pin and activate the IRQ at end of Transmssion?

I believe you meant "Start of Reception".

Unfortunately there is no EIRQ on the pin I use for reception. I will try to check if WakeUp unit is capable to do so, but I'd rather have confirmation from the first hand if I really have to.

Since LinFlex/UART module knows when start bit arrives, it would be a little bit strange if it does not share the information anyhow.

Sorry ,

i have missed your first requirement 😉

I see only the check on this flag (RXBUSY)

if RXBUSY (1), Reception is ongoing then started 😉

0693W00000GY1XwQAL.pngor maybe RDI Flag.

Best regards

Erwan