2021-11-11 03:06 AM
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.
2021-11-12 06:31 AM
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
2021-11-12 08:23 AM
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
2021-11-16 07:15 AM
Any update please?
2021-11-18 12:54 AM
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?
2021-11-18 03:27 AM
Sorry ,
I do not see any clue except the chapter 45.3.4.7 UART Transmitter from RM SPC582Bx (i assume)
on BDR0
Best regards
Erwan
2021-11-18 03:31 AM
And why are you writing about transmitter while I am asking about RECEIVING data?
2021-11-18 03:37 AM
Can you activate an additional interrupt on the RX pin and activate the IRQ at end of Transmssion?
2021-11-18 03:46 AM
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.
2021-11-18 03:53 AM
Sorry ,
i have missed your first requirement ;)
I see only the check on this flag (RXBUSY)
if RXBUSY (1), Reception is ongoing then started ;)
or maybe RDI Flag.
Best regards
Erwan