BLE Sense V2 & ArduCam Mini 2 MP Plus interface problem

I am receiving "ACK CMD SPI interface Error! END" with my Nano 33 BLE Sense V2 and the ArduCAM Mini 2 MP Plus. On-line searches have not turned up any solutions perhaps since this is a new combination of parts. Any help appreciated.

I stripped the example “ArduCAM_Mini_2MP_Plus_functions.ino” down to the essentials where the error is occurring (see code below). I only added the SPI.beginTransaction line since some on-line discussions and documentation was concerned about over-clocking the OV2640 controller since its max speed is 8 MHz. (This additional line does not change behavior.) Per instructions I modified memorysaver.h to only have #define OV2640_MINI_2MP_PLUS. The failure is a simple readback of 0x55 from the DDR. Numbers are coming back alternating between 67 and 85 (decimal) fairly consistently; these numbers change when SPI.beginTransaction parameters change. This appears to be an interface configuration problem of some sort. I have dug through the ArduCAM header and source files but haven’t found anything to help.

The protoboard has only the Nano 33 BLE Sense V2 and the ArduCAM Mini 2 MP Plus. There is no other hardware. Power is through the USB. The wiring is as follows:

The example code has been modified with CS on pin D10 (and I have confirmed it’s being controlled).

#include <Wire.h>
#include <ArduCAM.h>
#include <SPI.h>
#include "memorysaver.h"

const int CS = 10; // pin D7 in example; CS now D10
ArduCAM myCAM( OV2640, CS );
uint8_t read_fifo_burst(ArduCAM myCAM);

void setup() {
  uint8_t temp;

  Wire.begin();
  Serial.begin(921600);
  while (!Serial);  // added this
  Serial.println(F("ACK CMD ArduCAM Start! END"));

  // set the CS as an output:
  pinMode(CS, OUTPUT);
  digitalWrite(CS, HIGH);

  SPI.begin(); // required before SPI.beginTransaction()
  SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));  // added code
  //Reset the CPLD
  myCAM.write_reg(0x07, 0x80);
  delay(100);
  myCAM.write_reg(0x07, 0x00);
  delay(100);

  while(1){
    //Check if the ArduCAM SPI bus is OK
    myCAM.write_reg(ARDUCHIP_TEST1, 0x55);
    temp = myCAM.read_reg(ARDUCHIP_TEST1);
    if (temp != 0x55){
      Serial.print(F("ACK CMD SPI interface Error! END "));
      Serial.println(temp); // added this to see readback numbers
      delay(2000);continue;
    }else{
      Serial.println(F("ACK CMD SPI interface OK. END"));break;
    }
  }
}

void loop() {
  Serial.println(F("Entered infinite loop!"));
  while(1);
}

Here is an image of the wiring

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.