RTEMS | bsp/aarch64/raspberrypi: Add I2C interrupt support (!682)

Christian Mauderer (@c-mauderer) gitlab at rtems.org
Mon Aug 25 12:02:39 UTC 2025



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682 was reviewed by Christian Mauderer

--
  
Christian Mauderer commented on a discussion on spec/build/bsps/aarch64/raspberrypi/opti2cirq.yml: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682#note_129417

 > +format: '{}'
 > +links: []
 > +name: BSP_I2C_USE_INTERRUPTS

OK

--
  
Christian Mauderer commented on a discussion on bsps/aarch64/raspberrypi/i2c/raspberrypi-i2c.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682#note_129418

 > +    while ( bus->remaining_bytes > 0 ) {
 > +      C_REG( bus ) |= C_INTT;
 > +      if ( rtems_binary_semaphore_wait_timed_ticks(&bus->sem, bus->base.timeout) !=

OK. Thanks for the explanation.

--
  
Christian Mauderer started a new discussion on bsps/aarch64/raspberrypi/i2c/raspberrypi-i2c.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682#note_129419

 > +    if ( bus->read_transfer ) {
 > +      while ( ( S_REG( bus ) & S_RXD ) == 0 ) {
 > +      }

If you have an error (S_ERR), you would be stuck here.

--
  
Christian Mauderer started a new discussion on bsps/aarch64/raspberrypi/i2c/raspberrypi-i2c.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682#note_129420

 > +#else
 > +    while ( ( S_REG( bus ) & S_TXW ) == 0 ) {
 > +    }

Same like in the RX case: If you get an error, you are stuck here.

--
  
Christian Mauderer started a new discussion on bsps/aarch64/raspberrypi/i2c/raspberrypi-i2c.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682#note_129421

 > +#else
 > +    while ( ( S_REG( bus ) & S_DONE ) == 0 ) {
 > +    }

Again: I'm not sure if you get a DONE if you get an error or clock stretch timeout.


-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/682
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250825/cec4cca5/attachment-0001.htm>


More information about the bugs mailing list