Other Parts Discussed in Thread: HALCOGEN
Hello,
I'm having problems using the N2HET module. I want to throw an INT with a RISING edge on the pin NHET[31]. When I use the HALCOGEN autogenerate micro-code it works but when I use my microcode it doen't work, I read as much as I could but I'm not being able to find where is my mistake. I added irq=ON, after that I tried adding request but it didn't work.
this is my asm
;------------------------------------------- ; Assembler option ;------------------------------------------- -hc32 -n0 -v2 -AID1.7 ;------------------------------------------- ; CNT 1 or 2 cycles (1 cycle if angle_count OFF) ; WCAP 1 cycle L00: CNT { reg=A, max=01ffffffh, angle_count=OFF, } L01: WCAP { next=L00, cond_addr=L00, hr_lr=high, reg=A, data=0, event=RISE, pin=31, IRQ=ON, request=GENREQ, }
My result code
const hetINSTRUCTION_t examplePROGRAM[2U] = { /* L00_0 */ { 0x00002C20, 0x01FFFFFF, 0x00000000, 0x00000000 }, /* L01_0 */ { 0x00001600, 0x08001F41, 0x00000000, 0x00000000 } };
And I'm going to attach a generic het.c autogenerated by HALCOGEN, I'm just replacing the microcode in the function hetInit() line 1323
(void)memcpy((void *)hetRAM1, (const void *)het1PROGRAM, sizeof(het1PROGRAM));
instead to use het1PROGRAM I use examplePROGRAM.