This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TDA2PXEVM: How to perform Fusion Board software reset or software power-cycle from TDA2Px

Part Number: TDA2PXEVM


Tool/software: TI-RTOS

Hello,

I would like to inquire how to properly perform software reset or software power-cycle of the Fusion Board connected to a TDA2Px.

As of now, I added function in app_util_iss.c:

#define UB960_DIGITAL_RESET0 1
#define UB960_DIGITAL_RESET1 2
static int resetDeserializer(UInt32 instId)
{
	UInt8 regAddr, regVal;
	int i;

	/* 2.5 reset DS90USB960 */
	regAddr = 0x01; // RESET_CTL Register (Address 0x01)
	regVal = UB960_DIGITAL_RESET1;
	if(Bsp_deviceWrite8(UB960_ACCESSIBLE_FROM_I2C_INST,
			    gAppUtilIssSlaveAliases[instId].slaveAddr,
			    &regAddr, &regVal, (UInt32) 1U) != 0){
		Vps_printf("can't write to Deserializer, instId=%d\n", instId);
	}

This function is called during initialization of ISS module, specifically in IssUtils_appInitUb960.

However, with this method, after performing software power cycle in TDA2PX, sometimes not all cameras function properly.
In a rate of 1/10, either capture channel 0 or channel 1 sometimes does not start streaming.

This issue does not occur when starting hard power cycle in TDA2px (0/25 trials).

Could you guide me to the proper way to perform power cycle of the Fusion Board through software?

  • Hi Norman,

    Can you please check if you are putting enough delay after resetting UB960? can you try keeping few ms of delay after reset?
    Also does SW reset (UB960_DIGITAL_RESET0) work fine for you?

    Rgds,
    Brijesh
  • Hello Brijesh,

    Thank you for the response.

    Putting 100msec after writing and confirming bit clearing of RESET_CTL (DIGITAL_RESET1) still results to the same issue.

    Same issue can also be observed when using RESET_CTL (DIGITAL_RESET0).

    For your reference, please refer to the following logs:

    [IPU1-0]      6.183736 s:  *** UTILS: CPU KHz = 20000 Khz ***
    [IPU1-0]      6.199963 s: Reset Deserializer, instId=0, took 0msec
    [HOST  ]      5.632495 s:  IPC_IN_0   : Create in progress !!!
    [HOST  ]      5.632800 s:  IPC_IN_0   : Create Done !!!
    [HOST  ]      6.161227 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023 
    [HOST  ]      6.161257 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 6291456 B )
    [IPU1-0]      6.374763 s: Setting Camera Power to 3!!!
    [IPU1-0]      6.374855 s: Waiting for 100 milliseconds!!!
    [IPU1-0]      6.474775 s: Serilaizer # 0 has I2CAddr 74 !!!
    [IPU1-0]      6.495760 s: Serilaizer # 1 has I2CAddr 76 !!!
    [HOST  ]      6.809064 s:  NETWORK_CTRL: Starting Server (port=5000) !!!
    [HOST  ]      6.809095 s:  NETWORK_CTRL: Starting Server ... DONE (port=5000) !!!
    [IPU1-0]      9.546849 s:  #### Sensor Config time = 3363 msec ####
    [IPU1-0]      9.547032 s:  DISPLAY: Start in progress !!!
    [IPU1-0]      9.547093 s:  DISPLAY: Start Done !!!
    ...
    [IPU1-0]     14.442597 s:  ISSCAPTURE: Start in progress !!!
    [IPU1-0]     14.442841 s:  ISSCAPTURE: Start Done !!!
    [IPU1-0]     14.443359 s: 
    [IPU1-0]  
    [IPU1-0]  ====================
    [IPU1-0]  Chains Run-time Menu
    [IPU1-0]  ====================
    [IPU1-0]  
    [IPU1-0]  0: Stop Chain
    [IPU1-0]  
    [IPU1-0]  p: Print Performance Statistics 
    [IPU1-0]  
    [IPU1-0]  Enter Choice: 
    [IPU1-0]  
    [IPU1-0]     31.076435 s:  
    [IPU1-0]     31.076496 s:  CPU [IPU1-0 ] Statistics, 
    [IPU1-0]     31.076587 s:  ************************* 
    [IPU1-0]     31.076648 s:  
    [IPU1-0]     31.076679 s:  LOAD: CPU: 10.5% HWI: 1.3%, SWI:0.5%, Low Power: 0.0% 
    [IPU1-0]     31.076831 s:  
    [IPU1-0]     31.076892 s:  LOAD: TSK: DUP0                : 0.3% 
    [IPU1-0]     31.077014 s:  LOAD: TSK: IPC_OUT_0           : 0.6% 
    [IPU1-0]     31.077136 s:  LOAD: TSK: SYNC0               : 0.5% 
    [IPU1-0]     31.077228 s:  LOAD: TSK: ISSCAPTURE          : 0.3% 
    [IPU1-0]     31.077319 s:  LOAD: TSK: ISSM2MISP           : 2.8% 
    [IPU1-0]     31.077472 s:  LOAD: TSK: ALGORITHM1          : 0.1% 
    [IPU1-0]     31.078875 s:  LOAD: TSK: STAT_COLL           : 3.3% 
    [IPU1-0]     31.079027 s:  LOAD: TSK: MISC                : 0.8% 
    [IPU1-0]     31.079088 s:  
    [IPU1-0]     31.079149 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023 
    [IPU1-0]     31.079241 s:  
    [IPU1-0]     31.079271 s:  SYSTEM: Sempahores Objects,   51 of 1050 free 
    [IPU1-0]     31.079363 s:  SYSTEM: Task Objects      ,    6 of  100 free 
    [IPU1-0]     31.079485 s:  SYSTEM: Clock Objects     ,   95 of  100 free 
    [IPU1-0]     31.079576 s:  SYSTEM: Hwi Objects       ,   87 of  100 free 
    [IPU1-0]     31.079668 s:  
    [IPU1-0]     31.079698 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B ()
    [IPU1-0]     31.079881 s:  SYSTEM: Heap = SR_OCMC              @ 0x00000000, Total size = 0 B (0 KB))
    [IPU1-0]     31.080034 s:  SYSTEM: Heap = SR_DDR_CACHED        @ 0x89103000, Total size = 351260672 )
    [IPU1-0]     31.080217 s:  SYSTEM: Heap = SR_DDR_NON_CACHED    @ 0xbfc00000, Total size = 129664 B ()
    [IPU1-0]     31.080400 s:  
    [IPU1-0]     31.080461 s:  
    [IPU1-0]     31.080491 s:  CPU [HOST   ] Statistics, 
    [IPU1-0]     31.080552 s:  ************************* 
    [IPU1-0]     31.080613 s:  
    [IPU1-0]     31.080674 s:  LOAD: CPU: 65.6% HWI: 0.1%, SWI:0.1%, Low Power: 0.0% 
    [IPU1-0]     31.080827 s:  
    [IPU1-0]     31.080949 s:  LOAD: TSK: MISC                : 65.4% 
    [IPU1-0]     31.081040 s:  
    [IPU1-0]     31.081071 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023 
    [IPU1-0]     31.081162 s:  
    [IPU1-0]     31.081193 s:  SYSTEM: Sempahores Objects,  389 of 1050 free 
    [IPU1-0]     31.081284 s:  SYSTEM: Task Objects      ,   32 of  100 free 
    [IPU1-0]     31.081376 s:  SYSTEM: Clock Objects     ,   99 of  100 free 
    [IPU1-0]     31.081498 s:  SYSTEM: Hwi Objects       ,   98 of  100 free 
    [IPU1-0]     31.081589 s:  
    [IPU1-0]     31.081620 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 6291456 B )
    [IPU1-0]     31.081803 s:  
    [IPU1-0]     31.081894 s:  
    [IPU1-0]     31.081955 s:  UTILS_PRCM_STATS:  Current Temperature,
    [IPU1-0]     31.082016 s:  
    [IPU1-0]     31.082077 s:   Voltage Rail         ||   Curr Temp Min - Max   
    [IPU1-0]     31.082138 s:  --------------------------------------------------------- 
    [IPU1-0]     31.082260 s:      PMHAL_PRCM_VD_MPU ||     [39.200 , 39.600]    
    [IPU1-0]     31.082382 s:     PMHAL_PRCM_VD_CORE ||     [39.200 , 39.600]    
    [IPU1-0]     31.082535 s:    PMHAL_PRCM_VD_IVAHD ||     [38.800 , 39.200]    
    [IPU1-0]     31.082657 s:   PMHAL_PRCM_VD_DSPEVE ||     [37.600 , 38.  0]    
    [IPU1-0]     31.082779 s:      PMHAL_PRCM_VD_GPU ||     [38.400 , 38.800]    
    [IPU1-0]     31.082901 s: 
    [IPU1-0]     31.082931 s: ===========================================================================
    [IPU1-0]     31.083023 s: Name      | Bus (mV)  | Res (mOhm) | Shunt (uV)  | Current (mA) | Power (m)
    [IPU1-0]     31.083145 s: ---------------------------------------------------------------------------
    [IPU1-0]     31.084365 s:  UTILS_PRCM_STATS: Reading the regulator data failed
    [IPU1-0]     31.084487 s:  UTILS_PRCM_STATS: PM INA226 Power Read Failed !!
    [IPU1-0]     31.085707 s:  
    [IPU1-0]     31.085768 s:  Statistics Collector,
    [IPU1-0]     31.085829 s:  
    [IPU1-0]     31.085859 s:        STATISTIC          Avg Data        Peak Data 
    [IPU1-0]     31.085951 s:        COLLECTOR          MB/s            MB/s      
    [IPU1-0]     31.086042 s:  -------------------------------------------------- 
    [IPU1-0]     31.086134 s:  SCI_EMIF1 RD+WR      |    398.205070   1320.001628
    [IPU1-0]     31.086225 s:  SCI_EMIF2 RD+WR      |      0.000000      0.000000
    [IPU1-0]     31.086347 s:  SCI_EMIF1 RD ONLY    |    200.649541    681.783460
    [IPU1-0]     31.086469 s:  SCI_EMIF1 WR ONLY    |    197.789631    640.778660
    [IPU1-0]     31.086683 s:  SCI_EMIF2 RD ONLY    |      0.000000      0.000000
    [IPU1-0]     31.086805 s:  SCI_EMIF2 WR ONLY    |      0.000000      0.000000
    [IPU1-0]     31.086896 s:  SCI_MA_MPU_P1        |      0.301443      4.740858
    [IPU1-0]     31.087018 s:  SCI_MA_MPU_P2        |      0.000000      0.000000
    [IPU1-0]     31.087110 s:  SCI_DSS              |      0.000000      0.000000
    [IPU1-0]     31.087232 s:  SCI_IPU1             |     26.005991    139.975302
    [IPU1-0]     31.087323 s:  SCI_VIP1_P1          |      0.000000      0.000000
    [IPU1-0]     31.087445 s:  SCI_VIP1_P2          |      0.000000      0.000000
    [IPU1-0]     31.087567 s:  SCI_VPE_P1           |      0.000102      0.207245
    [IPU1-0]     31.087659 s:  SCI_VPE_P2           |      0.000102      0.207245
    [IPU1-0]     31.087750 s:  SCI_DSP1_MDMA        |      0.000000      0.000000
    [IPU1-0]     31.087872 s:  SCI_DSP1_EDMA        |      0.000000      0.000000
    [IPU1-0]     31.087964 s:  SCI_DSP2_MDMA        |      0.000000      0.000000
    [IPU1-0]     31.088086 s:  SCI_DSP2_EDMA        |      0.000000      0.000000
    [IPU1-0]     31.088177 s:  SCI_EVE1_TC0         |      0.000000      0.000000
    [IPU1-0]     31.088269 s:  SCI_EVE1_TC1         |      0.000000      0.000000
    [IPU1-0]     31.088391 s:  SCI_EVE2_TC0         |      0.000000      0.000000
    [IPU1-0]     31.088726 s:  SCI_EVE2_TC1         |      0.000000      0.000000
    [IPU1-0]     31.088848 s:  SCI_EDMA_TC0_RD      |      0.000000      0.000000
    [IPU1-0]     31.088940 s:  SCI_EDMA_TC0_WR      |      0.000000      0.000000
    [IPU1-0]     31.089062 s:  SCI_EDMA_TC1_RD      |      0.000000      0.000000
    [IPU1-0]     31.089153 s:  SCI_EDMA_TC1_WR      |      0.000000      0.000000
    [IPU1-0]     31.089245 s:  SCI_VIP2_P1          |      0.000000      0.000000
    [IPU1-0]     31.089367 s:  SCI_VIP2_P2          |      0.000000      0.000000
    [IPU1-0]     31.089489 s:  SCI_IVA              |      0.000000      0.000000
    [IPU1-0]     31.089580 s:  SCI_GPU_P1           |      0.000000      0.000000
    [IPU1-0]     31.089702 s:  SCI_GPU_P2           |      0.000000      0.000000
    [IPU1-0]     31.089794 s:  SCI_GMAC_SW          |      0.000000      0.000000
    [IPU1-0]     31.089916 s:  SCI_OCMC_RAM1        |      0.000000      0.000000
    [IPU1-0]     31.090007 s:  SCI_OCMC_RAM2        |      0.000000      0.000000
    [IPU1-0]     31.090099 s:  SCI_OCMC_RAM3        |      0.000000      0.000000
    [IPU1-0]     31.090221 s:  SCI_ISS_RT           |      0.000000      0.000000
    [IPU1-0]     31.090312 s:  SCI_ISS_NRT1         |    197.315120   1192.711871
    [IPU1-0]     31.090434 s:  SCI_ISS_NRT2         |      0.000000      0.000000
    [IPU1-0]     31.090556 s:  SCI_CAL              |    112.780509    129.259016
    [IPU1-0]     31.190447 s:  
    [IPU1-0]     31.190508 s:  
    [IPU1-0]     31.190599 s:  
    [IPU1-0]     31.190660 s:  ### CPU [IPU1-0], LinkID [ 87],
    [IPU1-0]     31.190752 s:  
    [IPU1-0]     31.190782 s:  [ ISSCAPTURE ] Link Statistics,
    [IPU1-0]     31.190843 s:  ******************************
    [IPU1-0]     31.190904 s:  
    [IPU1-0]     31.190965 s:  Elapsed time       = 16710 msec
    [IPU1-0]     31.191026 s:  
    [IPU1-0]     31.191057 s:  Get Full Buf Cb    =  30.4 fps
    [IPU1-0]     31.191148 s:  Put Empty Buf Cb   =  30.4 fps
    [IPU1-0]     31.191209 s:  Driver/Notify Cb   =  29.98 fps
    [IPU1-0]     31.191301 s:  
    [IPU1-0]     31.191331 s:  Input Statistics,
    [IPU1-0]     31.191392 s:  
    [IPU1-0]     31.191453 s:  CH | In Recv | In Drop | In User Drop | In Process 
    [IPU1-0]     31.191514 s:     | FPS     | FPS     | FPS          | FPS        
    [IPU1-0]     31.191606 s:  -------------------------------------------------- 
    [IPU1-0]     31.191697 s:   1 |  30. 4      0. 0      0. 0          30. 4 
    [IPU1-0]     31.191819 s:  
    [IPU1-0]     31.191850 s:  Output Statistics,
    [IPU1-0]     31.191911 s:  
    [IPU1-0]     31.191972 s:  CH | Out | Out     | Out Drop | Out User Drop 
    [IPU1-0]     31.192094 s:     | ID  | FPS     | FPS      | FPS           
    [IPU1-0]     31.192185 s:  --------------------------------------------- 
    [IPU1-0]     31.192277 s:   1 |  0     30. 4     0. 0      0. 0 
    [IPU1-0]     31.192368 s:  
    [IPU1-0]     31.192429 s:  [ ISSCAPTURE ] LATENCY,
    [IPU1-0]     31.192521 s:  ********************
    [IPU1-0]     31.192582 s:  
    [IPU1-0]     31.192673 s:  
    [IPU1-0]     31.192704 s:  ### CPU [IPU1-0], LinkID [ 88],
    [IPU1-0]     31.192795 s:  
    [IPU1-0]     31.192826 s:  [ ISSM2MISP ] Link Statistics,
    [IPU1-0]     31.192887 s:  ******************************
    [IPU1-0]     31.192948 s:  
    [IPU1-0]     31.193009 s:  Elapsed time       = 16712 msec
    [IPU1-0]     31.193070 s:  
    [IPU1-0]     31.193100 s:  New data Recv      =  30.3 fps
    [IPU1-0]     31.193192 s:  Get Full Buf Cb    =  60.7 fps
    [IPU1-0]     31.193253 s:  Driver/Notify Cb   =  30.3 fps
    [IPU1-0]     31.193344 s:  
    [IPU1-0]     31.193375 s:  Input Statistics,
    [IPU1-0]     31.193649 s:  
    [IPU1-0]     31.193710 s:  CH | In Recv | In Drop | In User Drop | In Process 
    [IPU1-0]     31.193771 s:     | FPS     | FPS     | FPS          | FPS        
    [IPU1-0]     31.193863 s:  -------------------------------------------------- 
    [IPU1-0]     31.193954 s:   1 |  30. 3      0. 0      0. 0          30. 3 
    [IPU1-0]     31.194076 s:  
    [IPU1-0]     31.194107 s:  Output Statistics,
    [IPU1-0]     31.194168 s:  
    [IPU1-0]     31.194198 s:  CH | Out | Out     | Out Drop | Out User Drop 
    [IPU1-0]     31.194290 s:     | ID  | FPS     | FPS      | FPS           
    [IPU1-0]     31.194351 s:  --------------------------------------------- 
    [IPU1-0]     31.194473 s:   1 |  0     30. 3     0. 0      0. 0 
    [IPU1-0]     31.194595 s:   1 |  1     30. 3     0. 0      0. 0 
    [IPU1-0]     31.194717 s:   1 |  2      0. 0    30. 3      0. 0 
    [IPU1-0]     31.194808 s:   1 |  3      0. 0    30. 3      0. 0 
    [IPU1-0]     31.194930 s:  
    [IPU1-0]     31.194991 s:  [ ISSM2MISP ] LATENCY,
    [IPU1-0]     31.195052 s:  ********************
    [IPU1-0]     31.195083 s:  Local Link Latency     : Avg =   7132 us, Min =   7076 us, Max =   8480 u 
    [IPU1-0]     31.195205 s:  Source to Link Latency : Avg =   7238 us, Min =   7167 us, Max =   8571 u 
    [IPU1-0]     31.195327 s:  

    The log above shows that capture channel 0 does not provide any frames.

    # Sometimes channel 1 does not provide frames instead of channel 0. 

    We have confirmed that the sensor (OV2775) streaming control register (0x3012) is set to 1 (meaning streaming) when this malfunction is occurring. 

  • Just an update, we are still encountering this issue.

    When this issue occurs, we verified the following:

    * Sensor side frame counter is incrementing (I2C reg=0x30D5 - 0x30D8)
    * But FVID callback Fvid2_queue is not being called thus ISS is not receiving the frames

    * I2C commands to the serializer and cameras are successful, thus no one is holding the SDA

    With the current situation, we are leaning on the issue might be in the analog signal.
  • Hi Norman,

    Could you please first check if the frame counters are incrementing in the CAL status registers? i think it is at the offset 0x489B0350, one register for each camera?

    Regards,
    Brijesh
  • Also before resetting the deserializer,

    - can you stop the sensor
    - reset the serializer

    and then reset the deserializer.

    can you see if this works?

    Rgds,
    Brijesh
  • Hello Brijesh,

    Thank you for providing this information.

    The CAL status register remains at 0 when malfunction occurs.

    When channel 0 frame is not received in ISS capture, 0x489B0350 is always 0.
    When channel 1 frame is not received, 0x489B0354 is always 0.

    I will try the recommended sequence of resetting specified in your next response.
  • Hello Brijesh,

    Regarding the sequence to stop sensor, reset serializer, then reset deserializer,
    unfortunately the power cycle in this case happens suddenly (i.e. assertion of PCIE reset) thus the sequence is not possible.

    Deserializer is in not init state, thus we cannot reach the sensors and the serializer.


    However, change both deserializer and initializer to use DIGITAL_RESET1 and increased the delay time as to 100msec for the three reset calls.
    So far the malfunction is not yet replicated: 0/20 tries.

    I will keep this thread open and perform more trials to check if the above fixes the issue altogether.
  • Thank you for your continuous and effective support Brijesh.
  • Hi Norman,

    is your issue resolved? Can we close the thread?

    Regards,
    Yordan
  • Hi Norman,

    ok so, you means resetting serializer and deserializer using DIGITAL_RESET1 with 100ms delay for both seems to be working. could you please confirm?

    Rgds,
    Brijesh
  • Hello Brijesh,

    Yes, So it seems.

    I still want to perform more retries before closing this thread. So far 0/30. I’ll continue tomorrow.

    I will mark this as resolved when I reach considerable big sample size (I.e. 100).

  • Sure, no problem
  • This issue has been resolved by the following sequence after software reset in TDA2px:

    1) Reset deserializer UB960 with DIGITAL_RESET1, then wait for 100msec
    2) Configure deserializer
    3) Reset both serializers UB953 with DIGITAL_RESET1, then wait for 100msec
    4) Configure serializers, configure sensor