summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-29tests/float/math_domain.py: Tweak test to also pass with obj-repr-C.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29tests/extmod/ssl_cadata.py: Skip test on axtls.Damien George
The axtls bindings don't support this. Signed-off-by: Damien George <damien@micropython.org>
2023-09-29tests/extmod/deflate_decompress.py: Skip test when not enough memory.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29tests/float/float_format_ints.py: Put power-of-10 test in separate file.Damien George
This test doesn't pass on builds with 30-bit floats (object repr C). Signed-off-by: Damien George <damien@micropython.org>
2023-09-29tests/stress/bytecode_limit.py: Reverse order of cases.Jim Mussared
The PYBD_SF2 is right on the limit of being able to run this test and so it succeeds the first two cases and fails the next two with MemoryError. This causes it to SKIP, but that only works if it's the first thing printed. So reverse the order of the tests so it fails on the biggest one first. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-28stm32/dma: Remove unbalanced ).Damien George
This was added by mistake in 9e0f934cdf195ca8d06ce51eb89f89e590984176 Signed-off-by: Damien George <damien@micropython.org>
2023-09-28stm32/uart: Generalise UART source clock calculation for H5 and H7 MCUs.Damien George
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-28stm32/boards: Move includes to after defines in all hal_conf.h files.Damien George
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-28stm32/dac: Add STM32H5 DAC support, with dma_nohal implementation.Rene Straub
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-27stm32/machine_adc: Fix and improve STM32H5 support.Rene Straub
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-27stm32/adc: Optimize sampling time for G4, H5, L4 and WB MCUs.Rene Straub
Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27stm32/adc: Add support for STM32H5 ADC2 inputs.Rene Straub
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-27stm32/adc: Fix STM32H5 support.Rene Straub
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-21esp32: Fix Partition.writeblocks() partial write corruption.Luca Burelli
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-20stm32/powerctrlboot: Allow PLL1 Q and R outputs to be enabled on H5.Damien George
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-20py/nlrx64: Mark nlr_push() as naked function when possible.Angus Gratton
Supported from GCC 8 and up, and Compiler Explorer suggests it works as expected with Clang since 3.6 (2014). - Fixes situation where building embedded MicroPython with -O0 and MICROPY_NLR_X64 crashes at runtime (due to nlr_push pushing the frame pointer register EBP). Closes #12421. - Allows removing the macOS tweak to undo pushing EBP onto the stack in the generated function prelude. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-18esp32/mphalport: Add function/line/file info to check_esp_err exception.IhorNehrutsa
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-18tools/autobuild: Include .bin firmware in renesas-ra build output.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-18docs/conf.py: Add sphinxcontrib.jquery to extensions.Damien George
This is needed by recent versions of sphinx-rtd-theme. Signed-off-by: Damien George <damien@micropython.org>
2023-09-15rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Use standard HCI UART baudrate.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15drivers/ninaw10/nina_bt_hci: Make some minor fixes to HCI driver.iabdalkader
Fixes are: - Reset the module first before changing GPIO1 direction. - Skip spurious bytes received after reset. - Use HCI UART ID and baudrate when reinitializing UART. - Disable all printf output which causes unit-tests to fail. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15rp2/mpconfigport: Disable BLE locking when MICROPY_PY_BLUETOOTH enabled.iabdalkader
Bluetooth code runs in the scheduler, so no locking/mutex is required. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15rp2/mpbthciport: Fix HCI UART config.iabdalkader
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-15rp2/mpbthciport: Switch to static scheduler nodes.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15esp32/machine_pin: Fix null pointer access in machine_pin_find.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15docs/library/gc: Clarify mem_alloc and mem_free only for Python heap.Angus Gratton
As raised in discussions of the ESP32 memory management changes. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15docs/library/esp32: Update ESP32 idf_heap_info docs to match behaviour.Angus Gratton
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15py/gc: Add "max new split" value in result of gc.mem_free().Angus Gratton
Follow-up to 519c24dd487 when MICROPY_GC_SPLIT_HEAP_AUTO is enabled, based on discussion at https://github.com/orgs/micropython/discussions/12316#discussioncomment-6858007 gc.mem_free() is always a heuristic, but this makes it a more useful heuristic for common use cases. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-15tools/ci.sh: Add ARDUINO_PORTENTA_C33 to RA CI build.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-15renesas-ra/boards/ARDUINO_PORTENTA_C33: Add support for Portenta C33.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra/fsp_cfg: Add common FSP config files.iabdalkader
Add DAC, SCE and USB FSP config files. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14extmod/network_esp_hosted: Add ESP-Hosted networking interface.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14drivers/esp-hosted: Add host driver for ESP-Hosted firmware.iabdalkader
This is a host driver for ESP32 chips running the esp-hosted firmware, which turns ESP32s into a WLAN/BT co-processor. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14lib/protobuf-c: Add protobuf-c library.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra: Add mbedTLS support.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra: Add networking support using lwIP.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra: Add RNG driver.iabdalkader
It needs to be enabled explicitly by a board. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra: Add Bluetooth support using NimBLE.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra: Add TinyUSB support.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14mimxrt/Makefile: Update to work with latest TinyUSB.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14lib/tinyusb: Update to the most recent master.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14shared/tinyusb: Support HS endpoint sizes.iabdalkader
Set buffer and endpoint sizes to 512 if the device is configured as a High Speed device. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2023-09-14renesas-ra/Makefile: Generate binary firmware output.iabdalkader
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-14py/persistentcode: Always close reader even if an exception is raised.Damien George
Fixes issue #3874. Signed-off-by: Damien George <damien@micropython.org>
2023-09-14py/parse: Always free lexer even if an exception is raised.Damien George
Fixes issue #3843. Signed-off-by: Damien George <damien@micropython.org>
2023-09-14py/runtime: Add helpers to call a general function on nlr jump callback.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-13stm32/uart: Add support for UART10 when it's a USART.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-13stm32/timer: Fix use of TIM8 on H5 MCU's.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-13stm32/powerctrlboot: Allow using PLL3 for USB clock on H5 MCU's.Damien George
A board should enable MICROPY_HW_CLK_USE_PLL3_FOR_USB to use this feature. Signed-off-by: Damien George <damien@micropython.org>
2023-09-13stm32/octospi: Add support for dual-line SPI interface.Damien George
And fix the case of 32-bit addresses in single-line mode. Signed-off-by: Damien George <damien@micropython.org>