Add support for listing all the pins of one or more form factors.
This is in preparation for automated testing of the default form
factor.
This patch includes the following:
-A function to get a list of restricted pins which should not be
used for testing due to some caveat.
-The target config "default-form-factor" which can specify which form
factor should be tested
-Form factor information for the arduino form factor
Add 2 new pinmap utility functions:
-pinmap_find_peripheral_pins
-pinmap_list_has_pin
Also add the new type PinList which contains a list of pins allowing
for NC and duplicate entries.
Add the functions qspi_master_sclk_pinmap, qspi_master_ssel_pinmap and
qspi_master_data0_pinmap-qspi_master_data3_pinmap to all targets with
qspi support.
Internally in sleep tracing `debug` was used for trace prints, but
all sleep API's are ISR safe and used in interrupts. This resulted in
hardfaults / errors.
Solution is to use `mbed_error_printf` instead for printing on UART
Critical section count/state variables are synchronised by IRQ disabling and
critical section calls themselves, so do not need to be volatile.
This eliminates a couple of unnecessary reads of the counter variable.
The DEVICE_FOO macros are always defined (either 0 or 1).
This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
targets.json was not specifying the same macro name as the code was
checking for, so setting was ineffective.
Making this work tripped up not-supported checks in ARMv8-M - rather than deal
with making this work, support it instead.
Both ARMv7-M and ARMv8-M slightly reduce code size and runtime impact if
mpu-rom-end is 0x1fffffff, using one fewer region.
This means default setup for ARMv8-M now requires 5 regions, with
mpu-rom-end set to default 0x0fffffff, but this can be put back to 4 by
changing the setting.
As we build for a specific CPU, a runtime check for number of MPU
regions in release builds is not worthwhile. Make it an assert only.
Saves a little space in develop images, a lot in release.
Switch to higher-level calls and macros, and fix an error in the ARMv8-M
version - "inner" attributes were not being set correctly due to a
copy/paste error - "outer" was being set twice.
This means RAM would have been marked WTRA rather than WBWA for the
inner cache.
Slightly reduces ARMv7-M init code size by feeding region number
into RBAR instead of using RNR.
Update the LowPowerTickerWrapper class to handle rather than ignore
early low power ticker interrupts. This ensures that devices don't get
stuck in sleep due to a ignored early low power ticker interrupt.
Make the following changes:
-Allow a vector specific ARM MPU driver by defining MBED_MPU_CUSTOM
-Allow ROM address to be configured for ARMv7-M devices by
setting the define MBED_MPU_ROM_END
-Add ROM write protection
-Add new functions and lock
-enable at boot
-disable during flash programming
Create a dedicated MPU directory for standard Arm MPU implementations
in preparation for the Arm v8m MPU. Replace MBED_MPU_ENABLED with
DEVICE_MPU to align with the porting layer of other HAL APIs.
Update the LowPowerTickerWrapper class logic to stop using its internal
Timeout object for scheduling LP ticker interrupts after the wrapper has
been suspended.
Fixes#8278