
This module provides a PWM generator on output pin 7 and a PWM reader on input pin 7. The PWM generator duty cycle is set by input pins [6:0]. The PWM reader output is reflected on output pins [6:0]. The period is assumed to be 20 ms, and the duty cycle can be adjusted between 1 ms and 2 ms.
When the SPI interface is not used, the module behaves as described above. When SPI is used, its behavior can be configured as described in docs/specification.md.
Loop back the generated PWM signal to the PWM input pin, then verify that the PWM configuration is reflected on the output pins.
The design can be tested using a development kit. Optionally, use an oscilloscope to monitor the PWM signal and a signal generator to provide a test input on the PWM input pin.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | ipins[0] | opins[0] | |
| 1 | ipins[1] | opins[1] | |
| 2 | ipins[2] | opins[2] | |
| 3 | ipins[3] | opins[3] | |
| 4 | ipins[4] | opins[4] | spi_cs_n |
| 5 | ipins[5] | opins[5] | spi_mosi |
| 6 | ipins[6] | opins[6] | spi_miso |
| 7 | pwm_in | pwm_sig | spi_sck |