Commit Graph

11887 Commits

Author SHA1 Message Date
Scott Shawcroft 792def24f3
A few silabs improvements
* Fix watchdog code crash.
* Define status LEDs for all boards.
* Add flash target to Makefile.
* Reduce build verbosity.
2023-10-17 11:10:03 -07:00
Dan Halbert f6601177e0
Merge pull request #8481 from dhalbert/v1.20-merge
Merge from MicroPython v1.20.0
2023-10-16 19:54:32 -04:00
Dan Halbert f78b35d06f remove unused files; fix typo; remove debugging code 2023-10-16 19:23:35 -04:00
Scott Shawcroft 5a19971efd
Fix pre-commit 2023-10-16 10:46:11 -07:00
Scott Shawcroft 732caedd16
Fix non-CYW43 RP2040 builds 2023-10-16 10:43:31 -07:00
Scott Shawcroft db4253e268
Fix spresence by disabling asserts 2023-10-16 10:43:31 -07:00
Scott Shawcroft 544553c542
Fix cyw43 (pico w) builds 2023-10-16 10:43:30 -07:00
Axeia 44e9e6464c
Merge branch 'adafruit:main' into main 2023-10-16 17:22:03 +01:00
Seon Rozenblum 4606af4ec2 Added Unexpected Maker BlizzardS3 board for Espressif port. 2023-10-15 17:46:17 +11:00
Dan Halbert 195867e9d2 Merge remote-tracking branch 'adafruit/main' into fix-i2s-error-message 2023-10-14 07:38:39 -04:00
Dan Halbert 43b99a6f35 fix fomu board.c 2023-10-13 19:55:43 -04:00
Scott Shawcroft e5767829db
Merge pull request #8475 from minordemon/Waveshare-RP2040-Touch-LCD-1_28
Added support for the Waveshare Touch LCD 1.28
2023-10-12 14:17:02 -07:00
Scott Shawcroft 71bd1176f9
Merge pull request #8474 from jins-tkomoda/m5stack_atoms3
Added support for the M5stack atoms3
2023-10-12 14:13:17 -07:00
Scott Shawcroft 2de11f0c03
Merge pull request #8459 from tannewt/metro_s3_revb
Update Metro S3 pin mapping for Rev B
2023-10-12 14:11:23 -07:00
Pascal Bakhuis b24a551485 Added support for SuperMini NRF52840 2023-10-12 21:26:30 +01:00
Taiki Komoda 33e90ba8fe Fix pid and clean comments 2023-10-12 13:33:56 +09:00
Jeroen Harkes 56d5df3189 Copy non touch, change name, pid and lcd rest pin. 2023-10-12 00:44:09 +02:00
Scott Shawcroft 1f38293096
Fix ESP related issues 2023-10-11 14:11:29 -07:00
Scott Shawcroft 9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Scott Shawcroft 2910dea6fd
Almost fix extra_coverage test 2023-10-11 10:04:02 -07:00
Taiki Komoda d638aa07aa brightness is now functional 2023-10-09 12:18:50 +09:00
Sumitra Sharma 002961775b Refine error message for rp2040 audiobusio I2S object creation
The error message for creating an I2S object on the rp2040 platform
in CircuitPython can be misleading when the word_select and data pins
are not sequential. This change updates the error message to provide
clearer guidance by specifying "GPIO pins" instead of just "pins".
The revised message now reads:

ValueError: Bit clock and word select must be sequential GPIO pins

Closes #8058

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
2023-10-08 20:54:55 +05:30
Taiki Komoda 96ae87e559 display is functional now 2023-10-08 23:51:18 +09:00
Tirtharaj Sinha 2047a8d485
Merge branch 'adafruit:8.2.x' into 8.2.x 2023-10-08 13:03:22 +05:30
Tirtharaj Sinha 448b8cb271 removing gpio (19,20) and adding gpio(33,34) and spi pins 2023-10-08 12:53:43 +05:30
Tirtharaj Sinha c8926de26b removing gpio 19 and 20 as these pins are not broken out in board 2023-10-08 02:48:39 +05:30
Dan Halbert a14a9a064a
Merge pull request #8463 from tirtharajsinha/8.2.x
Adding the missing pins(33,34) and SPI pins
2023-10-07 16:00:03 -04:00
Tirtharaj Sinha d4b5146147 Adding the missing pins(33,34) and SPI pins 2023-10-07 23:42:09 +05:30
Scott Shawcroft 15c5e8c806
Fix pin adc unit check
IDF5 made 0 valid. Use the NO_ADC macro instead
2023-10-06 15:55:43 -07:00
Dan Halbert c9d7195505
Merge pull request #8447 from tannewt/5.1_enable_rgbmatrix
Enable rgbmatrix on IDF 5.1
2023-10-06 17:14:04 -04:00
Scott Shawcroft 22bcb85dd5
Update esp-protocols
The commit was amended for PR review into espressif's repo. Next
time I'll make a branch to PR to them from.
2023-10-06 09:54:55 -07:00
Taiki Komoda 0dfafe2a4b wip 2023-10-06 23:17:36 +09:00
Scott Shawcroft 4d2bc35d40
Re-enable rgbmatrix on IDF 5.1 2023-10-05 14:56:11 -07:00
Dan Halbert 58db1722da Merge branch 'v1.20-merge' of https://github.com/dhalbert/circuitpython into v1.20-merge 2023-10-05 14:50:41 -04:00
Dan Halbert 06765ccfa6 RP2040 now builds 2023-10-05 14:49:49 -04:00
Scott Shawcroft 18c03a74dd
Fix a few tests
* Re-enable a couple FATFS configurations we added.
* Remove MICROPY_PY_IO_FILEIO.
* Remove uasyncio from standard unix build.
* Re-add our unicode printing improvements.
2023-10-05 10:59:08 -07:00
Damien George 6f76d1c7fa rp2: Implement time.time_ns with time_us_64 so it has us resolution.
Currently on rp2 the time.time_ns() function has only seconds resolution.
This commit makes it have microsecond resolution, by using the output of
time_us_64() instead of the RTC.

Tested that it does not drift from the RTC over long periods of time.

Signed-off-by: Damien George <damien.p.george@gmail.com>
2023-10-05 21:24:47 +11:00
Damien George c2e9a6f2a5 esp8266/boards/ESP8266_GENERIC: Remove urllib from the 2MiB manifest.
No other network-enabled board has urllib.urequest frozen in to the
firmware, and esp8266 is relatively low on flash, so remove this module.

And (u)requests is already included by bundle-networking.

Signed-off-by: Damien George <damien@micropython.org>
2023-10-05 20:55:52 +11:00
Glenn Moloney f0f173ff5c esp32/boards/manifest.py: Freeze aioespnow into firmware by default.
Also remove corresponding commented line from esp8266/boards/manifest.py.
It doesn't have enough flash to have this frozen by default.

Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-10-05 20:50:49 +11:00
Angus Gratton d81cf0b9e3 rp2/CMakeLists: Enable debug symbols in all builds.
Allows using gdb, addr2line, etc. on a "release" ELF file.

No impact to .bin or .uf2 size, only the .elf will get bigger.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-10-05 14:08:17 +11:00
iabdalkader 5aec051f9f stm32/i2c: Add support for I2C4 on H7 MCUs.
The current code assumes all I2Cs are on the same peripheral bus, which is
not true for I2C4 and the same goes for the clock enable code.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-10-05 10:26:59 +11:00
Scott Shawcroft 2e6ef78227
Update Metro S3 pin mapping for Rev B 2023-10-04 09:43:41 -07:00
Luca Burelli 1cd61149e4 esp32/boards/ARDUINO_NANO_ESP32: Use Arduino USB IDs.
The IDF-provided version of TinyUSB defaults to Espressif's standard
VID:PID unless specific sdkconfig options are present. The numbers
already defined for the CUSTOM_* config options were ignored otherwise.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2023-10-04 13:06:14 +11:00
Jim Mussared 65a3ce39a3 extmod/modnetwork: Forward if.config(hostname) to network.hostname.
This removes the duplicate code in cyw43, esp32, esp8266 that implements
the same logic as network.hostname.

Renames the `mod_network_hostname` (where we store the hostname value in
`.data`) to `mod_network_hostname_data` to make way for calling the shared
function `mod_network_hostname`.

And uses memcpy for mod_network_hostname_data, because the length of source
is already known and removes reliance on string data being null-terminated.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-04 12:39:51 +11:00
Jim Mussared b329fdcb73 extmod/modnetwork: Increase max hostname length to 32.
This changes from the previous limit of 15 characters.  Although DHCP and
mDNS allow for up to 63, ESP32 and ESP8266 only allow 32, so this seems
like a reasonable limit to enforce across all ports (and avoids wasting the
additional memory).

Also clarifies that `MICROPY_PY_NETWORK_HOSTNAME_MAX_LEN` does not include
the null terminator (which was unclear before).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-04 12:39:23 +11:00
Dan Halbert 7e0e6fcdca Metro M4 now compiles 2023-10-03 15:03:59 -04:00
Dan Halbert 0e96ece01a
Merge pull request #8458 from SiliconLabs/dev_8.2
Change system clock to 78Mhz
2023-10-03 11:21:00 -04:00
Damien George cf490a7091 all: Fix various spelling mistakes found by codespell 2.2.6.
Signed-off-by: Damien George <damien@micropython.org>
2023-10-03 11:24:50 +11:00
iabdalkader 9d5d2e8cf7 renesas-ra: Tune lwip buffers and timing to improve network performance.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-10-03 10:17:51 +11:00
iabdalkader 5c8099003c renesas-ra/boards/ARDUINO_PORTENTA_C33: Update WiFi config.
Changes are:
- Enable IRQ on WiFi data ready pin.
- Fix WiFi SPI clock (an exact 30MHz is not possible).
- Update WiFi pins.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-10-03 10:17:28 +11:00
Scott Shawcroft a15c111d5c
Merge pull request #7718 from microdev1/watchdog-rp
Update WatchDog implementation
2023-10-02 14:17:29 -07:00
Jeff Epler 542d1571bf
Fix getenv test 2023-10-02 08:56:27 -05:00
Jeff Epler 499ea3f0e8
Restore unix Makefile functionality 2023-10-02 07:28:20 -05:00
iabdalkader da193c42f6 ports: Rename Arduino board LED pins to be consistent.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-10-02 11:57:46 +11:00
Wanlin Wang 2772b88f6a rp2/README: Fix name of RPI_PICO_W board.
Signed-off-by: Wanlin Wang <dgideas@outlook.com>
2023-10-02 11:46:38 +11:00
vsfos 1660c78795 unix/main: Fix memory leakage if MICROPY_USE_READLINE is disabled. 2023-10-02 11:44:12 +11:00
robert-hh 4e5611c55a mimxrt/machine_rtc: Improve the RTC init at boot.
By clearing the tamper bits and enabling access to the registers for all
code, just in case that this was set.  It keeps the clock running on
battery and the calibration setting.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-10-02 11:35:00 +11:00
robert-hh 6482eb142c mimxrt/mpbthciport: Allow disabling UART flow control for BLE.
Not all boards or BLE extensions have the flow control signals for BLE
available at suitable pins.  Actually none of the Adafruit extensions
match for flow control.

For consistency with the previous behaviour it is enabled by default.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-10-02 11:31:24 +11:00
robert-hh 51ca23e463 mimxrt/boards: Fix naming of SD-card config option.
Commit 552b0bbe12 did not define
MICROPY_PY_MACHINE_SDCARD properly, and thus building the firmware failed.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-10-02 11:29:53 +11:00
Paint Your Dragon ed4d4a6b43
Merge pull request #8436 from PaintYourDragon/main
RP2040: fix 8-bit WAV playback
2023-09-29 20:39:33 -07:00
Dan Halbert 5327487c1c
Merge pull request #8446 from tannewt/rgbmatrix_memory_fix
Improve RGBMatrix allocation tracking
2023-09-29 22:31:00 -04:00
Scott Shawcroft d179eb4f54
Merge pull request #8371 from bill88t/rpi-auto-disconnect
`stop_station` when no wifi-reconnect
2023-09-29 15:23:56 -07:00
Scott Shawcroft 4c21f22114
Improve RGBMatrix allocation tracking
This prevents leaks but not all use-after-free issues.
2023-09-29 14:55:42 -07:00
Phillip Burgess 2fe0fa5b5c Add output_length_used check as requested 2023-09-29 14:25:54 -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
robert-hh abb44694d8 mimxrt/boards/MIMXRT1176_clock_config: Fix comments about UART clocks.
No functional change, and pretty obvious.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-09-29 23:43:31 +10:00
robert-hh 0701341e7f mimxrt/machine_uart: Set the UART clock to a fixed 40MHz value.
There is a single UART clock for all devices, so switching it for one will
affect all devices used at that time.  This commit fixes that issue by
keeping the clock at a fixed value.

This fixed clock still supports the common baud rates between 300 and
921600 baud.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-09-29 23:43:25 +10:00
iabdalkader 52e3da0a0b mimxrt/mbedtls: Enable certificate validity time validation.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 23:09:48 +10:00
iabdalkader 361ca7d5ee mimxrt/mpbthciport: Enable flow control for BT HCI UART.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 23:09:35 +10:00
iabdalkader 552b0bbe12 mimxrt: Remove SDCARD Makefile config option.
This is option is no longer needed as a Makefile option as the USDHC driver
is enabled for all supported series.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 23:09:14 +10:00
iabdalkader 9d1a1ed42d mimxrt/Makefile: Enable the FSL USDHC for supported MCU series.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 23:08:57 +10:00
iabdalkader 805c750164 mimxrt/mimxrt_sdram: Allow boards to override the default SDRAM config.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 23:08:48 +10:00
iabdalkader 4b9c459133 mimxrt/sdio: Add support for the 117x series.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 23:08:41 +10:00
MakerM0 7aa85353e7
Update mpconfigboard.mk 2023-09-29 16:32:33 +08:00
iabdalkader 6a6a90507d stm32/boards/ARDUINO_GIGA: Update board config.
Changes are:
- Disable internal flash storage and use the external QSPI for storage.
- Disable default bootloader entry mode.  The bootloader entry function
  exists in board_init.c.
- Remove OSC enable/disable macros (this board doesn't have an OSC).

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-29 16:56:06 +10:00
Jim Mussared da6f1e1d1e rp2/msc_disk: Allow configuring the USB MSC inquiry response.
This was previously hard-coded to "Micropy" / "Mass Storage" / "1.0".

Now allow it to be overridden by a board.

Also change "Micropy" to "MicroPy" and "1.0" to "1.00" to match stm32.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 16:36:45 +10:00
Jim Mussared 61f331374d stm32/usbd_msc_interface: Allow configuring the MSC inquiry response.
This was previously hard-coded to "MicroPy" / "pyboard Flash" / "1.00".

Now allow it to be overridden by a board.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 16:35:48 +10:00
dotnfc d7f63f994f esp32/main: Allow a board to override the MicroPython task stack size.
This allows the MicroPython task stack size to be overridden by the
mpconfigboard.h settings.

Signed-off-by: dotnfc <dotnfc@163.com>
2023-09-29 16:14:15 +10:00
Glenn Moloney 6662d84faa esp32/boards: Add bootloader rollback support for all builds.
Add "CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y" to
ports/esp32/boards/sdkconfig.base so that all micropython esp32 images
support OTA rollback in the bootloader.  These images can then be converted
to OTA-capable images as required by user tools.

Also remove CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y from board-specific
sdkconfig files as this is now the default.

Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-09-29 16:00:51 +10:00
MakerM0 79161dbeb2
Update sdkconfig 2023-09-29 13:47:47 +08:00
Felix Dörre 3c2b2f7a4d rp2/modmachine: Fix lightsleep while wifi is powered off.
While cyw43 is deinitialized, an interrupt occurs.  That is handled with
these lines: ports/rp2/mpnetworkport.c#L59-L61 and as pendsv is disabled
while in network code, the poll function then just waits there.

When deinit has finished, the poll func is executed, but skipped:
src/cyw43_ctrl.c#L222-L225 this skips the `CYW43_POST_POLL_HOOK` which
would re-enable interrupts, but also reset `cyw43_has_pending`.

And in that state, the lightsleep code, will skip sleeping as it thinks
there is a network packet pending to be handled.

With this change applied, lightsleep works as expected when the wifi chip
is enabled, and when it's powered off.
2023-09-29 15:15:42 +10:00
Jim Mussared cf32c2feb5 ports: Restrict board.json to standard features.
Applies to newly-added ARDUINO_PORTENTA_C33 and UM_NANOS3.

Makes the list match the standard features defined in
24a6e951ec.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 14:15:02 +10:00
Jim Mussared 79473691f2 {mimxrt,powerpc,samd}/mpconfigport: Don't override parse chunk alloc.
This was copied from minimal/mpconfigport.h, but it doesn't make sense
for general ports.

Add a comment to minimal/mpconfigport.h to explain why it specifically
overrides it.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 14:11:26 +10:00
Seon Rozenblum 77ae0a0948 esp32/boards: Fix VBAT voltage calculation for UM S3 boards.
Signed-off-by: Seon Rozenblum <seon@unexpectedmaker.com>
2023-09-29 14:09:15 +10:00
Angus Gratton 2fcd28f713 py/mkrules.mk: Don't strip binary if STRIP variable is unset.
This provides a way to build a non-DEBUG host binary that still has symbols
and debug information.

Document this for the unix port, and update a comment in the unix port
Makefile.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-29 13:01:12 +10:00
Damien George 03a3af417e esp8266/boards: Make sure modespnow.o is placed in irom0.
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:03:00 +10:00
Jeff Epler 10aeb23789
remove console pins, that was wrong 2023-09-28 17:13:22 -05:00
Dan Halbert 76ff01452b Trinket M0 comes up; still very much wip 2023-09-28 16:22:10 -04:00
Bill Sideris c3cf7c0894
wifi_reset 2023-09-28 17:53:40 +03:00
Damien George 5dbd6fc705 stm32/dma: Remove unbalanced ).
This was added by mistake in 9e0f934cdf

Signed-off-by: Damien George <damien@micropython.org>
2023-09-28 17:31:54 +10:00
Damien George 88564c1406 stm32/uart: Generalise UART source clock calculation for H5 and H7 MCUs.
This gets the calculation working properly for H5 MCUs, and fixes the
switch statement to switch on csel&7 instead of csel&3.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-28 17:30:38 +10:00
Damien George 82b4ab7576 stm32/boards: Move includes to after defines in all hal_conf.h files.
The include of HAL headers should come after the HAL configuration defines,
so that the headers can see whether the defines were made or not, to
provide defaults and configure various things.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-28 17:30:38 +10:00
Rene Straub 08c661c930 stm32/dac: Add STM32H5 DAC support, with dma_nohal implementation.
Integrate DAC support for STM32H5.  Implement STM32H5 GPDMA driver. The DMA
driver is largely different from other STM32 variants.  To support the DAC
circular mode, memory based linked list DMA descriptors are used.

Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-28 17:11:37 +10:00
Jeff Epler a9fce6c495
qualia: fixes for revision C
* neopixel removed, could not share function with DBLTAP
 * external SPI bus definition is settled
2023-09-27 18:13:21 -05:00
Jeff Epler aa0d7aad83
Merge pull request #8440 from jepler/dotclock-overscan-rotation
Dotclock: fix overscan and rotation
2023-09-27 18:07:50 -05:00
Jeff Epler c1a98e460a
Merge pull request #8439 from tannewt/fix_for_make_quirk
Tweak for make quirk
2023-09-27 18:05:43 -05:00
Jeff Epler f80d08e207
Make dot clock displays with a masked portion on the left work 2023-09-27 15:15:32 -05:00
Scott Shawcroft 3684640ada
Merge pull request #8430 from jepler/dotclock-enhancements
Dotclock enhancements
2023-09-27 11:39:37 -07:00
Scott Shawcroft ad837d44ed
Tweak for make quirk 2023-09-27 09:17:07 -07:00
Rene Straub 72ef2e6291 stm32/machine_adc: Fix and improve STM32H5 support.
Changes are:
- Run ADC on PCLK/16.
- Verify and optimize timings (ADC_STAB_DELAY_US, ADC_SAMPLETIME_DEFAULT).
- Add support for STM32H5 VBAT and COREVDD channels on ADC2.
- Replace ADC constants in machine_adc_locals_dict_table.
- Convert STM32 literal to channel numbers in adc_config_channel with
  corresponding STM32 LL library functions (__LL_ADC_IS_CHANNEL_INTERNAL(),
  __LL_ADC_CHANNEL_TO_DECIMAL_NB()).

Reasoning for the second last point: the STM32 driver literals are uint32_t
that don't work with MP_ROM_INT() which handles signed 31 bit integers
only.  Introduce enumerator machine_adc_internal_ch_t to define external
channels (0..19), internal channels (256..) and the special channel VREF
(0xffff).  Values are converted to STM32 literals with adc_ll_channel()
when required in adc_config_and_read_u16().

Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27 16:58:10 +10:00
Rene Straub 64d24fccd6 stm32/adc: Optimize sampling time for G4, H5, L4 and WB MCUs.
Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27 16:28:31 +10:00
Rene Straub 8f9bba0a1a stm32/adc: Add support for STM32H5 ADC2 inputs.
Select ADC instance based on pin information to support ADC2 inputs.
Display ADC instance number similar to machine_adc (STM32H5 only):
<ADC2 on Pin(Pin.cpu.F14, mode=Pin.ANALOG) channel=6>

Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27 16:28:15 +10:00
Rene Straub 13cc280eae stm32/adc: Fix STM32H5 support.
Fixed the preliminary STM32H5 ADC support for pyb.ADC:
- Run ADC on PCLK/16.
- Use STM32 ADC library channel literals (__HAL_ADC_DECIMAL_NB_TO_CHANNEL).
- Use correct temperature conversion for H5 (30C, 130C calibration points).

Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27 16:26:30 +10:00
Phillip Burgess 54322578d2 RP2040: fix 8-bit WAV "audio buffer too small" bug
Also subtly fixed 8- to 16-bit scaling math
2023-09-26 16:44:19 -07:00
Scott Shawcroft 3fdfb9bd32
Update ADC and I2S APIs for 5.1
This fixes ESP32 because the BufferedIn used the old ADC API and
I2S did too indirectly.

Fixes #8429
2023-09-26 16:06:54 -07:00
Jeff Epler 3d3061f6f7
fix qualia board definition 2023-09-26 08:33:27 -05:00
Jeff Epler 1c2362b758
bump qualia psram to 120MHz 2023-09-26 08:33:10 -05:00
Jeff Epler 3af5cbc312
bump ram to 120MHz 2023-09-26 07:49:00 -05:00
Jeff Epler 03141d40af
espressif: i2c: initialize "has_lock"
Otherwise, a stack-constructed i2c instance might get some other value
here.
2023-09-26 07:48:59 -05:00
Jeff Epler 747b6e8d2e
enable LCD_RGB_RESTART_IN_VSYNC
this "should" turn permanent tearing into temporary tearing.
2023-09-25 16:39:38 -05:00
Jeff Epler 6263f6af84
Switch to i2c init string for espressif lcd ev, expose values via board 2023-09-25 16:39:00 -05:00
Jeff Epler 65310ab615
update io expander table for rev C 2023-09-25 12:00:04 -05:00
Jeff Epler ce22edba15
On Qualia, define board.TFT_IO_EXPANDER
these arguments make it easier to call ioexpander_send_init_sequence
2023-09-25 11:33:01 -05:00
MicroDev 27fd60d739
implement suggested changes
- update the docs
- split out common `watchdog_reset`
- revert to using `None` instead of `WatchDogMode.NONE`
2023-09-24 15:23:38 +00:00
MakerM0 761ac3b363
Update pins.c 2023-09-24 22:40:08 +08:00
MakerM0 6acce76181
Update pins.c 2023-09-24 22:35:31 +08:00
MakerM0 9284d25ad4
Update pins.c 2023-09-24 22:28:48 +08:00
MakerM0 e197493537
Update mpconfigboard.mk 2023-09-24 22:24:24 +08:00
MakerM0 1143d3e33a
Update mpconfigboard.h 2023-09-24 22:23:56 +08:00
MakerM0 ca4ecf043e
Update board.c 2023-09-24 22:23:12 +08:00
MakerM0 71e165b1fc
Update pins.c 2023-09-24 22:22:48 +08:00
MakerM0 918f93fc2c
Update mpconfigboard.mk 2023-09-24 22:08:00 +08:00
MakerM0 3913adf7fb
Update sdkconfig 2023-09-24 22:06:38 +08:00
MakerM0 c35839afc5
Update board.c 2023-09-24 22:05:34 +08:00
MakerM0 0507e7a00d
Update mpconfigboard.mk 2023-09-24 21:50:30 +08:00
MakerM0 5ffb7e7c83
Update mpconfigboard.mk 2023-09-24 21:38:30 +08:00
MakerM0 ab8e119510
Update sdkconfig 2023-09-24 21:17:39 +08:00
MakerM0 9ab8822c59
Update pins.c 2023-09-24 21:17:25 +08:00
MakerM0 6f77f0f163
Update mpconfigboard.h 2023-09-24 21:17:11 +08:00
MakerM0 6d7a08bcdc
Update board.c 2023-09-24 21:16:58 +08:00
MakerM0 12f35d1a0f
Update mpconfigboard.mk 2023-09-24 21:16:41 +08:00
MakerM0 a5ae99a5b6
Update mpconfigboard.mk 2023-09-24 21:12:49 +08:00
MakerM0 9d90680521
Add board def for MagiClick S3
The board is related here: https://github.com/MakerM0/MagiClick-esp32s3

VID&PID can be found here: https://github.com/espressif/usb-pids
2023-09-24 20:48:30 +08:00
MicroDev 05812e0618
Merge branch 'main' into watchdog-rp 2023-09-24 05:13:22 +00:00
Scott Shawcroft c726e87344
Enable BLE on H2 devkit 2023-09-22 15:05:20 -07:00
Jeff Epler fb6f4c938c
tweak coverage build configuration 2023-09-22 14:26:51 -05:00
Jeff Epler d1ee906afd
fix dependency on generated header 2023-09-22 14:14:07 -05:00
Jeff Epler 2cc07aef73
dummy RUN_BACKGROUND_TASKS for unix port 2023-09-22 13:39:08 -05:00
Jeff Epler 87feeab922
fix ringbuf differences 2023-09-22 13:38:56 -05:00
Scott Shawcroft faa445e347
Three more board fixes 2023-09-22 10:03:20 -07:00
Scott Shawcroft 1480d70d17
Fix builds
* Disable bleio on C3 with 4MB flash.
* Fix gpio include path in board.c's that use it.
2023-09-22 10:03:20 -07:00
Scott Shawcroft 16d1dc2be0
Update all target sdkconfig 2023-09-22 10:03:20 -07:00
Scott Shawcroft 6649b17fb5
H2 works 2023-09-22 10:03:20 -07:00
Scott Shawcroft 39192cc896
C6 works 2023-09-22 10:02:35 -07:00
Scott Shawcroft 7bad82a219
C6 compiles, runs but wifi crashes 2023-09-22 10:02:35 -07:00
Scott Shawcroft e22eefabd7
First stab at 5.1 update 2023-09-22 10:02:30 -07:00
Scott Shawcroft d6b284ebb0
Merge pull request #8411 from tannewt/update-idf
Update to ESP-IDF 5.0
2023-09-22 09:45:35 -07:00
Jeff Epler e1fffe67a0
split heap doesn't build yet so don't test it 2023-09-22 10:40:34 -05:00
Jeff Epler 4902b76129
guard this file against being included twice 2023-09-22 10:40:21 -05:00
Luca Burelli dd58be19ee esp32: Fix Partition.writeblocks() partial write corruption.
To simulate a partial erase, the code reads a native block, erases it,
and writes back the data before and after the erased area. However, the
current logic was filling the area after the erased block with data
from the beginning of the native block-aligned data, instead of applying
the proper offset.

Fixes #12474.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2023-09-21 17:49:48 +02:00
Scott Shawcroft 8f3c6422ee
Fix MDNS after the user turns off wifi
We need to reset our MDNS state instead of just the IDF's.
2023-09-20 14:46:42 -07:00
Scott Shawcroft d4000023d8
Fix board def mistakes and cast 2023-09-20 11:45:45 -07:00
Jeff Epler e7668ed91d
spelling 2023-09-20 11:23:34 -05:00
Jeff Epler 2b754b1f6b
spelling 2023-09-20 11:23:28 -05:00
Damien George a3862e7267 stm32/powerctrlboot: Allow PLL1 Q and R outputs to be enabled on H5.
If a board needs these outputs then it can define MICROPY_HW_CLK_PLLQ/R.

It saves power to not enable them if they are not needed.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-20 18:56:52 +10:00
Dan Halbert 4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Dan Halbert 2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Dan Halbert 931a6adb81 fix CPU on Monster M4SK; turn off audiobusio by default on SAMD51G 2023-09-18 21:28:00 -04:00
Dan Halbert 9e9dff4bf2
Merge pull request #8400 from jepler/update-rgbmatrix-docs
rgbmatrix: more small doc improvements
2023-09-18 18:31:39 -04:00
Scott Shawcroft e39fbf1b26
Merge pull request #8401 from jepler/i2c-expander-init
Fast(ish) special purpose bitbang spi over i2c
2023-09-18 13:19:49 -07:00
Scott Shawcroft c86b3ae19f
Update to merged idf changes 2023-09-18 11:18:04 -07:00
Jeff Epler faa6887050
Use faster bus & remove final delay
this pushes the LCD initialization down to about 1.3s.
2023-09-18 13:00:18 -05:00
Jeff Epler 67e15bb6a2
makerfabs_tft7: rename properties to match docs 2023-09-18 10:35:49 -05:00
Jeff Epler 75ba82cdb0
lcd_ev: add timings; rename TFT -> TFT_PINS 2023-09-18 10:35:36 -05:00
Jeff Epler 4c682262e6
lcd_ev: fix compile error 2023-09-18 10:35:05 -05:00
IhorNehrutsa 00930b213e esp32/mphalport: Add function/line/file info to check_esp_err exception.
Currently, check_esp_err() raises an exception without a location in the
source code, eg:

    Traceback (most recent call last):
      File "<stdin>", line 8, in <module>
    OSError: (-258, 'ESP_ERR_INVALID_ARG')

This commit allows additional error reporting (function, line and file) to
be enabled via detailed exceptions.  Change the error reporting config to

    #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)

and then exception messages from IDF errors look like:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: (-258, "0x0102 ESP_ERR_INVALID_ARG in function 'set_duty_u16'
    at line 342 in file './machine_pwm.c'")

Signed-off-by: Ihor Nehrutsa <IhorNehrutsa@gmail.com>
2023-09-18 11:26:43 +10:00
Scott Shawcroft 0547ef61f9
Update dotclock for IDF 5.0 2023-09-15 14:43:37 -07:00
Jeff Epler 2a78d16b54
add board.DISPLAY 2023-09-15 14:49:29 -05:00
Jeff Epler 68af5543af
set up display at reset (yayay!) 2023-09-15 14:46:28 -05:00
Jeff Epler cff65bbbe2
esp32 lcd ev: fix pin assignments 2023-09-15 14:10:32 -05:00
iabdalkader 5473200aab rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Use standard HCI UART baudrate.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:48:20 +10:00
iabdalkader 9ea9e04ef6 rp2/mpconfigport: Disable BLE locking when MICROPY_PY_BLUETOOTH enabled.
Bluetooth code runs in the scheduler, so no locking/mutex is required.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:44:07 +10:00
iabdalkader 1976781d33 rp2/mpbthciport: Fix HCI UART config.
Fixes are:
- The baudrate argument is a keyword arg, it was passed before as a
  positional arg.
- Use the port and baudrate arguments passed from higher level code instead
  of the hard-coded port ID and baudrate, which would allow HCI drivers to
  change baudrates.
- Increase UART char timeout and RX buffer size.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:43:15 +10:00
iabdalkader 6abe3e1714 rp2/mpbthciport: Switch to static scheduler nodes.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 16:42:50 +10:00
iabdalkader 7087880ce9 esp32/machine_pin: Fix null pointer access in machine_pin_find.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 13:44:50 +10:00
Wind-stormger 970e61c8b4 Update bpi_leaf_s3 2023-09-15 02:20:46 +00:00
Scott Shawcroft 4087960dfd
Fix MDNS. C3 works 2023-09-14 15:04:07 -07:00
Scott Shawcroft 952118f6c3
Update new boards. Reduce memory use in S2 2023-09-14 11:19:38 -07:00
Jeff Epler b61900f881
fixup! matrixportal_m4: Add board.MTX_ADDRESS and board.MTX_COMMON 2023-09-14 10:38:01 -05:00
Jeff Epler 9710ef0200
matrixportal_m4: Add board.MTX_ADDRESS and board.MTX_COMMON
This eases using the RGBMatrix constructor and matches the Matrixportal
S3.
2023-09-14 10:27:03 -05:00
iabdalkader 7802eed14b renesas-ra/boards/ARDUINO_PORTENTA_C33: Add support for Portenta C33.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15 00:10:47 +10:00
iabdalkader abd9bed667 renesas-ra/fsp_cfg: Add common FSP config files.
Add DAC, SCE and USB FSP config files.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:51:30 +10:00
iabdalkader 31ff3ff3aa renesas-ra: Add mbedTLS support.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:51:20 +10:00
iabdalkader 62e650f2c2 renesas-ra: Add networking support using lwIP.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:51:18 +10:00
iabdalkader 142e8b70e2 renesas-ra: Add RNG driver.
It needs to be enabled explicitly by a board.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:50:47 +10:00
iabdalkader 5b774517dc renesas-ra: Add Bluetooth support using NimBLE.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:50:47 +10:00
iabdalkader d89a0606e0 renesas-ra: Add TinyUSB support.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:50:45 +10:00
iabdalkader 816b88ad07 mimxrt/Makefile: Update to work with latest TinyUSB.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:35:54 +10:00
iabdalkader 09a2ee8e7f renesas-ra/Makefile: Generate binary firmware output.
This patch generates a binary firmware image (*.bin) and removes the split
TEXT1/0_ADDR/SECTIONS because it's not configured for this port so it
generates broken binaries.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14 23:34:18 +10:00
Scott Shawcroft a3d37122a7
Fix PSRAM address 2023-09-13 11:40:09 -07:00
Scott Shawcroft f357f4a3af
Size optimize 3 more boards 2023-09-13 11:40:09 -07:00
Scott Shawcroft 99726e255d
Switch to newlib nano 2023-09-13 11:40:09 -07:00
Scott Shawcroft 18fd0045f6
More kconfig updates 2023-09-13 11:40:09 -07:00
Scott Shawcroft 0a9ae1f6ba
Code size optimizations 2023-09-13 11:40:09 -07:00
Scott Shawcroft cb6b4d0d4a
Fix esp-camera. 32 was dropped so the path doesn't have esp32 in it. 2023-09-13 11:40:09 -07:00
Scott Shawcroft 5937f4c0c0
Hopefully finish updating kconfig 2023-09-13 11:40:09 -07:00
Scott Shawcroft 2a45d95f9d
Use correct flash defaults 2023-09-13 11:40:09 -07:00
Scott Shawcroft 4b29862d30
Clean up more s2 sdkconfig 2023-09-13 11:40:08 -07:00
Scott Shawcroft 1ab083fab7
Support target specific kconfig source 2023-09-13 11:39:51 -07:00