(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 time mode.
The PWM channel 0 frequency is set to SystemCoreClock(Hz), the Prescaler is 2 so the PWM0 counter clock is 10 MHz. SystemCoreClock is set to 20 MHz.
The PWM channel 0 is configured in Timer Mode and duty cycle is 50 %. Timer/Counter is up-count mode and periodic mode. 2 interrupts out of 3 interrupts are enabled: match and overflow interupt(capture interrupt is excepted).
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 :