I work with STM32L4 IOT but my problem is the same in all STM32 cards.
I want to activate the Arducam OV5642 camera.
the camera is functional with arduino uno but with STM32 no.
I think the problem is at the SPI interface but I have not found a solution.
the error message is about SPI interface.
please help me.
Host OS? Arduino version, core used, error log, libraries used…
I take the example arducam for arduino. this example is functional with arduino uno and mega.
exemple .. arducam .. mini ..OV5642
but with STM32L4 IOT that supports arduino is not functional and the problem the SPI interface
Which IDE?
it’s exactly this example but I’m using STM32.
https://www.youtube.com/watch?v=hybQpjwJ4aA&t=118s
Anyway, which lib you used?
This one?
https://github.com/ArduCAM/Arduino/tree/master/ArduCAM
but with STM32L4 IOT that supports arduino is not functional and the problem the SPI interface
So it’s seems to build correctly but why you told this is the SPI interface the issue?
If you are not more precise you will not get help.
So, please, give us all relevant information, lib you used, sketch used, how you wired the cam, which SPI pins you used on the board…
the program is the same of exemple : https://www.youtube.com/watch?v=hybQpjwJ4aA&t=246s
i use : http://www.st.com/en/evaluation-tools/b … ot01a.html
in the host arducam.exe i have error SPI interfacing.
i told u SPI problem because :
#include <Wire.h>
#include <ArduCAM.h>
#include <SPI.h>
#include "memorysaver.h"
//This demo can only work on OV5642_MINI_5MP_Plus platform.
//#if !(defined OV5642_MINI_5MP_PLUS)
// #error Please select the hardware platform and camera module in the ../libraries/ArduCAM/memorysaver.h file
//#endif
#define BMPIMAGEOFFSET 66
const char bmp_header[BMPIMAGEOFFSET] PROGMEM =
{
0x42, 0x4D, 0x36, 0x58, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0x58, 0x02, 0x00, 0xC4, 0x0E, 0x00, 0x00, 0xC4, 0x0E, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x1F, 0x00,
0x00, 0x00
};
// set pin 7 as the slave select for the digital pot:
const int CS = 7;
bool is_header = false;
int mode = 0;
uint8_t start_capture = 0;
ArduCAM myCAM( OV5642, CS );
uint8_t read_fifo_burst(ArduCAM myCAM);
void setup() {
// put your setup code here, to run once:
uint8_t vid, pid;
uint8_t temp;
#if defined(__SAM3X8E__)
Wire1.begin();
Serial.begin(115200);
#else
Wire.begin();
Serial.begin(921600);
#endif
Serial.println(F("ACK CMD ArduCAM Start!"));
// set the CS as an output:
pinMode(CS, OUTPUT);
// initialize SPI:
SPI.begin();
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.println(F("ACK CMD SPI interface Error!"));
delay(1000);continue;
}else{
Serial.println(F("ACK CMD SPI interface OK."));break;
}
}I give all the information. It’s exactly like the video
A video is not a correct input to request support.
Uno is fairly different to STM32 for many reasons. (
Libraries used probably require some update to support STM32 core…
You did not give a link to the used STM32 software. Are you using STM32cube?
[ourarios – Mon Jun 04, 2018 12:17 pm] –
exemple .. arducam .. mini ..OV5642
but with STM32L4 IOT that supports arduino is not functional and the problem the SPI interface
I believe that you have the shield Arducam.
As far as I know, I don’t have this hardware, the shield take a photo then you have to download from the shield, using SPI, and record it on a SD, that use the same SPI.
Since Arduino has only 2k this is done alternating communications, you download a little chunk, then write it to sd, thake another chunk…
This require an arbitration over SPI using the SS signal and maybe this can be the issue: chosing the right SS pins, one for the arducam shield and one for the SD.
I see that some arducam shields has an sd slot but I don’t know if this SD is connected to Arduino or used by the shield. Maybe the problem is only to choose the right SS pin for communicating with the shield.
Take in account that STM32 works at 3.3V levels and maybe your shield not. Some Arducam works with RaspberryPI so uses 3.3V levels.
So we need to know which shield you have.



