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.

[参考译文] TMS570LC4357:如何配置 SCI4中断?

Guru**** 2446470 points
Other Parts Discussed in Thread: HALCOGEN

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1234604/tms570lc4357-how-to-configure-sci4-interrupt

器件型号:TMS570LC4357
主题中讨论的其他器件:HALCOGEN

大家好:

   我已成功实现 SCI4模块的轮询模式。 我在 HALCOGEN 中设置 pinmux、SCI4模块、但当我尝试使用 sci4中断时、它 始终失败。

   我希望使用 SCI4 Rx 低电平中断、以下是我在 SCI.c 中的配置:

   

    /** - set interrupt level */
    sciREG4->SETINTLVL = (uint32)((uint32)0U << 26U)  /* Framing error */
                      | (uint32)((uint32)0U << 25U)  /* Overrun error */
                      | (uint32)((uint32)0U << 24U)  /* Parity error */
                      | (uint32)((uint32)0U << 9U)  /* Receive */
                      | (uint32)((uint32)0U << 8U)  /* Transmit */
                      | (uint32)((uint32)0U << 1U)  /* Wakeup */
                      | (uint32)((uint32)0U << 0U);  /* Break detect */

    /** - set interrupt enable */
    sciREG4->SETINT = (uint32)((uint32)0U << 26U)  /* Framing error */
                   | (uint32)((uint32)0U << 25U)  /* Overrun error */
                   | (uint32)((uint32)0U << 24U)  /* Parity error */
                   | (uint32)((uint32)1U << 9U)  /* Receive */
                   | (uint32)((uint32)0U << 1U)  /* Wakeup */
                   | (uint32)((uint32)0U << 0U);  /* Break detect */

   然后我配置 VIM 模块 119 sci4LowLevelInterrupt IRQ、然后 halcogen 在 SCI.c 中生成 sci4HighLevelInterrupt ()

   在调试过程中,我使用 putty 向我的板发送"0x33",寄存器 SCIFLR->RXRDY 被设置, RD 值为0x33 ,但程序无法进入 sci4HighLevelInterrupt()。

   有什么问题?

感谢(&R)

限制

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

    您好、Li

    确保也满足以下两项要求。

    1.确保在 SCI 配置中启用 RX INT

    2.确保在 SCI 初始化后调用"_enable_IRQ_interrupt_"函数。

    我附上为 SCI1创建的示例工程、如果需要、请进行验证

    e2e.ti.com/.../SCI_5F00_Interrupt_5F00_Test_5F00_LC4357.zip

    --

    谢谢。此致、
    Jagadish。

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

    感谢您的答复。

    所有中断都需要"_ENABLE_IRQ_INTERRUPT_"函数吗?

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

    尊敬的 Li xy:

    是"_enable_IRQ_interrupt_"是否所有中断都需要?

    在所有中断的初始化中、该函数应该需要调用一次。

    该函数将启用 cortex-R5的 IRQ 中断。

    --

    谢谢。此致、
    Jagadish。