Library made for MKR does not work on Nano33 - where do I start troubleshooting?

Hi all,

I have a question related to a very specialised library that I'd like to use. I don't expect anyone here to be familiar with this library, nor to have time to look into it in much detail, but I'm looking for some hints on where to start my own troubleshooting, as I'm a bit lost. I'm also getting in touch with the developer of the library, but thought I'd ask here for more general advice in hopes of solving it myself and learning something useful :slight_smile:

The library in question is CRMX_TimoTwo, which is made for a wireless DMX (stage lighting control) module which communicates with the host MCU over SPI.

Anyway, this library is developed for MKR boards (tested on Zero, 1010, Vidor 4000), but I was planning to use it with a Nano33 IOT. However, the included example sketch doesn't quite work. I'm getting some sort of response over SPI, but I don't succeed in writing any registers, and when reading I get garbage (i.e. numbers that are negative when they can't be, etc).

I'm a bit surprised, as the MRK boards and Nano 33 uses the same microcontroller. I don't quite know where to begin troubleshooting this.

So, in short: can anyone think of any difference between MKR boards and Nano33 that would prevent a library for communicating with a specific SPI device from working?

I've double, triple and quadruple checked the wiring. I've also tried lowering the SPI frequency, but that made no difference.

I have a logic analyzer (Analog Discovery 2) that I'm planning to use to see what actually happens, but before I go that route I though I'd check if there are any significant differences between these boards that I've missed.

wiring?

Juraj:
wiring?

CRMX MOSI to Nano MISO (D12)
CRMX MISO to Nano MOSI (D11)
SCK to D13
_CS to D5
_IRQ to D15 (A1)

Speaking of _IRQ, I was planning to use a different pin because the specs here say that all pins can be used as external interrupts, but I then realised that that's not the case, according to this page and a few other sources. As far as I can tell the pin I use now should work though.

And speaking of D13: Normally I'm used to seeing some faint light on the built-in LED when using SPI, as the LED is on the same pin as CLK. In this case, however, I'm not seeing anything. Not sure what to make of that.

GardG:
CRMX MOSI to Nano MISO (D12)
CRMX MISO to Nano MOSI (D11)

… oh.

Turns out I am in fact a complete and utter idiot.

GardG:
… oh.

this is how I like a troubleshooting thread to go :slight_smile: