CyU3PGpifGetSMState problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KACH_4155631
Level 1
Level 1

Hello

I use CX3 to connect a sensor by mipi interface.

After I start stream, I found the gpif status keep in CX3_PARTIAL_BUFFER_IN_SCK0 or CX3_PARTIAL_BUFFER_IN_SCK1.

Could you tell me what these status mean?

Does it mean the mipi receiver  not receive a complete frame?

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

The state is entered generally at the end of frame. Please confirm that h_active * v_active * bytes/pixel is not be a multiple of buffer size.

If this is true at the end of frame there will be a partially filled buffer. When this happens either of the CX3_PARTIAL_BUFFER_IN_SCK0 or CX3_PARTIAL_BUFFER_IN_SCK1 states are entered.

When in these states CPU is interrupted and In the firmware the partially filled buffers are forcefully wrapped and committed to consumer

cx3_gpif_cb.PNG

This CyU3PGpifControlSWInput (CyTrue);CyU3PGpifControlSWInput (CyFalse); will again switch to the state machine from the firmware. Please confirm your firmware is having this implementation.

You can refer to the GPIF state machine in AN75779 application note. CX3 is having similar state machine running on it.

Also share the debug prints where the Gpif states are printed while streaming . are there any other errors? Are you using the project files generated by CX3 configuration utility (default) as per this KBA Steps to Setup up MIPI CSI Camera Solution with CX3 – KBA225748

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
1 Reply
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

The state is entered generally at the end of frame. Please confirm that h_active * v_active * bytes/pixel is not be a multiple of buffer size.

If this is true at the end of frame there will be a partially filled buffer. When this happens either of the CX3_PARTIAL_BUFFER_IN_SCK0 or CX3_PARTIAL_BUFFER_IN_SCK1 states are entered.

When in these states CPU is interrupted and In the firmware the partially filled buffers are forcefully wrapped and committed to consumer

cx3_gpif_cb.PNG

This CyU3PGpifControlSWInput (CyTrue);CyU3PGpifControlSWInput (CyFalse); will again switch to the state machine from the firmware. Please confirm your firmware is having this implementation.

You can refer to the GPIF state machine in AN75779 application note. CX3 is having similar state machine running on it.

Also share the debug prints where the Gpif states are printed while streaming . are there any other errors? Are you using the project files generated by CX3 configuration utility (default) as per this KBA Steps to Setup up MIPI CSI Camera Solution with CX3 – KBA225748

Regards,

Rashi

Regards,
Rashi
0 Likes