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

Demonstrate GPIO interrupts on the LPC55S69-EVK board. #1919

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

160 changes: 160 additions & 0 deletions app/lpc55xpresso/app-button.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
name = "lpc55xpresso-button"
target = "thumbv8m.main-none-eabihf"
board = "lpcxpresso55s69"
chip = "../../chips/lpc55"
stacksize = 1024
image-names = ["a", "b"]
fwid = true

[kernel]
name = "lpc55xpresso"
features = ["dump", "dice-self"]
requires = {flash = 55040, ram = 4096}

[caboose]
region = "flash"
size = 256
default = true

[tasks.jefe]
name = "task-jefe"
priority = 0
max-sizes = {flash = 16384, ram = 2048}
start = true
features = ["dump"]
stacksize = 1536
notifications = ["fault", "timer"]
extern-regions = ["sram2"]

[tasks.jefe.config.allowed-callers]
request_reset = ["update_server"]

[tasks.hiffy]
name = "task-hiffy"
priority = 5
features = ["lpc55", "gpio"]
max-sizes = {flash = 32768, ram = 16384 }
stacksize = 2048
start = true
task-slots = ["gpio_driver", "update_server"]

[tasks.idle]
name = "task-idle"
priority = 7
max-sizes = {flash = 256, ram = 256}
stacksize = 256
start = true

[tasks.update_server]
name = "lpc55-update-server"
priority = 3
max-sizes = {flash = 26720, ram = 16704}
stacksize = 8192
start = true
sections = {bootstate = "usbsram"}
uses = ["flash_controller", "hash_crypt"]
notifications = ["flash-irq", "hashcrypt-irq"]
interrupts = {"flash_controller.irq" = "flash-irq", "hash_crypt.irq" = "hashcrypt-irq"}
task-slots = [{"syscon" = "syscon_driver"}, "jefe"]

[tasks.syscon_driver]
name = "drv-lpc55-syscon"
priority = 2
max-sizes = {flash = 8192, ram = 2048}
uses = ["syscon", "anactrl", "pmc"]
start = true
stacksize = 1000
task-slots = ["jefe"]

[tasks.gpio_driver]
name = "drv-lpc55-gpio"
priority = 3
max-sizes = {flash = 8192, ram = 2048}
uses = ["gpio", "iocon", "pint", "inputmux"]
start = true
stacksize = 1000
task-slots = ["syscon_driver"]

[tasks.user_leds]
name = "drv-user-leds"
features = ["lpc55"]
priority = 4
max-sizes = {flash = 8192, ram = 2048}
start = true
stacksize = 1000
task-slots = ["gpio_driver"]
notifications = ["timer"]

[tasks.button]
name = "task-button"
priority = 6
start = true
notifications = ["timer", "button-irq"]
interrupts = { "pint.irq0" = "button-irq"}
stacksize = 4096
task-slots = ["gpio_driver", {"syscon" = "syscon_driver"}]

[tasks.button.config]
pins = [
{ name = "BUTTON", pin = { port = 1, pin = 9}, alt = 0, pint = 0, direction = "input", opendrain = "normal" },
{ name = "RED_LED", pin = { port = 1, pin = 6}, alt = 0, direction = "output", value = true },
{ name = "GREEN_LED", pin = { port = 1, pin = 7}, alt = 0, direction = "output", value = true },
{ name = "BLUE_LED", pin = { port = 1, pin = 4}, alt = 0, direction = "output", value = true },
]

[tasks.usart_driver]
name = "drv-lpc55-usart"
priority = 4
max-sizes = {flash = 8192, ram = 2048}
uses = ["flexcomm0"]
start = true
notifications = ["usart-irq"]
interrupts = {"flexcomm0.irq" = "usart-irq"}
stacksize = 1000
task-slots = ["gpio_driver", "syscon_driver"]

[tasks.usart_driver.config]
pins = [
{ pin = { port = 0, pin = 29}, alt = 1},
{ pin = { port = 0, pin = 30}, alt = 1}
]

[tasks.i2c_driver]
name = "drv-lpc55-i2c"
priority = 4
uses = ["flexcomm4"]
start = true
stacksize = 1000
task-slots = ["gpio_driver", "syscon_driver"]

[tasks.rng_driver]
name = "drv-lpc55-rng"
priority = 3
max-sizes = {flash = 16384, ram = 4096}
uses = ["rng", "pmc"]
start = true
stacksize = 2200
task-slots = ["syscon_driver"]

[tasks.dump_agent]
name = "task-dump-agent"
features = ["no-rot"]
priority = 5
max-sizes = {flash = 32768, ram = 2240 }
start = true
task-slots = ["jefe"]
stacksize = 1536
extern-regions = ["sram2"]

[tasks.attest]
name = "task-attest"
priority = 5
max-sizes = {flash = 35072, ram = 16384}
stacksize = 12304
start = false
extern-regions = ["dice_alias", "dice_certs"]

[signing.certs]
signing-certs = ["../../support/fake_certs/fake_certificate.der.crt"]
root-certs = ["../../support/fake_certs/fake_certificate.der.crt"]
private-key = "../../support/fake_certs/fake_private_key.pem"
2 changes: 1 addition & 1 deletion app/lpc55xpresso/app-sprot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ task-slots = ["jefe"]
name = "drv-lpc55-gpio"
priority = 3
max-sizes = {flash = 8192, ram = 2048}
uses = ["gpio", "iocon"]
uses = ["gpio", "iocon", "pint", "inputmux"]
start = true
stacksize = 1000
task-slots = ["syscon_driver"]
Expand Down
2 changes: 1 addition & 1 deletion app/lpc55xpresso/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ task-slots = ["jefe"]
name = "drv-lpc55-gpio"
priority = 3
max-sizes = {flash = 8192, ram = 2048}
uses = ["gpio", "iocon"]
uses = ["gpio", "iocon", "pint", "inputmux"]
start = true
stacksize = 1000
task-slots = ["syscon_driver"]
Expand Down
2 changes: 1 addition & 1 deletion app/oxide-rot-1/app-dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ task-slots = ["jefe"]
name = "drv-lpc55-gpio"
priority = 3
max-sizes = {flash = 8192, ram = 2048}
uses = ["gpio", "iocon"]
uses = ["gpio", "iocon", "pint", "inputmux"]
start = true
task-slots = ["syscon_driver"]

Expand Down
2 changes: 1 addition & 1 deletion app/oxide-rot-1/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ task-slots = ["jefe"]
name = "drv-lpc55-gpio"
priority = 3
max-sizes = {flash = 8192, ram = 2048}
uses = ["gpio", "iocon"]
uses = ["gpio", "iocon", "pint", "inputmux"]
start = true
task-slots = ["syscon_driver"]

Expand Down
4 changes: 2 additions & 2 deletions app/rot-carrier/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ task-slots = ["jefe"]
name = "drv-lpc55-gpio"
priority = 3
max-sizes = {flash = 8192, ram = 2048}
uses = ["gpio", "iocon"]
uses = ["gpio", "iocon", "pint", "inputmux"]
start = true
task-slots = ["syscon_driver"]

[tasks.user_leds]
name = "drv-user-leds"
features = ["lpc55"]
priority = 6
max-sizes = {flash = 8192, ram = 1056}
max-sizes = {flash = 8192, ram = 1120}
start = true
task-slots = ["gpio_driver"]
notifications = ["timer"]
Expand Down
1 change: 1 addition & 0 deletions build/lpc55pins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ serde = { workspace = true }
syn = { workspace = true }

build-util = { path = "../util" }
call_rustfmt = { path = "../call_rustfmt"}

[lints]
workspace = true
Loading