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.

TMDS273GPEVM: AM273x

Part Number: TMDS273GPEVM

I'm developing CSIRX function with TMDS273GPEVM.

sysconfig is as below.

And I'm following the step of programming model in technical reference manual.

However I'm having trouble with the program.

I can see the CSI2_COMPLEXIO_CFG1.PWR_STATE doesn't reach the Power On state.

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "AM273x" --package "ZCE" --part "Default" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM273x.evmAM273x@09.01.00"
 * @versions {"tool":"1.18.0+3266"}
 */

/**
 * Import the modules used in this configuration.
 */
const flash           = scripting.addModule("/board/flash/flash", {}, false);
const flash1          = flash.addInstance();
const csirx           = scripting.addModule("/drivers/csirx/csirx", {}, false);
const csirx1          = csirx.addInstance();
const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
const gpio1           = gpio.addInstance();
const gpio2           = gpio.addInstance();
const gpio3           = gpio.addInstance();
const gpio4           = gpio.addInstance();
const i2c             = scripting.addModule("/drivers/i2c/i2c", {}, false);
const i2c1            = i2c.addInstance();
const rti             = scripting.addModule("/drivers/rti/rti", {}, false);
const rti1            = rti.addInstance();
const uart            = scripting.addModule("/drivers/uart/uart", {}, false);
const uart1           = uart.addInstance();
const clock           = scripting.addModule("/kernel/dpl/clock");
const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
const mpu_armv7       = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
const mpu_armv71      = mpu_armv7.addInstance();
const mpu_armv72      = mpu_armv7.addInstance();
const mpu_armv73      = mpu_armv7.addInstance();
const mpu_armv74      = mpu_armv7.addInstance();
const mpu_armv75      = mpu_armv7.addInstance();
const default_linker  = scripting.addModule("/memory_configurator/default_linker", {}, false);
const default_linker1 = default_linker.addInstance();
const general         = scripting.addModule("/memory_configurator/general", {}, false);
const general1        = general.addInstance();
const region          = scripting.addModule("/memory_configurator/region", {}, false);
const region1         = region.addInstance();
const section         = scripting.addModule("/memory_configurator/section", {}, false);
const section1        = section.addInstance();
const section2        = section.addInstance();
const section3        = section.addInstance();
const section4        = section.addInstance();
const section5        = section.addInstance();
const section6        = section.addInstance();
const section7        = section.addInstance();
const section8        = section.addInstance();
const section9        = section.addInstance();
const section10       = section.addInstance();
const section11       = section.addInstance();
const section12       = section.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
flash1.$name                  = "CONFIG_FLASH0";
flash1.peripheralDriver.$name = "CONFIG_QSPI0";

csirx1.$name                                                = "CONFIG_CSIRX0";
csirx1.phyEnable                                            = true;
csirx1.instance                                             = "CSIRX B";
csirx1.dphy.$name                                           = "CONFIG_CSIRX_DPHY0";
csirx1.dphy.ddrClockInHz                                    = 150000000;
csirx1.dphy.isClockMissingDetectionEnabled                  = false;
csirx1.complexio.$name                                      = "CONFIG_CSIRX_COMPLEXIO0";
csirx1.complexio.dataLane2_position                         = "CSIRX_LANE_POSITION_LANE_NOT_USED";
csirx1.complexio.dataLane3_position                         = "CSIRX_LANE_POSITION_LANE_NOT_USED";
csirx1.common.$name                                         = "CONFIG_CSIRX_COMMON0";
csirx1.common.commonCallback                                = "App_csirxCommonCallback";
csirx1.common.combinedEndOfFrameCallback                    = "App_csirxEndOfFrameCallback";
csirx1.common.isOcpError                                    = true;
csirx1.common.isOneBitShortPacketErrorCorrect               = true;
csirx1.common.isGenericShortPacketReceive                   = true;
csirx1.common.isMoreThanOneBitShortPacketErrorCannotCorrect = true;
csirx1.common.isComplexioError                              = true;
csirx1.common.isFifoOverflow                                = true;
csirx1.context[0].$name                                     = "CONFIG_CSIRX_CONTEXT0";
csirx1.context[0].isFrameEndCodeDetect                      = true;
csirx1.context[0].format                                    = "CSIRX_FORMAT_RAW12";
csirx1.context[0].numLinesForIntr                           = 64;
csirx1.context[0].isEndOfFramePulseEnabled                  = true;
csirx1.context[0].isLineEndCodeDetect                       = true;
csirx1.context[0].isGenerateIntrEveryNumLinesForIntr        = false;
csirx1.context[0].isNumLines                                = true;
csirx1.context[0].isPayloadChecksumMismatch                 = true;
csirx1.context[0].isLineStartCodeDetect                     = true;
csirx1.context[0].isFramesToAcquire                         = true;
csirx1.context[0].isFrameStartCodeDetect                    = true;
csirx1.context[0].isLongPacketOneBitErrorCorrect            = true;

gpio1.pinDir                   = "OUTPUT";
gpio1.$name                    = "MLX_RESETN";
gpio1.MSS_GPIO.gpioPin.$assign = "PAD_DP";

gpio2.$name                    = "MLX_TRIG";
gpio2.pinDir                   = "OUTPUT";
gpio2.MSS_GPIO.gpioPin.$assign = "PAD_DQ";

gpio3.$name                    = "VCSEL_EN";
gpio3.pinDir                   = "OUTPUT";
gpio3.MSS_GPIO.gpioPin.$assign = "PAD_DR";

gpio4.$name                    = "V1_2_EN";
gpio4.pinDir                   = "OUTPUT";
gpio4.MSS_GPIO.gpioPin.$assign = "PAD_DZ";

i2c1.$name                = "I2CB_MLX";
i2c1.instance             = "RCSS_I2CB";
i2c1.advanced             = true;
i2c1.RCSS_I2C.$assign     = "RCSS_I2CB";
i2c1.RCSS_I2C.SCL.pull    = "pu";
i2c1.RCSS_I2C.SCL.$assign = "PAD_CW";
i2c1.RCSS_I2C.SDA.pull    = "pu";
i2c1.RCSS_I2C.SDA.$assign = "PAD_CV";

rti1.$name          = "CONFIG_RTI0";
rti1.counter0Enable = true;
rti1.compare0Enable = true;
rti1.eventCallback0 = "rtiEvent0";
rti1.enableIntr0    = true;

uart1.$name = "CONFIG_UART0";

const edma                         = scripting.addModule("/drivers/edma/edma", {}, false);
const edma1                        = edma.addInstance({}, false);
edma1.$name                        = "CONFIG_EDMA0";
flash1.peripheralDriver.edmaConfig = edma1;
uart1.edmaConfig                   = edma1;
edma1.edmaRmDmaCh[0].$name         = "CONFIG_EDMA_RM0";
edma1.edmaRmQdmaCh[0].$name        = "CONFIG_EDMA_RM1";
edma1.edmaRmTcc[0].$name           = "CONFIG_EDMA_RM2";
edma1.edmaRmParam[0].$name         = "CONFIG_EDMA_RM3";
edma1.edmaRmReservedDmaCh[0].$name = "CONFIG_EDMA_RM4";

mpu_armv71.$name        = "CONFIG_MPU_REGION0";
mpu_armv71.attributes   = "Device";
mpu_armv71.allowExecute = false;

mpu_armv72.$name = "CONFIG_MPU_REGION1";
mpu_armv72.size  = 14;

mpu_armv73.$name    = "CONFIG_MPU_REGION2";
mpu_armv73.baseAddr = 0x80000;
mpu_armv73.size     = 14;

mpu_armv74.$name    = "CONFIG_MPU_REGION3";
mpu_armv74.baseAddr = 0x10200000;
mpu_armv74.size     = 20;

mpu_armv75.$name        = "CONFIG_MPU_REGION4";
mpu_armv75.baseAddr     = 0x102E0000;
mpu_armv75.size         = 16;
mpu_armv75.attributes   = "NonCached";
mpu_armv75.allowExecute = false;

default_linker1.$name = "memory_configurator_default_linker0";

general1.$name        = "CONFIG_GENERAL0";
general1.linker.$name = "TIARMCLANG0";

region1.$name                               = "MEMORY_REGION_CONFIGURATION0";
region1.memory_region.create(10);
region1.memory_region[0].$name              = "R5F_VECS";
region1.memory_region[0].size               = 0x40;
region1.memory_region[0].auto               = false;
region1.memory_region[1].$name              = "R5F_TCMA";
region1.memory_region[1].size               = 0x3FC0;
region1.memory_region[2].type               = "TCMB_R5F";
region1.memory_region[2].size               = 0x4000;
region1.memory_region[2].$name              = "R5F_TCMB";
region1.memory_region[3].type               = "MSS_L2_R5F";
region1.memory_region[3].$name              = "MSS_L2";
region1.memory_region[3].auto               = false;
region1.memory_region[3].manualStartAddress = 0x10260000;
region1.memory_region[3].size               = 0x40000;
region1.memory_region[4].type               = "DSS_L3_ALL";
region1.memory_region[4].isShared           = true;
region1.memory_region[4].shared_cores       = ["c66ss0","r5fss0-1"];
region1.memory_region[4].$name              = "DSS_L3";
region1.memory_region[4].size               = 0x390000;
region1.memory_region[5].type               = "MSS_L2_R5F";
region1.memory_region[5].auto               = false;
region1.memory_region[5].manualStartAddress = 0x102E8000;
region1.memory_region[5].size               = 0x4000;
region1.memory_region[5].$name              = "USER_SHM_MEM";
region1.memory_region[5].isShared           = true;
region1.memory_region[5].shared_cores       = ["r5fss0-1"];
region1.memory_region[6].type               = "MSS_L2_R5F";
region1.memory_region[6].$name              = "LOG_SHM_MEM";
region1.memory_region[6].isShared           = true;
region1.memory_region[6].shared_cores       = ["r5fss0-1"];
region1.memory_region[6].size               = 0x4000;
region1.memory_region[7].type               = "CUSTOM_ALL";
region1.memory_region[7].$name              = "RTOS_NORTOS_IPC_SHM_MEM";
region1.memory_region[7].isShared           = true;
region1.memory_region[7].shared_cores       = ["c66ss0","r5fss0-1"];
region1.memory_region[7].auto               = false;
region1.memory_region[7].manualStartAddress = 0xC5000000;
region1.memory_region[7].size               = 0x1F40;
region1.memory_region[8].type               = "CUSTOM_ALL";
region1.memory_region[8].auto               = false;
region1.memory_region[8].$name              = "MAILBOX_HSM";
region1.memory_region[8].isShared           = true;
region1.memory_region[8].shared_cores       = ["c66ss0","r5fss0-1"];
region1.memory_region[8].manualStartAddress = 0x44000000;
region1.memory_region[8].size               = 0x3CE;
region1.memory_region[9].type               = "CUSTOM_ALL";
region1.memory_region[9].auto               = false;
region1.memory_region[9].manualStartAddress = 0x44000400;
region1.memory_region[9].size               = 0x3CE;
region1.memory_region[9].$name              = "MAILBOX_R5F";
region1.memory_region[9].isShared           = true;
region1.memory_region[9].shared_cores       = ["c66ss0","r5fss0-1"];

section1.$name                        = "Vector Table";
section1.group                        = false;
section1.load_memory                  = "R5F_VECS";
section1.output_section.create(1);
section1.output_section[0].$name      = ".vectors";
section1.output_section[0].palignment = true;

section2.$name                        = "Code and Read-Only Data";
section2.load_memory                  = "MSS_L2";
section2.output_section.create(2);
section2.output_section[0].$name      = ".text";
section2.output_section[0].palignment = true;
section2.output_section[1].$name      = ".rodata";
section2.output_section[1].palignment = true;

section3.$name                        = "Data Segment";
section3.load_memory                  = "MSS_L2";
section3.output_section.create(1);
section3.output_section[0].$name      = ".data";
section3.output_section[0].palignment = true;

section4.$name                                   = "Memory Segments";
section4.load_memory                             = "MSS_L2";
section4.output_section.create(3);
section4.output_section[0].$name                 = ".bss";
section4.output_section[0].palignment            = true;
section4.output_section[0].output_sections_start = "__BSS_START";
section4.output_section[0].output_sections_end   = "__BSS_END";
section4.output_section[1].$name                 = ".sysmem";
section4.output_section[1].palignment            = true;
section4.output_section[2].$name                 = ".stack";
section4.output_section[2].palignment            = true;

section5.$name                                    = "Stack Segments";
section5.load_memory                              = "MSS_L2";
section5.output_section.create(5);
section5.output_section[0].$name                  = ".irqstack";
section5.output_section[0].output_sections_start  = "__IRQ_STACK_START";
section5.output_section[0].output_sections_end    = "__IRQ_STACK_END";
section5.output_section[0].input_section.create(1);
section5.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
section5.output_section[1].$name                  = ".fiqstack";
section5.output_section[1].output_sections_start  = "__FIQ_STACK_START";
section5.output_section[1].output_sections_end    = "__FIQ_STACK_END";
section5.output_section[1].input_section.create(1);
section5.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
section5.output_section[2].$name                  = ".svcstack";
section5.output_section[2].output_sections_start  = "__SVC_STACK_START";
section5.output_section[2].output_sections_end    = "__SVC_STACK_END";
section5.output_section[2].input_section.create(1);
section5.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
section5.output_section[3].$name                  = ".abortstack";
section5.output_section[3].output_sections_start  = "__ABORT_STACK_START";
section5.output_section[3].output_sections_end    = "__ABORT_STACK_END";
section5.output_section[3].input_section.create(1);
section5.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
section5.output_section[4].$name                  = ".undefinedstack";
section5.output_section[4].output_sections_start  = "__UNDEFINED_STACK_START";
section5.output_section[4].output_sections_end    = "__UNDEFINED_STACK_END";
section5.output_section[4].input_section.create(1);
section5.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";

section6.$name                        = "Initialization and Exception Handling";
section6.load_memory                  = "MSS_L2";
section6.output_section.create(3);
section6.output_section[0].$name      = ".ARM.exidx";
section6.output_section[0].palignment = true;
section6.output_section[1].$name      = ".init_array";
section6.output_section[1].palignment = true;
section6.output_section[2].$name      = ".fini_array";
section6.output_section[2].palignment = true;

section7.$name                       = "BSS DSS L3";
section7.load_memory                 = "DSS_L3";
section7.group                       = false;
section7.output_section.create(1);
section7.output_section[0].$name     = ".bss.dss_l3";
section7.output_section[0].alignment = 0;

section8.$name                       = "User Shared Memory";
section8.load_memory                 = "USER_SHM_MEM";
section8.type                        = "NOLOAD";
section8.group                       = false;
section8.output_section.create(1);
section8.output_section[0].$name     = ".bss.user_shared_mem";
section8.output_section[0].alignment = 0;

section9.$name                       = "Log Shared Memory";
section9.type                        = "NOLOAD";
section9.load_memory                 = "LOG_SHM_MEM";
section9.group                       = false;
section9.output_section.create(1);
section9.output_section[0].$name     = ".bss.log_shared_mem";
section9.output_section[0].alignment = 0;

section10.$name                       = "IPC Shared Memory";
section10.type                        = "NOLOAD";
section10.load_memory                 = "RTOS_NORTOS_IPC_SHM_MEM";
section10.group                       = false;
section10.output_section.create(1);
section10.output_section[0].alignment = 0;
section10.output_section[0].$name     = ".bss.ipc_vring_mem";

section11.$name                       = "SIPC HSM Queue Memory";
section11.type                        = "NOLOAD";
section11.load_memory                 = "MAILBOX_HSM";
section11.group                       = false;
section11.output_section.create(1);
section11.output_section[0].alignment = 0;
section11.output_section[0].$name     = ".bss.sipc_hsm_queue_mem";

section12.$name                       = "SIPC R5F Queue Memory";
section12.type                        = "NOLOAD";
section12.group                       = false;
section12.load_memory                 = "MAILBOX_R5F";
section12.output_section.create(1);
section12.output_section[0].alignment = 0;
section12.output_section[0].$name     = ".bss.sipc_r5f_queue_mem";

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
flash1.peripheralDriver.MSS_QSPI["0"].$suggestSolution = "PAD_AL";
flash1.peripheralDriver.MSS_QSPI["1"].$suggestSolution = "PAD_AM";
flash1.peripheralDriver.MSS_QSPI["2"].$suggestSolution = "PAD_AN";
flash1.peripheralDriver.MSS_QSPI["3"].$suggestSolution = "PAD_AO";
flash1.peripheralDriver.MSS_QSPI.$suggestSolution      = "MSS_QSPI0";
flash1.peripheralDriver.MSS_QSPI.CLK.$suggestSolution  = "PAD_AP";
flash1.peripheralDriver.MSS_QSPI.CS.$suggestSolution   = "PAD_AQ";
gpio1.MSS_GPIO.$suggestSolution                        = "MSS_GPIO0";
gpio2.MSS_GPIO.$suggestSolution                        = "MSS_GPIO0";
gpio3.MSS_GPIO.$suggestSolution                        = "MSS_GPIO0";
gpio4.MSS_GPIO.$suggestSolution                        = "MSS_GPIO0";
rti1.MSS_RTI.$suggestSolution                          = "MSS_RTIC";
uart1.MSS_UART.$suggestSolution                        = "MSS_UARTA";
uart1.MSS_UART.RX.$suggestSolution                     = "PAD_AJ";
uart1.MSS_UART.TX.$suggestSolution                     = "PAD_AK";

below is my user log

CS2 process start
CS2_SYSCONFIG.MSTANBY MODE <= 0x02
Interrupt enable -> skip
CSI2_IRQSTATUS: 00000000
CSI2_IRQENABLE: 00000000
complex io Interrupt enable -> skip
CSI2_COMPLEXIO1_IRQSTATUS: 00000000
CSI2_COMPLEXIO1_IRQENABLE: 00739CE7
set CSI2_COMPLEXIO_CFG1.PWR_CMD to ON state
CSI2_COMPLEXIO_CFG1: 48000213
CSI2_COMPLEXIO_CFG1: 48000213
CSI2_COMPLEXIO_CFG1: 48000213

What I should check for this problem.

If you have example code for CSIRX with actual image sensor not debug loopback mode, 
please provide me.

Thank you

  • Hi Anthony, 

    if you are looking for example code, have you tried taking a look at the SDK example project? (csirx_internal_capture)

    you can download it from here: MCU-PLUS-SDK-AM273X Software development kit (SDK) | TI.com

    I will also reach an expert to assist you with your main issue

    Best,

    Daniel

  • Hi, Thank you for the reply.

    I already had been tried the example.
    After modification of the example to apply to our sensor board + EVK, 
    It didn't work yet. And I don't know how to solve it.
    I think I should check the programming step by step.

    Best Regards. 

  • When the program is run, I see the user log as below
    I should find out the reason why the register CSI2_COMPLEXIO_CFG1: 0x48002213 dosn't reach POWER_ON state.

    step 1 -----
    CSI2_SYSCONFIG[13:12] MSTANDBY_MODE <= 0x2
    step 2 -----
    Configure CSI2_IRQENABLE => skip
    CSI2_IRQENABLE : 00000000
    step 3 -----
    Configure CSI2_COMPLEXIO1_IRQENABLE, CSI2_COMPLEXIO1_IRQSTATUS => skip
    CSI2_COMPLEXIO1_IRQENABLE: 00739CE7,  CSI2_COMPLEXIO1_IRQSTATUS: 00000000
    step 4 -----
    Configure CSI2_COMPLEXIO_CFG1.PWR_CMD => 0x1
    step 5 -----
    Waiting for Power on state.  CSI2_COMPLEXIO_CFG1: 48002213
    Waiting for Power on state.  CSI2_COMPLEXIO_CFG1: 48002213

  • Hi Antony,

    mmWave MCU Plus SDK provides TMDS273GPEVM+AWR22243 based application where AM273x reads the raw ADC data from AWR2243 device over CSI2.

    That application already configures CSI2 for data capture flow and it works without any issue.

    I suggest you to use that application only for your development.

    /mmwave_mcuplus_sdk_04_06_00_01/mmwave_mcuplus_sdk_04_06_00_01/ti/demo/am273x/mmw

    SDK download link: https://www.ti.com/tool/download/MMWAVE-MCUPLUS-SDK

    .

    Regards,

    Jitendra

  • Thank you for the information.

    When I try to import the demo project and search the CCS project file, I can't find the project file.

    Please let me know, how to import the project in my CCS program.  

  • Hello Antony,

    You cannot directly import the project in CCS, as that needs to be built using the cmd line. There is no CCS project for this as far as I am aware.
    Please refer the guide: 
    C:\ti\mmwave_mcuplus_sdk_04_06_00_01\mmwave_mcuplus_sdk_04_04_01_02\docs\mmwave_mcuplus_sdk_user_guide.pdf
    This will help you how to build projects from cmd line.

    Regards,
    Saswat Kumar

  • Thank you for the explanation.

    However, it is too hard to understand the project.

    I just want to receive the data by csirx component.

    The code you let me know is very good one, but I can't browsing the code, can't understand which library is used and how to apply to.

    Simply, I would like to configure one I2C communication for control TOF sensor, one CSI2RX component to receive the data.

    Finally, I would like to get one frame data by frame receive callback function in CCS compiler.

    I can send my CCS project. 

    That is what I really want to do to complete the code.

    I think it is the shortest way to solve the problem.

    Please take into account for that. 

    Thank you.

  • Hi

    I'm trying to work with my new CCS project.

    I would like to configure CSIRX component with my project.

    Next is sysconfig and CSIRX configration code.

    I brought CSIRX configraion code from mmWAVE SDK.

    This is sysconfig, scirx1 part.

    csirx1.$name                                                = "CONFIG_CSIRX0";
    csirx1.instance                                             = "CSIRX B";
    csirx1.dphy.$name                                           = "CONFIG_CSIRX_DPHY0";
    csirx1.dphy.ddrClockInHz                                    = 150000000;
    csirx1.dphy.isClockMissingDetectionEnabled                  = false;
    csirx1.complexio.$name                                      = "CONFIG_CSIRX_COMPLEXIO0";
    csirx1.complexio.dataLane2_position                         = "CSIRX_LANE_POSITION_LANE_NOT_USED";
    csirx1.complexio.dataLane3_position                         = "CSIRX_LANE_POSITION_LANE_NOT_USED";
    csirx1.common.$name                                         = "CONFIG_CSIRX_COMMON0";
    csirx1.common.commonCallback                                = "App_csirxCommonCallback";
    csirx1.common.combinedEndOfFrameCallback                    = "App_csirxEndOfFrameCallback";
    csirx1.common.isOcpError                                    = true;
    csirx1.common.isOneBitShortPacketErrorCorrect               = true;
    csirx1.common.isGenericShortPacketReceive                   = true;
    csirx1.common.isMoreThanOneBitShortPacketErrorCannotCorrect = true;
    csirx1.common.isComplexioError                              = true;
    csirx1.common.isFifoOverflow                                = true;
    csirx1.context[0].$name                                     = "CONFIG_CSIRX_CONTEXT0";
    csirx1.context[0].isFrameEndCodeDetect                      = true;
    csirx1.context[0].format                                    = "CSIRX_FORMAT_RAW12";
    csirx1.context[0].numLinesForIntr                           = 64;
    csirx1.context[0].isEndOfFramePulseEnabled                  = true;
    csirx1.context[0].isLineEndCodeDetect                       = true;
    csirx1.context[0].isGenerateIntrEveryNumLinesForIntr        = false;
    csirx1.context[0].isNumLines                                = true;
    csirx1.context[0].isPayloadChecksumMismatch                 = true;
    csirx1.context[0].isLineStartCodeDetect                     = true;
    csirx1.context[0].isFramesToAcquire                         = true;
    csirx1.context[0].isFrameStartCodeDetect                    = true;
    csirx1.context[0].isLongPacketOneBitErrorCorrect            = true;

    Next is CSIRX configuration code in my project.

    void MmwDemo_csirxConfig_Once(void)
    {
        int32_t errorCode = 0;
        volatile bool isComplexIOresetDone = 0;
        //volatile bool isForceRxModeDeasserted = 0;
        volatile uint32_t numComplexIOresetDonePolls = 0;
        //volatile uint32_t numComplexIOPowerStatusPolls = 0;
        //volatile uint32_t numForceRxModeDeassertedPolls = 0;
        //volatile uint8_t complexIOpowerStatus = 0;
        uint32_t contextId = 0;
        uint8_t isComplexIOpowerStatus = 1;
    
        // gCSIRXCfg.commonCfg.IRQcallbacks.startOfFrameIRQ0.arg = (uint32_t)obj;
    
        if(detApp.state != DETAPP_VIDEO_STREAMING)
            return;
    
    
        printf("csirxConfig: 1.CSIRX_complexioSetConfig\r\n");
        /* config complex IO - lanes and IRQ */
        errorCode = CSIRX_complexioSetConfig(csirxHandle, &gCsirxComplexioConfig[0]);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 2.CSIRX_complexioDeassertReset\r\n");
        /* deassert complex IO reset */
        errorCode = CSIRX_complexioDeassertReset(csirxHandle);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 3.CSIRX_dphySetConfig\r\n");
        /* config DPHY */
        errorCode = CSIRX_dphySetConfig(csirxHandle, &gCsirxDphyConfig[0]);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 4.CSIRX_complexioSetPowerCommand\r\n");
        errorCode = CSIRX_complexioSetPowerCommand(csirxHandle, 1);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 5.CSIRX_complexioGetPowerStatus\r\n");
    
        do
        {
            errorCode = CSIRX_complexioGetPowerStatus(csirxHandle, &isComplexIOpowerStatus);
            if(errorCode != SystemP_SUCCESS)
            {
                printf("errorCode: %d\r\n",errorCode);
                return;
            }
    
            numComplexIOresetDonePolls++;
        }while(isComplexIOpowerStatus == 0);
    
        printf("csirxConfig: 6.CSIRX_commonSetConfig\r\n");
        /* config common */
        errorCode = CSIRX_commonSetConfig(csirxHandle, &gCsirxCommonConfig[0]);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
    #ifdef LVDS_STREAM
        /* Configure memory in L3 Memory. */
        /* pingAddress = 0x88000000 */
        /* pongAddress = 0x88000000 + 0x4000 */
        gConfigCsirx0ContextConfig[0].pingPongConfig.pingAddress = CSL_DSS_L3_U_BASE;
        gConfigCsirx0ContextConfig[0].pingPongConfig.pongAddress = CSL_DSS_L3_U_BASE + CSL_DSS_HWA_BANK_SIZE;
    #else
        /* Configure memory in HWA Memory. */
        gConfigCsirx0ContextConfig[0].pingPongConfig.pingAddress = CSL_DSS_HWA_DMA0_RAM_BANK0_BASE;
        gConfigCsirx0ContextConfig[0].pingPongConfig.pongAddress = CSL_DSS_HWA_DMA0_RAM_BANK1_BASE;
    #endif
    
        printf("csirxConfig: 7.CSIRX_contextSetConfig\r\n");
        errorCode = CSIRX_contextSetConfig(csirxHandle, contextId, &gConfigCsirx0ContextConfig[0]);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 8.CSIRX_contextEnable\r\n");
        /* enable context */
        errorCode = CSIRX_contextEnable(csirxHandle, contextId);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 9.CSIRX_commonEnable\r\n");
        /* enable interface */
        errorCode = CSIRX_commonEnable(csirxHandle);
        if(errorCode != SystemP_SUCCESS)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 10.CSI2RXConfigCompleteSemHandle\r\n");
        //SemaphoreP_post(&gMmwDssMCB.CSI2RXConfigCompleteSemHandle);
    
        printf("csirxConfig: 11.CSIRX_complexioIsResetDone\r\n");
        /* Wait until complex IO reset complete */
        numComplexIOresetDonePolls = 0;
        do
        {
            errorCode= CSIRX_complexioIsResetDone(csirxHandle, (bool *)&isComplexIOresetDone);
            if(errorCode != SystemP_SUCCESS)
            {
                printf("errorCode: %d\r\n",errorCode);
                return;
            }
            if (isComplexIOresetDone == false)
            {
                ClockP_usleep(1 * 1000U);
                printf("wait\r\n");
            }
            numComplexIOresetDonePolls++;
        }while(isComplexIOresetDone == false);
    
        if(isComplexIOresetDone == false)
        {
            printf("errorCode: %d\r\n",errorCode);
            return;
        }
    
        printf("csirxConfig: 12.All PASS\r\n");
    }

    The result and problem is,

    CSIRX_complexioIsResetDone is not passed anymore.

    Which things I should check?

    Thank you for your friendly support again.

    Antony. Han 

  • Hello Antony Han,

    Please read through this e2e: (4) AWR2944: receive data from CSI2 - Sensors forum - Sensors - TI E2E support forums
    I had addressed this issue on this thread.

    Regards,
    Saswat Kumar

  • Hi Saswat Kumar

    I'm happy to know what I should do, which code I should refer to, etc.

    But I still didn't solve the problem.

    I follow the case you guided before.

    I got the same result before I had been experienced.
    the log message is like : 
        ERROR: Drivers_csirxInstanceOpen_usr:958: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!

    I modified code is as below

    int32_t Drivers_csirxInstanceOpen_usr(uint32_t instanceId, uint16_t numContexts, CSIRX_ContextConfig *pContextConfig)
    {
        int32_t status = SystemP_SUCCESS;
    
        DebugP_log("CSIRX_open\r\n");
        gCsirxHandle[instanceId] = CSIRX_open(CONFIG_CSIRX0);
        if(gCsirxHandle[instanceId] == NULL)
        {
            status = SystemP_FAILURE;
            DebugP_logError("CSIRX %d: CSIRX_open failed !!!\r\n", instanceId);
        }
        DebugP_log("CSIRX_reset\r\n");
        if(status==SystemP_SUCCESS)
        {
            status = CSIRX_reset(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_reset failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS && gCsirxPhyEnable[instanceId])
        {
            DebugP_log("CSIRX_complexioSetConfig\r\n");
            status = CSIRX_complexioSetConfig(gCsirxHandle[instanceId], &gCsirxComplexioConfig[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioSetConfig failed !!!\r\n", instanceId);
            }
    
            DebugP_log("CSIRX_complexioDeassertReset\r\n");
            if(status==SystemP_SUCCESS)
            {
                status = CSIRX_complexioDeassertReset(gCsirxHandle[instanceId]);
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioDeassertReset failed !!!\r\n", instanceId);
                }
            }
    
    #if 0
            if(status==SystemP_SUCCESS)
            {
                uint32_t numComplexioDonePolls = 0;
                bool isResetDone = false;
    
                /* Wait until complex IO reset complete */
                do
                {
                    status = CSIRX_complexioIsResetDone(gCsirxHandle[instanceId], &isResetDone);
                    if(status!=SystemP_SUCCESS)
                    {
                        break;
                    }
                    ClockP_usleep(1000);
                    numComplexioDonePolls++;
                } while(( isResetDone == false) && (numComplexioDonePolls < 5U) );
    
                if(isResetDone == false)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioIsResetDone failed !!!\r\n", instanceId);
                }
            }
    #endif
    
            if(status==SystemP_SUCCESS)
            {
                DebugP_log("CSIRX_dphySetConfig\r\n");
                status = CSIRX_dphySetConfig(gCsirxHandle[instanceId], &gCsirxDphyConfig[instanceId]);
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_dphySetConfig failed !!!\r\n", instanceId);
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_commonSetConfig\r\n");
            status = CSIRX_commonSetConfig(gCsirxHandle[instanceId], &gCsirxCommonConfig[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_commonSetConfig failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS && gCsirxPhyEnable[instanceId])
        {
            DebugP_log("CSIRX_complexioAssertForceRxModeOn\r\n");
            status = CSIRX_complexioAssertForceRxModeOn(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioAssertForceRxModeOn failed !!!\r\n", instanceId);
            }
    
            if(status==SystemP_SUCCESS)
            {
                uint32_t numForceRxModeDeassertedPolls = 0;
                bool isForceRxModeDeasserted = false;
    
                DebugP_log("CSIRX_complexioIsDeassertForceRxModeOn\r\n");
                /* wait until force rx mode deasserted: This may depend on Tx */
                do
                {
                    status = CSIRX_complexioIsDeassertForceRxModeOn(gCsirxHandle[instanceId],
                                                                        &isForceRxModeDeasserted);
                    if(status != SystemP_SUCCESS)
                    {
                        break;
                    }
                    ClockP_usleep(1000);
                    numForceRxModeDeassertedPolls++;
                } while( (isForceRxModeDeasserted == false) && (numForceRxModeDeassertedPolls < 5) );
    
                if(isForceRxModeDeasserted == false)
                {
                    status = SystemP_SUCCESS;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioIsDeassertForceRxModeOn failed !!!\r\n", instanceId);
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_commonEnable\r\n");
            /* enable interface */
            status = CSIRX_commonEnable(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_commonEnable failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS && gCsirxPhyEnable[instanceId])
        {
            DebugP_log("CSIRX_complexioPowerOn\r\n");
            /* Power on complex IO */
            status = CSIRX_complexioPowerOn(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioPowerOn failed !!!\r\n", instanceId);
            }
    
            if(status == SystemP_SUCCESS)
            {
                uint32_t numComplexioPowerStatusPolls = 0;
                uint8_t powerStatus = 0;
    
                DebugP_log("CSIRX_complexioGetPowerStatus\r\n");
                /* Wait until complex IO powered up */
                numComplexioPowerStatusPolls = 0;
                do
                {
                    status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
                    if(status != SystemP_SUCCESS)
                    {
                        break;
                    }
                    ClockP_usleep(1000);
                    numComplexioPowerStatusPolls++;
                } while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) &&
                        (numComplexioPowerStatusPolls < 5) );
    
                if(powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioGetPowerStatus failed !!!\r\n", instanceId);
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            uint32_t i;
    
            for(i = 0; i < numContexts; i++)
            {
                DebugP_log("CSIRX_contextSetConfig\r\n");
                /* config contexts */
                status = CSIRX_contextSetConfig(gCsirxHandle[instanceId], i, &pContextConfig[i] );
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_contextSetConfig for context %d failed !!!\r\n", instanceId, i);
                }
                if(status != SystemP_SUCCESS)
                {
                    break;
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_debugModeDisable\r\n");
            /* Debug mode, first flush FIFO - disable debug mode and enable interface */
            status = CSIRX_debugModeDisable(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_debugModeDisable failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_commonEnable\r\n");
            /* enable interface */
            status = CSIRX_commonEnable(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_commonEnable failed !!!\r\n", instanceId);
            }
        }
    
    
        if(status==SystemP_SUCCESS)
        {
            bool isResetDone = false;
    
            DebugP_log("CSIRX_complexioIsResetDone\r\n");
            /* Wait until complex IO reset complete */
            do
            {
                status = CSIRX_complexioIsResetDone(gCsirxHandle[instanceId], &isResetDone);
                if(status!=SystemP_SUCCESS)
                {
                    break;
                }
            } while(isResetDone == false);
    
            if(isResetDone == false)
            {
                status = SystemP_FAILURE;
            }
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioIsResetDone failed !!!\r\n", instanceId);
            }
        }
    
        DebugP_log("csirxInstanceOpen PASS !!!!\r\n");
        return status;
    }
    
    
    
    
    void csirxInstanceOpen_usr(void){
      int32_t ret;
      ret=Drivers_csirxInstanceOpen_usr(0,2,gConfigCsirx0ContextConfig);
    }

    part of the sysconfig for csirx

    I don't know if the board switch option value is not relevant, that makes this problem.

    Should I check the board condition ?
    Does one of the a matter of hardware can be a reason of the problem?

    I will wait to your opinion.

    Regards,

    Antony. Han

  • I attached user log

    CSIRX_open
    CSIRX_reset
    CSIRX_complexioSetConfig
    CSIRX_complexioDeassertReset
    CSIRX_dphySetConfig
    CSIRX_commonSetConfig
    CSIRX_complexioAssertForceRxModeOn
    CSIRX_complexioIsDeassertForceRxModeOn
    CSIRX_commonEnable
    CSIRX_complexioPowerOn
    CSIRX_complexioGetPowerStatus
    ERROR: Drivers_csirxInstanceOpen_usr:958: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!
     

  • I have a question.

    My program enable and generate the CSI2 stream(by GPIO toggling) AFTER AM273x csirx component is configured.

    It is related to the complexio Power status? 

  • Hi Antony,

    Here are the cases when the CSIRX_complexioGetPowerStatus() returns error:

    int32_t CSIRX_complexioGetPowerStatus (CSIRX_Handle handle, uint8_t *powerStatus)
    {
        int32_t status = SystemP_SUCCESS;
        CSIRX_Config *config = (CSIRX_Config *)handle;

        if( config == NULL
            || config->object == NULL
            || config->hwAttrs == NULL
            || config->hwAttrs->csirxRegs == 0
            || powerStatus == NULL
        )
        {
            status = SystemP_FAILURE;
        }

    It has nothing to do with the value of the complexio Power status.

    Make sure the parameters you passed to CSIRX_complexioGetPowerStatus() are correctly populated.

    Best regards,

    Ming

  • Hi Ming

    I modified the code to figure out the reason.

                DebugP_log("CSIRX_complexioGetPowerStatus\r\n");
                /* Wait until complex IO powered up */
                numComplexioPowerStatusPolls = 0;
                do
                {
                    status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
                    if(status != SystemP_SUCCESS)
                    {
                        DebugP_log("CSIRX_complexioGetPowerStatus FAIL (%d)\r\n", status);
                        break;
                    }
                    ClockP_usleep(1000);
                    numComplexioPowerStatusPolls++;
    
                    CSIRX_Config *config = (CSIRX_Config *)gCsirxHandle[instanceId];
    
                    if( config == NULL) DebugP_log("config is NULL\r\n");
                    else if( config->object == NULL) DebugP_log("config->object is NULL\r\n");
                    else if( config->hwAttrs == NULL) DebugP_log("config->hwAttrs is NULL\r\n");
                    else if( config->hwAttrs->csirxRegs == 0) DebugP_log("config->hwAttrs->csirxRegs is 0\r\n");
                    else if( powerStatus == NULL) DebugP_log("powerStatus is NULL\r\n");
                    else{
                        DebugP_log("No Error %d\r\n", numComplexioPowerStatusPolls);
                    }
    
                } while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) &&
                        (numComplexioPowerStatusPolls < 50) );

    Next is my user log.

    ~
    CSIRX_complexioPowerOn
    CSIRX_complexioGetPowerStatus
    powerStatus is NULL
    ~
    powerStatus is NULL
    powerStatus is NULL
    ERROR: Drivers_csirxInstanceOpen_usr:970: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!

    The result reason had been considered that the powerStatus value of the register did not reach On State.

    I think there would be directly reason for that.

    But I still can't find it.

    Please let me know the all of the point to be checked.

    Best regards,

    Antony Han 

  • Hi Antony,

    The CSIRX_complexioGetPowerStatus (CSIRX_Handle handle, uint8_t *powerStatus) needs two parameters:

    handle and powerStatus.

    There 5 cases will cause it returns error (SystemP_FAILURE):

    handle == NULL

    ((CSIRX_Config *)handle)-->object ==NULL

    ((CSIRX_Config *)handle)-->hwAttrs ==NULL

    ((CSIRX_Config *)handle)-->hwAttrs-->csirxRegs ==0

    powerStatus == NULL (the pointer to the variable (*powerStatus) should be non zero) 

    in your code, you were checking the powerStatus. You should have checked the &powerStatus==NULL 

    else if( powerStatus == NULL) DebugP_log("powerStatus is NULL\r\n");

    Best regards,

    Ming

  • Hi Ming

    I'm very happy to be hear from you quickly.

    The pointer value of powerStatus is valid.

    The powerStatus value obtained by CSIRX_complexioGetPowerStatus() function is zero(NULL).

    Again, the value is decided by the CSIRX_complexioGetPowerStatus() function.

    And I don't know what cause the powerStatus value to zero(NULL).

    Please refer to the next code.

    if(status == SystemP_SUCCESS)
            {
                uint32_t numComplexioPowerStatusPolls = 0;
                //uint8_t powerStatus = 0;
    
                DebugP_log("CSIRX_complexioGetPowerStatus\r\n");
                /* Wait until complex IO powered up */
                numComplexioPowerStatusPolls = 0;
                do
                {
                    status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
                    if(status != SystemP_SUCCESS)
                    {
                        DebugP_log("CSIRX_complexioGetPowerStatus FAIL (%d)\r\n", status);
                        break;
                    }
                    ClockP_usleep(1000);
                    numComplexioPowerStatusPolls++;
    
                    CSIRX_Config *config = (CSIRX_Config *)gCsirxHandle[instanceId];
    
                    if( config == NULL) DebugP_log("config is NULL\r\n");
                    else if( config->object == NULL) DebugP_log("config->object is NULL\r\n");
                    else if( config->hwAttrs == NULL) DebugP_log("config->hwAttrs is NULL\r\n");
                    else if( config->hwAttrs->csirxRegs == 0) DebugP_log("config->hwAttrs->csirxRegs is 0\r\n");
                    else if( powerStatus == NULL){
                        DebugP_log("address of powerStatus is %p, powerStatus value is %d\r\n",&powerStatus, powerStatus);
                    }
                    else{
                        DebugP_log("No Error %d\r\n", numComplexioPowerStatusPolls);
                    }
    
                } while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) &&
                        (numComplexioPowerStatusPolls < 50) );
    
                if(powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioGetPowerStatus failed !!!\r\n", instanceId);
                }
            }

    My user message is

    CSIRX_complexioPowerOn
    CSIRX_complexioGetPowerStatus
    address of powerStatus is 1028A217, powerStatus value is 0
    address of powerStatus is 1028A217, powerStatus value is 0
    ~
    address of powerStatus is 1028A217, powerStatus value is 0
    address of powerStatus is 1028A217, powerStatus value is 0
    ERROR: Drivers_csirxInstanceOpen_usr:972: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!

    Best regards,

    Antony Han

  • Hi Antony,

    Here is the code segment for the CSIRX_complexioGetPowerStatus():

    int32_t CSIRX_complexioGetPowerStatus (CSIRX_Handle handle, uint8_t *powerStatus)
    {
        int32_t status = SystemP_SUCCESS;
        CSIRX_Config *config = (CSIRX_Config *)handle;

        if( config == NULL
            || config->object == NULL
            || config->hwAttrs == NULL
            || config->hwAttrs->csirxRegs == 0
            || powerStatus == NULL)
        {
            status = SystemP_FAILURE;
        } else
        {
            CSL_csirxRegs *regs = (CSL_csirxRegs *) config->hwAttrs->csirxRegs;

            *powerStatus = (uint8_t)CSL_REG32_FEXT(& regs->COMPLEXIO_CFG1, CSI2_COMPLEXIO_CFG1_PWR_STATUS);
        }
        return status;
    }

    As you can see, if the CSIRX_complexioGetPowerStatus() returns error, one of the five highlighted conditions must failed. The value of the power status will not cause the error return in CSIRX_complexioGetPowerStatus.

    You need to check those 5 conditions in the following code:

    status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
    if(status != SystemP_SUCCESS)
    {
        DebugP_log("CSIRX_complexioGetPowerStatus FAIL (%d)\r\n", status);

        /* check the parameters here */
        break;
    }

    Best regards,

    Ming

  • I modified the code to see detailed.

    if(status == SystemP_SUCCESS)
            {
                uint32_t numComplexioPowerStatusPolls = 0;
                uint8_t powerStatus = 0x8;  // =============> Code 1
    
                DebugP_log("CSIRX_complexioGetPowerStatus\r\n");
                /* Wait until complex IO powered up */
                numComplexioPowerStatusPolls = 0;
                do
                {
                    //status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
    
                    //int32_t CSIRX_complexioGetPowerStatus (CSIRX_Handle handle, uint8_t *powerStatus)
                    //{
                        status = SystemP_SUCCESS;
                        CSIRX_Config *config = (CSIRX_Config *)gCsirxHandle[instanceId];
    
                        if( config == NULL
                            || config->object == NULL
                            || config->hwAttrs == NULL
                            || config->hwAttrs->csirxRegs == 0
                            || powerStatus == 0) // NULL == 0  // =============> Code 2
                        {
                            status = SystemP_FAILURE;
                        }
                        else
                        {
                            CSL_csirxRegs *regs = (CSL_csirxRegs *) config->hwAttrs->csirxRegs;
    
                            powerStatus = (uint8_t)( (regs->COMPLEXIO_CFG1>>25)&0x03 ); // bit 26-25 : PWR_STATUS
                            // =============> Code 3
                        }
                    //    return status;
                    //}
    
                    if(status != SystemP_SUCCESS)
                    {
                        DebugP_log("CSIRX_complexioGetPowerStatus FAIL (%d), powerStatus: %X\r\n", status, powerStatus);
                        break;
                    }else{
                        DebugP_log("CSIRX_complexioGetPowerStatus PASS, powerStatus: %X\r\n", powerStatus);
                    }
                    ClockP_usleep(1000);
                    numComplexioPowerStatusPolls++;
    
                } while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) &&
                        (numComplexioPowerStatusPolls < 50) );
    
                if(powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioGetPowerStatus failed !!!\r\n", instanceId);
                }
            }

    user log

    CSIRX_complexioPowerOn
    CSIRX_complexioGetPowerStatus
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus FAIL (-1), powerStatus: 0
    
    CSI2_Registers... for CSIRX_B
    000: 00000030 : CSI2_REVISION
    010: 00002001 : CSI2_SYSCONFIG
    014: 00000001 : CSI2_SYSSTATUS
    018: 00000000 : CSI2_IRQSTATUS
    01C: 00000001 : CSI2_IRQENABLE
    040: 00002079 : CSI2_CTRL
    044: 00000000 : CSI2_DBG_H
    048: 0000001B : CSI2_GNQ
    04C: 48000213 : CSI2_COMPLEXIO_CFG1
    050: 00000000 : CSI2_COMPLEXIO_CFG2
    054: 00000000 : CSI2_COMPLEXIO1_IRQSTATUS
    058: 00000000 : CSI2_COMPLEXIO2_IRQSTATUS
    05C: 00000000 : CSI2_SHORT_PACKET
    060: 00739CE7 : CSI2_COMPLEXIO1_IRQENABLE
    064: 00000000 : CSI2_COMPLEXIO2_IRQENABLE
    068: 00000000 : CSI2_DBG_P
    06C: 7FFFFFFF : CSI2_TIMING
    070: 00010008 : CSI2_CTX0_CTRL1
    074: 00000000 : CSI2_CTX0_CTRL2
    08C: 00000000 : CSI2_CTX0_CTRL3
    078: 00000000 : CSI2_CTX0_DAT_OFST
    07C: 00000000 : CSI2_CTX0_DAT_PING_ADDR
    080: 00000000 : CSI2_CTX0_DAT_PONG_ADDR
    084: 00000000 : CSI2_CTX0_IRQENABLE
    088: 00000000 : CSI2_CTX0_IRQSTATUS
    170: 01000111 : CSI2_PHY_CFG_REG0
    174: C002E10E : CSI2_PHY_CFG_REG1
    178: 000000FF : CSI2_PHY_CFG_REG2
    17C: 0001C0A0 : CSI2_PHY_CFG_REG3
    180: FFFFFFFC : CSI2_PHY_CFG_REG4
    184: 00000000 : CSI2_PHY_CFG_REG5
    188: 000D200F : CSI2_PHY_CFG_REG6
    ERROR: Drivers_csirxInstanceOpen_usr:985: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!

    I would like to describe the step as follow..

    1 step: powerStatus variable declaration and the initial value is 8.

    2 step: enter into the CSIRX_complexioGetPowerStatus code. (Use direct code instead the API)

    3 step: status is not SystemP_FAILURE because powerStatus value is not zero, and other condition is not abnormal.

    4 step: powerStatus value is copied with a value of COMPLEXIO_CFG1 register, PWR_STATUS item.

               then the powerStatus value is zero.

    5 step: loop the while function.

    6 step: enter the CSIRX_complexioGetPowerStatus again

    7 step: return SystemP_FAILURE because the PWR_STATUS value is zero.

    This routine is repeat forever.

    Please give me the response.

    Best regards,

    Antony Han

  • Hi Antony,

    7 step: return SystemP_FAILURE because the PWR_STATUS value is zero

    is incorrect logically.

    The do {...} while loop in your code is looping and checking until the power status is CSIRX_COMPLEXIO_POWER_STATUS_ON. It is OK for it to be zero for the first a few loops. The original code is checking the pointer of the powerStatus to be non zero. You are checking the value of the powerStatus to be non zero. I think you should remove the 

    || powerStatus == 0) // NULL == 0  // =============> Code 2

    because the powerStatus is defined for sure, therefore &powerStatus is non zero for sure.

    Best regards,

    Ming

  • Hi Ming

    Thank you for your response.

    I'm sorry I made a mistake for the code.

    (|| powerStatus == 0)  -> || &powerStatus == 0) )

    I modified the code as below.

    But the result is still the same. I can't get the powerStatus value on.


    if(status == SystemP_SUCCESS)
            {
                uint32_t numComplexioPowerStatusPolls = 0;
                uint8_t powerStatus = 0x8;
    
                DebugP_log("CSIRX_complexioGetPowerStatus\r\n");
                /* Wait until complex IO powered up */
                numComplexioPowerStatusPolls = 0;
                do
                {
                    //status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
    
                    //int32_t CSIRX_complexioGetPowerStatus (CSIRX_Handle handle, uint8_t *powerStatus)
                    //{
                        status = SystemP_SUCCESS;
                        CSIRX_Config *config = (CSIRX_Config *)gCsirxHandle[instanceId];
    
                        if( config == NULL
                            || config->object == NULL
                            || config->hwAttrs == NULL
                            || config->hwAttrs->csirxRegs == 0
                            || &powerStatus == NULL) // Modified <======================
                        {
                            status = SystemP_FAILURE;
                        }
                        else
                        {
                            CSL_csirxRegs *regs = (CSL_csirxRegs *) config->hwAttrs->csirxRegs;
    
                            powerStatus = (uint8_t)( (regs->COMPLEXIO_CFG1>>25)&0x03 ); // bit 26-25 : PWR_STATUS
                        }
                    //    return status;
                    //}
    
                    if(status != SystemP_SUCCESS)
                    {
                        DebugP_log("CSIRX_complexioGetPowerStatus FAIL (%d), powerStatus: %X\r\n", status, powerStatus);
                        App_csirx_RegisterInfo();
                        break;
                    }else{
                        DebugP_log("CSIRX_complexioGetPowerStatus PASS, powerStatus: %X\r\n", powerStatus);
                    }
                    ClockP_usleep(1000);
                    numComplexioPowerStatusPolls++;
    
                } while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) &&
                        (numComplexioPowerStatusPolls < 50) );
    
                if(powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioGetPowerStatus failed !!!\r\n", instanceId);
                }
            }

    My user log..

    CSIRX_commonEnable
    CSIRX_complexioPowerOn
    CSIRX_complexioGetPowerStatus
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    ~
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    ERROR: Drivers_csirxInstanceOpen_usr:985: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!

    Please check the code.

    Best regards,

    Antony Han

  • Hi Antony,

    The code looks OK now. If it still fails, then it must be the numComplexioPowerStatusPolls>=50, but I only saw 5 PASS in the log. It means that it does not get to CSIRX_COMPLEXIO_POWER_STATUS_ON in 5ms. Have you tried to wait longer, like 50ms?

    Best regards,

    Ming

  • Hi Ming

    I tried like,

        - 5ms : while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) && (numComplexioPowerStatusPolls <= 5) );
                    // --> loop 5 times

        - 50ms : while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) && (numComplexioPowerStatusPolls <= 50) );
                   // --> loop 50 times

        - 500ms : while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) && (numComplexioPowerStatusPolls <= 500) );
                  // --> loop 500 times

    The result is all the same.

    I think there are other crucial check points for this result.

    Best regards,

    Antony Han 

  • Hi Antony,

    If the powerStatus never reaches the CSIRX_COMPLEXIO_POWER_STATUS_ON, I would check the CSI initialization, configuration, power up and enabling etc.  Unfortunately, I am not the CSI expert. I forward your thread to our CSI expert for further help!

    Best regards,

    Ming

  • Hi Ming

    Thank you for your full support.

    Your response help me a lot which make me focus on the relevant point.

    Best regards,

    Antony Han

  • Hi Antony, 

    I can takeover for Ming here if we need to dig into the CSI D-PHY setup some more. Looks like there was a lot of activity on this thread prior. Can you please summarize the remaining issue?

    Let me look through the current MCU-SDK and MMWAVE-SDK example projects to start. I think we should try and get those working for you first since they are the best examples of working initialization. 

    Thank you,

    -Randy

  • Hi Randy

    Glad to contact you.

    My first goal is configuring CSIRX, connecting our sensor board to EVK, and obtaining the received data thru CSI-2 two data lane and one clock lane.

    I would like to see the CSIRX interrupt and the data buffer.

    Here is my code.

    4774.csirx_external_capture_am273x-evm_r5fss0-0_nortos_ti-arm-clang2.zip

    Please look into the project.

    I'll wait your response.

    Best regards,

    Antony Han

  • Hi Antony, 

    Thanks for summarizing. A few other questions: 

    • What CSI-2 sensor are you trying to integrate?
    • What is the cabling setup to the AM273x EVM? Which AM273x EVM version are you using?
    • Have you measured CSI-2 RX on a scope from that sensor?
    • Have you been able to get this same sensor working with any other CSI-2 RX system?

    Thank you,

    -Randy

  • Hi Randy

    We had already developed a product using sensor board and FPGA,  ST microcontroller.

    All of the parts works very well.

    I'm trying to integrate that sensor board and simple interface board to TI EVM board (TMDS273GPEVM).

    AM273x firmware now can control that sensor board via I2C and GPIO.

    The CSI signal is generated very well that I saw it in oscilloscope.    

    I have a question.

    When the MIPI CSI signal connection is not done with relevant, 

    complexio power state would remain OFF state, is it right?

    I would like to know the possible reason for this case. (complexio power state: OFF).

    Best Regards,

    Antony Han 

  • Hi Antony, 

    Unfortunately, I don't think the TRM or SDK has sufficient info to answer this without getting some AM273x chip-design team help. So I brought this up with the design team. I'll keep you posted on this. 

    Can you provide the specific time of flight sensor model? I ask so I can look into that device datasheet and see if there is anything we might need to change on our RX initialization. 

    Thank you,

    -Randy

  • Hi Randy

    As I understand, AM273x  CSIRX initialization is not related to sensor's initialization.

    If not, the TOF sensor should be initialized before CSIRX initialization, shouldn't it ?

    I repeatedly would like to ask the steps to operate CPU including sensor.

    At this time, I can't provide the sensor datasheet by NDA agreement.

    Instead, I would describe my program strategy for CSIRX funcion.

    1. Power ON CPU and Sensor Board.
    2. CPU: system, GPIO, I2C, etc initialization.
    3. CPU: initialize sensor, but not generate CSI2 stream because it is generated by GPIO trig.
      (My strategy is triggering AFTER CSIRX initialization)
      That mean CSIRX initialization is processed with no CSI stream generation.
    4. During CSIRX initialization process, I couldn't get the complexio power state ON.

    I would like to ask again.

    Should The sensor board CSI2 stream be generated during the CPU CSIRX initialization ?

    My program will trig the sensor to generate the stream when just it need to do that.( Not auto generation)

    May it affect the CSIRX component abnormal state ?

    Best Regards,

    Antony Han  

      

  • Hi Antony, 

    Should The sensor board CSI2 stream be generated during the CPU CSIRX initialization ?
    I repeatedly would like to ask the steps to operate CPU including sensor.

    Understood. That is exactly what I am trying to figure out as well. I am still waiting on feedback from the IP team. Will keep you in the loop. 

    Thank you,

    -Randy

  • Hi Antony, 

    Still looking for info. 

    -Randy

  • Hi Randy

    I'm waiting for the response.

    During time, I changed the CSIRX initialization step.

    I completed the TOF sensor initialization and made it to generate MIPI CSI2 stream BEFORE the CSIRX component initialization.

    However the result is same.

    CSIRX Initialization function

    int32_t Drivers_csirxInstanceOpen_usr(uint32_t instanceId, uint16_t numContexts, CSIRX_ContextConfig *pContextConfig)
    {
        int32_t status = SystemP_SUCCESS;
        //uint8_t powerStatus = 0;
    
        DebugP_log("CSIRX_open\r\n");
        gCsirxHandle[instanceId] = CSIRX_open(CONFIG_CSIRX0);
        if(gCsirxHandle[instanceId] == NULL)
        {
            status = SystemP_FAILURE;
            DebugP_logError("CSIRX %d: CSIRX_open failed !!!\r\n", instanceId);
        }
        DebugP_log("CSIRX_reset\r\n");
        if(status==SystemP_SUCCESS)
        {
            status = CSIRX_reset(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_reset failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS && gCsirxPhyEnable[instanceId])
        {
            DebugP_log("CSIRX_complexioSetConfig\r\n");
            status = CSIRX_complexioSetConfig(gCsirxHandle[instanceId], &gCsirxComplexioConfig[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioSetConfig failed !!!\r\n", instanceId);
            }
    
            DebugP_log("CSIRX_complexioDeassertReset\r\n");
            if(status==SystemP_SUCCESS)
            {
                status = CSIRX_complexioDeassertReset(gCsirxHandle[instanceId]);
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioDeassertReset failed !!!\r\n", instanceId);
                }
            }
    
    #if 0
            if(status==SystemP_SUCCESS)
            {
                uint32_t numComplexioDonePolls = 0;
                bool isResetDone = false;
    
                DebugP_log("CSIRX_complexioIsResetDone\r\n");
                /* Wait until complex IO reset complete */
                do
                {
                    status = CSIRX_complexioIsResetDone(gCsirxHandle[instanceId], &isResetDone);
                    if(status!=SystemP_SUCCESS)
                    {
                        break;
                    }
                    ClockP_usleep(1000);
                    numComplexioDonePolls++;
                } while(( isResetDone == false) && (numComplexioDonePolls < 5U) );
    
                if(isResetDone == false)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioIsResetDone failed !!!\r\n", instanceId);
                }
            }
    #endif
    
            if(status==SystemP_SUCCESS)
            {
                DebugP_log("CSIRX_dphySetConfig\r\n");
                status = CSIRX_dphySetConfig(gCsirxHandle[instanceId], &gCsirxDphyConfig[instanceId]);
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_dphySetConfig failed !!!\r\n", instanceId);
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_commonSetConfig\r\n");
            status = CSIRX_commonSetConfig(gCsirxHandle[instanceId], &gCsirxCommonConfig[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_commonSetConfig failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS && gCsirxPhyEnable[instanceId])
        {
            DebugP_log("CSIRX_complexioAssertForceRxModeOn\r\n");
            status = CSIRX_complexioAssertForceRxModeOn(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioAssertForceRxModeOn failed !!!\r\n", instanceId);
            }
    
            if(status==SystemP_SUCCESS)
            {
                uint32_t numForceRxModeDeassertedPolls = 0;
                bool isForceRxModeDeasserted = false;
    
                DebugP_log("CSIRX_complexioIsDeassertForceRxModeOn\r\n");
                /* wait until force rx mode deasserted: This may depend on Tx */
                do
                {
                    status = CSIRX_complexioIsDeassertForceRxModeOn(gCsirxHandle[instanceId],
                                                                        &isForceRxModeDeasserted);
                    if(status != SystemP_SUCCESS)
                    {
                        break;
                    }
                    ClockP_usleep(1000);
                    numForceRxModeDeassertedPolls++;
                } while( (isForceRxModeDeasserted == false) && (numForceRxModeDeassertedPolls < 5) );
    
                if(isForceRxModeDeasserted == false)
                {
                    status = SystemP_SUCCESS;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioIsDeassertForceRxModeOn failed !!!\r\n", instanceId);
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_commonEnable\r\n");
            /* enable interface */
            status = CSIRX_commonEnable(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_commonEnable failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS && gCsirxPhyEnable[instanceId])
        {
            DebugP_log("CSIRX_complexioPowerOn\r\n");
            /* Power on complex IO */
            status = CSIRX_complexioPowerOn(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioPowerOn failed !!!\r\n", instanceId);
            }
    
            if(status == SystemP_SUCCESS)
            {
                uint32_t numComplexioPowerStatusPolls = 0;
                uint8_t powerStatus = 0x8;
    
                DebugP_log("CSIRX_complexioGetPowerStatus, handle: %p\r\n", gCsirxHandle[instanceId]);
                /* Wait until complex IO powered up */
                numComplexioPowerStatusPolls = 0;
                do
                {
                    //status = CSIRX_complexioGetPowerStatus(gCsirxHandle[instanceId], &powerStatus);
    
                    //int32_t CSIRX_complexioGetPowerStatus (CSIRX_Handle handle, uint8_t *powerStatus)
                    //{
                        status = SystemP_SUCCESS;
                        CSIRX_Config *config = (CSIRX_Config *)gCsirxHandle[instanceId];
    
                        if( config == NULL
                            || config->object == NULL
                            || config->hwAttrs == NULL
                            || config->hwAttrs->csirxRegs == 0
                            || &powerStatus == NULL) // NULL == 0
                        {
                            status = SystemP_FAILURE;
                        }
                        else
                        {
                            CSL_csirxRegs *regs = (CSL_csirxRegs *) config->hwAttrs->csirxRegs;
    
                            powerStatus = (uint8_t)( (regs->COMPLEXIO_CFG1>>25)&0x03 ); // bit 26-25 : PWR_STATUS
                        }
                    //    return status;
                    //}
    
                    if(status != SystemP_SUCCESS)
                    {
                        DebugP_log("CSIRX_complexioGetPowerStatus FAIL (%d), powerStatus: %X\r\n", status, powerStatus);
                        App_csirx_RegisterInfo();
                        break;
                    }else{
                        DebugP_log("CSIRX_complexioGetPowerStatus PASS, powerStatus: %X\r\n", powerStatus);
                    }
                    ClockP_usleep(1000);
                    numComplexioPowerStatusPolls++;
    
                } while((powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON) &&
                        (numComplexioPowerStatusPolls < 5) );
    
                if(powerStatus != CSIRX_COMPLEXIO_POWER_STATUS_ON)
                {
                    status = SystemP_FAILURE;
                }
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_complexioGetPowerStatus failed !!!\r\n", instanceId);
                }
            }
        }
    
        status=SystemP_SUCCESS; // for Debug
    
        if(status==SystemP_SUCCESS)
        {
            uint32_t i;
    
            for(i = 0; i < numContexts; i++)
            {
                DebugP_log("CSIRX_contextSetConfig\r\n");
                /* config contexts */
                status = CSIRX_contextSetConfig(gCsirxHandle[instanceId], i, &pContextConfig[i] );
                if(status!=SystemP_SUCCESS)
                {
                    DebugP_logError("CSIRX %d: CSIRX_contextSetConfig for context %d failed !!!\r\n", instanceId, i);
                }
                if(status != SystemP_SUCCESS)
                {
                    break;
                }
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_debugModeDisable\r\n");
            /* Debug mode, first flush FIFO - disable debug mode and enable interface */
            status = CSIRX_debugModeDisable(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_debugModeDisable failed !!!\r\n", instanceId);
            }
        }
        if(status==SystemP_SUCCESS)
        {
            DebugP_log("CSIRX_commonEnable\r\n");
            /* enable interface */
            status = CSIRX_commonEnable(gCsirxHandle[instanceId]);
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_commonEnable failed !!!\r\n", instanceId);
            }
        }
    
    #if 1
        if(status==SystemP_SUCCESS)
        {
            bool isResetDone = false;
    
            DebugP_log("CSIRX_complexioIsResetDone\r\n");
            /* Wait until complex IO reset complete */
            do
            {
                status = CSIRX_complexioIsResetDone(gCsirxHandle[instanceId], &isResetDone);
                if(status!=SystemP_SUCCESS)
                {
                    break;
                }
            } while(isResetDone == false);
    
            if(isResetDone == false)
            {
                status = SystemP_FAILURE;
            }
            if(status!=SystemP_SUCCESS)
            {
                DebugP_logError("CSIRX %d: CSIRX_complexioIsResetDone failed !!!\r\n", instanceId);
            }
        }
    #endif
    
        DebugP_log("csirxInstanceOpen PASS !!!!\r\n");
        return status;
    }

    User log

    CSIRX_open
    CSIRX_reset
    CSIRX_complexioSetConfig
    CSIRX_complexioDeassertReset
    CSIRX_dphySetConfig
    CSIRX_commonSetConfig
    CSIRX_complexioAssertForceRxModeOn
    CSIRX_complexioIsDeassertForceRxModeOn
    CSIRX_commonEnable
    CSIRX_complexioPowerOn
    CSIRX_complexioGetPowerStatus, handle: 1028AF60
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    CSIRX_complexioGetPowerStatus PASS, powerStatus: 0
    ERROR: Drivers_csirxInstanceOpen_usr:985: CSIRX 0: CSIRX_complexioGetPowerStatus failed !!!
    CSIRX_contextSetConfig
    CSIRX_debugModeDisable
    CSIRX_commonEnable
    CSIRX_complexioIsResetDone
     (Infinite loop)

    Best Regards,

    Antony Han

  • Thank you for the update Antony. We'll get a response to this soon. 

    -Randy

  • Hi Randy

    Do you have plan to update for this issue?

    May I ask how long does it takes to get response?

    thank you.

    Antony Han

  • Hi Antony, 

    I should have a meaningful update later this week. Apologize for the delay here. 

    Thank you,

    -randy

  • Still trying to replicate the issue here in the lab. Will update again this week. 

    -Randy

  • Thank you for your hard work.

    I'll wait for the good news.

  • Going to hook up a CSI2 pattern generator early next week to keep looking at this issue further. Has there been any improvement on your side, or still stalled on this?

    Thank you,

    -Randy

  • Hi Randy

    There is no advance for this issue on my side. I'm just waiting for your response.

    I hope the relevant procedure will be set up including the relevant method to check hardware problem by register status value.

    Thank you.

    Antony Han 

  • I will look at this again in lab tomorrow. 

    Thank you,

    -Randy

  • Quick update: not a good answer, but we are still trying to find a good way to replicate this problem here. Will update again soon. 

    -Randy

  • In trying to replicate and debug this issue, I have found that we currently cannot support the CSI-2 RX driver found in the AM273x MCU PLUS SDK (https://software-dl.ti.com/mcu-plus-sdk/esd/AM273X/09_02_00_52/exports/docs/api_guide_am273x/DRIVERS_CSIRX_PAGE.html) in a general purpose sensor attach mode. At this time I cannot provide any more information or additional time frame on when this would change.

    We have TI AWRx radar front-end CSI-2 RX examples which are part of the MCU Radar SDK (https://www.ti.com/tool/MMWAVE-MCUPLUS-SDK) but these utilize a C6x DSP driver/API and are tightly coupled and documented only in reference to the mmWave Radar Demo framework application. They may be helpful to you to continue work with the AM273x.

    However, I would also suggest that you consider porting your application to adjacent TI MPU products such as the AM62x and TDA4x series. These AM62x and TDA4x products have fully tested and fully supported CSI-2 hardware and software references. See:

    The AM62x Processors SDK, has has multiple documented camera attach examples that may be applicable to your time of flight sensor integration. See: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/latest/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX.html