This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM57L843: N2HET Registers A, B, R, S, and T Initialization Behavior

Part Number: RM57L843


Tool/software:

Hi,

I have a question about the initialization behavior of the internal N2HET Registers A, B, R, S, and T on the Hercules RM57L843. I am using HET IDE to write custom HET code to handle various I/O pins. When I initialize the HETs via hetInit(), are these Registers in N2HET1 and N2HET2 automatically reset to 0? For context, my first HET instruction in N2HET1 uses register A as a counter, starting at 0 and incrementing to 200:

INCREMENT_COUNTER         CNT { angle_count=OFF,reg=A,comp=EQ,max=200,data=0};

I am wondering if Register A will always start at 0 after I call hetInit(), or if it might be a random number or whatever was previously stored in HET before I called hetInit(). If it could be a random number, is there a way to reset it to 0 via hetInit()? I am not aware of any way to directly access and reset this register from the CPU.

Also, if I were to turn N2HET1 off for a period of time, then turn it back on by clearing and setting the NHETGCR TURN_ON_OFF bit, would Register A reset to 0, or would it retain the same value that it had before I turned N2HET1 off?

My HET code might eventually use all 5 N2HET Registers. Do they all have the same initialization/reset behavior?