Spresense SDK camera example hard fault.
I am attempting to interface the camera add on board CXD5602PWBCAM1E with Spresense main and extension board using Spresense SDK Camera example.
The below image the setup of the camera add on board to the Spresense.
I interfaced the camera using Spresense Arduino library to check for any connectivity or setup issue. I was successfully able to capture images from the camera and write onto the SD card.
When I attempted to run the example camera application in Spresense SDK, I ran into the issue of the hard fault.
I added some debugging prints to check the issue and discovered that it crashed while opening the
video_initialize("/dev/video");function was able to generate the file in the dev folder. But I am unsure if the creation of the device file is at fault.
Below image is the code in the
camera_main.cin camera example with my debugging print statements.
The below image is the serial terminal hard fault message. The camera device is created but it crashes when trying to open the character device.
My SDK configuration has most options related to video and camera enabled including CMOS image sensor.
I am a stuck on how to get past the open function in the Spresense so as to use the example as a sample for my own program.
Any support to resolve the issue will be very much helpful.
Thanks and Regards,
I was going through the default configuration in Spresense SDK example folder
spresense/sdk/configs/examples/camera/defconfigand found that
CXD56_I2C2in SDK Config was not enabled in my project which primarily caused the hard fault in the program. After enabling that option, the camera example is now working as expected.