Hello,
I am using input pulse measurement mode of timer. In code generator, when I set rising edge , I am getting proper values for the total time period.
But when I am using both the edges in code generator, the values are toggling. I am able to see both values but not able to capture both the values.
I want both the values. How I can be able to do?
In short, I wanted to monitor i/p PWM continuously and continuously wanted to find duty cycle. Can you please tell me how I can be able to do??
Hello JB/ Frank, The exact issue is to calculate duty cycle of the input PWM. The i/p PWM frequency is variable i.e. 50Hz to 1KHz. I have written below code. R_MAIN_UserInit(); /* Start user code. Do not edit comment generated here */ while (1U) { //delay(); //for(i=0;i<=30000;i++); R_TAU0_Channel0_Get_PulseWidth(&ast); //delay(); } void R_TAU0_Channel0_Get_PulseWidth(uint32_t * const width) { /* For channel 0 pulse measurement */ *width = g_tau0_ch0_width; } By using this code, i am able to get pulse width i.e total time period of i/p PWM. I wanted to calculate the duty cycle of i/p PWM. Please do not hesitate to ask more information if needed.
Hey, I have the same issue. Did you found the solution? If yes can you please let me know.
what is ast
Here is the details of 'R_TAUm_Channeln_Get_PulseWidth'
If you have further questions please create a new ticket as this is very old.
Regards