Commit Graph

34600 Commits

Author SHA1 Message Date
Yuuki NAGAO 141750ff79 stm32/uart: Fix UART timeout issue with low baudrate on G4 MCUs.
With using UART FIFO, the timeout should be long enough that FIFO becomes
empty.  Since previous data transfer may be ongoing, the timeout must be
timeout_char multiplied by FIFO size + 1.

Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
2023-09-01 13:52:00 +10:00
Bob Abeles 66b3eccaf6 8334: RP2040 lacks raw memory map access 2023-08-31 20:25:20 -07:00
Oliver Joos a175f98a65 stm32/mboot: Fix fwupdate by replacing zlib with new deflate module.
Since commit 3533924c36 the zlib module has
been replaced by the new deflate module.  This commit updates the script
fwupdate.py to use the new deflate module.

Signed-off-by: Oliver Joos <oliver.joos@hispeed.ch>
2023-09-01 12:39:06 +10:00
Jim Mussared 32db4c58f7 extmod/moddeflate: Change default window size.
The primary purpose of this commit is to make decompress default to
wbits=15 when the format is gzip (or auto format with gzip detected). The
idea is that someone decompressing a gzip stream should be able to use the
default `deflate.DeflateIO(f)` and it will "just work" for any input
stream, even though it uses a lot of memory.

This is done by making uzlib report gzip files as having wbits set to 15
in their header (where it previously only set the wbits out parameter for
zlib files), and then fixing up the logic in `deflateio_init_read`.

Updates the documentation to match.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-01 12:23:37 +10:00
Jeff Epler 5f12e0f9b8
Revert mistaken change 2023-08-31 14:53:31 -05:00
Jeff Epler 554f529fdf
Per review notes, make esp_lcd and esp32-camera unconditional 2023-08-31 14:52:54 -05:00
Jeff Epler 80a1d1a20a
Add support for a non-displayed left portion of screen 2023-08-31 14:52:26 -05:00
Jeff Epler 5c23e28208
add explanation for newer compression features 2023-08-31 13:27:16 -05:00
Melissa LeBlanc-Williams 06ccd41294
Remove frozen libs from Funhouse 2023-08-31 13:15:51 -05:00
robert-hh 81c19d93bc mimxrt/machine_uart: Support slow baud rates for UART.
Down to 50 baud (in reverence to Jean-Maurice-Émile Baudot).  Implemented
for the MIMXRT10xx MCU's only.  The MIMXRT1176 runs down to 300 baud.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-09-01 00:41:23 +10:00
robert-hh c86b9ec8bd mimxrt/boards: Fix use of MICROPY_HW_SDRAM_AVAIL in MIMXRT1176.ld.
MICROPY_HW_SDRAM_AVAIL is always defined.

Thanks to Ibrahim Abdakader for noticing.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-09-01 00:40:44 +10:00
robert-hh ce38784fa8 mimxrt/machine_uart: Fix and complete UART.deinit and uart_deinit_all.
The code did not check at deinit whether a UART was initialized.  That did
not matter for all MCU's except MIMXRT1176, which crashes at the second
soft reset in a row.

But since it is a general problem to use UART methods of a UART which has
been deinitialized, checks were added to all applicable methods for a clear
response instead of e.g. a crash.

Deinitialize UART using software reset.  It resets the UART but keeps it
accessible for software, avoiding an exception when UART registers are
accessed after a DeInit.

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-09-01 00:27:13 +10:00
iabdalkader 3f5976e14a mimxrt/irq: Move all IRQ related definitions to dedicated header.
Following other ports, IRQ priorities and related functions are moved to
their own header, to simplify mpconfigport.h.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-01 00:02:19 +10:00
iabdalkader a453b4f31d drivers/cyw43: Make the CYW43 Bluetooth HCI driver more portable.
This commit allows other ports to reuse the CYW43 HCI driver, by replacing
all Bluetooth UART and control named pins with defines in config files and
using `mpbthci` abstract functions (i.e. `mp_bluetooth_hci_*`) instead of
the STM32 specific UART functions.

Note: the function `cywbt_wait_cts_low` does not need to switch the CTS
pin from alternate function to GPIO to read it.  At least on stm32, mimxrt
it's possible to just read the pin input.  For example, see the STM32F7
RM0410 section 6.3.11, and the `SION` for IMXRT.  So this function can
also be available for other ports if the pin mode switching is removed.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-01 00:02:00 +10:00
iabdalkader fc495240a6 mimxrt: Integrate Bluetooth support with NimBLE bindings.
This commit adds the necessary functions to get NimBLE working with the
mimxrt port.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-08-31 23:42:10 +10:00
iabdalkader 772a36098f mimxrt: Integrate support for WiFi via the CYW43 driver.
This commit adds the necessary configuration and hooks to get the CYW43
driver working with the mimxrt port.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-08-31 23:40:49 +10:00
iabdalkader 46d83d9748 mimxrt/sdio: Add SDIO driver.
This is a basic SDIO driver for the mimxrt port, that was added mainly to
support the CYW43 WiFi driver, and as such it only supports the commands
required by the CYW43 driver (but more commands can be added easily). The
driver performs non-blocking DMA transfers, and can detect and recover from
errors.

Note: because the mimxrt port is missing static alternate functions, named
pins and other pin related functions, currently the alternate functions for
USDHC 1 and 2 are hard-coded in the driver.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-08-31 23:39:34 +10:00
iabdalkader 6b407d5600 mimxrt/machine_pin: Extend pin configuration functions.
Add portable pin config macros to mphalport.h.  And add a function to
configure pins with more pin options such as alt function, pull, speed,
drive, interrupt mode, etc.

Note: this new `machine_pin_config()` function can replace
`machine_pin_set_mode()`, but the latter is left as-is to avoid breaking
anything.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-08-31 23:36:20 +10:00
Tirtharaj Sinha da3dfd7b5a added new board - esp32 s3 pico 2023-08-31 04:15:25 +05:30
Jeff Epler 1ef4e3c738
Add Adafruit TFT Experiment (rev A)
There will be a revision but get the basics in for now.

This successfully displays on a TL040HDS20-B1502A screen with:
```
import board
from framebufferio import FramebufferDisplay
from dotclockframebuffer import DotClockFramebuffer
from displayio import release_displays

tft_pins = board.TFT
tft_timings = {
    "frequency": 6_500_000,
    "width": 720,
    "height": 720,
    "hsync_pulse_width": 20,
    "hsync_front_porch": 40,
    "hsync_back_porch": 40,
    "vsync_pulse_width": 10,
    "vsync_front_porch": 40,
    "vsync_back_porch": 40,
    "hsync_idle_low": False,
    "vsync_idle_low": False,
    "de_idle_high": False,
    "pclk_active_high": False,
    "pclk_idle_high": False,
}

release_displays()
fb = DotClockFramebuffer(**tft_pins, **tft_timings)
disp = FramebufferDisplay(fb)
```
2023-08-30 15:05:07 -05:00
Scott Shawcroft 000d22f250
Merge pull request #8336 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2023-08-30 10:13:35 -07:00
Jeff Epler 7dbf9a9b56
fix vprintf_adapter build error 2023-08-30 11:34:01 -05:00
Jeff Epler 9dcc0b5056
fix those pesky pid/vid duplicates 2023-08-30 10:58:52 -05:00
Jeff Epler 227fa8cfc0
add a link to the faq about this 2023-08-30 10:54:43 -05:00
Jeff Epler fb15c7ca51
Fix timings table & remove redundant comment 2023-08-30 10:50:16 -05:00
Jeff Epler 9e0993af5b
Add espressif esp32s3 lcd devkit
This is not working/tested. The display requires an initialization sequence,
and its SPI bus is on the other side of an I2C GPIO expander making things
more difficult.
2023-08-30 10:31:47 -05:00
Jeff Epler 494aee62b3
Add makerfabs 7" 800x480 TFT
this is working, though it has to be down-clocked to 6.5MHz to prevent
display glitching
2023-08-30 10:30:54 -05:00
Jeff Epler ed9cacf41d
Add DotClockFramebuffer 2023-08-30 10:30:15 -05:00
Jeff Epler 17015b48ad
translations don't always use unicode code points now 2023-08-30 10:09:50 -05:00
Damien George 313068a5b3 extmod/modssl_mbedtls: Clear sock member if error creating SSLSocket.
Otherwise if/when the finaliser runs for this newly created SSLSocket the
mbedtls state will be freed again.

Signed-off-by: Damien George <damien@micropython.org>
2023-08-30 13:52:31 +10:00
Jim Mussared f3eccb154c py/mpconfig: Enable SSL finalizers if finalizers are enabled.
The rp2 port was enabling SSL and had finalizers enabled via the "extra
features" level, but missed explicitly enabling `MICROPY_PY_SSL_FINALISER`
(like esp32, stm32, and mimxrt did).

This commit makes `MICROPY_PY_SSL_FINALISER` default to enabled if
finalizers are enabled, and removes the explicit setting of this for
esp32, stm32, mimxrt (because they all use the "extra features" level).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-30 12:38:13 +10:00
Jim Mussared b2b5bcce28 py/profile: Remove the requirement to disable MICROPY_COMP_CONST.
The only reason that const had to be disabled was to make the test output
match CPython when const was involved.  Instead, this commit fixes the test
to handle the lines where const is used.

Also:
- remove the special handling for MICROPY_PERSISTENT_CODE_SAVE in
  unix/mpconfigport.h, and make this automatic.
- move the check for MICROPY_PERSISTENT_CODE_SAVE to where it's used (like
  we do for other similar checks) and add a comment explaining it.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-30 10:58:04 +10:00
Jim Mussared 4a3fdc0e76 tests/misc/sys_settrace_features.py: Fix to run on newer CPython.
This test was failing on CPython 3.11 as it now emits `0` as the line
number for the "call" event corresponding to import, where as in 3.6 it had
`1` as the line number.

We maintain the old behavior, but in order to make this test pass on both
CPython versions, the trace handler now converts the `0` to a `1`.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-30 10:57:37 +10:00
Scott Shawcroft 337b800ceb
Merge pull request #7151 from fonix232/feature/waveshare_rp2040_plus_support
feat: Add support for Waveshare RP2040-Plus
2023-08-29 13:00:37 -07:00
Hosted Weblate 39cbd040d0
Merge remote-tracking branch 'origin/main' 2023-08-29 22:00:07 +02:00
Scott Shawcroft 66bd679a64
Merge pull request #8323 from RetiredWizard/dvbaseW
Pimoroni PICO DV Base w/Pico W (network disabled)
2023-08-29 12:59:11 -07:00
Scott Shawcroft 7c62de35dc
Merge pull request #8335 from BJap/zlib-decompress-bug
Fix gzip Decompression Support
2023-08-29 12:58:09 -07:00
Hosted Weblate 144f900a97
Merge remote-tracking branch 'origin/main' 2023-08-29 21:08:13 +02:00
Scott Shawcroft 60a0a3dc76
Merge pull request #8346 from bill88t/no_dotfiles_on_nonusb
Disable dotfiles on boards without native usb
2023-08-29 11:56:53 -07:00
Scott Shawcroft b08b8876f9
Update tools/ci_check_duplicate_usb_vid_pid.py
Co-authored-by: RetiredWizard <github@retiredwizard.com>
2023-08-29 11:38:12 -07:00
Hosted Weblate 518e656527
Merge remote-tracking branch 'origin/main' 2023-08-29 20:34:40 +02:00
hexthat a76be7cfa5
Translated using Weblate (Chinese (Pinyin))
Currently translated at 100.0% (1000 of 1000 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2023-08-29 20:34:40 +02:00
Jonny Bergdahl 0d75bee3cf
Translated using Weblate (Swedish)
Currently translated at 100.0% (1000 of 1000 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2023-08-29 20:34:39 +02:00
Wellington Terumi Uemura b1504f79b7
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1000 of 1000 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2023-08-29 20:34:39 +02:00
Scott Shawcroft b81c0e2924
Merge pull request #8344 from jepler/repl-py
add support for "repl.py"
2023-08-29 11:20:13 -07:00
Scott Shawcroft f4dba86f1c
Merge remote-tracking branch 'adafruit/main' into update_tinyusb_abort 2023-08-29 11:11:36 -07:00
Bill Sideris f204b17164
Disable dotfiles on boards without native usb 2023-08-29 17:23:17 +03:00
Bobby Jap ae181d69af Update wrappers to use new gzip changes 2023-08-28 21:59:00 -07:00
Scott Shawcroft 9daccc08c5
Forbidden pins are now correctly "in use" on ESP
This removes duplicate code to make debug UART pins in use via
never reset. It is done through forbidden pins automatically now.

Fixes #8288
2023-08-28 15:55:14 -07:00
Hosted Weblate b1be15cd81
Merge remote-tracking branch 'origin/main' 2023-08-28 21:56:43 +02:00