(C) COPYRIGHT 2015 WIZnet
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, WIZnet SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
This example shows how to use the PWM peripheral to run counter mode.
The PWM channel 0 frequency is set to SystemCoreClock(Hz). SystemCoreClock is set to 20 MHz.
The PWM channel 0 is configured in rising edge counter mode, up-count mode, periodic mode. So the PWM channel 0 Timer/Counter is counted when input signal is triggered. 2 interrupts out of 3 interrupts are enabled: match and overflow interupt(capture interrupt is excepted).
The PWM channel 0 output pin(PC_00) is used for input.
When the Timer/Counter reaches the match value, RED LED(PC_08) is toggled every times, and when the Tiemr/Counter reaches the limit value, GREEN LED(PC_09) is toggled every times.
To select the WIZnet WIZwiki platform used to run the example.
WIZwiki W7500 Set-up
In order to make the program work, you must do the following :