Hi all,
I have encountered a strange thing that My hwi ISR can only be entered once.
My code is below, when first intrrupt occured, I can get the correct result. But after
that, that ISR can never be entered again even after I do CPU reset and run again.
The bios I use here is bios_6_31_00_18 and the platform I run is C6678.
With the help of debugger, I can see that the MSI0_IRQ_SET registers can not be cleared
by the function Hwi_clearInterrupt. So what's wrong with my code?
#include <ti/sysbios/family/c66/Cache.h>
#include <ti/sysbios/BIOS.h>
#include <xdc/runtime/Error.h>
#include <ti/sysbios/hal/Hwi.h>
volatile dataval = 0;
static void My_ISR (int arg)
{
dataval = 1;
Hwi_clearInterrupt(4);
}
void main(void)
{
Hwi_Handle hwi0;
Hwi_Params hwiParams;
Error_Block eb;
Error_init(&eb);
Hwi_Params_init(&hwiParams);
hwiParams.arg = 17;
hwiParams.eventId = 17;
hwi0 = Hwi_create(4, MY_ISR, &hwiParams, &eb);
if(hwi0 == NULL)
System_abort("Hwi create error");
/* Call BIOS_start() */
BIOS_start(); }
B.R.
Sunzhao