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.

DRA821U: MCU1_0 configuring DoMain MCSPI0 initialization failed

Part Number: DRA821U
Other Parts Discussed in Thread: SYSCONFIG

Hi team,

Here's an issue from the customer may need your help:

PDK Version 08_04

1) Failed to configure interrupt routing:

Call to Sciclient_rmIrqSet failed to return, traced and discovered it was caused by a return error from [Sciclient_rmIrqFindRoute].

The configuration code is as follows:

    struct tisci_msg_rm_irq_set_req     rmIrqReq;
    struct tisci_msg_rm_irq_set_resp    rmIrqResp;
    uint32 retVal;

    rmIrqReq.valid_params           = TISCI_MSG_VALUE_RM_DST_ID_VALID;
    rmIrqReq.valid_params          |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;
    rmIrqReq.src_id                 = TISCI_DEV_MCSPI0;
    rmIrqReq.global_event           = 0U;
    rmIrqReq.src_index              = 0U;
    rmIrqReq.dst_id                 = TISCI_DEV_MCU_R5FSS0_CORE0;
    rmIrqReq.dst_host_irq           = CSLR_MCU_R5FSS0_CORE0_INTR_MAIN2MCU_LVL_INTRTR0_OUTL_0 + 1;
    rmIrqReq.ia_id                  = 0U;
    rmIrqReq.vint                   = 0U;
    rmIrqReq.vint_status_bit_index  = 0U;
    rmIrqReq.secondary_host         = TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST;
    retVal = Sciclient_rmIrqSet(&rmIrqReq, &rmIrqResp, SCICLIENT_SERVICE_WAIT_FOREVER);
    if((uint32)0 != retVal)
    {
        ERR("Sciclient_rmIrqSet[%s] interrupt cfg err!", g_name_list[chn]);
    }

2) MCSPI0 initialization failed:

Call to MCAL [SPI_Init] is stuck, traced and found after execute to [SPI_mcspiReset], program is stuck while writing [sysconfig] register and no return.

SPI_FUNC_TEXT_SECTION static void Spi_mcspiReset(uint32 baseAddr)
{
    StatusType status;
    TickType   startCount = 0U, tempCount, elaspsedCount = 0U;
    /* Set the SOFTRESET field of MCSPI_SYSCONFIG register. */
    CSL_REG32_FINS(
        baseAddr + MCSPI_SYSCONFIG,
        MCSPI_SYSCONFIG_SOFTRESET,
        MCSPI_SYSCONFIG_SOFTRESET_ON);
    
    ....
 }

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    Are you trying to initialize the main domain McSPI from mcu1_0? In that case we need to make sure that the module is powered on.

    Can you try following call before you initialize the McSPI and see if it works?

    Sciclient_pmSetModuleState(TISCI_DEV_MCSPI0, TISCI_MSG_VALUE_DEVICE_SW_STATE_ON, TISCI_MSG_FLAG_AOP, SCICLIENT_SERVICE_WAIT_FOREVER);

    Regards,
    Parth