RevolutionPi / piControl

Kernel module for data exchange with RevPi I/O-Modules and Gateways
81 stars 24 forks source link

fix: Too long high pulse on the left ACK pin on Connect 4 #100

Closed iluminat23 closed 1 year ago

iluminat23 commented 1 year ago

The signaling on the piBridge starts with the ACK pins (2A and 2B). The pins are driven high in output mode. The we are waiting 9 ms and the pins are configured to input mode. The signal is then pulled down by an external resistor to ground level.

On the Module side the transition from low to high is the beginning of the initialization sequence. After this the ACK pin must stay high for >= 7.5 ms and <= 9.5 ms. If the level drops earlier or later the module will go back to the start of the initialization sequence and it will wait for a low -> high transition on the ACK pin.

On the Connect 4 it happens that the transition from high to low takes longer. As the current levels are not dropping as fast as expected. In some cases it takes more then 0.5 ms. And as we wait 9 ms until we switch the pin from output high to input it takes over all > 9.5ms.

To fix the issue with the Connect 4 and make this more robust, we should reduce the delay to at least 8.5 ms. This is in the middle of the acceptable range of 7.5 to 9.5 ms.