TI中文支持网
TI专业的中文技术问题搜集分享网站

基于AM5728,在rtos环境下,ipu1使用gpio中断

你好,基于AM5728,在rtos环境下,想要利用ipu1使用gpio中断,请问有没有demo或者文档可以参考下,谢谢。

Shine:

是否有参考过下面的帖子?
e2e.ti.com/…/611525

user5345614:

回复 Shine:

你好,这个链接讲的gpio中断好像都是用到csl库的接口,但参考sys/bios user guide,发现其中的说明好像硬件中断不能用到csl接口,片段说明如下:

3.4 Hardware InterruptsHardware interrupts (Hwis) handle critical processing that the application must perform in respexternal asynchronous events. The SYS/BIOS target/device specific Hwi modules are used to hardware interrupts. See the document introducing Hwis for an overview.In a typical embedded system, hardware interrupts are triggered either by on-device peripherdevices external to the processor. In both cases, the interrupt causes the processor to vector taddress.Any interrupt processing that may invoke SYS/BIOS APIs that affect Swi and Task scheduling written in C or C++. The HWI_enter()/HWI_exit() macros provided in earlier versions of SYS/Bcalling assembly language ISRs are no longer provided.Assembly language ISRs that do not interact with SYS/BIOS can be specified with Hwi_plug(). must do their own context preservation. They may use the "interrupt" keyword, C functions, or language functions.All hardware interrupts run to completion. If a Hwi is posted multiple times before its ISR has to run, the ISR runs only one time. For this reason, you should minimize the amount of code pby a Hwi function. If interrupts are globally enabled—that is, by calling Hwi_enable()—an ISR can be preempted interrupt that has been enabled.Hwis must not use the Chip Support Library (CSL) for the target. Instead, see Chapter 8 for a dof Hardware Abstraction Layer APIs.Associating an ISR function with a particular interrupt is done by creating a Hwi objec

Shine:

回复 user5345614:

可以在SYS/BIOS HWI 配置界面里进行配置

user5345614:

回复 Shine:

你好,我是想在ipc_3_47_01_00\examples\DRA7XX_linux_elf\ex41_forwardmsg这个例程中ipu1访问gpio中断的,请问应该怎么配置呢,可以不在界面配置直接修改ipu1.cfg来配置吗,如果可以的话请问应该怎么配置呢?

user5345614:

回复 Shine:

你好,我查阅sys/bios user guide,发现可以用这种方式使用硬件中断:

#include <ti/sysbios/hal/Hwi.h>#include <xdc/runtime/Error.h>#include <xdc/runtime/System.h>Hwi_Handle myHwi;Error_Block eb;Error_init(&eb);myHwi = Hwi_create(5, myIsr, NULL, &eb);if (myHwi == NULL) { System_abort("Hwi create failed");}

我的疑问是如果是gpio中断的话在哪里配置的,例如Hwi_create第一个参数对应的映射在哪里呢,应该填多少,还有就是gpio中断的触发方式在哪里设置呢?

yongqing wang:

回复 user5345614:

其实完全可以参考TI别的芯片的bios的GPIO配置套路,都差不多的

yongqing wang:

回复 yongqing wang:

比如Ti的C6000很多使用这个系统的

user5345614:

回复 yongqing wang:

请问有这个demo可以参考吗?是在哪个路径呢?

yongqing wang:

回复 user5345614:

这样的demo其实很多的,比如创龙的这些专业的开发板提供商,就有相应的C6000的板子,所以他们肯定会提供这种基础例程

赞(0)
未经允许不得转载:TI中文支持网 » 基于AM5728,在rtos环境下,ipu1使用gpio中断
分享到: 更多 (0)