Commit Graph

17 Commits

Author SHA1 Message Date
root 11ef36d09d Implement pulseout for RP2040 2021-05-17 16:24:45 -05:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Scott Shawcroft f79d60b205
Use GCC @file to shorten linker command length
This hopefully fixes linking on Windows with cmd.exe
2021-03-24 15:03:33 -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
Scott Shawcroft 45487f14a0
Speed up a bit more 2021-03-12 16:00:16 -08:00
Scott Shawcroft aec03a409f
Lower default flash speed.
/ 6 leads to ~40mhz. 2M and 4M have a max 0x03 read speed of 60mhz.
If the divisor is / 4 then the speed is just over 60mhz.

Fixes #4377
2021-03-12 11:06:39 -08:00
hathach 58fb011070 clean up 2021-03-10 19:03:27 +07:00
hathach d1c6bb0927 rp2040 add double reset to uf2, also update pico-sdk to 1.1.0 2021-03-10 18:58:23 +07:00
Dan Halbert fb7a0f7efc add 1sec timeouts for I2C read and write 2021-03-03 09:43:57 -05:00
Jeff Epler 5a00862b1d raspberrypi: allow directly specifying the original boot .S file
.. all the necessary steps to transform it into a padded, checksummed
file are now done by the build system.

Since it is assigned by "?=", it _should_ be the case that individual
builds can override it.

I did not "test" this per se, but it gives the same content and checksum
(except for the identifying comment with a path) as #4302.
2021-03-01 21:08:19 -06:00
Jeff Epler ab5eb86118 raspberrypi: implement os.urandom
Since the datasheet cast some doubt on the strength of the "rosc_hw->randombit",
I use the SHA256 hash function to create a high quality random seed
from random values of uncertain entropy, as well as to generate a sequence
of random values from that seed using SHA256 as a cryptographically-secure
random number generator.

In practice, it produces over 100kB/s of random data which does not
have any gross problems according to _PractRand_.
2021-02-17 17:49:25 -06: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
Scott Shawcroft 22dc7d5359
Update to the very latest SDK w/GP15 restore
Also adds unique id support

Fixes #4039 and hopefully #4107
2021-02-05 18:44:06 -08:00
microDev ec03267035
rtc implementation for rp2040 2021-02-02 00:00:00 +05:30
Scott Shawcroft 48721584f9
Temporarily turn off string op overflow check 2021-01-20 19:16:56 -08:00
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