Problems using Nicla Vision as I2C peripheral

I am trying to use the Nicla Vision as an I2C peripheral with a MKRWAN 1310 as the I2C controller using the Arduino Wire library. I haven't found any examples for the Nicla Vision, but it seemed that the Wire examples for the MKRWAN 1310 should work as they are very basic.

I am using the master_reader.ino code on the MKRWAN 1310 to request data from the Nicla Vision which is running the slave_sender.ino code. I'll include them below - I have not modified the example code.

// Wire Master Reader
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates use of the Wire library
// Reads data from an I2C/TWI slave device
// Refer to the "Wire Slave Sender" example for use with this

// Created 29 March 2006

// This example code is in the public domain.


#include <Wire.h>

void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
}

void loop()
{
  Wire.requestFrom(2, 6);    // request 6 bytes from slave device #2

  while(Wire.available())    // slave may send less than requested
  { 
    char c = Wire.read(); // receive a byte as character
    Serial.print(c);         // print the character
  }

  delay(500);
}
// Wire Slave Sender
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates use of the Wire library
// Sends data as an I2C/TWI slave device
// Refer to the "Wire Master Reader" example for use with this

// Created 29 March 2006

// This example code is in the public domain.


#include <Wire.h>

void setup()
{
  Wire.begin(2);                // join i2c bus with address #2
  Wire.onRequest(requestEvent); // register event
}

void loop()
{
  delay(100);
}

// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent()
{
  Wire.write("hello "); // respond with message of 6 bytes
                       // as expected by master
}

The problem that I am having is that even though the Wire.requestFrom is running continuously on the MKRWAN 1310, I only get a single response from the Nicla Vision. I can get another single response by resetting the Nicla Vision. (By single response I mean that I receive the "hello " string once).

Is there anything else that I should be doing or is this a known issue?

I can run the inverse (Nicla Vision as the controller and MKRWAN 1310 as the peripheral using that example code) and that runs correctly.

I just tried replacing the Nicla Vision with a Seeed Xiao and the same code runs correctly (both with 100KHz and 400KHz clock).

When I was using the Nicla Vision, I tried to decrease the frequency of the Wire clock on the MKRWAN 1310 - but apparently whatever algorithm being used doesn't work when setting values below 100KHz - the clock increases to values above 100KHz. I was able to set the frequency to 100KHz, 200KHz, and 400KHz correctly. Where can I find what the clock setting algorithm is doing? Is there a slower speed value that works?

I will try to get a logic analyzer to see what is happening when it fails. Is it possible that this is a problem with the Mbed Wire library?

Using a logic analyzer I verified that the problem is that I get a NACK after the address read byte, so the Nicla Vision is not responding to its address. Not sure how to determine what is causing this. The Xiao responds with an ACK and the read sequence works fine. Unfortunately, I can't set the clock speed to less than 100KHz using the Wire.setClock to check for timing issues.