summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-31stm32/powerctrl: Write bootloader-state as 64-bit word to work on H7.Damien George
H7 MCUs have ECC and writes do not go through to SRAM until 64-bits have been written (on another location is written). So use 64-bit writes for the bootloader-state variable so it is committed before the system reset. As part of this change, the lower byte of the bootloader address in BL_STATE must now be the magic number 0x5a5 for the state to be valid (previously this was 0x000 which is not as robust). Signed-off-by: Damien George <damien@micropython.org>
2022-01-31stm32/powerctrlboot: Set HAL uwTickPrio variable when needed.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-31stm32/usbd_conf: Set lpm_enable and battery_charging_enable on all MCUs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-27stm32/fdcan: Fix naming with regards to G4 series.Herwin Grobben
2022-01-27stm32/fdcan: Fix FIFO1 usage and handling of error interrupts.Herwin Grobben
The original code used a independent state with regards to the interrupt. During heavy bus error conditions the internal state could become out-of-sync with the interrupts. Further explanation: during the development of an application using CAN communication, a interrupt-run-away was found in some situations. It was found that the error interrupt triggered (Warning, Passive or Bus-Off, all triggered it) the run-away. The only recovery was a reset. Two problems were found: - the error interrupt is enabled but not cleared in the interrupt routine; - an internal variable 'State' that was used to track the message received state (empty, new, full, overflow) that was not directly related to interrupt that indicated the state. In this commit these issues are fixed by adding more values for the interrupt reason (warning, passive, bus off) and clearing the error interrupts, and making the internal state directly dependent on the interrupt state for received messages. Furthermore, introducing the FIFO1 in the CAN receive stage, another issue existed. Even if the messages are received into the FIFO1 (by selecting message filtering for FIFO0 and FIFO1), the interrupt firing was indicating FIFO0 Rx. The configuration of the interrupts for this is now also fixed. The CAN peripheral has 2 interrupt lines going into the NVIC controller. The assignment of the interrupt reasons to these 2 interrupt lines was missing. Now the reception of FIFO1 messages triggers the second interrupt line. Other interrupts (Rx FIFO0 and bus error) are assigned to the first interrupt line. Tested on a Nucleo-G474, and also checked the HAL function to work with the H7 family.
2022-01-27stm32/dac: Deinit all DACs on soft reset.iabdalkader
DAC timed functions continue to run after a soft reset cycle, using collected memory in the case of write_timed.
2022-01-27mimxrt: Simplify Makefile in selection of flash type.robert-hh
Simplify it a little bit by combining two sections regarding the flash type. Thanks to @alphaFred for suggesting it.
2022-01-27mimxrt: Add support for the Olimex RT1010 board.robert-hh
The board.json file is intentionally excluded, until the board will be sold. But including it into the mimxrt series make it easier to keep the build up-to-date.
2022-01-27mimxrt: Add USB ID elements.robert-hh
- Manufacturer, set by MICROPY_HW_USB_STR_MANUF; default "MicroPython" - Board name, as set by MICROPY_HW_BOARD_NAME - Unique-ID, same as returned by machine.unique_id() - USB Vendor ID, as set by MICROPY_HW_USB_VID; default 0xf055 - USB Product ID, as set by MICROPY_HW_USB_PID; default 0x9802
2022-01-27mimxrt: Allow to select cs0 or cs1 for SPI.robert-hh
Using the keyword argument cs=nnn in the constructor. The cs1 pin has to be defined in mpconfigboard.h. Note: Only a few boards have the CS1 pin exposed to the connectors.
2022-01-27mimxrt: Replace Pin-config constants by a function call.robert-hh
The Pin config setting by IOMUXC_SetPinConfig() is supplied by a bit pattern. That pattern is specific for a MCU family. In preparation for supporting the MIMXRT117x family, the constant bit pattern is replaced by a function call, such that the bit pattern is created at a single place. The code for this functions was taken from machine_pin.c. Note: A working port for the MIMXRT1176 exists already.
2022-01-27mimxrt: Remove two files from the Seeed Arch Mix directory.robert-hh
These were leftovers from a previous refactoring in the Seeed Arch Mix directory.
2022-01-27mimxrt: Compensate for a bug in the fsl_lpspi.c file.robert-hh
This library file has a bug, in that TransferBlocking returns before the transfer has finished. That is a problem if a write follows immediately a read.
2022-01-27mimxrt: Allow for board-specific flash driver files.robert-hh
If in a board's mkconfigboard.mk the following symbol is set: MICROPY_HW_BOARD_FLASH_FILES = 1 then the files: ($BOARD)_flexspi_flash_config.h and qspi_nor_flash_config.c and/or qspi_hyper_flash_config.c are expected in the board directory. Otherwise the common files from the hal directory are used.
2022-01-27mimxrt: Support gaps in the SPI an I2C device numbers.robert-hh
That allows also to use e.g. SPI1 and SPI2 instead SPI0 and SPI1.
2022-01-27esp32/partitions: Increase size of app-part from 0x180000 to 0x1F0000.Damien George
To fill out all of the available flash up to the start of the filesystem partition. Signed-off-by: Damien George <damien@micropython.org>
2022-01-27stm32/pin: Change remaining uses of "af" to "alt".Damien George
The keyword "af" has been deprecated for some time and "alt" should be used instead (but "af" still works). Signed-off-by: Damien George <damien@micropython.org>
2022-01-23windows: Add micropython.schedule support.Andrew Leech
2022-01-23docs/differences: Update python_36 now that b2a_base64 accepts newline.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-23extmod/modubinascii: Add newline keyword to b2a_base64 function.Christian Decker
This allows encoding things (eg a Basic-Auth header for a request) without slicing the \n from the string, which allocates additional memory. Co-authored-by: David Lechner <david@lechnology.com>
2022-01-23docs/differences: Update differences now that math.tau/inf/nan exist.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-23tools/ci: Test math constants with MICROPY_OBJ_REPR_D.stijn
2022-01-23py/modmath: Add math.tau, math.nan and math.inf constants.stijn
Configurable by the new MICROPY_PY_MATH_CONSTANTS option.
2022-01-23github/workflows: Show context for qemu-arm test failures.stijn
Make it easier to see what went wrong in CI builds.
2022-01-23all: Fix MICROPY_OBJ_REPR_D compilation with msvc.stijn
2022-01-23windows/README.md: Fix broken mingw link.Jos Verlinde
2022-01-22esp32/boards: Provide custom deploy_c3.md for ESP32-C3 boards.ubi de feo
This fixes the flash address for installation on ESP32-C3.
2022-01-22esp32/main: Use heap_caps_get_info on IDF <4.1 to compute total heap.Damien George
heap_caps_get_total_size() is only available in IDF 4.1 and above. Signed-off-by: Damien George <damien@micropython.org>
2022-01-22esp32/modnetwork: Fix test for WIFI_AUTH_MAX for IDF v4.3.0.marcidy
Signed-off-by: marcidy <marcidy@gmail.com>
2022-01-22esp32/README.md: Fix URL for esp-idf installation.Sean Coates
The current URL points to a pinned version of the document (v4.0.2) and is currently not found (404).
2022-01-22esp32/main: Allocate at most 1/2 of available IDF heap for MP heap.Damien George
So that there is some memory left for the OS, eg for ssl buffers. See issue #7214. Signed-off-by: Damien George <damien@micropython.org>
2022-01-22esp32/esp32_rmt: Call rmt_driver_install directly if running on core 1.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-22esp32: Pin MicroPython to core 1 again.jason
This follows up on #5489, where we changed the esp32 core pinning to core 0 in order to work around an issue with IDF < 4.2.0. Now that IDF > 4.2.0 is available, we allow pinning back to core 1, which eliminates some problematic callback latency with WiFi enabled. NimBLE is also pinned to core 1 - the same core as MicroPython - when using IDF >=4.2.
2022-01-21esp32/machine_adcblock: Add new machine.ADCBlock class and update ADC.Jonathan Hogg
Rework the ADC implementation to follow the improved ADC/ADCBlock API. This adds support for calibrated voltage readings and the ADC2 block. The ADC API is backwards compatible with what it was before this change. Resolves #6219.
2022-01-21docs/esp32: Document expanded ADC API in quickref.Jonathan Hogg
Document read_u16(), read_uv() and ADCBlock(). Mark old read(), atten() and width() methods as legacy.
2022-01-21docs/library: Specify additional ADC methods and new ADCBlock class.Damien George
The new ADC methods are: init(), read_uv() and block(). The new ADCBlock class has methods: init() and connect(). See related discussions in #3943, #4213. Signed-off-by: Damien George <damien@micropython.org>
2022-01-21extmod/machine_i2c: Increase default SoftI2C timeout to 50ms.Damien George
Some devices, eg BNO055, can stretch SCL for a long time, so make the default large to accommodate them. 50ms matches the current default for stm32 hardware I2C . Signed-off-by: Damien George <damien@micropython.org>
2022-01-21rp2/machine_i2c: Use soft I2C only for len=0, and increase timeout.Damien George
The RP2040 I2C hardware can do writes of length 1 and 2, just not of length 0. So only use software I2C for writes of length 0, to improve performance. Also increase the software I2C timeout for zero-length writes to accommodate the behaviour of a wider range of I2C devices. Fixes issue #8167. Signed-off-by: Damien George <damien@micropython.org>
2022-01-21rp2/machine_uart: Add machine.UART init/deinit methods.iabdalkader
Without these methods a lot of existing "portable" scripts are broken. This change improves portability by making rp2 machine.UART more compliant with the documented machine UART interface.
2022-01-21extmod/modusocket: Support additional args to getaddrinfo.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-01-21drivers/ninaw10: Return standard error numbers.iabdalkader
2022-01-21extmod/modusocket: Create new sockets in blocking mode.iabdalkader
To conform with CPython and other MicroPython ports.
2022-01-21tests/multi_net/udp_data.py: Allow reusing port before bind.iabdalkader
2022-01-21tests/multi_net: Close accepted sockets when tests are done.iabdalkader
gc_sweep_all() cleans up sockets via the finaliser, but tests should cleanly free resources they use.
2022-01-21extmod/modusocket: Add makefile() method and common socket options.iabdalkader
2022-01-21extmod/modusocket: Make setsockopt return if NIC is not connected.iabdalkader
2022-01-21drivers/ninaw10: Fix timeout handling to match modusocket.iabdalkader
2022-01-21extmod/network_ninaw10: Implement MP_STREAM_POLL in ioctl.iabdalkader
There is currently no function to query if the socket is writable.
2022-01-21drivers/ninaw10: Add function to check socket state/data availability.iabdalkader
2022-01-20rp2/mphalport: Add optional dupterm support.iabdalkader