Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please release new pifacecommon version 4.2.2 to get the fix for SPI speed setting #27

Closed
psytester opened this issue Jan 3, 2019 · 3 comments

Comments

@psytester
Copy link
Contributor

psytester commented Jan 3, 2019

Please release a new pifacecommon v4.2.2, because we already know the facts, but there is no fix as official package.
Due to kernel change to have much higher SPI clock speed at 125Mhz (raspberrypi/linux/issues/2165) the PiFace2 Chip MCP23S17 is not longer working.
There where two commits in past.
The first one d4c5689 from 11 Nov 2017 with PR #22 / #23 with hard coded setting in pifacecommon/spi.py by adding the line speed_hz=ctypes.c_uint32(100000) to the transfer struct:

 # create the spi transfer struct
        transfer = spi_ioc_transfer(
            tx_buf=ctypes.addressof(wbuffer),
            rx_buf=ctypes.addressof(rbuffer),
            len=ctypes.sizeof(wbuffer),
            speed_hz=ctypes.c_uint32(100000) 
        )

But the related version.py was updated by #23 from outdated 4.2.0 6098a59 to already existing 4.2.1.

The second commit 25dcca1 from 16 Sep 2018 with PR #26 is passing a clock speed value from the caller,

        # create the spi transfer struct
        transfer = spi_ioc_transfer(
            tx_buf=ctypes.addressof(wbuffer),
            rx_buf=ctypes.addressof(rbuffer),
            len=ctypes.sizeof(wbuffer),
            speed_hz=ctypes.c_uint32(self.speed_hz)
)

which is more flexible and the version.py was finally updated to 4.2.2 with commit 7c6a2b3.

At the end this kind of fix is getting work again the PiFace2.
But due to missing pifacecommon v4.2.2 release an apt-get upgrade does not find this correction and a lot of people are dissatisfied.
I hit the issue and "simple" fix in past due to internet reserch where I was pointed to piface/pifacecad/issues/24, but pifacecad is not the faulty part here

@tompreston
Copy link
Member

Hi, I'm not in touch with the Raspbian maintainers any more. Please try getting in touch with them if you'd like to take on Raspbian maintainership for this package.

These days I prefer distributing Python packages via PyPI anyway, which contains the latest version of pifacecommon:

Please try using pip to install PiFace software instead. I will update the install instructions.

@csoutreach
Copy link

There may be another route with the maintainers, will follow that up.

@tmortagne
Copy link

An important problem IMO is that http://www.piface.org.uk/guides/Install_PiFace_Software/Installing_PiFace_Digital_modules/ still reference apt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants