Commit Graph

369 Commits

Author SHA1 Message Date
Scott Shawcroft 8137e2d6d2
Switch all ports to auto-growing split heap
This simplifies allocating outside of the VM because the VM doesn't
take up all remaining memory by default.

On ESP we delegate to the IDF for allocations. For all other ports,
we use TLSF to manage an outer "port" heap. The IDF uses TLSF
internally and we use their fork for the other ports.

This also removes the dynamic C stack sizing. It wasn't often used
and is not possible with a fixed outer heap.

Fixes #8512. Fixes #7334.
2023-11-01 15:24:16 -07:00
Jeff Epler 774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Scott Shawcroft 53bc6d4bd1
Fix docs build by splitting out support matrix 2023-10-24 16:20:51 -07:00
Scott Shawcroft e1df598199
Split displayio hardware support from core
These are moved:
* Display -> busdisplay.BusDisplay
* FourWire -> fourwire.FourWire
* EPaperDisplay -> epaperdisplay.EPaperDisplay
* I2CDisplay -> i2cdisplaybus.I2CDisplayBus

`paralleldisplay` is now `paralleldisplaybus` (and registered as
`paralleldisplay` too).

Bus related helpers are split out of display_core into bus_core.
It is in still displayio since it is a dependency of both
busdisplay and epaperdisplay.

Fixes #7667
2023-10-24 15:43:34 -07:00
Dan Halbert f2ebe6839c Initial MicroPython v1.21.0 merge; not compiled yet 2023-10-18 17:49:14 -04:00
Scott Shawcroft 9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Dan Halbert 68a2927385 MP_REGISTER_ROOT_POINTER for port-specific root pointers 2023-09-29 15:46:42 -04:00
Dan Halbert 1c388ab315 finish converting to MP_REGISTER_ROOT_POINTER() 2023-09-29 10:49:34 -04:00
Dan Halbert 76ff01452b Trinket M0 comes up; still very much wip 2023-09-28 16:22:10 -04:00
Dan Halbert 2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Scott Shawcroft ab70f8eace
Merge remote-tracking branch 'adafruit/main' into i2s_mclk 2023-08-24 15:07:14 -07:00
Scott Shawcroft f93022b142
Two tweaks to mclk 2023-08-17 14:28:33 -07:00
Scott Shawcroft 8c5c73df38
Add I2S MCLK support to iMX RT 2023-08-17 11:39:14 -07:00
Dan Halbert d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Dan Halbert 2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert 27c7807693 silabs build needs work; other builds are working 2023-08-13 19:05:16 -04:00
Dan Halbert 10b94796c0 wip; fix more m_malloc and gc_alloc 2023-08-11 00:30:34 -04:00
Dan Halbert 2ff8667e75 wip; remove long-lived functionality; remove PR#2614
Trinket M0 compile has no compilation errors, but has link errors to fix.
2023-08-08 20:41:17 -04:00
Dan Halbert 0d4bc8c163 initial v1.19.1 merge; not compiled yet 2023-08-01 13:50:05 -04:00
Scott Shawcroft 525dad71c3
Add RuntimeError_varg and fix imx capitalization 2023-07-20 16:00:43 -07:00
Scott Shawcroft a56e97db1d
Align MP heap allocations to cache lines 2023-07-20 11:20:32 -07:00
Scott Shawcroft 5f082561b3
Unify some error strings 2023-07-20 11:20:32 -07:00
Scott Shawcroft e81ed62cfd
Add missing header file 2023-07-19 11:46:04 -07:00
Scott Shawcroft 1629faf8b3
Make usb_host.Port a singleton
This allows you to initialize usb_host.Port once successfully and
then returns the same object as long as you pass the same arguments
in. It does allow you to fix incorrect pins but not switching from
one valid set to another. (It needs a reset for that.)

This also moves hcd cache operations to RAM so that they don't
access the cache when doing maintenance.
2023-07-18 10:40:54 -07:00
Scott Shawcroft 2686beab36
Basic USB host support and keyboard workflow
Connects up read, write and ctrl_transfer to TinyUSB. USB Host
support is available on iMX RT and RP2040.

Fixes #6527 (imx) and fixes #5986 (rp2).
2023-07-10 14:22:21 -07:00
Dan Halbert 77b3a0570e add Adafruit Metro M7 1011 SD 2023-06-27 19:11:25 -04:00
leosun 7354e2ad03 fix `invalid pin` error when create `busio.SPI`
on specific SCK/MOSI/MISO pins, the `common_hal_busio_spi_construct`
method always skip miso pins which will lead to a `invalid pin`
exception when SPI initilized
2023-06-15 07:48:19 +08:00
Dan Halbert 38f6fa27e3 fetch-port-submodules; fetch-all-submodules 2023-06-05 17:23:34 -04:00
Christopher Hoover 49b1368d65 Changed PID to 0x813C. 2023-05-22 20:06:50 -07:00
Christopher Hoover 73299ae48c Adds new board for MIMRT1060-EVKB (not to be confused with MIMRT1060-EVK). 2023-05-21 17:42:30 -07:00
Scott Shawcroft 02d4c8153b
Merge pull request #7953 from jepler/issue7944-v3
Fix some regressions on feather M7
2023-05-12 08:34:39 -07:00
Jeff Epler 5a5474b5dc
mimxrt: 101x: MIDI_RX_BUFSIZE must be 512
It's not clear why this is required, but otherwise it stops
midi_intest1 from ever receiving any MIDI events.

Closes: #7944
2023-05-11 21:47:54 -05:00
Scott Shawcroft a56174dc10
Correct pad count.
This prevents running into the pins that cannot be reset. On 1011
it was off by one pin that isn't attached to the package. So,
having the USB pins forbidden prevented resetting to a NULL address.

Fixes #7952
2023-05-11 15:02:56 -07:00
Scott Shawcroft 750615f2da
Merge pull request #7430 from Lanzaa/rp2040_cpu_frequency
Add frequency setting for RP2040 boards.
2023-05-02 09:52:28 -07:00
Scott Shawcroft 8104b824e0
Standardize CPU temp and voltage. Add autogen warning 2023-04-28 16:19:43 -07:00
Scott Shawcroft f837f2438a
Update USB PIDs 2023-04-28 11:16:45 -07:00
Scott Shawcroft a9dc31a881
Add additional iMX RT support
This adds a script to generate the peripherals files (except clock).

It adds support for the 1015, 1020, 1040, and 1050 EVKs.

Some work was started on 1176 but it isn't working. So, the board
def is in a separate branch.

Fixes #3521. Fixes #2477.
2023-04-28 11:01:13 -07:00
Scott Shawcroft 0f9fb33371
Merge branch 'main' into rp2040_cpu_frequency 2023-04-19 17:05:58 -07:00
Scott Shawcroft e2ab7a4751
Change voltage. Refine docs 2023-04-19 17:04:54 -07:00
Scott Shawcroft 097af804cd
Fix ticks
In #7497 port_background_task was renamed to port_background_tick
but the actual call site wasn't changed. This meant that it was
no longer called!

Rename more functions from task to tick to make it clearer which is
which.
2023-04-07 09:49:51 -07:00
Jeff Epler 685fdf29e3
remove include directory that doesn't exist 2023-04-05 10:31:05 -05:00
Jeff Epler 02f8a45dfa
synthio: allow increasing number of channels
12 channels works well on metro m7
2023-04-01 11:46:27 -05:00
Jeff Epler cb5e1a1e98
mimxrt: Fix output frequency for samples that don't divide 192kHz
This makes all the samples from Dan's collection register as 440Hz
when playing on pwmio or i2sout, using https://webaudiodemos.appspot.com/pitchdetect/index.html
to detect the frequency played (all should show as A 440Hz; an error
of up to 20 "cents" should be treated as OK)

There's an audible carrier with PWM output and the 8kHz samples. This is
probably a limitation of the peripheral which is documented as being for
input signals of 44 kHz or 48 kHz; the carrier frequency is a fixed
multiple of the sample frequency.

Closes #7800
2023-03-28 10:18:28 -05:00
Dan Halbert 77cd20af8f
Merge pull request #7785 from jepler/mimxrt10xx-mqs
mimxrt10xx: Add PWMAudioOut
2023-03-27 20:46:11 -04:00
Jeff Epler 9d090ee73e
get rid of another debug print 2023-03-27 10:52:52 -05:00
Jeff Epler b1d9331367
move comment next to its associated #if 2023-03-23 21:11:05 -05:00
Jeff Epler 0c0e06c940
remove comment that was copypasted 2023-03-23 21:10:04 -05:00
Jeff Epler e1c8a3062a
remove debugging print 2023-03-23 21:06:53 -05:00
Jeff Epler e2565e2305
mimxrt10xx: Add PWMAudioOut
.. via a peripheral known as the "MQS" (medium quality sound). It uses an
~192kHz PWM signal to generate audio. It sounds OK on a small speaker with
no amplifier. There's a small pop when starting/stopping audio, as is
typical.
2023-03-23 14:08:44 -05:00
Jeff Epler df916e0484
Merge remote-tracking branch 'origin/main' into mimxrt10xx-rotaryio 2023-03-23 13:02:12 -05:00