Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 217137

Forum Post: TMS570LS3137: Performance Monitor: How to set Cortex-R4F PMCNTENSET.C (Cycle counter enable bit)

$
0
0
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!

Viewing all articles
Browse latest Browse all 217137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>