1 Reply Latest reply on Feb 20, 2019 4:23 AM by abhinavg_21

    Cypress CX3 solution - Clock Continuous mode.

    edloc_953886

      Good morning,

      I have an issue related the usage of CX3 solution.

      Let me say that the CX3 based board we designed time ago works fine when the sensor works with clock gated (not in continuous mode).

      We are not considering a Video sensor but a Radar sensor where the payload are the conversions from antenna signals.  This is not fundamental but it is important when we will consider the configuration procedure of the sensor.

       

      In few words we have our Radar sensor able to stream data on the Host system.

      When the Radar works with clock gated and so we have clock that goes from LP11 to HS for each frame, everything works fine.

      Instead we are having problems when we need to use the continuous clock mode.

      In this working mode we see CX3 in Mipi Csi2 INIT_DONE state (at the beginning the clock and data lanes are kept in LP11 for at least 1ms and this is handled successfully).

       

      I saw on the web that there is a procedure to be done to manage the continuous clock, but this is not clear to me and I don’t know if this is OK with our radar system.

      This radar is programmed in order to do a sequence of acquisitions (like several video frames), following several profiles, and then the acquisition starts, it involves the sending of several data frames (called chirps – with related payload encapsulated in several data frames).

      For each data frame we have one Frame Start, Line Start, Payload, Line End, Frame End, and then again, ...

       

      This is the procedure available on the Community Forum.

      • Upon receiving the Set_Cur (Commit control) request from the host, perform a MIPI reset (CyU3PMipicsiReset() with the reset type as Hard reset ).
      • Initialize the MIPI bridge (CyU3PMipicsiInit () )
      • Set the MIPI interface parameters (CyU3PMipicsiSetIntfParams ()).
      • Release the reset of the sensor (XRST) (CyU3PMipicsiSetSensorControl() ).
      • Configure the sensor.

       

      Can you better explain the procedure because I cannot reconfigure the sensor at each data frame?

      In this working mode, we will receive several data frames with related synch packets (Short Packet Frames) with clock always in High Speed.

       

      Thanks a lot for your support.

      Best regards Edo.

        • 1. Re: Cypress CX3 solution - Clock Continuous mode.
          abhinavg_21

          Hi,

          I assume that you are using UVC class. Correct me if I am wrong.

          If it is working in gated clock mode properly, why do you want to run in continuous clocking mode.

          -- at the beginning the clock and data lanes are kept in LP11 for at least 1ms and this is handled successfully.

          Are you able to reach HS mode after LP11. What do you mean by saying that this is handled successfully.

          -- Can you better explain the procedure because I cannot reconfigure the sensor at each data frame?

          There is no need to configure sensor again and again for each data frame. You have to configure the sensor only when there is a new Set_curr request. I hope that you are streaming data continuously once set_curr request is sent.

           

          Here is one code snippet for running image sensor in continuous clocking mode. Take it as a reference:

           

          static void

          CyCx3UvcAppImageSensorSetVideoResolution(

                  uint8_t resolution_index

                  )

          {

          CyU3PReturnStatus_t status = CY_U3P_SUCCESS;

          switch (CyU3PUsbGetSpeed ())

          {

          case CY_U3P_SUPER_SPEED:

          switch (resolution_index)

          {

           

           

          case 0x01:

           

          /* Write 1080pSettings */

           

          CyU3PDebugPrint (4, "\n\rperform a MIPI reset");   // Steps to handle Set_curr request in continuous clocking mode

            CyU3PMipicsiReset(CY_U3P_CSI_HARD_RST);

            CyU3PDebugPrint (4, "\n\rInitialize the MIPI bridge ");

          status =  CyU3PMipicsiInit();

          if (status != CY_U3P_SUCCESS)

          {

          CyU3PDebugPrint (4, "\n\r MIPI Init Failied = 0x%x", status);

          }

          CyU3PDebugPrint (4, "\n\rSet the MIPI interface parameters");

          status = CyU3PMipicsiSetIntfParams (&null_YUY2_1080p, CyFalse);

          if (status != CY_U3P_SUCCESS)

          {

          CyU3PDebugPrint (4, "\n\rUSBStpCB:SetIntfParams SS1 Err = 0x%x", status);

          }

            CyU3PDebugPrint (4, "\n\rPhy Time Delay Setting.");

          CyU3PMipicsiSetPhyTimeDelay(1, 12); // Enter the PHY Delay Value here

          CyU3PMipicsiWakeup();

          CyU3PThreadSleep(100);

          CyU3PMipicsiSetSensorControl (CY_U3P_CSI_IO_XRES, CyTrue);

          status = CyCx3_ImageSensor_Set_1080p ();

          if(status != CY_U3P_SUCCESS)

          {

          CyU3PDebugPrint (4, "\n\rError - Sensor configuration.");

          }

          else

          {

          CyU3PDebugPrint (4, "\n\r Success - Sensor configuration.");

          }

           

          break;

           

          }

          break;

           

          }

          }

           

           

          Thanks & Regards
          Abhinav Garg