Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Spresense SDK camera example hard fault.
-
Hello,
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.
Camera example: https://github.com/sonydevworld/spresense-nuttx-apps/tree/new-master/examples/camera/
I added some debugging prints to check the issue and discovered that it crashed while opening the
/dev/video
file usingopen("/dev/video", 0);
line.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.c
in 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,
Shibi. -
Hi,
I was going through the default configuration in Spresense SDK example folderspresense/sdk/configs/examples/camera/defconfig
and found thatCXD56_I2C2
in 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.