cancel
Showing results for 
Search instead for 
Did you mean: 

STSW-IMG501 Booting From Script Fails

astral256
Associate II

I am using the STSW-IMG501 software v1.1.1 with the STEVAL-EVK-U0I connected to a STEVAL-56G3MAI (the S-board evaluation module for the VD56G3).  In the EVK software, I am using the built-in script generation tool to upload different register configuration sets and test them.  However, I find that uploading the following script will cause the SW to fail to read a frame sequence:

$SCRIPT
SetBank(0x20);
WriteAutoIncrement(0x0220, 0x00, 0x1b, 0xb7, 0x00); //SENSOR_SETTINGS.EXT_CLOCK = 12000000
WriteAutoIncrement(0x0224, 0x02);                   //SENSOR_SETTINGS.CLK_PLL_PREDIV = 2
WriteAutoIncrement(0x0226, 0x86);                   //SENSOR_SETTINGS.CLK_SYS_PLL_MULT  = 134
WriteAutoIncrement(0x0227, 0x05);                   //SENSOR_SETTINGS.VT_CLK_DIV = 5
WriteAutoIncrement(0x0300, 0xd4, 0x04);             //STREAM_STATICS.LINE_LENGTH = 1236
WriteAutoIncrement(0x0304, 0x00, 0x00);             //STREAM_STATICS.X_START = 0
WriteAutoIncrement(0x0306, 0x63, 0x04);             //STREAM_STATICS.X_END = 1124
WriteAutoIncrement(0x030a, 0x08);                   //STREAM_STATICS.FORMAT_CTRL = RAW8
WriteAutoIncrement(0x0312, 0xF0, 0x03);             //STREAM_STATICS.OIF_CSI_BITRATE = 1008
WriteAutoIncrement(0x0458, 0xf0, 0x10);             //STREAM_CTX0.FRAME_LENGTH = 4336->30fps
WriteAutoIncrement(0x044c, 0x00);                   //STREAM_CTX0.EXPOSURE_MODE = 0

//1120x480
WriteAutoIncrement(0x045a, 0xba, 0x01);             //STREAM_CTX0.Y_START = 442
WriteAutoIncrement(0x045c, 0x99, 0x03);             //STREAM_CTX0.Y_END = 921
WriteAutoIncrement(0x045e, 0x02, 0x00);             //STREAM_CTX0.OUT_ROI_X_START = 2
WriteAutoIncrement(0x0460, 0x61, 0x04);             //STREAM_CTX0.OUT_ROI_X_END = 1121
WriteAutoIncrement(0x0462, 0x00, 0x00);             //STREAM_CTX0.OUT_ROI_Y_START = 0
WriteAutoIncrement(0x0464, 0xdf, 0x01);              //STREAM_CTX0.OUT_ROI_Y_END = 479

If the ROI parameters are changed from 1120x480 to the full resolution (1120x1360), it works fine.

//1120x1360
WriteAutoIncrement(0x045a, 0x00, 0x00);             //STREAM_CTX0.Y_START
WriteAutoIncrement(0x045c, 0x53, 0x05);             //STREAM_CTX0.Y_END
WriteAutoIncrement(0x045e, 0x02, 0x00);             //STREAM_CTX0.OUT_ROI_X_START
WriteAutoIncrement(0x0460, 0x61, 0x04);             //STREAM_CTX0.OUT_ROI_X_END
WriteAutoIncrement(0x0462, 0x02, 0x00);             //STREAM_CTX0.OUT_ROI_Y_START
WriteAutoIncrement(0x0464, 0x51, 0x05);             //STREAM_CTX0.OUT_ROI_Y_END

The SW only fails at 1120x480 if it is the first script uploaded after powering on the sensor and booting up the SW.  If I instead start at 1120x1360, run that for a little bit, then switch over to 1120x480, it works great.  Because of this, I don't think there is anything wrong with using that specific resolution when selecting a ROI, just when starting with that resolution after powering on.

Is there a reason that this happens?  I am using the evaluation platform to verify different register configurations before uploading them to a custom built sensor PCB, but am concerned that there is something wrong with starting at specific resolutions when using the sensor.  Is this a bug in the SW, or will the image sensor itself also fail to stream data when configured at different resolutions after power-up?

3 REPLIES 3
CyrilTechPro
ST Employee

Hello astral, 

 

I have tried the script on my side is ok before launch any script please be sure to press button "reboot", 

on the script there is no boot sequence only sensor configuration 

Could you please try? 

 

Regards 

 

 

 

 

 

astral256
Associate II

Rebooting the sensor did not change the displayed behavior by the software.

To reiterate my process, I plugged in the sensor, I loaded the software, I loaded the script, I tried to capture frames (and failed to), I rebooted the sensor from the software, I reloaded the same script, and I tried to capture frames (and still failed to).  Here is what the output of the log looks like:

astral256_0-1752698462612.png

 

MeganeG
ST Employee

Hi @astral256,

What you are doing seems to be correct. Could you please clarify what you mean by “the following script will cause the SW to fail to read a frame sequence”? Are you seeing an error message? It would help us better understand the issue.

Thank you, Megane


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'