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.
Function _pmuSetCountEvent_ does not work correct any more under HalCogen 04.04.00. In the autogenerated code in file sys_mpu.asm there is a missing first line "lsr r0,r0,#1", which was present in earlier versions of HalCoGen. When adding the missing line the function works as expected. What was the reason to remove it?
Hi Frank,
I think the parameter you matters.. Some API needs Counter MASK, some need the actual counter number... See for example below.
_pmuStopCounters_(pmuCOUNTER0)
_pmuGetEventCount_(0). --> you cannot pass pmuCOUNTER0 to this API
Please refer the API documentation or the respective Header file in case the function is implemented in assemble. which is case for PMU
/** @fn void _pmuStopCounters_(uint32 counters)
* @brief Stops selected counters
* @param[in] counters - Counter mask
*/
void _pmuStopCounters_(uint32 counters);
/** @fn uint32 _pmuGetEventCount_(uint32 counter)
* @brief Returns current event counter value
* @param[in] counter - Counter select 0..2
*
* @return event counter count.
*/
uint32 _pmuGetEventCount_(uint32 counter);