Commit Graph

17 Commits

Author SHA1 Message Date
Jeff Epler 621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
Dan Halbert a5dc0fef5f Revert #5341. Does not work on power-cycle. 2021-09-16 11:59:43 -04:00
Dan Halbert 650ce17c0d
Fix formatting 2021-09-13 19:12:21 -04:00
Uri Shaked e5290a2886
Enable WFI for raspberrypi port
See #5331 for details
2021-09-14 01:09:15 +03:00
Scott Shawcroft 6e7e703f89
Fix RP2 countio reset
Fixes #5251
2021-08-27 17:39:19 -07:00
Scott Shawcroft d2860b58b0
Check background pending before sleep
There is a race between when we run background tasks and when we
sleep. If an interrupt happens between the two, then we may delay
executing the background task. On some ports we checked this for
TinyUSB already. On iMX RT, we didn't which caused USB issues.
This PR makes it more generic for all background tasks including
USB.

Fixes #5086 and maybe others.
2021-08-19 12:18:13 -07:00
Scott Shawcroft 9dabe882f1
Fix safe mode on rp2040 2021-05-19 10:18:43 -07:00
Scott Shawcroft f200e6a21e
Fix doc build and address feedback 2021-03-22 15:24:27 -07:00
Scott Shawcroft 5d2b60cbf6
Redo RP2040 flash settings
This switches stage2 to C and uses Jinja to change the C code based
on flash settings from https://github.com/adafruit/nvm.toml. It
produces the fastest settings for the given set of external flashes.
Flash size is no longer hard coded so switching flashes with similar
capabilities but different sizes should *just work*.

This PR also places "ITCM" code in RAM to save the XIP cache for
code execution. Further optimization is possible. A blink code.py
still requires a number of flash fetches every blink.

Fixes #4041
2021-03-18 16:55:42 -07:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Scott Shawcroft 3f08cb47b8
Merge remote-tracking branch 'adafruit/main' into busio-uart-rp 2021-02-25 16:59:15 -08:00
microDev 5d7fdafcde
implement suggested changes
- add internal buffering
- rtc initialization fix
2021-02-25 00:48:36 +05:30
Scott Shawcroft 360475e266
Implement audiobusio and enhance PIO for it
This adds I2SOut and PDMIn support via PIO.

StateMachines can now:
 * read and read while writing
 * transfer in 1, 2 or 4 byte increments
 * init pins based on expected defaults automatically
 * be stopped and restarted
 * rxfifo can be cleared and rxstalls detected (good for tracking when
   the reading code isn't keeping up)

Fixes #4162
2021-02-23 15:50:00 -08:00
Scott Shawcroft 191b143e7b
Add PWM based audio playback
See
https://learn.adafruit.com/circuitpython-essentials/circuitpython-audio-out
to get started.

Fixes #4037
2021-02-09 15:38:33 -08:00
Jeff Epler 6e153d9948 raspberrypi: implement reset, reset_to_bootloader
This makes all the following work:
 * normal microcontroller.reset()
 * reset into safe mode or UF2 bootloader via microcontroller.on_next_reset()
 * reset into UF2 bootloader via the "1200 baud trick"

The implementation of reset_cpu is from micropython.
2021-02-04 12:07:50 -06:00
microDev ec03267035
rtc implementation for rp2040 2021-02-02 00:00:00 +05:30
Scott Shawcroft 733094aead
Add initial RP2040 support
The RP2040 is new microcontroller from Raspberry Pi that features
two Cortex M0s and eight PIO state machines that are good for
crunching lots of data. It has 264k RAM and a built in UF2
bootloader too.

Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf
2021-01-20 19:16:56 -08:00