Commit Graph

675 Commits

Author SHA1 Message Date
Dion Dokter
92343551aa RP: add option to provide your own boot2 2024-06-25 14:31:15 +02:00
Henrik Alsér
cfe8561550
Merge pull request #3044 from kalkyl/adc-multi
rp: Add multichannel ADC
2024-06-22 21:05:17 +00:00
kalkyl
e3891b09dc Add comment about internal api 2024-06-22 16:39:23 +02:00
Dario Nieuwenhuis
6a4ac5bd60 Add collapse_debuginfo to fmt.rs macros.
This makes location info in defmt logs point to the code calling the macro,
instead of always to fmt.rs as before. Fix works with nightlies
starting with today's, and stable 1.81+.
2024-06-17 01:38:57 +02:00
Dario Nieuwenhuis
7ad76f5f60 Use raw slices .len() method instead of unsafe hacks.
Stabilized in 1.79.
2024-06-13 20:41:08 +02:00
Mikkel
d08639f643
Add missing word "pin" in rp pwm documentation
It is confusing to read without. The corrected line reads like its 'b' pin counterpart (few lines below).
2024-06-12 14:56:21 +02:00
Dario Nieuwenhuis
3e2b015dc4
Merge pull request #3054 from dvdsk/clonable-errors
Add Clone and Copy to Error types
2024-06-09 09:47:26 +00:00
dvdsk
871fe3a549
Add Clone and Copy to Error types
None of them are `non-exaustative`, they are all small enough to be copy
(I estimate none are larger than 4 bytes).
2024-06-06 23:19:07 +02:00
kalkyl
bf36bec9bb rp: Add multichannel ADC 2024-06-05 09:42:08 +02:00
Ulf Lilleengen
30918c355b prepare for embassy-time 0.3.1 release 2024-06-04 09:02:41 +02:00
Ulf Lilleengen
cf0d227cca Prepare for embassy-sync 0.6.0 release 2024-05-29 12:09:55 +02:00
Nick
9031ce7fa7 rp: fix watchdog CTRL register getting overwritten 2024-05-29 06:30:41 +01:00
Dario Nieuwenhuis
d18a919ab9 rp: wait until read matches for PSM accesses. 2024-05-27 00:14:44 +02:00
Dario Nieuwenhuis
33bdc9e85f rp: fix spinlocks staying locked after reset.
Fixes #1736
2024-05-24 20:04:14 +02:00
Dario Nieuwenhuis
e55f31bdc6 rp/pwm: rename channel->slice in args, misc fix. 2024-05-21 23:41:45 +02:00
Ismet Handzic
24032d0853 Remove generics from embassy-rp 2024-05-21 23:35:06 +02:00
Dario Nieuwenhuis
a266948a7a
Merge pull request #2956 from tact1m4n3/uart-fix
Fix drop implementation of `BufferedUartRx` and `BufferedUartTx` in `embassy-rp`
2024-05-20 08:44:01 +00:00
Alexander van Saase
e3e3728dae rp/flash: implement embedded_storage_async::nor_flash::MultiwriteNorFlash 2024-05-18 23:28:37 +02:00
tact1m4n3
5b2535c8a2 fix(embassy-rp): fix drop implementation of BufferedUartRx and BufferedUartTx 2024-05-17 21:51:45 +03:00
QWS
c3db435011 Fix: typo 2024-05-14 15:48:00 +08:00
QWS
75cf17994f In the start_xosc function, the frequency range is set twice. Remove the redundant one. 2024-05-13 19:48:23 +08:00
Rob Pilling
84cd0c672b rp usb: wake ep-wakers after stalling 2024-05-10 16:27:08 +01:00
Rob Pilling
94b38449bd rp usb: add stall implementation 2024-05-10 16:27:08 +01:00
Dario Nieuwenhuis
5732ee7ca9 Reduce use of the full futures crate. 2024-04-26 23:22:25 +02:00
Jan Niehusmann
3f8736e872 Add a comment to the pio rx fifo pull function 2024-04-21 21:24:15 +00:00
pawel00100
143b288333 Add parameter for enabling pull-up and pull-down in RP PWM input mode 2024-04-05 01:20:34 +02:00
Dario Nieuwenhuis
a84b33995e rp: remove mod sealed. 2024-04-05 00:48:46 +02:00
Alexandru RADOVICI
7c36e8dbc7 rename pins data type and the macro 2024-04-02 20:05:46 +03:00
Alexandru RADOVICI
d35572c11f rename pwm channels to pwm slices, including in documentation 2024-04-02 19:50:30 +03:00
Alexandru RADOVICI
7b9546c9c8 rename the Channel trait to Slice and the PwmPin to PwmChannel 2024-04-02 19:42:37 +03:00
Alexandru RADOVICI
aa9eb2ab01 rename PWM_CH to PWM_SLICE 2024-04-02 17:20:35 +03:00
Rafael Bachmann
e139a4e076 fix: CI 2024-03-25 15:09:41 +01:00
Rafael Bachmann
cf789be420
Merge branch 'embassy-rs:main' into barafael/minor_clippy_lints_rp 2024-03-25 14:43:18 +01:00
Dario Nieuwenhuis
eca9aac194 Fix warnings in recent nightly. 2024-03-20 16:39:09 +01:00
Dario Nieuwenhuis
3d842dac85 fmt: disable "unused" warnings. 2024-03-20 14:53:19 +01:00
Rafael Bachmann
255ed29853 fix minor clippy lints in embassy_rp 2024-03-18 23:28:58 +01:00
Rafael Bachmann
5221965a1f
Fix minor typos in embassy_rp/src/lib.rs 2024-03-18 23:02:46 +01:00
Caleb Jamison
f1bf931920 fixup another display -> debug 2024-02-22 06:40:39 -05:00
Caleb Jamison
25bff1d0b9 Fixup comments from James 2024-02-22 06:34:58 -05:00
Caleb Jamison
89986fe967 Fixup display -> debug 2024-02-22 06:21:40 -05:00
Caleb Jamison
5ddee8586a rp2040 i2c_slave improvements
Fix race condition that appears on fast repeated transfers.

Add public reset function. Because application code can stall the bus,
we need to give application code a way to fix itself.
2024-02-22 06:15:31 -05:00
Caleb Jamison
0c6d3ea051 Add SetConfig impl to rp2040 i2c
Also expand test to cover 1kHz, 100kHz, 400kHz, and 1MHz speeds.
2024-02-22 06:14:48 -05:00
Andelf
6734f52676 rp/gpio: fix wrong io _bank calc 2024-02-17 20:44:59 +08:00
Dario Nieuwenhuis
e19bed921d
Merge pull request #2581 from adsnaider/main
Add unsafe constructor for AnyPin
2024-02-17 01:46:12 +00:00
Caleb Jamison
f41b0f6ba9 Remove unused imports 2024-02-15 23:06:57 -05:00
Adam Snaider
72e92647e2 Add unsafe constructor for AnyPin 2024-02-15 19:32:11 -05:00
Caleb Jamison
bd0b450ca4 Improve rp2040 i2c slave
This commit takes the fixes and error reporting improvements from
jcdickinson's work and applies them without overlaying a software state
machine on top of the hardware state machine.

Also allows configuration of response to 'general call' writes.
2024-02-15 17:56:50 -05:00
Jomer.Dev
0708ce1410 Use saturating_sub to make sure we don't overflow 2024-01-29 17:14:23 +01:00
Dario Nieuwenhuis
ee0ebe3121 rp/gpio: remove generics. 2024-01-22 21:32:10 +01:00
James Munns
5e08bb8bc3 A rebase ate my doc comment! 2024-01-19 15:46:36 +01:00
James Munns
1ce96f79fb Fun Learning about the RP2040 UART impl! 2024-01-19 14:02:17 +01:00
James Munns
94290981c3 Debugging RSR 2024-01-19 14:02:17 +01:00
James Munns
fe172109be A little more cleanup 2024-01-19 14:02:17 +01:00
James Munns
24fc12667d Update with more docs and less panics 2024-01-19 14:02:17 +01:00
James Munns
9fd49fb9d6 Add a basic "read to break" function 2024-01-19 14:02:17 +01:00
9names
4770325bb7 Additional features docs for embassy-rp 2024-01-14 13:21:50 +11:00
9names
bb75596302 End all feature doc comments with a full stop 2024-01-14 11:08:18 +11:00
Dario Nieuwenhuis
4c23f197b3 Fix invalid "async" crates.io category. 2024-01-12 00:39:01 +01:00
Dario Nieuwenhuis
6a1c415a4c Complete cargo.tomls more. 2024-01-12 00:32:47 +01:00
Dario Nieuwenhuis
5304994363 Add docs.rs metadata to all crates. 2024-01-11 23:17:02 +01:00
Dario Nieuwenhuis
22197320ff bump embassy-time 0.3, embassy-executor 0.5, embassy-net 0.4. 2024-01-11 23:01:24 +01:00
Dario Nieuwenhuis
e18d673721 More readme fixes. 2024-01-11 21:23:07 +01:00
Dario Nieuwenhuis
b452a6bcf6 Centralize license and MSRV boilerplate into the repo readme. 2024-01-11 18:18:35 +01:00
Dario Nieuwenhuis
15f94fb0fc time: split driver into a separate embassy-time-driver crate. 2024-01-11 16:56:08 +01:00
Dario Nieuwenhuis
495b8b739a Change GPIO inherent methods back to &self.
With the embedded-hal rc3 update I changed them to require `&mut self`, but
in retrospect I think `&self` is better, for extra flexibility.

This PR reverts the changes from the rc3 update to inherent methods.
2024-01-10 00:00:10 +01:00
Dario Nieuwenhuis
c9ac39df94 Update embedded-hal to v1.0 2024-01-09 23:37:14 +01:00
Pawel Rawski
c80781078c Fix an error in compiling examples for rp2040 2024-01-04 21:25:55 +01:00
Barnaby Walters
562680cb13 Removed unnecessary note 2023-12-22 23:51:10 +01:00
Barnaby Walters
6a1bdb7e3b [embassy-rp] auto-documented feature flags 2023-12-22 23:50:37 +01:00
Dario Nieuwenhuis
8b36a32ed5 ci: use beta, add secondary nightly ci. 2023-12-21 15:03:57 +01:00
Ulf Lilleengen
f4b77c967f docs: document all embassy-rp public apis
Enable missing doc warnings.
2023-12-19 14:19:46 +01:00
Ulf Lilleengen
486b67e895 docs: document spi, rtc and rest of uart for embassy-rp 2023-12-19 11:26:08 +01:00
Ulf Lilleengen
e45e3e76b5 docs: embassy-rp rustdoc and refactoring 2023-12-19 10:56:22 +01:00
James Munns
2b497c1e57 Fix nb on rp uart 2023-12-18 18:38:13 +01:00
Dario Nieuwenhuis
a2d4bab2f8
Merge pull request #2281 from dstric-aqueduct/main
allow for optional override of `Suspend` event for a UsbDevice
2023-12-16 13:44:54 +00:00
Dario Nieuwenhuis
d81395fab3 Update embedded-hal to 1.0.0-rc.3 2023-12-14 16:19:32 +01:00
djstrickland
6bf70e14fb Update usb.rs
- add check of `dev_resume_from_host` interrupt register to catch wake event
2023-12-13 14:50:13 -05:00
Dario Nieuwenhuis
6c746dcf39 Document how to bind multiple interrupts and handlers in bind_interrupts!. 2023-12-08 21:26:28 +01:00
Jesse Braham
925f5cbc26 Update all references to embasy-executor to the latest version 2023-12-06 12:05:47 +01:00
Scott Mabin
334900752a update release version in examples and other crates 2023-12-04 13:15:10 +00:00
Dario Nieuwenhuis
03325ea81b update embedded-storage{,-async}, remove patch. 2023-12-04 13:48:36 +01:00
Dario Nieuwenhuis
c6989dfbca Remove nightly and unstable-traits features in preparation for 1.75. 2023-11-29 17:26:33 +01:00
Dario Nieuwenhuis
4634316749 Update embedded-(hal,io,nal). 2023-11-29 17:01:36 +01:00
Dario Nieuwenhuis
1f9b649f80 executor: release v0.3.3 2023-11-15 18:44:01 +01:00
Dario Nieuwenhuis
1f51367eb9 Upgrade static-cell to v2.0 2023-11-02 21:52:07 +01:00
Dario Nieuwenhuis
dd6a29adb2 Release embassy-executor v0.3.1 2023-11-01 00:17:44 +01:00
Dániel Buga
d941882066 Prepare embassy-net 0.2.1 and embassy-sync 0.4.0 2023-10-31 09:33:27 +01:00
Dániel Buga
ad07ea0290 Re-add impl_trait_projections 2023-10-30 19:10:45 +01:00
Dario Nieuwenhuis
88ada52146
Merge pull request #2017 from ilya-epifanov/rp-adc-div
added sampling frequency setting to adc capture methods on rp2040
2023-10-20 01:47:27 +00:00
Riley Williams
6906cc9c25 remove trailing spaces 2023-10-17 19:30:53 -04:00
Riley Williams
cb211f88d3 Grammar and formatting 2023-10-17 19:17:29 -04:00
Riley Williams
3f262a2603
Add docs to RP2040 PWM 2023-10-17 19:05:35 -04:00
Dario Nieuwenhuis
213b4c9dca time: add links key, release v0.1.5. 2023-10-16 20:11:35 +02:00
Adam Greig
0621e957a0
time: Update examples, tests, and other code to use new Timer::after_x convenience methods 2023-10-15 01:30:12 +01:00
Dániel Buga
02d2c06b23 Release embassy-time 0.1.4 2023-10-12 18:14:33 +02:00
Dario Nieuwenhuis
5a19d18b9c
Merge pull request #2039 from jcdickinson/rp-i2c-stop-restart
fix (rp i2c): fix restart/stop flags for i2c master methods
2023-10-11 00:40:59 +00:00
Jonathan Dickinson
322f9cb153
fix (rp i2c): fix restart/stop flags for i2c master methods
Update the start and stop flags for all read/write/read_write methods to match
those in the default blocking implementation of these methods (as well as
other RP2040 I2C implementations, and expected I2C behavior).

Also adds a write_read_async method that doesnt require using embedded-hal, as
this is required to use I2C in an idiomatic fashion (see TI Application Report
SLVA704).
2023-10-10 20:24:38 -04:00
Jonathan Dickinson
3ec4e6320a
fix (rp i2c): set i2c slew rate to spec value
The RP2040 datasheet indicates that I2C pins should have a limited
slew rate (Page 440 - 4.3.1.3.). This configures that for both
`I2c` and `I2cSlave`.

In addition, the pin configuration has been centralized to a single
fn.
2023-10-10 20:14:09 -04:00
Ilya Epifanov
62d6bb6c8a added sampling frequency setting to adc capture methods on rp2040 2023-10-09 10:53:29 +02:00
Dario Nieuwenhuis
85c6f23dcb
Merge pull request #2018 from jamesmunns/add-derives
Add some uncontroversial derives to Error types
2023-10-07 00:03:10 +00:00
Dario Nieuwenhuis
d4ed8e5779 rp/bootsel: change it to a method on the peripheral. 2023-10-07 01:47:20 +02:00
Scott Mansell
3e054a6f0d rp2040: implement BOOTSEL button support 2023-10-07 01:39:29 +02:00
Scott Mansell
c6d53e7bce rp2040: move in_ram helper outside of Flash's impl
Allow it to be called from other modules.
2023-10-07 01:39:29 +02:00
James Munns
022d870d61 Add missing derive 2023-10-07 01:33:43 +02:00
James Munns
930b8f3495 Add some uncontroversial derives to Error types 2023-10-06 17:45:35 +02:00
Dario Nieuwenhuis
0324cee0ca update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
Dario Nieuwenhuis
40f30fa4cd Remove a few ultra-verbose logs.
They're heavily spamming logs for HIL tests, and I don't believe
they're valuable now that the thing they helped debug in their young
age is now solid and mature.
2023-10-03 22:22:16 +02:00
Dario Nieuwenhuis
eb12114345 Remove impl_trait_projections. 2023-10-02 14:00:49 +02:00
Jonathan Dickinson
f98c8886b2
feat: allow schmitt, slew, and drive strength be set from Flex, Input, Output
Allows the schmitt, slew and drive strength to be set from Flex. Input and Output[OpenDrain] also expose the appropriate setters.
2023-10-01 21:49:14 -04:00
xoviat
d2a2734752 nrf, rp: update set_config 2023-10-01 09:37:42 -05:00
Dario Nieuwenhuis
bd9021ca1d Make irq token Copy+Clone 2023-09-25 22:35:31 +02:00
Dario Nieuwenhuis
5d0c40f61d rp: remove paste macro. 2023-09-18 03:30:17 +02:00
Ulf Lilleengen
1b20ba27b1 feat: bump embassy-sync version to 0.3.0
Update changelog in preparation for release
2023-09-14 18:26:00 +02:00
Caleb Jamison
8900f5f52b Fixing my git-based mistakes 2023-09-10 23:01:15 +02:00
Caleb Jamison
8201979d71 Add example, fix small bug in respond_and_fill 2023-09-10 23:01:15 +02:00
Caleb Jamison
2d9f50addc I2c slave take 2
refactored to split modules
renamed to match upstream docs
slight improvement to slave error handling
2023-09-10 23:01:15 +02:00
Caleb Jamison
18da91e252 Rename to match upstream docs 2023-09-10 23:01:15 +02:00
Caleb Jamison
28e2570533 Remove debug prints 2023-09-10 23:01:15 +02:00
Caleb Jamison
26e0823c35 rp2040 I2cDevice
Move i2c to mod, split device and controller

Remove mode generic:
I don't think it's reasonable to use the i2c in device mode while
blocking, so I'm cutting the generic.
2023-09-10 23:01:15 +02:00
Michael van Niekerk
83a976cf4b RP2040: Fixes as per PR 2023-08-30 21:59:41 +02:00
Michael van Niekerk
a76ff53fb3 RP2040: Fixes as per PR 2023-08-30 21:58:36 +02:00
Michael van Niekerk
f69e8459c9 RP2040: Fixes as per PR 2023-08-30 21:52:03 +02:00
Michael van Niekerk
891f1758bc RP2040: XOSC delay multiplier 2023-08-30 21:43:57 +02:00
Michael van Niekerk
ae174fd0e0 RP2040: XOSC delay multiplier 2023-08-30 21:42:27 +02:00
Dario Nieuwenhuis
5e613d9abb Sync all fmt.rs files. 2023-08-30 01:37:18 +02:00
Jesse Braham
1f63bf4153 Release embassy-time v0.1.3 2023-08-28 08:00:18 -07:00
Dániel Buga
a2c718f61c Bump executor crate version to 0.3.0 2023-08-23 20:34:37 +02:00
Dario Nieuwenhuis
b948e37769 rp/flash: change naming to blocking_*, new_blocking.
- Needed for consistency with other drivers.
- Having two `new()` functions sometimes resulted in 'multiple applicable methods' errors.
2023-08-18 13:21:21 +02:00
Dario Nieuwenhuis
f26dd54f63
Update embedded-hal to 1.0.0-rc.1 (#1783) 2023-08-16 00:40:56 +02:00
Dario Nieuwenhuis
46f671ae42 rp: fix async spi read sometimes hanging. 2023-08-15 22:47:58 +02:00
Dario Nieuwenhuis
5d5cd23715
Update to embedded-io 0.5 (#1752) 2023-08-07 13:43:09 +02:00
pennae
3c5f011245 rp: add generic dormant-sleep functionality
this is "generic" in that it doesn't require the user to set up anything
specific to go to dormant sleep, unlike the C sdk which requires clock
sources to be configured explicitly and doesn't much care about PLLs. we
will instead take a snapshot of the current clock configuration, switch
to a known clock source (very slow rosc, in this case), go to sleep, and
on wakeup undo everything we've done (ensuring stability of PLLs and
such).

tested locally, but adding tests to HIL seems infeasible. we'd need at
least another pico or extensive modifications to teleprobe since
dormant-sleep breaks SWD (except to rescue-dp), neither of which is
feasible at this point. if we *did* want to add tests we should check
for both rtc wakeups (with an external rtc clock source) and gpio wakeups.
2023-08-05 00:57:29 +02:00
pennae
9dfda46e0c rp: add dormant-wake functionality for Input
this temporarily takes ownership of pins because we need to clear edge
interrupts before waiting for them (otherwise we may wait indefinitely),
we want to clean up the dormant-wake bits after a wakeup, and doing
anything *else* with the input while we're waiting for a wakeup isn't
possible at all. doing it like this lets us not impose any cost on those
who don't use dormant wakes without entangling dormant waits too badly
with regular interrupt waits.
2023-08-03 19:22:47 +02:00
pennae
a6b8f3d994 rp: add single-channel dma from adc
with uniform treatment of adc inputs it's easy enough to add a new
sampling method. dma sampling only supports one channel at the moment,
though round-robin sampling would be a simple extension (probably a new
trait that's implemented for Channel and &[Channel]). continuous dma as
proposed in #1608 also isn't done here, we'd expect that to be a
compound dma::Channel that internally splits a buffer in half and
dispatches callbacks or something like that.
2023-08-02 17:04:32 +02:00
pennae
b166ed6b78 rp: generalize adc inputs from pins to channels
this lets us treat pins and the temperature sensor uniformly using the
same interface. uniformity in turn lets us add more adc features without
combinatorial explosion of methods and types needed to handle them all.
2023-08-01 18:31:28 +02:00
pennae
54d31c98fe rp: remove AdcChannel::channel
we're not using it, and actually using it is more trouble than it's
worth. remove the false assurance instead.
2023-08-01 18:31:28 +02:00
pennae
48eac0b146 rp: add AdcChannel trait
this is more general than AdcPin and can also cover the temperature
sensor.
2023-08-01 18:31:28 +02:00
Dario Nieuwenhuis
ef3b1f46a9
Merge pull request #1728 from pennae/rp-gpio-banks
rp: fix qspi gpio interrupts, make qspi gpio optional
2023-08-01 08:18:39 +00:00
pennae
f3ad0c6ade rp: fix qspi gpio interrupts
so far only bank0 interrupts were processed and configured, even if a
qspi pin was given. this is obviously not the right thing to do, so
let's rectify that. the fact that no problems have shown up so far does
suggest that most, if not all, applications don't use this functionality
at all.
2023-07-31 20:02:06 +02:00
Dario Nieuwenhuis
4da9743317
Merge pull request #1690 from Sizurka/rp-flash-ptr-fix
rp: Fix ROM cache ptr() returning the trampoline
2023-07-31 17:26:59 +00:00
pennae
dca1777a2f rp: make QSPI gpio support optional
this will be mostly not useful to anyone since flash is attached to
qspi, and using flash chips that don't use the *entire* qspi interface
will severly slow down the chip. the code overhead is minimal right now,
but if we also fix interrupt support on qspi pins this will
change (adding more code to potentially hot paths, using more memory for
wakers that are never used, and preventing the qspi gpio irq from being
used in software interrupts as RTIC applications may want to do).
2023-07-31 19:13:10 +02:00
pennae
2c6fcdbd3f rp: add gpio::Pin::io() for access to io banks 2023-07-31 18:36:37 +02:00
pennae
e6d4043279 rp: rename gpio::Pin::io to gpio::Pin::gpio
we'll need access to the pin io bank registers for an upcoming fix, and
having both `io` and `io_bank` or similar can get confusing quickly.
rename `io` to `gpio` to avoid this, and also match the type while there.
2023-07-31 18:28:31 +02:00
Derek Hageman
7ed9e29326 rp: add async flash
Implement an async flash mode using the XIP background best effort
read interface.  Only reads are actually async, write and erase remain
blocking.
2023-07-28 16:50:54 -06:00
pennae
cbc8871a0b rp: relocate programs implicitly during load
this removed the RelocatedProgram construction step from pio uses.
there's not all that much to be said for the extra step because the
origin can be set on the input program itself, and the remaining
information exposed by RelocatedProgram can be exposed from
LoadedProgram instead (even though it's already available on the pio_asm
programs, albeit perhaps less convenient). we do lose access to the
relocated instruction iterator, but we also cannot think of anything
this iterator would actually be useful for outside of program loading.
2023-07-28 19:33:02 +02:00
Dario Nieuwenhuis
036e6ae30c
Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. (#1700) 2023-07-28 13:23:22 +02:00
Dario Nieuwenhuis
0ced8400d0
Merge pull request #1674 from pennae/rp-stack-guards
Rp stack guards
2023-07-28 10:43:54 +00:00
Derek Hageman
a5f2152077 rp: Fix ROM cache ptr() returning the trampoline
Make sure that the ptr() function for ROM functions always returns
the actual ROM pointer.  This allows the use of flash I/O while the
function cache is enabled.
2023-07-26 06:50:43 -06:00
pennae
e9445ec72d rp: allow for MPU-based stack guards on core 0 as well
using these will require some linker script intervention. setting the
core0 stack needs linker intervention anyway (to provide _stack_start),
having it also provide _stack_end for the guard to use is not that much
of a stretch.
2023-07-21 18:51:35 +02:00
pennae
4d6b3c57b1 rp: fix multicore stack guard setup
the region field of the register is four bits wide followed by the valid
bit that causes the rnr update we rely on for the rasr write. 0x08 is
just a bit short to reach the valid bit, and since rp2040 has only 8
regions it (at best) doesn't do anything at all.
2023-07-20 16:08:59 +02:00