I read HWAG angle value and wanted to compare angle value.
Thus I used interrupt at NAF_grobal event of HET BR instruction.
But whenever interrupt was generated, the problem was generated.
Often angle value is wrong.
I want to know reason of this problem.
/////////////////////// ISR ///////////////////////////
if(Gap_findFlag&&Gap_count >=1)
{
hetREG1 -> INTENAC = 0x00000002;
check = hetREG1->HWAACNT;
if(hetREG1->HWAACNT==0)
{
het_count1 = hetREG1->HWAACNT;
}
Acnt_count_buffer[het_count1++] = hetREG1->HWAACNT;
if(hetREG1->HWAACNT == 1)
{
het_count2++;
}else if(hetREG1->HWAACNT == 500)
{
het_count3++;
}
hetREG1 -> INTENAS = 0x00000002;
}
///////////////////////////////////////////////////////////////////////
