你好,基于AM5728,在rtos环境下,想要利用ipu1使用gpio中断,请问有没有demo或者文档可以参考下,谢谢。
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.
你好,这个链接讲的gpio中断好像都是用到csl库的接口,但参考sys/bios user guide,发现其中的说明好像硬件中断不能用到csl接口,片段说明如下:
3.4 Hardware Interrupts
Hardware 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
你好,我查阅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中断的触发方式在哪里设置呢?