I was going through the default configuration in Spresense SDK example folder
spresense/sdk/configs/examples/camera/defconfig and found that
CXD56_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.
Latest posts made by sk_shibi
RE: Spresense SDK camera example hard fault.
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,
RE: DHT11 character device register - wait state
Hi @kamiltomaszewski ,
Thanks a lot.
nxsem_init(&priv->devsem, 0, 1);
Worked and I was able to get through the semaphore.
Although I am getting a TIMEOUT error when trying read the sensor data due to misconfigured clock. I'll try to reconfigure the get_clock function.
DHT11 character device register - wait state
I have been trying to setup DHT11 sensor to read the temperature and humidity values using Spresense SDK.
I have been facing an issue of forever waiting state when I am trying to open my registered DHT11 sensor character device in the NuttX Operating System in Spresense Main and Extension board.
Setup: The signal pin of the DHT11 is connected to D06 or PIN_PWM0 in the extension board. The Vcc of sensor is connected to 3.3V and ground pin is wired to ground in the extension board. For the device driver, I am using the prebuilt Dhtxx driver (https://github.com/sonydevworld/spresense-nuttx/blob/new-master/drivers/sensors/dhtxx.c).
My setup is working well when trying to read using the Arduino IDE with Spresense.
The goal of the program was to register a character device of PIN_PWM0 or Digital pin 6 and reading data from the DHT11 sensor. I have enabled the driver support for Dhtxx in the SDK configuration, so as to register the device for reading the sensor values. The Dhtxx driver requires configuration functions
For registering the Dhtxx character device driver.
The below image shows my configuration of each function for configuring and linking digital pin6 or PIN_PWM0 using GPIO.
For registering the device, I have used dhtxx_register with the above configuration. Then the device has been open in read only mode for reading the data. Once the device is open, it has to be read using the read function (similar to Dhtxx example). Executing the program leads to the issue.
Issue: when the open function is called, the program freezes or goes into infinite waiting state unable to move forward in the program. The program freezes after displaying Initialised and is unable to display "Device in read mode", acknowledging that device is opened. It is unable to move forward to read the data from the sensor.
The below image showcases the wait state of the program.
Any support will be immensely helpful.
Thanks in advance.