I tried to disconnect #CS pin (in red below) from GND and greenwire to it but the flexPCB via was too far back and I couldn’t get the blade in and retain access to tinned pad on the kapton. I also checked the BS mode select pins (in green below) are all connected to ground to ensure 4 wire SPI. So I’m inclined to agree with @MLXXXp that SW is the place to start looking.
Looking on your 1st posted images. I noticed while looking at the 0x00 byte, SDA is low while idle using software (easier to spot at right side of byte transfer) but it’s high with hardware. Can’t clearly see the relation to SCK though.
*idle: time between transferred bytes
What I noticed in your latest image, on software data is set before rising edge of SCK (as it should) and also kept stable on faling edge of SCK. However on hardware the data changes simultatiously with faling edge.
@MLXXXp@Mr.Blinky here’s where I think the culprit is - permanently wired CS, just as @Mr.Blinky suggested. The HW SPI is idling the MOSI and SCK lines high. Ordinarily, the deassertion of CS would prevent the transition of SCK to idle HIGH from being read by the slave but here, the SSD1306 is listening to everything. This single bit every now and again could be throwing everything off.
Software SPI - lines idle LOW, so no erroneous clock edges:
This episode has at least one silver lining, which is that I hadn’t realised @MLXXXp’s ArduboyZ had done lots of the bare minimum conversion for SAMD21 which is needed. That will be exceptionally useful when running through Arduboy2 and trying to get a minimal port going.
Yes, a “minimal” port for Arduino Zero of the original Arduboy library. There are fewer optimisations, which is why I call it minimal. But the SAMD21 chip on the Zero is more powerful/faster so optimisations are less important. My understanding is that it would be more fruitful for my DIY Arduboy based on the SAMD21G18A, which I often refer to as the Ardugirl, to port using the Arduboy2 library so that’s what I’m going to work on now that I have the OLED working using the ArduboyZ library.