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.

[参考译文] TI-RTOS 上的寄存器 LCD 中断编码器

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1053147/register-lcd-interrupt-hanlder-at-ti-rtos

大家好、

如何使用  RTOS Hwi 模块寄存器 LCD UDMA 句柄?

哪个 LCD 全局配置、 配置结构和 硬件属性?

Tiva  上 DMA 传输到 LCD 的 I 参考链接。 它显示错误:

"

#10099-D 程序不能放入可用内存中。 对齐方式运行定位失败的".VTABLE "大小为0x26c,与".vecs"大小为0x360 (第0页) tm4c129xnczad.cmd 重叠

"

它是 "LCDIntRegister (LCD0_BASE、LCDIntHandler)"未能通过向量段进行分配、TI-RTOS Hwi 模块应用于插入中断、而不是使用 IntRegister?

参考:  

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1036584/dk-tm4c129x-rtos---uart-interrupt-register-problem?tisearch=e2e-sitesearch&keymatch=SW-DK-TM4C129X

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/630449/tm4c1297nczad-extra-dma-words-transmitted-to-lcd

e2e.ti.com/.../faq-can-i-update-the-vector-table-with-intregister-when-using-ti-rtos

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

    您好 Steven、

    正如您可能在上一个常见问题解答链接中看到的、您不能使用  LCDIntRegister 来注册中断。 相反、它需要通过 HWI 模块进行注册。 我将在稍后的回复中发布代码来执行此操作。

    虽然您无法以这种方式注册中断、但 LCD 控制器不是 TI-RTOS 支持的外设的一部分、因此除了 HWI 插件外、您还需要使用 TivaWare API 来实际控制任务中的 LCD 控制器外设。 只要您没有尝试在 HWI 模块之外注册中断处理程序、这种情况就没有问题。 我只是想确保这一点也很清楚。

    下面 是一个如何将 LCD 中断矢量插入 HWI 的示例:

    void main(void)
    {
    
        hardware_init();                         // init hardware via Xware
    
        Hwi_Params hwiParams;
        Hwi_Handle myHwi;
        Error_Block eb;
        /* Initialize error block and hwiParams to default values */
        Error_init(&eb);
        Hwi_Params_init(&hwiParams);
        hwiParams.enableInt = FALSE;
        myHwi = Hwi_create(113, (Hwi_FuncPtr)lcdFunction, &hwiParams, &eb);
        if (myHwi == NULL) {
        System_abort("Hwi create failed");
        }
        Hwi_enableInterrupt(113);
    
    
       BIOS_start();
    
    }
    

    在此函数中、我将 LCD 控件的实际 ISR 命名为  lcdFunction。 您还需要为相关外设确定正确的中断向量编号。 对于 LCD 控制器、这将是113。 您可以在表2-9中找到这一点。 器件 数据表中的中断

    以下行将中断向量编号(113)记录到 ISR 函数(lcdFunction)中:

    myHwi = Hwi_create(113, (Hwi_FuncPtr)lcdFunction, &hwiParams, &eb);

    然后此行实际上会启用 HWI 模块中的中断:

    Hwi_enableInterrupt(113);

    在本例中、如果您坚持使用相同的中断处理程序名称、则只 需将 lcdFunction 替换为  LCDIntHandler 即可进行这些调用。

    此致、

    Ralph Jacobi