HET errors

Hello,

I am trying to program an HET for the TMS470R1B1M using IAR Embedded Workbench. While in the debugger, I am seeing that it looks like the different HET addresses are being accessed (HETADDR keeps changing everytime or almost everytime I take a "next statement"). However, I am not seeing my outputs and inputs (HETDOUT/HETDIN) change. All the program is supposed to be doing is changing 3 of the outputs from high to low and back every half millisecond. Is there something that I am supposed to be initializing for my HET outputs and inputs to be changing, other than HETGCR, HETPRY, and HETDIR?

An example of my initialization is:

HETinit.cpp

__no_init volatile HETPROGRAM0_UN e_HETPROGRAM0_UN @ 0x00800000;

void MemCopy32(unsigned long *dst, unsigned long *src, int bytes);

void HET_init() { HETGCR = 0x00000000; HETPFR = 0x104; HETDIR = 0x00000038; HETDCLR = 0xFFFFFFFF; MemCopy32((unsigned long *)&e_HETPROGRAM0_UN, (unsigned long )HET_INIT0_PST, sizeof(HET_INIT0_PST)); }

void Interrupt_Init() { HETPRY = 0x381; HETGCR |= 65541; }

Currently, the reason I think that it might be an initialization error of the ports is because in some examples that I have seen on the example IAR code, I see a statement like "_disable_interrupt()", but I have not been able to locate what this function does at the beginning of the initialization. Also, I have read that there could be a REQMASK that I might need to set.

Best Regards, Rudy

Reply to
Rudy
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.