Counter_App: missing function COUNTER_SetCurrentCount

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Andi_H
Employee
Employee
First solution authored First like received
Hello,

i was missing a function to set a current count value. It would be nice if you add the following function in the next app release:


void COUNTER_SetCurrentCount(COUNTER_t *const handle_ptr, const uint16_t timer_val)
{
XMC_ASSERT("COUNTER_GetEventCount:Invalid handle_ptr", (handle_ptr != NULL))

#ifdef COUNTER_CCU4_USED
if (COUNTER_CCU4 == handle_ptr->counter_type)
{
XMC_CCU4_SLICE_StopTimer(handle_ptr->ccu4_handle->slice_ptr);
XMC_CCU4_SLICE_SetTimerValue(handle_ptr->ccu4_handle->slice_ptr,timer_val);
XMC_CCU4_SLICE_StartTimer(handle_ptr->ccu4_handle->slice_ptr);
}
#endif
#ifdef COUNTER_CCU8_USED
if (COUNTER_CCU8 == handle_ptr->counter_type)
{
XMC_CCU8_SLICE_StopTimer(handle_ptr->ccu8_handle->slice_ptr);
XMC_CCU8_SLICE_SetTimerValue(handle_ptr->ccu8_handle->slice_ptr,timer_val);
XMC_CCU8_SLICE_StartTimer(handle_ptr->ccu8_handle->slice_ptr);
}
#endif

}


best regards
Andreas
0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hi Andreas,

Thanks for the feedback.

Best Regards,
Vasanth

View solution in original post

0 Likes
1 Reply
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hi Andreas,

Thanks for the feedback.

Best Regards,
Vasanth
0 Likes