Skip to content

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

@psytester

Description

@psytester

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions