Hello,
I'm currently writing a custim N2HET program to monitor an input signal. At the moment, I'm trying to get the interrupt working for a specific instruction.
For the sake of simplicity, the N2HET program contains only 2 instructions, generating a constant PWM output signal:
L01 CNT { next=L02, reg=A, irq=ON, data=0, max=1, request=NOREQ};
L02 MCMP { next=L01,request=NOREQ,hr_lr=HIGH,en_pin_action=ON,cond_addr=L01,pin=1,order=REG_GE_DATA,action=PULSEHI,reg=A,irq=OFF,data=1,hr_data=1};
which are translated into a C structure like (HET IDE):
{
/* L01_0 */
{
0x00002C21,
0x00000001,
0x00000000,
0x00000000
},
/* L02_0 */
{
0x00000000,
0x00400158,
0x00000081,
0x00000000
}
};
Loading this code in the N2HET RAM area leads to the behaviour I'm expecting, a constant PWM signal on pin N2HET[1].
What is strange, is the fact that I receive an interrupt on channel 11 right after setting the TO bit of the GLBCTRL register. I would expect an interrupt on channel 10 (NHET1 high level interrupt), but it is not the case (HET TU1 level 0 interrupt). Bellow, the register values when setting a breakpoint in the ARM vector IRQ (address 0x00000018):
VIM registers:
N2HET1 registers:
and finally the content of the RAM @0xFF460000:
I don't understand what is going on here. I would expect to receive the HTU notification by setting the request type parameter in the instruction's control field (bits 27:28), but it is apparently not the case.
Thank you in advance for your feedback, and do not hesitate to ask if I can give any additional information.
Guillaume


