The following changes are made:
- Use software SPI for external SPI flash access when building mboot.
- Enable the mboot filesystem-loading feature, with FAT FS support.
- Increase the frequency of the CPU when in mboot to 96MHz, to increase the
speed of SPI flash accesses and programming.
Signed-off-by: Damien George <damien@micropython.org>
This allows a board to modify initial_r0 if needed.
Also make default board behaviour functions always available, named as
mboot_get_reset_mode_default and mboot_state_change_default.
Signed-off-by: Damien George <damien@micropython.org>
For ports with MICROPY_VFS and MICROPY_PY_IO enabled their configuration
can now be simplified to use the defaults for mp_import_stat and
mp_builtin_open.
This commit makes no functional change, except for the following minor
points:
- the built-in "open" is removed from the minimal port (it previously did
nothing)
- the duplicate built-in "input" is removed from the esp32 port
- qemu-arm now delegates to VFS import/open
Signed-off-by: Damien George <damien@micropython.org>
This reverts commit 2668337f36.
The issue with potential breaking of the BLE RX path in the radio is fixed
since WS v1.12.0.
Signed-off-by: Damien George <damien@micropython.org>
This replaces occurences of
foo_t *foo = m_new_obj(foo_t);
foo->base.type = &foo_type;
with
foo_t *foo = mp_obj_malloc(foo_t, &foo_type);
Excludes any places where base is a sub-field or when new0/memset is used.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit adds a board definition for NUCLEO_G0B1RE. This board has the
REPL on UART2 which is connected to the on-board ST-link USB-UART.
Signed-off-by: Asensio Lorenzo Sempere <asensio.aerospace@gmail.com>
This implements self-triggering of the Flash NVIC interrupt on Cortex-M0
devices, which allows enabling internal storage on those MCUs.
Signed-off-by: Asensio Lorenzo Sempere <asensio.aerospace@gmail.com>
These files that are reformatted only now fall under the list of files to
apply uncrustify/black formatting to.
Signed-off-by: Damien George <damien@micropython.org>
To avoid any I/O glitches in mp_hal_pin_config, make sure a valid alternate
function is set in AFR first before switching the pin mode. When switching
from AF to INPUT or OUTPUT, the AF in AFR will remain valid up until the
pin mode is switched.
- Add board-level configuration option to set the SMPS supply mode.
- Wait for valid voltage levels after configuring the SMPS mode.
- Wait for external supply ready flag if SMPS supplies external circuitry.
All user interface (LED, button) code has been moved to ui.c, and the
interface to this code with the rest of the system now goes through calls
to mboot_state_change(). This state-change function can be overridden by a
board to fully customise the user interface behaviour.
Signed-off-by: Damien George <damien@micropython.org>
This is enabled at MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES, which is the
default for stm32. Not setting the value in mpconfigboard.h allows boards
to optionally configure it.
Signed-off-by: Damien George <damien@micropython.org>
The CAN.initfilterbanks() class method is removed, and its functionality is
replaced with the "num_filter_banks" keyword argument to the CAN
constructor and CAN.init(). This configures the filter bank split.
This new approach provides more flexibility configuring the resources used
by a given CAN instance, allowing other MCUs like H7 to fit the API. It
also brings CAN closer to how other machine peripherals are configured,
where everything is done in the constructor/init method.
This is a breaking change to the CAN API.
CAN.recv() now returns a 5-tuple, with the new element in the second
position being a boolean, True if the ID is extended.
This is a breaking change of the API for CAN.recv().
A CAN bus can have mixed classic/FD nodes. Prior to this patch the CAN API
could be configured for either standard or extended ID, but not both/mixed
operation.
This patch allows extended IDs to be filtered and enabled on a per-message
basis, in send(), setfilter() and clearfilter().
This is a breaking change to the API: init() no longer accepts the extframe
keyword argument.