Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: PWM support for the HiFive1 Rev B #1069

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cmsis-svd
26 changes: 22 additions & 4 deletions src/machine/board_hifive1b.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const (
D5 = P21 // Blue LED/PWM (PWM1_PWM2)
D6 = P22 // Red LED/PWM (PWM1_PWM3)
D7 = P16
D8 = NoPin // PWM?
D9 = P01
D10 = P02 // SPI1_CS0
D11 = P03 // SPI1_DQ0
D8 = P00 // PWM (PWM0_PWM0)
D9 = P01 // PWM (PWM0_PWM1)
D10 = P02 // SPI1_CS0/PWM (PWM0_PWM2)
D11 = P03 // SPI1_DQ0/PWM (PWM0_PWM3)
D12 = P04 // SPI1_DQ1
D13 = P05 // SPI1_SCK
D14 = NoPin // not connected
Expand Down Expand Up @@ -57,3 +57,21 @@ const (
I2C0_SDA_PIN = D18
I2C0_SCL_PIN = D19
)

// PWM pins
const (
PWM0_PWM0 = D8
PWM0_PWM1 = D9
PWM0_PWM2 = D10
PWM0_PWM3 = D11

PWM1_PWM0 = D4
PWM1_PWM1 = D3
PWM1_PWM2 = D5
PWM1_PWM3 = D6

PWM2_PWM0 = D16
PWM2_PWM1 = D17
PWM2_PWM2 = D18
PWM2_PWM3 = D19
)