How to Implement I2C on Chopstx?

NIIBE Yutaka gniibe at
Thu Aug 23 08:39:42 CEST 2018

tomli at wrote:
> using a high-level HAL library
> like STM32Cube or libopencm3, I have lots of things to learn.

Well, you would need to unlearn things, perhaps.

> I think
> we don't need to use interrupt or DMA to implement non-blocking asynchronous
> I2C operation, we can block the whole firmware and perform I2C reads/writes by
> busy-waiting and polling until we finish the job.

That sounds more difficult for me.  Why not simply implement the
driver by DMA with an interrupt notification for DMA finish?

Do you intend to use it connecting your board through USB?  If so, USB
protocol requires the board should respond to host.

I'd suggest to read chopstx/example-usb-serial and
chopstx/contrib/usart-stm32f103.c, as well as the Chopstx Reference

More information about the Gnuk-users mailing list