From d541b461c9f248bdf6e30cbf91745dd033274f48 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 11 Feb 2020 15:13:42 +0100 Subject: [PATCH] Disable restricted uart peripheral for NRF52840 While testing it has been found that all tests are skipped in the FPGA uart test on the NRF52840 target. This is caused by the following change: https://github.com/ARMmbed/mbed-os/pull/12379 - Add STDIO UART as restricted for FPGA testing for all targets NRF targets have MUXed pins and mainly do not provide pin-maps. There are only dummy pin-maps for testing. These pin-maps hold only pins and do not specify the peripheral or function of the pin (always 0). Because of that if we restrict STDIO uart peripheral (0) all FPGA uart test cases will be skipped. To fix this we will remove this restriction for NRF52840. Restriction for testing the USBTX, USBRX pins is sufficient in this case. --- .../TARGET_NRF52/TARGET_MCU_NRF52840/PeripheralPins.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/PeripheralPins.c b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/PeripheralPins.c index 1c1a8a6e98..335aff4550 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/PeripheralPins.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/PeripheralPins.c @@ -303,3 +303,14 @@ const PinMap PinMap_QSPI_testing[] = { {NC, NC, 0} }; + +/* On NRF we have just dummy pin-maps for testing (no peripherals are specified). + Disable restriction for STDIO uart peripheral. */ +const PeripheralList *pinmap_uart_restricted_peripherals() +{ + static const PeripheralList peripheral_list = { + 0, + 0 + }; + return &peripheral_list; +}