Open Quas7 opened 10 months ago
I can confirm that during my install, I had an issue with the connection to CLK, and during troubleshooting I was getting an entirely unrelated and undocumented error code (*==). Had to poke around with a multimeter to realize that CLK was the issue.
During compilation I noticed a compiler warning stating that the variable _clkok is not used and indeed the _selftest() does not call _safe_testvoltage() function to test for PIN_CLK compared to the other pins.
This might have been done intentionally, as the CLK is not giving a stable voltage reading by nature and threfore the test might fail randomly even if PIN_CLK is connected perfectly.
If this is the case and assuming that the CLK frequency is higher than the ADC sample rate, testing for the mid-voltage (0.9f) might do the trick as the CLK should be a 50:50 duty cycle.
https://github.com/Ansem-SoD/Picofly/blob/cc1099d6e9f659425b132fc73b9153fe07d605f8/code/usk/main.c#L53C1-L68C1
A quick sweep of the use of PIN_CLK did not show up any other test method and also no call for halt_with_error(3,2) (should be "==") can be found.
Therefore, I suspect that the error "== CLK is not connected" does never show up and a missing CLK signal will result in another maybe unrelated error indication. I will test this during my next picofly install this weekend.
For the sake of completeness: Brute-force error-code listing as I could not wrap my head around halt_with_error() within one minute ;)