i2c raspberrypi2 support (SenseHat)?
Alan Cudmore
alan.cudmore at gmail.com
Sat Dec 24 17:40:50 UTC 2016
Here is the i2c.c patch to make the sense hat display more reliable.
Without this delay, it will randomly hang when writing out a frame of data to the display.
I’m sure this is not the right solution, just a temporary fix for my driver. I have been doing all of this with the original Pi, so it may not work the same with a Pi2.
Alan
> On Dec 24, 2016, at 10:24 AM, Alan Cudmore <alan.cudmore at gmail.com> wrote:
>
> Hi Scott,
> The raspberry pi BSP uses the newer Linux I2C API, which is used in a few BSPs.
> I have been able to use the I2C API for a few devices on the Pi, and I have been slowly working on trying to support the sense hat.
> I have a sense hat display driver in the “dpi-drivers” branch of my RKI project:
> https://github.com/alanc98/rki/tree/rpi-drivers <https://github.com/alanc98/rki/tree/rpi-drivers>
>
> Sense hat display driver in action here:
> https://www.youtube.com/watch?v=cHYxj6aW4jI <https://www.youtube.com/watch?v=cHYxj6aW4jI>
>
> The code to drive that demo is here:
> https://github.com/alanc98/rki/blob/rpi-drivers/sensehatdisplay_cmd.c <https://github.com/alanc98/rki/blob/rpi-drivers/sensehatdisplay_cmd.c>
>
> The project is setup so you can add and test drivers without adding them to the RTEMS tree.
>
> The sense hat display driver does bring out a bug ( maybe a race condition ? ) in the I2C Pi BSP code. I had to add a delay in the Pi I2C support code to make the sense hat display work correctly. I can’t seem to locate that patch right now, I’ll have to find it.
>
> I was starting to work on the HTS221 Temp/Humidity driver next.
> It would be great to get someone else helping with the rest of the drivers.
>
> I was also trying to test the SPI support, but I have been unable to get a driver for my simple SPI device to work. ( works on Arduino and Pi/Linux ). I think we need to convert the SPI support in the Pi BSP to the new SPI framework anyway, so it’s worth revisiting the SPI implementation.
>
> Alan
>
>
>
>
>> On Dec 23, 2016, at 11:14 PM, Scott Zemerick <scott at zemericks.com <mailto:scott at zemericks.com>> wrote:
>>
>> Is anyone currently using i2c with the raspberrypi2 - and more specifically the SenseHat? The i2c bsp code looks mostly complete, but I am confused as to which i2c API functions to call, with some concern that the i2c bsp support isn't complete. A quick comparison of the pi i2c code with the spi code shows some design differences, with the latter looking more complete. I plan on digging more into the pi bsp, but I would like to know the current state and if anyone has a basic example of pi i2c. Thanks!
>> _______________________________________________
>> users mailing list
>> users at rtems.org <mailto:users at rtems.org>
>> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161224/b40c7133/attachment-0004.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-pi-patch.txt
URL: <http://lists.rtems.org/pipermail/users/attachments/20161224/b40c7133/attachment-0002.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161224/b40c7133/attachment-0005.html>
More information about the users
mailing list