Skip to main content
stephan2
Associate
April 30, 2019
Question

Using I2C-DMA without any interrupt

  • April 30, 2019
  • 1 reply
  • 823 views

I am trying to build a system that does not use interrupts at all. This due to hard realtime requirments. Now I hat a look at the HAL code and as far as I can see even HAL_I2C_DMA functions seem to rely on IRQ, correct?

Can HAL I2C DMA functions be used without IRQ? Are there LL API examples for I2C DMA wihout IRQ available?

I am using a STM32F7 chip if that makes any difference.

This topic has been closed for replies.

1 reply

thanks4opensource
Associate III
April 30, 2019

I have very little experience with HAL and LL, and what I do have is quite old at this point. But ...

.. yes. HAL depends on its own runtime environment, which includes an IRQ for the SysTick timer (and possibly others). Also malloc() which of course also doesn't play well with hard realtime. It's also my experience that many of the higher-level software components don't have LL versions and thus require HAL.

I once removed the timer and malloc() components from a HAL implementation (USBD-CDC) but it wasn't easy and the result was messy even though it worked. Others here will may have better advise but I would suggest thinking about a non-HAL, non-LL, low level, "bare metal" register-based approach. That's what I do. YMMV.