I have tried to reset the counters with the following code snippet:
rtiStopCounter(rtiCOUNTER_BLOCK0);
rtiREG1->CNT[0U].UCx = 0x00000000U;
rtiREG1->CNT[0U].FRCx = 0x00000000U;
rtiStartCounter(rtiCOUNTER_BLOCK0);
This code doesn't appear to be working and I am trying to determine why not. The technical reference manual (RTI section, page 364) says that the "counter can be preset by writing (in privileged mode only) to this register". I would think that the mode would already be set to privileged but since the code doesn't appear to be working and since I can't find anywhere in the HalCoGen GUI to set or check the microcontroller mode settings I have to ask - How do I check the mode settings?
Thank you,
Dan