STM32F4 I2C driver


Yannis Damigos
 

Hello,

I am developing an I2C driver based on the stm32cube LL API.
The driver can be found here: https://github.com/ydamigos/zephyr/tree/i2c_ll_stm32f4

The driver supports both polling and interrupt for master mode.

The status of the I2C driver today is the following:
The master write operation for 7bit addressing was tested on Carbon from 96Boards.
The master read operation was not tested (at the moment I only have a I2C OLED display which supports only write operations)
The 10bit address support was not tested.
Slave mode is not implemented.

Should I open a PR for the driver or wait until all the operations are tested?

Please feel free to test the driver and provide me with any input.

Yannis


Erwan Gouriou
 

Hi Yannis,


Thanks for this proposition. We are indeed missing I2C driver for STM32F4 family.
What would be really nice is to get a generic STM32 I2C driver, working on all series
(based on LL STM32Cube API as you've done is a good start for this purpose).
Jorge (cc) is working on the "generic side" of the driver, can you get in touch with him,
and see how to achieve and upstream i2c_ll_stm32.c/h ?

Erwan

On 11 June 2017 at 16:33, Yannis Damigos <giannis.damigos@...> wrote:
Hello,

I am developing an I2C driver based on the stm32cube LL API.
The driver can be found here: https://github.com/ydamigos/zephyr/tree/i2c_ll_stm32f4

The driver supports both polling and interrupt for master mode.

The status of the I2C driver today is the following:
The master write operation for 7bit addressing was tested on Carbon from 96Boards.
The master read operation was not tested (at the moment I only have a I2C OLED display which supports only write operations)
The 10bit address support was not tested.
Slave mode is not implemented.

Should I open a PR for the driver or wait until all the operations are tested?

Please feel free to test the driver and provide me with any input.

Yannis



_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...ct.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel



Yannis Damigos
 

Hi Erwan,

I actually my plan is to finally create a generic i2c_ll_stm32 driver
but I started small with the stm32f4 finally because it is my first
attempt to code a driver and I only have stm32f1 and stm32f4
development boards.
Running just a diff on the i2c_ll_stm32fxxx header files, I could say
that there are two groups of stm32 soc families for the I2C LL API.
The first group contains the families F1, F4 and the second the
families F3, F7, L4.
So my i2c driver should work also for the F1 family with few
modifications, which I planned to test after the testing of i2c read
operation.

I will contact Jorge to coordinate our efforts on the st i2c ll driver.

Yannis

On Mon, Jun 12, 2017 at 10:32 AM, Erwan Gouriou
<erwan.gouriou@...> wrote:
Hi Yannis,


Thanks for this proposition. We are indeed missing I2C driver for STM32F4
family.
What would be really nice is to get a generic STM32 I2C driver, working on
all series
(based on LL STM32Cube API as you've done is a good start for this purpose).
Jorge (cc) is working on the "generic side" of the driver, can you get in
touch with him,
and see how to achieve and upstream i2c_ll_stm32.c/h ?

Erwan

On 11 June 2017 at 16:33, Yannis Damigos <giannis.damigos@...> wrote:

Hello,

I am developing an I2C driver based on the stm32cube LL API.
The driver can be found here:
https://github.com/ydamigos/zephyr/tree/i2c_ll_stm32f4

The driver supports both polling and interrupt for master mode.

The status of the I2C driver today is the following:
The master write operation for 7bit addressing was tested on Carbon from
96Boards.
The master read operation was not tested (at the moment I only have a I2C
OLED display which supports only write operations)
The 10bit address support was not tested.
Slave mode is not implemented.

Should I open a PR for the driver or wait until all the operations are
tested?

Please feel free to test the driver and provide me with any input.

Yannis



_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@...
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


Jorge Ramirez <jorge.ramirez-ortiz@...>
 

On 06/12/2017 10:01 AM, Yannis Damigos wrote:
Hi Erwan,

I actually my plan is to finally create a generic i2c_ll_stm32 driver
but I started small with the stm32f4 finally because it is my first
attempt to code a driver and I only have stm32f1 and stm32f4
development boards.
Running just a diff on the i2c_ll_stm32fxxx header files, I could say
that there are two groups of stm32 soc families for the I2C LL API.
The first group contains the families F1, F4 and the second the
families F3, F7, L4.
So my i2c driver should work also for the F1 family with few
modifications, which I planned to test after the testing of i2c read
operation.

I will contact Jorge to coordinate our efforts on the st i2c ll driver.
hi Yannis,

This is great timing.

I have a working stm32f4x driver based on HAL (did a little bit of rework on one of Neil's Armstrong prototypes but nothing major just, enough to get it working).
I was only able to test the protocol on a logic analyzer though since my Grove-LCD seems dead.
And yes I also noticed two very different type of controllers.

I believe that now you have done the LL, adding some abstractions and adapting i2c_stm32lx.c shouldn't be too bad/
are you in IRC? my id is ldts . if you have some time later in the morning (I am in CEST time zone) we could discuss.

TIA
jorge