Part Number: TMS570LS3137 Hi there, I'm trying to use the PMU by including HalCoGen 04.06.00 generated sys_pmu.asm and sys_pmu.h in my project. My code structure is in the form of: _pmuInit_(); _pmuEnableCountersGlobal_(); _pmuSetCountEvent_(0, 0); while (TRUE) // embedded software: endless loop { _pmuResetCycleCounter_(); _pmuStartCounters_(0x1); [Some code here ...] _pmuStopCounters_(0x1); int count=_pmuGetCycleCount_(); [More code here ...] } } However, the PMCNTENSET.C bit (cycle count enable) remains disabled all the time so the counter is not counting. If I enable this bit using the debugger, everything seems fine. Did I forget to call another function to enable that bit, or, are my arguments to the called function wrong? Thank you!
↧