I am attempting to use the SPE while using a CSI camera.
I am currently using e-Con e-CAM121 CUOAGX camera on my Jetson Orin Dev Kit 64GB (JetPack 5.1.2). I followed the steps mentioned here to compile and flash a slightly modified version of the ivc-echo-task.c. This modified code simply prints a predefined message as you can see in the code snippet below:
static int ivc_echo_task_write_msg(void *data, int length)
{
int ret;
char *tx_msg;
bool non_contig_available;
const char* msg = "Hello from IVC echo task";
if (!ivc_state) {
error_hook("ivc_echo_task not init");
return -1;
}
if (length > ivc_state->id->ivc_ch->frame_size) {
error_hook("length larger than frame buffer size");
return -1;
}
rtosSemaphoreAcquire(ivc_state->ivc_sem, rtosMAX_DELAY);
ret = tegra_ivc_tx_get_contiguous_write_space(
ivc_state->id->ivc_ch, &tx_msg, &non_contig_available);
if (ret < 1) {
error_hook("tegra_ivc_tx_get_contiguous_write_space() failed");
goto exit;
}
// memcpy(tx_msg, data, length);
memcpy(tx_msg, msg, strlen(msg));
ret = tegra_ivc_tx_send_buffers(ivc_state->id->ivc_ch, 1);
if (ret) {
error_hook("tegra_ivc_tx_send_buffers() failed");
}
exit:
rtosSemaphoreRelease(ivc_state->ivc_sem);
return ret;
}
This modified ivc-echo-task works as expected (prints âHello from IVC echo taskâ). Following this, I install the necessary drivers specific to the CSI camera (provided by the camera manufacturer). After doing this, the CSI camera works fine (I can see the camera stream on a GUI). However, when I attempt to run the modified ivc-echo-task again, it fails stating that the data_channel does not exist:
My questions are: 1. Is this behavior expected? I donât think the SPE code is too complex so why is this happening? 2. Is the SPE involved in interfacing with a CSI camera in any way? My understanding is there are some SPE-SPI pins on the CSI header. Is this correct? Does libargus utilize the SPE in any way for camera data streaming or camera control?
Hello, dungrup:
I donât know whatâs your goal to connect the SPE with CSI camera. Maybe you can describe the use case, and we can discuss it more.
For your questions.
have you ever checked whether the node âdata_channelâ exists in your device? If not, please take a look at spe-freertos-bsp/rt-aux-cpu-demo-fsp/doc/ivc.md. Kernel DTB has to be updated.
You code only tests data channel between CCPLEX and SPE, and it has nothing to do with SPI. By default, SPE firmware does not involve in anything related to CSI. I donât know your goal, and no more comments though.
Thank you for the prompt reply. My objective is not to interface with the CSI camera with the SPE directly. I want to use the CSI camera even when there is a custom application running on the Cortex R5. This was an observation when trying to do the same.
yes, it does exist when I followed the steps in ivc.md and I tested the functionality
Please note that this is BEFORE I install the CSI camera drivers.
Yes my code does not deal with SPI in anyway. But, thank you for confirming that the SPE firmware is not related to CSI.
I hope the issue is clear now though. AFTER installing the eCon camera drivers I observed this âno such file/directoryâ for data_channel.
Have you ever checked the kernel DTB loaded 'AFTER installing the eCon camera drivers '?
You can just dump the kernel DTB in run time, and confirm whether the change for data_channel still exists.