ArduCAM / Arduino

This is ArduCAM library for Arduino boards
MIT License
472 stars 348 forks source link

ACK CMD SPI interface Error! END #353

Open Hmamouche opened 6 years ago

Hmamouche commented 6 years ago

Hi,

I tried to use the ArduCAM library on Arduino Leonardo with Arducam-Mini-2MP (OV2640). I get an SPI error when lunching the host application : ACK CMD SPI interface Error! END The pins configuration that I used is exactly like the one showed in: https://www.youtube.com/watch?v=hybQpjwJ4aA&feature=youtu.be, with the CS at pin 7. I'm working on mac, but i also tried it on a windows virtual machine, but still the same error.

Do you have any ideas to fix this problem ?

Thanks,

UCTRONICS commented 6 years ago

@Hmamouche I have not used this leonardo board and I advise you test the SPI interface to check if the SPI work fine.

ArduCAM commented 6 years ago

Can you try the camera on UNO board first before moving to Leonardo

Hmamouche commented 6 years ago

Yes, it works on UNO.

UCTRONICS commented 6 years ago

@Hmamouche If it can work normally on UNO which means the camera module is fine. Can you give me a timing diagram of the SPI read/write and I will help you check your SPI bus? You'd better write a demo to test the spi interface independently.

Hmamouche commented 6 years ago

Hi,

Sorry for the delay. Yes, the camera module is ok. Here is the SPI (MOSI, MISO, SCK, in pins 11, 12, 13) diagrams displayed in channels 0, 1 and 2 resp., for both boards (UNO and Leonardo), and the problem is in these pins for the Leonardo board, maybe MOSI, MISC, SCK have to be connected to other pins instead of p11, p12 and p13.

Leonardo:

leonardo

Uno:

uno
UCTRONICS commented 6 years ago

@Hmamouche I can't find the detail information form your diagram. You can write 0x55 to the 0x00 register and read it in the loop. Such as the below diagram shows. testdiagram