PWM support

Posts: 16
Joined: Thu Sep 07, 2017 7:57 pm

PWM support

Fri Sep 08, 2017 6:19 pm

VoCore2 spec sheet shows that it has 4 PWM pin. Is there any documentation on how to use them?

Posts: 672
Joined: Sun Oct 19, 2014 6:00 am

Re: PWM support

Sat Sep 09, 2017 1:30 am

You can check the datasheet part of the PWM, and use command mem(at bottom of directly control the register.

Posts: 16
Joined: Thu Sep 07, 2017 7:57 pm

Re: PWM support

Sat Sep 09, 2017 8:04 pm

Thanks Vonger. Could you please let me know if my understanding is correct?

To enable 4 PWM outputs I would do this:
Code: Select all
# UART1_MODE = 2 (PWM ch0/1)
# UART2_MODE = 2 (PWM ch2/3)
# PWM0_MODE = 0 (PWM ch0)
# PWM1_MODE = 0 (PWM ch1)
# SPIS_MODE = 3 (PWM ch0/1 & UART2)
mem 0x10000060 0x0a05040c

The spec sheet says on page 30 to also set EPHY_APGIO_AIO_EN[4:1] but I can't find what it is... I am guessing they meant EPHY_GPIO_AIO_EN instead?... So I would do:
Code: Select all
mem 0x1000003C 0x001f001f

Does that look correct?

Next, when it comes to controlling the PWMs I get lost.

- Makes sense.

- What's New PWM mode vs Old PWM mode?
- What's stop bit position and FIFO mode?
- What's guard time?

- Set low/high duty cycle, right?

- What do they do? (FIFO mode again)

- Set how many cycles to generate, right? (0 = forever)

- What's it do?

- What's it do?

- Shows how many cycle were generated so far? (Set in PWM0_WAVE_NUM)

Does anybody have any data on the above?

Posts: 1
Joined: Sat Jan 06, 2018 2:09 pm

Re: PWM support

Sun Jan 07, 2018 2:41 pm

could it be use to control spi signal led lights?
as the ws2813b or the sk6812 led chips,
sk6812 ws2813b dmx led strip

Return to VoCore2

Who is online

Users browsing this forum: Google [Bot] and 5 guests