summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-30docs/library/machine.Pin.rst: Add Pin.ANALOG mode constant.Scott Armitage
2021-11-30docs/library/machine.Timer.rst: Document `period` and `callback` args.Michael Buesch
Signed-off-by: Michael Buesch <m@bues.ch>
2021-11-30docs/library/machine.SPI.rst: Add example SPI usage.Michael Buesch
Signed-off-by: Michael Buesch <m@bues.ch>
2021-11-30docs/library/machine.Timer.rst: Document 'id' as positional-only arg.Michael Buesch
Signed-off-by: Michael Buesch <m@bues.ch>
2021-11-30docs/library/uasyncio.rst: Detail exception behaviour in cancel/timeout.Peter Hinch
2021-11-30stm32/boards/make-pins.py: Use cpu pins to define static alt-fun macros.Damien George
Instead of board pins, so that pins which have only the CPU specified in pins.csv can still be used with mp_hal_pin_config_alt_static(). Signed-off-by: Damien George <damien@micropython.org>
2021-11-30stm32: Include HAL MMC code in F4 builds.Damien George
So that the MMC driver can be used on F4 MCUs. Signed-off-by: Damien George <damien@micropython.org>
2021-11-30stm32: Add support for F479 MCUs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-11-29stm32/boards: Convert F413,F439,H743,L4xx,WB55 to new flash FS config.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-11-29stm32/flashbdev: Support generic flash storage config via link symbols.Damien George
A board can now define the following linker symbols to configure its flash storage layout: _micropy_hw_internal_flash_storage_start _micropy_hw_internal_flash_storage_end _micropy_hw_internal_flash_storage_ram_cache_start _micropy_hw_internal_flash_storage_ram_cache_end And optionally have a second flash segment by configuring MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE_SEGMENT2 to 1 and defining: _micropy_hw_internal_flash_storage2_start _micropy_hw_internal_flash_storage2_end Signed-off-by: Damien George <damien@micropython.org>
2021-11-26lib: Update pico-sdk to 1.3.0 and tinyusb to 0.12.0.iabdalkader
Fixes #8025
2021-11-26esp32/boards/GENERIC_S3: Enable BLE on ESP32 S3.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-25docs/esp8266/tutorial: Fix comments of FrameBuffer examples.gibbonsc
The third and fourth parameters in display.rect() and display.fill_rect() are not x,y coordinates, but are instead width,height values. Update the comment after the example to show the correct x,y coordinates of the bottom right corner of each rectangle, respectively.
2021-11-25stm32/boards/NUCLEO_WB55: Update rfcore_firmwre for new WS.David Michieli
Adds a fix to behavior occuring since WS 1.11 where the FUS returns misleading statuses during WS upgrade.
2021-11-25py/objfun.h: Remove obsolete comments about entries in extra_args.Damien George
These two entries were removed in 049a7a81531a67e068d926ad50260578fb79f94c Signed-off-by: Damien George <damien@micropython.org>
2021-11-25tests/cpydiff: Clarify f-string diffs regarding concatenation.Jim Mussared
Concatenation of any literals (including f-strings) should be avoided. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-25py/lexer: Support nested [] and {} characters within f-string params.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-11-25stm32/usb: Use a table of allowed values to simplify usb_mode get/set.Damien George
This reduces code size and code duplication, and fixes `pyb.usb_mode()` so that it now returns the correct string when in multi-VCP mode (before, it would return None when in one of these modes). Signed-off-by: Damien George <damien@micropython.org>
2021-11-25stm32/boards/NADHAT_PYBF405: Rename board to GARATRONIC_NADHAT_F405.Frédéric Pierson
To add the manufacturer as a prefix to the board name, for consistency with other Garatronic boards.
2021-11-25stm32/boards: Add PYBSTICK26 F411 board definition.Frédéric Pierson
2021-11-25rp2/boards: Add PYBSTICK26 RP2040 board definition.Frédéric Pierson
2021-11-24mimxrt: Support PWM using the FLEXPWM and QTMR modules.robert-hh
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the duty cycle. The basic API is supported as documentated, except that keyword parameters are accepted for both the instatiaton and the PWM.init() call. Extensions: support PWM for channel pairs. Channel pairs are declared by supplying 2-element tuples for the pins. The two channels of a pair must be the A/B channel of a FLEXPWM module. These form than a complementary pair. Additional supported keyword arguments: - center=value Defines the center position of a pulse within the pulse cycle. The align keyword is actually shortcut for center. - sync=True|False: If set to True, the channels will be synchronized to a submodule 0 channel, which has already to be enabled. - align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized channels are Center-Aligned or Edge-aligned. The channels must be either complementary a channel pair or a group of synchronized channels. It may as well be applied to a single channel, but withiout any benefit. - invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the first pin, bit 1 the second. - deadtime=time_ns time of complementary channels for delaying the rising slope. - xor=0|1|2 xor causes the output of channel A and B to be xored. If applied to a X channel, it shows the value oif A ^ B. If applied to an A or B channel, both channel show the xored signal for xor=1. For xor=2, the xored signal is split between channels A and B. See also the Reference Manual, chapter about double pulses. The behavior of xor=2 can also be achieved using the center method for locating a pulse within a clock period. The output is enabled for board pins only. CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal will not be routed to the output. That applies only to FLEXPWM pins. The use of QTMR pins which are not board pins will be rejected. As part of this commit, the _WFE() statement is removed from ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-11-22tools/autobuild: Automatically build all stm32 boards.Damien George
Any board with a board.json file will be built. Additional variants for certain pyboards will also be built by the explicit build-stm32-extra.sh script. Both .dfu and .hex files will be made available. Also build boards in a sorted order, and don't stop building if a single board fails. Signed-off-by: Damien George <damien@micropython.org>
2021-11-22stm32/boards: Build NUCLEO_WB55 and STM32F769DISC without mboot enabled.Damien George
This is to make the builds for all nucleo/discovery boards uniform, so they can be treated the same by the auto build scripts. The CI script is updated to explicitly enable mboot and packing, to test these features. Signed-off-by: Damien George <damien@micropython.org>
2021-11-22py/runtime: Allow types to use both .attr and .locals_dict.Laurens Valk
Make it possible to proceed to a regular lookup in locals_dict if the custom type->attr fails. This allows type->attr to extend rather than completely replace the lookup in locals_dict. This is useful for custom builtin classes that have mostly regular methods but just a few special attributes/properties. This way, type->attr needs to deal with the special cases only and the default lookup will be used for generic methods. Signed-off-by: Laurens Valk <laurens@pybricks.com>
2021-11-22stm32/dma: Make DMA2_Stream3 exclusive to SDIO when CYW43 enabled.Damien George
This prevents SPI4/5 from being used if SDIO and CYW43 are enabled, because the DMA for the SDIO is used on an IRQ and must be exclusivly available for use by the SDIO peripheral. Signed-off-by: Damien George <damien@micropython.org>
2021-11-22stm32/sdio: Don't explicitly disable DMA2 on deinit of SDIO.Damien George
Because DMA2 may be in use by other peripherals, eg SPI1. On PYBD-SF6 it's possible to trigger a bug in the existing code by turning on WLAN and connecting to an AP, pinging the IP address from a PC and running the following code on the PYBD: def spi_test(s): while 1: s.write('test') s.read(4) spi_test(machine.SPI(1,100000000)) This will eventually fail with `OSError: [Errno 110] ETIMEDOUT` because DMA2 was turned off by the CYW43 driver during the SPI1 transfer. This commit fixes the bug by removing the code that explicitly disables DMA2. Instead DMA2 will be automatically disabled after an inactivity timeout, see commit a96afae90f6e5d693173382561d06e583b0b5fa5 Signed-off-by: Damien George <damien@micropython.org>
2021-11-22stm32/main: Run optional frozen module at boot.Peter Boin
If a board specifies a filename via MICROPY_BOARD_FROZEN_BOOT_FILE then that will be run on start up, before the usual boot.py.
2021-11-19py/modsys: Replace non-ASCII quote char with ASCII char.Damien George
The source code should stay 7-bit ASCII clean. Signed-off-by: Damien George <damien@micropython.org>
2021-11-19py/showbc: Print unary-op string when dumping bytecode.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-11-19stm32/boards: Add new board MikroElektronika Quail, and F427 support.Lorenzo Cappelletti
Quail (https://www.mikroe.com/quail, PID: MIKROE-1793) is based on an STM32F427VI CPU, featuring 2048 kB of Flash memory and 192 kB of RAM. An on-board Cypress S25FL164K adds 8 MB of SPI Flash. Quail has 4 mikroBUS(TM) sockets for Mikroe click(TM) board connectivity, along with 24 screw terminals for connecting additional electronics and two USB ports (one for programming, the other for external mass storage). 4 UARTs, 2 SPIs and 1 I2C bus are available for communication. Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>
2021-11-19stm32/boards/MIKROE_CLICKER2_STM32: Add more detail to board.json.Lorenzo Cappelletti
Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>
2021-11-19nrf/main: Use VFS helper function to mount fs and chdir.iabdalkader
2021-11-19extmod/network_ninaw10: Fix scan list order to match other NICs.iabdalkader
2021-11-19drivers/ninaw10: Fix BSSID byte order, and add null byte to ESSID.iabdalkader
- Fix the BSSID byte order from scan and netinfo. - Make sure ESSID from netinfo is null terminated.
2021-11-19drivers/neopixel: Avoid heap alloc in fill().Jim Mussared
Previously the use of `range(start,stop,step)` caused an allocation. Replace with while loop. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-19rp2/boards/PIMORONI_PICOLIPO_16MB: Fix 16MB flash size.Mike Causer
Was incorrectly added as 7MB for an 8MB SPI flash, but this board has a 16MB chip, not 8MB, so it should be 15MB leaving 1MB for MicroPython. Thanks to @robert-hh
2021-11-19docs/library/sys.rst: Add docs for sys.settrace.NitiKaur
2021-11-19docs/rp2/quickref.rst: Add section on PIO.NitiKaur
2021-11-19docs/reference/filesystem.rst: Add detail on how to use littlefs fuse.Damien George
Without the --block_count option the fuse will fail. Signed-off-by: Damien George <damien@micropython.org>
2021-11-19esp32: Add SDCard support for S3, and a GENERIC_S3_SPIRAM board.Seon Rozenblum
Also add support for GPIO 47 and 48 on S3 boards.
2021-11-19docs/library/rp2.rst: Update function asm_pio_encode to add sideset_opt.oli
2021-11-19rp2/rp2_pio: Support exec with sideset.oli
The rp2.StateMachine.exec errors when supplying a sideset action. This commit passes the sideset_opt from the StateMachine though to the parser. It also adds some value validation to the sideset operator. Additionally, the "word" method is added to the exec to allow any other unsupported opcodes. Fixes issue #7924.
2021-11-19samd/README.md: Update README to reflect new features and boards.Peter van der Burg
2021-11-19samd/boards/SEEED_XIAO: Add new board definition.Peter van der Burg
2021-11-19samd/boards/SEEED_WIO_TERMINAL: Add new board definition.Peter van der Burg
2021-11-19samd/boards/SAMD21_XPLAINED_PRO: Update for flash and pins.Peter van der Burg
- mpconfigboard.h: flash and USART config - mpconfigboard.mk: enable LFS1 - pins.c: define pins and LEDs - pins.h: define structs and consts
2021-11-19samd/boards/ADAFRUIT_TRINKET_M0: Update for flash and pins.Peter van der Burg
- mpconfigboard.h: flash and USART config - mpconfigboard.mk: enable LFS1 - pins.c: define pins and LEDs - pins.h: define structs and consts
2021-11-19samd/boards/MINISAM_M4: Update for flash and pins.Peter van der Burg
- mpconfigboard.h: flash and USART config - mpconfigboard.mk: enable LFS1 - pins.c: define pins and LEDs - pins.h: define structs and consts
2021-11-19samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS: Update for flash and pins.Peter van der Burg
- mpconfigboard.h: flash and USART config - mpconfigboard.mk: enable LFS1 - pins.c: define pins and LEDs - pins.h: define structs and consts