News regarding Piface 1 & 2 (counter) issues
Posted: Sunday 22 November 2015 16:12
Dear Piface users,
I have been getting some PM's and news during the last few months regarding the fact that the Piface / counters were not working any longer.
Sorry for the delay but I had little time during the past few months, and lacked some vital resources to investigate and debug this issue.
Actually I was not aware that so many people are using the PiFace.
I am glad to announce that I have found and fixed the problem, and summitted the fixes to Gizmocuz for implementation into the unstable tree.
The problems:
1) The counters were not sent each update interval
Another developer found it more efficient (which it is) to only sent the counter updates on each interval if they were changed.
However forgot to inform me and the other users.
Fixed:
I have added a new parameter to the piface.conf file which allows the user to select which counters should be updates each interval (even if its not changed) or only
when the counter has been updated.
count_update_type: on_change
always
The on_change parameter is the default setting, which means that the counters are only send during the update interval when they are changed.
2) The Piface board(s) was not detected
3) The counters stopped working
Both these issues have the same origin... The IO chip on the Piface was not properly initialized due to an chip selection (CE) error.
This chip selection error was appearantly caused by the replacement of the bcm2708 spi module from the kernel by the bcm2835 module.
In the new bcm2835 module the IO chip was not properly selected during the detection and initialisation phase of the Piface hardware when using the standard spidev
(sysfs) interface, and no workaround was available using this method.
Fixed:
I have now rewritten the piface code to use a different interface method to the bcm2835 module which provides more control, with good results.
To illustrate: Note:
To use the bcm2835, one should enable the device tree on the pi:
raspi-config
- advanced options -> SPI enable
-> reboot
So I hope that my fixes will be merged into the mainline code soon, and expect and hope that the issues will be solved.
Best Regards,
Robin
I have been getting some PM's and news during the last few months regarding the fact that the Piface / counters were not working any longer.
Sorry for the delay but I had little time during the past few months, and lacked some vital resources to investigate and debug this issue.
Actually I was not aware that so many people are using the PiFace.
I am glad to announce that I have found and fixed the problem, and summitted the fixes to Gizmocuz for implementation into the unstable tree.
The problems:
1) The counters were not sent each update interval
Another developer found it more efficient (which it is) to only sent the counter updates on each interval if they were changed.
However forgot to inform me and the other users.
Fixed:
I have added a new parameter to the piface.conf file which allows the user to select which counters should be updates each interval (even if its not changed) or only
when the counter has been updated.
count_update_type: on_change
always
The on_change parameter is the default setting, which means that the counters are only send during the update interval when they are changed.
2) The Piface board(s) was not detected
3) The counters stopped working
Both these issues have the same origin... The IO chip on the Piface was not properly initialized due to an chip selection (CE) error.
This chip selection error was appearantly caused by the replacement of the bcm2708 spi module from the kernel by the bcm2835 module.
In the new bcm2835 module the IO chip was not properly selected during the detection and initialisation phase of the Piface hardware when using the standard spidev
(sysfs) interface, and no workaround was available using this method.
Fixed:
I have now rewritten the piface code to use a different interface method to the bcm2835 module which provides more control, with good results.
To illustrate: Note:
To use the bcm2835, one should enable the device tree on the pi:
raspi-config
- advanced options -> SPI enable
-> reboot
So I hope that my fixes will be merged into the mainline code soon, and expect and hope that the issues will be solved.
Best Regards,
Robin