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.

AM2434: writing to compare event router address space @0xa30000 results in data abort for the R5

Part Number: AM2434

Hi,

I'm evaluating the AM243x family with a TMDS243GPEVM development board.

For my application I do need to route an PRU-IEP compare event to the R5 intr. For that I need to configure the CMP_EVENT_ROUTER.

The R5 can read from that address space at 0xa30000 but it gets an abort if the R5 writes to a mux-control register.

Via debugger I can change these registers. In comparison, writing to the TIME_SYNC_ROUTER (0xa40000) is no problem.

Do you have any idea? I'm using bare metal. No linux, no rtos until now.

Thanks and best regards

Bastian

  • Hi Bastian,

    Apologies for delay in response, Allow me till Thursday to get back on this.

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    static void Sciclient_CMP_EVENT_ROUTER_IrqSet(void)
    {
    int32_t retVal;
    struct tisci_msg_rm_irq_set_req rmIrqReq;
    struct tisci_msg_rm_irq_set_resp rmIrqResp;
    rmIrqReq.valid_params = 0U;
    rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_ID_VALID;
    rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;
    rmIrqReq.global_event = 0U;
    rmIrqReq.src_id = TISCI_DEV_PRU_ICSSG0;
    rmIrqReq.src_index = 12;
    rmIrqReq.dst_id = TISCI_DEV_R5FSS0_CORE0;
    rmIrqReq.dst_host_irq = 48;
    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, SystemP_WAIT_FOREVER);
    if(0 != retVal)
    {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    References:-

    C:\ti\mcu_plus_sdk_am64x_08_05_00_24\source\drivers\sciclient\include\tisci\am64x_am243x

    9.5.1, 9.4.1.2 of techical reference manual

    To get src_id & src_index :-

    Go to 9.5.1 of TRM & get IR ID corresponding to PRU_ICSSG0_PR1_IEP0_CMP_INTR_REQ_0

    IR ID= 16

    Check below link to get rmIrqReq.src_id  & rmIrqReq.src_index :- https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am64x/interrupt_cfg.html#cmp-event-  introuter0-interrupt-router-input-sources

    To get destination_id & destination_host_irq

    Go to C:\ti\mcu_plus_sdk_am64x_08_05_00_24\source\drivers\sciclient\include\tisci\am64x_am243x to find destination id

    Go to 9.4.1.2 to find get destination_host_irq

     

      

  • Thank you,

    I was able to configure the router via the sci client, now.

    Can you please explain why the sci client is needed for that at all?

    One more problem with the sciclient. If I reload the program with the debugger

    Fullscreen
    1
    2
    3
    4
    5
    6
    retVal = Sciclient_rmIrqSet(&rmIrqReq, &rmIrqResp, SystemP_WAIT_FOREVER);
    if(0 != retVal)
    {
    DebugP_log("[Error] Sciclient event config failed!!!\r\n");
    DebugP_assert(FALSE);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    fails, since the cmp_event_router is still configured. I need to clear the corresponding register via debugger prior starting the execution.

  • I need to clear the corresponding register via debugger prior starting the execution.

    you can call this function at the end of your program:-

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    static void Sciclient_CMP_EVENT_ROUTER_IrqRelease(void)
    {
    int32_t retVal;
    struct tisci_msg_rm_irq_set_req rmIrqReq;
    struct tisci_msg_rm_irq_set_resp rmIrqResp;
    rmIrqReq.valid_params = 0U;
    rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_ID_VALID;
    rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;
    rmIrqReq.global_event = 0U;
    rmIrqReq.src_id = TISCI_DEV_PRU_ICSSG0;
    rmIrqReq.src_index = 12;
    rmIrqReq.dst_id = TISCI_DEV_R5FSS0_CORE0;
    rmIrqReq.dst_host_irq = 48;
    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_rmIrqRelease(&rmIrqReq, SystemP_WAIT_FOREVER);
    if(0 != retVal)
    {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Can you please explain why the sci client is needed for that at all?

    They are used here to configure any of the inputs of CMPINTRTR0 to any of the CMPINTRTR0 output

    you can go through this link to understand more about sciclient:- 

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/latest/exports/docs/api_guide_am243x/DRIVERS_SCICLIENT_PAGE.html