Description
I am working on an Arduino MKR Zero based project that combines an MKR CAN Shield as well as a touch screen (2.4” 240x320 using the Adafruit ILI9341 library).
When connected alone, the CAN Shield works fine using the Sandeep Mistry's arduino-CAN library and the CANSender code. When connected alone, the display assembly also works fine.
But I do not get both parts working at the same time. When running CANSender, it gives a “Starting CAN failed!” error message in SerialReader.
I checked whether there was a conflict on resources. The CAN board uses SPI with Chip Select (CS) on port 3, the display and touch panel use SPI with CS on pin A3 and A4 respectively. So, there should not be any conflict of resources there. The CAN board also uses interrupt on Pin 7, which is not used by the display or touch panel.
Interestingly, when I power up with just the CAN shield first, wait for successful initialisation, and THEN connect the display module, the CAN bus traffic continues to work fine (again using just CANSender, no code for the display at all). But when I power up with both connected, everything else equal, I get the above error. So it seems only the initialisation phase that has problems, not the later communication phase.
Am not really a programmer… Anyone any clue or suggestion how to get this working?
Thanks!!