[riot-notifications] [RIOT-OS/RIOT] drivers/dose: make use of start condition received interrupt (#16506)

Juergen Fitschen notifications at github.com
Mon Jul 26 12:36:55 CEST 2021

@jue89 commented on this pull request.

> @@ -396,6 +423,17 @@ static inline void irq_handler(unsigned uartnum)
+    if (status & SERCOM_USART_INTFLAG_RXS && dev(uartnum)->INTENSET.bit.RXS) {
+        /* clear receive start flag */
+        dev(uartnum)->INTFLAG.reg = SERCOM_USART_INTFLAG_RXS;

Okay, I just found the fallowing paragraph in the SAML21 datasheet:

> An interrupt request is generated when the interrupt flag is set and if the corresponding interrupt is enabled. The
> interrupt request remains active until either the interrupt flag is cleared, the interrupt is disabled, or the USART is
> reset.

Disabling the IRQ will stop triggering the ISR over and over again (which wasn't the case for the STM32).

> We could of course always clear all flags, but for the collision detection feature it would be handy if the collision bit remains untouched by the interrupt handler and we can simply read it out after uart_write()

How will this improve the collision detection? I think we can't distinguish between an foreign or our start bit. The TXSTART IRQ would be triggered either way.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210726/b250cb16/attachment.htm>

More information about the notifications mailing list