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.

[参考译文] J721EXCPXEVM:将要配置同一组中的 GPIO 输入?

Guru**** 2482105 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1448557/j721excpxevm-hwo-to-configure-gpio-interrput-in-same-bank

器件型号:J721EXCPXEVM

工具与软件:

您好!

大家好,我想在不同的内核(例如 MCU2_0上的 GPIO0_23 和 MCU2_1上的 GPIO0_24 )上在同一组中实现 GPIO interrput。 我的版本信息是:
Linux:ti-processor-sdk-linux-j7-evm-08_02_00_03-Linux-x86-Install.bin
RTOS:ti-processor-sdk-rtos-j721e-evm-08_02_00_05.tar.gz

我已经根据这篇文章 https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1392363/faq-tda4vm-how-do-i-use-gpio-interrupts-in-pdk-and-how-are-they-routed 了解了 GPIO 中断的原理 、并 根据 https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/09_02_00_05/exports/docs/linux/How_to_Guides/Host/K3_GPIO.html 分配了资源 Resource_Partitioning_Tool。完成上述步骤后、在 MCU2-0上成功配置了 GPIO 中断。 但是、无法在 MCU2_1上配置 GPIO 中断。 我在以下代码中发现错误。

            rmIrqReq.secondary_host = TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST;
            rmIrqReq.src_id = src_id;
            rmIrqReq.src_index = src_index; /* This is the event coming out of the peripheral */

            /* Set the destination interrupt */
            rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_ID_VALID;
            rmIrqReq.valid_params |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;

            /* Set the destination based on the core */
            rmIrqReq.dst_id = dst_id;
            rmIrqReq.dst_host_irq = dst_host_irq;
            if (GPIO_PinBankUsageCount[portNum][bankNum] == 0U)
            {
                retVal = Sciclient_rmIrqSet(
                    (const struct tisci_msg_rm_irq_set_req *)&rmIrqReq,
                    &rmIrqResp,
                    SCICLIENT_SERVICE_WAIT_FOREVER);

                if (retVal == CSL_PASS)
                {
                    /* Increase the bank usage count for this port */
                    GPIO_PinBankUsageCount[portNum][bankNum]++;
                }
            }
            else
            {
                /* The interrupt path is already allocated, no need to re-allocate it */
                retVal = CSL_PASS;
            }

Sciclient_rmIrqSet 返回-1。 


但是我从 TISCI 文档 https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j721e/interrupt_cfg.html 中了解到 、SCI 接口仅管理 GPIO 组中断、而与 GPIO 引脚中断相关的配置需要参考 TRM。 但是、我在 TRM 中没有找到任何相关介绍或寄存器(spruil1c.pdf、 J721E_registers1.pdf 、J721E_registers2.pdf 、J721E_registers3.pdf、J721E_registers4.pdf、   J721E_registers5.pdf)。 我从这篇文章 https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1386233/tda4vm-gpiomux_intrtr0_muxcntl-vanished-from-spruil1b-9-9-9-2-2-to-spruil1c-intended-or-mistake 了解到 、最新的 TRM 存在错误、并且省略了相关寄存器的引入。 是否有解决此问题的方法? 或者您能否提供这篇文章 https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1386233/tda4vm-gpiomux_intrtr0_muxcntl-vanished-from-spruil1b-9-9-9-2-2-to-spruil1c-intended-or-mistake?中提到的 SPRUIL1B TRM

期待您的回复。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    为什么要在同一个组内实现中断? 从常见问题解答中您应该会发现、这一点不建议使用、因为它会导致错误的中断。  
    谢谢!

    Neehar

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    我们的项目中有一个要求(同一个组内的中断)。

    谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    这的用例是什么?

    谢谢!

    Neehar

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您的答复。 我已经解决了这个问题

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    如果您为解决您的问题进行了任何特定的更改或修补程序、请为有类似问题的任何其他用户提供这些更改或修补程序。

    谢谢!

    Neehar