From 281cc2e178fd9a470d844b3afdea9eb322a0b0e8 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Fri, 24 Jan 2020 11:39:10 +0100 Subject: [PATCH] nrfx 2.1.0 release --- CHANGELOG.md | 33 + LICENSE | 2 +- doc/drv_supp_matrix.dox | 3 +- doc/main_page.dox | 4 +- doc/nrf5340.dox | 4 + doc/nrfx.doxyfile | 5 +- doc/nrfx_api.dox | 2 + drivers/include/nrf_bitmask.h | 2 +- drivers/include/nrfx_adc.h | 2 +- drivers/include/nrfx_clock.h | 199 +- drivers/include/nrfx_comp.h | 2 +- drivers/include/nrfx_dppi.h | 2 +- drivers/include/nrfx_egu.h | 2 +- drivers/include/nrfx_gpiote.h | 2 +- drivers/include/nrfx_i2s.h | 53 +- drivers/include/nrfx_ipc.h | 2 +- drivers/include/nrfx_lpcomp.h | 4 +- drivers/include/nrfx_nfct.h | 2 +- drivers/include/nrfx_nvmc.h | 2 +- drivers/include/nrfx_pdm.h | 49 +- drivers/include/nrfx_power.h | 48 +- drivers/include/nrfx_power_clock.h | 2 +- drivers/include/nrfx_power_compat.h | 106 + drivers/include/nrfx_ppi.h | 2 +- drivers/include/nrfx_pwm.h | 30 +- drivers/include/nrfx_qdec.h | 2 +- drivers/include/nrfx_qspi.h | 32 +- drivers/include/nrfx_rng.h | 2 +- drivers/include/nrfx_rtc.h | 2 +- drivers/include/nrfx_saadc.h | 2 +- drivers/include/nrfx_spi.h | 4 +- drivers/include/nrfx_spim.h | 6 +- drivers/include/nrfx_spis.h | 2 +- drivers/include/nrfx_systick.h | 2 +- drivers/include/nrfx_temp.h | 2 +- drivers/include/nrfx_timer.h | 2 +- drivers/include/nrfx_twi.h | 7 +- drivers/include/nrfx_twi_twim.h | 2 +- drivers/include/nrfx_twim.h | 20 +- drivers/include/nrfx_twis.h | 2 +- drivers/include/nrfx_uart.h | 2 +- drivers/include/nrfx_uarte.h | 2 +- drivers/include/nrfx_usbd.h | 2 +- drivers/include/nrfx_usbreg.h | 151 + drivers/include/nrfx_wdt.h | 6 +- drivers/nrfx_common.h | 2 +- drivers/nrfx_errors.h | 2 +- drivers/src/nrfx_adc.c | 2 +- drivers/src/nrfx_clock.c | 237 +- drivers/src/nrfx_comp.c | 2 +- drivers/src/nrfx_dppi.c | 2 +- drivers/src/nrfx_egu.c | 2 +- drivers/src/nrfx_gpiote.c | 283 +- drivers/src/nrfx_i2s.c | 16 +- drivers/src/nrfx_ipc.c | 2 +- drivers/src/nrfx_lpcomp.c | 2 +- drivers/src/nrfx_nfct.c | 2 +- drivers/src/nrfx_nvmc.c | 23 +- drivers/src/nrfx_pdm.c | 63 +- drivers/src/nrfx_power.c | 35 +- drivers/src/nrfx_ppi.c | 2 +- drivers/src/nrfx_pwm.c | 34 +- drivers/src/nrfx_qdec.c | 8 +- drivers/src/nrfx_qspi.c | 46 +- drivers/src/nrfx_rng.c | 2 +- drivers/src/nrfx_rtc.c | 2 +- drivers/src/nrfx_saadc.c | 275 +- drivers/src/nrfx_spi.c | 2 +- drivers/src/nrfx_spim.c | 39 +- drivers/src/nrfx_spis.c | 2 +- drivers/src/nrfx_systick.c | 2 +- drivers/src/nrfx_temp.c | 2 +- drivers/src/nrfx_timer.c | 2 +- drivers/src/nrfx_twi.c | 62 +- drivers/src/nrfx_twi_twim.c | 2 +- drivers/src/nrfx_twim.c | 193 +- drivers/src/nrfx_twis.c | 2 +- drivers/src/nrfx_uart.c | 2 +- drivers/src/nrfx_uarte.c | 61 +- drivers/src/nrfx_usbd.c | 78 +- drivers/src/nrfx_usbd_errata.h | 92 +- drivers/src/nrfx_usbreg.c | 97 + drivers/src/nrfx_wdt.c | 2 +- drivers/src/prs/nrfx_prs.c | 2 +- drivers/src/prs/nrfx_prs.h | 8 +- hal/nrf_aar.h | 2 +- hal/nrf_acl.h | 2 +- hal/nrf_adc.h | 2 +- hal/nrf_bprot.h | 5 +- hal/nrf_cache.h | 11 +- hal/nrf_ccm.h | 22 +- hal/nrf_clock.h | 627 +- hal/nrf_comp.h | 2 +- hal/nrf_dcnf.h | 200 + hal/nrf_dppi.h | 2 +- hal/nrf_ecb.h | 2 +- hal/nrf_egu.h | 2 +- hal/nrf_ficr.h | 2 +- hal/nrf_fpu.h | 2 +- hal/nrf_gpio.h | 80 +- hal/nrf_gpiote.h | 2 +- hal/nrf_i2s.h | 79 +- hal/nrf_ipc.h | 2 +- hal/nrf_kmu.h | 2 +- hal/nrf_lpcomp.h | 2 +- hal/nrf_mpu.h | 5 +- hal/nrf_mutex.h | 2 +- hal/nrf_mwu.h | 2 +- hal/nrf_nfct.h | 2 +- hal/nrf_nvmc.h | 20 +- hal/nrf_oscillators.h | 121 + hal/nrf_pdm.h | 83 +- hal/nrf_power.h | 93 +- hal/nrf_ppi.h | 2 +- hal/nrf_pwm.h | 4 +- hal/nrf_qdec.h | 2 +- hal/nrf_qspi.h | 206 +- hal/nrf_radio.h | 10 +- hal/nrf_regulators.h | 247 +- hal/nrf_reset.h | 2 +- hal/nrf_rng.h | 2 +- hal/nrf_rtc.h | 2 +- hal/nrf_saadc.h | 22 +- hal/nrf_spi.h | 2 +- hal/nrf_spim.h | 11 +- hal/nrf_spis.h | 2 +- hal/nrf_spu.h | 2 +- hal/nrf_systick.h | 2 +- hal/nrf_temp.h | 2 +- hal/nrf_timer.h | 2 +- hal/nrf_twi.h | 2 +- hal/nrf_twim.h | 25 +- hal/nrf_twis.h | 2 +- hal/nrf_uart.h | 2 +- hal/nrf_uarte.h | 2 +- hal/nrf_usbd.h | 11 +- hal/nrf_usbreg.h | 173 + hal/nrf_vmc.h | 2 +- hal/nrf_vreqctrl.h | 87 + hal/nrf_wdt.h | 6 +- helpers/nrfx_gppi.h | 2 +- mdk/arm_startup_nrf5340_application.s | 28 +- mdk/gcc_startup_nrf51.S | 2 +- mdk/gcc_startup_nrf52.S | 2 +- mdk/gcc_startup_nrf52805.S | 2 +- mdk/gcc_startup_nrf52810.S | 2 +- mdk/gcc_startup_nrf52811.S | 2 +- mdk/gcc_startup_nrf52833.S | 2 +- mdk/gcc_startup_nrf52840.S | 2 +- mdk/gcc_startup_nrf5340_application.S | 22 +- mdk/gcc_startup_nrf5340_network.S | 2 +- mdk/gcc_startup_nrf9160.S | 2 +- mdk/iar_startup_nrf5340_application.s | 40 +- mdk/nrf.h | 16 +- mdk/nrf51.h | 6 +- mdk/nrf51422_erratas.h | 2579 ------ mdk/nrf51422_peripherals.h | 2 + mdk/nrf51801_erratas.h | 635 -- mdk/nrf51801_peripherals.h | 2 + mdk/nrf51802_erratas.h | 635 -- mdk/nrf51802_peripherals.h | 2 + mdk/nrf51822_erratas.h | 2993 ------- mdk/nrf51822_peripherals.h | 2 + mdk/nrf51824_erratas.h | 743 -- mdk/nrf51824_peripherals.h | 2 + mdk/nrf51_erratas.h | 6846 ++++++++------- mdk/nrf51_peripherals.h | 1 + mdk/nrf52.h | 6 +- mdk/nrf52805.h | 6 +- mdk/nrf52805_erratas.h | 1427 --- mdk/nrf52805_peripherals.h | 2 + mdk/nrf52810.h | 6 +- mdk/nrf52810_erratas.h | 1611 ---- mdk/nrf52810_peripherals.h | 2 + mdk/nrf52811.h | 6 +- mdk/nrf52811_erratas.h | 1481 ---- mdk/nrf52811_peripherals.h | 3 + mdk/nrf52832_erratas.h | 4268 --------- mdk/nrf52832_peripherals.h | 2 + mdk/nrf52833.h | 14 +- mdk/nrf52833.svd | 112 +- mdk/nrf52833_bitfields.h | 53 +- mdk/nrf52833_erratas.h | 1471 ---- mdk/nrf52833_peripherals.h | 4 + mdk/nrf52840.h | 6 +- mdk/nrf52840_erratas.h | 3239 ------- mdk/nrf52840_peripherals.h | 4 + mdk/nrf52_erratas.h | 7787 +++++++++++++++++ mdk/nrf5340_application.h | 129 +- mdk/nrf5340_application.svd | 404 +- mdk/nrf5340_application_bitfields.h | 96 +- mdk/nrf5340_application_erratas.h | 801 -- mdk/nrf5340_application_peripherals.h | 53 +- mdk/nrf5340_network.h | 51 +- mdk/nrf5340_network.svd | 96 +- mdk/nrf5340_network_bitfields.h | 74 +- mdk/nrf5340_network_erratas.h | 619 -- mdk/nrf5340_network_peripherals.h | 4 + mdk/nrf53_erratas.h | 1609 ++++ mdk/nrf9160.h | 6 +- mdk/nrf9160_erratas.h | 561 -- mdk/nrf9160_peripherals.h | 42 +- mdk/nrf91_erratas.h | 639 ++ mdk/nrf_erratas.h | 67 +- mdk/ses_startup_nrf5340_application.s | 32 +- mdk/system_nrf51.c | 8 +- mdk/system_nrf52.c | 22 +- mdk/system_nrf52805.c | 10 +- mdk/system_nrf52810.c | 26 +- mdk/system_nrf52811.c | 14 +- mdk/system_nrf52833.c | 6 +- mdk/system_nrf52840.c | 14 +- mdk/system_nrf5340_application.c | 42 +- mdk/system_nrf5340_network.c | 6 +- mdk/system_nrf9160.c | 10 +- nrfx.h | 2 +- soc/nrfx_atomic.c | 2 +- soc/nrfx_atomic.h | 2 +- soc/nrfx_atomic_internal.h | 2 +- soc/nrfx_coredep.h | 2 +- soc/nrfx_irqs.h | 2 +- soc/nrfx_irqs_nrf51.h | 2 +- soc/nrfx_irqs_nrf52810.h | 2 +- soc/nrfx_irqs_nrf52811.h | 2 +- soc/nrfx_irqs_nrf52832.h | 2 +- soc/nrfx_irqs_nrf52833.h | 2 +- soc/nrfx_irqs_nrf52840.h | 2 +- soc/nrfx_irqs_nrf5340_application.h | 42 +- soc/nrfx_irqs_nrf5340_network.h | 2 +- soc/nrfx_irqs_nrf9160.h | 2 +- templates/nrfx_config.h | 57 + .../nrfx_config.h => nrfx_config_nrf51.h} | 101 +- .../nrfx_config.h => nrfx_config_nrf52810.h} | 144 +- .../nrfx_config.h => nrfx_config_nrf52811.h} | 144 +- .../nrfx_config.h => nrfx_config_nrf52832.h} | 175 +- .../nrfx_config.h => nrfx_config_nrf52833.h} | 183 +- .../nrfx_config.h => nrfx_config_nrf52840.h} | 185 +- ...ig.h => nrfx_config_nrf5340_application.h} | 422 +- ...config.h => nrfx_config_nrf5340_network.h} | 130 +- .../nrfx_config.h => nrfx_config_nrf9160.h} | 163 +- templates/nrfx_glue.h | 2 +- templates/nrfx_log.h | 2 +- 242 files changed, 19672 insertions(+), 28353 deletions(-) create mode 100644 drivers/include/nrfx_power_compat.h create mode 100644 drivers/include/nrfx_usbreg.h create mode 100644 drivers/src/nrfx_usbreg.c create mode 100644 hal/nrf_dcnf.h create mode 100644 hal/nrf_oscillators.h create mode 100644 hal/nrf_usbreg.h create mode 100644 hal/nrf_vreqctrl.h delete mode 100644 mdk/nrf51422_erratas.h delete mode 100644 mdk/nrf51801_erratas.h delete mode 100644 mdk/nrf51802_erratas.h delete mode 100644 mdk/nrf51822_erratas.h delete mode 100644 mdk/nrf51824_erratas.h delete mode 100644 mdk/nrf52805_erratas.h delete mode 100644 mdk/nrf52810_erratas.h delete mode 100644 mdk/nrf52811_erratas.h delete mode 100644 mdk/nrf52832_erratas.h delete mode 100644 mdk/nrf52833_erratas.h delete mode 100644 mdk/nrf52840_erratas.h create mode 100644 mdk/nrf52_erratas.h delete mode 100644 mdk/nrf5340_application_erratas.h delete mode 100644 mdk/nrf5340_network_erratas.h create mode 100644 mdk/nrf53_erratas.h delete mode 100644 mdk/nrf9160_erratas.h create mode 100644 mdk/nrf91_erratas.h create mode 100644 templates/nrfx_config.h rename templates/{nRF51/nrfx_config.h => nrfx_config_nrf51.h} (89%) rename templates/{nRF52811/nrfx_config.h => nrfx_config_nrf52810.h} (91%) rename templates/{nRF52810/nrfx_config.h => nrfx_config_nrf52811.h} (91%) rename templates/{nRF52832/nrfx_config.h => nrfx_config_nrf52832.h} (92%) rename templates/{nRF52833/nrfx_config.h => nrfx_config_nrf52833.h} (91%) rename templates/{nRF52840/nrfx_config.h => nrfx_config_nrf52840.h} (91%) rename templates/{nRF5340_application/nrfx_config.h => nrfx_config_nrf5340_application.h} (79%) rename templates/{nRF5340_network/nrfx_config.h => nrfx_config_nrf5340_network.h} (88%) rename templates/{nRF9160/nrfx_config.h => nrfx_config_nrf9160.h} (89%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d7773f74..f1fb6c658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,39 @@ # Changelog All notable changes to this project are documented in this file. +## [2.1.0] - 2020-01-24 +### Added +- Added HALs for DCNF, OSCILLATORS, USBREG, and VREQCTRL. +- Added support for 1-MHz clock frequency in TWIM. +- Introduced the NRFX_I2S_STATUS_TRANSFER_STOPPED flag in the I2S driver. +- Introduced the nrfx_power_compat layer that allows use of the nrfx_power API with new SoC. +- Added encryption support in the QSPI driver. +- Added support for USBD in nRF5340. +- Expanded HALs to cover new functions in nRF5340: GPIO, I2S, PDM, POWER, QSPI, and REGULATORS. +- Introduced new clock management system in the CLOCK driver. +- Introduced new audio clock configuration settings in the I2S and PDM drivers for nRF5340. +- Implemented workaround for nRF5340 anomaly 4 in the CLOCK driver. +- Implemented workaround for nRF5340 anomaly 10 in the CCM HAL. +- Implemented workaround for nRF9160 anomaly 21 and nRF5340 anomaly 6 in the NVMC HAL. +- Implemented workaround for nRF9160 anomaly 23 and nRF5340 anomaly 44 in the UARTE driver. +- Introduced the NRFX_TWIM_NO_SPURIOUS_STOP_CHECK flag in the TWIM driver. +- Added functions for getting shortcut configuration in the TWIM HAL. + +### Changed +- Updated MDK to 8.30.2. +- Reorganized templates of nrfx_config header files for different SoCs. Now they are included through one common file according to the selected SoC. +- Improved the UARTE driver to consume less current after the driver uninitialization. Now all clocks are disabled properly after uninitialization. +- Improved the GPIOTE driver robustness by setting the LATCH functionality to be used by default. +- Changed names of the frequency divider symbols in the QSPI HAL to reflect the new frequencies in nRF5340. Old API names were preserved and are still supported. +- Improved spurious STOP condition handling in the TWIM driver. +- Improved sampling procedure in the advanced blocking mode in the SAADC driver. +- Improved calibration procedure in the SAADC driver for nRF5340 and nRF9160. + +### Fixed +- Fixed address assertions in NVMC driver for the nRF5340 network core. +- Fixed an issue in the TWI driver that would make the driver stuck when a premature STOP condition was generated by a slave device. The driver now handles this situation properly and signals that a bus error occurred. +- Fixed the stopping procedure in the PWM driver. Previously in very specific circumstances the PWM output might be not stopped at all or might be immediately restarted. + ## [2.0.0] - 2019-11-06 ### Added - Added support for nRF5340. diff --git a/LICENSE b/LICENSE index ed92c3b4f..94bd0a0f4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017 - 2019, Nordic Semiconductor ASA +Copyright (c) 2017 - 2020, Nordic Semiconductor ASA All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/doc/drv_supp_matrix.dox b/doc/drv_supp_matrix.dox index 2915aaa60..689bbc85b 100644 --- a/doc/drv_supp_matrix.dox +++ b/doc/drv_supp_matrix.dox @@ -14,6 +14,7 @@ Driver | nRF51 Series | nRF52810/nRF52811 | nRF52832 | nRF52833 @ref nrf_clock |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick | @ref nrf_comp |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagRedCross | @ref nrf_systick |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick | +@ref nrf_dcnf |@tagRedCross |@tagRedCross |@tagRedCross |@tagRedCross |@tagRedCross |@tagGreenTick |@tagRedCross | @ref nrf_dppi |@tagRedCross |@tagRedCross |@tagRedCross |@tagRedCross |@tagRedCross |@tagGreenTick |@tagGreenTick | @ref nrf_ecb |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagRedCross | @ref nrf_egu |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick | @@ -52,7 +53,7 @@ Driver | nRF51 Series | nRF52810/nRF52811 | nRF52832 | nRF52833 @ref nrf_twis |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick | @ref nrf_uart |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagRedCross |@tagRedCross | @ref nrf_uarte |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick | -@ref nrf_usbd |@tagRedCross |@tagRedCross |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagRedCross |@tagRedCross | +@ref nrf_usbd |@tagRedCross |@tagRedCross |@tagRedCross |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagRedCross | @ref nrf_vmc |@tagRedCross |@tagRedCross |@tagRedCross |@tagRedCross |@tagRedCross |@tagGreenTick |@tagGreenTick | @ref nrf_wdt |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick |@tagGreenTick | diff --git a/doc/main_page.dox b/doc/main_page.dox index 6ff79d713..f2232d0ae 100644 --- a/doc/main_page.dox +++ b/doc/main_page.dox @@ -72,8 +72,8 @@ in a file named: This file, similarly to the integration files mentioned above, can be placed in any suitable location within the host environment. The templates subfolder contains templates of -configuration files for all currently supported Nordic SoCs placed in respective -subfolders. +configuration files for all currently supported Nordic SoCs. These files are +included through a common nrfx_config.h file, according to the selected SoC. Refer to the "driver configuration" section in the API reference for a given driver for more information regarding configuration options available for it. diff --git a/doc/nrf5340.dox b/doc/nrf5340.dox index c338f4ddd..fcd846842 100644 --- a/doc/nrf5340.dox +++ b/doc/nrf5340.dox @@ -16,6 +16,8 @@ @ref nrf_systick +@ref nrf_dcnf + @ref nrf_dppi @ref nrf_ecb @@ -78,6 +80,8 @@ @ref nrf_uarte +@ref nrf_usbd + @ref nrf_vmc @ref nrf_wdt diff --git a/doc/nrfx.doxyfile b/doc/nrfx.doxyfile index ce5c1e0fc..4181c46da 100644 --- a/doc/nrfx.doxyfile +++ b/doc/nrfx.doxyfile @@ -40,7 +40,7 @@ PROJECT_NAME = "nrfx" ### EDIT THIS ### -PROJECT_NUMBER = "2.0" +PROJECT_NUMBER = "2.1" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -236,8 +236,7 @@ TAB_SIZE = 4 # alias to insert a newline as if a physical newline was in the original file. ALIASES = "tagGreenTick=@htmlonly
@endhtmlonly" \ - "tagRedCross=@htmlonly
@endhtmlonly" \ - "linkProductSpecification52=[nRF52840 Product Specification](http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/chips/nrf52840_ps.html) or [nRF52832 Product Specification](http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/chips/nrf52832_ps.html)" + "tagRedCross=@htmlonly
@endhtmlonly" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" diff --git a/doc/nrfx_api.dox b/doc/nrfx_api.dox index 2a223b63a..f1496a33b 100644 --- a/doc/nrfx_api.dox +++ b/doc/nrfx_api.dox @@ -21,6 +21,8 @@ @defgroup nrf_systick Cortex-M Systick +@defgroup nrf_dcnf DCNF + @defgroup nrf_dppi DPPI @defgroup nrf_ecb ECB diff --git a/drivers/include/nrf_bitmask.h b/drivers/include/nrf_bitmask.h index abb281ae4..3abb6ce29 100644 --- a/drivers/include/nrf_bitmask.h +++ b/drivers/include/nrf_bitmask.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_adc.h b/drivers/include/nrfx_adc.h index 78ef7004f..453cb7abf 100644 --- a/drivers/include/nrfx_adc.h +++ b/drivers/include/nrfx_adc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_clock.h b/drivers/include/nrfx_clock.h index 4dbeb8082..08cbee180 100644 --- a/drivers/include/nrfx_clock.h +++ b/drivers/include/nrfx_clock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,10 +50,12 @@ extern "C" { /** @brief Clock events. */ typedef enum { - NRFX_CLOCK_EVT_HFCLK_STARTED, ///< HFCLK has been started. - NRFX_CLOCK_EVT_LFCLK_STARTED, ///< LFCLK has been started. - NRFX_CLOCK_EVT_CTTO, ///< Calibration timeout. - NRFX_CLOCK_EVT_CAL_DONE ///< Calibration has been done. + NRFX_CLOCK_EVT_HFCLK_STARTED, ///< HFCLK has been started. + NRFX_CLOCK_EVT_LFCLK_STARTED, ///< LFCLK has been started. + NRFX_CLOCK_EVT_CTTO, ///< Calibration timeout. + NRFX_CLOCK_EVT_CAL_DONE, ///< Calibration has been done. + NRFX_CLOCK_EVT_HFCLKAUDIO_STARTED, ///< HFCLKAUDIO has been started. + NRFX_CLOCK_EVT_HFCLK192M_STARTED, ///< HFCLK192M has been started. } nrfx_clock_evt_type_t; /** @@ -85,34 +87,137 @@ void nrfx_clock_disable(void); /** @brief Function for uninitializing the clock module. */ void nrfx_clock_uninit(void); -/** @brief Function for starting the LFCLK. */ -void nrfx_clock_lfclk_start(void); +/** + * @brief Function for starting the specified clock domain. + * + * @param[in] domain Clock domain. + */ +void nrfx_clock_start(nrf_clock_domain_t domain); + +/** + * @brief Function for stopping the specified clock domain. + * + * @param[in] domain Clock domain. + */ +void nrfx_clock_stop(nrf_clock_domain_t domain); + +/** + * @brief Function for checking the specified clock domain state. + * + * XTAL source is assumed for domains with multiple sources. + * + * @param[in] domain Clock domain. + * @param[out] clk_src Clock source that is running. Set to NULL if not needed. + * Ignored for HFCLKAUDIO domain. Typecast it to @ref nrf_clock_lfclk_t for + * LFCLK and @ref nrf_clock_hfclk_t for HFCLK and HFCLK192M. + * + * @retval true The clock domain is running. + * @retval false The clock domain is not running. + */ +NRFX_STATIC_INLINE bool nrfx_clock_is_running(nrf_clock_domain_t domain, void * clk_src); -/** @brief Function for stopping the LFCLK. */ -void nrfx_clock_lfclk_stop(void); +#if NRF_CLOCK_HAS_HFCLK_DIV || NRF_CLOCK_HAS_HFCLK_192M +/** + * @brief Function for setting the specified clock domain divider. + * + * @param[in] domain Clock domain. + * @param[in] div New divider for the clock domain. + * + * @retval NRFX_SUCCESS Divider successfully set. + * @retval NRFX_ERROR_NOT_SUPPORTED Domain does not support setting the divider. + * @retval NRFX_ERROR_INVALID_PARAM Divider not supported by the specified domain. + */ +nrfx_err_t nrfx_clock_divider_set(nrf_clock_domain_t domain, + nrf_clock_hfclk_div_t div); + +/** + * @brief Function for getting the specified clock domain divider. + * + * @param[in] domain Clock domain. + * + * @return Current divider for the specified clock domain. + */ + +NRFX_STATIC_INLINE nrf_clock_hfclk_div_t nrfx_clock_divider_get(nrf_clock_domain_t domain); +#endif + +/** + * @brief Function for starting the LFCLK. + * + * @note This function is deprecated. Use @ref nrfx_clock_start instead. + */ +NRFX_STATIC_INLINE void nrfx_clock_lfclk_start(void); + +/** + * @brief Function for stopping the LFCLK. + * + * @note This function is deprecated. Use @ref nrfx_clock_stop instead. + */ +NRFX_STATIC_INLINE void nrfx_clock_lfclk_stop(void); /** * @brief Function for checking the LFCLK state. * + * @note This function is deprecated. Use @ref nrfx_clock_is_running instead. + * * @retval true The LFCLK is running. * @retval false The LFCLK is not running. */ NRFX_STATIC_INLINE bool nrfx_clock_lfclk_is_running(void); -/** @brief Function for starting the high-accuracy source HFCLK. */ -void nrfx_clock_hfclk_start(void); +/** + * @brief Function for starting the high-accuracy source HFCLK. + * + * @note This function is deprecated. Use @ref nrfx_clock_start instead. + */ +NRFX_STATIC_INLINE void nrfx_clock_hfclk_start(void); -/** @brief Function for stopping the external high-accuracy source HFCLK. */ -void nrfx_clock_hfclk_stop(void); +/** + * @brief Function for stopping the external high-accuracy source HFCLK. + * + * @note This function is deprecated. Use @ref nrfx_clock_stop instead. + */ +NRFX_STATIC_INLINE void nrfx_clock_hfclk_stop(void); /** * @brief Function for checking the HFCLK state. * + * @note This function is deprecated. Use @ref nrfx_clock_is_running instead. + * * @retval true The HFCLK is running (XTAL source). * @retval false The HFCLK is not running. */ NRFX_STATIC_INLINE bool nrfx_clock_hfclk_is_running(void); + +#if NRF_CLOCK_HAS_HFCLKAUDIO +/** + * @brief Function for setting the HFCLKAUDIO configuration. + * + * The frequency of HFCLKAUDIO ranges from 10.666 MHz to 13.333 MHz in 40.7 Hz steps. + * To calculate @p freq_value corresponding to the chosen frequency, use the following equation: + * FREQ_VALUE = 2^16 * ((12 * f_out / 32M) - 4) + * + * @warning Chosen frequency must fit in 11.176 MHz - 11.402 MHz or 12.165 MHz - 12.411 MHz + * frequency bands. + * + * @param[in] freq_value New FREQ_VALUE for HFCLKAUDIO. + */ +NRFX_STATIC_INLINE void nrfx_clock_hfclkaudio_config_set(uint16_t freq_value); + +/** + * @brief Function for getting the HFCLKAUDIO configuration. + * + * The frequency of HFCLKAUDIO ranges from 10.666 MHz to 13.333 MHz in 40.7 Hz steps. + * To calculate frequency corresponding to the returned FREQ_VALUE, use the following equation: + * f_out = 32M * (4 + FREQ_VALUE * 2^(-16))/12 + * + * @return Current value of FREQ_VALUE for HFCLKAUDIO. + */ +NRFX_STATIC_INLINE uint16_t nrfx_clock_hfclkaudio_config_get(void); + +#endif + /** * @brief Function for starting the calibration of internal LFCLK. * @@ -161,8 +266,48 @@ NRFX_STATIC_INLINE uint32_t nrfx_clock_ppi_task_addr(nrf_clock_task_t task); */ NRFX_STATIC_INLINE uint32_t nrfx_clock_ppi_event_addr(nrf_clock_event_t event); - #ifndef NRFX_DECLARE_ONLY + +#if NRF_CLOCK_HAS_HFCLK_DIV || NRF_CLOCK_HAS_HFCLK_192M +NRFX_STATIC_INLINE nrf_clock_hfclk_div_t nrfx_clock_divider_get(nrf_clock_domain_t domain) +{ + switch (domain) + { +#if NRF_CLOCK_HAS_HFCLK_DIV + case NRF_CLOCK_DOMAIN_HFCLK: + return nrf_clock_hfclk_div_get(NRF_CLOCK); +#endif +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + return nrf_clock_hfclk192m_div_get(NRF_CLOCK); +#endif + default: + NRFX_ASSERT(0); + return 0; + } +} +#endif // NRF_CLOCK_HAS_HFCLK_DIV || NRF_CLOCK_HAS_HFCLK_192M + +NRFX_STATIC_INLINE void nrfx_clock_lfclk_start(void) +{ + nrfx_clock_start(NRF_CLOCK_DOMAIN_LFCLK); +} + +NRFX_STATIC_INLINE void nrfx_clock_lfclk_stop(void) +{ + nrfx_clock_stop(NRF_CLOCK_DOMAIN_LFCLK); +} + +NRFX_STATIC_INLINE void nrfx_clock_hfclk_start(void) +{ + nrfx_clock_start(NRF_CLOCK_DOMAIN_HFCLK); +} + +NRFX_STATIC_INLINE void nrfx_clock_hfclk_stop(void) +{ + nrfx_clock_stop(NRF_CLOCK_DOMAIN_HFCLK); +} + NRFX_STATIC_INLINE uint32_t nrfx_clock_ppi_task_addr(nrf_clock_task_t task) { return nrf_clock_task_address_get(NRF_CLOCK, task); @@ -173,15 +318,37 @@ NRFX_STATIC_INLINE uint32_t nrfx_clock_ppi_event_addr(nrf_clock_event_t event) return nrf_clock_event_address_get(NRF_CLOCK, event); } +NRFX_STATIC_INLINE bool nrfx_clock_is_running(nrf_clock_domain_t domain, void * clk_src) +{ + return nrf_clock_is_running(NRF_CLOCK, domain, clk_src); +} + NRFX_STATIC_INLINE bool nrfx_clock_hfclk_is_running(void) { - return nrf_clock_hf_is_running(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY); + nrf_clock_hfclk_t clk_src; + bool ret = nrfx_clock_is_running(NRF_CLOCK_DOMAIN_HFCLK, &clk_src); + return (ret && (clk_src == NRF_CLOCK_HFCLK_HIGH_ACCURACY)); } NRFX_STATIC_INLINE bool nrfx_clock_lfclk_is_running(void) { - return nrf_clock_lf_is_running(NRF_CLOCK); + return nrfx_clock_is_running(NRF_CLOCK_DOMAIN_LFCLK, NULL); } + +#if NRF_CLOCK_HAS_HFCLKAUDIO + +NRFX_STATIC_INLINE void nrfx_clock_hfclkaudio_config_set(uint16_t freq_value) +{ + nrf_clock_hfclkaudio_config_set(NRF_CLOCK, freq_value); +} + +NRFX_STATIC_INLINE uint16_t nrfx_clock_hfclkaudio_config_get(void) +{ + return nrf_clock_hfclkaudio_config_get(NRF_CLOCK); +} + +#endif + #endif // NRFX_DECLARE_ONLY /** @} */ diff --git a/drivers/include/nrfx_comp.h b/drivers/include/nrfx_comp.h index 7621f4856..d42f90148 100644 --- a/drivers/include/nrfx_comp.h +++ b/drivers/include/nrfx_comp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_dppi.h b/drivers/include/nrfx_dppi.h index 84b1715ba..e7bc202c0 100644 --- a/drivers/include/nrfx_dppi.h +++ b/drivers/include/nrfx_dppi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_egu.h b/drivers/include/nrfx_egu.h index 1470778bf..686e526e7 100644 --- a/drivers/include/nrfx_egu.h +++ b/drivers/include/nrfx_egu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_gpiote.h b/drivers/include/nrfx_gpiote.h index ad1abec3e..10e57eac3 100644 --- a/drivers/include/nrfx_gpiote.h +++ b/drivers/include/nrfx_gpiote.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_i2s.h b/drivers/include/nrfx_i2s.h index 0476a6337..698a7d6bf 100644 --- a/drivers/include/nrfx_i2s.h +++ b/drivers/include/nrfx_i2s.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,13 +69,17 @@ typedef struct * if this signal is not needed. */ uint8_t irq_priority; ///< Interrupt priority. - nrf_i2s_mode_t mode; ///< Mode of operation. - nrf_i2s_format_t format; ///< Frame format. - nrf_i2s_align_t alignment; ///< Alignment of sample within a frame. - nrf_i2s_swidth_t sample_width; ///< Sample width. - nrf_i2s_channels_t channels; ///< Enabled channels. - nrf_i2s_mck_t mck_setup; ///< Master clock setup. - nrf_i2s_ratio_t ratio; ///< MCK/LRCK ratio. + nrf_i2s_mode_t mode; ///< Mode of operation. + nrf_i2s_format_t format; ///< Frame format. + nrf_i2s_align_t alignment; ///< Alignment of sample within a frame. + nrf_i2s_swidth_t sample_width; ///< Sample width. + nrf_i2s_channels_t channels; ///< Enabled channels. + nrf_i2s_mck_t mck_setup; ///< Master clock setup. + nrf_i2s_ratio_t ratio; ///< MCK/LRCK ratio. +#if NRF_I2S_HAS_CLKCONFIG + nrf_i2s_clksrc_t clksrc; ///< Clock source selection. + bool enable_bypass; ///< Bypass clock generator. MCK will be equal to source input. +#endif } nrfx_i2s_config_t; /** @brief I2S driver buffers structure. */ @@ -85,6 +89,14 @@ typedef struct uint32_t const * p_tx_buffer; ///< Pointer to the buffer with data to be sent. } nrfx_i2s_buffers_t; +#if NRF_I2S_HAS_CLKCONFIG || defined(__NRFX_DOXYGEN__) + /** @brief I2S additional clock source configuration. */ + #define NRF_I2S_DEFAULT_EXTENDED_CLKSRC_CONFIG \ + .clksrc = NRF_I2S_CLKSRC_PCLK32M, \ + .enable_bypass = false, +#else + #define NRF_I2S_DEFAULT_EXTENDED_CLKSRC_CONFIG +#endif /** * @brief I2S driver default configuration. * @@ -118,15 +130,20 @@ typedef struct .channels = NRF_I2S_CHANNELS_LEFT, \ .mck_setup = NRF_I2S_MCK_32MDIV8, \ .ratio = NRF_I2S_RATIO_32X, \ + NRF_I2S_DEFAULT_EXTENDED_CLKSRC_CONFIG \ } -#define NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED (1UL << 0) +#define NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED (1UL << 0) /**< The application must provide buffers that are to be used in the next * part of the transfer. A call to @ref nrfx_i2s_next_buffers_set must * be done before the currently used buffers are completely processed * (that is, the time remaining for supplying the next buffers depends on * the used size of the buffers). */ +#define NRFX_I2S_STATUS_TRANSFER_STOPPED (1UL << 1) + /**< The I2S peripheral has been stopped and all buffers that were passed + * to the driver have been released. */ + /** * @brief I2S driver data handler type. * @@ -155,14 +172,22 @@ typedef struct * Both pointers in this structure are NULL when the * handler is called for the first time after a transfer * is started, because no data has been transferred yet - * at this point. In all successive calls the pointers + * at this point. In all successive calls, the pointers * specify what has been sent (TX) and what has been - * received (RX) in the part of transfer that has just - * been completed (provided that a given direction is - * enabled, see @ref nrfx_i2s_start). + * received (RX) in the part of the transfer that has + * just been completed (provided that a given direction + * is enabled, see @ref nrfx_i2s_start). + * @note Since the peripheral is stopped asynchronously, + * buffers that are released after the call to + * @ref nrfx_i2s_stop are not used entirely. + * In this case, only a part (if any) of the TX + * buffer has been actually transmitted and only + * a part (if any) of the RX buffer is filled with + * received data. * @param[in] status Bit field describing the current status of the transfer. * It can be 0 or a combination of the following flags: * - @ref NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED + * - @ref NRFX_I2S_STATUS_TRANSFER_STOPPED */ typedef void (* nrfx_i2s_data_handler_t)(nrfx_i2s_buffers_t const * p_released, uint32_t status); @@ -198,7 +223,7 @@ void nrfx_i2s_uninit(void); * word can either contain four 8-bit samples, two 16-bit samples, or one * right-aligned 24-bit sample sign-extended to a 32-bit value. * For a detailed memory mapping for different supported configurations, - * see the @linkProductSpecification52. + * see the Product Specification. * * @note Peripherals using EasyDMA (including I2S) require the transfer buffers * to be placed in the Data RAM region. If this condition is not met, diff --git a/drivers/include/nrfx_ipc.h b/drivers/include/nrfx_ipc.h index fb4abab41..d6331a264 100644 --- a/drivers/include/nrfx_ipc.h +++ b/drivers/include/nrfx_ipc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_lpcomp.h b/drivers/include/nrfx_lpcomp.h index 03a837044..fa5757f62 100644 --- a/drivers/include/nrfx_lpcomp.h +++ b/drivers/include/nrfx_lpcomp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,7 +70,7 @@ typedef struct * * @param[in] _input Comparator input pin. */ -#ifdef NRF52_SERIES +#if defined(LPCOMP_FEATURE_HYST_PRESENT) #define NRFX_LPCOMP_DEFAULT_CONFIG(_input) \ { \ .hal = { NRF_LPCOMP_REF_SUPPLY_4_8, \ diff --git a/drivers/include/nrfx_nfct.h b/drivers/include/nrfx_nfct.h index 963a93584..4d8bea0c1 100644 --- a/drivers/include/nrfx_nfct.h +++ b/drivers/include/nrfx_nfct.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_nvmc.h b/drivers/include/nrfx_nvmc.h index 2a030e547..cfea3731a 100644 --- a/drivers/include/nrfx_nvmc.h +++ b/drivers/include/nrfx_nvmc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_pdm.h b/drivers/include/nrfx_pdm.h index 246c0d675..339627352 100644 --- a/drivers/include/nrfx_pdm.h +++ b/drivers/include/nrfx_pdm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,16 +67,39 @@ typedef struct /** @brief PDM interface driver configuration structure. */ typedef struct { - nrf_pdm_mode_t mode; ///< Interface operation mode. - nrf_pdm_edge_t edge; ///< Sampling mode. - uint8_t pin_clk; ///< CLK pin. - uint8_t pin_din; ///< DIN pin. - nrf_pdm_freq_t clock_freq; ///< Clock frequency. - nrf_pdm_gain_t gain_l; ///< Left channel gain. - nrf_pdm_gain_t gain_r; ///< Right channel gain. - uint8_t interrupt_priority; ///< Interrupt priority. + nrf_pdm_mode_t mode; ///< Interface operation mode. + nrf_pdm_edge_t edge; ///< Sampling mode. + uint8_t pin_clk; ///< CLK pin. + uint8_t pin_din; ///< DIN pin. + nrf_pdm_freq_t clock_freq; ///< Clock frequency. + nrf_pdm_gain_t gain_l; ///< Left channel gain. + nrf_pdm_gain_t gain_r; ///< Right channel gain. + uint8_t interrupt_priority; ///< Interrupt priority. +#if NRF_PDM_HAS_RATIO_CONFIG + nrf_pdm_ratio_t ratio; ///< Ratio between PDM_CLK and output sample rate. +#endif +#if NRF_PDM_HAS_MCLKCONFIG + nrf_pdm_mclksrc_t mclksrc; ///< Master clock source selection. +#endif } nrfx_pdm_config_t; + +#if NRF_PDM_HAS_RATIO_CONFIG || defined(__NRFX_DOXYGEN__) + /** @brief PDM additional ratio configuration. */ + #define NRFX_PDM_DEFAULT_EXTENDED_RATIO_CONFIG \ + .ratio = NRF_PDM_RATIO_64X, +#else + #define NRFX_PDM_DEFAULT_EXTENDED_RATIO_CONFIG +#endif + +#if NRF_PDM_HAS_MCLKCONFIG || defined(__NRFX_DOXYGEN__) + /** @brief PDM additional master clock source configuration. */ + #define NRFX_PDM_DEFAULT_EXTENDED_MCLKSRC_CONFIG \ + .mclksrc = NRF_PDM_MCLKSRC_PCLK32M, +#else + #define NRFX_PDM_DEFAULT_EXTENDED_MCLKSRC_CONFIG +#endif + /** * @brief PDM driver default configuration. * @@ -98,7 +121,9 @@ typedef struct .clock_freq = NRF_PDM_FREQ_1032K, \ .gain_l = NRF_PDM_GAIN_DEFAULT, \ .gain_r = NRF_PDM_GAIN_DEFAULT, \ - .interrupt_priority = NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY \ + .interrupt_priority = NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY, \ + NRFX_PDM_DEFAULT_EXTENDED_RATIO_CONFIG \ + NRFX_PDM_DEFAULT_EXTENDED_MCLKSRC_CONFIG \ } /** @@ -187,12 +212,12 @@ nrfx_err_t nrfx_pdm_buffer_set(int16_t * buffer, uint16_t buffer_length); #ifndef NRFX_DECLARE_ONLY NRFX_STATIC_INLINE uint32_t nrfx_pdm_task_address_get(nrf_pdm_task_t task) { - return nrf_pdm_task_address_get(NRF_PDM, task); + return nrf_pdm_task_address_get(NRF_PDM0, task); } NRFX_STATIC_INLINE bool nrfx_pdm_enable_check(void) { - return nrf_pdm_enable_check(NRF_PDM); + return nrf_pdm_enable_check(NRF_PDM0); } #endif // NRFX_DECLARE_ONLY diff --git a/drivers/include/nrfx_power.h b/drivers/include/nrfx_power.h index 2220fd6e0..d1136e570 100644 --- a/drivers/include/nrfx_power.h +++ b/drivers/include/nrfx_power.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,6 +35,7 @@ #include #include #include +#include "nrfx_power_compat.h" #ifdef __cplusplus extern "C" { @@ -47,6 +48,29 @@ extern "C" { * @brief POWER peripheral driver. */ +#if NRF_POWER_HAS_POFCON || NRFX_CHECK(NRF_REGULATORS_HAS_POFCON) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether the power failure comparator is supported. */ +#define NRFX_POWER_SUPPORTS_POFCON 1 +#else +#define NRFX_POWER_SUPPORTS_POFCON 0 +#endif + +#if NRF_POWER_HAS_POFCON_VDDH || NRFX_CHECK(NRF_REGULATORS_HAS_POFCON_VDDH) || \ + defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether the power failure comparator for VDDH is supported. */ +#define NRFX_POWER_SUPPORTS_POFCON_VDDH 1 +#else +#define NRFX_POWER_SUPPORTS_POFCON_VDDH 0 +#endif + +#if NRF_POWER_HAS_DCDCEN_VDDH || NRFX_CHECK(NRF_REGULATORS_HAS_DCDCEN_VDDH) || \ + defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether the VDDH regulator is supported. */ +#define NRFX_POWER_SUPPORTS_DCDCEN_VDDH 1 +#else +#define NRFX_POWER_SUPPORTS_DCDCEN_VDDH 0 +#endif + /** * @brief Power mode possible configurations */ @@ -96,7 +120,7 @@ typedef enum NRFX_POWER_USB_STATE_CONNECTED, /**< The USB power is detected, but USB power regulator is not ready. */ NRFX_POWER_USB_STATE_READY /**< From the power viewpoint, USB is ready for working. */ }nrfx_power_usb_state_t; -#endif /* NRF_POWER_HAS_USBREG */ +#endif // NRF_POWER_HAS_USBREG || defined(__NRFX_DOXYGEN__) /** * @name Callback types @@ -145,7 +169,7 @@ typedef struct */ bool dcdcen:1; -#if NRF_POWER_HAS_VDDH || defined(__NRFX_DOXYGEN__) +#if NRFX_POWER_SUPPORTS_DCDCEN_VDDH /** * @brief Enable HV DCDC regulator. * @@ -166,10 +190,10 @@ typedef struct typedef struct { nrfx_power_pofwarn_event_handler_t handler; //!< Event handler. -#if NRF_POWER_HAS_POFCON || defined(__NRFX_DOXYGEN__) +#if NRFX_POWER_SUPPORTS_POFCON nrf_power_pof_thr_t thr; //!< Threshold for power failure detection #endif -#if NRF_POWER_HAS_VDDH || defined(__NRFX_DOXYGEN__) +#if NRFX_POWER_SUPPORTS_POFCON_VDDH nrf_power_pof_thrvddh_t thrvddh; //!< Threshold for power failure detection on the VDDH pin. #endif }nrfx_power_pofwarn_config_t; @@ -198,7 +222,7 @@ typedef struct { nrfx_power_usb_event_handler_t handler; //!< Event processing. }nrfx_power_usbevt_config_t; -#endif /* NRF_POWER_HAS_USBREG */ +#endif // NRF_POWER_HAS_USBREG || defined(__NRFX_DOXYGEN__) /** * @brief Function for getting the handler of the power failure comparator. @@ -212,7 +236,7 @@ nrfx_power_pofwarn_event_handler_t nrfx_power_pof_handler_get(void); * @return Handler of the USB power. */ nrfx_power_usb_event_handler_t nrfx_power_usb_handler_get(void); -#endif +#endif // NRF_POWER_HAS_USBREG || defined(__NRFX_DOXYGEN__) /** * @brief Function for initializing the power module driver. @@ -235,7 +259,7 @@ nrfx_err_t nrfx_power_init(nrfx_power_config_t const * p_config); */ void nrfx_power_uninit(void); -#if NRF_POWER_HAS_POFCON || defined(__NRFX_DOXYGEN__) +#if NRFX_POWER_SUPPORTS_POFCON /** * @brief Function for initializing the power failure comparator. * @@ -271,7 +295,7 @@ void nrfx_power_pof_disable(void); * Clears the settings of the power failure comparator. */ void nrfx_power_pof_uninit(void); -#endif // NRF_POWER_HAS_POFCON || defined(__NRFX_DOXYGEN__) +#endif // NRFX_POWER_SUPPORTS_POFCON #if NRF_POWER_HAS_SLEEPEVT || defined(__NRFX_DOXYGEN__) /** @@ -336,7 +360,7 @@ void nrfx_power_usbevt_uninit(void); */ NRFX_STATIC_INLINE nrfx_power_usb_state_t nrfx_power_usbstatus_get(void); -#endif /* NRF_POWER_HAS_USBREG */ +#endif // NRF_POWER_HAS_USBREG || defined(__NRFX_DOXYGEN__) #ifndef NRFX_DECLARE_ONLY #if NRF_POWER_HAS_USBREG @@ -353,8 +377,8 @@ NRFX_STATIC_INLINE nrfx_power_usb_state_t nrfx_power_usbstatus_get(void) } return NRFX_POWER_USB_STATE_READY; } -#endif /* NRF_POWER_HAS_USBREG */ -#endif /* NRFX_DECLARE_ONLY */ +#endif // NRF_POWER_HAS_USBREG +#endif // NRFX_DECLARE_ONLY /** @} */ diff --git a/drivers/include/nrfx_power_clock.h b/drivers/include/nrfx_power_clock.h index c1af4bd9a..50b4603a0 100644 --- a/drivers/include/nrfx_power_clock.h +++ b/drivers/include/nrfx_power_clock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_power_compat.h b/drivers/include/nrfx_power_compat.h new file mode 100644 index 000000000..508a03f53 --- /dev/null +++ b/drivers/include/nrfx_power_compat.h @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_POWER_COMPAT_H__ +#define NRFX_POWER_COMPAT_H__ + +/** + * POWER compatibility layer. + * + * The following definitions allow using of common code involving the POWER peripheral + * driver for different SoCs, regardless of whether certain regulator registers + * are located in the POWER peripheral or in separate peripherals like USBREG and REGULATORS. + */ + +#if defined(REGULATORS_PRESENT) +#include +#endif + +#if NRF_REGULATORS_HAS_POFCON + +typedef nrf_regulators_pof_thr_t nrf_power_pof_thr_t; +#define NRF_POWER_POFTHR_V19 NRF_REGULATORS_POFTHR_V19 +#define NRF_POWER_POFTHR_V20 NRF_REGULATORS_POFTHR_V20 +#define NRF_POWER_POFTHR_V21 NRF_REGULATORS_POFTHR_V21 +#define NRF_POWER_POFTHR_V22 NRF_REGULATORS_POFTHR_V22 +#define NRF_POWER_POFTHR_V23 NRF_REGULATORS_POFTHR_V23 +#define NRF_POWER_POFTHR_V24 NRF_REGULATORS_POFTHR_V24 +#define NRF_POWER_POFTHR_V25 NRF_REGULATORS_POFTHR_V25 +#define NRF_POWER_POFTHR_V26 NRF_REGULATORS_POFTHR_V26 +#define NRF_POWER_POFTHR_V27 NRF_REGULATORS_POFTHR_V27 +#define NRF_POWER_POFTHR_V28 NRF_REGULATORS_POFTHR_V28 + +typedef nrf_regulators_pof_thrvddh_t nrf_power_pof_thrvddh_t; +#define NRF_POWER_POFTHRVDDH_V27 NRF_REGULATORS_POFTHRVDDH_V27 +#define NRF_POWER_POFTHRVDDH_V28 NRF_REGULATORS_POFTHRVDDH_V28 +#define NRF_POWER_POFTHRVDDH_V29 NRF_REGULATORS_POFTHRVDDH_V29 +#define NRF_POWER_POFTHRVDDH_V30 NRF_REGULATORS_POFTHRVDDH_V30 +#define NRF_POWER_POFTHRVDDH_V31 NRF_REGULATORS_POFTHRVDDH_V31 +#define NRF_POWER_POFTHRVDDH_V32 NRF_REGULATORS_POFTHRVDDH_V32 +#define NRF_POWER_POFTHRVDDH_V33 NRF_REGULATORS_POFTHRVDDH_V33 +#define NRF_POWER_POFTHRVDDH_V34 NRF_REGULATORS_POFTHRVDDH_V34 +#define NRF_POWER_POFTHRVDDH_V35 NRF_REGULATORS_POFTHRVDDH_V35 +#define NRF_POWER_POFTHRVDDH_V36 NRF_REGULATORS_POFTHRVDDH_V36 +#define NRF_POWER_POFTHRVDDH_V37 NRF_REGULATORS_POFTHRVDDH_V37 +#define NRF_POWER_POFTHRVDDH_V38 NRF_REGULATORS_POFTHRVDDH_V38 +#define NRF_POWER_POFTHRVDDH_V39 NRF_REGULATORS_POFTHRVDDH_V39 +#define NRF_POWER_POFTHRVDDH_V40 NRF_REGULATORS_POFTHRVDDH_V40 +#define NRF_POWER_POFTHRVDDH_V41 NRF_REGULATORS_POFTHRVDDH_V41 +#define NRF_POWER_POFTHRVDDH_V42 NRF_REGULATORS_POFTHRVDDH_V42 + +#endif // NRF_REGULATORS_HAS_POFCON + +#if defined(USBREG_PRESENT) +#include "nrfx_usbreg.h" + +typedef nrfx_usbreg_event_handler_t nrfx_power_usb_event_handler_t; +typedef nrfx_usbreg_config_t nrfx_power_usbevt_config_t; + +typedef nrfx_usbreg_evt_t nrfx_power_usb_evt_t; +#define NRFX_POWER_USB_EVT_DETECTED NRFX_USBREG_EVT_DETECTED +#define NRFX_POWER_USB_EVT_REMOVED NRFX_USBREG_EVT_REMOVED +#define NRFX_POWER_USB_EVT_READY NRFX_USBREG_EVT_READY + +typedef nrfx_usbreg_state_t nrfx_power_usb_state_t; +#define NRFX_POWER_USB_STATE_DISCONNECTED NRFX_USBREG_STATE_DISCONNECTED +#define NRFX_POWER_USB_STATE_CONNECTED NRFX_USBREG_STATE_CONNECTED +#define NRFX_POWER_USB_STATE_READY NRFX_USBREG_STATE_READY + +#define nrfx_power_usb_handler_get nrfx_usbreg_handler_get +#define nrfx_power_usbevt_init nrfx_usbreg_init +#define nrfx_power_usbevt_enable nrfx_usbreg_enable +#define nrfx_power_usbevt_disable nrfx_usbreg_disable +#define nrfx_power_usbevt_uninit nrfx_usbreg_uninit +#define nrfx_power_usbstatus_get nrfx_usbreg_usbstatus_get + +#endif // defined(USBREG_PRESENT) + +#endif // NRFX_POWER_COMPAT_H__ diff --git a/drivers/include/nrfx_ppi.h b/drivers/include/nrfx_ppi.h index 0696249e0..42693bf02 100644 --- a/drivers/include/nrfx_ppi.h +++ b/drivers/include/nrfx_ppi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_pwm.h b/drivers/include/nrfx_pwm.h index 907a46464..a48124eda 100644 --- a/drivers/include/nrfx_pwm.h +++ b/drivers/include/nrfx_pwm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -121,20 +121,20 @@ typedef struct * @param[in] _out_2 PWM output 2 pin. * @param[in] _out_3 PWM output 3 pin. */ -#define NRFX_PWM_DEFAULT_CONFIG(_out_0, _out_1, _out_2, _out_3) \ -{ \ - .output_pins = { _out_0, \ - _out_1, \ - _out_2, \ - _out_3 \ - }, \ - .irq_priority = NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY, \ - .base_clock = NRF_PWM_CLK_1MHz, \ - .count_mode = NRF_PWM_MODE_UP, \ - .top_value = 1000, \ - .load_mode = NRF_PWM_LOAD_COMMON, \ - .step_mode = NRF_PWM_STEP_AUTO, \ - .skip_gpio_cfg = false \ +#define NRFX_PWM_DEFAULT_CONFIG(_out_0, _out_1, _out_2, _out_3) \ +{ \ + .output_pins = { _out_0, \ + _out_1, \ + _out_2, \ + _out_3 \ + }, \ + .irq_priority = NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY, \ + .base_clock = NRF_PWM_CLK_1MHz, \ + .count_mode = NRF_PWM_MODE_UP, \ + .top_value = 1000, \ + .load_mode = NRF_PWM_LOAD_COMMON, \ + .step_mode = NRF_PWM_STEP_AUTO, \ + .skip_gpio_cfg = false \ } /** @brief PWM flags providing additional playback options. */ diff --git a/drivers/include/nrfx_qdec.h b/drivers/include/nrfx_qdec.h index 0591e731d..0ac342f54 100644 --- a/drivers/include/nrfx_qdec.h +++ b/drivers/include/nrfx_qdec.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_qspi.h b/drivers/include/nrfx_qspi.h index f4357384c..fb48d0dd8 100644 --- a/drivers/include/nrfx_qspi.h +++ b/drivers/include/nrfx_qspi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ typedef struct * - PP opcode for writing * - 24 bit addressing mode * - Deep Power-down disabled - * - clock frequency 2 MHz + * - clock frequency: 2 MHz for nRF52 Series, 6 MHz for nRF53 Series * - SCK delay 5 clock ticks * - mode 0 (data captured on the clock rising edge and transmitted on a falling edge. Clock base level is '0') * @@ -99,7 +99,7 @@ typedef struct .sck_delay = 0x05, \ .dpmen = false, \ .spi_mode = NRF_QSPI_MODE_0, \ - .sck_freq = NRF_QSPI_FREQ_32MDIV16, \ + .sck_freq = NRF_QSPI_FREQ_DIV16, \ }, \ .irq_priority = (uint8_t)NRFX_QSPI_DEFAULT_CONFIG_IRQ_PRIORITY, \ } @@ -329,6 +329,32 @@ nrfx_err_t nrfx_qspi_lfm_xfer(void const * p_tx_buffer, size_t transfer_length, bool finalize); +#if NRF_QSPI_HAS_XIP_ENC +/** + * @brief Function for setting the XIP encryption. + * + * @param[in] p_config XIP encryption configuration structure. + * To disable encryption, pass NULL pointer as argument. + * + * @retval NRFX_SUCCESS Operation was successful. + * @retval NRFX_ERROR_BUSY Driver currently handles other operation. + */ +nrfx_err_t nrfx_qspi_xip_encrypt(nrf_qspi_encryption_t const * p_config); +#endif + +#if NRF_QSPI_HAS_DMA_ENC +/** + * @brief Function for setting the EasyDMA encryption. + * + * @param[in] p_config DMA encryption configuration structure. + * To disable encryption, pass NULL pointer as argument. + * + * @retval NRFX_SUCCESS Operation was successful. + * @retval NRFX_ERROR_BUSY Driver currently handles other operation. + */ +nrfx_err_t nrfx_qspi_dma_encrypt(nrf_qspi_encryption_t const * p_config); +#endif + /** @} */ diff --git a/drivers/include/nrfx_rng.h b/drivers/include/nrfx_rng.h index cd88f7d89..ed9c70c73 100644 --- a/drivers/include/nrfx_rng.h +++ b/drivers/include/nrfx_rng.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_rtc.h b/drivers/include/nrfx_rtc.h index b641a898c..93cabe35e 100644 --- a/drivers/include/nrfx_rtc.h +++ b/drivers/include/nrfx_rtc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_saadc.h b/drivers/include/nrfx_saadc.h index 82f7d035d..bf1f78fc8 100644 --- a/drivers/include/nrfx_saadc.h +++ b/drivers/include/nrfx_saadc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_spi.h b/drivers/include/nrfx_spi.h index 3dea9f02f..80fab9086 100644 --- a/drivers/include/nrfx_spi.h +++ b/drivers/include/nrfx_spi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -116,6 +116,7 @@ typedef struct * - clock frequency 4 MHz * - mode 0 enabled (SCK active high, sample on leading edge of clock) * - MSB shifted out first + * - MISO pull-up disabled * * @param[in] _pin_sck SCK pin. * @param[in] _pin_mosi MOSI pin. @@ -133,6 +134,7 @@ typedef struct .frequency = NRF_SPI_FREQ_4M, \ .mode = NRF_SPI_MODE_0, \ .bit_order = NRF_SPI_BIT_ORDER_MSB_FIRST, \ + .miso_pull = NRF_GPIO_PIN_NOPULL, \ } /** @brief Single transfer descriptor structure. */ diff --git a/drivers/include/nrfx_spim.h b/drivers/include/nrfx_spim.h index 5c22db35b..339ab4c8b 100644 --- a/drivers/include/nrfx_spim.h +++ b/drivers/include/nrfx_spim.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,6 +67,9 @@ enum { #endif #if NRFX_CHECK(NRFX_SPIM3_ENABLED) NRFX_SPIM3_INST_IDX, +#endif +#if NRFX_CHECK(NRFX_SPIM4_ENABLED) + NRFX_SPIM4_INST_IDX, #endif NRFX_SPIM_ENABLED_COUNT }; @@ -391,6 +394,7 @@ void nrfx_spim_0_irq_handler(void); void nrfx_spim_1_irq_handler(void); void nrfx_spim_2_irq_handler(void); void nrfx_spim_3_irq_handler(void); +void nrfx_spim_4_irq_handler(void); #ifdef __cplusplus diff --git a/drivers/include/nrfx_spis.h b/drivers/include/nrfx_spis.h index 442901fd6..9c9250335 100644 --- a/drivers/include/nrfx_spis.h +++ b/drivers/include/nrfx_spis.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_systick.h b/drivers/include/nrfx_systick.h index 5e8feda92..0d1b9e194 100644 --- a/drivers/include/nrfx_systick.h +++ b/drivers/include/nrfx_systick.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_temp.h b/drivers/include/nrfx_temp.h index 95ac547c3..17d962fbf 100644 --- a/drivers/include/nrfx_temp.h +++ b/drivers/include/nrfx_temp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_timer.h b/drivers/include/nrfx_timer.h index 9da6b5c4d..3fcbbbbdd 100644 --- a/drivers/include/nrfx_timer.h +++ b/drivers/include/nrfx_timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_twi.h b/drivers/include/nrfx_twi.h index ca1bd5ac8..3595a6eab 100644 --- a/drivers/include/nrfx_twi.h +++ b/drivers/include/nrfx_twi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -117,7 +117,8 @@ typedef enum NRFX_TWI_EVT_DONE, ///< Transfer completed event. NRFX_TWI_EVT_ADDRESS_NACK, ///< Error event: NACK received after sending the address. NRFX_TWI_EVT_DATA_NACK, ///< Error event: NACK received after sending a data byte. - NRFX_TWI_EVT_OVERRUN ///< Error event: The unread data is replaced by new data. + NRFX_TWI_EVT_OVERRUN, ///< Error event: The unread data is replaced by new data. + NRFX_TWI_EVT_BUS_ERROR ///< Error event: An unexpected transition occurred on the bus. } nrfx_twi_evt_type_t; /** @brief TWI master driver transfer types. */ @@ -265,7 +266,7 @@ void nrfx_twi_disable(nrfx_twi_t const * p_instance); * @retval NRFX_SUCCESS The procedure is successful. * @retval NRFX_ERROR_BUSY The driver is not ready for a new transfer. * @retval NRFX_ERROR_NOT_SUPPORTED The provided parameters are not supported. - * @retval NRFX_ERROR_INTERNAL An error is detected by hardware. + * @retval NRFX_ERROR_INTERNAL An unexpected transition occurred on the bus. * @retval NRFX_ERROR_INVALID_STATE Other direction of transaction is suspended on the bus. * @retval NRFX_ERROR_DRV_TWI_ERR_OVERRUN The unread data is replaced by new data (TXRX and RX) * @retval NRFX_ERROR_DRV_TWI_ERR_ANACK Negative acknowledgement (NACK) is received after sending diff --git a/drivers/include/nrfx_twi_twim.h b/drivers/include/nrfx_twi_twim.h index 1c6ebcd74..1f62c62d5 100644 --- a/drivers/include/nrfx_twi_twim.h +++ b/drivers/include/nrfx_twi_twim.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_twim.h b/drivers/include/nrfx_twim.h index 78bc802b6..94ba0802b 100644 --- a/drivers/include/nrfx_twim.h +++ b/drivers/include/nrfx_twim.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -109,17 +109,19 @@ typedef struct } /** @brief Flag indicating that TX buffer address will be incremented after the transfer. */ -#define NRFX_TWIM_FLAG_TX_POSTINC (1UL << 0) +#define NRFX_TWIM_FLAG_TX_POSTINC (1UL << 0) /** @brief Flag indicating that RX buffer address will be incremented after the transfer. */ -#define NRFX_TWIM_FLAG_RX_POSTINC (1UL << 1) +#define NRFX_TWIM_FLAG_RX_POSTINC (1UL << 1) /** @brief Flag indicating that the interrupt after each transfer will be suppressed, and the event handler will not be called. */ -#define NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER (1UL << 2) +#define NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER (1UL << 2) /** @brief Flag indicating that the transfer will be set up, but not started. */ -#define NRFX_TWIM_FLAG_HOLD_XFER (1UL << 3) +#define NRFX_TWIM_FLAG_HOLD_XFER (1UL << 3) /** @brief Flag indicating that the transfer will be executed multiple times. */ -#define NRFX_TWIM_FLAG_REPEATED_XFER (1UL << 4) +#define NRFX_TWIM_FLAG_REPEATED_XFER (1UL << 4) /** @brief Flag indicating that the TX transfer will not end with a stop condition. */ -#define NRFX_TWIM_FLAG_TX_NO_STOP (1UL << 5) +#define NRFX_TWIM_FLAG_TX_NO_STOP (1UL << 5) +/** @brief Flag indicating that checks for spurious STOP condition will not be performed. */ +#define NRFX_TWIM_FLAG_NO_SPURIOUS_STOP_CHECK (1UL << 6) /** @brief TWI master driver event types. */ typedef enum @@ -272,6 +274,10 @@ void nrfx_twim_disable(nrfx_twim_t const * p_instance); * the driver does not set the driver instance into busy state, so you must ensure that the next transfers are set up * when TWIM is not active. * - @ref NRFX_TWIM_FLAG_TX_NO_STOP - No stop condition after the TX transfer. + * - @ref NRFX_TWIM_FLAG_NO_SPURIOUS_STOP_CHECK - Checks for spurious STOP conditions are disabled. + * Used together with @ref NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER can result in lower power consumption + * when transfers are triggered externally and CPU is sleeping. + * Use only with I2C standard-compliant slave devices. * * @note * Some flag combinations are invalid: diff --git a/drivers/include/nrfx_twis.h b/drivers/include/nrfx_twis.h index cf6833fd9..9fe599c73 100644 --- a/drivers/include/nrfx_twis.h +++ b/drivers/include/nrfx_twis.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_uart.h b/drivers/include/nrfx_uart.h index 8f2105aa0..5cd19be43 100644 --- a/drivers/include/nrfx_uart.h +++ b/drivers/include/nrfx_uart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_uarte.h b/drivers/include/nrfx_uarte.h index 48945fa1a..bfba1f84a 100644 --- a/drivers/include/nrfx_uarte.h +++ b/drivers/include/nrfx_uarte.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_usbd.h b/drivers/include/nrfx_usbd.h index 1069df4c2..a8e36c6d2 100644 --- a/drivers/include/nrfx_usbd.h +++ b/drivers/include/nrfx_usbd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/include/nrfx_usbreg.h b/drivers/include/nrfx_usbreg.h new file mode 100644 index 000000000..a9a67d0e5 --- /dev/null +++ b/drivers/include/nrfx_usbreg.h @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_USBREG_H__ +#define NRFX_USBREG_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup nrfx_usbreg USBREG driver + * @{ + * @ingroup nrf_usbd + * @ingroup nrf_power + * @brief USB regulators (USBREG) peripheral driver. + */ + +/** @brief Events from USB power system */ +typedef enum { + NRFX_USBREG_EVT_DETECTED, /**< USB power detected on the connector (plugged in). */ + NRFX_USBREG_EVT_REMOVED, /**< USB power removed from the connector. */ + NRFX_USBREG_EVT_READY /**< USB power regulator ready. */ +} nrfx_usbreg_evt_t; + +/** + * @brief USB power state + * + * The single enumerator that holds all data about current state of USB + * related POWER. + * + * Organized this way that higher power state has higher numeric value + */ +typedef enum { + NRFX_USBREG_STATE_DISCONNECTED, /**< No power on USB lines detected. */ + NRFX_USBREG_STATE_CONNECTED, /**< The USB power is detected, but USB power regulator is not ready. */ + NRFX_USBREG_STATE_READY /**< From the power viewpoint, USB is ready for working. */ +} nrfx_usbreg_state_t; + +/** + * @brief Event handler for the USB-related power events. + * + * @param event Event type + */ +typedef void (*nrfx_usbreg_event_handler_t)(nrfx_usbreg_evt_t event); + +/** + * @brief The configuration of the USB-related power events. + * + * Configuration used to enable and configure USB power event handling. + */ +typedef struct +{ + nrfx_usbreg_event_handler_t handler; //!< Event processing. + uint8_t irq_priority; //!< Priority of the USBREG interrupt. +} nrfx_usbreg_config_t; + +/** + * @brief Function for getting the USBREG handler. + * + * @return Handler of the USB power. + */ +nrfx_usbreg_event_handler_t nrfx_usbreg_handler_get(void); + +/** + * @brief Function for initializing the processing of USBREG events. + * + * Configures and sets up the USB power event processing. + * + * @param[in] p_config Configuration structure. Must not be NULL. + * + * @sa nrfx_usbreg_uninit + */ +void nrfx_usbreg_init(nrfx_usbreg_config_t const *p_config); + +/** @brief Function for enabling the processing of USBREG events. */ +void nrfx_usbreg_enable(void); + +/** @brief Function for disabling the processing of USBREG events. */ +void nrfx_usbreg_disable(void); + +/** + * @brief Function for uninitalizing the processing of USBREG events. + * + * @sa nrfx_usbreg_init + */ +void nrfx_usbreg_uninit(void); + +/** + * @brief Function for getting the status of USBREG. + * + * @return Current USB power status. + */ +NRFX_STATIC_INLINE nrfx_usbreg_state_t nrfx_usbreg_usbstatus_get(void); + +#ifndef NRFX_DECLARE_ONLY +NRFX_STATIC_INLINE nrfx_usbreg_state_t nrfx_usbreg_usbstatus_get(void) +{ + uint32_t status = nrf_usbreg_status_get(NRF_USBREGULATOR); + if (0 == (status & NRF_USBREG_STATUS_VBUSDETECT_MASK)) + { + return NRFX_USBREG_STATE_DISCONNECTED; + } + if (0 == (status & NRF_USBREG_STATUS_OUTPUTRDY_MASK)) + { + return NRFX_USBREG_STATE_CONNECTED; + } + return NRFX_USBREG_STATE_READY; +} +#endif // NRFX_DECLARE_ONLY + +/** @} */ + +void nrfx_usbreg_irq_handler(void); + +#ifdef __cplusplus +} +#endif + +#endif // NRFX_USBREG_H__ diff --git a/drivers/include/nrfx_wdt.h b/drivers/include/nrfx_wdt.h index fc46857cc..9866c29d4 100644 --- a/drivers/include/nrfx_wdt.h +++ b/drivers/include/nrfx_wdt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,10 +39,6 @@ extern "C" { #endif -#ifndef NRF_WDT0 -#define NRF_WDT0 NRF_WDT -#endif - /** * @defgroup nrfx_wdt WDT driver * @{ diff --git a/drivers/nrfx_common.h b/drivers/nrfx_common.h index 320fb2920..50ce150fc 100644 --- a/drivers/nrfx_common.h +++ b/drivers/nrfx_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/nrfx_errors.h b/drivers/nrfx_errors.h index 35645fa0d..be360f777 100644 --- a/drivers/nrfx_errors.h +++ b/drivers/nrfx_errors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_adc.c b/drivers/src/nrfx_adc.c index 6dfe7c82b..fbcc9b8d7 100644 --- a/drivers/src/nrfx_adc.c +++ b/drivers/src/nrfx_adc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_clock.c b/drivers/src/nrfx_clock.c index 465942105..593201f00 100644 --- a/drivers/src/nrfx_clock.c +++ b/drivers/src/nrfx_clock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,6 +34,7 @@ #if NRFX_CHECK(NRFX_CLOCK_ENABLED) #include +#include #define NRFX_LOG_MODULE CLOCK #include @@ -42,13 +43,6 @@ extern bool nrfx_power_irq_enabled; #endif -#define EVT_TO_STR(event) \ - (event == NRF_CLOCK_EVENT_HFCLKSTARTED ? "NRF_CLOCK_EVENT_HFCLKSTARTED" : \ - (event == NRF_CLOCK_EVENT_LFCLKSTARTED ? "NRF_CLOCK_EVENT_LFCLKSTARTED" : \ - (event == NRF_CLOCK_EVENT_DONE ? "NRF_CLOCK_EVENT_DONE" : \ - (event == NRF_CLOCK_EVENT_CTTO ? "NRF_CLOCK_EVENT_CTTO" : \ - "UNKNOWN EVENT")))) - #if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) #if (NRF_CLOCK_HAS_CALIBRATION == 0) #error "Calibration is not available in the SoC that is used." @@ -180,7 +174,12 @@ void nrfx_clock_enable(void) NRFX_ASSERT(m_clock_cb.module_initialized); nrfx_power_clock_irq_init(); nrf_clock_lf_src_set(NRF_CLOCK, (nrf_clock_lfclk_t)NRFX_CLOCK_CONFIG_LF_SRC); - +#if NRF_CLOCK_HAS_HFCLKSRC + nrf_clock_hf_src_set(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY); +#endif +#if NRF_CLOCK_HAS_HFCLK192M + nrf_clock_hfclk192m_src_set(NRF_CLOCK, (nrf_clock_hfclk_t)NRFX_CLOCK_CONFIG_HFCLK192M_SRC); +#endif #if NRFX_CHECK(NRFX_POWER_ENABLED) nrfx_clock_irq_enabled = true; #endif @@ -202,8 +201,10 @@ void nrfx_clock_disable(void) CLOCK_INTENSET_LFCLKSTARTED_Msk | #if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) CLOCK_INTENSET_DONE_Msk | +#if NRF_HAS_CALIBRATION_TIMER CLOCK_INTENSET_CTTO_Msk | #endif +#endif // NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) 0); #if NRFX_CHECK(NRFX_POWER_ENABLED) nrfx_clock_irq_enabled = false; @@ -214,49 +215,97 @@ void nrfx_clock_disable(void) void nrfx_clock_uninit(void) { NRFX_ASSERT(m_clock_cb.module_initialized); - nrfx_clock_lfclk_stop(); - nrfx_clock_hfclk_stop(); + nrfx_clock_stop(NRF_CLOCK_DOMAIN_LFCLK); + nrfx_clock_stop(NRF_CLOCK_DOMAIN_HFCLK); +#if NRF_CLOCK_HAS_HFCLK192M + nrfx_clock_stop(NRF_CLOCK_DOMAIN_HFCLK192M); +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + nrfx_clock_stop(NRF_CLOCK_DOMAIN_HFCLKAUDIO); +#endif m_clock_cb.module_initialized = false; NRFX_LOG_INFO("Uninitialized."); } -void nrfx_clock_lfclk_start(void) +void nrfx_clock_start(nrf_clock_domain_t domain) { NRFX_ASSERT(m_clock_cb.module_initialized); - nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_LFCLKSTARTED); - nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_LF_STARTED_MASK); - + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_LFCLKSTARTED); + nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_LF_STARTED_MASK); #if NRFX_CHECK(USE_WORKAROUND_FOR_ANOMALY_132) - nrfx_clock_anomaly_132(); + nrfx_clock_anomaly_132(); #endif - - nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_LFCLKSTART); -} - -void nrfx_clock_lfclk_stop(void) -{ - NRFX_ASSERT(m_clock_cb.module_initialized); - nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_LFCLKSTOP); - while (nrf_clock_lf_is_running(NRF_CLOCK)) - {} -} - -void nrfx_clock_hfclk_start(void) -{ - NRFX_ASSERT(m_clock_cb.module_initialized); - nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKSTARTED); - nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_HF_STARTED_MASK); - nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLKSTART); + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_LFCLKSTART); + break; + case NRF_CLOCK_DOMAIN_HFCLK: + nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKSTARTED); + nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_HF_STARTED_MASK); + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLKSTART); + break; +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLK192MSTARTED); + nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_HF192M_STARTED_MASK); + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLK192MSTART); + break; +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKAUDIOSTARTED); + nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_HFAUDIO_STARTED_MASK); + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLKAUDIOSTART); + break; +#endif + default: + NRFX_ASSERT(0); + break; + } } -void nrfx_clock_hfclk_stop(void) +void nrfx_clock_stop(nrf_clock_domain_t domain) { NRFX_ASSERT(m_clock_cb.module_initialized); - nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLKSTOP); - while (nrf_clock_hf_is_running(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY)) - {} + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_LFCLKSTOP); + break; + case NRF_CLOCK_DOMAIN_HFCLK: + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLKSTOP); + break; +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLK192MSTOP); + break; +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_HFCLKAUDIOSTOP); + break; +#endif + default: + NRFX_ASSERT(0); + return; + } + if (domain == NRF_CLOCK_DOMAIN_HFCLK) + { + nrf_clock_hfclk_t clk_src = NRF_CLOCK_HFCLK_HIGH_ACCURACY; + while (nrfx_clock_is_running(domain, &clk_src) && (clk_src == NRF_CLOCK_HFCLK_HIGH_ACCURACY)) + {} + } + else + { + while (nrfx_clock_is_running(domain, NULL)) + {} + } #if NRFX_CHECK(USE_WORKAROUND_FOR_ANOMALY_201) - m_clock_cb.hfclk_started = false; + if (domain == NRF_CLOCK_DOMAIN_HFCLK) + { + m_clock_cb.hfclk_started = false; + } #endif } @@ -265,12 +314,18 @@ nrfx_err_t nrfx_clock_calibration_start(void) nrfx_err_t err_code = NRFX_SUCCESS; #if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) - if (nrfx_clock_hfclk_is_running() == false) + nrf_clock_hfclk_t clk_src; + if (!nrfx_clock_is_running(NRF_CLOCK_DOMAIN_HFCLK, &clk_src)) + { + return NRFX_ERROR_INVALID_STATE; + } + + if (clk_src != NRF_CLOCK_HFCLK_HIGH_ACCURACY) { return NRFX_ERROR_INVALID_STATE; } - if (nrfx_clock_lfclk_is_running() == false) + if (!nrfx_clock_is_running(NRF_CLOCK_DOMAIN_LFCLK, NULL)) { return NRFX_ERROR_INVALID_STATE; } @@ -310,7 +365,7 @@ nrfx_err_t nrfx_clock_is_calibrating(void) void nrfx_clock_calibration_timer_start(uint8_t interval) { -#if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) +#if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) && NRF_CLOCK_HAS_CALIBRATION_TIMER nrf_clock_cal_timer_timeout_set(NRF_CLOCK, interval); nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_CTTO); nrf_clock_int_enable(NRF_CLOCK, NRF_CLOCK_INT_CTTO_MASK); @@ -320,18 +375,80 @@ void nrfx_clock_calibration_timer_start(uint8_t interval) void nrfx_clock_calibration_timer_stop(void) { -#if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) +#if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) && NRF_CLOCK_HAS_CALIBRATION_TIMER nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_CTTO_MASK); nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_CTSTOP); #endif } +#if NRF_CLOCK_HAS_HFCLK_DIV || NRF_CLOCK_HAS_HFCLK192M +nrfx_err_t nrfx_clock_divider_set(nrf_clock_domain_t domain, + nrf_clock_hfclk_div_t div) +{ + switch(domain) + { +#if NRF_CLOCK_HAS_HFCLK_DIV + case NRF_CLOCK_DOMAIN_HFCLK: + switch (div) + { + case NRF_CLOCK_HFCLK_DIV_2: + NRFX_CRITICAL_SECTION_ENTER(); + if (nrf53_errata_4()) + { + __DSB(); + } + nrf_clock_hfclk_div_set(NRF_CLOCK, div); + if (nrf53_errata_4()) + { + *(volatile uint32_t *)0x5084450C = 0x0; + *(volatile uint32_t *)0x50026548 = 0x0; + *(volatile uint32_t *)0x50081EE4 = 0x0D; + } + NRFX_CRITICAL_SECTION_EXIT(); + break; + case NRF_CLOCK_HFCLK_DIV_1: + NRFX_CRITICAL_SECTION_ENTER(); + if (nrf53_errata_4()) + { + __DSB(); + *(volatile uint32_t *)0x5084450C = 0x4040; + *(volatile uint32_t *)0x50026548 = 0x40; + *(volatile uint32_t *)0x50081EE4 = 0x4D; + } + nrf_clock_hfclk_div_set(NRF_CLOCK, div); + NRFX_CRITICAL_SECTION_EXIT(); + break; + default: + return NRFX_ERROR_INVALID_PARAM; + } + SystemCoreClockUpdate(); + return NRFX_SUCCESS; +#endif +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + if (div > NRF_CLOCK_HFCLK_DIV_4) + { + return NRFX_ERROR_INVALID_PARAM; + } + else + { + nrf_clock_hfclk192m_div_set(NRF_CLOCK, div); + } + return NRFX_SUCCESS; +#endif + default: + NRFX_ASSERT(0); + return NRFX_ERROR_NOT_SUPPORTED; + } +} +#endif + void nrfx_clock_irq_handler(void) { if (nrf_clock_event_check(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKSTARTED)) { nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKSTARTED); - NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRF_CLOCK_EVENT_HFCLKSTARTED)); + NRFX_LOG_DEBUG("Event: NRF_CLOCK_EVENT_HFCLKSTARTED"); nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_HF_STARTED_MASK); #if NRFX_CHECK(USE_WORKAROUND_FOR_ANOMALY_201) @@ -347,21 +464,23 @@ void nrfx_clock_irq_handler(void) if (nrf_clock_event_check(NRF_CLOCK, NRF_CLOCK_EVENT_LFCLKSTARTED)) { nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_LFCLKSTARTED); - NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRF_CLOCK_EVENT_LFCLKSTARTED)); + NRFX_LOG_DEBUG("Event: NRF_CLOCK_EVENT_LFCLKSTARTED"); nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_LF_STARTED_MASK); m_clock_cb.event_handler(NRFX_CLOCK_EVT_LFCLK_STARTED); } #if NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) +#if NRF_CLOCK_HAS_CALIBRATION_TIMER if (nrf_clock_event_check(NRF_CLOCK, NRF_CLOCK_EVENT_CTTO)) { nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_CTTO); - NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRF_CLOCK_EVENT_CTTO)); + NRFX_LOG_DEBUG("Event: NRF_CLOCK_EVENT_CTTO"); nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_CTTO_MASK); m_clock_cb.event_handler(NRFX_CLOCK_EVT_CTTO); } +#endif // NRF_CLOCK_HAS_CALIBRATION_TIMER if (nrf_clock_event_check(NRF_CLOCK, NRF_CLOCK_EVENT_DONE)) { @@ -369,12 +488,34 @@ void nrfx_clock_irq_handler(void) *(volatile uint32_t *)0x40000C34 = 0x00000000; #endif nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_DONE); - NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRF_CLOCK_EVENT_DONE)); + NRFX_LOG_DEBUG("Event: NRF_CLOCK_EVENT_DONE"); nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_DONE_MASK); m_clock_cb.cal_state = CAL_STATE_IDLE; m_clock_cb.event_handler(NRFX_CLOCK_EVT_CAL_DONE); } -#endif // NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) +#endif // NRFX_CHECK(NRFX_CLOCK_CONFIG_LF_CAL_ENABLED) + +#if NRF_CLOCK_HAS_HFCLKAUDIO + if (nrf_clock_event_check(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKAUDIOSTARTED)) + { + nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLKAUDIOSTARTED); + NRFX_LOG_DEBUG("Event: NRF_CLOCK_EVENT_HFCLKAUDIOSTARTED"); + nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_HFAUDIO_STARTED_MASK); + + m_clock_cb.event_handler(NRFX_CLOCK_EVT_HFCLKAUDIO_STARTED); + } +#endif + +#if NRF_CLOCK_HAS_HFCLK192M + if (nrf_clock_event_check(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLK192MSTARTED)) + { + nrf_clock_event_clear(NRF_CLOCK, NRF_CLOCK_EVENT_HFCLK192MSTARTED); + NRFX_LOG_DEBUG("Event: NRF_CLOCK_EVENT_HFCLK192MSTARTED"); + nrf_clock_int_disable(NRF_CLOCK, NRF_CLOCK_INT_HF192M_STARTED_MASK); + + m_clock_cb.event_handler(NRFX_CLOCK_EVT_HFCLK192M_STARTED); + } +#endif } #endif // NRFX_CHECK(NRFX_CLOCK_ENABLED) diff --git a/drivers/src/nrfx_comp.c b/drivers/src/nrfx_comp.c index c8ebb4d6c..84c23d1be 100644 --- a/drivers/src/nrfx_comp.c +++ b/drivers/src/nrfx_comp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_dppi.c b/drivers/src/nrfx_dppi.c index 3c7df6a83..a84586709 100644 --- a/drivers/src/nrfx_dppi.c +++ b/drivers/src/nrfx_dppi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_egu.c b/drivers/src/nrfx_egu.c index 9948f39ec..07fccaf3e 100644 --- a/drivers/src/nrfx_egu.c +++ b/drivers/src/nrfx_egu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_gpiote.c b/drivers/src/nrfx_gpiote.c index 515b289e3..73f8e44b8 100644 --- a/drivers/src/nrfx_gpiote.c +++ b/drivers/src/nrfx_gpiote.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,11 +44,11 @@ #define PIN_NOT_USED (-1) #define PIN_USED (-2) #define NO_CHANNELS (-1) -#define SENSE_FIELD_POS (6) -#define SENSE_FIELD_MASK (0xC0) +#define POLARITY_FIELD_POS (6) +#define POLARITY_FIELD_MASK (0xC0) /* Check if every pin can be encoded on provided number of bits. */ -NRFX_STATIC_ASSERT(NUMBER_OF_PINS <= (1 << SENSE_FIELD_POS)); +NRFX_STATIC_ASSERT(NUMBER_OF_PINS <= (1 << POLARITY_FIELD_POS)); /*lint -save -e571*/ /* Suppress "Warning 571: Suspicious cast" */ typedef struct @@ -145,6 +145,17 @@ static nrfx_gpiote_evt_handler_t channel_handler_get(uint32_t channel) return m_cb.handlers[channel]; } +static nrfx_gpiote_pin_t port_handler_pin_get(uint32_t handler_idx) +{ + uint8_t pin_and_polarity = (uint8_t)m_cb.port_handlers_pins[handler_idx]; + return (nrfx_gpiote_pin_t)(pin_and_polarity & ~POLARITY_FIELD_MASK); +} + +static nrf_gpiote_polarity_t port_handler_polarity_get(uint32_t handler_idx) +{ + uint8_t pin_and_polarity = (uint8_t)m_cb.port_handlers_pins[handler_idx]; + return (nrf_gpiote_polarity_t)((pin_and_polarity & POLARITY_FIELD_MASK) >> POLARITY_FIELD_POS); +} static int8_t channel_port_alloc(uint32_t pin, nrfx_gpiote_evt_handler_t handler, bool channel) { @@ -522,7 +533,7 @@ nrfx_err_t nrfx_gpiote_in_init(nrfx_gpiote_pin_t pin, else { m_cb.port_handlers_pins[channel - GPIOTE_CH_NUM] |= (p_config->sense) << - SENSE_FIELD_POS; + POLARITY_FIELD_POS; } } else @@ -541,10 +552,8 @@ void nrfx_gpiote_in_event_enable(nrfx_gpiote_pin_t pin, bool int_enable) NRFX_ASSERT(pin_in_use_by_gpiote(pin)); if (pin_in_use_by_port(pin)) { - uint8_t pin_and_sense = (uint8_t) - m_cb.port_handlers_pins[channel_port_get(pin) - GPIOTE_CH_NUM]; nrf_gpiote_polarity_t polarity = - (nrf_gpiote_polarity_t)(pin_and_sense >> SENSE_FIELD_POS); + port_handler_polarity_get(channel_port_get(pin) - GPIOTE_CH_NUM); nrf_gpio_pin_sense_t sense; if (polarity == NRF_GPIOTE_POLARITY_TOGGLE) { @@ -643,6 +652,159 @@ uint32_t nrfx_gpiote_in_event_addr_get(nrfx_gpiote_pin_t pin) return nrf_gpiote_event_address_get(NRF_GPIOTE, event); } +#if defined(NRF_GPIO_LATCH_PRESENT) +static bool latch_pending_read_and_check(uint32_t * latch) +{ + nrf_gpio_latches_read_and_clear(0, GPIO_COUNT, latch); + + for (uint32_t port_idx = 0; port_idx < GPIO_COUNT; port_idx++) + { + if (latch[port_idx]) + { + /* If any of the latch bits is still set, it means another edge has been captured + * before or during the interrupt processing. Therefore event-processing loop + * should be executed again. */ + return true; + } + } + return false; +} + +static void port_event_handle(uint32_t * latch) +{ + do { + for (uint32_t i = 0; i < NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS; i++) + { + if (m_cb.port_handlers_pins[i] == PIN_NOT_USED) + { + continue; + } + + /* Process pin further only if LATCH bit associated with this pin was set. */ + nrfx_gpiote_pin_t pin = port_handler_pin_get(i); + if (nrf_bitmask_bit_is_set(pin, latch)) + { + nrf_gpiote_polarity_t polarity = port_handler_polarity_get(i); + nrf_gpio_pin_sense_t sense = nrf_gpio_pin_sense_get(pin); + + NRFX_LOG_DEBUG("PORT event for pin: %d, polarity: %d.", pin, polarity); + + /* Reconfigure sense to the opposite level, so the internal PINx.DETECT signal + * can be deasserted. Therefore PORT event generated again, + * unless some other PINx.DETECT signal is still active. */ + nrf_gpio_pin_sense_t next_sense = + (sense == NRF_GPIO_PIN_SENSE_HIGH) ? NRF_GPIO_PIN_SENSE_LOW : + NRF_GPIO_PIN_SENSE_HIGH; + nrf_gpio_cfg_sense_set(pin, next_sense); + + /* Try to clear LATCH bit corresponding to currently processed pin. + * This may not succeed if the pin's state changed during the interrupt processing + * and now it matches the new sense configuration. In such case, + * the pin will be processed again in another iteration of the outer loop. */ + nrf_gpio_pin_latch_clear(pin); + + /* Invoke user handler only if the sensed pin level + * matches its polarity configuration. */ + nrfx_gpiote_evt_handler_t handler = + channel_handler_get((uint32_t)channel_port_get(pin)); + if (handler && + ((polarity == NRF_GPIOTE_POLARITY_TOGGLE) || + (sense == NRF_GPIO_PIN_SENSE_HIGH && polarity == NRF_GPIOTE_POLARITY_LOTOHI) || + (sense == NRF_GPIO_PIN_SENSE_LOW && polarity == NRF_GPIOTE_POLARITY_HITOLO))) + { + handler(pin, polarity); + } + } + } + } while (latch_pending_read_and_check(latch)); +} + +#else + +static bool input_read_and_check(uint32_t * input, uint32_t * pins_to_check) +{ + bool process_inputs_again; + uint32_t new_input[GPIO_COUNT]; + + nrf_gpio_ports_read(0, GPIO_COUNT, new_input); + + process_inputs_again = false; + for (uint32_t port_idx = 0; port_idx < GPIO_COUNT; port_idx++) + { + /* Execute XOR to find out which inputs have changed. */ + uint32_t input_diff = input[port_idx] ^ new_input[port_idx]; + input[port_idx] = new_input[port_idx]; + if (input_diff) + { + /* If any differences among inputs were found, mark those pins + * to be processed again. */ + pins_to_check[port_idx] = input_diff; + process_inputs_again = true; + } + else + { + pins_to_check[port_idx] = 0; + } + } + return process_inputs_again; +} + +static void port_event_handle(uint32_t * input) +{ + uint32_t pins_to_check[GPIO_COUNT]; + + for (uint32_t port_idx = 0; port_idx < GPIO_COUNT; port_idx++) + { + pins_to_check[port_idx] = 0xFFFFFFFF; + } + + do { + for (uint32_t i = 0; i < NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS; i++) + { + if (m_cb.port_handlers_pins[i] == PIN_NOT_USED) + { + continue; + } + + nrfx_gpiote_pin_t pin = port_handler_pin_get(i); + if (nrf_bitmask_bit_is_set(pin, pins_to_check)) + { + nrf_gpiote_polarity_t polarity = port_handler_polarity_get(i); + nrf_gpio_pin_sense_t sense = nrf_gpio_pin_sense_get(pin); + bool pin_state = nrf_bitmask_bit_is_set(pin, input); + + /* Process pin further only if its state matches its sense level. */ + if ((pin_state && (sense == NRF_GPIO_PIN_SENSE_HIGH)) || + (!pin_state && (sense == NRF_GPIO_PIN_SENSE_LOW)) ) + { + /* Reconfigure sense to the opposite level, so the internal PINx.DETECT signal + * can be deasserted. Therefore PORT event can be generated again, + * unless some other PINx.DETECT signal is still active. */ + NRFX_LOG_DEBUG("PORT event for pin: %d, polarity: %d.", pin, polarity); + nrf_gpio_pin_sense_t next_sense = + (sense == NRF_GPIO_PIN_SENSE_HIGH) ? NRF_GPIO_PIN_SENSE_LOW : + NRF_GPIO_PIN_SENSE_HIGH; + nrf_gpio_cfg_sense_set(pin, next_sense); + + /* Invoke user handler only if the sensed pin level + * matches its polarity configuration. */ + nrfx_gpiote_evt_handler_t handler = + channel_handler_get((uint32_t)channel_port_get(pin)); + if (handler && + ((polarity == NRF_GPIOTE_POLARITY_TOGGLE) || + (sense == NRF_GPIO_PIN_SENSE_HIGH && + polarity == NRF_GPIOTE_POLARITY_LOTOHI) || + (sense == NRF_GPIO_PIN_SENSE_LOW && + polarity == NRF_GPIOTE_POLARITY_HITOLO))) + { + handler(pin, polarity); + } + } + } + } + } while (input_read_and_check(input, pins_to_check)); +} +#endif // defined(NRF_GPIO_LATCH_PRESENT) void nrfx_gpiote_irq_handler(void) { @@ -674,7 +836,11 @@ void nrfx_gpiote_irq_handler(void) { nrf_gpiote_event_clear(NRF_GPIOTE, NRF_GPIOTE_EVENT_PORT); status |= (uint32_t)NRF_GPIOTE_INT_PORT_MASK; +#if defined(NRF_GPIO_LATCH_PRESENT) + nrf_gpio_latches_read_and_clear(0, GPIO_COUNT, input); +#else nrf_gpio_ports_read(0, GPIO_COUNT, input); +#endif } /* Process pin events. */ @@ -700,107 +866,10 @@ void nrfx_gpiote_irq_handler(void) } } + /* Process PORT event. */ if (status & (uint32_t)NRF_GPIOTE_INT_PORT_MASK) { - /* Process port event. */ - uint32_t port_idx; - uint8_t repeat = 0; - uint32_t toggle_mask[GPIO_COUNT] = {0}; - uint32_t pins_to_check[GPIO_COUNT]; - - // Faster way of doing memset because in interrupt context. - for (port_idx = 0; port_idx < GPIO_COUNT; port_idx++) - { - pins_to_check[port_idx] = 0xFFFFFFFF; - } - - do - { - repeat = 0; - - for (i = 0; i < NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS; i++) - { - uint8_t pin_and_sense = (uint8_t)m_cb.port_handlers_pins[i]; - nrfx_gpiote_pin_t pin = (pin_and_sense & ~SENSE_FIELD_MASK); - - if ((m_cb.port_handlers_pins[i] != PIN_NOT_USED) - && nrf_bitmask_bit_is_set(pin, pins_to_check)) - { - nrf_gpiote_polarity_t polarity = - (nrf_gpiote_polarity_t)((pin_and_sense & - SENSE_FIELD_MASK) >> SENSE_FIELD_POS); - nrfx_gpiote_evt_handler_t handler = - channel_handler_get((uint32_t)channel_port_get(pin)); - if (handler || (polarity == NRF_GPIOTE_POLARITY_TOGGLE)) - { - if (polarity == NRF_GPIOTE_POLARITY_TOGGLE) - { - nrf_bitmask_bit_set(pin, toggle_mask); - } - nrf_gpio_pin_sense_t sense = nrf_gpio_pin_sense_get(pin); - uint32_t pin_state = nrf_bitmask_bit_is_set(pin, input); - if ((pin_state && (sense == NRF_GPIO_PIN_SENSE_HIGH)) || - (!pin_state && (sense == NRF_GPIO_PIN_SENSE_LOW)) ) - { - NRFX_LOG_DEBUG("PORT event for pin: %d, polarity: %d.", pin, polarity); - if (polarity == NRF_GPIOTE_POLARITY_TOGGLE) - { - nrf_gpio_pin_sense_t next_sense = - (sense == NRF_GPIO_PIN_SENSE_HIGH) ? - NRF_GPIO_PIN_SENSE_LOW : - NRF_GPIO_PIN_SENSE_HIGH; - nrf_gpio_cfg_sense_set(pin, next_sense); - ++repeat; - - } - if (handler) - { - handler(pin, polarity); - } - } - } - } - } - - if (repeat) - { - // When one of the pins in low-accuracy and toggle mode becomes active, - // it's sense mode is inverted to clear the internal SENSE signal. - // State of any other enabled low-accuracy input in toggle mode must be checked - // explicitly, because it does not trigger the interrput when SENSE signal is active. - // For more information about SENSE functionality, refer to Product Specification. - - uint32_t new_input[GPIO_COUNT]; - bool input_unchanged = true; - nrf_gpio_ports_read(0, GPIO_COUNT, new_input); - - // Faster way of doing memcmp because in interrupt context. - for (port_idx = 0; port_idx < GPIO_COUNT; port_idx++) - { - if (new_input[port_idx] != input[port_idx]) - { - input_unchanged = false; - break; - } - } - - if (input_unchanged) - { - // No change. - repeat = 0; - } - else - { - // Faster way of doing memcpy because in interrupt context. - for (port_idx = 0; port_idx < GPIO_COUNT; port_idx++) - { - input[port_idx] = new_input[port_idx]; - pins_to_check[port_idx] = toggle_mask[port_idx]; - } - } - } - } - while (repeat); + port_event_handle(input); } } diff --git a/drivers/src/nrfx_i2s.c b/drivers/src/nrfx_i2s.c index d90d6f055..6072083ad 100644 --- a/drivers/src/nrfx_i2s.c +++ b/drivers/src/nrfx_i2s.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -167,6 +167,10 @@ nrfx_err_t nrfx_i2s_init(nrfx_i2s_config_t const * p_config, NRFX_LOG_ERROR_STRING_GET(err_code)); return err_code; } + +#if NRF_I2S_HAS_CLKCONFIG + nrf_i2s_clk_configure(NRF_I2S, p_config->clksrc, p_config->enable_bypass); +#endif configure_pins(p_config); m_cb.handler = handler; @@ -377,12 +381,18 @@ void nrfx_i2s_irq_handler(void) nrf_i2s_disable(NRF_I2S); // When stopped, release all buffers, including these scheduled for - // the next transfer. + // the next part of the transfer, and signal that the transfer has + // finished. + m_cb.handler(&m_cb.current_buffers, 0); - m_cb.handler(&m_cb.next_buffers, 0); + // Change the state of the driver before calling the handler with + // the flag signaling that the transfer has finished, so that it is + // possible to start a new transfer directly from the handler function. m_cb.state = NRFX_DRV_STATE_INITIALIZED; NRFX_LOG_INFO("Stopped."); + + m_cb.handler(&m_cb.next_buffers, NRFX_I2S_STATUS_TRANSFER_STOPPED); } else { diff --git a/drivers/src/nrfx_ipc.c b/drivers/src/nrfx_ipc.c index dcfd28abe..f47b70ccc 100644 --- a/drivers/src/nrfx_ipc.c +++ b/drivers/src/nrfx_ipc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_lpcomp.c b/drivers/src/nrfx_lpcomp.c index 9e654e46e..bbc51c8a6 100644 --- a/drivers/src/nrfx_lpcomp.c +++ b/drivers/src/nrfx_lpcomp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_nfct.c b/drivers/src/nrfx_nfct.c index fa8116e1c..952ba64f9 100644 --- a/drivers/src/nrfx_nfct.c +++ b/drivers/src/nrfx_nfct.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_nvmc.c b/drivers/src/nrfx_nvmc.c index f4e93caec..7eff9949a 100644 --- a/drivers/src/nrfx_nvmc.c +++ b/drivers/src/nrfx_nvmc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,13 @@ */ #define NVMC_BYTES_IN_WORD 4 +/** Value representing non-volatile memory (NVM) base address. */ +#if defined(NRF5340_XXAA_NETWORK) + #define NVMC_FLASH_BASE_ADDRESS 0x01000000uL +#else + #define NVMC_FLASH_BASE_ADDRESS 0 +#endif + /** * Value representing non-volatile memory (NVM) page count. * @@ -211,7 +218,7 @@ static void nvmc_words_write(uint32_t addr, void const * src, uint32_t num_words nrfx_err_t nrfx_nvmc_page_erase(uint32_t addr) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); if (!is_page_aligned_check(addr)) { @@ -253,7 +260,7 @@ void nrfx_nvmc_all_erase(void) #if defined(NRF_NVMC_PARTIAL_ERASE_PRESENT) nrfx_err_t nrfx_nvmc_page_partial_erase_init(uint32_t addr, uint32_t duration_ms) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); if (!is_page_aligned_check(addr)) { @@ -299,7 +306,7 @@ bool nrfx_nvmc_page_partial_erase_continue(void) bool nrfx_nvmc_byte_writable_check(uint32_t addr, uint8_t val_to_check) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); uint8_t val_on_addr = *(uint8_t const *)addr; return (val_to_check & val_on_addr) == val_to_check; @@ -307,7 +314,7 @@ bool nrfx_nvmc_byte_writable_check(uint32_t addr, uint8_t val_to_check) bool nrfx_nvmc_word_writable_check(uint32_t addr, uint32_t val_to_check) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); NRFX_ASSERT(nrfx_is_word_aligned((void const *)addr)); uint32_t val_on_addr = *(uint32_t const *)addr; @@ -323,7 +330,7 @@ void nrfx_nvmc_byte_write(uint32_t addr, uint8_t value) void nrfx_nvmc_word_write(uint32_t addr, uint32_t value) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); NRFX_ASSERT(nrfx_is_word_aligned((void const *)addr)); nvmc_write_mode_set(); @@ -335,7 +342,7 @@ void nrfx_nvmc_word_write(uint32_t addr, uint32_t value) void nrfx_nvmc_bytes_write(uint32_t addr, void const * src, uint32_t num_bytes) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); nvmc_write_mode_set(); @@ -397,7 +404,7 @@ void nrfx_nvmc_bytes_write(uint32_t addr, void const * src, uint32_t num_bytes) void nrfx_nvmc_words_write(uint32_t addr, void const * src, uint32_t num_words) { - NRFX_ASSERT(addr < flash_total_size_get()); + NRFX_ASSERT((addr - NVMC_FLASH_BASE_ADDRESS) < flash_total_size_get()); NRFX_ASSERT(nrfx_is_word_aligned((void const *)addr)); NRFX_ASSERT(nrfx_is_word_aligned(src)); diff --git a/drivers/src/nrfx_pdm.c b/drivers/src/nrfx_pdm.c index 8b14b33a3..7bd1bcebd 100644 --- a/drivers/src/nrfx_pdm.c +++ b/drivers/src/nrfx_pdm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,9 +73,9 @@ static nrfx_pdm_cb_t m_cb; void nrfx_pdm_irq_handler(void) { - if (nrf_pdm_event_check(NRF_PDM, NRF_PDM_EVENT_STARTED)) + if (nrf_pdm_event_check(NRF_PDM0, NRF_PDM_EVENT_STARTED)) { - nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STARTED); + nrf_pdm_event_clear(NRF_PDM0, NRF_PDM_EVENT_STARTED); NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRF_PDM_EVENT_STARTED)); uint8_t finished_buffer = m_cb.active_buffer; @@ -125,11 +125,11 @@ void nrfx_pdm_irq_handler(void) m_cb.op_state = NRFX_PDM_STATE_RUNNING; } } - else if (nrf_pdm_event_check(NRF_PDM, NRF_PDM_EVENT_STOPPED)) + else if (nrf_pdm_event_check(NRF_PDM0, NRF_PDM_EVENT_STOPPED)) { - nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STOPPED); + nrf_pdm_event_clear(NRF_PDM0, NRF_PDM_EVENT_STOPPED); NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRF_PDM_EVENT_STOPPED)); - nrf_pdm_disable(NRF_PDM); + nrf_pdm_disable(NRF_PDM0); m_cb.op_state = NRFX_PDM_STATE_IDLE; // Release the buffers. @@ -200,21 +200,28 @@ nrfx_err_t nrfx_pdm_init(nrfx_pdm_config_t const * p_config, m_cb.event_handler = event_handler; m_cb.op_state = NRFX_PDM_STATE_IDLE; - nrf_pdm_clock_set(NRF_PDM, p_config->clock_freq); - nrf_pdm_mode_set(NRF_PDM, p_config->mode, p_config->edge); - nrf_pdm_gain_set(NRF_PDM, p_config->gain_l, p_config->gain_r); +#if NRF_PDM_HAS_RATIO_CONFIG + nrf_pdm_ratio_set(NRF_PDM0, p_config->ratio); +#endif + +#if NRF_PDM_HAS_MCLKCONFIG + nrf_pdm_mclksrc_configure(NRF_PDM0, p_config->mclksrc); +#endif + nrf_pdm_clock_set(NRF_PDM0, p_config->clock_freq); + nrf_pdm_mode_set(NRF_PDM0, p_config->mode, p_config->edge); + nrf_pdm_gain_set(NRF_PDM0, p_config->gain_l, p_config->gain_r); nrf_gpio_cfg_output(p_config->pin_clk); nrf_gpio_pin_clear(p_config->pin_clk); nrf_gpio_cfg_input(p_config->pin_din, NRF_GPIO_PIN_NOPULL); - nrf_pdm_psel_connect(NRF_PDM, p_config->pin_clk, p_config->pin_din); - - nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STARTED); - nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_END); - nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STOPPED); - nrf_pdm_int_enable(NRF_PDM, NRF_PDM_INT_STARTED | NRF_PDM_INT_STOPPED); - NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(NRF_PDM), p_config->interrupt_priority); - NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_PDM)); + nrf_pdm_psel_connect(NRF_PDM0, p_config->pin_clk, p_config->pin_din); + + nrf_pdm_event_clear(NRF_PDM0, NRF_PDM_EVENT_STARTED); + nrf_pdm_event_clear(NRF_PDM0, NRF_PDM_EVENT_END); + nrf_pdm_event_clear(NRF_PDM0, NRF_PDM_EVENT_STOPPED); + nrf_pdm_int_enable(NRF_PDM0, NRF_PDM_INT_STARTED | NRF_PDM_INT_STOPPED); + NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(NRF_PDM0), p_config->interrupt_priority); + NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_PDM0)); m_cb.drv_state = NRFX_DRV_STATE_INITIALIZED; err_code = NRFX_SUCCESS; @@ -226,8 +233,8 @@ nrfx_err_t nrfx_pdm_init(nrfx_pdm_config_t const * p_config, void nrfx_pdm_uninit(void) { - nrf_pdm_disable(NRF_PDM); - nrf_pdm_psel_disconnect(NRF_PDM); + nrf_pdm_disable(NRF_PDM0); + nrf_pdm_psel_disconnect(NRF_PDM0); m_cb.drv_state = NRFX_DRV_STATE_UNINITIALIZED; NRFX_LOG_INFO("Uninitialized."); } @@ -235,15 +242,15 @@ void nrfx_pdm_uninit(void) static void pdm_start() { m_cb.drv_state = NRFX_DRV_STATE_POWERED_ON; - nrf_pdm_enable(NRF_PDM); - nrf_pdm_event_clear(NRF_PDM, NRF_PDM_EVENT_STARTED); - nrf_pdm_task_trigger(NRF_PDM, NRF_PDM_TASK_START); + nrf_pdm_enable(NRF_PDM0); + nrf_pdm_event_clear(NRF_PDM0, NRF_PDM_EVENT_STARTED); + nrf_pdm_task_trigger(NRF_PDM0, NRF_PDM_TASK_START); } static void pdm_buf_request() { m_cb.irq_buff_request = 1; - NRFX_IRQ_PENDING_SET(nrfx_get_irq_number(NRF_PDM)); + NRFX_IRQ_PENDING_SET(nrfx_get_irq_number(NRF_PDM0)); } nrfx_err_t nrfx_pdm_start(void) @@ -296,7 +303,7 @@ nrfx_err_t nrfx_pdm_buffer_set(int16_t * buffer, uint16_t buffer_length) nrfx_err_t err_code = NRFX_SUCCESS; // Enter the PDM critical section. - NRFX_IRQ_DISABLE(nrfx_get_irq_number(NRF_PDM)); + NRFX_IRQ_DISABLE(nrfx_get_irq_number(NRF_PDM0)); uint8_t next_buffer = (~m_cb.active_buffer) & 0x01; if (m_cb.op_state == NRFX_PDM_STATE_STARTING) @@ -313,7 +320,7 @@ nrfx_err_t nrfx_pdm_buffer_set(int16_t * buffer, uint16_t buffer_length) { m_cb.buff_address[next_buffer] = buffer; m_cb.buff_length[next_buffer] = buffer_length; - nrf_pdm_buffer_set(NRF_PDM, (uint32_t *)buffer, buffer_length); + nrf_pdm_buffer_set(NRF_PDM0, (uint32_t *)buffer, buffer_length); if (m_cb.drv_state != NRFX_DRV_STATE_POWERED_ON) { @@ -321,7 +328,7 @@ nrfx_err_t nrfx_pdm_buffer_set(int16_t * buffer, uint16_t buffer_length) } } - NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_PDM)); + NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_PDM0)); return err_code; } @@ -335,7 +342,7 @@ nrfx_err_t nrfx_pdm_stop(void) if (m_cb.op_state == NRFX_PDM_STATE_IDLE || m_cb.op_state == NRFX_PDM_STATE_STARTING) { - nrf_pdm_disable(NRF_PDM); + nrf_pdm_disable(NRF_PDM0); m_cb.op_state = NRFX_PDM_STATE_IDLE; err_code = NRFX_SUCCESS; NRFX_LOG_INFO("Function: %s, error code: %s.", @@ -352,7 +359,7 @@ nrfx_err_t nrfx_pdm_stop(void) m_cb.drv_state = NRFX_DRV_STATE_INITIALIZED; m_cb.op_state = NRFX_PDM_STATE_STOPPING; - nrf_pdm_task_trigger(NRF_PDM, NRF_PDM_TASK_STOP); + nrf_pdm_task_trigger(NRF_PDM0, NRF_PDM_TASK_STOP); err_code = NRFX_SUCCESS; NRFX_LOG_INFO("Function: %s, error code: %s.", __func__, NRFX_LOG_ERROR_STRING_GET(err_code)); return err_code; diff --git a/drivers/src/nrfx_power.c b/drivers/src/nrfx_power.c index 5bb5da8fe..3327c14a7 100644 --- a/drivers/src/nrfx_power.c +++ b/drivers/src/nrfx_power.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,9 +34,6 @@ #if NRFX_CHECK(NRFX_POWER_ENABLED) #include -#if defined(REGULATORS_PRESENT) -#include -#endif #if NRFX_CHECK(NRFX_CLOCK_ENABLED) extern bool nrfx_clock_irq_enabled; @@ -108,7 +105,10 @@ nrfx_err_t nrfx_power_init(nrfx_power_config_t const * p_config) #if NRF_POWER_HAS_DCDCEN_VDDH nrf_power_dcdcen_vddh_set(NRF_POWER, p_config->dcdcenhv); +#elif NRF_REGULATORS_HAS_DCDCEN_VDDH + nrf_regulators_dcdcen_vddh_set(NRF_REGULATORS, p_config->dcdcenhv); #endif + #if NRF_POWER_HAS_DCDCEN nrf_power_dcdcen_set(NRF_POWER, p_config->dcdcen); #elif defined(REGULATORS_PRESENT) @@ -132,19 +132,19 @@ void nrfx_power_uninit(void) { NRFX_IRQ_DISABLE(nrfx_get_irq_number(NRF_POWER)); } -#if NRF_POWER_HAS_POFCON +#if NRFX_POWER_SUPPORTS_POFCON nrfx_power_pof_uninit(); #endif #if NRF_POWER_HAS_SLEEPEVT nrfx_power_sleepevt_uninit(); #endif -#if NRF_POWER_HAS_USBREG +#if NRF_POWER_HAS_USBREG || defined(USBREG_PRESENT) nrfx_power_usbevt_uninit(); #endif m_initialized = false; } -#if NRF_POWER_HAS_POFCON +#if NRFX_POWER_SUPPORTS_POFCON void nrfx_power_pof_init(nrfx_power_pofwarn_config_t const * p_config) { NRFX_ASSERT(p_config != NULL); @@ -159,10 +159,18 @@ void nrfx_power_pof_init(nrfx_power_pofwarn_config_t const * p_config) void nrfx_power_pof_enable(nrfx_power_pofwarn_config_t const * p_config) { +#if NRF_POWER_HAS_POFCON nrf_power_pofcon_set(NRF_POWER, true, p_config->thr); -#if NRF_POWER_HAS_VDDH +#elif NRF_REGULATORS_HAS_POFCON + nrf_regulators_pofcon_set(NRF_REGULATORS, true, p_config->thr); +#endif + +#if NRF_POWER_HAS_POFCON_VDDH nrf_power_pofcon_vddh_set(NRF_POWER, p_config->thrvddh); +#elif NRF_REGULATORS_HAS_POFCON_VDDH + nrf_regulators_pofcon_vddh_set(NRF_REGULATORS, p_config->thrvddh); #endif + if (m_pofwarn_handler != NULL) { nrf_power_int_enable(NRF_POWER, NRF_POWER_INT_POFWARN_MASK); @@ -171,7 +179,11 @@ void nrfx_power_pof_enable(nrfx_power_pofwarn_config_t const * p_config) void nrfx_power_pof_disable(void) { +#if NRF_POWER_HAS_POFCON nrf_power_pofcon_set(NRF_POWER, false, NRF_POWER_POFTHR_V27); +#elif NRF_REGULATORS_HAS_POFCON + nrf_regulators_pofcon_set(NRF_REGULATORS, false, NRF_REGULATORS_POFTHR_V27); +#endif nrf_power_int_disable(NRF_POWER, NRF_POWER_INT_POFWARN_MASK); } @@ -179,7 +191,7 @@ void nrfx_power_pof_uninit(void) { m_pofwarn_handler = NULL; } -#endif // NRF_POWER_HAS_POFCON +#endif // NRFX_POWER_SUPPORTS_POFCON #if NRF_POWER_HAS_SLEEPEVT void nrfx_power_sleepevt_init(nrfx_power_sleepevt_config_t const * p_config) @@ -249,8 +261,11 @@ void nrfx_power_usbevt_disable(void) void nrfx_power_usbevt_uninit(void) { + nrfx_power_usbevt_disable(); m_usbevt_handler = NULL; } + + #endif /* NRF_POWER_HAS_USBREG */ @@ -258,7 +273,7 @@ void nrfx_power_irq_handler(void) { uint32_t enabled = nrf_power_int_enable_get(NRF_POWER); -#if NRF_POWER_HAS_POFCON +#if NRFX_POWER_SUPPORTS_POFCON if ((0 != (enabled & NRF_POWER_INT_POFWARN_MASK)) && nrf_power_event_get_and_clear(NRF_POWER, NRF_POWER_EVENT_POFWARN)) { diff --git a/drivers/src/nrfx_ppi.c b/drivers/src/nrfx_ppi.c index 7981c1e5f..de7f65f7e 100644 --- a/drivers/src/nrfx_ppi.c +++ b/drivers/src/nrfx_ppi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_pwm.c b/drivers/src/nrfx_pwm.c index fd188075b..d89bc7ca4 100644 --- a/drivers/src/nrfx_pwm.c +++ b/drivers/src/nrfx_pwm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,16 +94,16 @@ static void configure_pins(nrfx_pwm_t const * p_instance, if (!p_config->skip_gpio_cfg) { - if (inverted) - { - nrf_gpio_pin_set(out_pins[i]); - } - else - { - nrf_gpio_pin_clear(out_pins[i]); - } - - nrf_gpio_cfg_output(out_pins[i]); + if (inverted) + { + nrf_gpio_pin_set(out_pins[i]); + } + else + { + nrf_gpio_pin_clear(out_pins[i]); + } + + nrf_gpio_cfg_output(out_pins[i]); } } else @@ -368,14 +368,22 @@ bool nrfx_pwm_stop(nrfx_pwm_t const * p_instance, bool ret_val = false; + // Deactivate shortcuts before triggering the STOP task, otherwise the PWM + // could be immediately started again if the LOOPSDONE event occurred in + // the same peripheral clock cycle as the STOP task was triggered. + nrf_pwm_shorts_set(p_instance->p_registers, 0); + + // Trigger the STOP task even if the PWM appears to be already stopped. + // It won't harm, but it could help if for some strange reason the stopped + // status was not reported correctly. + nrf_pwm_task_trigger(p_instance->p_registers, NRF_PWM_TASK_STOP); + if (nrfx_pwm_is_stopped(p_instance)) { ret_val = true; } else { - nrf_pwm_task_trigger(p_instance->p_registers, NRF_PWM_TASK_STOP); - do { if (nrfx_pwm_is_stopped(p_instance)) { diff --git a/drivers/src/nrfx_qdec.c b/drivers/src/nrfx_qdec.c index 81937e0c7..a83e28c5a 100644 --- a/drivers/src/nrfx_qdec.c +++ b/drivers/src/nrfx_qdec.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -141,8 +141,8 @@ nrfx_err_t nrfx_qdec_init(nrfx_qdec_config_t const * p_config, } nrf_qdec_int_enable(NRF_QDEC, int_mask); - NRFX_IRQ_PRIORITY_SET(QDEC_IRQn, p_config->interrupt_priority); - NRFX_IRQ_ENABLE(QDEC_IRQn); + NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(NRF_QDEC), p_config->interrupt_priority); + NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_QDEC)); m_state = NRFX_DRV_STATE_INITIALIZED; @@ -155,7 +155,7 @@ void nrfx_qdec_uninit(void) { NRFX_ASSERT(m_state != NRFX_DRV_STATE_UNINITIALIZED); nrfx_qdec_disable(); - NRFX_IRQ_DISABLE(QDEC_IRQn); + NRFX_IRQ_DISABLE(nrfx_get_irq_number(NRF_QDEC)); m_state = NRFX_DRV_STATE_UNINITIALIZED; NRFX_LOG_INFO("Uninitialized."); } diff --git a/drivers/src/nrfx_qspi.c b/drivers/src/nrfx_qspi.c index 458301701..3983e8c95 100644 --- a/drivers/src/nrfx_qspi.c +++ b/drivers/src/nrfx_qspi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -394,6 +394,50 @@ nrfx_err_t nrfx_qspi_chip_erase(void) return nrfx_qspi_erase(NRF_QSPI_ERASE_LEN_ALL, 0); } +#if NRF_QSPI_HAS_XIP_ENC +nrfx_err_t nrfx_qspi_xip_encrypt(nrf_qspi_encryption_t const * p_config) +{ + if (m_cb.is_busy) + { + return NRFX_ERROR_BUSY; + } + + if (p_config) + { + nrf_qspi_xip_encryption_configure(NRF_QSPI, p_config); + nrf_qspi_xip_encryption_set(NRF_QSPI, true); + } + else + { + nrf_qspi_xip_encryption_set(NRF_QSPI, false); + } + + return NRFX_SUCCESS; +} +#endif + +#if NRF_QSPI_HAS_DMA_ENC +nrfx_err_t nrfx_qspi_dma_encrypt(nrf_qspi_encryption_t const * p_config) +{ + if (m_cb.is_busy) + { + return NRFX_ERROR_BUSY; + } + + if (p_config) + { + nrf_qspi_dma_encryption_configure(NRF_QSPI, p_config); + nrf_qspi_dma_encryption_set(NRF_QSPI, true); + } + else + { + nrf_qspi_dma_encryption_set(NRF_QSPI, false); + } + + return NRFX_SUCCESS; +} +#endif + void nrfx_qspi_irq_handler(void) { // Catch Event ready interrupts diff --git a/drivers/src/nrfx_rng.c b/drivers/src/nrfx_rng.c index 83438667d..bf5b4ef17 100644 --- a/drivers/src/nrfx_rng.c +++ b/drivers/src/nrfx_rng.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_rtc.c b/drivers/src/nrfx_rtc.c index 53a0ed9d2..60fe2aee0 100644 --- a/drivers/src/nrfx_rtc.c +++ b/drivers/src/nrfx_rtc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_saadc.c b/drivers/src/nrfx_saadc.c index 371cdc96a..4e2440972 100644 --- a/drivers/src/nrfx_saadc.c +++ b/drivers/src/nrfx_saadc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,24 +36,18 @@ #define NRFX_LOG_MODULE SAADC #include -#define EVT_TO_STR(event) \ - (event == NRF_SAADC_EVENT_STARTED ? "NRF_SAADC_EVENT_STARTED" : \ - (event == NRF_SAADC_EVENT_END ? "NRF_SAADC_EVENT_END" : \ - (event == NRF_SAADC_EVENT_DONE ? "NRF_SAADC_EVENT_DONE" : \ - (event == NRF_SAADC_EVENT_RESULTDONE ? "NRF_SAADC_EVENT_RESULTDONE" : \ - (event == NRF_SAADC_EVENT_CALIBRATEDONE ? "NRF_SAADC_EVENT_CALIBRATEDONE" : \ - (event == NRF_SAADC_EVENT_STOPPED ? "NRF_SAADC_EVENT_STOPPED" : \ - "UNKNOWN EVENT")))))) - #if defined(NRF52_SERIES) && !defined(USE_WORKAROUND_FOR_ANOMALY_212) // ANOMALY 212 - SAADC events are missing when switching from single channel // to multi channel configuration with burst enabled. #define USE_WORKAROUND_FOR_ANOMALY_212 1 #endif -#if defined(NRF91_SERIES) || defined(NRF53_SERIES) +#if defined(NRF53_SERIES) || defined(NRF91_SERIES) // Make sure that SAADC is stopped before channel configuration. #define STOP_SAADC_ON_CHANNEL_CONFIG 1 + + // Make sure that SAADC calibration samples do not affect next conversions. + #define INTERCEPT_SAADC_CALIBRATION_SAMPLES 1 #endif /** @brief SAADC driver states.*/ @@ -75,9 +69,12 @@ typedef struct nrfx_saadc_event_handler_t event_handler; ///< Event handler function pointer. nrf_saadc_value_t * p_buffer_primary; ///< Pointer to the primary result buffer. nrf_saadc_value_t * p_buffer_secondary; ///< Pointer to the secondary result buffer. +#if NRFX_CHECK(INTERCEPT_SAADC_CALIBRATION_SAMPLES) + nrf_saadc_value_t calib_samples[6]; ///< Scratch buffer for calibration samples. +#endif uint16_t size_primary; ///< Size of the primary result buffer. uint16_t size_secondary; ///< Size of the secondary result buffer. - uint16_t samples_per_trigger; ///< Samples to take per one trigger in the blocking mode. + uint16_t samples_converted; ///< Number of samples present in result buffer when in the blocking mode. nrf_saadc_input_t channels_pselp[SAADC_CH_NUM]; ///< Array holding each channel positive input. nrf_saadc_input_t channels_pseln[SAADC_CH_NUM]; ///< Array holding each channel negative input. nrf_saadc_state_t saadc_state; ///< State of the SAADC driver. @@ -87,6 +84,7 @@ typedef struct uint8_t limits_low_activated; ///< Bitmask of the activated low limits. uint8_t limits_high_activated; ///< Bitmask of the activated high limits. bool start_on_end; ///< Flag indicating if the START task is to be triggered on the END event. + bool oversampling_without_burst; ///< Flag indicating whether oversampling without burst is configured. } nrfx_saadc_cb_t; static nrfx_saadc_cb_t m_cb; @@ -122,17 +120,6 @@ static void saadc_anomaly_212_workaround_apply(void) } #endif // NRFX_CHECK(USE_WORKAROUND_FOR_ANOMALY_212) -static void saadc_enabled_channels_sample(void) -{ - for (uint32_t sample_idx = 0; sample_idx < m_cb.samples_per_trigger; sample_idx++) - { - nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); - while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_DONE)) - {} - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_DONE); - } -} - static nrfx_err_t saadc_channel_count_get(uint32_t ch_to_activate_mask, uint8_t * p_active_ch_count) { @@ -183,11 +170,9 @@ static void saadc_generic_mode_set(uint32_t ch_to_activate_mas #if NRFX_CHECK(STOP_SAADC_ON_CHANNEL_CONFIG) nrf_saadc_int_disable(NRF_SAADC, NRF_SAADC_INT_STOPPED); - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_STOP); while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STOPPED)) - { - } + {} nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); #endif @@ -198,25 +183,20 @@ static void saadc_generic_mode_set(uint32_t ch_to_activate_mas m_cb.p_buffer_secondary = NULL; m_cb.event_handler = event_handler; m_cb.channels_activated = ch_to_activate_mask; + m_cb.samples_converted = 0; nrf_saadc_resolution_set(NRF_SAADC, resolution); nrf_saadc_oversample_set(NRF_SAADC, oversampling); if (event_handler) { - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); - nrf_saadc_int_enable(NRF_SAADC, - NRF_SAADC_INT_STARTED | - NRF_SAADC_INT_STOPPED | - NRF_SAADC_INT_END); + nrf_saadc_int_set(NRF_SAADC, + NRF_SAADC_INT_STARTED | + NRF_SAADC_INT_STOPPED | + NRF_SAADC_INT_END); } else { - nrf_saadc_int_disable(NRF_SAADC, - NRF_SAADC_INT_STARTED | - NRF_SAADC_INT_STOPPED | - NRF_SAADC_INT_END); + nrf_saadc_int_set(NRF_SAADC, 0); } for (uint32_t ch_pos = 0; ch_pos < SAADC_CH_NUM; ch_pos++) @@ -243,22 +223,28 @@ static void saadc_generic_mode_set(uint32_t ch_to_activate_mas nrfx_err_t nrfx_saadc_init(uint8_t interrupt_priority) { + nrfx_err_t err_code; if (m_cb.saadc_state != NRF_SAADC_STATE_UNINITIALIZED) { + err_code = NRFX_ERROR_INVALID_STATE; NRFX_LOG_WARNING("Function: %s, error code: %s.", __func__, NRFX_LOG_ERROR_STRING_GET(err_code)); - return NRFX_ERROR_INVALID_STATE; + return err_code; } m_cb.saadc_state = NRF_SAADC_STATE_IDLE; - nrf_saadc_int_disable(NRF_SAADC, NRF_SAADC_INT_ALL); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); + nrf_saadc_int_set(NRF_SAADC, 0); NRFX_IRQ_ENABLE(SAADC_IRQn); NRFX_IRQ_PRIORITY_SET(SAADC_IRQn, interrupt_priority); + err_code = NRFX_SUCCESS; NRFX_LOG_INFO("Function: %s, error code: %s.", __func__, NRFX_LOG_ERROR_STRING_GET(err_code)); - return NRFX_SUCCESS; + return err_code; } void nrfx_saadc_uninit(void) @@ -335,6 +321,7 @@ nrfx_err_t nrfx_saadc_simple_mode_set(uint32_t channel_mask, } else { + // Burst is implicitly enabled if oversampling is enabled. burst = NRF_SAADC_BURST_ENABLED; } @@ -344,17 +331,6 @@ nrfx_err_t nrfx_saadc_simple_mode_set(uint32_t channel_mask, burst, event_handler); - if (event_handler) - { - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_RESULTDONE); - nrf_saadc_int_enable(NRF_SAADC, NRF_SAADC_INT_RESULTDONE); - } - else - { - nrf_saadc_int_disable(NRF_SAADC, NRF_SAADC_INT_RESULTDONE); - } - - m_cb.samples_per_trigger = active_ch_count; m_cb.channels_activated_count = active_ch_count; m_cb.saadc_state = NRF_SAADC_STATE_SIMPLE_MODE; @@ -386,24 +362,20 @@ nrfx_err_t nrfx_saadc_advanced_mode_set(uint32_t channel_ return NRFX_ERROR_NOT_SUPPORTED; } + bool oversampling_without_burst = false; if ((p_config->oversampling != NRF_SAADC_OVERSAMPLE_DISABLED) && (p_config->burst == NRF_SAADC_BURST_DISABLED)) { - // Oversampling without burst if (active_ch_count > 1) { + // Oversampling without burst is possible only on single channel. return NRFX_ERROR_NOT_SUPPORTED; } else { - m_cb.samples_per_trigger = - nrf_saadc_oversample_sample_count_get(p_config->oversampling); + oversampling_without_burst = true; } } - else - { - m_cb.samples_per_trigger = active_ch_count; - } saadc_generic_mode_set(channel_mask, resolution, @@ -422,6 +394,7 @@ nrfx_err_t nrfx_saadc_advanced_mode_set(uint32_t channel_ m_cb.channels_activated_count = active_ch_count; m_cb.start_on_end = p_config->start_on_end; + m_cb.oversampling_without_burst = oversampling_without_burst; m_cb.saadc_state = NRF_SAADC_STATE_ADV_MODE; @@ -456,9 +429,8 @@ nrfx_err_t nrfx_saadc_buffer_set(nrf_saadc_value_t * p_buffer, uint16_t size) { return NRFX_ERROR_INVALID_LENGTH; } - m_cb.p_buffer_primary = p_buffer; m_cb.size_primary = size; - nrf_saadc_buffer_init(NRF_SAADC, p_buffer, size); + m_cb.p_buffer_primary = p_buffer; break; case NRF_SAADC_STATE_ADV_MODE_SAMPLE_STARTED: @@ -471,14 +443,13 @@ nrfx_err_t nrfx_saadc_buffer_set(nrf_saadc_value_t * p_buffer, uint16_t size) case NRF_SAADC_STATE_ADV_MODE_SAMPLE: if (m_cb.p_buffer_primary) { - m_cb.p_buffer_secondary = p_buffer; m_cb.size_secondary = size; + m_cb.p_buffer_secondary = p_buffer; } else { - m_cb.p_buffer_primary = p_buffer; m_cb.size_primary = size; - nrf_saadc_buffer_init(NRF_SAADC, p_buffer, size); + m_cb.p_buffer_primary = p_buffer; } break; @@ -500,9 +471,14 @@ nrfx_err_t nrfx_saadc_mode_trigger(void) } nrfx_err_t result = NRFX_SUCCESS; - switch (m_cb.saadc_state) { + switch (m_cb.saadc_state) + { case NRF_SAADC_STATE_SIMPLE_MODE: nrf_saadc_enable(NRF_SAADC); + // When in simple blocking or non-blocking mode, buffer size is equal to activated channel count. + // Single SAMPLE task is enough to obtain one sample on each activated channel. + // This will result in buffer being filled with samples and therefore END event will appear. + nrf_saadc_buffer_init(NRF_SAADC, m_cb.p_buffer_primary, m_cb.size_primary); if (m_cb.event_handler) { m_cb.saadc_state = NRF_SAADC_STATE_SIMPLE_MODE_SAMPLE; @@ -515,7 +491,7 @@ nrfx_err_t nrfx_saadc_mode_trigger(void) {} nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); - saadc_enabled_channels_sample(); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_END)) {} nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); @@ -527,49 +503,64 @@ nrfx_err_t nrfx_saadc_mode_trigger(void) nrf_saadc_enable(NRF_SAADC); if (m_cb.event_handler) { + // When in advanced non-blocking mode, latch whole buffer in EasyDMA. + // END event will arrive when whole buffer is filled with samples. m_cb.saadc_state = NRF_SAADC_STATE_ADV_MODE_SAMPLE; + nrf_saadc_buffer_init(NRF_SAADC, m_cb.p_buffer_primary, m_cb.size_primary); nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_START); break; } - m_cb.saadc_state = NRF_SAADC_STATE_ADV_MODE_SAMPLE_STARTED; + // When in advanced blocking mode, latch single chunk of buffer in EasyDMA. + // Each chunk consists of single sample from each activated channels. + // END event will arrive when single chunk is filled with samples. + nrf_saadc_buffer_init(NRF_SAADC, + &m_cb.p_buffer_primary[m_cb.samples_converted], + m_cb.channels_activated_count); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_START); while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STARTED)) {} nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); - /* fall-through */ - case NRF_SAADC_STATE_ADV_MODE_SAMPLE_STARTED: - if (m_cb.event_handler) + if (m_cb.oversampling_without_burst) { - result = NRFX_ERROR_INVALID_STATE; - break; - } + // Oversampling without burst is possible only on single channel. + // In this configuration more than one SAMPLE task is needed to obtain single sample. + uint32_t samples_to_take = + nrf_saadc_oversample_sample_count_get(nrf_saadc_oversample_get(NRF_SAADC)); - saadc_enabled_channels_sample(); - if (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_END)) - { - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); - m_cb.saadc_state = NRF_SAADC_STATE_ADV_MODE; - m_cb.p_buffer_primary = m_cb.p_buffer_secondary; - m_cb.size_primary = m_cb.size_secondary; - m_cb.p_buffer_secondary = NULL; - if (m_cb.p_buffer_primary) - { - nrf_saadc_buffer_init(NRF_SAADC, - m_cb.p_buffer_primary, - m_cb.size_primary); - } - else + for (uint32_t sample_idx = 0; sample_idx < samples_to_take; sample_idx++) { - nrf_saadc_disable(NRF_SAADC); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_DONE); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); + while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_DONE)) + {} } - result = NRFX_SUCCESS; } else + { + // Single SAMPLE task is enough to obtain one sample on each activated channel. + // This will result in chunk being filled with samples and therefore END event will appear. + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); + } + while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_END)) + {} + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); + + m_cb.samples_converted += m_cb.channels_activated_count; + if (m_cb.samples_converted < m_cb.size_primary) { result = NRFX_ERROR_BUSY; } + else + { + m_cb.samples_converted = 0; + m_cb.p_buffer_primary = m_cb.p_buffer_secondary; + m_cb.size_primary = m_cb.size_secondary; + m_cb.p_buffer_secondary = NULL; + } + nrf_saadc_disable(NRF_SAADC); break; default: @@ -584,43 +575,19 @@ void nrfx_saadc_abort(void) { NRFX_ASSERT(m_cb.saadc_state != NRF_SAADC_STATE_UNINITIALIZED); - if (!saadc_busy_check()) - { - return; - } - - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); - nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_STOP); - - if (m_cb.saadc_state == NRF_SAADC_STATE_CALIBRATION) - { - // STOPPED event does not appear when the calibration is ongoing - m_cb.saadc_state = NRF_SAADC_STATE_IDLE; - } - else if (!m_cb.event_handler) + if (!m_cb.event_handler) { - while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STOPPED)) - {} - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); - m_cb.p_buffer_primary = NULL; m_cb.p_buffer_secondary = NULL; - switch (m_cb.saadc_state) + m_cb.samples_converted = 0; + } + else + { + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_STOP); + if (m_cb.saadc_state == NRF_SAADC_STATE_CALIBRATION) { - case NRF_SAADC_STATE_SIMPLE_MODE_SAMPLE: - m_cb.saadc_state = NRF_SAADC_STATE_SIMPLE_MODE; - break; - - case NRF_SAADC_STATE_ADV_MODE_SAMPLE: - /* fall-through */ - - case NRF_SAADC_STATE_ADV_MODE_SAMPLE_STARTED: - m_cb.saadc_state = NRF_SAADC_STATE_ADV_MODE; - break; - - default: - break; + // STOPPED event does not appear when the calibration is ongoing + m_cb.saadc_state = NRF_SAADC_STATE_IDLE; } } } @@ -687,8 +654,31 @@ nrfx_err_t nrfx_saadc_offset_calibrate(nrfx_saadc_event_handler_t event_handler) m_cb.saadc_state = NRF_SAADC_STATE_CALIBRATION; m_cb.event_handler = event_handler; - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE); nrf_saadc_enable(NRF_SAADC); +#if NRFX_CHECK(INTERCEPT_SAADC_CALIBRATION_SAMPLES) + nrf_saadc_buffer_init(NRF_SAADC, m_cb.calib_samples, NRFX_ARRAY_SIZE(m_cb.calib_samples)); + if (event_handler) + { + nrf_saadc_int_set(NRF_SAADC, NRF_SAADC_INT_STARTED | NRF_SAADC_INT_CALIBRATEDONE); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_START); + } + else + { + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_START); + while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STARTED)) + {} + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); + + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_CALIBRATEOFFSET); + while (!nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE)) + {} + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); + + nrf_saadc_disable(NRF_SAADC); + m_cb.saadc_state = NRF_SAADC_STATE_IDLE; + } +#else nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_CALIBRATEOFFSET); if (event_handler) { @@ -702,6 +692,7 @@ nrfx_err_t nrfx_saadc_offset_calibrate(nrfx_saadc_event_handler_t event_handler) nrf_saadc_disable(NRF_SAADC); m_cb.saadc_state = NRF_SAADC_STATE_IDLE; } +#endif // NRFX_CHECK(INTERCEPT_SAADC_CALIBRATION_SAMPLES) return NRFX_SUCCESS; } @@ -732,14 +723,25 @@ static void saadc_event_started_handle(void) /* fall-through */ case NRF_SAADC_STATE_ADV_MODE_SAMPLE_STARTED: - evt_data.type = NRFX_SAADC_EVT_BUF_REQ; - m_cb.event_handler(&evt_data); + if (!m_cb.p_buffer_secondary) + { + // Send next buffer request only if it was not provided earlier, + // before conversion start or outside of user's callback context. + evt_data.type = NRFX_SAADC_EVT_BUF_REQ; + m_cb.event_handler(&evt_data); + } break; case NRF_SAADC_STATE_SIMPLE_MODE_SAMPLE: nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); break; +#if NRFX_CHECK(INTERCEPT_SAADC_CALIBRATION_SAMPLES) + case NRF_SAADC_STATE_CALIBRATION: + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_CALIBRATEOFFSET); + break; +#endif + default: break; } @@ -814,16 +816,6 @@ void nrfx_saadc_irq_handler(void) saadc_event_started_handle(); } - if (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_RESULTDONE)) - { - nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_RESULTDONE); - - if (m_cb.saadc_state == NRF_SAADC_STATE_SIMPLE_MODE_SAMPLE) - { - nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); - } - } - if (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STOPPED)) { nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); @@ -837,7 +829,15 @@ void nrfx_saadc_irq_handler(void) if (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_END)) { nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); - saadc_event_end_handle(); + +#if NRFX_CHECK(INTERCEPT_SAADC_CALIBRATION_SAMPLES) + // When samples are intercepted into scratch buffer during calibration, + // END event appears when the calibration finishes. This event should be ignored. + if (m_cb.saadc_state != NRF_SAADC_STATE_CALIBRATION) +#endif + { + saadc_event_end_handle(); + } } saadc_event_limits_handle(m_cb.limits_low_activated, NRF_SAADC_LIMIT_LOW); @@ -846,6 +846,7 @@ void nrfx_saadc_irq_handler(void) if (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE)) { nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE); + nrf_saadc_disable(NRF_SAADC); m_cb.saadc_state = NRF_SAADC_STATE_IDLE; @@ -853,8 +854,6 @@ void nrfx_saadc_irq_handler(void) evt_data.type = NRFX_SAADC_EVT_CALIBRATEDONE; m_cb.event_handler(&evt_data); - nrf_saadc_int_disable(NRF_SAADC, NRF_SAADC_INT_CALIBRATEDONE); - nrf_saadc_disable(NRF_SAADC); } } #endif // NRFX_CHECK(NRFX_SAADC_ENABLED) diff --git a/drivers/src/nrfx_spi.c b/drivers/src/nrfx_spi.c index 1fa4b8a2f..1cbed196f 100644 --- a/drivers/src/nrfx_spi.c +++ b/drivers/src/nrfx_spi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_spim.c b/drivers/src/nrfx_spim.c index bd8bc841e..007d17732 100644 --- a/drivers/src/nrfx_spim.c +++ b/drivers/src/nrfx_spim.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,8 @@ #if NRFX_CHECK(NRFX_SPIM_ENABLED) #if !(NRFX_CHECK(NRFX_SPIM0_ENABLED) || NRFX_CHECK(NRFX_SPIM1_ENABLED) || \ - NRFX_CHECK(NRFX_SPIM2_ENABLED) || NRFX_CHECK(NRFX_SPIM3_ENABLED)) + NRFX_CHECK(NRFX_SPIM2_ENABLED) || NRFX_CHECK(NRFX_SPIM3_ENABLED) || \ + NRFX_CHECK(NRFX_SPIM4_ENABLED)) #error "No enabled SPIM instances. Check ." #endif @@ -121,29 +122,45 @@ #define SPIM3_SUPPORTED_FREQ_VALIDATE(...) 0 #endif +#if NRFX_CHECK(NRFX_SPIM4_ENABLED) +#define SPIM4_LENGTH_VALIDATE(...) SPIMX_LENGTH_VALIDATE(SPIM4, __VA_ARGS__) +#define SPIM4_HW_CSN_PRESENT_VALIDATE(...) SPIMX_HW_CSN_PRESENT_VALIDATE(SPIM4, __VA_ARGS__) +#define SPIM4_DCX_PRESENT_VALIDATE(...) SPIMX_DCX_PRESENT_VALIDATE(SPIM4, __VA_ARGS__) +#define SPIM4_SUPPORTED_FREQ_VALIDATE(...) SPIMX_SUPPORTED_FREQ_VALIDATE(SPIM4, __VA_ARGS__) +#else +#define SPIM4_LENGTH_VALIDATE(...) 0 +#define SPIM4_HW_CSN_PRESENT_VALIDATE(...) 0 +#define SPIM4_DCX_PRESENT_VALIDATE(...) 0 +#define SPIM4_SUPPORTED_FREQ_VALIDATE(...) 0 +#endif + #define SPIM_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len) \ (SPIM0_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len) || \ SPIM1_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len) || \ SPIM2_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len) || \ - SPIM3_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len)) + SPIM3_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len) || \ + SPIM4_LENGTH_VALIDATE(drv_inst_idx, rx_len, tx_len)) #define SPIM_HW_CSN_PRESENT_VALIDATE(drv_inst_idx) \ (SPIM0_HW_CSN_PRESENT_VALIDATE(drv_inst_idx) || \ SPIM1_HW_CSN_PRESENT_VALIDATE(drv_inst_idx) || \ SPIM2_HW_CSN_PRESENT_VALIDATE(drv_inst_idx) || \ - SPIM3_HW_CSN_PRESENT_VALIDATE(drv_inst_idx)) + SPIM3_HW_CSN_PRESENT_VALIDATE(drv_inst_idx) || \ + SPIM4_HW_CSN_PRESENT_VALIDATE(drv_inst_idx)) #define SPIM_DCX_PRESENT_VALIDATE(drv_inst_idx) \ (SPIM0_DCX_PRESENT_VALIDATE(drv_inst_idx) || \ SPIM1_DCX_PRESENT_VALIDATE(drv_inst_idx) || \ SPIM2_DCX_PRESENT_VALIDATE(drv_inst_idx) || \ - SPIM3_DCX_PRESENT_VALIDATE(drv_inst_idx)) + SPIM3_DCX_PRESENT_VALIDATE(drv_inst_idx) || \ + SPIM4_DCX_PRESENT_VALIDATE(drv_inst_idx)) #define SPIM_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq) \ (SPIM0_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq) || \ SPIM1_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq) || \ SPIM2_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq) || \ - SPIM3_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq)) + SPIM3_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq) || \ + SPIM4_SUPPORTED_FREQ_VALIDATE(drv_inst_idx, freq)) #if defined(NRF52840_XXAA) && (NRFX_CHECK(NRFX_SPIM3_ENABLED)) // Enable workaround for nRF52840 anomaly 195 (SPIM3 continues to draw current after disable). @@ -271,6 +288,9 @@ nrfx_err_t nrfx_spim_init(nrfx_spim_t const * p_instance, #if NRFX_CHECK(NRFX_SPIM3_ENABLED) nrfx_spim_3_irq_handler, #endif + #if NRFX_CHECK(NRFX_SPIM4_ENABLED) + nrfx_spim_4_irq_handler, + #endif }; if (nrfx_prs_acquire(p_instance->p_reg, irq_handlers[p_instance->drv_inst_idx]) != NRFX_SUCCESS) @@ -754,4 +774,11 @@ void nrfx_spim_3_irq_handler(void) } #endif +#if NRFX_CHECK(NRFX_SPIM4_ENABLED) +void nrfx_spim_4_irq_handler(void) +{ + irq_handler(NRF_SPIM4, &m_cb[NRFX_SPIM4_INST_IDX]); +} +#endif + #endif // NRFX_CHECK(NRFX_SPIM_ENABLED) diff --git a/drivers/src/nrfx_spis.c b/drivers/src/nrfx_spis.c index ebdf74fb2..be30e790a 100644 --- a/drivers/src/nrfx_spis.c +++ b/drivers/src/nrfx_spis.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2013 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_systick.c b/drivers/src/nrfx_systick.c index 878c06842..708826ada 100644 --- a/drivers/src/nrfx_systick.c +++ b/drivers/src/nrfx_systick.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_temp.c b/drivers/src/nrfx_temp.c index a481df71f..98ebb2125 100644 --- a/drivers/src/nrfx_temp.c +++ b/drivers/src/nrfx_temp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_timer.c b/drivers/src/nrfx_timer.c index 06ac1dcf3..d8df49b50 100644 --- a/drivers/src/nrfx_timer.c +++ b/drivers/src/nrfx_timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_twi.c b/drivers/src/nrfx_twi.c index 37f7dd955..419940074 100644 --- a/drivers/src/nrfx_twi.c +++ b/drivers/src/nrfx_twi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,8 @@ (event == NRFX_TWI_EVT_ADDRESS_NACK ? "EVT_ADDRESS_NACK" : \ (event == NRFX_TWI_EVT_DATA_NACK ? "EVT_DATA_NACK" : \ (event == NRFX_TWI_EVT_OVERRUN ? "EVT_OVERRUN" : \ - "UNKNOWN ERROR")))) + (event == NRFX_TWI_EVT_BUS_ERROR ? "EVT_BUS_ERROR" : \ + "UNKNOWN ERROR"))))) #define EVT_TO_STR_TWI(event) \ (event == NRF_TWI_EVENT_STOPPED ? "NRF_TWI_EVENT_STOPPED" : \ @@ -132,7 +133,25 @@ static nrfx_err_t twi_process_error(uint32_t errorsrc) return ret; } +static bool xfer_completeness_check(NRF_TWI_Type * p_twi, twi_control_block_t const * p_cb) +{ + // If the actual number of transferred bytes is not equal to what was requested, + // but there was no error signaled by the peripheral, this means that something + // unexpected, like a premature STOP condition, was received on the bus. + // In such case the peripheral has to be disabled and re-enabled, so that its + // internal state machine is reinitialized. + if (p_cb->bytes_transferred != p_cb->curr_length) + { + nrf_twi_disable(p_twi); + nrf_twi_enable(p_twi); + return false; + } + else + { + return true; + } +} nrfx_err_t nrfx_twi_init(nrfx_twi_t const * p_instance, nrfx_twi_config_t const * p_config, @@ -264,7 +283,6 @@ static bool twi_send_byte(NRF_TWI_Type * p_twi, if (p_cb->bytes_transferred < p_cb->curr_length) { nrf_twi_txd_set(p_twi, p_cb->p_curr_buf[p_cb->bytes_transferred]); - ++(p_cb->bytes_transferred); } else { @@ -318,7 +336,19 @@ static bool twi_receive_byte(NRF_TWI_Type * p_twi, static bool twi_transfer(NRF_TWI_Type * p_twi, twi_control_block_t * p_cb) { - bool do_stop_check = ((p_cb->error) || ((p_cb->bytes_transferred) == p_cb->curr_length)); + bool stopped = false; + if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_STOPPED)) + { + nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_STOPPED); + NRFX_LOG_DEBUG("TWI: Event: %s.", EVT_TO_STR_TWI(NRF_TWI_EVENT_STOPPED)); + + // Delay handling of STOPPED event till the end of events processing procedure. + // If penultimate byte is received and function gets interrupted for long enough + // after enabling BB_STOP shortcut, RXDREADY for last byte as well as STOPPED + // may be active at the same time. Therefore RXREADY has to be processed before STOPPED to + // acquire last byte before finishing transmission by returning 'false'. + stopped = true; + } if (p_cb->error) { @@ -338,6 +368,7 @@ static bool twi_transfer(NRF_TWI_Type * p_twi, if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_TXDSENT)) { nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_TXDSENT); + ++(p_cb->bytes_transferred); NRFX_LOG_DEBUG("TWI: Event: %s.", EVT_TO_STR_TWI(NRF_TWI_EVENT_TXDSENT)); if (nrf_twi_event_check(p_twi, NRF_TWI_EVENT_ERROR)) { @@ -375,11 +406,13 @@ static bool twi_transfer(NRF_TWI_Type * p_twi, } } - if (do_stop_check && nrf_twi_event_check(p_twi, NRF_TWI_EVENT_STOPPED)) + if (stopped) { - nrf_twi_event_clear(p_twi, NRF_TWI_EVENT_STOPPED); p_cb->prev_suspend = TWI_NO_SUSPEND; - NRFX_LOG_DEBUG("TWI: Event: %s.", EVT_TO_STR_TWI(NRF_TWI_EVENT_STOPPED)); + if (!p_cb->error) + { + p_cb->error = !xfer_completeness_check(p_twi, p_cb); + } return false; } @@ -438,6 +471,10 @@ static nrfx_err_t twi_tx_start_transfer(NRF_TWI_Type * p_twi, { ret_code = twi_process_error(errorsrc); } + else + { + ret_code = NRFX_ERROR_INTERNAL; + } } if (hw_timeout <= 0) @@ -507,6 +544,10 @@ static nrfx_err_t twi_rx_start_transfer(NRF_TWI_Type * p_twi, { ret_code = twi_process_error(errorsrc); } + else + { + ret_code = NRFX_ERROR_INTERNAL; + } } if (hw_timeout <= 0) { @@ -675,6 +716,11 @@ static void twi_irq_handler(NRF_TWI_Type * p_twi, twi_control_block_t * p_cb) event.type = NRFX_TWI_EVT_OVERRUN; NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRFX_TWI_EVT_OVERRUN)); } + else + { + event.type = NRFX_TWI_EVT_BUS_ERROR; + NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRFX_TWI_EVT_BUS_ERROR)); + } } else { @@ -684,7 +730,7 @@ static void twi_irq_handler(NRF_TWI_Type * p_twi, twi_control_block_t * p_cb) p_cb->busy = false; - if (!(TWI_FLAG_NO_HANDLER_IN_USE(p_cb->flags))) + if (!(TWI_FLAG_NO_HANDLER_IN_USE(p_cb->flags)) || p_cb->error) { p_cb->handler(&event, p_cb->p_context); } diff --git a/drivers/src/nrfx_twi_twim.c b/drivers/src/nrfx_twi_twim.c index f37c227c3..8452ccfdd 100644 --- a/drivers/src/nrfx_twi_twim.c +++ b/drivers/src/nrfx_twi_twim.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_twim.c b/drivers/src/nrfx_twim.c index 94ba4e7ca..8c0085c84 100644 --- a/drivers/src/nrfx_twim.c +++ b/drivers/src/nrfx_twim.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,9 @@ (event == NRFX_TWIM_EVT_DONE ? "EVT_DONE" : \ (event == NRFX_TWIM_EVT_ADDRESS_NACK ? "EVT_ADDRESS_NACK" : \ (event == NRFX_TWIM_EVT_DATA_NACK ? "EVT_DATA_NACK" : \ - "UNKNOWN ERROR"))) + (event == NRFX_TWIM_EVT_OVERRUN ? "EVT_OVERRUN" : \ + (event == NRFX_TWIM_EVT_BUS_ERROR ? "EVT_BUS_ERROR" : \ + "UNKNOWN ERROR"))))) #define EVT_TO_STR_TWIM(event) \ (event == NRF_TWIM_EVENT_STOPPED ? "NRF_TWIM_EVENT_STOPPED" : \ @@ -157,11 +159,11 @@ static nrfx_err_t twi_process_error(uint32_t errorsrc) return ret; } -static bool xfer_completeness_check(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb) +static bool xfer_completeness_check(NRF_TWIM_Type * p_twim, twim_control_block_t const * p_cb) { // If the actual number of transferred bytes is not equal to what was requested, // but there was no error signaled by the peripheral, this means that something - // unexpected, like a premature STOP condition, happened on the bus. + // unexpected, like a premature STOP condition, was received on the bus. // In such case the peripheral has to be disabled and re-enabled, so that its // internal state machine is reinitialized. @@ -169,9 +171,12 @@ static bool xfer_completeness_check(NRF_TWIM_Type * p_twim, twim_control_block_t switch (p_cb->xfer_desc.type) { case NRFX_TWIM_XFER_TXTX: - if (((p_cb->int_mask == (NRF_TWIM_INT_SUSPENDED_MASK | NRF_TWIM_INT_ERROR_MASK)) && + // int_mask variable is used to determine which length should be checked + // against number of bytes latched in EasyDMA. + // NRF_TWIM_INT_SUSPENDED_MASK is configured only in first TX of TXTX transfer. + if (((p_cb->int_mask & NRF_TWIM_INT_SUSPENDED_MASK) && (nrf_twim_txd_amount_get(p_twim) != p_cb->xfer_desc.primary_length)) || - ((p_cb->int_mask == (NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK)) && + (!(p_cb->int_mask & NRF_TWIM_INT_SUSPENDED_MASK) && (nrf_twim_txd_amount_get(p_twim) != p_cb->xfer_desc.secondary_length))) { transfer_complete = false; @@ -376,7 +381,6 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, { nrfx_err_t err_code = NRFX_SUCCESS; nrf_twim_task_t start_task = NRF_TWIM_TASK_STARTTX; - nrf_twim_event_t evt_to_wait = NRF_TWIM_EVENT_STOPPED; p_cb->error = false; if (!nrfx_is_in_ram(p_xfer_desc->p_primary_buf)) @@ -406,10 +410,13 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, p_cb->xfer_desc = *p_xfer_desc; p_cb->repeated = (flags & NRFX_TWIM_FLAG_REPEATED_XFER) ? true : false; + p_cb->flags = flags; nrf_twim_address_set(p_twim, p_xfer_desc->address); nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_STOPPED); nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTTX); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); twim_list_enable_handle(p_twim, flags); switch (p_xfer_desc->type) @@ -429,8 +436,6 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_SUSPEND_MASK); nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_TXSTARTED); - nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTTX); - nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STARTTX); while (!nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_TXSTARTED)) @@ -438,7 +443,7 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, NRFX_LOG_DEBUG("TWIM: Event: %s.", EVT_TO_STR_TWIM(NRF_TWIM_EVENT_TXSTARTED)); nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_TXSTARTED); nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_secondary_buf, p_xfer_desc->secondary_length); - p_cb->int_mask = NRF_TWIM_INT_SUSPENDED_MASK | NRF_TWIM_INT_ERROR_MASK; + p_cb->int_mask = NRF_TWIM_INT_SUSPENDED_MASK; break; case NRFX_TWIM_XFER_TXRX: nrf_twim_tx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); @@ -453,7 +458,7 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, nrf_twim_rx_buffer_set(p_twim, p_xfer_desc->p_secondary_buf, p_xfer_desc->secondary_length); nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_STARTRX_MASK | NRF_TWIM_SHORT_LASTRX_STOP_MASK); - p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK; nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); break; case NRFX_TWIM_XFER_TX: @@ -461,21 +466,19 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, if (NRFX_TWIM_FLAG_TX_NO_STOP & flags) { nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_SUSPEND_MASK); - p_cb->int_mask = NRF_TWIM_INT_SUSPENDED_MASK | NRF_TWIM_INT_ERROR_MASK; - nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); - evt_to_wait = NRF_TWIM_EVENT_SUSPENDED; + p_cb->int_mask = NRF_TWIM_INT_SUSPENDED_MASK; } else { nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTTX_STOP_MASK); - p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK; } nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); break; case NRFX_TWIM_XFER_RX: nrf_twim_rx_buffer_set(p_twim, p_xfer_desc->p_primary_buf, p_xfer_desc->primary_length); nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTRX_STOP_MASK); - p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK | NRF_TWIM_INT_ERROR_MASK; + p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK; start_task = NRF_TWIM_TASK_STARTRX; nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); break; @@ -493,35 +496,90 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, { if (flags & NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER) { - p_cb->int_mask = NRF_TWIM_INT_ERROR_MASK; + p_cb->int_mask = 0; + } + + if (!(flags & NRFX_TWIM_FLAG_NO_SPURIOUS_STOP_CHECK)) + { + p_cb->int_mask |= NRF_TWIM_INT_STOPPED_MASK; } + + // Interrupts for ERROR are implicitly enabled, regardless of driver configuration. + p_cb->int_mask |= NRF_TWIM_INT_ERROR_MASK; nrf_twim_int_enable(p_twim, p_cb->int_mask); #if NRFX_CHECK(NRFX_TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED) - if ((flags & NRFX_TWIM_FLAG_HOLD_XFER) && ((p_xfer_desc->type == NRFX_TWIM_XFER_TX) || - (p_xfer_desc->type == NRFX_TWIM_XFER_TXRX))) + if ((flags & NRFX_TWIM_FLAG_HOLD_XFER) && (p_xfer_desc->type != NRFX_TWIM_XFER_RX)) { - p_cb->flags = flags; twim_list_enable_handle(p_twim, 0); p_twim->FREQUENCY = 0; nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_TXSTARTED); nrf_twim_int_enable(p_twim, NRF_TWIM_INT_TXSTARTED_MASK); + } + else + { + nrf_twim_frequency_set(p_twim, p_cb->bus_frequency); } #endif } else { - while (!nrf_twim_event_check(p_twim, evt_to_wait)) - { + bool transmission_finished = false; + do { + if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_SUSPENDED)) + { + NRFX_LOG_DEBUG("TWIM: Event: %s.", EVT_TO_STR_TWIM(NRF_TWIM_EVENT_SUSPENDED)); + transmission_finished = true; + } + + if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_STOPPED)) + { + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_STOPPED); + NRFX_LOG_DEBUG("TWIM: Event: %s.", EVT_TO_STR_TWIM(NRF_TWIM_EVENT_STOPPED)); + transmission_finished = true; + } + if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_ERROR)) { - NRFX_LOG_DEBUG("TWIM: Event: %s.", EVT_TO_STR_TWIM(NRF_TWIM_EVENT_ERROR)); nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_ERROR); - nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); - nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP); - evt_to_wait = NRF_TWIM_EVENT_STOPPED; + NRFX_LOG_DEBUG("TWIM: Event: %s.", EVT_TO_STR_TWIM(NRF_TWIM_EVENT_ERROR)); + + bool lasttx_triggered = nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_LASTTX); + uint32_t shorts_mask = nrf_twim_shorts_get(p_twim); + + if (!(lasttx_triggered && (shorts_mask & NRF_TWIM_SHORT_LASTTX_STOP_MASK))) + { + // Unless LASTTX event arrived and LASTTX_STOP shortcut is active, + // triggering of STOP task in case of error has to be done manually. + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP); + + // Mark transmission as not finished yet, + // as STOPPED event is expected to arrive. + // If LASTTX_SUSPENDED shortcut is active, + // NACK has been received on last byte sent + // and SUSPENDED event happened to be checked before ERROR, + // transmission will be marked as finished. + // In such case this flag has to be overwritten. + transmission_finished = false; + } + + if (lasttx_triggered && (shorts_mask & NRF_TWIM_SHORT_LASTTX_SUSPEND_MASK)) + { + // When STOP task was triggered just before SUSPEND task has taken effect, + // SUSPENDED event may not arrive. + // However if SUSPENDED arrives it always arrives after ERROR. + // Therefore SUSPENDED has to be cleared + // so it does not cause premature termination of busy loop + // waiting for STOPPED event to arrive. + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED); + + // Mark transmission as not finished yet, + // for same reasons as above. + transmission_finished = false; + } } - } + } while (!transmission_finished); uint32_t errorsrc = nrf_twim_errorsrc_get_and_clear(p_twim); @@ -533,7 +591,8 @@ static nrfx_err_t twim_xfer(twim_control_block_t * p_cb, } else { - if (!xfer_completeness_check(p_twim, p_cb)) + if (!(flags & NRFX_TWIM_FLAG_NO_SPURIOUS_STOP_CHECK) && + !xfer_completeness_check(p_twim, p_cb)) { err_code = NRFX_ERROR_INTERNAL; } @@ -626,8 +685,12 @@ static void twim_irq_handler(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb p_cb->int_mask = NRF_TWIM_INT_STOPPED_MASK; nrf_twim_int_enable(p_twim, p_cb->int_mask); - nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); - nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP); + if (!(nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_LASTTX) && + (nrf_twim_shorts_get(p_twim) & NRF_TWIM_SHORT_LASTTX_STOP_MASK))) + { + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME); + nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_STOP); + } p_cb->error = true; return; @@ -640,19 +703,43 @@ static void twim_irq_handler(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb { NRFX_LOG_DEBUG("TWIM: Event: %s.", EVT_TO_STR_TWIM(NRF_TWIM_EVENT_STOPPED)); nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_STOPPED); - event.xfer_desc = p_cb->xfer_desc; - if (!p_cb->error) + + if (!(p_cb->flags & NRFX_TWIM_FLAG_NO_SPURIOUS_STOP_CHECK) && !p_cb->error) { p_cb->error = !xfer_completeness_check(p_twim, p_cb); } - nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTTX); - nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTRX); - if (!p_cb->repeated || p_cb->error) + + // Further processing of STOPPED event is valid only if NO_XFER_EVT_HANDLER + // setting is not used. + if (!(p_cb->flags & NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER)) { - nrf_twim_shorts_set(p_twim, 0); - p_cb->int_mask = 0; - nrf_twim_int_disable(p_twim, NRF_TWIM_ALL_INTS_MASK); + event.xfer_desc = p_cb->xfer_desc; + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTTX); + nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_LASTRX); + if (!p_cb->repeated || p_cb->error) + { + nrf_twim_shorts_set(p_twim, 0); + p_cb->int_mask = 0; + nrf_twim_int_disable(p_twim, NRF_TWIM_ALL_INTS_MASK); + + // At this point interrupt handler should not be invoked again for current transfer. + // If STOPPED arrived during ERROR processing, + // its pending interrupt should be ignored. + // Otherwise spurious NRFX_TWIM_EVT_DONE or NRFX_TWIM_EVT_BUS_ERROR + // would be passed to user's handler. + NRFX_IRQ_PENDING_CLEAR(nrfx_get_irq_number(p_twim)); + } + } + +#if NRFX_CHECK(NRFX_TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED) + else if (p_cb->xfer_desc.type != NRFX_TWIM_XFER_RX) + { + /* Add Anomaly 109 workaround for each potential repeated transfer starting from TX. */ + twim_list_enable_handle(p_twim, 0); + p_twim->FREQUENCY = 0; + nrf_twim_int_enable(p_twim, NRF_TWIM_INT_TXSTARTED_MASK); } +#endif } else { @@ -666,6 +753,13 @@ static void twim_irq_handler(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb nrf_twim_shorts_set(p_twim, 0); p_cb->int_mask = 0; nrf_twim_int_disable(p_twim, NRF_TWIM_ALL_INTS_MASK); + + // At this point interrupt handler should not be invoked again for current transfer. + // If STOPPED arrived during SUSPENDED processing, + // its pending interrupt should be ignored. + // Otherwise spurious NRFX_TWIM_EVT_DONE or NRFX_TWIM_EVT_BUS_ERROR + // would be passed to user's handler. + NRFX_IRQ_PENDING_CLEAR(nrfx_get_irq_number(p_twim)); } } else @@ -693,19 +787,17 @@ static void twim_irq_handler(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb } else if (errorsrc & NRF_TWIM_ERROR_OVERRUN) { - event.type = NRFX_TWIM_EVT_DATA_NACK; - NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRFX_TWIM_EVT_DATA_NACK)); + event.type = NRFX_TWIM_EVT_OVERRUN; + NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRFX_TWIM_EVT_OVERRUN)); + } + else if (p_cb->error) + { + event.type = NRFX_TWIM_EVT_BUS_ERROR; + NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRFX_TWIM_EVT_BUS_ERROR)); } else { - if (p_cb->error) - { - event.type = NRFX_TWIM_EVT_BUS_ERROR; - } - else - { - event.type = NRFX_TWIM_EVT_DONE; - } + event.type = NRFX_TWIM_EVT_DONE; NRFX_LOG_DEBUG("Event: %s.", EVT_TO_STR(NRFX_TWIM_EVT_DONE)); } @@ -714,7 +806,10 @@ static void twim_irq_handler(NRF_TWIM_Type * p_twim, twim_control_block_t * p_cb p_cb->busy = false; } - p_cb->handler(&event, p_cb->p_context); + if (!(p_cb->flags & NRFX_TWIM_FLAG_NO_XFER_EVT_HANDLER) || p_cb->error) + { + p_cb->handler(&event, p_cb->p_context); + } } #if NRFX_CHECK(NRFX_TWIM0_ENABLED) diff --git a/drivers/src/nrfx_twis.c b/drivers/src/nrfx_twis.c index 10b827f13..929834816 100644 --- a/drivers/src/nrfx_twis.c +++ b/drivers/src/nrfx_twis.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_uart.c b/drivers/src/nrfx_uart.c index 64edf86a0..e8c5a9654 100644 --- a/drivers/src/nrfx_uart.c +++ b/drivers/src/nrfx_uart.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/nrfx_uarte.c b/drivers/src/nrfx_uarte.c index 64a43e817..88a06d359 100644 --- a/drivers/src/nrfx_uarte.c +++ b/drivers/src/nrfx_uarte.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -191,6 +191,38 @@ static void pins_to_default(nrfx_uarte_t const * p_instance) } } +static void apply_workaround_for_enable_anomaly(nrfx_uarte_t const * p_instance) +{ +#if defined(NRF5340_XXAA_APPLICATION) || defined(NRF5340_XXAA_NETWORK) || defined(NRF9160_XXAA) + // Apply workaround for anomalies: + // - nRF9160 - anomaly 23 + // - nRF5340 - anomaly 44 + volatile uint32_t const * rxenable_reg = + (volatile uint32_t *)(((uint32_t)p_instance->p_reg) + 0x564); + volatile uint32_t const * txenable_reg = + (volatile uint32_t *)(((uint32_t)p_instance->p_reg) + 0x568); + + if (*txenable_reg == 1) + { + nrf_uarte_task_trigger(p_instance->p_reg, NRF_UARTE_TASK_STOPTX); + } + + if (*rxenable_reg == 1) + { + nrf_uarte_enable(p_instance->p_reg); + nrf_uarte_task_trigger(p_instance->p_reg, NRF_UARTE_TASK_STOPRX); + + while (*rxenable_reg) + {} + + (void)nrf_uarte_errorsrc_get_and_clear(p_instance->p_reg); + nrf_uarte_disable(p_instance->p_reg); + } +#else + (void)(p_instance); +#endif // defined(NRF5340_XXAA_APPLICATION) || defined(NRF5340_XXAA_NETWORK) || defined(NRF9160_XXAA) +} + nrfx_err_t nrfx_uarte_init(nrfx_uarte_t const * p_instance, nrfx_uarte_config_t const * p_config, nrfx_uarte_event_handler_t event_handler) @@ -236,6 +268,8 @@ nrfx_err_t nrfx_uarte_init(nrfx_uarte_t const * p_instance, apply_config(p_instance, p_config); + apply_workaround_for_enable_anomaly(p_instance); + p_cb->handler = event_handler; p_cb->p_context = p_config->p_context; @@ -258,6 +292,7 @@ nrfx_err_t nrfx_uarte_init(nrfx_uarte_t const * p_instance, void nrfx_uarte_uninit(nrfx_uarte_t const * p_instance) { uarte_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; + NRF_UARTE_Type * p_reg = p_instance->p_reg; if (p_cb->handler) { @@ -265,18 +300,28 @@ void nrfx_uarte_uninit(nrfx_uarte_t const * p_instance) } // Make sure all transfers are finished before UARTE is disabled // to achieve the lowest power consumption. - nrf_uarte_shorts_disable(p_instance->p_reg, NRF_UARTE_SHORT_ENDRX_STARTRX); - nrf_uarte_task_trigger(p_instance->p_reg, NRF_UARTE_TASK_STOPRX); - nrf_uarte_event_clear(p_instance->p_reg, NRF_UARTE_EVENT_TXSTOPPED); - nrf_uarte_task_trigger(p_instance->p_reg, NRF_UARTE_TASK_STOPTX); - while (!nrf_uarte_event_check(p_instance->p_reg, NRF_UARTE_EVENT_TXSTOPPED)) + nrf_uarte_shorts_disable(p_reg, NRF_UARTE_SHORT_ENDRX_STARTRX); + + // Check if there is any ongoing reception. + if (p_cb->rx_buffer_length) + { + nrf_uarte_event_clear(p_reg, NRF_UARTE_EVENT_RXTO); + nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STOPRX); + } + + nrf_uarte_event_clear(p_reg, NRF_UARTE_EVENT_TXSTOPPED); + nrf_uarte_task_trigger(p_reg, NRF_UARTE_TASK_STOPTX); + + // Wait for TXSTOPPED event and for RXTO event, provided that there was ongoing reception. + while (!nrf_uarte_event_check(p_reg, NRF_UARTE_EVENT_TXSTOPPED) || + (p_cb->rx_buffer_length && !nrf_uarte_event_check(p_reg, NRF_UARTE_EVENT_RXTO))) {} - nrf_uarte_disable(p_instance->p_reg); + nrf_uarte_disable(p_reg); pins_to_default(p_instance); #if NRFX_CHECK(NRFX_PRS_ENABLED) - nrfx_prs_release(p_instance->p_reg); + nrfx_prs_release(p_reg); #endif p_cb->state = NRFX_DRV_STATE_UNINITIALIZED; diff --git a/drivers/src/nrfx_usbd.c b/drivers/src/nrfx_usbd.c index 17f3bfc84..c0598e0a6 100644 --- a/drivers/src/nrfx_usbd.c +++ b/drivers/src/nrfx_usbd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -809,19 +809,19 @@ static inline void usbd_ep_abort(nrfx_usbd_ep_t ep) /* Workaround: Disarm the endpoint if there is any data buffered. */ if(ep != NRFX_USBD_EPIN0) { - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7B6 + (2u * (NRF_USBD_EP_NR_GET(ep) - 1)); - uint8_t temp = *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7B6 + (2u * (NRF_USBD_EP_NR_GET(ep) - 1)); + uint8_t temp = *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); temp |= (1U << 1); - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) |= temp; - (void)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) |= temp; + (void)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); } else { - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7B4; - uint8_t temp = *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7B4; + uint8_t temp = *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); temp |= (1U << 2); - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) |= temp; - (void)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) |= temp; + (void)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); } } if ((m_ep_dma_waiting | (~m_ep_ready)) & (1U << ep2bit(ep))) @@ -1466,7 +1466,7 @@ static void usbd_dmareq_process(void) } nrfx_systick_delay_us(30); - while (0 == (0x20 & *((volatile uint32_t *)(NRF_USBD_BASE + 0x474)))) + while (0 == (0x20 & *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x474)))) { nrfx_systick_delay_us(2); } @@ -1573,54 +1573,54 @@ void nrfx_usbd_irq_handler(void) { uint8_t usbi, uoi, uii; /* Testing */ - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7A9; - uii = (uint8_t)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7A9; + uii = (uint8_t)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); if (0 != uii) { - uii &= (uint8_t)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + uii &= (uint8_t)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); } - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AA; - uoi = (uint8_t)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AA; + uoi = (uint8_t)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); if (0 != uoi) { - uoi &= (uint8_t)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + uoi &= (uint8_t)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); } - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AB; - usbi = (uint8_t)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AB; + usbi = (uint8_t)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); if (0 != usbi) { - usbi &= (uint8_t)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + usbi &= (uint8_t)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); } /* Processing */ - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AC; - uii &= (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AC; + uii &= (uint8_t)*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); if (0 != uii) { uint8_t rb; m_simulated_dataepstatus |= ((uint32_t)uii) << NRFX_USBD_EPIN_BITPOS_0; - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7A9; - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = uii; - rb = (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7A9; + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) = uii; + rb = (uint8_t)*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" uii: 0x%.2x (0x%.2x)", uii, rb); (void)rb; } - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AD; - uoi &= (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AD; + uoi &= (uint8_t)*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); if (0 != uoi) { uint8_t rb; m_simulated_dataepstatus |= ((uint32_t)uoi) << NRFX_USBD_EPOUT_BITPOS_0; - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AA; - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = uoi; - rb = (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AA; + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) = uoi; + rb = (uint8_t)*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" uoi: 0x%.2u (0x%.2x)", uoi, rb); (void)rb; } - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AE; - usbi &= (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AE; + usbi &= (uint8_t)*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); if (0 != usbi) { uint8_t rb; @@ -1632,9 +1632,9 @@ void nrfx_usbd_irq_handler(void) { active |= USBD_INTEN_USBRESET_Msk; } - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AB; - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = usbi; - rb = (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7AB; + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) = usbi; + rb = (uint8_t)*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)); NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" usbi: 0x%.2u (0x%.2x)", usbi, rb); (void)rb; } @@ -1791,8 +1791,8 @@ void nrfx_usbd_enable(void) if (nrfx_usbd_errata_166()) { - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7E3; - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = 0x40; + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7E3; + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) = 0x40; __ISB(); __DSB(); } @@ -2339,9 +2339,9 @@ void nrfx_usbd_transfer_out_drop(nrfx_usbd_ep_t ep) { NRFX_CRITICAL_SECTION_ENTER(); m_ep_ready &= ~(1U << ep2bit(ep)); - *((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7C5 + (2u * NRF_USBD_EP_NR_GET(ep)); - *((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = 0; - (void)(*((volatile uint32_t *)(NRF_USBD_BASE + 0x804))); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x800)) = 0x7C5 + (2u * NRF_USBD_EP_NR_GET(ep)); + *((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804)) = 0; + (void)(*((volatile uint32_t *)((uint32_t)(NRF_USBD) + 0x804))); NRFX_CRITICAL_SECTION_EXIT(); } else diff --git a/drivers/src/nrfx_usbd_errata.h b/drivers/src/nrfx_usbd_errata.h index c50d9dec3..76f0c8747 100644 --- a/drivers/src/nrfx_usbd_errata.h +++ b/drivers/src/nrfx_usbd_errata.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ #define NRFX_USBD_ERRATA_H__ #include +#include +#include #ifndef NRFX_USBD_ERRATA_ENABLE /** @@ -43,106 +45,46 @@ #define NRFX_USBD_ERRATA_ENABLE 1 #endif -static inline bool nrfx_usbd_errata_type_52840(void) -{ - return (*(uint32_t const *)0x10000130UL == 0x8UL); -} - -static inline bool nrfx_usbd_errata_type_52840_eng_a_or_later(void) -{ - return nrfx_usbd_errata_type_52840(); -} - -static inline bool nrfx_usbd_errata_type_52840_eng_b_or_later(void) -{ - return (nrfx_usbd_errata_type_52840() && (*(uint32_t const *)0x10000134UL >= 0x1UL)); -} - -static inline bool nrfx_usbd_errata_type_52840_eng_c_or_later(void) -{ - return (nrfx_usbd_errata_type_52840() && (*(uint32_t const *)0x10000134UL >= 0x2UL)); -} - -static inline bool nrfx_usbd_errata_type_52840_eng_d_or_later(void) -{ - return (nrfx_usbd_errata_type_52840() && (*(uint32_t const *)0x10000134UL >= 0x3UL)); -} - -static inline bool nrfx_usbd_errata_type_52833(void) -{ - return (*(uint32_t const *)0x10000130UL == 0x0DUL); -} - -static inline bool nrfx_usbd_errata_type_52833_eng_a_or_later(void) -{ - return nrfx_usbd_errata_type_52833(); -} - -/* Errata: USBD: EPDATA event is not always generated. - * - * Applies to nRF52840 Engineering A. - **/ +/* Errata: USBD: EPDATA event is not always generated. **/ static inline bool nrfx_usbd_errata_104(void) { - return (NRFX_USBD_ERRATA_ENABLE && (nrfx_usbd_errata_type_52840() - && !nrfx_usbd_errata_type_52840_eng_b_or_later())); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_104(); } -/* Errata: During setup read/write transfer USBD acknowledges setup stage without SETUP task. - * - * Applies to nRF52840 Engineering A. - **/ +/* Errata: During setup read/write transfer USBD acknowledges setup stage without SETUP task. **/ static inline bool nrfx_usbd_errata_154(void) { - return (NRFX_USBD_ERRATA_ENABLE && (nrfx_usbd_errata_type_52840() - && !nrfx_usbd_errata_type_52840_eng_b_or_later())); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_154(); } -/* Errata: ISO double buffering not functional. - * - * Applies to nRF52840. - **/ +/* Errata: ISO double buffering not functional. **/ static inline bool nrfx_usbd_errata_166(void) { - return (NRFX_USBD_ERRATA_ENABLE && nrfx_usbd_errata_type_52840()); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_166(); } -/* Errata: USBD might not reach its active state. - * - * Applies to nRF52840. - **/ +/* Errata: USBD might not reach its active state. **/ static inline bool nrfx_usbd_errata_171(void) { - return (NRFX_USBD_ERRATA_ENABLE && nrfx_usbd_errata_type_52840()); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_171(); } -/* Errata: USB cannot be enabled. - * - * Applies to nRF52840 Engineering B or later and nRF52833. - **/ +/* Errata: USB cannot be enabled. **/ static inline bool nrfx_usbd_errata_187(void) { - return (NRFX_USBD_ERRATA_ENABLE && (nrfx_usbd_errata_type_52840_eng_b_or_later() - || nrfx_usbd_errata_type_52833())); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_187(); } -/* Errata: USBD cannot receive tasks during DMA. - * - * Applies to nRF52840. - **/ +/* Errata: USBD cannot receive tasks during DMA. **/ static inline bool nrfx_usbd_errata_199(void) { - return (NRFX_USBD_ERRATA_ENABLE && nrfx_usbd_errata_type_52840()); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_199(); } -/* Errata: SIZE.EPOUT not writable. - * - * Applies to nRF52840 Engineering A. - **/ +/* Errata: SIZE.EPOUT not writable. **/ static inline bool nrfx_usbd_errata_200(void) { - return (NRFX_USBD_ERRATA_ENABLE && (nrfx_usbd_errata_type_52840() - && !nrfx_usbd_errata_type_52840_eng_b_or_later())); + return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_200(); } #endif // NRFX_USBD_ERRATA_H__ diff --git a/drivers/src/nrfx_usbreg.c b/drivers/src/nrfx_usbreg.c new file mode 100644 index 000000000..abac8b4f1 --- /dev/null +++ b/drivers/src/nrfx_usbreg.c @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#if NRFX_CHECK(NRFX_USBREG_ENABLED) + +#include + +static nrfx_usbreg_event_handler_t m_usbevt_handler; + +nrfx_usbreg_event_handler_t nrfx_usbreg_handler_get(void) +{ + return m_usbevt_handler; +} + +void nrfx_usbreg_init(nrfx_usbreg_config_t const * p_config) +{ + NRFX_ASSERT(p_config != NULL); + NRFX_ASSERT(p_config->handler != NULL); + + nrfx_usbreg_uninit(); + m_usbevt_handler = p_config->handler; + + NRFX_IRQ_PRIORITY_SET(nrfx_get_irq_number(NRF_USBREGULATOR), p_config->irq_priority); + NRFX_IRQ_ENABLE(nrfx_get_irq_number(NRF_USBREGULATOR)); +} + +void nrfx_usbreg_enable(void) +{ + nrf_usbreg_int_enable(NRF_USBREGULATOR, NRF_USBREG_INT_USBDETECTED | + NRF_USBREG_INT_USBREMOVED | + NRF_USBREG_INT_USBPWRRDY); +} + +void nrfx_usbreg_disable(void) +{ + nrf_usbreg_int_disable(NRF_USBREGULATOR, NRF_USBREG_INT_USBDETECTED | + NRF_USBREG_INT_USBREMOVED | + NRF_USBREG_INT_USBPWRRDY); +} + +void nrfx_usbreg_uninit(void) +{ + nrfx_usbreg_disable(); + NRFX_IRQ_DISABLE(nrfx_get_irq_number(NRF_USBREGULATOR)); + m_usbevt_handler = NULL; +} + +void nrfx_usbreg_irq_handler(void) +{ + if (nrf_usbreg_event_check(NRF_USBREGULATOR, NRF_USBREG_EVENT_USBDETECTED)) + { + nrf_usbreg_event_clear(NRF_USBREGULATOR, NRF_USBREG_EVENT_USBDETECTED); + m_usbevt_handler(NRFX_USBREG_EVT_DETECTED); + } + if (nrf_usbreg_event_check(NRF_USBREGULATOR, NRF_USBREG_EVENT_USBREMOVED)) + { + nrf_usbreg_event_clear(NRF_USBREGULATOR, NRF_USBREG_EVENT_USBREMOVED); + m_usbevt_handler(NRFX_USBREG_EVT_REMOVED); + } + if (nrf_usbreg_event_check(NRF_USBREGULATOR, NRF_USBREG_EVENT_USBPWRRDY)) + { + nrf_usbreg_event_clear(NRF_USBREGULATOR, NRF_USBREG_EVENT_USBPWRRDY); + m_usbevt_handler(NRFX_USBREG_EVT_READY); + } +} + +#endif // NRFX_CHECK(NRFX_USBREG_ENABLED) diff --git a/drivers/src/nrfx_wdt.c b/drivers/src/nrfx_wdt.c index 863b3ac97..63dec1cd8 100644 --- a/drivers/src/nrfx_wdt.c +++ b/drivers/src/nrfx_wdt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/prs/nrfx_prs.c b/drivers/src/prs/nrfx_prs.c index 4eaf178cc..37de8b91f 100644 --- a/drivers/src/prs/nrfx_prs.c +++ b/drivers/src/prs/nrfx_prs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/drivers/src/prs/nrfx_prs.h b/drivers/src/prs/nrfx_prs.h index 693b273cf..2767b544b 100644 --- a/drivers/src/prs/nrfx_prs.h +++ b/drivers/src/prs/nrfx_prs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,8 +82,12 @@ extern "C" { #define NRFX_PRS_BOX_0_ADDR NRF_UARTE0 // SPIM1, SPIS1, TWIM1, TWIS1, UARTE1 #define NRFX_PRS_BOX_1_ADDR NRF_UARTE1 + // SPIM2, SPIS2, TWIM2, TWIS2, UARTE2 + #define NRFX_PRS_BOX_2_ADDR NRF_UARTE2 + // SPIM3, SPIS3, TWIM3, TWIS3, UARTE3 + #define NRFX_PRS_BOX_3_ADDR NRF_UARTE3 // COMP, LPCOMP - #define NRFX_PRS_BOX_2_ADDR NRF_COMP + #define NRFX_PRS_BOX_4_ADDR NRF_COMP #elif defined(NRF5340_XXAA_NETWORK) // SPIM0, SPIS0, TWIM0, TWIS0, UARTE0 #define NRFX_PRS_BOX_0_ADDR NRF_UARTE0 diff --git a/hal/nrf_aar.h b/hal/nrf_aar.h index 6d2828bb2..0b35faec6 100644 --- a/hal/nrf_aar.h +++ b/hal/nrf_aar.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_acl.h b/hal/nrf_acl.h index d07b52d66..b205a2e5b 100644 --- a/hal/nrf_acl.h +++ b/hal/nrf_acl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_adc.h b/hal/nrf_adc.h index 951a4a994..2313130de 100644 --- a/hal/nrf_adc.h +++ b/hal/nrf_adc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_bprot.h b/hal/nrf_bprot.h index bbb97d19e..18d8247a2 100644 --- a/hal/nrf_bprot.h +++ b/hal/nrf_bprot.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,8 +67,7 @@ NRF_STATIC_INLINE void nrf_bprot_nvm_blocks_protection_enable(NRF_BPROT_Type * p * NVM protection is disabled by default while debugging. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable True if NVM protection during debug is to be enabled. - * False if otherwise. + * @param[in] enable True if NVM protection during debug is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_bprot_nvm_protection_in_debug_set(NRF_BPROT_Type * p_reg, bool enable); diff --git a/hal/nrf_cache.h b/hal/nrf_cache.h index dd1ff4378..28d5b7985 100644 --- a/hal/nrf_cache.h +++ b/hal/nrf_cache.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -101,8 +101,7 @@ NRF_STATIC_INLINE void nrf_cache_erase_status_clear(NRF_CACHE_Type * p_reg); * @brief Function for setting the cache profiling. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable True if cache profiling is to be enabled. - * False if otherwise. + * @param[in] enable True if cache profiling is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_cache_profiling_set(NRF_CACHE_Type * p_reg, bool enable); @@ -184,8 +183,7 @@ NRF_STATIC_INLINE uint32_t nrf_cache_data_miss_counter_get(NRF_CACHE_Type const * @note -Disabling the RAM mode causes the cache to be invalidated. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable True if the cache RAM mode is to be enabled. - * False if otherwise. + * @param[in] enable True if the cache RAM mode is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_cache_ram_mode_set(NRF_CACHE_Type * p_reg, bool enable); @@ -210,8 +208,7 @@ NRF_STATIC_INLINE void nrf_cache_read_lock_enable(NRF_CACHE_Type * p_reg); * @note Blocking is ignored in the RAM mode. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable True if cache content update lock is to be enabled. - * False if otherwise. + * @param[in] enable True if cache content update lock is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_cache_update_lock_set(NRF_CACHE_Type * p_reg, bool enable); diff --git a/hal/nrf_ccm.h b/hal/nrf_ccm.h index 781304602..189eca2c3 100644 --- a/hal/nrf_ccm.h +++ b/hal/nrf_ccm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -421,7 +421,12 @@ NRF_STATIC_INLINE void nrf_ccm_cnfptr_set(NRF_CCM_Type * p_reg, NRF_STATIC_INLINE uint32_t * nrf_ccm_cnfptr_get(NRF_CCM_Type const * p_reg) { +#if defined(NRF5340_XXAA_NETWORK) + // Apply workaround for anomaly 10. + return (uint32_t *)(p_reg->CNFPTR | 0x01000000); +#else return (uint32_t *)(p_reg->CNFPTR); +#endif } NRF_STATIC_INLINE void nrf_ccm_inptr_set(NRF_CCM_Type * p_reg, @@ -432,7 +437,12 @@ NRF_STATIC_INLINE void nrf_ccm_inptr_set(NRF_CCM_Type * p_reg, NRF_STATIC_INLINE uint32_t * nrf_ccm_inptr_get(NRF_CCM_Type const * p_reg) { +#if defined(NRF5340_XXAA_NETWORK) + // Apply workaround for anomaly 10. + return (uint32_t *)(p_reg->INPTR | 0x01000000); +#else return (uint32_t *)(p_reg->INPTR); +#endif } NRF_STATIC_INLINE void nrf_ccm_outptr_set(NRF_CCM_Type * p_reg, @@ -443,7 +453,12 @@ NRF_STATIC_INLINE void nrf_ccm_outptr_set(NRF_CCM_Type * p_reg, NRF_STATIC_INLINE uint32_t * nrf_ccm_outptr_get(NRF_CCM_Type const * p_reg) { +#if defined(NRF5340_XXAA_NETWORK) + // Apply workaround for anomaly 10. + return (uint32_t *)(p_reg->OUTPTR | 0x01000000); +#else return (uint32_t *)(p_reg->OUTPTR); +#endif } NRF_STATIC_INLINE void nrf_ccm_scratchptr_set(NRF_CCM_Type * p_reg, @@ -454,7 +469,12 @@ NRF_STATIC_INLINE void nrf_ccm_scratchptr_set(NRF_CCM_Type * p_reg, NRF_STATIC_INLINE uint32_t * nrf_ccm_stratchptr_get(NRF_CCM_Type const * p_reg) { +#if defined(NRF5340_XXAA_NETWORK) + // Apply workaround for anomaly 10. + return (uint32_t *)(p_reg->SCRATCHPTR | 0x01000000); +#else return (uint32_t *)(p_reg->SCRATCHPTR); +#endif } #if defined(CCM_RATEOVERRIDE_RATEOVERRIDE_Pos) diff --git a/hal/nrf_clock.h b/hal/nrf_clock.h index 0169f82f9..553e19b57 100644 --- a/hal/nrf_clock.h +++ b/hal/nrf_clock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,8 +44,9 @@ extern "C" { * @ingroup nrf_clock * @brief Hardware access layer for managing the CLOCK peripheral. * - * This code can be used to managing low-frequency clock (LFCLK) and the high-frequency clock - * (HFCLK) settings. + * This code can be used to manage low-frequency clock (LFCLK), high-frequency clock (HFCLK), + * high-frequency 192 MHz clock (HFCLK192M) and high-frequency audio clock (HFCLKAUDIO) + * settings. */ #if defined(CLOCK_LFCLKSRC_BYPASS_Msk) && defined(CLOCK_LFCLKSRC_EXTERNAL_Msk) @@ -53,16 +54,57 @@ extern "C" { #define NRF_CLOCK_USE_EXTERNAL_LFCLK_SOURCES #endif -#if defined(CLOCK_CTIV_CTIV_Msk) || defined(__NRFX_DOXYGEN__) -/** - * @brief Presence of the Low Frequency Clock calibration. - * - * In some MCUs there is possibility to use LFCLK calibration. - */ +#if defined(CLOCK_INTENSET_DONE_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Presence of the Low Frequency Clock calibration. */ #define NRF_CLOCK_HAS_CALIBRATION 1 #else #define NRF_CLOCK_HAS_CALIBRATION 0 -#endif // defined(CLOCK_CTIV_CTIV_Msk) || defined(__NRFX_DOXYGEN__) +#endif + +#if defined(CLOCK_CTIV_CTIV_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Presence of the Low Frequency Clock calibration timer. */ +#define NRF_CLOCK_HAS_CALIBRATION_TIMER 1 +#else +#define NRF_CLOCK_HAS_CALIBRATION_TIMER 0 +#endif + +#if (defined(CLOCK_INTENSET_HFCLK192MSTARTED_Msk) && !defined(NRF5340_XXAA_NETWORK)) \ + || defined(__NRFX_DOXYGEN__) +/** @brief Presence of the 192 MHz clock. */ +#define NRF_CLOCK_HAS_HFCLK192M 1 +#else +#define NRF_CLOCK_HAS_HFCLK192M 0 +#endif + +#if (defined(CLOCK_INTENSET_HFCLKAUDIOSTARTED_Msk) && !defined(NRF5340_XXAA_NETWORK)) \ + || defined(__NRFX_DOXYGEN__) +/** @brief Presence of the Audio clock. */ +#define NRF_CLOCK_HAS_HFCLKAUDIO 1 +#else +#define NRF_CLOCK_HAS_HFCLKAUDIO 0 +#endif + +#if (defined(CLOCK_HFCLKCTRL_HCLK_Msk) && !defined(NRF5340_XXAA_NETWORK)) \ + || defined(__NRFX_DOXYGEN__) +/** @brief Presence of HFCLK frequency configuration. */ +#define NRF_CLOCK_HAS_HFCLK_DIV 1 +#else +#define NRF_CLOCK_HAS_HFCLK_DIV 0 +#endif + +#if defined(CLOCK_LFCLKALWAYSRUN_ALWAYSRUN_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Presence of ALWAYSRUN registers. */ +#define NRF_CLOCK_HAS_ALWAYSRUN 1 +#else +#define NRF_CLOCK_HAS_ALWAYSRUN 0 +#endif + +#if defined(CLOCK_HFCLKSRC_SRC_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Presence of HFCLKSRC register. */ +#define NRF_CLOCK_HAS_HFCLKSRC 1 +#else +#define NRF_CLOCK_HAS_HFCLKSRC 0 +#endif /** * @brief Low-frequency clock sources. @@ -70,6 +112,9 @@ extern "C" { */ typedef enum { +#if defined(CLOCK_LFCLKSRC_SRC_LFULP) || defined(__NRFX_DOXYGEN__) + NRF_CLOCK_LFCLK_LFULP = CLOCK_LFCLKSRC_SRC_LFULP, /**< Internal 32 kHz Ultra-low power oscillator. */ +#endif #if defined(CLOCK_LFCLKSRC_SRC_RC) || defined(__NRFX_DOXYGEN__) NRF_CLOCK_LFCLK_RC = CLOCK_LFCLKSRC_SRC_RC, /**< Internal 32 kHz RC oscillator. */ #else @@ -102,11 +147,16 @@ typedef enum #endif // defined(NRF_CLOCK_USE_EXTERNAL_LFCLK_SOURCES) || defined(__NRFX_DOXYGEN__) } nrf_clock_lfclk_t; -/** @brief High-frequency clock sources. */ +/** + * @brief High-frequency clock sources. + * @details Used by HFCLKSTAT and HFCLK192MSTAT registers. + */ typedef enum { #if defined(CLOCK_HFCLKSTAT_SRC_RC) || defined(__NRFX_DOXYGEN__) NRF_CLOCK_HFCLK_LOW_ACCURACY = CLOCK_HFCLKSTAT_SRC_RC, /**< Internal 16 MHz RC oscillator. */ +#elif defined(CLOCK_HFCLKSTAT_SRC_HFINT) + NRF_CLOCK_HFCLK_LOW_ACCURACY = CLOCK_HFCLKSTAT_SRC_HFINT, /**< Internal 16 MHz RC oscillator. */ #endif #if defined(CLOCK_HFCLKSTAT_SRC_Xtal) || defined(__NRFX_DOXYGEN__) NRF_CLOCK_HFCLK_HIGH_ACCURACY = CLOCK_HFCLKSTAT_SRC_Xtal /**< External 16 MHz/32 MHz crystal oscillator. */ @@ -115,8 +165,39 @@ typedef enum #endif } nrf_clock_hfclk_t; +/** @brief Clock domains. */ +typedef enum +{ + NRF_CLOCK_DOMAIN_LFCLK, + NRF_CLOCK_DOMAIN_HFCLK, +#if NRF_CLOCK_HAS_HFCLK192M + NRF_CLOCK_DOMAIN_HFCLK192M, +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + NRF_CLOCK_DOMAIN_HFCLKAUDIO, +#endif +} nrf_clock_domain_t; + +#if NRF_CLOCK_HAS_HFCLK_DIV || NRF_CLOCK_HAS_HFCLK192M +/** + * @brief High-frequency clock frequency configuration. + * @details Used by HFCLKCTRL and HFCLK192MCTRL registers. + */ +typedef enum +{ + NRF_CLOCK_HFCLK_DIV_1 = CLOCK_HFCLKCTRL_HCLK_Div1, /**< Divide HFCLK/HFCLK192M by 1 */ + NRF_CLOCK_HFCLK_DIV_2 = CLOCK_HFCLKCTRL_HCLK_Div2, /**< Divide HFCLK/HFCLK192M by 2 */ +#if NRF_CLOCK_HAS_HFCLK192M + NRF_CLOCK_HFCLK_DIV_4 = CLOCK_HFCLK192MCTRL_HCLK192M_Div4, /**< Divide HFCLK192M by 4 */ +#endif +} nrf_clock_hfclk_div_t; +#endif // NRF_CLOCK_HAS_HFCLK_DIV || NRF_CLOCK_HAS_HFCLK192M + /** * @brief Trigger status of task LFCLKSTART/HFCLKSTART. + * + * @note This enum is deprecated. + * * @details Used by LFCLKRUN and HFCLKRUN registers. */ typedef enum @@ -128,15 +209,24 @@ typedef enum /** @brief Interrupts. */ typedef enum { - NRF_CLOCK_INT_HF_STARTED_MASK = CLOCK_INTENSET_HFCLKSTARTED_Msk, /**< Interrupt on HFCLKSTARTED event. */ - NRF_CLOCK_INT_LF_STARTED_MASK = CLOCK_INTENSET_LFCLKSTARTED_Msk, /**< Interrupt on LFCLKSTARTED event. */ -#if (NRF_CLOCK_HAS_CALIBRATION) || defined(__NRFX_DOXYGEN__) - NRF_CLOCK_INT_DONE_MASK = CLOCK_INTENSET_DONE_Msk, /**< Interrupt on DONE event. */ - NRF_CLOCK_INT_CTTO_MASK = CLOCK_INTENSET_CTTO_Msk, /**< Interrupt on CTTO event. */ + NRF_CLOCK_INT_HF_STARTED_MASK = CLOCK_INTENSET_HFCLKSTARTED_Msk, /**< Interrupt on HFCLKSTARTED event. */ + NRF_CLOCK_INT_LF_STARTED_MASK = CLOCK_INTENSET_LFCLKSTARTED_Msk, /**< Interrupt on LFCLKSTARTED event. */ +#if NRF_CLOCK_HAS_CALIBRATION + NRF_CLOCK_INT_DONE_MASK = CLOCK_INTENSET_DONE_Msk, /**< Interrupt on DONE event. */ +#endif +#if NRF_CLOCK_HAS_CALIBRATION_TIMER + NRF_CLOCK_INT_CTTO_MASK = CLOCK_INTENSET_CTTO_Msk, /**< Interrupt on CTTO event. */ #endif #if defined(CLOCK_INTENSET_CTSTARTED_Msk) || defined(__NRFX_DOXYGEN__) - NRF_CLOCK_INT_CTSTARTED_MASK = CLOCK_INTENSET_CTSTARTED_Msk, /**< Interrupt on CTSTARTED event. */ - NRF_CLOCK_INT_CTSTOPPED_MASK = CLOCK_INTENSET_CTSTOPPED_Msk /**< Interrupt on CTSTOPPED event. */ + NRF_CLOCK_INT_CTSTARTED_MASK = CLOCK_INTENSET_CTSTARTED_Msk, /**< Interrupt on CTSTARTED event. */ + NRF_CLOCK_INT_CTSTOPPED_MASK = CLOCK_INTENSET_CTSTOPPED_Msk /**< Interrupt on CTSTOPPED event. */ +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + NRF_CLOCK_INT_HFAUDIO_STARTED_MASK = CLOCK_INTENSET_HFCLKAUDIOSTARTED_Msk, /**< Interrupt on HFCLKAUDIOSTARTED event. */ +#endif + +#if NRF_CLOCK_HAS_HFCLK192M + NRF_CLOCK_INT_HF192M_STARTED_MASK = CLOCK_INTENSET_HFCLK192MSTARTED_Msk, /**< Interrupt on HFCLK192MSTARTED event. */ #endif } nrf_clock_int_mask_t; @@ -148,29 +238,47 @@ typedef enum */ typedef enum { - NRF_CLOCK_TASK_HFCLKSTART = offsetof(NRF_CLOCK_Type, TASKS_HFCLKSTART), /**< Start HFCLK clock source.*/ - NRF_CLOCK_TASK_HFCLKSTOP = offsetof(NRF_CLOCK_Type, TASKS_HFCLKSTOP), /**< Stop HFCLK clock source.*/ - NRF_CLOCK_TASK_LFCLKSTART = offsetof(NRF_CLOCK_Type, TASKS_LFCLKSTART), /**< Start LFCLK clock source.*/ - NRF_CLOCK_TASK_LFCLKSTOP = offsetof(NRF_CLOCK_Type, TASKS_LFCLKSTOP), /**< Stop LFCLK clock source.*/ -#if (NRF_CLOCK_HAS_CALIBRATION) || defined(__NRFX_DOXYGEN__) - NRF_CLOCK_TASK_CAL = offsetof(NRF_CLOCK_Type, TASKS_CAL), /**< Start calibration of LFCLK RC oscillator.*/ - NRF_CLOCK_TASK_CTSTART = offsetof(NRF_CLOCK_Type, TASKS_CTSTART), /**< Start calibration timer.*/ - NRF_CLOCK_TASK_CTSTOP = offsetof(NRF_CLOCK_Type, TASKS_CTSTOP) /**< Stop calibration timer.*/ + NRF_CLOCK_TASK_HFCLKSTART = offsetof(NRF_CLOCK_Type, TASKS_HFCLKSTART), /**< Start HFCLK clock source. */ + NRF_CLOCK_TASK_HFCLKSTOP = offsetof(NRF_CLOCK_Type, TASKS_HFCLKSTOP), /**< Stop HFCLK clock source. */ + NRF_CLOCK_TASK_LFCLKSTART = offsetof(NRF_CLOCK_Type, TASKS_LFCLKSTART), /**< Start LFCLK clock source. */ + NRF_CLOCK_TASK_LFCLKSTOP = offsetof(NRF_CLOCK_Type, TASKS_LFCLKSTOP), /**< Stop LFCLK clock source. */ +#if NRF_CLOCK_HAS_CALIBRATION + NRF_CLOCK_TASK_CAL = offsetof(NRF_CLOCK_Type, TASKS_CAL), /**< Start calibration of LFCLK RC oscillator. */ +#endif +#if NRF_CLOCK_HAS_CALIBRATION_TIMER + NRF_CLOCK_TASK_CTSTART = offsetof(NRF_CLOCK_Type, TASKS_CTSTART), /**< Start calibration timer. */ + NRF_CLOCK_TASK_CTSTOP = offsetof(NRF_CLOCK_Type, TASKS_CTSTOP) /**< Stop calibration timer. */ +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + NRF_CLOCK_TASK_HFCLKAUDIOSTART = offsetof(NRF_CLOCK_Type, TASKS_HFCLKAUDIOSTART), /**< Start HFCLKAUDIO clock source. */ + NRF_CLOCK_TASK_HFCLKAUDIOSTOP = offsetof(NRF_CLOCK_Type, TASKS_HFCLKAUDIOSTOP), /**< Stop HFCLKAUDIO clock source. */ +#endif +#if NRF_CLOCK_HAS_HFCLK192M + NRF_CLOCK_TASK_HFCLK192MSTART = offsetof(NRF_CLOCK_Type, TASKS_HFCLK192MSTART), /**< Start HFCLK192M clock source. */ + NRF_CLOCK_TASK_HFCLK192MSTOP = offsetof(NRF_CLOCK_Type, TASKS_HFCLK192MSTOP), /**< Stop HFCLK192M clock source. */ #endif } nrf_clock_task_t; /** @brief Events. */ typedef enum { - NRF_CLOCK_EVENT_HFCLKSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_HFCLKSTARTED), /**< HFCLK oscillator started.*/ - NRF_CLOCK_EVENT_LFCLKSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_LFCLKSTARTED), /**< LFCLK oscillator started.*/ -#if (NRF_CLOCK_HAS_CALIBRATION) || defined(__NRFX_DOXYGEN__) - NRF_CLOCK_EVENT_DONE = offsetof(NRF_CLOCK_Type, EVENTS_DONE), /**< Calibration of LFCLK RC oscillator completed.*/ - NRF_CLOCK_EVENT_CTTO = offsetof(NRF_CLOCK_Type, EVENTS_CTTO), /**< Calibration timer time-out.*/ + NRF_CLOCK_EVENT_HFCLKSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_HFCLKSTARTED), /**< HFCLK oscillator started. */ + NRF_CLOCK_EVENT_LFCLKSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_LFCLKSTARTED), /**< LFCLK oscillator started. */ +#if NRF_CLOCK_HAS_CALIBRATION + NRF_CLOCK_EVENT_DONE = offsetof(NRF_CLOCK_Type, EVENTS_DONE), /**< Calibration of LFCLK RC oscillator completed. */ +#endif +#if NRF_CLOCK_HAS_CALIBRATION_TIMER + NRF_CLOCK_EVENT_CTTO = offsetof(NRF_CLOCK_Type, EVENTS_CTTO), /**< Calibration timer time-out. */ #endif #if defined(CLOCK_INTENSET_CTSTARTED_Msk) || defined(__NRFX_DOXYGEN__) - NRF_CLOCK_EVENT_CTSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_CTSTARTED), /**< Calibration timer started.*/ - NRF_CLOCK_EVENT_CTSTOPPED = offsetof(NRF_CLOCK_Type, EVENTS_CTSTOPPED) /**< Calibration timer stopped.*/ + NRF_CLOCK_EVENT_CTSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_CTSTARTED), /**< Calibration timer started. */ + NRF_CLOCK_EVENT_CTSTOPPED = offsetof(NRF_CLOCK_Type, EVENTS_CTSTOPPED) /**< Calibration timer stopped. */ +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + NRF_CLOCK_EVENT_HFCLKAUDIOSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_HFCLKAUDIOSTARTED), /**< HFCLKAUDIO oscillator started. */ +#endif +#if NRF_CLOCK_HAS_HFCLK192M + NRF_CLOCK_EVENT_HFCLK192MSTARTED = offsetof(NRF_CLOCK_Type, EVENTS_HFCLK192MSTARTED), /**< HFCLK192M oscillator started. */ #endif } nrf_clock_event_t; @@ -251,9 +359,38 @@ NRF_STATIC_INLINE void nrf_clock_event_clear(NRF_CLOCK_Type * p_reg, nrf_clock_e */ NRF_STATIC_INLINE bool nrf_clock_event_check(NRF_CLOCK_Type const * p_reg, nrf_clock_event_t event); +/** + * @brief Function for retrieving the trigger status of the task START for given domain. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] domain Clock domain. + * + * @retval false The task START for the given domain has not been triggered. + * @retval true The task START for the given domain has been triggered. + */ +NRF_STATIC_INLINE bool nrf_clock_start_task_check(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain); + +/** + * @brief Function for retrieving the state of the clock. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] domain Clock domain. + * @param[out] clk_src Clock source that is running. Set to NULL if not needed. + * Ignored for HFCLKAUDIO domain. Typecast it to @ref nrf_clock_lfclk_t for + * LFCLK and @ref nrf_clock_hfclk_t for HFCLK and HFCLK192M. + * + * @retval false The clock is not running. + * @retval true The clock is running. + */ +NRF_STATIC_INLINE bool nrf_clock_is_running(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain, + void * clk_src); + /** * @brief Function for changing the low-frequency clock source. - * @details This function cannot be called when the low-frequency clock is running. + * @details Check in Product Specification if this function can be called when + * the low-frequency clock is running. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * @param[in] source New low-frequency clock source. @@ -277,6 +414,8 @@ NRF_STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_src_get(NRF_CLOCK_Type const * /** * @brief Function for retrieving the active source of the low-frequency clock. * + * @note This function is deprecated. Use @ref nrf_clock_is_running instead. + * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * * @retval NRF_CLOCK_LFCLK_RC The internal 32 kHz RC oscillator @@ -306,6 +445,8 @@ NRF_STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_srccopy_get(NRF_CLOCK_Type cons /** * @brief Function for retrieving the state of the LFCLK clock. * + * @note This function is deprecated. Use @ref nrf_clock_is_running instead. + * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * * @retval false The LFCLK clock is not running. @@ -316,6 +457,8 @@ NRF_STATIC_INLINE bool nrf_clock_lf_is_running(NRF_CLOCK_Type const * p_reg); /** * @brief Function for retrieving the trigger status of the task LFCLKSTART. * + * @note This function is deprecated. Use @ref nrf_clock_start_task_check instead. + * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * * @retval NRF_CLOCK_START_TASK_NOT_TRIGGERED The task LFCLKSTART has not been triggered. @@ -324,14 +467,27 @@ NRF_STATIC_INLINE bool nrf_clock_lf_is_running(NRF_CLOCK_Type const * p_reg); NRF_STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_lf_start_task_status_get(NRF_CLOCK_Type const * p_reg); +#if NRF_CLOCK_HAS_HFCLKSRC +/** + * @brief Function for changing the high-frequency clock source. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] source New high-frequency clock source. + */ +NRF_STATIC_INLINE void nrf_clock_hf_src_set(NRF_CLOCK_Type * p_reg, nrf_clock_hfclk_t source); +#endif + /** - * @brief Function for retrieving the active source of the high-frequency clock. + * @brief Function for retrieving the selected source of the high-frequency clock. + * + * For SoCs not featuring the HFCLKSRC register, this is always also the active source + * of the high-frequency clock. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * - * @retval NRF_CLOCK_HFCLK_LOW_ACCURACY The internal RC oscillator is the active + * @retval NRF_CLOCK_HFCLK_LOW_ACCURACY The internal RC oscillator is the selected * source of the high-frequency clock. - * @retval NRF_CLOCK_HFCLK_HIGH_ACCURACY An external crystal oscillator is the active + * @retval NRF_CLOCK_HFCLK_HIGH_ACCURACY An external crystal oscillator is the selected * source of the high-frequency clock. */ NRF_STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hf_src_get(NRF_CLOCK_Type const * p_reg); @@ -339,6 +495,8 @@ NRF_STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hf_src_get(NRF_CLOCK_Type const * /** * @brief Function for retrieving the state of the HFCLK clock. * + * @note This function is deprecated. Use @ref nrf_clock_is_running instead. + * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * @param[in] clk_src Clock source to be checked. * @@ -351,6 +509,8 @@ NRF_STATIC_INLINE bool nrf_clock_hf_is_running(NRF_CLOCK_Type const * p_reg, /** * @brief Function for retrieving the trigger status of the task HFCLKSTART. * + * @note This function is deprecated. Use @ref nrf_clock_start_task_check instead. + * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * * @retval NRF_CLOCK_START_TASK_NOT_TRIGGERED The task HFCLKSTART has not been triggered. @@ -359,7 +519,38 @@ NRF_STATIC_INLINE bool nrf_clock_hf_is_running(NRF_CLOCK_Type const * p_reg, NRF_STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_hf_start_task_status_get(NRF_CLOCK_Type const * p_reg); -#if (NRF_CLOCK_HAS_CALIBRATION) || defined(__NRFX_DOXYGEN__) +#if NRF_CLOCK_HAS_HFCLKAUDIO +/** + * @brief Function for changing the Audio clock FREQ_VALUE. + * + * The frequency of HFCLKAUDIO ranges from 10.666 MHz to 13.333 MHz in 40.7 Hz steps. + * To calculate @p freq_value corresponding to the chosen frequency, use the following equation: + * FREQ_VALUE = 2^16 * ((12 * f_out / 32M) - 4) + * + * @warning Chosen frequency must fit in 11.176 MHz - 11.402 MHz or 12.165 MHz - 12.411 MHz frequency bands. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] freq_value New FREQ_VALUE + */ +NRF_STATIC_INLINE +void nrf_clock_hfclkaudio_config_set(NRF_CLOCK_Type * p_reg, uint16_t freq_value); + +/** + * @brief Function for retrieving the Audio clock FREQ_VALUE. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * The frequency of HFCLKAUDIO ranges from 10.666 MHz to 13.333 MHz in 40.7 Hz steps. + * To calculate frequency corresponding to the returned FREQ_VALUE, use the following equation: + * f_out = 32M * (4 + FREQ_VALUE * 2^(-16))/12 + + * @return FREQ_VALUE of the Audio clock. + */ +NRF_STATIC_INLINE +uint16_t nrf_clock_hfclkaudio_config_get(NRF_CLOCK_Type const * p_reg); +#endif + +#if NRF_CLOCK_HAS_CALIBRATION_TIMER /** * @brief Function for changing the calibration timer interval. * @@ -370,6 +561,102 @@ nrf_clock_start_task_status_t nrf_clock_hf_start_task_status_get(NRF_CLOCK_Type NRF_STATIC_INLINE void nrf_clock_cal_timer_timeout_set(NRF_CLOCK_Type * p_reg, uint32_t interval); #endif +#if NRF_CLOCK_HAS_HFCLK_DIV +/** + * @brief Function for changing the HFCLK frequency divider. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] divider New HFCLK divider. + */ +NRF_STATIC_INLINE void nrf_clock_hfclk_div_set(NRF_CLOCK_Type * p_reg, + nrf_clock_hfclk_div_t divider); + +/** + * @brief Function for retrieving the HFCLK frequency divider. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return HFCLK frequency divider. + */ +NRF_STATIC_INLINE nrf_clock_hfclk_div_t nrf_clock_hfclk_div_get(NRF_CLOCK_Type const * p_reg); +#endif + +#if NRF_CLOCK_HAS_HFCLK192M +/** + * @brief Function for changing the HFCLK192M frequency divider. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] divider New HFCLK192M divider. + */ +NRF_STATIC_INLINE void nrf_clock_hfclk192m_div_set(NRF_CLOCK_Type * p_reg, + nrf_clock_hfclk_div_t divider); + +/** + * @brief Function for retrieving the HFCLK192M frequency divider. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return HFCLK192M frequency divider. + */ +NRF_STATIC_INLINE nrf_clock_hfclk_div_t nrf_clock_hfclk192m_div_get(NRF_CLOCK_Type const * p_reg); + +/** + * @brief Function for changing the HFCLK192M source. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] source New HFCLK192M source. + */ +NRF_STATIC_INLINE void nrf_clock_hfclk192m_src_set(NRF_CLOCK_Type * p_reg, + nrf_clock_hfclk_t source); + +/** + * @brief Function for retrieving the selected source of the HFCLK192M. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @retval NRF_CLOCK_HFCLK_LOW_ACCURACY The internal RC oscillator is the selected + * source of the HFCLK192M. + * @retval NRF_CLOCK_HFCLK_HIGH_ACCURACY An external crystal oscillator is the selected + * source of the HFCLK192M. + */ +NRF_STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hfclk192m_src_get(NRF_CLOCK_Type const * p_reg); +#endif // NRF_CLOCK_HAS_HFCLK192M + +#if NRF_CLOCK_HAS_ALWAYSRUN +/** + * @brief Function for setting the clock domain to always run. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] domain Clock domain. + * @param[in] alwaysrun Ensure the clock is always running. + */ +NRF_STATIC_INLINE void nrf_clock_alwaysrun_set(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain, + bool alwaysrun); +/** + * @brief Function for checking if the clock domain is configured to always run. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] domain Clock domain. + * + * @retval true The clock domain is configured to always run. + * @retval false The clock domain is not configured to always run. + */ +NRF_STATIC_INLINE bool nrf_clock_alwaysrun_get(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain); +/** + * @brief Function for checking if the clock domain always run setting is active. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] domain Clock domain. + * + * @retval true The clock domain always run setting is active. + * @retval false The clock domain always run setting is not active. + */ +NRF_STATIC_INLINE bool nrf_clock_alwaysrun_active_get(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain); +#endif + #if defined(DPPI_PRESENT) || defined(__NRFX_DOXYGEN__) /** * @brief Function for setting the subscribe configuration for a given @@ -462,6 +749,89 @@ NRF_STATIC_INLINE bool nrf_clock_event_check(NRF_CLOCK_Type const * p_reg, nrf_c return (bool)*((volatile uint32_t *)((uint8_t *)p_reg + event)); } +NRF_STATIC_INLINE bool nrf_clock_start_task_check(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain) +{ + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + return ((p_reg->LFCLKRUN & CLOCK_LFCLKRUN_STATUS_Msk) + >> CLOCK_LFCLKRUN_STATUS_Pos); + case NRF_CLOCK_DOMAIN_HFCLK: + return ((p_reg->HFCLKRUN & CLOCK_HFCLKRUN_STATUS_Msk) + >> CLOCK_HFCLKRUN_STATUS_Pos); +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + return ((p_reg->HFCLK192MRUN & CLOCK_HFCLK192MRUN_STATUS_Msk) + >> CLOCK_HFCLK192MRUN_STATUS_Pos); +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + return ((p_reg->HFCLKAUDIORUN & CLOCK_HFCLKAUDIORUN_STATUS_Msk) + >> CLOCK_HFCLKAUDIORUN_STATUS_Pos); +#endif + default: + NRFX_ASSERT(0); + return false; + } +} + +NRF_STATIC_INLINE bool nrf_clock_is_running(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain, + void * clk_src) +{ + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + if (clk_src != NULL) + { + (*(uint32_t *)clk_src) = ((p_reg->LFCLKSTAT & CLOCK_LFCLKSTAT_SRC_Msk) + >> CLOCK_LFCLKSTAT_SRC_Pos); + } + if ((p_reg->LFCLKSTAT & CLOCK_LFCLKSTAT_STATE_Msk) + >> CLOCK_LFCLKSTAT_STATE_Pos) + { + return true; + } + break; + case NRF_CLOCK_DOMAIN_HFCLK: + if (clk_src != NULL) + { + (*(uint32_t *)clk_src) = ((p_reg->HFCLKSTAT & CLOCK_HFCLKSTAT_SRC_Msk) + >> CLOCK_HFCLKSTAT_SRC_Pos); + } + if ((p_reg->HFCLKSTAT & CLOCK_HFCLKSTAT_STATE_Msk) + >> CLOCK_HFCLKSTAT_STATE_Pos) + { + return true; + } + break; +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + if (clk_src != NULL) + { + (*(uint32_t *)clk_src) = ((p_reg->HFCLK192MSTAT & CLOCK_HFCLK192MSTAT_SRC_Msk) + >> CLOCK_HFCLK192MSTAT_SRC_Pos); + } + if ((p_reg->HFCLK192MSTAT & CLOCK_HFCLK192MSTAT_STATE_Msk) + >> CLOCK_HFCLK192MSTAT_STATE_Pos) + { + return true; + } + break; +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + return (p_reg->HFCLKAUDIOSTAT & CLOCK_HFCLKAUDIOSTAT_STATE_Msk) == + CLOCK_HFCLKAUDIOSTAT_STATE_Msk; +#endif + default: + NRFX_ASSERT(0); + return false; + } + return false; +} + NRF_STATIC_INLINE void nrf_clock_lf_src_set(NRF_CLOCK_Type * p_reg, nrf_clock_lfclk_t source) { p_reg->LFCLKSRC = (uint32_t)(source); @@ -474,8 +844,9 @@ NRF_STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_src_get(NRF_CLOCK_Type const * NRF_STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_actv_src_get(NRF_CLOCK_Type const * p_reg) { - return (nrf_clock_lfclk_t)((p_reg->LFCLKSTAT & CLOCK_LFCLKSTAT_SRC_Msk) - >> CLOCK_LFCLKSTAT_SRC_Pos); + nrf_clock_lfclk_t clk_src; + (void)nrf_clock_is_running(p_reg, NRF_CLOCK_DOMAIN_LFCLK, &clk_src); + return clk_src; } NRF_STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_srccopy_get(NRF_CLOCK_Type const * p_reg) @@ -486,43 +857,203 @@ NRF_STATIC_INLINE nrf_clock_lfclk_t nrf_clock_lf_srccopy_get(NRF_CLOCK_Type cons NRF_STATIC_INLINE bool nrf_clock_lf_is_running(NRF_CLOCK_Type const * p_reg) { - return ((p_reg->LFCLKSTAT & CLOCK_LFCLKSTAT_STATE_Msk) >> CLOCK_LFCLKSTAT_STATE_Pos); + return nrf_clock_is_running(p_reg, NRF_CLOCK_DOMAIN_LFCLK, NULL); } NRF_STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_lf_start_task_status_get(NRF_CLOCK_Type const * p_reg) { - return (nrf_clock_start_task_status_t)((p_reg->LFCLKRUN & CLOCK_LFCLKRUN_STATUS_Msk) - >> CLOCK_LFCLKRUN_STATUS_Pos); + return (nrf_clock_start_task_status_t)nrf_clock_start_task_check(p_reg, + NRF_CLOCK_DOMAIN_LFCLK); +} + +#if NRF_CLOCK_HAS_HFCLKSRC +NRF_STATIC_INLINE void nrf_clock_hf_src_set(NRF_CLOCK_Type * p_reg, nrf_clock_hfclk_t source) +{ + p_reg->HFCLKSRC = (uint32_t)(source); } +#endif NRF_STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hf_src_get(NRF_CLOCK_Type const * p_reg) { +#if NRF_CLOCK_HAS_HFCLKSRC + return (nrf_clock_hfclk_t)(p_reg->HFCLKSRC); +#else return (nrf_clock_hfclk_t)((p_reg->HFCLKSTAT & CLOCK_HFCLKSTAT_SRC_Msk) >> CLOCK_HFCLKSTAT_SRC_Pos); +#endif } NRF_STATIC_INLINE bool nrf_clock_hf_is_running(NRF_CLOCK_Type const * p_reg, nrf_clock_hfclk_t clk_src) { - return (p_reg->HFCLKSTAT & (CLOCK_HFCLKSTAT_STATE_Msk | CLOCK_HFCLKSTAT_SRC_Msk)) == - (CLOCK_HFCLKSTAT_STATE_Msk | (clk_src << CLOCK_HFCLKSTAT_SRC_Pos)); + nrf_clock_hfclk_t active_clk_src; + bool ret = nrf_clock_is_running(p_reg, NRF_CLOCK_DOMAIN_HFCLK, &active_clk_src); + return (ret && (active_clk_src == clk_src)); } NRF_STATIC_INLINE nrf_clock_start_task_status_t nrf_clock_hf_start_task_status_get(NRF_CLOCK_Type const * p_reg) { - return (nrf_clock_start_task_status_t)((p_reg->HFCLKRUN & CLOCK_HFCLKRUN_STATUS_Msk) - >> CLOCK_HFCLKRUN_STATUS_Pos); + return (nrf_clock_start_task_status_t)nrf_clock_start_task_check(p_reg, + NRF_CLOCK_DOMAIN_HFCLK); +} + +#if NRF_CLOCK_HAS_HFCLKAUDIO +NRF_STATIC_INLINE +void nrf_clock_hfclkaudio_config_set(NRF_CLOCK_Type * p_reg, uint16_t freq_value) +{ + p_reg->HFCLKAUDIO.FREQUENCY = freq_value; +} + +NRF_STATIC_INLINE +uint16_t nrf_clock_hfclkaudio_config_get(NRF_CLOCK_Type const * p_reg) +{ + return (uint16_t)(p_reg->HFCLKAUDIO.FREQUENCY); +} +#endif + +#if NRF_CLOCK_HAS_HFCLK_DIV +NRF_STATIC_INLINE +void nrf_clock_hfclk_div_set(NRF_CLOCK_Type * p_reg, nrf_clock_hfclk_div_t divider) +{ + p_reg->HFCLKCTRL = (((uint8_t)(divider) << CLOCK_HFCLKCTRL_HCLK_Pos) & + CLOCK_HFCLKCTRL_HCLK_Msk); +} + +NRF_STATIC_INLINE nrf_clock_hfclk_div_t nrf_clock_hfclk_div_get(NRF_CLOCK_Type const * p_reg) +{ + return (nrf_clock_hfclk_div_t)((p_reg->HFCLKCTRL & CLOCK_HFCLKCTRL_HCLK_Msk) + >> CLOCK_HFCLKCTRL_HCLK_Pos); +} +#endif + +#if NRF_CLOCK_HAS_HFCLK192M +NRF_STATIC_INLINE +void nrf_clock_hfclk192m_div_set(NRF_CLOCK_Type * p_reg, nrf_clock_hfclk_div_t divider) +{ + p_reg->HFCLK192MCTRL = (((uint8_t)(divider) << CLOCK_HFCLK192MCTRL_HCLK192M_Pos) & + CLOCK_HFCLK192MCTRL_HCLK192M_Msk); } -#if (NRF_CLOCK_HAS_CALIBRATION) +NRF_STATIC_INLINE nrf_clock_hfclk_div_t nrf_clock_hfclk192m_div_get(NRF_CLOCK_Type const * p_reg) +{ + return (nrf_clock_hfclk_div_t)((p_reg->HFCLK192MCTRL & CLOCK_HFCLK192MCTRL_HCLK192M_Msk) + >> CLOCK_HFCLK192MCTRL_HCLK192M_Pos); +} + +NRF_STATIC_INLINE void nrf_clock_hfclk192m_src_set(NRF_CLOCK_Type * p_reg, nrf_clock_hfclk_t source) +{ + p_reg->HFCLK192MSRC = (uint32_t)(source); +} + +NRF_STATIC_INLINE nrf_clock_hfclk_t nrf_clock_hfclk192m_src_get(NRF_CLOCK_Type const * p_reg) +{ + return (nrf_clock_hfclk_t)(p_reg->HFCLK192MSRC); +} +#endif + +#if NRF_CLOCK_HAS_CALIBRATION_TIMER NRF_STATIC_INLINE void nrf_clock_cal_timer_timeout_set(NRF_CLOCK_Type * p_reg, uint32_t interval) { p_reg->CTIV = ((interval << CLOCK_CTIV_CTIV_Pos) & CLOCK_CTIV_CTIV_Msk); } #endif +#if NRF_CLOCK_HAS_ALWAYSRUN +NRF_STATIC_INLINE void nrf_clock_alwaysrun_set(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain, + bool alwaysrun) +{ + /* ALWAYSRUN registers should be R/W, but are marked as read-only. + * Redefine them as R/W as a workaround. */ + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + *(volatile uint32_t *)(&p_reg->LFCLKALWAYSRUN) = + ((alwaysrun << CLOCK_LFCLKALWAYSRUN_ALWAYSRUN_Pos) + & CLOCK_LFCLKALWAYSRUN_ALWAYSRUN_Msk); + break; + case NRF_CLOCK_DOMAIN_HFCLK: + *(volatile uint32_t *)(&p_reg->HFCLKALWAYSRUN) = + ((alwaysrun << CLOCK_HFCLKALWAYSRUN_ALWAYSRUN_Pos) + & CLOCK_HFCLKALWAYSRUN_ALWAYSRUN_Msk); + break; +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + *(volatile uint32_t *)(&p_reg->HFCLK192MALWAYSRUN) = + ((alwaysrun << CLOCK_HFCLK192MALWAYSRUN_ALWAYSRUN_Pos) + & CLOCK_HFCLK192MALWAYSRUN_ALWAYSRUN_Msk); + break; +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + *(volatile uint32_t *)(&p_reg->HFCLKAUDIOALWAYSRUN) = + ((alwaysrun << CLOCK_HFCLKAUDIOALWAYSRUN_ALWAYSRUN_Pos) + & CLOCK_HFCLKAUDIOALWAYSRUN_ALWAYSRUN_Msk); + break; +#endif + default: + NRFX_ASSERT(0); + break; + } +} + +NRF_STATIC_INLINE bool nrf_clock_alwaysrun_get(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain) +{ + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + return ((p_reg->LFCLKALWAYSRUN & CLOCK_LFCLKALWAYSRUN_ALWAYSRUN_Msk) + >> CLOCK_LFCLKALWAYSRUN_ALWAYSRUN_Pos); + case NRF_CLOCK_DOMAIN_HFCLK: + return ((p_reg->HFCLKALWAYSRUN & CLOCK_HFCLKALWAYSRUN_ALWAYSRUN_Msk) + >> CLOCK_HFCLKALWAYSRUN_ALWAYSRUN_Pos); +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + return ((p_reg->HFCLK192MALWAYSRUN & CLOCK_HFCLK192MALWAYSRUN_ALWAYSRUN_Msk) + >> CLOCK_HFCLK192MALWAYSRUN_ALWAYSRUN_Pos); +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + return ((p_reg->HFCLKAUDIOALWAYSRUN & CLOCK_HFCLKAUDIOALWAYSRUN_ALWAYSRUN_Msk) + >> CLOCK_HFCLKAUDIOALWAYSRUN_ALWAYSRUN_Pos); +#endif + default: + NRFX_ASSERT(0); + return false; + } +} + +NRF_STATIC_INLINE bool nrf_clock_alwaysrun_active_get(NRF_CLOCK_Type const * p_reg, + nrf_clock_domain_t domain) +{ + switch (domain) + { + case NRF_CLOCK_DOMAIN_LFCLK: + return ((p_reg->LFCLKSTAT & CLOCK_LFCLKSTAT_ALWAYSRUNNING_Msk) + >> CLOCK_LFCLKSTAT_ALWAYSRUNNING_Pos); + case NRF_CLOCK_DOMAIN_HFCLK: + return ((p_reg->HFCLKSTAT & CLOCK_HFCLKSTAT_ALWAYSRUNNING_Msk) + >> CLOCK_HFCLKSTAT_ALWAYSRUNNING_Pos); +#if NRF_CLOCK_HAS_HFCLK192M + case NRF_CLOCK_DOMAIN_HFCLK192M: + return ((p_reg->HFCLK192MSTAT & CLOCK_HFCLK192MSTAT_ALWAYSRUNNING_Msk) + >> CLOCK_HFCLK192MSTAT_ALWAYSRUNNING_Pos); +#endif +#if NRF_CLOCK_HAS_HFCLKAUDIO + case NRF_CLOCK_DOMAIN_HFCLKAUDIO: + return ((p_reg->HFCLKAUDIOSTAT & CLOCK_HFCLKAUDIOSTAT_ALWAYSRUNNING_Msk) + >> CLOCK_HFCLKAUDIOSTAT_ALWAYSRUNNING_Pos); +#endif + default: + NRFX_ASSERT(0); + return false; + } +} +#endif // NRF_CLOCK_HAS_ALWAYSRUN + #if defined(DPPI_PRESENT) NRF_STATIC_INLINE void nrf_clock_subscribe_set(NRF_CLOCK_Type * p_reg, nrf_clock_task_t task, diff --git a/hal/nrf_comp.h b/hal/nrf_comp.h index 804abe355..3a00c481f 100644 --- a/hal/nrf_comp.h +++ b/hal/nrf_comp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_dcnf.h b/hal/nrf_dcnf.h new file mode 100644 index 000000000..79dc7c5b4 --- /dev/null +++ b/hal/nrf_dcnf.h @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRF_DCNF_H__ +#define NRF_DCNF_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup nrf_dcnf_hal DCNF HAL + * @{ + * @ingroup nrf_dcnf + * @brief Hardware access layer for managing the Domain Configuration (DCNF) module. + */ + +/** + * @brief Function for getting the value of the CPU ID. + * + * CPU ID can be used to identify the specific CPU in the multi-core environment. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return CPU ID. + */ +NRF_STATIC_INLINE uint32_t nrf_dcnf_cpuid_get(NRF_DCNF_Type const * p_reg); + +#if defined(DCNF_EXTPERI_PROTECT_SLAVE0_Msk) +/** + * @brief Function for configuring the control access to local peripheral memory regions. + * Intended for external master connected to specified AMLI master port. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] port_idx Index of the master port to configure. + * @param[in] mask Mask of the AHB slaves to be protected from being accessed + * by external AHB masters. + */ +NRF_STATIC_INLINE void nrf_dcnf_peripheral_access_set(NRF_DCNF_Type * p_reg, + uint8_t port_idx, + uint32_t mask); + +/** + * @brief Function for getting the configuration of control access to local peripheral + * memory regions. Intended for external master connected to specified AMLI master port. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] port_idx Index of the master port to configure. + * + * @return Mask of the AHB slaves that are currently protected. + */ +NRF_STATIC_INLINE uint32_t nrf_dcnf_peripheral_access_get(NRF_DCNF_Type const * p_reg, + uint8_t port_idx); +#endif // defined(DCNF_EXTPERI_PROTECT_SLAVE0_Msk) + +#if defined(DCNF_EXTRAM_PROTECT_SLAVE0_Msk) +/** + * @brief Function for configuring the control access to local RAM memory regions. + * Intended for external master connected to specified AMLI master port. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] port_idx Index of the master port to configure. + * @param[in] mask Mask of the AHB slaves to be protected from being accessed + * by external AHB masters. + */ +NRF_STATIC_INLINE void nrf_dcnf_ram_access_set(NRF_DCNF_Type * p_reg, + uint8_t port_idx, + uint32_t mask); + +/** + * @brief Function for getting the configuration of control access to local RAM + * memory regions. Intended for external master connected to specified AMLI master port. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] port_idx Index of the master port to configure. + * + * @return Mask of the AHB slaves that are currently protected. + */ +NRF_STATIC_INLINE uint32_t nrf_dcnf_ram_access_get(NRF_DCNF_Type const * p_reg, + uint8_t port_idx); +#endif // defined(DCNF_EXTRAM_PROTECT_SLAVE0_Msk) + +#if defined(DCNF_EXTCODE_PROTECT_SLAVE0_Msk) +/** + * @brief Function for configuring the control access to local code memory regions. + * Intended for external master connected to specified AMLI master port. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] port_idx Index of the master port to configure. + * @param[in] mask Mask of the AHB slaves to be protected from being accessed + * by external AHB masters. + */ +NRF_STATIC_INLINE void nrf_dcnf_code_access_set(NRF_DCNF_Type * p_reg, + uint8_t port_idx, + uint32_t mask); + +/** + * @brief Function for getting the configuration of control access to local code + * memory regions. Intended for external master connected to specified AMLI master port. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] port_idx Index of the master port to configure. + * + * @return Mask of the AHB slaves that are currently protected. + */ +NRF_STATIC_INLINE uint32_t nrf_dcnf_code_access_get(NRF_DCNF_Type const * p_reg, + uint8_t port_idx); +#endif // defined(DCNF_EXTCODE_PROTECT_SLAVE0_Msk) + +#ifndef NRF_DECLARE_ONLY + +NRF_STATIC_INLINE uint32_t nrf_dcnf_cpuid_get(NRF_DCNF_Type const * p_reg) +{ + return p_reg->CPUID; +} + +#if defined(DCNF_EXTPERI_PROTECT_SLAVE0_Msk) +NRF_STATIC_INLINE void nrf_dcnf_peripheral_access_set(NRF_DCNF_Type * p_reg, + uint8_t port_idx, + uint32_t mask) +{ + p_reg->EXTPERI[port_idx].PROTECT = mask; +} + +NRF_STATIC_INLINE uint32_t nrf_dcnf_peripheral_access_get(NRF_DCNF_Type const * p_reg, + uint8_t port_idx) +{ + return p_reg->EXTPERI[port_idx].PROTECT; +} +#endif + +#if defined(DCNF_EXTRAM_PROTECT_SLAVE0_Msk) +NRF_STATIC_INLINE void nrf_dcnf_ram_access_set(NRF_DCNF_Type * p_reg, + uint8_t port_idx, + uint32_t mask) +{ + p_reg->EXTRAM[port_idx].PROTECT = mask; +} + +NRF_STATIC_INLINE uint32_t nrf_dcnf_ram_access_get(NRF_DCNF_Type const * p_reg, + uint8_t port_idx) +{ + return p_reg->EXTRAM[port_idx].PROTECT; +} +#endif + +#if defined(DCNF_EXTCODE_PROTECT_SLAVE0_Msk) +NRF_STATIC_INLINE void nrf_dcnf_code_access_set(NRF_DCNF_Type * p_reg, + uint8_t port_idx, + uint32_t mask) +{ + p_reg->EXTCODE[port_idx].PROTECT = mask; +} + +NRF_STATIC_INLINE uint32_t nrf_dcnf_code_access_get(NRF_DCNF_Type const * p_reg, + uint8_t port_idx) +{ + return p_reg->EXTCODE[port_idx].PROTECT; +} +#endif + +#endif // NRF_DECLARE_ONLY + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_DCNF_H__ diff --git a/hal/nrf_dppi.h b/hal/nrf_dppi.h index 486224bd1..9ff7e08a1 100644 --- a/hal/nrf_dppi.h +++ b/hal/nrf_dppi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_ecb.h b/hal/nrf_ecb.h index 9cef4addb..e734e14ae 100644 --- a/hal/nrf_ecb.h +++ b/hal/nrf_ecb.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2012 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_egu.h b/hal/nrf_egu.h index 3a7bf4ea3..8c5cdc221 100644 --- a/hal/nrf_egu.h +++ b/hal/nrf_egu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_ficr.h b/hal/nrf_ficr.h index 5967b0692..193c83adc 100644 --- a/hal/nrf_ficr.h +++ b/hal/nrf_ficr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_fpu.h b/hal/nrf_fpu.h index 35ff12c80..14bcab819 100644 --- a/hal/nrf_fpu.h +++ b/hal/nrf_fpu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_gpio.h b/hal/nrf_gpio.h index d2b936650..6fcf5e60c 100644 --- a/hal/nrf_gpio.h +++ b/hal/nrf_gpio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,6 +59,11 @@ extern "C" { * @brief Hardware access layer for managing the GPIO peripheral. */ +#if defined(GPIO_LATCH_PIN0_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether the functionality of latching GPIO state change is present. */ +#define NRF_GPIO_LATCH_PRESENT +#endif + /** @brief Macro for mapping port and pin numbers to values understandable for nrf_gpio functions. */ #define NRF_GPIO_PIN_MAP(port, pin) (((port) << 5) | ((pin) & 0x1F)) @@ -91,14 +96,35 @@ typedef enum /** @brief Enumerator used for selecting output drive mode. */ typedef enum { - NRF_GPIO_PIN_S0S1 = GPIO_PIN_CNF_DRIVE_S0S1, ///< !< Standard '0', standard '1'. - NRF_GPIO_PIN_H0S1 = GPIO_PIN_CNF_DRIVE_H0S1, ///< !< High-drive '0', standard '1'. - NRF_GPIO_PIN_S0H1 = GPIO_PIN_CNF_DRIVE_S0H1, ///< !< Standard '0', high-drive '1'. - NRF_GPIO_PIN_H0H1 = GPIO_PIN_CNF_DRIVE_H0H1, ///< !< High drive '0', high-drive '1'. - NRF_GPIO_PIN_D0S1 = GPIO_PIN_CNF_DRIVE_D0S1, ///< !< Disconnect '0' standard '1'. - NRF_GPIO_PIN_D0H1 = GPIO_PIN_CNF_DRIVE_D0H1, ///< !< Disconnect '0', high-drive '1'. - NRF_GPIO_PIN_S0D1 = GPIO_PIN_CNF_DRIVE_S0D1, ///< !< Standard '0', disconnect '1'. - NRF_GPIO_PIN_H0D1 = GPIO_PIN_CNF_DRIVE_H0D1, ///< !< High-drive '0', disconnect '1'. + NRF_GPIO_PIN_S0S1 = GPIO_PIN_CNF_DRIVE_S0S1, ///< Standard '0', standard '1'. + NRF_GPIO_PIN_H0S1 = GPIO_PIN_CNF_DRIVE_H0S1, ///< High drive '0', standard '1'. + NRF_GPIO_PIN_S0H1 = GPIO_PIN_CNF_DRIVE_S0H1, ///< Standard '0', high drive '1'. + NRF_GPIO_PIN_H0H1 = GPIO_PIN_CNF_DRIVE_H0H1, ///< High drive '0', high drive '1'. + NRF_GPIO_PIN_D0S1 = GPIO_PIN_CNF_DRIVE_D0S1, ///< Disconnect '0' standard '1'. + NRF_GPIO_PIN_D0H1 = GPIO_PIN_CNF_DRIVE_D0H1, ///< Disconnect '0', high drive '1'. + NRF_GPIO_PIN_S0D1 = GPIO_PIN_CNF_DRIVE_S0D1, ///< Standard '0', disconnect '1'. + NRF_GPIO_PIN_H0D1 = GPIO_PIN_CNF_DRIVE_H0D1, ///< High drive '0', disconnect '1'. +#if defined(GPIO_PIN_CNF_DRIVE_E0S1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_E0S1 = GPIO_PIN_CNF_DRIVE_E0S1, ///< Extra high drive '0', standard '1'. +#endif +#if defined(GPIO_PIN_CNF_DRIVE_S0E1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_S0E1 = GPIO_PIN_CNF_DRIVE_S0E1, ///< Standard '0', extra high drive '1'. +#endif +#if defined(GPIO_PIN_CNF_DRIVE_E0E1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_E0E1 = GPIO_PIN_CNF_DRIVE_E0E1, ///< Extra high drive '0', extra high drive '1'. +#endif +#if defined(GPIO_PIN_CNF_DRIVE_E0H1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_E0H1 = GPIO_PIN_CNF_DRIVE_E0H1, ///< Extra high drive '0', high drive '1'. +#endif +#if defined(GPIO_PIN_CNF_DRIVE_H0E1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_H0E1 = GPIO_PIN_CNF_DRIVE_H0E1, ///< High drive '0', extra high drive '1'. +#endif +#if defined(GPIO_PIN_CNF_DRIVE_D0E1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_D0E1 = GPIO_PIN_CNF_DRIVE_D0E1, ///< Disconnect '0', extra high drive '1'. +#endif +#if defined(GPIO_PIN_CNF_DRIVE_E0D1) || defined(__NRFX_DOXYGEN__) + NRF_GPIO_PIN_E0D1 = GPIO_PIN_CNF_DRIVE_E0D1, ///< Extra high drive '0', disconnect '1'. +#endif } nrf_gpio_pin_drive_t; /** @brief Enumerator used for selecting the pin to sense high or low level on the pin input. */ @@ -421,7 +447,7 @@ NRF_STATIC_INLINE void nrf_gpio_ports_read(uint32_t start_port, uint32_t length, uint32_t * p_masks); -#if defined(GPIO_DETECTMODE_DETECTMODE_LDETECT) || defined(__NRF_DOXYGEN__) +#if defined(NRF_GPIO_LATCH_PRESENT) /** * @brief Function for reading latch state of multiple consecutive ports. * @@ -433,6 +459,17 @@ NRF_STATIC_INLINE void nrf_gpio_latches_read(uint32_t start_port, uint32_t length, uint32_t * p_masks); +/** + * @brief Function for reading and immediate clearing latch state of multiple consecutive ports. + * + * @param start_port Index of the first port to read and clear. + * @param length Number of ports to read and clear. + * @param p_masks Pointer to output array where latch states will be stored. + */ +NRF_STATIC_INLINE void nrf_gpio_latches_read_and_clear(uint32_t start_port, + uint32_t length, + uint32_t * p_masks); + /** * @brief Function for reading latch state of single pin. * @@ -448,7 +485,7 @@ NRF_STATIC_INLINE uint32_t nrf_gpio_pin_latch_get(uint32_t pin_number); * @param pin_number Pin number. */ NRF_STATIC_INLINE void nrf_gpio_pin_latch_clear(uint32_t pin_number); -#endif +#endif // defined(NRF_GPIO_LATCH_PRESENT) #if defined(GPIO_PIN_CNF_MCUSEL_Msk) || defined(__NRFX_DOXYGEN__) /** @@ -789,7 +826,7 @@ NRF_STATIC_INLINE void nrf_gpio_ports_read(uint32_t start_port, } -#ifdef GPIO_DETECTMODE_DETECTMODE_LDETECT +#if defined(NRF_GPIO_LATCH_PRESENT) NRF_STATIC_INLINE void nrf_gpio_latches_read(uint32_t start_port, uint32_t length, uint32_t * p_masks) @@ -804,6 +841,23 @@ NRF_STATIC_INLINE void nrf_gpio_latches_read(uint32_t start_port, } } +NRF_STATIC_INLINE void nrf_gpio_latches_read_and_clear(uint32_t start_port, + uint32_t length, + uint32_t * p_masks) +{ + NRF_GPIO_Type * gpio_regs[GPIO_COUNT] = GPIO_REG_LIST; + uint32_t i; + + for (i = start_port; i < (start_port + length); i++) + { + *p_masks = gpio_regs[i]->LATCH; + + // The LATCH register is cleared by writing a '1' to the bit that shall be cleared. + gpio_regs[i]->LATCH = *p_masks; + + p_masks++; + } +} NRF_STATIC_INLINE uint32_t nrf_gpio_pin_latch_get(uint32_t pin_number) { @@ -819,7 +873,7 @@ NRF_STATIC_INLINE void nrf_gpio_pin_latch_clear(uint32_t pin_number) reg->LATCH = (1 << pin_number); } -#endif +#endif // defined(NRF_GPIO_LATCH_PRESENT) #if defined(GPIO_PIN_CNF_MCUSEL_Msk) NRF_STATIC_INLINE void nrf_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_mcusel_t mcu) diff --git a/hal/nrf_gpiote.h b/hal/nrf_gpiote.h index ab09e717e..8f3321da2 100644 --- a/hal/nrf_gpiote.h +++ b/hal/nrf_gpiote.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_i2s.h b/hal/nrf_i2s.h index 33b81237d..da71bc620 100644 --- a/hal/nrf_i2s.h +++ b/hal/nrf_i2s.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,13 @@ extern "C" { * @brief Hardware access layer for managing the Inter-IC Sound (I2S) peripheral. */ +#if defined(I2S_CONFIG_CLKCONFIG_CLKSRC_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether clock source configuration is available. */ +#define NRF_I2S_HAS_CLKCONFIG 1 +#else +#define NRF_I2S_HAS_CLKCONFIG 0 +#endif + /** * @brief This value can be provided as a parameter for the @ref nrf_i2s_pins_set * function call to specify that the given I2S signal (SDOUT, SDIN, or MCK) @@ -63,17 +70,23 @@ typedef enum /** @brief I2S events. */ typedef enum { - NRF_I2S_EVENT_RXPTRUPD = offsetof(NRF_I2S_Type, EVENTS_RXPTRUPD), ///< The RXD.PTR register has been copied to internal double buffers. - NRF_I2S_EVENT_TXPTRUPD = offsetof(NRF_I2S_Type, EVENTS_TXPTRUPD), ///< The TXD.PTR register has been copied to internal double buffers. - NRF_I2S_EVENT_STOPPED = offsetof(NRF_I2S_Type, EVENTS_STOPPED) ///< I2S transfer stopped. + NRF_I2S_EVENT_RXPTRUPD = offsetof(NRF_I2S_Type, EVENTS_RXPTRUPD), ///< The RXD.PTR register has been copied to internal double buffers. + NRF_I2S_EVENT_TXPTRUPD = offsetof(NRF_I2S_Type, EVENTS_TXPTRUPD), ///< The TXD.PTR register has been copied to internal double buffers. + NRF_I2S_EVENT_STOPPED = offsetof(NRF_I2S_Type, EVENTS_STOPPED), ///< I2S transfer stopped. +#if defined(I2S_INTENSET_FRAMESTART_Msk) || defined(__NRFX_DOXYGEN_) + NRF_I2S_EVENT_FRAMESTART = offsetof(NRF_I2S_Type, EVENTS_FRAMESTART) ///< Frame start event, generated on the active edge of LRCK. +#endif } nrf_i2s_event_t; /** @brief I2S interrupts. */ typedef enum { - NRF_I2S_INT_RXPTRUPD_MASK = I2S_INTENSET_RXPTRUPD_Msk, ///< Interrupt on RXPTRUPD event. - NRF_I2S_INT_TXPTRUPD_MASK = I2S_INTENSET_TXPTRUPD_Msk, ///< Interrupt on TXPTRUPD event. - NRF_I2S_INT_STOPPED_MASK = I2S_INTENSET_STOPPED_Msk ///< Interrupt on STOPPED event. + NRF_I2S_INT_RXPTRUPD_MASK = I2S_INTENSET_RXPTRUPD_Msk, ///< Interrupt on RXPTRUPD event. + NRF_I2S_INT_TXPTRUPD_MASK = I2S_INTENSET_TXPTRUPD_Msk, ///< Interrupt on TXPTRUPD event. + NRF_I2S_INT_STOPPED_MASK = I2S_INTENSET_STOPPED_Msk, ///< Interrupt on STOPPED event. +#if defined(I2S_INTENSET_FRAMESTART_Msk) || defined(__NRFX_DOXYGEN_) + NRF_I2S_INT_FRAMESTART_MASK = I2S_INTENCLR_FRAMESTART_Msk ///< Interrupt on FRAMESTART event. +#endif } nrf_i2s_int_mask_t; /** @brief I2S modes of operation. */ @@ -136,9 +149,24 @@ typedef enum /** @brief I2S sample widths. */ typedef enum { - NRF_I2S_SWIDTH_8BIT = I2S_CONFIG_SWIDTH_SWIDTH_8Bit, ///< 8 bit. - NRF_I2S_SWIDTH_16BIT = I2S_CONFIG_SWIDTH_SWIDTH_16Bit, ///< 16 bit. - NRF_I2S_SWIDTH_24BIT = I2S_CONFIG_SWIDTH_SWIDTH_24Bit ///< 24 bit. + NRF_I2S_SWIDTH_8BIT = I2S_CONFIG_SWIDTH_SWIDTH_8Bit, ///< 8 bit. + NRF_I2S_SWIDTH_16BIT = I2S_CONFIG_SWIDTH_SWIDTH_16Bit, ///< 16 bit. + NRF_I2S_SWIDTH_24BIT = I2S_CONFIG_SWIDTH_SWIDTH_24Bit, ///< 24 bit. +#if defined(I2S_CONFIG_SWIDTH_SWIDTH_32Bit) || defined(__NRFX_DOXYGEN__) + NRF_I2S_SWIDTH_32BIT = I2S_CONFIG_SWIDTH_SWIDTH_32Bit, ///< 32 bit. +#endif +#if defined(I2S_CONFIG_SWIDTH_SWIDTH_8BitIn16) || defined(__NRFX_DOXYGEN__) + NRF_I2S_SWIDTH_8BIT_IN16BIT = I2S_CONFIG_SWIDTH_SWIDTH_8BitIn16, ///< 8 bit sample in a 16-bit half-frame. +#endif +#if defined(I2S_CONFIG_SWIDTH_SWIDTH_8BitIn32) || defined(__NRFX_DOXYGEN__) + NRF_I2S_SWIDTH_8BIT_IN32BIT = I2S_CONFIG_SWIDTH_SWIDTH_8BitIn32, ///< 8 bit sample in a 32-bit half-frame. +#endif +#if defined(I2S_CONFIG_SWIDTH_SWIDTH_16BitIn32) || defined(__NRFX_DOXYGEN__) + NRF_I2S_SWIDTH_16BIT_IN32BIT = I2S_CONFIG_SWIDTH_SWIDTH_16BitIn32, ///< 16 bit sample in a 32-bit half-frame. +#endif +#if defined(I2S_CONFIG_SWIDTH_SWIDTH_24BitIn32) || defined(__NRFX_DOXYGEN__) + NRF_I2S_SWIDTH_24BIT_IN32BIT = I2S_CONFIG_SWIDTH_SWIDTH_24BitIn32, ///< 24 bit sample in a 32-bit half-frame. +#endif } nrf_i2s_swidth_t; /** @brief I2S alignments of sample within a frame. */ @@ -163,6 +191,14 @@ typedef enum NRF_I2S_CHANNELS_RIGHT = I2S_CONFIG_CHANNELS_CHANNELS_Right ///< Right only. } nrf_i2s_channels_t; +#if NRF_I2S_HAS_CLKCONFIG +/** @brief I2S Clock source selection. */ +typedef enum +{ + NRF_I2S_CLKSRC_PCLK32M = I2S_CONFIG_CLKCONFIG_CLKSRC_PCLK32M, ///< 32MHz peripheral clock. + NRF_I2S_CLKSRC_ACLK = I2S_CONFIG_CLKCONFIG_CLKSRC_ACLK ///< Audio PLL clock. +} nrf_i2s_clksrc_t; +#endif /** * @brief Function for activating the specified I2S task. @@ -408,6 +444,19 @@ NRF_STATIC_INLINE void nrf_i2s_tx_buffer_set(NRF_I2S_Type * p_reg, */ NRF_STATIC_INLINE uint32_t * nrf_i2s_tx_buffer_get(NRF_I2S_Type const * p_reg); +#if NRF_I2S_HAS_CLKCONFIG +/** + * @brief Function for configuring I2S Clock. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] clksrc I2S Clock source selection. + * @param[in] enable_bypass Bypass clock generator. MCK will be equal to source input. + * If bypass is enabled the MCKFREQ setting has no effect. + */ +NRF_STATIC_INLINE void nrf_i2s_clk_configure(NRF_I2S_Type * p_reg, + nrf_i2s_clksrc_t clksrc, + bool enable_bypass); +#endif #ifndef NRF_DECLARE_ONLY @@ -598,6 +647,16 @@ NRF_STATIC_INLINE uint32_t * nrf_i2s_tx_buffer_get(NRF_I2S_Type const * p_reg) return (uint32_t *)(p_reg->TXD.PTR); } +#if NRF_I2S_HAS_CLKCONFIG +NRF_STATIC_INLINE void nrf_i2s_clk_configure(NRF_I2S_Type * p_reg, + nrf_i2s_clksrc_t clksrc, + bool enable_bypass) +{ + p_reg->CONFIG.CLKCONFIG = ((uint32_t) clksrc << I2S_CONFIG_CLKCONFIG_CLKSRC_Pos) | + ((uint32_t) enable_bypass << I2S_CONFIG_CLKCONFIG_BYPASS_Pos); +} +#endif + #endif // NRF_DECLARE_ONLY /** @} */ diff --git a/hal/nrf_ipc.h b/hal/nrf_ipc.h index 44f6b83ec..dee5b1031 100644 --- a/hal/nrf_ipc.h +++ b/hal/nrf_ipc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_kmu.h b/hal/nrf_kmu.h index 6d5147099..a026f4cb1 100644 --- a/hal/nrf_kmu.h +++ b/hal/nrf_kmu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_lpcomp.h b/hal/nrf_lpcomp.h index 30fe7a48e..777f6ea59 100644 --- a/hal/nrf_lpcomp.h +++ b/hal/nrf_lpcomp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_mpu.h b/hal/nrf_mpu.h index 7eb8186ad..b4bbce2de 100644 --- a/hal/nrf_mpu.h +++ b/hal/nrf_mpu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -113,8 +113,7 @@ NRF_STATIC_INLINE void nrf_mpu_nvm_blocks_protection_enable(NRF_MPU_Type * p_reg * NVM protection during debug is disabled by default. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable True if NVM protection during debug is to be enabled. - * False if otherwise. + * @param[in] enable True if NVM protection during debug is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_mpu_nvm_protection_in_debug_set(NRF_MPU_Type * p_reg, bool enable); diff --git a/hal/nrf_mutex.h b/hal/nrf_mutex.h index a2b928769..02e1a0540 100644 --- a/hal/nrf_mutex.h +++ b/hal/nrf_mutex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_mwu.h b/hal/nrf_mwu.h index 64ebf8bd6..4fbf44546 100644 --- a/hal/nrf_mwu.h +++ b/hal/nrf_mwu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_nfct.h b/hal/nrf_nfct.h index 01dcfd99c..f03d01d4e 100644 --- a/hal/nrf_nfct.h +++ b/hal/nrf_nfct.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_nvmc.h b/hal/nrf_nvmc.h index 9a71ba3f8..3f0ddfd52 100644 --- a/hal/nrf_nvmc.h +++ b/hal/nrf_nvmc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2012 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -349,7 +349,23 @@ NRF_STATIC_INLINE void nrf_nvmc_page_partial_erase_start(NRF_NVMC_Type * p_reg, NRF_STATIC_INLINE void nrf_nvmc_icache_config_set(NRF_NVMC_Type * p_reg, nrf_nvmc_icache_config_t config) { - p_reg->ICACHECNF = (uint32_t)config; +#if defined(NRF5340_XXAA_NETWORK) || defined(NRF9160_XXAA) + // Apply workaround for the anomalies: + // - 6 for the nRF5340. + // - 21 for the nRF9160. + if (config == NRF_NVMC_ICACHE_DISABLE) + { + NRFX_CRITICAL_SECTION_ENTER(); + __ISB(); + p_reg->ICACHECNF = (uint32_t)NRF_NVMC_ICACHE_DISABLE; + __ISB(); + NRFX_CRITICAL_SECTION_EXIT(); + } + else +#endif + { + p_reg->ICACHECNF = (uint32_t)config; + } } NRF_STATIC_INLINE bool nrf_nvmc_icache_enable_check(NRF_NVMC_Type const * p_reg) diff --git a/hal/nrf_oscillators.h b/hal/nrf_oscillators.h new file mode 100644 index 000000000..d17ac606c --- /dev/null +++ b/hal/nrf_oscillators.h @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRF_OSCILLATORS_H__ +#define NRF_OSCILLATORS_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup nrf_oscillators_hal OSCILLATORS HAL + * @{ + * @ingroup nrf_clock + * @brief Hardware access layer for managing the OSCILLATORS peripheral. + */ + +/** @brief Capacitors configuration for LFXO. */ +typedef enum +{ + NRF_OSCILLATORS_LFXO_CAP_EXTERNAL = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_External, ///< Use external capacitors. + NRF_OSCILLATORS_LFXO_CAP_6PF = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_C6PF, ///< Use 6 pF internal capacitors. + NRF_OSCILLATORS_LFXO_CAP_7PF = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_C7PF, ///< Use 7 pF internal capacitors. + NRF_OSCILLATORS_LFXO_CAP_11PF = OSCILLATORS_XOSC32KI_INTCAP_INTCAP_C11PF, ///< Use 11 pF internal capacitors. +} nrf_oscillators_lfxo_cap_t; + +/** + * @brief Function for enabling or disabling the bypass of LFXO with external clock source. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if bypass is to be enabled (use with rail-to-rail external source). + * False if bypass is to be disabled (use with xtal or low-swing external source). + */ +NRF_STATIC_INLINE void nrf_oscillators_lfxo_bypass_set(NRF_OSCILLATORS_Type * p_reg, bool enable); + +/** + * @brief Function for configuring the internal capacitors of LFXO. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] cap Capacitors configuration. + */ +NRF_STATIC_INLINE void nrf_oscillators_lfxo_cap_set(NRF_OSCILLATORS_Type * p_reg, + nrf_oscillators_lfxo_cap_t cap); + +/** + * @brief Function for configuring the internal capacitors of HXFO. + * + * The capacitance of internal capacitors ranges from 7 pF to 20 pF in 0.5 pF steps. + * To calculate the correct @p cap_value, use the following equation: + * CAPVALUE = (1+FICR->XOSC32MTRIM.SLOPE/16) * (CAPACITANCE*2-14) + FICR->XOSC32MTRIM.OFFSET + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if internal capacitors are to be enabled, false otherwise. + * @param[in] cap_value Value representing capacitance, calculated using provided equation. + * Ignored when internal capacitors are disabled. + */ +NRF_STATIC_INLINE void nrf_oscillators_hfxo_cap_set(NRF_OSCILLATORS_Type * p_reg, + bool enable, + uint32_t cap_value); + +#ifndef NRF_DECLARE_ONLY +NRF_STATIC_INLINE void nrf_oscillators_lfxo_bypass_set(NRF_OSCILLATORS_Type * p_reg, bool enable) +{ + p_reg->XOSC32KI.BYPASS = (enable ? OSCILLATORS_XOSC32KI_BYPASS_BYPASS_Enabled : + OSCILLATORS_XOSC32KI_BYPASS_BYPASS_Disabled); +} + +NRF_STATIC_INLINE void nrf_oscillators_lfxo_cap_set(NRF_OSCILLATORS_Type * p_reg, + nrf_oscillators_lfxo_cap_t cap) +{ + p_reg->XOSC32KI.INTCAP = (uint32_t)cap; +} + +NRF_STATIC_INLINE void nrf_oscillators_hfxo_cap_set(NRF_OSCILLATORS_Type * p_reg, + bool enable, + uint32_t cap_value) +{ + p_reg->XOSC32MCAPS = + (enable ? ((OSCILLATORS_XOSC32MCAPS_ENABLE_Enabled << OSCILLATORS_XOSC32MCAPS_ENABLE_Pos) | + (cap_value << OSCILLATORS_XOSC32MCAPS_CAPVALUE_Pos)) + : (OSCILLATORS_XOSC32MCAPS_ENABLE_Disabled << OSCILLATORS_XOSC32MCAPS_ENABLE_Pos)); +} +#endif // NRF_DECLARE_ONLY + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_OSCILLATORS_H__ diff --git a/hal/nrf_pdm.h b/hal/nrf_pdm.h index 9dea754a8..b8545ff11 100644 --- a/hal/nrf_pdm.h +++ b/hal/nrf_pdm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,10 @@ extern "C" { #endif +#ifndef NRF_PDM0 +#define NRF_PDM0 NRF_PDM +#endif + /** * @defgroup nrf_pdm_hal PDM HAL * @{ @@ -44,6 +48,20 @@ extern "C" { * @brief Hardware access layer for managing the Pulse Density Modulation (PDM) peripheral. */ +#if defined(PDM_MCLKCONFIG_SRC_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether master clock source configuration is available. */ +#define NRF_PDM_HAS_MCLKCONFIG 1 +#else +#define NRF_PDM_HAS_MCLKCONFIG 0 +#endif + +#if defined(PDM_RATIO_RATIO_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether ratio configuration is available. */ +#define NRF_PDM_HAS_RATIO_CONFIG 1 +#else +#define NRF_PDM_HAS_RATIO_CONFIG 0 +#endif + /** @brief Minimum value of PDM gain. */ #define NRF_PDM_GAIN_MINIMUM 0x00 /** @brief Default value of PDM gain. */ @@ -83,9 +101,28 @@ typedef enum { NRF_PDM_FREQ_1000K = PDM_PDMCLKCTRL_FREQ_1000K, ///< PDM_CLK = 1.000 MHz. NRF_PDM_FREQ_1032K = PDM_PDMCLKCTRL_FREQ_Default, ///< PDM_CLK = 1.032 MHz. - NRF_PDM_FREQ_1067K = PDM_PDMCLKCTRL_FREQ_1067K ///< PDM_CLK = 1.067 MHz. + NRF_PDM_FREQ_1067K = PDM_PDMCLKCTRL_FREQ_1067K, ///< PDM_CLK = 1.067 MHz. +#if defined(PDM_PDMCLKCTRL_FREQ_1231K) || defined(__NRFX_DOXYGEN__) + NRF_PDM_FREQ_1231K = PDM_PDMCLKCTRL_FREQ_1231K, ///< PDM_CLK = 1.231 MHz. +#endif +#if defined(PDM_PDMCLKCTRL_FREQ_1280K) || defined(__NRFX_DOXYGEN__) + NRF_PDM_FREQ_1280K = PDM_PDMCLKCTRL_FREQ_1280K, ///< PDM_CLK = 1.280 MHz. +#endif +#if defined(PDM_PDMCLKCTRL_FREQ_1333K) || defined(__NRFX_DOXYGEN__) + NRF_PDM_FREQ_1333K = PDM_PDMCLKCTRL_FREQ_1333K ///< PDM_CLK = 1.333 MHz. +#endif } nrf_pdm_freq_t; + +#if NRF_PDM_HAS_RATIO_CONFIG +/** @brief PDM ratio between PDM_CLK and output sample rate. */ +typedef enum +{ + NRF_PDM_RATIO_64X = PDM_RATIO_RATIO_Ratio64, ///< Ratio of 64. + NRF_PDM_RATIO_80X = PDM_RATIO_RATIO_Ratio80 ///< Ratio of 80. +} nrf_pdm_ratio_t; +#endif + /** @brief PDM operation mode. */ typedef enum { @@ -100,6 +137,14 @@ typedef enum NRF_PDM_EDGE_LEFTRISING = PDM_MODE_EDGE_LeftRising ///< Left (or mono) is sampled on rising edge of PDM_CLK. } nrf_pdm_edge_t; +#if NRF_PDM_HAS_MCLKCONFIG +/** @brief PDM master clock source selection. */ +typedef enum +{ + NRF_PDM_MCLKSRC_PCLK32M = PDM_MCLKCONFIG_SRC_PCLK32M, ///< 32MHz peripheral clock. + NRF_PDM_MCLKSRC_ACLK = PDM_MCLKCONFIG_SRC_ACLK ///< Audio PLL clock. +} nrf_pdm_mclksrc_t; +#endif /** * @brief Function for triggering a PDM task. @@ -347,6 +392,26 @@ NRF_STATIC_INLINE void nrf_pdm_buffer_set(NRF_PDM_Type * p_reg, uint32_t * p_buf */ NRF_STATIC_INLINE uint32_t * nrf_pdm_buffer_get(NRF_PDM_Type const * p_reg); +#if NRF_PDM_HAS_RATIO_CONFIG +/** + * @brief Function for setting ratio between PDM_CLK and output sample rate. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] ratio Ratio between PDM_CLK and output sample rate. + */ +NRF_STATIC_INLINE void nrf_pdm_ratio_set(NRF_PDM_Type * p_reg, nrf_pdm_ratio_t ratio); +#endif + +#if NRF_PDM_HAS_MCLKCONFIG +/** + * @brief Function for configuring PDM master clock source. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] mclksrc Master Clock source selection. + */ +NRF_STATIC_INLINE void nrf_pdm_mclksrc_configure(NRF_PDM_Type * p_reg, nrf_pdm_mclksrc_t mclksrc); +#endif + #ifndef NRF_DECLARE_ONLY NRF_STATIC_INLINE void nrf_pdm_task_trigger(NRF_PDM_Type * p_reg, nrf_pdm_task_t task) { @@ -507,6 +572,20 @@ NRF_STATIC_INLINE uint32_t * nrf_pdm_buffer_get(NRF_PDM_Type const * p_reg) return (uint32_t *)p_reg->SAMPLE.PTR; } +#if NRF_PDM_HAS_RATIO_CONFIG +NRF_STATIC_INLINE void nrf_pdm_ratio_set(NRF_PDM_Type * p_reg, nrf_pdm_ratio_t ratio) +{ + p_reg->RATIO = ratio; +} +#endif + +#if NRF_PDM_HAS_MCLKCONFIG +NRF_STATIC_INLINE void nrf_pdm_mclksrc_configure(NRF_PDM_Type * p_reg, nrf_pdm_mclksrc_t mclksrc) +{ + p_reg->MCLKCONFIG = mclksrc; +} +#endif + #endif // NRF_DECLARE_ONLY /** @} */ diff --git a/hal/nrf_power.h b/hal/nrf_power.h index f489ff58e..830d0b5a6 100644 --- a/hal/nrf_power.h +++ b/hal/nrf_power.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,21 +50,14 @@ extern "C" { #define NRF_POWER_HAS_SLEEPEVT 1 #else #define NRF_POWER_HAS_SLEEPEVT 0 -#endif // defined(POWER_INTENSET_SLEEPENTER_Msk) || defined(__NRFX_DOXYGEN__) +#endif #if defined(POWER_USBREGSTATUS_VBUSDETECT_Msk) || defined(__NRFX_DOXYGEN__) /** @brief Symbol indicating whether the POWER peripheral controls the USB regulator. */ #define NRF_POWER_HAS_USBREG 1 #else #define NRF_POWER_HAS_USBREG 0 -#endif // defined(POWER_USBREGSTATUS_VBUSDETECT_Msk) || defined(__NRFX_DOXYGEN__) - -#if defined(POWER_POFCON_THRESHOLDVDDH_Msk) || defined(__NRFX_DOXYGEN__) -/** @brief Symbol indicating whether VDDH is present. */ -#define NRF_POWER_HAS_VDDH 1 -#else -#define NRF_POWER_HAS_VDDH 0 -#endif // defined(POWER_POFCON_THRESHOLDVDDH_Msk) || defined(__NRFX_DOXYGEN__) +#endif #if defined(POWER_DCDCEN0_DCDCEN_Msk) || defined(__NRFX_DOXYGEN__) /** @brief Symbol indicating whether DCDCEN for REG0 is present. */ @@ -80,13 +73,27 @@ extern "C" { #define NRF_POWER_HAS_DCDCEN 0 #endif +#if defined(POWER_INTENSET_POFWARN_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether power failure event is present. */ +#define NRF_POWER_HAS_POFWARN 1 +#else +#define NRF_POWER_HAS_POFWARN 0 +#endif + #if defined(POWER_POFCON_THRESHOLD_Msk) || defined(__NRFX_DOXYGEN__) -/** @brief Symbol indicating whether POFCON is present. */ +/** @brief Symbol indicating whether power failure comparator is present. */ #define NRF_POWER_HAS_POFCON 1 #else #define NRF_POWER_HAS_POFCON 0 #endif +#if defined(POWER_POFCON_THRESHOLDVDDH_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether power failure comparator for VDDH is present. */ +#define NRF_POWER_HAS_POFCON_VDDH 1 +#else +#define NRF_POWER_HAS_POFCON_VDDH 0 +#endif + #if defined(POWER_RESETREAS_RESETPIN_Msk) || defined(__NRFX_DOXYGEN__) /** @brief Auxiliary definition to mark the fact that RESETREAS register is present in POWER */ #define NRF_POWER_HAS_RESETREAS 1 @@ -94,6 +101,13 @@ extern "C" { #define NRF_POWER_HAS_RESETREAS 0 #endif +#if defined(POWER_MAINREGSTATUS_MAINREGSTATUS_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether MAINREGSTATUS register is present. */ +#define NRF_POWER_HAS_MAINREGSTATUS 1 +#else +#define NRF_POWER_HAS_MAINREGSTATUS 0 +#endif + /** @brief POWER tasks. */ typedef enum { @@ -104,7 +118,7 @@ typedef enum /** @brief POWER events. */ typedef enum { -#if NRF_POWER_HAS_POFCON +#if NRF_POWER_HAS_POFWARN NRF_POWER_EVENT_POFWARN = offsetof(NRF_POWER_Type, EVENTS_POFWARN ), /**< Power failure warning. */ #endif #if NRF_POWER_HAS_SLEEPEVT @@ -121,7 +135,7 @@ typedef enum /** @brief POWER interrupts. */ typedef enum { -#if NRF_POWER_HAS_POFCON +#if NRF_POWER_HAS_POFWARN NRF_POWER_INT_POFWARN_MASK = POWER_INTENSET_POFWARN_Msk , /**< Write '1' to Enable interrupt for POFWARN event. */ #endif #if NRF_POWER_HAS_SLEEPEVT @@ -258,7 +272,7 @@ typedef enum } nrf_power_pof_thr_t; #endif // NRF_POWER_HAS_POFCON -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_POFCON_VDDH /** @brief Power failure comparator thresholds for VDDH. */ typedef enum { @@ -279,15 +293,16 @@ typedef enum NRF_POWER_POFTHRVDDH_V41 = POWER_POFCON_THRESHOLDVDDH_V41, /**< Set threshold to 4.1 V. */ NRF_POWER_POFTHRVDDH_V42 = POWER_POFCON_THRESHOLDVDDH_V42, /**< Set threshold to 4.2 V. */ } nrf_power_pof_thrvddh_t; +#endif // NRF_POWER_HAS_POFCON_VDDH +#if NRF_POWER_HAS_MAINREGSTATUS /** @brief Main regulator status. */ typedef enum { NRF_POWER_MAINREGSTATUS_NORMAL = POWER_MAINREGSTATUS_MAINREGSTATUS_Normal, /**< Normal voltage mode. Voltage supplied on VDD. */ NRF_POWER_MAINREGSTATUS_HIGH = POWER_MAINREGSTATUS_MAINREGSTATUS_High /**< High voltage mode. Voltage supplied on VDDH. */ } nrf_power_mainregstatus_t; - -#endif // NRF_POWER_HAS_VDDH +#endif #if defined(POWER_RAM_POWER_S0POWER_Msk) || defined(__NRFX_DOXYGEN__) /** @@ -588,18 +603,12 @@ NRF_STATIC_INLINE void nrf_power_system_off(NRF_POWER_Type * p_reg); /** * @brief Function for setting the power failure comparator configuration. * - * This function sets the power failure comparator threshold and enables or disables flag. - * - * @note If VDDH settings are present in the device, this function will - * clear its settings (set to the lowest voltage). - * Use @ref nrf_power_pofcon_vddh_set function to set new value. - * - * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enabled Sets to true if power failure comparator is to be enabled. - * @param[in] thr Sets the voltage threshold value. + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if the power failure comparator is to be enabled, false otherwise. + * @param[in] thr voltage threshold value. */ NRF_STATIC_INLINE void nrf_power_pofcon_set(NRF_POWER_Type * p_reg, - bool enabled, + bool enable, nrf_power_pof_thr_t thr); /** @@ -616,7 +625,7 @@ NRF_STATIC_INLINE nrf_power_pof_thr_t nrf_power_pofcon_get(NRF_POWER_Type const bool * p_enabled); #endif // NRF_POWER_HAS_POFCON -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_POFCON_VDDH /** * @brief Function for setting the VDDH power failure comparator threshold. * @@ -634,7 +643,7 @@ NRF_STATIC_INLINE void nrf_power_pofcon_vddh_set(NRF_POWER_Type * p_reg, * @return VDDH threshold currently configured. */ NRF_STATIC_INLINE nrf_power_pof_thrvddh_t nrf_power_pofcon_vddh_get(NRF_POWER_Type const * p_reg); -#endif // NRF_POWER_HAS_VDDH +#endif // NRF_POWER_HAS_POFCON_VDDH /** * @brief Function for setting the general purpose retention register. @@ -705,7 +714,7 @@ NRF_STATIC_INLINE void nrf_power_gpregret_ext_set(NRF_POWER_Type * p_reg, * will relate to the converter on low voltage side (1.3 V output). * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable Set true to enable the DCDC converter or false to disable the DCDC converter. + * @param[in] enable True if DCDC converter is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_power_dcdcen_set(NRF_POWER_Type * p_reg, bool enable); @@ -774,7 +783,7 @@ NRF_STATIC_INLINE uint32_t nrf_power_rampower_mask_get(NRF_POWER_Type const * p_ * @brief Function for enabling or disabling the DCDC converter on VDDH. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable Set true to enable the DCDC converter or false to disable the DCDC converter. + * @param[in] enable True if DCDC converter on VDDH is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_power_dcdcen_vddh_set(NRF_POWER_Type * p_reg, bool enable); @@ -789,7 +798,7 @@ NRF_STATIC_INLINE void nrf_power_dcdcen_vddh_set(NRF_POWER_Type * p_reg, bool en NRF_STATIC_INLINE bool nrf_power_dcdcen_vddh_get(NRF_POWER_Type const * p_reg); #endif // NRF_POWER_HAS_DCDCEN_VDDH -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_MAINREGSTATUS /** * @brief Function for getting the main supply status. * @@ -799,7 +808,7 @@ NRF_STATIC_INLINE bool nrf_power_dcdcen_vddh_get(NRF_POWER_Type const * p_reg); */ NRF_STATIC_INLINE nrf_power_mainregstatus_t nrf_power_mainregstatus_get(NRF_POWER_Type const * p_reg); -#endif // NRF_POWER_HAS_VDDH +#endif // NRF_POWER_HAS_MAINREGSTATUS #if NRF_POWER_HAS_USBREG /** @@ -978,23 +987,23 @@ NRF_STATIC_INLINE void nrf_power_system_off(NRF_POWER_Type * p_reg) #if NRF_POWER_HAS_POFCON NRF_STATIC_INLINE void nrf_power_pofcon_set(NRF_POWER_Type * p_reg, - bool enabled, + bool enable, nrf_power_pof_thr_t thr) { NRFX_ASSERT(thr == (thr & (POWER_POFCON_THRESHOLD_Msk >> POWER_POFCON_THRESHOLD_Pos))); -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_POFCON_VDDH uint32_t pofcon = p_reg->POFCON; pofcon &= ~(POWER_POFCON_THRESHOLD_Msk | POWER_POFCON_POF_Msk); pofcon |= -#else // NRF_POWER_HAS_VDDH +#else // NRF_POWER_HAS_POFCON_VDDH p_reg->POFCON = #endif (((uint32_t)thr) << POWER_POFCON_THRESHOLD_Pos) | - (enabled ? + (enable ? (POWER_POFCON_POF_Enabled << POWER_POFCON_POF_Pos) : (POWER_POFCON_POF_Disabled << POWER_POFCON_POF_Pos)); -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_POFCON_VDDH p_reg->POFCON = pofcon; #endif } @@ -1013,7 +1022,7 @@ NRF_STATIC_INLINE nrf_power_pof_thr_t nrf_power_pofcon_get(NRF_POWER_Type const } #endif // NRF_POWER_HAS_POFCON -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_POFCON_VDDH NRF_STATIC_INLINE void nrf_power_pofcon_vddh_set(NRF_POWER_Type * p_reg, nrf_power_pof_thrvddh_t thr) { @@ -1029,7 +1038,7 @@ NRF_STATIC_INLINE nrf_power_pof_thrvddh_t nrf_power_pofcon_vddh_get(NRF_POWER_Ty return (nrf_power_pof_thrvddh_t)((p_reg->POFCON & POWER_POFCON_THRESHOLDVDDH_Msk) >> POWER_POFCON_THRESHOLDVDDH_Pos); } -#endif // NRF_POWER_HAS_VDDH +#endif // NRF_POWER_HAS_POFCON_VDDH NRF_STATIC_INLINE void nrf_power_gpregret_set(NRF_POWER_Type * p_reg, uint8_t val) { @@ -1127,7 +1136,7 @@ NRF_STATIC_INLINE uint32_t nrf_power_rampower_mask_get(NRF_POWER_Type const * p_ { return p_reg->RAM[block].POWER; } -#endif /* defined(POWER_RAM_POWER_S0POWER_Msk) */ +#endif // defined(POWER_RAM_POWER_S0POWER_Msk) #if NRF_POWER_HAS_DCDCEN_VDDH NRF_STATIC_INLINE void nrf_power_dcdcen_vddh_set(NRF_POWER_Type * p_reg, bool enable) @@ -1144,7 +1153,7 @@ NRF_STATIC_INLINE bool nrf_power_dcdcen_vddh_get(NRF_POWER_Type const * p_reg) } #endif // NRF_POWER_HAS_DCDCEN_VDDH -#if NRF_POWER_HAS_VDDH +#if NRF_POWER_HAS_MAINREGSTATUS NRF_STATIC_INLINE nrf_power_mainregstatus_t nrf_power_mainregstatus_get(NRF_POWER_Type const * p_reg) { @@ -1152,7 +1161,7 @@ nrf_power_mainregstatus_t nrf_power_mainregstatus_get(NRF_POWER_Type const * p_r POWER_MAINREGSTATUS_MAINREGSTATUS_Msk) >> POWER_MAINREGSTATUS_MAINREGSTATUS_Pos); } -#endif // NRF_POWER_HAS_VDDH +#endif // NRF_POWER_HAS_MAINREGSTATUS #if NRF_POWER_HAS_USBREG NRF_STATIC_INLINE uint32_t nrf_power_usbregstatus_get(NRF_POWER_Type const * p_reg) diff --git a/hal/nrf_ppi.h b/hal/nrf_ppi.h index 14b401d81..85fa32dcc 100644 --- a/hal/nrf_ppi.h +++ b/hal/nrf_ppi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_pwm.h b/hal/nrf_pwm.h index c669c52b5..1f017d1ff 100644 --- a/hal/nrf_pwm.h +++ b/hal/nrf_pwm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -219,7 +219,7 @@ typedef union { * SEQ[n].REFRESH and SEQ[n].ENDDELAY registers in the peripheral, * respectively) are ignored at the end of a complex sequence * playback, indicated by the LOOPSDONE event. - * See the @linkProductSpecification52 for more information. + * See the Product Specification for more information. */ typedef struct { diff --git a/hal/nrf_qdec.h b/hal/nrf_qdec.h index 8da7ea9f5..8ae72f2a9 100644 --- a/hal/nrf_qdec.h +++ b/hal/nrf_qdec.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_qspi.h b/hal/nrf_qspi.h index 838f2e13f..69eca9a4b 100644 --- a/hal/nrf_qspi.h +++ b/hal/nrf_qspi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,34 @@ extern "C" { * @brief Hardware access layer for managing the QSPI peripheral. */ +#if defined(QSPI_XIPEN_XIPEN_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether XIP can be explicitly enabled or disabled via XIPEN register. */ +#define NRF_QSPI_HAS_XIPEN 1 +#else +#define NRF_QSPI_HAS_XIPEN 0 +#endif + +#if defined(QSPI_XIP_ENC_ENABLE_ENABLE_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether encryption for XIP is present. */ +#define NRF_QSPI_HAS_XIP_ENC 1 +#else +#define NRF_QSPI_HAS_XIP_ENC 0 +#endif + +#if defined(QSPI_DMA_ENC_ENABLE_ENABLE_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether encryption for EasyDMA is present. */ +#define NRF_QSPI_HAS_DMA_ENC 1 +#else +#define NRF_QSPI_HAS_DMA_ENC 0 +#endif + +#if defined(NRF53_SERIES) || defined(__NRFX_DOXYGEN__) +/** @brief Value representing QSPI base clock frequency. */ +#define NRF_QSPI_BASE_CLOCK_FREQ 96000000uL +#else +#define NRF_QSPI_BASE_CLOCK_FREQ 32000000uL +#endif + /** * @brief This value can be used as a parameter for the @ref nrf_qspi_pins_set * function to specify that a given QSPI signal (SCK, CSN, IO0, IO1, IO2, or IO3) @@ -78,27 +106,47 @@ typedef enum NRF_QSPI_INT_READY_MASK = QSPI_INTENSET_READY_Msk /**< Interrupt on READY event. */ } nrf_qspi_int_mask_t; -/** @brief QSPI frequency divider values. */ +/** @brief QSPI base clock frequency divider values. */ typedef enum { - NRF_QSPI_FREQ_32MDIV1, /**< 32.0 MHz. */ - NRF_QSPI_FREQ_32MDIV2, /**< 16.0 MHz. */ - NRF_QSPI_FREQ_32MDIV3, /**< 10.6 MHz. */ - NRF_QSPI_FREQ_32MDIV4, /**< 8.00 MHz. */ - NRF_QSPI_FREQ_32MDIV5, /**< 6.40 MHz. */ - NRF_QSPI_FREQ_32MDIV6, /**< 5.33 MHz. */ - NRF_QSPI_FREQ_32MDIV7, /**< 4.57 MHz. */ - NRF_QSPI_FREQ_32MDIV8, /**< 4.00 MHz. */ - NRF_QSPI_FREQ_32MDIV9, /**< 3.55 MHz. */ - NRF_QSPI_FREQ_32MDIV10, /**< 3.20 MHz. */ - NRF_QSPI_FREQ_32MDIV11, /**< 2.90 MHz. */ - NRF_QSPI_FREQ_32MDIV12, /**< 2.66 MHz. */ - NRF_QSPI_FREQ_32MDIV13, /**< 2.46 MHz. */ - NRF_QSPI_FREQ_32MDIV14, /**< 2.29 MHz. */ - NRF_QSPI_FREQ_32MDIV15, /**< 2.13 MHz. */ - NRF_QSPI_FREQ_32MDIV16, /**< 2.00 MHz. */ + NRF_QSPI_FREQ_DIV1, /**< Divide by 1. */ + NRF_QSPI_FREQ_DIV2, /**< Divide by 2. */ + NRF_QSPI_FREQ_DIV3, /**< Divide by 3. */ + NRF_QSPI_FREQ_DIV4, /**< Divide by 4. */ + NRF_QSPI_FREQ_DIV5, /**< Divide by 5. */ + NRF_QSPI_FREQ_DIV6, /**< Divide by 6. */ + NRF_QSPI_FREQ_DIV7, /**< Divide by 7. */ + NRF_QSPI_FREQ_DIV8, /**< Divide by 8. */ + NRF_QSPI_FREQ_DIV9, /**< Divide by 9. */ + NRF_QSPI_FREQ_DIV10, /**< Divide by 10. */ + NRF_QSPI_FREQ_DIV11, /**< Divide by 11. */ + NRF_QSPI_FREQ_DIV12, /**< Divide by 12. */ + NRF_QSPI_FREQ_DIV13, /**< Divide by 13. */ + NRF_QSPI_FREQ_DIV14, /**< Divide by 14. */ + NRF_QSPI_FREQ_DIV15, /**< Divide by 15. */ + NRF_QSPI_FREQ_DIV16, /**< Divide by 16. */ } nrf_qspi_frequency_t; +#if defined(NRF52_SERIES) +/** Symbols translation for backward compatibility. */ +#define NRF_QSPI_FREQ_32MDIV1 NRF_QSPI_FREQ_DIV1 +#define NRF_QSPI_FREQ_32MDIV2 NRF_QSPI_FREQ_DIV2 +#define NRF_QSPI_FREQ_32MDIV3 NRF_QSPI_FREQ_DIV3 +#define NRF_QSPI_FREQ_32MDIV4 NRF_QSPI_FREQ_DIV4 +#define NRF_QSPI_FREQ_32MDIV5 NRF_QSPI_FREQ_DIV5 +#define NRF_QSPI_FREQ_32MDIV6 NRF_QSPI_FREQ_DIV6 +#define NRF_QSPI_FREQ_32MDIV7 NRF_QSPI_FREQ_DIV7 +#define NRF_QSPI_FREQ_32MDIV8 NRF_QSPI_FREQ_DIV8 +#define NRF_QSPI_FREQ_32MDIV9 NRF_QSPI_FREQ_DIV9 +#define NRF_QSPI_FREQ_32MDIV10 NRF_QSPI_FREQ_DIV10 +#define NRF_QSPI_FREQ_32MDIV11 NRF_QSPI_FREQ_DIV11 +#define NRF_QSPI_FREQ_32MDIV12 NRF_QSPI_FREQ_DIV12 +#define NRF_QSPI_FREQ_32MDIV13 NRF_QSPI_FREQ_DIV13 +#define NRF_QSPI_FREQ_32MDIV14 NRF_QSPI_FREQ_DIV14 +#define NRF_QSPI_FREQ_32MDIV15 NRF_QSPI_FREQ_DIV15 +#define NRF_QSPI_FREQ_32MDIV16 NRF_QSPI_FREQ_DIV16 +#endif + /** @brief Interface configuration for a read operation. */ typedef enum { @@ -171,10 +219,10 @@ typedef struct uint8_t io0_pin; /**< IO0/MOSI pin number. */ uint8_t io1_pin; /**< IO1/MISO pin number. */ uint8_t io2_pin; /**< IO2 pin number (optional). - * Set to @ref NRF_QSPI_PIN_NOT_CONNECTED if this signal is not needed. + * Set to @ref NRF_QSPI_PIN_NOT_CONNECTED if this signal is not needed. */ uint8_t io3_pin; /**< IO3 pin number (optional). - * Set to @ref NRF_QSPI_PIN_NOT_CONNECTED if this signal is not needed. + * Set to @ref NRF_QSPI_PIN_NOT_CONNECTED if this signal is not needed. */ } nrf_qspi_pins_t; @@ -215,10 +263,27 @@ typedef struct uint8_t sck_delay; /**< tSHSL, tWHSL, and tSHWL in number of 16 MHz periods (62.5ns). */ bool dpmen; /**< Enable the DPM feature. */ nrf_qspi_spi_mode_t spi_mode; /**< SPI phase and polarization. */ - nrf_qspi_frequency_t sck_freq; /**< SCK frequency given as enum @ref nrf_qspi_frequency_t. */ + nrf_qspi_frequency_t sck_freq; /**< SCK frequency given as QSPI base clock frequency divider. + * To calculate @p sck_freq value corresponding to chosen frequency, + * use the following equation: + * + * sck_freq = (NRF_QSPI_BASE_CLOCK_FREQ / frequency) - 1 + * + * @note Achievable frequencies are determined by available + * divider values and QSPI base clock frequency. + */ } nrf_qspi_phy_conf_t; +#if NRF_QSPI_HAS_XIP_ENC || NRF_QSPI_HAS_DMA_ENC +/** @brief QSPI encryption settings for XIP and DMA transfers. */ +typedef struct +{ + uint32_t key[4]; /**< AES 128-bit key, stored on 4 32-bit words. */ + uint32_t nonce[3]; /**< AES 96-bit nonce, stored on 3 32-bit words. */ +} nrf_qspi_encryption_t; +#endif + /** * @brief Function for activating the specified QSPI task. * @@ -499,6 +564,56 @@ NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_continue(NRF_QSPI_Type * nrf_qspi_cinstr_len_t length, bool finalize); +#if NRF_QSPI_HAS_XIPEN +/** + * @brief Function for enabling or disabling Execute in Place (XIP) operation. + * + * @note XIP can be enabled after reset. See Product Specification. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if XIP is to be enabled, false otherwise. + */ +NRF_STATIC_INLINE void nrf_qspi_xip_set(NRF_QSPI_Type * p_reg, bool enable); +#endif + +#if NRF_QSPI_HAS_XIP_ENC +/** + * @brief Function for configuring the XIP encryption. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] p_cfg Pointer to encryption configuration structure. + */ +NRF_STATIC_INLINE void nrf_qspi_xip_encryption_configure(NRF_QSPI_Type * p_reg, + nrf_qspi_encryption_t const * p_cfg); + +/** + * @brief Function for enabling or disabling the XIP encryption. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if XIP encryption is to be enabled, false otherwise. + */ +NRF_STATIC_INLINE void nrf_qspi_xip_encryption_set(NRF_QSPI_Type * p_reg, bool enable); +#endif + +#if NRF_QSPI_HAS_DMA_ENC +/** + * @brief Function for configuring the EasyDMA encryption. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] p_cfg Pointer to encryption configuration structure. + */ +NRF_STATIC_INLINE void nrf_qspi_dma_encryption_configure(NRF_QSPI_Type * p_reg, + nrf_qspi_encryption_t const * p_cfg); + +/** + * @brief Function for enabling or disabling the EasyDMA encryption. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if EasyDMA encryption is to be enabled, false otherwise. + */ +NRF_STATIC_INLINE void nrf_qspi_dma_encryption_set(NRF_QSPI_Type * p_reg, bool enable); +#endif + #ifndef NRF_DECLARE_ONLY NRF_STATIC_INLINE void nrf_qspi_task_trigger(NRF_QSPI_Type * p_reg, nrf_qspi_task_t task) @@ -779,6 +894,55 @@ NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_continue(NRF_QSPI_Type * p_reg->CINSTRCONF = mask; } +#if NRF_QSPI_HAS_XIPEN +NRF_STATIC_INLINE void nrf_qspi_xip_set(NRF_QSPI_Type * p_reg, bool enable) +{ + p_reg->XIPEN = (enable ? QSPI_XIPEN_XIPEN_Enable << QSPI_XIPEN_XIPEN_Pos + : QSPI_XIPEN_XIPEN_Disable << QSPI_XIPEN_XIPEN_Pos); +} +#endif + +#if NRF_QSPI_HAS_XIP_ENC +NRF_STATIC_INLINE void nrf_qspi_xip_encryption_configure(NRF_QSPI_Type * p_reg, + nrf_qspi_encryption_t const * p_cfg) +{ + p_reg->XIP_ENC.KEY0 = p_cfg->key[0]; + p_reg->XIP_ENC.KEY1 = p_cfg->key[1]; + p_reg->XIP_ENC.KEY2 = p_cfg->key[2]; + p_reg->XIP_ENC.KEY3 = p_cfg->key[3]; + p_reg->XIP_ENC.NONCE0 = p_cfg->nonce[0]; + p_reg->XIP_ENC.NONCE1 = p_cfg->nonce[1]; + p_reg->XIP_ENC.NONCE2 = p_cfg->nonce[2]; +} + +NRF_STATIC_INLINE void nrf_qspi_xip_encryption_set(NRF_QSPI_Type * p_reg, bool enable) +{ + p_reg->XIP_ENC.ENABLE = + (enable ? QSPI_XIP_ENC_ENABLE_ENABLE_Enabled << QSPI_XIP_ENC_ENABLE_ENABLE_Pos + : QSPI_XIP_ENC_ENABLE_ENABLE_Disabled << QSPI_XIP_ENC_ENABLE_ENABLE_Pos); +} +#endif + +#if NRF_QSPI_HAS_DMA_ENC +NRF_STATIC_INLINE void nrf_qspi_dma_encryption_configure(NRF_QSPI_Type * p_reg, + nrf_qspi_encryption_t const * p_cfg) +{ + p_reg->DMA_ENC.KEY0 = p_cfg->key[0]; + p_reg->DMA_ENC.KEY1 = p_cfg->key[1]; + p_reg->DMA_ENC.KEY2 = p_cfg->key[2]; + p_reg->DMA_ENC.KEY3 = p_cfg->key[3]; + p_reg->DMA_ENC.NONCE0 = p_cfg->nonce[0]; + p_reg->DMA_ENC.NONCE1 = p_cfg->nonce[1]; + p_reg->DMA_ENC.NONCE2 = p_cfg->nonce[2]; +} + +NRF_STATIC_INLINE void nrf_qspi_dma_encryption_set(NRF_QSPI_Type * p_reg, bool enable) +{ + p_reg->DMA_ENC.ENABLE = + (enable ? QSPI_DMA_ENC_ENABLE_ENABLE_Enabled << QSPI_DMA_ENC_ENABLE_ENABLE_Pos + : QSPI_DMA_ENC_ENABLE_ENABLE_Disabled << QSPI_DMA_ENC_ENABLE_ENABLE_Pos); +} +#endif #endif // NRF_DECLARE_ONLY /** @} */ diff --git a/hal/nrf_radio.h b/hal/nrf_radio.h index c661bdf7e..d3e087d34 100644 --- a/hal/nrf_radio.h +++ b/hal/nrf_radio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -124,6 +124,11 @@ typedef enum and BleIeee802154_250Kbit modes when last bit is sent on the air. */ #endif +#if defined(RADIO_INTENSET_SYNC_Msk) || defined(__NRFX_DOXYGEN__) + NRF_RADIO_EVENT_SYNC = offsetof(NRF_RADIO_Type, EVENTS_SYNC), /**< Generated in Ble_LR125Kbit, Ble_LR500Kbit + and BleIeee802154_250Kbit modes when possible + preamble has been received. */ +#endif } nrf_radio_event_t; /** @brief RADIO interrupts. */ @@ -177,6 +182,9 @@ typedef enum #if defined(RADIO_INTENSET_PHYEND_Msk) || defined(__NRFX_DOXYGEN__) NRF_RADIO_INT_PHYEND_MASK = RADIO_INTENSET_PHYEND_Msk, /**< Interrupt on PHYEND event. */ #endif +#if defined(RADIO_INTENSET_SYNC_Msk) || defined(__NRFX_DOXYGEN__) + NRF_RADIO_INT_SYNC_MASK = RADIO_INTENSET_SYNC_Msk, /**< Interrupt on SYNC event. */ +#endif } nrf_radio_int_mask_t; /** @brief RADIO shortcuts. */ diff --git a/hal/nrf_regulators.h b/hal/nrf_regulators.h index 1c10406b4..3efb46213 100644 --- a/hal/nrf_regulators.h +++ b/hal/nrf_regulators.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,11 +45,95 @@ extern "C" { * @brief Hardware access layer for managing the REGULATORS peripheral. */ +#if defined(REGULATORS_MAINREGSTATUS_VREGH_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether MAINREGSTATUS register is present. */ +#define NRF_REGULATORS_HAS_MAINREGSTATUS 1 +#else +#define NRF_REGULATORS_HAS_MAINREGSTATUS 0 +#endif + +#if defined(REGULATORS_POFCON_POF_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether power failure comparator is present. */ +#define NRF_REGULATORS_HAS_POFCON 1 +#else +#define NRF_REGULATORS_HAS_POFCON 0 +#endif + +#if defined(REGULATORS_POFCON_THRESHOLDVDDH_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether power failure comparator for VDDH is present. */ +#define NRF_REGULATORS_HAS_POFCON_VDDH 1 +#else +#define NRF_REGULATORS_HAS_POFCON_VDDH 0 +#endif + +#if defined(REGULATORS_VREGH_DCDCEN_DCDCEN_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether high voltage regulator is present. */ +#define NRF_REGULATORS_HAS_DCDCEN_VDDH 1 +#else +#define NRF_REGULATORS_HAS_DCDCEN_VDDH 0 +#endif + +#if defined(REGULATORS_VREGRADIO_DCDCEN_DCDCEN_Msk) || defined(__NRFX_DOXYGEN__) +/** @brief Symbol indicating whether radio regulator is present. */ +#define NRF_REGULATORS_HAS_DCDCEN_RADIO 1 +#else +#define NRF_REGULATORS_HAS_DCDCEN_RADIO 0 +#endif + +#if NRF_REGULATORS_HAS_MAINREGSTATUS +/** @brief Main regulator status. */ +typedef enum +{ + NRF_REGULATORS_MAINREGSTATUS_NORMAL = REGULATORS_MAINREGSTATUS_VREGH_Inactive, /**< Normal voltage mode. Voltage supplied on VDD and VDDH. */ + NRF_REGULATORS_MAINREGSTATUS_HIGH = REGULATORS_MAINREGSTATUS_VREGH_Active /**< High voltage mode. Voltage supplied on VDDH. */ +} nrf_regulators_mainregstatus_t; +#endif + +#if NRF_REGULATORS_HAS_POFCON +/** @brief Power failure comparator thresholds. */ +typedef enum +{ + NRF_REGULATORS_POFTHR_V19 = REGULATORS_POFCON_THRESHOLD_V19, /**< Set threshold to 1.9 V. */ + NRF_REGULATORS_POFTHR_V20 = REGULATORS_POFCON_THRESHOLD_V20, /**< Set threshold to 2.0 V. */ + NRF_REGULATORS_POFTHR_V21 = REGULATORS_POFCON_THRESHOLD_V21, /**< Set threshold to 2.1 V. */ + NRF_REGULATORS_POFTHR_V22 = REGULATORS_POFCON_THRESHOLD_V22, /**< Set threshold to 2.2 V. */ + NRF_REGULATORS_POFTHR_V23 = REGULATORS_POFCON_THRESHOLD_V23, /**< Set threshold to 2.3 V. */ + NRF_REGULATORS_POFTHR_V24 = REGULATORS_POFCON_THRESHOLD_V24, /**< Set threshold to 2.4 V. */ + NRF_REGULATORS_POFTHR_V25 = REGULATORS_POFCON_THRESHOLD_V25, /**< Set threshold to 2.5 V. */ + NRF_REGULATORS_POFTHR_V26 = REGULATORS_POFCON_THRESHOLD_V26, /**< Set threshold to 2.6 V. */ + NRF_REGULATORS_POFTHR_V27 = REGULATORS_POFCON_THRESHOLD_V27, /**< Set threshold to 2.7 V. */ + NRF_REGULATORS_POFTHR_V28 = REGULATORS_POFCON_THRESHOLD_V28, /**< Set threshold to 2.8 V. */ +} nrf_regulators_pof_thr_t; +#endif + +#if NRF_REGULATORS_HAS_POFCON_VDDH +/** @brief Power failure comparator thresholds for VDDH. */ +typedef enum +{ + NRF_REGULATORS_POFTHRVDDH_V27 = REGULATORS_POFCON_THRESHOLDVDDH_V27, /**< Set threshold to 2.7 V. */ + NRF_REGULATORS_POFTHRVDDH_V28 = REGULATORS_POFCON_THRESHOLDVDDH_V28, /**< Set threshold to 2.8 V. */ + NRF_REGULATORS_POFTHRVDDH_V29 = REGULATORS_POFCON_THRESHOLDVDDH_V29, /**< Set threshold to 2.9 V. */ + NRF_REGULATORS_POFTHRVDDH_V30 = REGULATORS_POFCON_THRESHOLDVDDH_V30, /**< Set threshold to 3.0 V. */ + NRF_REGULATORS_POFTHRVDDH_V31 = REGULATORS_POFCON_THRESHOLDVDDH_V31, /**< Set threshold to 3.1 V. */ + NRF_REGULATORS_POFTHRVDDH_V32 = REGULATORS_POFCON_THRESHOLDVDDH_V32, /**< Set threshold to 3.2 V. */ + NRF_REGULATORS_POFTHRVDDH_V33 = REGULATORS_POFCON_THRESHOLDVDDH_V33, /**< Set threshold to 3.3 V. */ + NRF_REGULATORS_POFTHRVDDH_V34 = REGULATORS_POFCON_THRESHOLDVDDH_V34, /**< Set threshold to 3.4 V. */ + NRF_REGULATORS_POFTHRVDDH_V35 = REGULATORS_POFCON_THRESHOLDVDDH_V35, /**< Set threshold to 3.5 V. */ + NRF_REGULATORS_POFTHRVDDH_V36 = REGULATORS_POFCON_THRESHOLDVDDH_V36, /**< Set threshold to 3.6 V. */ + NRF_REGULATORS_POFTHRVDDH_V37 = REGULATORS_POFCON_THRESHOLDVDDH_V37, /**< Set threshold to 3.7 V. */ + NRF_REGULATORS_POFTHRVDDH_V38 = REGULATORS_POFCON_THRESHOLDVDDH_V38, /**< Set threshold to 3.8 V. */ + NRF_REGULATORS_POFTHRVDDH_V39 = REGULATORS_POFCON_THRESHOLDVDDH_V39, /**< Set threshold to 3.9 V. */ + NRF_REGULATORS_POFTHRVDDH_V40 = REGULATORS_POFCON_THRESHOLDVDDH_V40, /**< Set threshold to 4.0 V. */ + NRF_REGULATORS_POFTHRVDDH_V41 = REGULATORS_POFCON_THRESHOLDVDDH_V41, /**< Set threshold to 4.1 V. */ + NRF_REGULATORS_POFTHRVDDH_V42 = REGULATORS_POFCON_THRESHOLDVDDH_V42, /**< Set threshold to 4.2 V. */ +} nrf_regulators_pof_thrvddh_t; +#endif + /** * @brief Function for enabling or disabling DCDC converter. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. - * @param[in] enable Set true to enable or false to disable DCDC converter. + * @param[in] enable True if DCDC converter is to be enabled, false otherwise. */ NRF_STATIC_INLINE void nrf_regulators_dcdcen_set(NRF_REGULATORS_Type * p_reg, bool enable); @@ -65,6 +149,86 @@ NRF_STATIC_INLINE void nrf_regulators_dcdcen_set(NRF_REGULATORS_Type * p_reg, bo */ NRF_STATIC_INLINE void nrf_regulators_system_off(NRF_REGULATORS_Type * p_reg); +#if NRF_REGULATORS_HAS_MAINREGSTATUS +/** + * @brief Function for getting the main supply status. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return The current main supply status. + */ +NRF_STATIC_INLINE +nrf_regulators_mainregstatus_t nrf_regulators_mainregstatus_get(NRF_REGULATORS_Type const * p_reg); +#endif + +#if NRF_REGULATORS_HAS_POFCON +/** + * @brief Function for setting the power failure comparator configuration. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if power failure comparator is to be enabled, false otherwise. + * @param[in] thr Voltage threshold value. + */ +NRF_STATIC_INLINE void nrf_regulators_pofcon_set(NRF_REGULATORS_Type * p_reg, + bool enable, + nrf_regulators_pof_thr_t thr); + +/** + * @brief Function for getting the power failure comparator configuration. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[out] p_enabled Function sets this boolean variable to true + * if power failure comparator is enabled. + * The pointer can be NULL if we do not need this information. + * + * @return Threshold setting for power failure comparator. + */ +NRF_STATIC_INLINE +nrf_regulators_pof_thr_t nrf_regulators_pofcon_get(NRF_REGULATORS_Type const * p_reg, + bool * p_enabled); +#endif // NRF_REGULATORS_HAS_POFCON + +#if NRF_REGULATORS_HAS_POFCON_VDDH +/** + * @brief Function for setting the VDDH power failure comparator threshold. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] thr Threshold to be set. + */ +NRF_STATIC_INLINE void nrf_regulators_pofcon_vddh_set(NRF_REGULATORS_Type * p_reg, + nrf_regulators_pof_thrvddh_t thr); + +/** + * @brief Function for getting the VDDH regulators failure comparator threshold. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return Threshold setting for regulators failure comparator. + */ +NRF_STATIC_INLINE +nrf_regulators_pof_thrvddh_t nrf_regulators_pofcon_vddh_get(NRF_REGULATORS_Type const * p_reg); +#endif // NRF_REGULATORS_HAS_POFCON_VDDH + +#if NRF_REGULATORS_HAS_DCDCEN_VDDH +/** + * @brief Function for enabling or disabling the high voltage regulator. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if the high voltage regulator is to be enabled, false otherwise. + */ +NRF_STATIC_INLINE void nrf_regulators_dcdcen_vddh_set(NRF_REGULATORS_Type * p_reg, bool enable); +#endif + +#if NRF_REGULATORS_HAS_DCDCEN_RADIO +/** + * @brief Function for enabling or disabling the radio regulator. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if the radio regulator is to be enabled, false otherwise. + */ +NRF_STATIC_INLINE void nrf_regulators_dcdcen_radio_set(NRF_REGULATORS_Type * p_reg, bool enable); +#endif + #ifndef NRF_DECLARE_ONLY NRF_STATIC_INLINE void nrf_regulators_dcdcen_set(NRF_REGULATORS_Type * p_reg, bool enable) @@ -88,6 +252,85 @@ NRF_STATIC_INLINE void nrf_regulators_system_off(NRF_REGULATORS_Type * p_reg) } } +#if NRF_REGULATORS_HAS_MAINREGSTATUS +NRF_STATIC_INLINE +nrf_regulators_mainregstatus_t nrf_regulators_mainregstatus_get(NRF_REGULATORS_Type const * p_reg) +{ + return (nrf_regulators_mainregstatus_t)p_reg->MAINREGSTATUS; +} +#endif + +#if NRF_REGULATORS_HAS_POFCON +NRF_STATIC_INLINE void nrf_regulators_pofcon_set(NRF_REGULATORS_Type * p_reg, + bool enable, + nrf_regulators_pof_thr_t thr) +{ +#if NRF_REGULATORS_HAS_POFCON_VDDH + uint32_t pofcon = p_reg->POFCON; + pofcon &= ~(REGULATORS_POFCON_THRESHOLD_Msk | REGULATORS_POFCON_POF_Msk); + pofcon |= +#else // NRF_REGULATORS_HAS_POFCON_VDDH + p_reg->POFCON = +#endif + (((uint32_t)thr) << REGULATORS_POFCON_THRESHOLD_Pos) | + (enable ? + (REGULATORS_POFCON_POF_Enabled << REGULATORS_POFCON_POF_Pos) + : + (REGULATORS_POFCON_POF_Disabled << REGULATORS_POFCON_POF_Pos)); +#if NRF_REGULATORS_HAS_POFCON_VDDH + p_reg->POFCON = pofcon; +#endif +} + +NRF_STATIC_INLINE +nrf_regulators_pof_thr_t nrf_regulators_pofcon_get(NRF_REGULATORS_Type const * p_reg, + bool * p_enabled) +{ + uint32_t pofcon = p_reg->POFCON; + if (NULL != p_enabled) + { + (*p_enabled) = ((pofcon & REGULATORS_POFCON_POF_Msk) >> REGULATORS_POFCON_POF_Pos) + == REGULATORS_POFCON_POF_Enabled; + } + return (nrf_regulators_pof_thr_t)((pofcon & REGULATORS_POFCON_THRESHOLD_Msk) >> + REGULATORS_POFCON_THRESHOLD_Pos); +} +#endif // NRF_REGULATORS_HAS_POFCON + +#if NRF_REGULATORS_HAS_POFCON_VDDH +NRF_STATIC_INLINE void nrf_regulators_pofcon_vddh_set(NRF_REGULATORS_Type * p_reg, + nrf_regulators_pof_thrvddh_t thr) +{ + uint32_t pofcon = p_reg->POFCON; + pofcon &= ~REGULATORS_POFCON_THRESHOLDVDDH_Msk; + pofcon |= (((uint32_t)thr) << REGULATORS_POFCON_THRESHOLDVDDH_Pos); + p_reg->POFCON = pofcon; +} + +NRF_STATIC_INLINE +nrf_regulators_pof_thrvddh_t nrf_regulators_pofcon_vddh_get(NRF_REGULATORS_Type const * p_reg) +{ + return (nrf_regulators_pof_thrvddh_t)((p_reg->POFCON & REGULATORS_POFCON_THRESHOLDVDDH_Msk) >> + REGULATORS_POFCON_THRESHOLDVDDH_Pos); +} +#endif // NRF_REGULATORS_HAS_POFCON_VDDH + +#if NRF_REGULATORS_HAS_DCDCEN_VDDH +NRF_STATIC_INLINE void nrf_regulators_dcdcen_vddh_set(NRF_REGULATORS_Type * p_reg, bool enable) +{ + p_reg->VREGH.DCDCEN = (enable) ? REGULATORS_VREGH_DCDCEN_DCDCEN_Enabled : + REGULATORS_VREGH_DCDCEN_DCDCEN_Disabled; +} +#endif + +#if NRF_REGULATORS_HAS_DCDCEN_RADIO +NRF_STATIC_INLINE void nrf_regulators_dcdcen_radio_set(NRF_REGULATORS_Type * p_reg, bool enable) +{ + p_reg->VREGRADIO.DCDCEN = (enable) ? REGULATORS_VREGRADIO_DCDCEN_DCDCEN_Enabled : + REGULATORS_VREGRADIO_DCDCEN_DCDCEN_Disabled; +} +#endif + #endif // NRF_DECLARE_ONLY /** @} */ diff --git a/hal/nrf_reset.h b/hal/nrf_reset.h index 438dedfa9..b9292c045 100644 --- a/hal/nrf_reset.h +++ b/hal/nrf_reset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_rng.h b/hal/nrf_rng.h index 27de21e09..26698e0a0 100644 --- a/hal/nrf_rng.h +++ b/hal/nrf_rng.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_rtc.h b/hal/nrf_rtc.h index ab1c4b78a..710b9439b 100644 --- a/hal/nrf_rtc.h +++ b/hal/nrf_rtc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_saadc.h b/hal/nrf_saadc.h index 37574135e..fef39a39a 100644 --- a/hal/nrf_saadc.h +++ b/hal/nrf_saadc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,10 @@ typedef enum NRF_SAADC_INPUT_AIN5 = SAADC_CH_PSELP_PSELP_AnalogInput5, ///< Analog input 5 (AIN5). NRF_SAADC_INPUT_AIN6 = SAADC_CH_PSELP_PSELP_AnalogInput6, ///< Analog input 6 (AIN6). NRF_SAADC_INPUT_AIN7 = SAADC_CH_PSELP_PSELP_AnalogInput7, ///< Analog input 7 (AIN7). - NRF_SAADC_INPUT_VDD = SAADC_CH_PSELP_PSELP_VDD ///< VDD as input. + NRF_SAADC_INPUT_VDD = SAADC_CH_PSELP_PSELP_VDD, ///< VDD as input. +#if defined(SAADC_CH_PSELP_PSELP_VDDHDIV5) || defined(__NRFX_DOXYGEN__) + NRF_SAADC_INPUT_VDDHDIV5 = SAADC_CH_PSELP_PSELP_VDDHDIV5 ///< VDDH/5 as input. +#endif } nrf_saadc_input_t; /** @brief Analog-to-digital converter oversampling mode. */ @@ -254,7 +257,7 @@ NRF_STATIC_INLINE uint32_t nrf_saadc_task_address_get(NRF_SAADC_Type const * p_r nrf_saadc_task_t task); /** - * @brief Function for retrieving the state of the UARTE event. + * @brief Function for retrieving the state of the SAADC event. * * @param[in] p_reg Pointer to the structure of registers of the peripheral. * @param[in] event Event to be checked. @@ -379,6 +382,14 @@ NRF_STATIC_INLINE void nrf_saadc_channel_limits_set(NRF_SAADC_Type * p_reg, int16_t low, int16_t high); +/** + * @brief Function for setting the configuration of SAADC interrupts. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] mask Interrupts configuration to be set. + */ +NRF_STATIC_INLINE void nrf_saadc_int_set(NRF_SAADC_Type * p_reg, uint32_t mask); + /** * @brief Function for enabling specified SAADC interrupts. * @@ -718,6 +729,11 @@ NRF_STATIC_INLINE void nrf_saadc_channel_limits_set(NRF_SAADC_Type * p_reg, | (((uint32_t) high << SAADC_CH_LIMIT_HIGH_Pos) & SAADC_CH_LIMIT_HIGH_Msk)); } +NRF_STATIC_INLINE void nrf_saadc_int_set(NRF_SAADC_Type * p_reg, uint32_t mask) +{ + p_reg->INTEN = mask; +} + NRF_STATIC_INLINE void nrf_saadc_int_enable(NRF_SAADC_Type * p_reg, uint32_t mask) { p_reg->INTENSET = mask; diff --git a/hal/nrf_spi.h b/hal/nrf_spi.h index bb5d034b0..95df3d2af 100644 --- a/hal/nrf_spi.h +++ b/hal/nrf_spi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_spim.h b/hal/nrf_spim.h index 0ce3a1fc8..a644f3e82 100644 --- a/hal/nrf_spim.h +++ b/hal/nrf_spim.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,21 +57,24 @@ extern "C" { (NRFX_CHECK(SPIM0_FEATURE_HARDWARE_CSN_PRESENT) || \ NRFX_CHECK(SPIM1_FEATURE_HARDWARE_CSN_PRESENT) || \ NRFX_CHECK(SPIM2_FEATURE_HARDWARE_CSN_PRESENT) || \ - NRFX_CHECK(SPIM3_FEATURE_HARDWARE_CSN_PRESENT)) + NRFX_CHECK(SPIM3_FEATURE_HARDWARE_CSN_PRESENT) || \ + NRFX_CHECK(SPIM4_FEATURE_HARDWARE_CSN_PRESENT)) /** @brief Macro for checking if the DCX pin control is available. */ #define NRF_SPIM_DCX_PRESENT \ (NRFX_CHECK(SPIM0_FEATURE_DCX_PRESENT) || \ NRFX_CHECK(SPIM1_FEATURE_DCX_PRESENT) || \ NRFX_CHECK(SPIM2_FEATURE_DCX_PRESENT) || \ - NRFX_CHECK(SPIM3_FEATURE_DCX_PRESENT)) + NRFX_CHECK(SPIM3_FEATURE_DCX_PRESENT) || \ + NRFX_CHECK(SPIM4_FEATURE_DCX_PRESENT)) /** @brief Macro for checking if the RXDELAY function is available. */ #define NRF_SPIM_RXDELAY_PRESENT \ (NRFX_CHECK(SPIM0_FEATURE_RXDELAY_PRESENT) || \ NRFX_CHECK(SPIM1_FEATURE_RXDELAY_PRESENT) || \ NRFX_CHECK(SPIM2_FEATURE_RXDELAY_PRESENT) || \ - NRFX_CHECK(SPIM3_FEATURE_RXDELAY_PRESENT)) + NRFX_CHECK(SPIM3_FEATURE_RXDELAY_PRESENT) || \ + NRFX_CHECK(SPIM4_FEATURE_RXDELAY_PRESENT)) #if defined(NRF_SPIM_DCX_PRESENT) || defined(__NRFX_DOXYGEN__) /** diff --git a/hal/nrf_spis.h b/hal/nrf_spis.h index cacb815ad..7819b6bb7 100644 --- a/hal/nrf_spis.h +++ b/hal/nrf_spis.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_spu.h b/hal/nrf_spu.h index 62b6b4d60..847068aec 100644 --- a/hal/nrf_spu.h +++ b/hal/nrf_spu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_systick.h b/hal/nrf_systick.h index 483a74944..826985467 100644 --- a/hal/nrf_systick.h +++ b/hal/nrf_systick.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_temp.h b/hal/nrf_temp.h index 67dbdba1b..56e1d4308 100644 --- a/hal/nrf_temp.h +++ b/hal/nrf_temp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2012 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_timer.h b/hal/nrf_timer.h index 2ffe5cdb7..d3cc5d675 100644 --- a/hal/nrf_timer.h +++ b/hal/nrf_timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2014 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_twi.h b/hal/nrf_twi.h index 1ffd5315f..5e3704853 100644 --- a/hal/nrf_twi.h +++ b/hal/nrf_twi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_twim.h b/hal/nrf_twim.h index 50b4ed491..04d755501 100644 --- a/hal/nrf_twim.h +++ b/hal/nrf_twim.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -104,9 +104,12 @@ typedef enum /** @brief TWIM master clock frequency. */ typedef enum { - NRF_TWIM_FREQ_100K = TWIM_FREQUENCY_FREQUENCY_K100, ///< 100 kbps. - NRF_TWIM_FREQ_250K = TWIM_FREQUENCY_FREQUENCY_K250, ///< 250 kbps. - NRF_TWIM_FREQ_400K = TWIM_FREQUENCY_FREQUENCY_K400 ///< 400 kbps. + NRF_TWIM_FREQ_100K = TWIM_FREQUENCY_FREQUENCY_K100, ///< 100 kbps. + NRF_TWIM_FREQ_250K = TWIM_FREQUENCY_FREQUENCY_K250, ///< 250 kbps. + NRF_TWIM_FREQ_400K = TWIM_FREQUENCY_FREQUENCY_K400, ///< 400 kbps. +#if defined(TWIM_FREQUENCY_FREQUENCY_K1000) || defined(__NRFX_DOXYGEN__) + NRF_TWIM_FREQ_1000K = TWIM_FREQUENCY_FREQUENCY_K1000 ///< 1000 kbps. +#endif } nrf_twim_frequency_t; /** @brief TWIM error source. */ @@ -349,6 +352,15 @@ NRF_STATIC_INLINE void nrf_twim_rx_buffer_set(NRF_TWIM_Type * p_reg, NRF_STATIC_INLINE void nrf_twim_shorts_set(NRF_TWIM_Type * p_reg, uint32_t mask); +/** + * @brief Function for getting the shortcut setting. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return Current shortcut configuration. + */ +NRF_STATIC_INLINE uint32_t nrf_twim_shorts_get(NRF_TWIM_Type const * p_reg); + /** * @brief Function for getting the amount of transmitted bytes. * @@ -553,6 +565,11 @@ NRF_STATIC_INLINE void nrf_twim_shorts_set(NRF_TWIM_Type * p_reg, p_reg->SHORTS = mask; } +NRF_STATIC_INLINE uint32_t nrf_twim_shorts_get(NRF_TWIM_Type const * p_reg) +{ + return p_reg->SHORTS; +} + NRF_STATIC_INLINE size_t nrf_twim_txd_amount_get(NRF_TWIM_Type const * p_reg) { return p_reg->TXD.AMOUNT; diff --git a/hal/nrf_twis.h b/hal/nrf_twis.h index 55d668495..2dffdaf72 100644 --- a/hal/nrf_twis.h +++ b/hal/nrf_twis.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_uart.h b/hal/nrf_uart.h index 8512cbdb7..2acc9e97b 100644 --- a/hal/nrf_uart.h +++ b/hal/nrf_uart.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_uarte.h b/hal/nrf_uarte.h index 06c59604e..ba7930456 100644 --- a/hal/nrf_uarte.h +++ b/hal/nrf_uarte.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_usbd.h b/hal/nrf_usbd.h index 9759c7274..71c56c2ea 100644 --- a/hal/nrf_usbd.h +++ b/hal/nrf_usbd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1086,15 +1086,6 @@ NRF_STATIC_INLINE uint32_t nrf_usbd_ep_amount_get(NRF_USBD_Type const * p_reg, u NRF_STATIC_INLINE void nrf_usbd_enable(NRF_USBD_Type * p_reg) { -#ifdef NRF_FPGA_IMPLEMENTATION - *(volatile uint32_t *)0x400005F4 = 3; - __ISB(); - __DSB(); - *(volatile uint32_t *)0x400005F0 = 3; - __ISB(); - __DSB(); -#endif - p_reg->ENABLE = USBD_ENABLE_ENABLE_Enabled << USBD_ENABLE_ENABLE_Pos; (void) p_reg->ENABLE; } diff --git a/hal/nrf_usbreg.h b/hal/nrf_usbreg.h new file mode 100644 index 000000000..be811e167 --- /dev/null +++ b/hal/nrf_usbreg.h @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRF_USBREG_H__ +#define NRF_USBREG_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup nrf_usbreg_hal USBREG HAL + * @{ + * @ingroup nrf_usbd + * @ingroup nrf_power + * @brief Hardware access layer for managing the USB regulator peripheral. + */ + +/** @brief USBREG events. */ +typedef enum +{ + NRF_USBREG_EVENT_USBDETECTED = offsetof(NRF_USBREG_Type, EVENTS_USBDETECTED), /**< Voltage supply detected on VBUS. */ + NRF_USBREG_EVENT_USBREMOVED = offsetof(NRF_USBREG_Type, EVENTS_USBREMOVED), /**< Voltage supply removed from VBUS. */ + NRF_USBREG_EVENT_USBPWRRDY = offsetof(NRF_USBREG_Type, EVENTS_USBPWRRDY) /**< USB 3.3 V supply ready. */ +} nrf_usbreg_event_t; + +/** @brief USBREG interrupts. */ +typedef enum +{ + NRF_USBREG_INT_USBDETECTED = USBREG_INTEN_USBDETECTED_Msk, /**< Interrupt on USBDETECTED. */ + NRF_USBREG_INT_USBREMOVED = USBREG_INTEN_USBREMOVED_Msk, /**< Interrupt on USBREMOVED. */ + NRF_USBREG_INT_USBPWRRDY = USBREG_INTEN_USBPWRRDY_Msk /**< Interrupt on USBPWRRDY. */ +} nrf_usbreg_int_mask_t; + +/** @brief USBREGSTATUS register bit masks. */ +typedef enum +{ + NRF_USBREG_STATUS_VBUSDETECT_MASK = USBREG_USBREGSTATUS_VBUSDETECT_Msk, /**< USB detected or removed. */ + NRF_USBREG_STATUS_OUTPUTRDY_MASK = USBREG_USBREGSTATUS_OUTPUTRDY_Msk /**< USB 3.3 V supply ready. */ +} nrf_usbreg_status_mask_t; + +/** + * @brief Function for clearing the specified USBREG event. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] event Event to be cleared. + */ +NRF_STATIC_INLINE void nrf_usbreg_event_clear(NRF_USBREG_Type * p_reg, + nrf_usbreg_event_t event); + +/** + * @brief Function for retrieving the state of the USBREG event. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] event Event to be checked. + * + * @retval true The event has been generated. + * @retval false The event has not been generated. + */ +NRF_STATIC_INLINE bool nrf_usbreg_event_check(NRF_USBREG_Type const * p_reg, + nrf_usbreg_event_t event); + +/** + * @brief Function for enabling specified interrupts. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] mask Mask of interrupts to be enabled. + */ +NRF_STATIC_INLINE void nrf_usbreg_int_enable(NRF_USBREG_Type * p_reg, uint32_t mask); + +/** + * @brief Function for disabling specified interrupts. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] mask Mask of interrupts to be disabled. + */ +NRF_STATIC_INLINE void nrf_usbreg_int_disable(NRF_USBREG_Type * p_reg, uint32_t mask); + +/** + * @brief Function for checking if the specified interrupts are enabled. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] mask Mask of interrupts to be checked. + * + * @return Mask of enabled interrupts. + */ +NRF_STATIC_INLINE uint32_t nrf_usbreg_int_enable_check(NRF_USBREG_Type const * p_reg, + uint32_t mask); + +/** + * @brief Function for getting the whole USBREGSTATUS register. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @return The USBREGSTATUS register value. + * Use @ref nrf_usbreg_status_mask_t values for bit masking. + */ +NRF_STATIC_INLINE uint32_t nrf_usbreg_status_get(NRF_USBREG_Type const * p_reg); + +#ifndef NRF_DECLARE_ONLY + +NRF_STATIC_INLINE void nrf_usbreg_event_clear(NRF_USBREG_Type * p_reg, + nrf_usbreg_event_t event) +{ + *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL; +} + +NRF_STATIC_INLINE bool nrf_usbreg_event_check(NRF_USBREG_Type const * p_reg, + nrf_usbreg_event_t event) +{ + return (bool)*(volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event); +} + +NRF_STATIC_INLINE void nrf_usbreg_int_enable(NRF_USBREG_Type * p_reg, uint32_t mask) +{ + p_reg->INTENSET = mask; +} + +NRF_STATIC_INLINE void nrf_usbreg_int_disable(NRF_USBREG_Type * p_reg, uint32_t mask) +{ + p_reg->INTENCLR = mask; +} + +NRF_STATIC_INLINE uint32_t nrf_usbreg_int_enable_check(NRF_USBREG_Type const * p_reg, + uint32_t mask) +{ + return p_reg->INTENSET & mask; +} + +NRF_STATIC_INLINE uint32_t nrf_usbreg_status_get(NRF_USBREG_Type const * p_reg) +{ + return p_reg->USBREGSTATUS; +} + +#endif // NRF_DECLARE_ONLY + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_USBREG_H__ diff --git a/hal/nrf_vmc.h b/hal/nrf_vmc.h index a1d54e419..add75efc3 100644 --- a/hal/nrf_vmc.h +++ b/hal/nrf_vmc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/hal/nrf_vreqctrl.h b/hal/nrf_vreqctrl.h new file mode 100644 index 000000000..be9d2e549 --- /dev/null +++ b/hal/nrf_vreqctrl.h @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRF_VREQCTRL_H__ +#define NRF_VREQCTRL_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup nrf_vreqctrl_hal VREQCTRL HAL + * @{ + * @ingroup nrf_power + * @brief Hardware access layer for managing the VREQCTRL peripheral. + */ + +/** + * @brief Function for requesting high voltage on RADIO, to increase its output power by 3 dBm. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * @param[in] enable True if high voltage on RADIO is to be enabled, false otherwise. + */ +NRF_STATIC_INLINE void nrf_vreqctrl_radio_high_voltage_set(NRF_VREQCTRL_Type * p_reg, bool enable); + +/** + * @brief Function for checking if high voltage on RADIO is ready. + * + * @param[in] p_reg Pointer to the structure of registers of the peripheral. + * + * @retval true The high voltage is ready. + * @retval false The high voltage is not ready. + */ +NRF_STATIC_INLINE bool nrf_vreqctrl_radio_high_voltage_check(NRF_VREQCTRL_Type const * p_reg); + +#ifndef NRF_DECLARE_ONLY + +NRF_STATIC_INLINE void nrf_vreqctrl_radio_high_voltage_set(NRF_VREQCTRL_Type * p_reg, bool enable) +{ + p_reg->VREGRADIO.VREQH = + (enable ? VREQCTRL_VREGRADIO_VREQH_VREQH_Enabled : VREQCTRL_VREGRADIO_VREQH_VREQH_Disabled); +} + +NRF_STATIC_INLINE bool nrf_vreqctrl_radio_high_voltage_check(NRF_VREQCTRL_Type const * p_reg) +{ + return (bool)(p_reg->VREGRADIO.VREQHREADY & VREQCTRL_VREGRADIO_VREQHREADY_READY_Msk); +} + +#endif // NRF_DECLARE_ONLY + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif // NRF_VREQCTRL_H__ diff --git a/hal/nrf_wdt.h b/hal/nrf_wdt.h index e572fd9da..79f866c40 100644 --- a/hal/nrf_wdt.h +++ b/hal/nrf_wdt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2015 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,10 @@ extern "C" { #endif +#ifndef NRF_WDT0 +#define NRF_WDT0 NRF_WDT +#endif + /** * @defgroup nrf_wdt_hal WDT HAL * @{ diff --git a/helpers/nrfx_gppi.h b/helpers/nrfx_gppi.h index 1c7e2fb89..eb8b600d6 100644 --- a/helpers/nrfx_gppi.h +++ b/helpers/nrfx_gppi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/mdk/arm_startup_nrf5340_application.s b/mdk/arm_startup_nrf5340_application.s index 4152a8c45..d9eb6eb74 100644 --- a/mdk/arm_startup_nrf5340_application.s +++ b/mdk/arm_startup_nrf5340_application.s @@ -94,9 +94,9 @@ __Vectors DCD __initial_sp ; Top of Stack DCD 0 ; Reserved DCD SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler DCD SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - DCD SPIM2_IRQHandler - DCD 0 ; Reserved - DCD 0 ; Reserved + DCD SPIM4_IRQHandler + DCD SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + DCD SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler DCD GPIOTE0_IRQHandler DCD SAADC_IRQHandler DCD TIMER0_IRQHandler @@ -120,7 +120,7 @@ __Vectors DCD __initial_sp ; Top of Stack DCD PWM0_IRQHandler DCD PWM1_IRQHandler DCD PWM2_IRQHandler - DCD 0 ; Reserved + DCD PWM3_IRQHandler DCD 0 ; Reserved DCD PDM0_IRQHandler DCD 0 ; Reserved @@ -135,8 +135,8 @@ __Vectors DCD __initial_sp ; Top of Stack DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved - DCD QDEC_IRQHandler - DCD 0 ; Reserved + DCD QDEC0_IRQHandler + DCD QDEC1_IRQHandler DCD 0 ; Reserved DCD USBD_IRQHandler DCD USBREGULATOR_IRQHandler @@ -403,7 +403,9 @@ Default_Handler PROC EXPORT CLOCK_POWER_IRQHandler [WEAK] EXPORT SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler [WEAK] EXPORT SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler [WEAK] - EXPORT SPIM2_IRQHandler [WEAK] + EXPORT SPIM4_IRQHandler [WEAK] + EXPORT SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler [WEAK] + EXPORT SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler [WEAK] EXPORT GPIOTE0_IRQHandler [WEAK] EXPORT SAADC_IRQHandler [WEAK] EXPORT TIMER0_IRQHandler [WEAK] @@ -423,13 +425,15 @@ Default_Handler PROC EXPORT PWM0_IRQHandler [WEAK] EXPORT PWM1_IRQHandler [WEAK] EXPORT PWM2_IRQHandler [WEAK] + EXPORT PWM3_IRQHandler [WEAK] EXPORT PDM0_IRQHandler [WEAK] EXPORT I2S0_IRQHandler [WEAK] EXPORT IPC_IRQHandler [WEAK] EXPORT QSPI_IRQHandler [WEAK] EXPORT NFCT_IRQHandler [WEAK] EXPORT GPIOTE1_IRQHandler [WEAK] - EXPORT QDEC_IRQHandler [WEAK] + EXPORT QDEC0_IRQHandler [WEAK] + EXPORT QDEC1_IRQHandler [WEAK] EXPORT USBD_IRQHandler [WEAK] EXPORT USBREGULATOR_IRQHandler [WEAK] EXPORT KMU_IRQHandler [WEAK] @@ -440,7 +444,9 @@ SPU_IRQHandler CLOCK_POWER_IRQHandler SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler -SPIM2_IRQHandler +SPIM4_IRQHandler +SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler GPIOTE0_IRQHandler SAADC_IRQHandler TIMER0_IRQHandler @@ -460,13 +466,15 @@ EGU5_IRQHandler PWM0_IRQHandler PWM1_IRQHandler PWM2_IRQHandler +PWM3_IRQHandler PDM0_IRQHandler I2S0_IRQHandler IPC_IRQHandler QSPI_IRQHandler NFCT_IRQHandler GPIOTE1_IRQHandler -QDEC_IRQHandler +QDEC0_IRQHandler +QDEC1_IRQHandler USBD_IRQHandler USBREGULATOR_IRQHandler KMU_IRQHandler diff --git a/mdk/gcc_startup_nrf51.S b/mdk/gcc_startup_nrf51.S index 9ecb0ff97..162db0ced 100644 --- a/mdk/gcc_startup_nrf51.S +++ b/mdk/gcc_startup_nrf51.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf52.S b/mdk/gcc_startup_nrf52.S index dfc79ee47..9e97163a1 100644 --- a/mdk/gcc_startup_nrf52.S +++ b/mdk/gcc_startup_nrf52.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf52805.S b/mdk/gcc_startup_nrf52805.S index d72562209..3e314c77f 100644 --- a/mdk/gcc_startup_nrf52805.S +++ b/mdk/gcc_startup_nrf52805.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf52810.S b/mdk/gcc_startup_nrf52810.S index 4980201e4..5bca5cd87 100644 --- a/mdk/gcc_startup_nrf52810.S +++ b/mdk/gcc_startup_nrf52810.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf52811.S b/mdk/gcc_startup_nrf52811.S index 0a1a1e40a..ac7fd29ef 100644 --- a/mdk/gcc_startup_nrf52811.S +++ b/mdk/gcc_startup_nrf52811.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf52833.S b/mdk/gcc_startup_nrf52833.S index e7817790f..042b0c35f 100644 --- a/mdk/gcc_startup_nrf52833.S +++ b/mdk/gcc_startup_nrf52833.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf52840.S b/mdk/gcc_startup_nrf52840.S index 0de37bbc6..187a08d25 100644 --- a/mdk/gcc_startup_nrf52840.S +++ b/mdk/gcc_startup_nrf52840.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf5340_application.S b/mdk/gcc_startup_nrf5340_application.S index e89588a4e..1b05d92ba 100644 --- a/mdk/gcc_startup_nrf5340_application.S +++ b/mdk/gcc_startup_nrf5340_application.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: @@ -100,9 +100,9 @@ __isr_vector: .long 0 /*Reserved */ .long SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler .long SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - .long SPIM2_IRQHandler - .long 0 /*Reserved */ - .long 0 /*Reserved */ + .long SPIM4_IRQHandler + .long SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + .long SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler .long GPIOTE0_IRQHandler .long SAADC_IRQHandler .long TIMER0_IRQHandler @@ -126,7 +126,7 @@ __isr_vector: .long PWM0_IRQHandler .long PWM1_IRQHandler .long PWM2_IRQHandler - .long 0 /*Reserved */ + .long PWM3_IRQHandler .long 0 /*Reserved */ .long PDM0_IRQHandler .long 0 /*Reserved */ @@ -141,8 +141,8 @@ __isr_vector: .long 0 /*Reserved */ .long 0 /*Reserved */ .long 0 /*Reserved */ - .long QDEC_IRQHandler - .long 0 /*Reserved */ + .long QDEC0_IRQHandler + .long QDEC1_IRQHandler .long 0 /*Reserved */ .long USBD_IRQHandler .long USBREGULATOR_IRQHandler @@ -504,7 +504,9 @@ Default_Handler: IRQ CLOCK_POWER_IRQHandler IRQ SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler IRQ SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - IRQ SPIM2_IRQHandler + IRQ SPIM4_IRQHandler + IRQ SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + IRQ SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler IRQ GPIOTE0_IRQHandler IRQ SAADC_IRQHandler IRQ TIMER0_IRQHandler @@ -524,13 +526,15 @@ Default_Handler: IRQ PWM0_IRQHandler IRQ PWM1_IRQHandler IRQ PWM2_IRQHandler + IRQ PWM3_IRQHandler IRQ PDM0_IRQHandler IRQ I2S0_IRQHandler IRQ IPC_IRQHandler IRQ QSPI_IRQHandler IRQ NFCT_IRQHandler IRQ GPIOTE1_IRQHandler - IRQ QDEC_IRQHandler + IRQ QDEC0_IRQHandler + IRQ QDEC1_IRQHandler IRQ USBD_IRQHandler IRQ USBREGULATOR_IRQHandler IRQ KMU_IRQHandler diff --git a/mdk/gcc_startup_nrf5340_network.S b/mdk/gcc_startup_nrf5340_network.S index 836c37eb0..e8aa81e23 100644 --- a/mdk/gcc_startup_nrf5340_network.S +++ b/mdk/gcc_startup_nrf5340_network.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/gcc_startup_nrf9160.S b/mdk/gcc_startup_nrf9160.S index bf44dd7c4..d8b9893bc 100644 --- a/mdk/gcc_startup_nrf9160.S +++ b/mdk/gcc_startup_nrf9160.S @@ -68,7 +68,7 @@ __HeapBase: __HeapLimit: .size __HeapLimit, . - __HeapLimit - .section .isr_vector + .section .isr_vector, "ax" .align 2 .globl __isr_vector __isr_vector: diff --git a/mdk/iar_startup_nrf5340_application.s b/mdk/iar_startup_nrf5340_application.s index 4fce0f3ce..32106ed13 100644 --- a/mdk/iar_startup_nrf5340_application.s +++ b/mdk/iar_startup_nrf5340_application.s @@ -95,9 +95,9 @@ __vector_table DCD 0 ; Reserved DCD SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler DCD SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - DCD SPIM2_IRQHandler - DCD 0 ; Reserved - DCD 0 ; Reserved + DCD SPIM4_IRQHandler + DCD SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + DCD SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler DCD GPIOTE0_IRQHandler DCD SAADC_IRQHandler DCD TIMER0_IRQHandler @@ -121,7 +121,7 @@ __vector_table DCD PWM0_IRQHandler DCD PWM1_IRQHandler DCD PWM2_IRQHandler - DCD 0 ; Reserved + DCD PWM3_IRQHandler DCD 0 ; Reserved DCD PDM0_IRQHandler DCD 0 ; Reserved @@ -136,8 +136,8 @@ __vector_table DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved - DCD QDEC_IRQHandler - DCD 0 ; Reserved + DCD QDEC0_IRQHandler + DCD QDEC1_IRQHandler DCD 0 ; Reserved DCD USBD_IRQHandler DCD USBREGULATOR_IRQHandler @@ -429,9 +429,19 @@ SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler B . - PUBWEAK SPIM2_IRQHandler + PUBWEAK SPIM4_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +SPIM4_IRQHandler + B . + + PUBWEAK SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + B . + + PUBWEAK SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) -SPIM2_IRQHandler +SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler B . PUBWEAK GPIOTE0_IRQHandler @@ -529,6 +539,11 @@ PWM1_IRQHandler PWM2_IRQHandler B . + PUBWEAK PWM3_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +PWM3_IRQHandler + B . + PUBWEAK PDM0_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) PDM0_IRQHandler @@ -559,9 +574,14 @@ NFCT_IRQHandler GPIOTE1_IRQHandler B . - PUBWEAK QDEC_IRQHandler + PUBWEAK QDEC0_IRQHandler + SECTION .text:CODE:REORDER:NOROOT(1) +QDEC0_IRQHandler + B . + + PUBWEAK QDEC1_IRQHandler SECTION .text:CODE:REORDER:NOROOT(1) -QDEC_IRQHandler +QDEC1_IRQHandler B . PUBWEAK USBD_IRQHandler diff --git a/mdk/nrf.h b/mdk/nrf.h index 289ab233a..f36d5e79f 100644 --- a/mdk/nrf.h +++ b/mdk/nrf.h @@ -35,8 +35,8 @@ POSSIBILITY OF SUCH DAMAGE. /* MDK version */ #define MDK_MAJOR_VERSION 8 -#define MDK_MINOR_VERSION 29 -#define MDK_MICRO_VERSION 0 +#define MDK_MINOR_VERSION 30 +#define MDK_MICRO_VERSION 2 /* Define NRF51_SERIES for common use in nRF51 series devices. Only if not previously defined. */ #if defined (NRF51) ||\ @@ -85,6 +85,18 @@ POSSIBILITY OF SUCH DAMAGE. #endif #endif +/* Define coprocessor domains */ +#if defined (NRF5340_XXAA_APPLICATION) + #ifndef NRF_APPLICATION + #define NRF_APPLICATION + #endif +#endif +#if defined (NRF5340_XXAA_NETWORK) + #ifndef NRF_NETWORK + #define NRF_NETWORK + #endif +#endif + #if defined(_WIN32) /* Do not include nrf specific files when building for PC host */ #elif defined(__unix) diff --git a/mdk/nrf51.h b/mdk/nrf51.h index 27baec432..5da3cea61 100644 --- a/mdk/nrf51.h +++ b/mdk/nrf51.h @@ -30,10 +30,10 @@ * @file nrf51.h * @brief CMSIS HeaderFile * @version 522 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:33 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:30 * from File 'nrf51.svd', - * last modified on Friday, 25.10.2019 07:35:24 + * last modified on Friday, 17.01.2020 16:08:22 */ diff --git a/mdk/nrf51422_erratas.h b/mdk/nrf51422_erratas.h deleted file mode 100644 index 0f296a5ba..000000000 --- a/mdk/nrf51422_erratas.h +++ /dev/null @@ -1,2579 +0,0 @@ -#ifndef NRF51422_ERRATAS_H -#define NRF51422_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_50(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_52(void) __UNUSED; -static bool errata_53(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_56(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_60(void) __UNUSED; -static bool errata_61(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_69(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; - -static bool errata_1(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_2(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_3(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_5(void) -{ - return false; -} - -static bool errata_6(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_7(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_8(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_9(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_10(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_11(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_12(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_13(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_14(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_17(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_18(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_19(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_21(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_22(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_24(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_25(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_28(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_29(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_30(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_33(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_34(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_35(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_40(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_41(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_42(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_43(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_44(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_45(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_46(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_48(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_49(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_50(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_52(void) -{ - return false; -} - -static bool errata_53(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_56(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_58(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_59(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_60(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_61(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_63(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_64(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_65(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_69(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_72(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_74(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_75(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -#endif /* NRF51422_ERRATAS_H */ diff --git a/mdk/nrf51422_peripherals.h b/mdk/nrf51422_peripherals.h index 8fd3cee8a..2c99e72e9 100644 --- a/mdk/nrf51422_peripherals.h +++ b/mdk/nrf51422_peripherals.h @@ -59,6 +59,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf51801_erratas.h b/mdk/nrf51801_erratas.h deleted file mode 100644 index a75658809..000000000 --- a/mdk/nrf51801_erratas.h +++ /dev/null @@ -1,635 +0,0 @@ -#ifndef NRF51801_ERRATAS_H -#define NRF51801_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_50(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_52(void) __UNUSED; -static bool errata_53(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_56(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_60(void) __UNUSED; -static bool errata_61(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_69(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_5(void) -{ - return false; -} - -static bool errata_6(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_13(void) -{ - return false; -} - -static bool errata_14(void) -{ - return false; -} - -static bool errata_15(void) -{ - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_18(void) -{ - return false; -} - -static bool errata_19(void) -{ - return false; -} - -static bool errata_20(void) -{ - return false; -} - -static bool errata_21(void) -{ - return false; -} - -static bool errata_22(void) -{ - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_45(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_50(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_52(void) -{ - return false; -} - -static bool errata_53(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - return false; -} - -static bool errata_56(void) -{ - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_59(void) -{ - return false; -} - -static bool errata_60(void) -{ - return false; -} - -static bool errata_61(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - return false; -} - -static bool errata_67(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - return false; -} - -static bool errata_69(void) -{ - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Aul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - return false; -} - -#endif /* NRF51801_ERRATAS_H */ diff --git a/mdk/nrf51801_peripherals.h b/mdk/nrf51801_peripherals.h index 236ba27ea..a7f49d334 100644 --- a/mdk/nrf51801_peripherals.h +++ b/mdk/nrf51801_peripherals.h @@ -59,6 +59,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf51802_erratas.h b/mdk/nrf51802_erratas.h deleted file mode 100644 index 895aa3845..000000000 --- a/mdk/nrf51802_erratas.h +++ /dev/null @@ -1,635 +0,0 @@ -#ifndef NRF51802_ERRATAS_H -#define NRF51802_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_50(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_52(void) __UNUSED; -static bool errata_53(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_56(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_60(void) __UNUSED; -static bool errata_61(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_69(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_5(void) -{ - return false; -} - -static bool errata_6(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_13(void) -{ - return false; -} - -static bool errata_14(void) -{ - return false; -} - -static bool errata_15(void) -{ - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_18(void) -{ - return false; -} - -static bool errata_19(void) -{ - return false; -} - -static bool errata_20(void) -{ - return false; -} - -static bool errata_21(void) -{ - return false; -} - -static bool errata_22(void) -{ - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_45(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_50(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_52(void) -{ - return false; -} - -static bool errata_53(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - return false; -} - -static bool errata_56(void) -{ - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_59(void) -{ - return false; -} - -static bool errata_60(void) -{ - return false; -} - -static bool errata_61(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - return false; -} - -static bool errata_67(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - return false; -} - -static bool errata_69(void) -{ - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - return false; -} - -#endif /* NRF51802_ERRATAS_H */ diff --git a/mdk/nrf51802_peripherals.h b/mdk/nrf51802_peripherals.h index e90077acb..917c492ec 100644 --- a/mdk/nrf51802_peripherals.h +++ b/mdk/nrf51802_peripherals.h @@ -59,6 +59,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf51822_erratas.h b/mdk/nrf51822_erratas.h deleted file mode 100644 index bce388f72..000000000 --- a/mdk/nrf51822_erratas.h +++ /dev/null @@ -1,2993 +0,0 @@ -#ifndef NRF51822_ERRATAS_H -#define NRF51822_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_50(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_52(void) __UNUSED; -static bool errata_53(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_56(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_60(void) __UNUSED; -static bool errata_61(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_69(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; - -static bool errata_1(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_2(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_3(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_5(void) -{ - return false; -} - -static bool errata_6(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_7(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_8(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_9(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_10(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_11(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_12(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_13(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_14(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_17(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_18(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_19(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_21(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_22(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_24(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_25(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_28(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_29(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_30(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_33(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_34(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_35(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_40(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_41(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_42(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_43(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_44(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_45(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_46(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_48(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_49(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_50(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_52(void) -{ - return false; -} - -static bool errata_53(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_56(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_58(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_59(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_60(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_61(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_63(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_64(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_65(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_69(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_72(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_74(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_75(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -#endif /* NRF51822_ERRATAS_H */ diff --git a/mdk/nrf51822_peripherals.h b/mdk/nrf51822_peripherals.h index f13b20724..14025ded5 100644 --- a/mdk/nrf51822_peripherals.h +++ b/mdk/nrf51822_peripherals.h @@ -60,6 +60,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf51824_erratas.h b/mdk/nrf51824_erratas.h deleted file mode 100644 index d95f6013b..000000000 --- a/mdk/nrf51824_erratas.h +++ /dev/null @@ -1,743 +0,0 @@ -#ifndef NRF51824_ERRATAS_H -#define NRF51824_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_50(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_52(void) __UNUSED; -static bool errata_53(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_56(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_60(void) __UNUSED; -static bool errata_61(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_69(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_5(void) -{ - return false; -} - -static bool errata_6(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_13(void) -{ - return false; -} - -static bool errata_14(void) -{ - return false; -} - -static bool errata_15(void) -{ - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_18(void) -{ - return false; -} - -static bool errata_19(void) -{ - return false; -} - -static bool errata_20(void) -{ - return false; -} - -static bool errata_21(void) -{ - return false; -} - -static bool errata_22(void) -{ - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_45(void) -{ - return false; -} - -static bool errata_46(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_50(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_52(void) -{ - return false; -} - -static bool errata_53(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - return false; -} - -static bool errata_56(void) -{ - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_59(void) -{ - return false; -} - -static bool errata_60(void) -{ - return false; -} - -static bool errata_61(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - return false; -} - -static bool errata_69(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_72(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_74(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_75(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x07ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -#endif /* NRF51824_ERRATAS_H */ diff --git a/mdk/nrf51824_peripherals.h b/mdk/nrf51824_peripherals.h index b64eba091..415fc6a61 100644 --- a/mdk/nrf51824_peripherals.h +++ b/mdk/nrf51824_peripherals.h @@ -60,6 +60,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf51_erratas.h b/mdk/nrf51_erratas.h index 2f6b46742..9e6d253a0 100644 --- a/mdk/nrf51_erratas.h +++ b/mdk/nrf51_erratas.h @@ -37,3273 +37,3585 @@ POSSIBILITY OF SUCH DAMAGE. #include #include "compiler_abstraction.h" -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_50(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_52(void) __UNUSED; -static bool errata_53(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_56(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_60(void) __UNUSED; -static bool errata_61(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_69(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; - -static bool errata_1(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_2(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_3(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_5(void) -{ - return false; -} - -static bool errata_6(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_7(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_8(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_9(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_10(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_11(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_12(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_13(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_14(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_17(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_18(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_19(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_21(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_22(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_24(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_25(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_28(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_29(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_30(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_33(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_34(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_35(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_40(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_41(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_42(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_43(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_44(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_45(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_46(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_48(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_49(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_50(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_52(void) -{ - return false; -} - -static bool errata_53(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_56(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_58(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_59(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_60(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_61(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_63(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_64(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_65(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_69(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return false; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_72(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_74(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_75(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return true; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x07ul: - return false; - case 0x08ul: - return false; - case 0x09ul: - return false; - case 0x0Aul: - return true; - case 0x0Bul: - return false; - case 0x0Cul: - return false; - case 0x0Dul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x01: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x07ul: - return true; - case 0x08ul: - return true; - case 0x09ul: - return true; - case 0x0Aul: - return false; - case 0x0Bul: - return true; - case 0x0Cul: - return true; - case 0x0Dul: - return false; - default: - return false; - break; - } - break; - - } - - return false; +static bool nrf51_errata_1(void) __UNUSED; +static bool nrf51_errata_2(void) __UNUSED; +static bool nrf51_errata_3(void) __UNUSED; +static bool nrf51_errata_4(void) __UNUSED; +static bool nrf51_errata_5(void) __UNUSED; +static bool nrf51_errata_6(void) __UNUSED; +static bool nrf51_errata_7(void) __UNUSED; +static bool nrf51_errata_8(void) __UNUSED; +static bool nrf51_errata_9(void) __UNUSED; +static bool nrf51_errata_10(void) __UNUSED; +static bool nrf51_errata_11(void) __UNUSED; +static bool nrf51_errata_12(void) __UNUSED; +static bool nrf51_errata_13(void) __UNUSED; +static bool nrf51_errata_14(void) __UNUSED; +static bool nrf51_errata_15(void) __UNUSED; +static bool nrf51_errata_16(void) __UNUSED; +static bool nrf51_errata_17(void) __UNUSED; +static bool nrf51_errata_18(void) __UNUSED; +static bool nrf51_errata_19(void) __UNUSED; +static bool nrf51_errata_20(void) __UNUSED; +static bool nrf51_errata_21(void) __UNUSED; +static bool nrf51_errata_22(void) __UNUSED; +static bool nrf51_errata_23(void) __UNUSED; +static bool nrf51_errata_24(void) __UNUSED; +static bool nrf51_errata_25(void) __UNUSED; +static bool nrf51_errata_26(void) __UNUSED; +static bool nrf51_errata_27(void) __UNUSED; +static bool nrf51_errata_28(void) __UNUSED; +static bool nrf51_errata_29(void) __UNUSED; +static bool nrf51_errata_30(void) __UNUSED; +static bool nrf51_errata_31(void) __UNUSED; +static bool nrf51_errata_32(void) __UNUSED; +static bool nrf51_errata_33(void) __UNUSED; +static bool nrf51_errata_34(void) __UNUSED; +static bool nrf51_errata_35(void) __UNUSED; +static bool nrf51_errata_36(void) __UNUSED; +static bool nrf51_errata_37(void) __UNUSED; +static bool nrf51_errata_38(void) __UNUSED; +static bool nrf51_errata_39(void) __UNUSED; +static bool nrf51_errata_40(void) __UNUSED; +static bool nrf51_errata_41(void) __UNUSED; +static bool nrf51_errata_42(void) __UNUSED; +static bool nrf51_errata_43(void) __UNUSED; +static bool nrf51_errata_44(void) __UNUSED; +static bool nrf51_errata_45(void) __UNUSED; +static bool nrf51_errata_46(void) __UNUSED; +static bool nrf51_errata_47(void) __UNUSED; +static bool nrf51_errata_48(void) __UNUSED; +static bool nrf51_errata_49(void) __UNUSED; +static bool nrf51_errata_50(void) __UNUSED; +static bool nrf51_errata_51(void) __UNUSED; +static bool nrf51_errata_52(void) __UNUSED; +static bool nrf51_errata_53(void) __UNUSED; +static bool nrf51_errata_54(void) __UNUSED; +static bool nrf51_errata_55(void) __UNUSED; +static bool nrf51_errata_56(void) __UNUSED; +static bool nrf51_errata_57(void) __UNUSED; +static bool nrf51_errata_58(void) __UNUSED; +static bool nrf51_errata_59(void) __UNUSED; +static bool nrf51_errata_60(void) __UNUSED; +static bool nrf51_errata_61(void) __UNUSED; +static bool nrf51_errata_62(void) __UNUSED; +static bool nrf51_errata_63(void) __UNUSED; +static bool nrf51_errata_64(void) __UNUSED; +static bool nrf51_errata_65(void) __UNUSED; +static bool nrf51_errata_66(void) __UNUSED; +static bool nrf51_errata_67(void) __UNUSED; +static bool nrf51_errata_68(void) __UNUSED; +static bool nrf51_errata_69(void) __UNUSED; +static bool nrf51_errata_70(void) __UNUSED; +static bool nrf51_errata_71(void) __UNUSED; +static bool nrf51_errata_72(void) __UNUSED; +static bool nrf51_errata_73(void) __UNUSED; +static bool nrf51_errata_74(void) __UNUSED; +static bool nrf51_errata_75(void) __UNUSED; +static bool nrf51_errata_76(void) __UNUSED; +static bool nrf51_errata_77(void) __UNUSED; +static bool nrf51_errata_78(void) __UNUSED; + +static bool nrf51_errata_1(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_2(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_3(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_4(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_5(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_6(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_7(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_8(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_9(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_10(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_11(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_12(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_13(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_14(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_15(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_16(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_17(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_18(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_19(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_20(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_21(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_22(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_23(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_24(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_25(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_26(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_27(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_28(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_29(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_30(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_31(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_32(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_33(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_34(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_35(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_36(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_37(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_38(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return true; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_39(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_40(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_41(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_42(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_43(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_44(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_45(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_46(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_47(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_48(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_49(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_50(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_51(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_52(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_53(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_54(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_55(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_56(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_57(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_58(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_59(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_60(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_61(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return true; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_62(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_63(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_64(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_65(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_66(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_67(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return true; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_68(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_69(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_70(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return true; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_71(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return false; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_72(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return true; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_73(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_74(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_75(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return true; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_76(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x07ul: + return false; + case 0x08ul: + return false; + case 0x09ul: + return false; + case 0x0Aul: + return true; + case 0x0Bul: + return false; + case 0x0Cul: + return false; + case 0x0Dul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf51_errata_77(void) +{ + #ifndef NRF51_SERIES + return false; + #else + return false; + #endif +} + +static bool nrf51_errata_78(void) +{ + #ifndef NRF51_SERIES + return false; + #else + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF51422_XXAA) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAB) || defined (DEVELOP_IN_NRF51422)\ + || defined (NRF51422_XXAC) || defined (DEVELOP_IN_NRF51422) + if (var1 == 0x01) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x07ul: + return true; + case 0x08ul: + return true; + case 0x09ul: + return true; + case 0x0Aul: + return false; + case 0x0Bul: + return true; + case 0x0Cul: + return true; + case 0x0Dul: + return false; + } + } + #endif + return false; + #endif } #endif /* NRF51_ERRATAS_H */ diff --git a/mdk/nrf51_peripherals.h b/mdk/nrf51_peripherals.h index 31d3eab04..ff105930f 100644 --- a/mdk/nrf51_peripherals.h +++ b/mdk/nrf51_peripherals.h @@ -57,6 +57,7 @@ POSSIBILITY OF SUCH DAMAGE. #define GPIO_COUNT 1 #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf52.h b/mdk/nrf52.h index 43df03020..7663eaab9 100644 --- a/mdk/nrf52.h +++ b/mdk/nrf52.h @@ -30,10 +30,10 @@ * @file nrf52.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:33 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:30 * from File 'nrf52.svd', - * last modified on Friday, 25.10.2019 07:35:24 + * last modified on Friday, 17.01.2020 16:08:22 */ diff --git a/mdk/nrf52805.h b/mdk/nrf52805.h index 5d11ae099..7ade23cf6 100644 --- a/mdk/nrf52805.h +++ b/mdk/nrf52805.h @@ -30,10 +30,10 @@ * @file nrf52805.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:33 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:30 * from File 'nrf52805.svd', - * last modified on Friday, 25.10.2019 07:35:24 + * last modified on Friday, 17.01.2020 16:08:22 */ diff --git a/mdk/nrf52805_erratas.h b/mdk/nrf52805_erratas.h deleted file mode 100644 index 595bb5817..000000000 --- a/mdk/nrf52805_erratas.h +++ /dev/null @@ -1,1427 +0,0 @@ -#ifndef NRF52805_ERRATAS_H -#define NRF52805_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; -static bool errata_79(void) __UNUSED; -static bool errata_81(void) __UNUSED; -static bool errata_83(void) __UNUSED; -static bool errata_84(void) __UNUSED; -static bool errata_86(void) __UNUSED; -static bool errata_87(void) __UNUSED; -static bool errata_88(void) __UNUSED; -static bool errata_89(void) __UNUSED; -static bool errata_91(void) __UNUSED; -static bool errata_94(void) __UNUSED; -static bool errata_96(void) __UNUSED; -static bool errata_97(void) __UNUSED; -static bool errata_98(void) __UNUSED; -static bool errata_101(void) __UNUSED; -static bool errata_102(void) __UNUSED; -static bool errata_103(void) __UNUSED; -static bool errata_104(void) __UNUSED; -static bool errata_106(void) __UNUSED; -static bool errata_107(void) __UNUSED; -static bool errata_108(void) __UNUSED; -static bool errata_109(void) __UNUSED; -static bool errata_110(void) __UNUSED; -static bool errata_111(void) __UNUSED; -static bool errata_112(void) __UNUSED; -static bool errata_113(void) __UNUSED; -static bool errata_115(void) __UNUSED; -static bool errata_116(void) __UNUSED; -static bool errata_117(void) __UNUSED; -static bool errata_118(void) __UNUSED; -static bool errata_119(void) __UNUSED; -static bool errata_120(void) __UNUSED; -static bool errata_121(void) __UNUSED; -static bool errata_122(void) __UNUSED; -static bool errata_127(void) __UNUSED; -static bool errata_128(void) __UNUSED; -static bool errata_131(void) __UNUSED; -static bool errata_132(void) __UNUSED; -static bool errata_133(void) __UNUSED; -static bool errata_134(void) __UNUSED; -static bool errata_135(void) __UNUSED; -static bool errata_136(void) __UNUSED; -static bool errata_138(void) __UNUSED; -static bool errata_140(void) __UNUSED; -static bool errata_141(void) __UNUSED; -static bool errata_142(void) __UNUSED; -static bool errata_143(void) __UNUSED; -static bool errata_144(void) __UNUSED; -static bool errata_145(void) __UNUSED; -static bool errata_146(void) __UNUSED; -static bool errata_147(void) __UNUSED; -static bool errata_149(void) __UNUSED; -static bool errata_150(void) __UNUSED; -static bool errata_151(void) __UNUSED; -static bool errata_153(void) __UNUSED; -static bool errata_154(void) __UNUSED; -static bool errata_155(void) __UNUSED; -static bool errata_156(void) __UNUSED; -static bool errata_158(void) __UNUSED; -static bool errata_160(void) __UNUSED; -static bool errata_162(void) __UNUSED; -static bool errata_163(void) __UNUSED; -static bool errata_164(void) __UNUSED; -static bool errata_166(void) __UNUSED; -static bool errata_170(void) __UNUSED; -static bool errata_171(void) __UNUSED; -static bool errata_172(void) __UNUSED; -static bool errata_173(void) __UNUSED; -static bool errata_174(void) __UNUSED; -static bool errata_176(void) __UNUSED; -static bool errata_178(void) __UNUSED; -static bool errata_179(void) __UNUSED; -static bool errata_180(void) __UNUSED; -static bool errata_181(void) __UNUSED; -static bool errata_182(void) __UNUSED; -static bool errata_183(void) __UNUSED; -static bool errata_184(void) __UNUSED; -static bool errata_186(void) __UNUSED; -static bool errata_187(void) __UNUSED; -static bool errata_189(void) __UNUSED; -static bool errata_190(void) __UNUSED; -static bool errata_191(void) __UNUSED; -static bool errata_192(void) __UNUSED; -static bool errata_193(void) __UNUSED; -static bool errata_194(void) __UNUSED; -static bool errata_195(void) __UNUSED; -static bool errata_196(void) __UNUSED; -static bool errata_197(void) __UNUSED; -static bool errata_198(void) __UNUSED; -static bool errata_199(void) __UNUSED; -static bool errata_200(void) __UNUSED; -static bool errata_201(void) __UNUSED; -static bool errata_202(void) __UNUSED; -static bool errata_204(void) __UNUSED; -static bool errata_208(void) __UNUSED; -static bool errata_209(void) __UNUSED; -static bool errata_210(void) __UNUSED; -static bool errata_212(void) __UNUSED; -static bool errata_213(void) __UNUSED; -static bool errata_214(void) __UNUSED; -static bool errata_215(void) __UNUSED; -static bool errata_217(void) __UNUSED; -static bool errata_218(void) __UNUSED; -static bool errata_219(void) __UNUSED; -static bool errata_225(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_79(void) -{ - return false; -} - -static bool errata_81(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_83(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_84(void) -{ - return false; -} - -static bool errata_86(void) -{ - return false; -} - -static bool errata_87(void) -{ - return false; -} - -static bool errata_88(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_89(void) -{ - return false; -} - -static bool errata_91(void) -{ - return false; -} - -static bool errata_94(void) -{ - return false; -} - -static bool errata_96(void) -{ - return false; -} - -static bool errata_97(void) -{ - return false; -} - -static bool errata_98(void) -{ - return false; -} - -static bool errata_101(void) -{ - return false; -} - -static bool errata_102(void) -{ - return false; -} - -static bool errata_103(void) -{ - return false; -} - -static bool errata_104(void) -{ - return false; -} - -static bool errata_106(void) -{ - return false; -} - -static bool errata_107(void) -{ - return false; -} - -static bool errata_108(void) -{ - return false; -} - -static bool errata_109(void) -{ - return false; -} - -static bool errata_110(void) -{ - return false; -} - -static bool errata_111(void) -{ - return false; -} - -static bool errata_112(void) -{ - return false; -} - -static bool errata_113(void) -{ - return false; -} - -static bool errata_115(void) -{ - return false; -} - -static bool errata_116(void) -{ - return false; -} - -static bool errata_117(void) -{ - return false; -} - -static bool errata_118(void) -{ - return false; -} - -static bool errata_119(void) -{ - return false; -} - -static bool errata_120(void) -{ - return false; -} - -static bool errata_121(void) -{ - return false; -} - -static bool errata_122(void) -{ - return false; -} - -static bool errata_127(void) -{ - return false; -} - -static bool errata_128(void) -{ - return false; -} - -static bool errata_131(void) -{ - return false; -} - -static bool errata_132(void) -{ - return false; -} - -static bool errata_133(void) -{ - return false; -} - -static bool errata_134(void) -{ - return false; -} - -static bool errata_135(void) -{ - return false; -} - -static bool errata_136(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_138(void) -{ - return false; -} - -static bool errata_140(void) -{ - return false; -} - -static bool errata_141(void) -{ - return false; -} - -static bool errata_142(void) -{ - return false; -} - -static bool errata_143(void) -{ - return false; -} - -static bool errata_144(void) -{ - return false; -} - -static bool errata_145(void) -{ - return false; -} - -static bool errata_146(void) -{ - return false; -} - -static bool errata_147(void) -{ - return false; -} - -static bool errata_149(void) -{ - return false; -} - -static bool errata_150(void) -{ - return false; -} - -static bool errata_151(void) -{ - return false; -} - -static bool errata_153(void) -{ - return false; -} - -static bool errata_154(void) -{ - return false; -} - -static bool errata_155(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_156(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_158(void) -{ - return false; -} - -static bool errata_160(void) -{ - return false; -} - -static bool errata_162(void) -{ - return false; -} - -static bool errata_163(void) -{ - return false; -} - -static bool errata_164(void) -{ - return false; -} - -static bool errata_166(void) -{ - return false; -} - -static bool errata_170(void) -{ - return false; -} - -static bool errata_171(void) -{ - return false; -} - -static bool errata_172(void) -{ - return false; -} - -static bool errata_173(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_174(void) -{ - return false; -} - -static bool errata_176(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_178(void) -{ - return false; -} - -static bool errata_179(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_180(void) -{ - return false; -} - -static bool errata_181(void) -{ - return false; -} - -static bool errata_182(void) -{ - return false; -} - -static bool errata_183(void) -{ - return false; -} - -static bool errata_184(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_186(void) -{ - return false; -} - -static bool errata_187(void) -{ - return false; -} - -static bool errata_189(void) -{ - return false; -} - -static bool errata_190(void) -{ - return false; -} - -static bool errata_191(void) -{ - return false; -} - -static bool errata_192(void) -{ - return false; -} - -static bool errata_193(void) -{ - return false; -} - -static bool errata_194(void) -{ - return false; -} - -static bool errata_195(void) -{ - return false; -} - -static bool errata_196(void) -{ - return false; -} - -static bool errata_197(void) -{ - return false; -} - -static bool errata_198(void) -{ - return false; -} - -static bool errata_199(void) -{ - return false; -} - -static bool errata_200(void) -{ - return false; -} - -static bool errata_201(void) -{ - return false; -} - -static bool errata_202(void) -{ - return false; -} - -static bool errata_204(void) -{ - return false; -} - -static bool errata_208(void) -{ - return false; -} - -static bool errata_209(void) -{ - return false; -} - -static bool errata_210(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_212(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_213(void) -{ - return false; -} - -static bool errata_214(void) -{ - return false; -} - -static bool errata_215(void) -{ - return false; -} - -static bool errata_217(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_218(void) -{ - return false; -} - -static bool errata_219(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0F: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_225(void) -{ - return false; -} - -#endif /* NRF52805_ERRATAS_H */ diff --git a/mdk/nrf52805_peripherals.h b/mdk/nrf52805_peripherals.h index 4f7a50b27..f36f0c1a8 100644 --- a/mdk/nrf52805_peripherals.h +++ b/mdk/nrf52805_peripherals.h @@ -63,6 +63,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf52810.h b/mdk/nrf52810.h index 761890cbc..64230bc4d 100644 --- a/mdk/nrf52810.h +++ b/mdk/nrf52810.h @@ -30,10 +30,10 @@ * @file nrf52810.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:33 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:30 * from File 'nrf52810.svd', - * last modified on Friday, 25.10.2019 07:35:25 + * last modified on Friday, 17.01.2020 16:08:23 */ diff --git a/mdk/nrf52810_erratas.h b/mdk/nrf52810_erratas.h deleted file mode 100644 index 2d3628a7f..000000000 --- a/mdk/nrf52810_erratas.h +++ /dev/null @@ -1,1611 +0,0 @@ -#ifndef NRF52810_ERRATAS_H -#define NRF52810_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; -static bool errata_79(void) __UNUSED; -static bool errata_81(void) __UNUSED; -static bool errata_83(void) __UNUSED; -static bool errata_84(void) __UNUSED; -static bool errata_86(void) __UNUSED; -static bool errata_87(void) __UNUSED; -static bool errata_88(void) __UNUSED; -static bool errata_89(void) __UNUSED; -static bool errata_91(void) __UNUSED; -static bool errata_94(void) __UNUSED; -static bool errata_96(void) __UNUSED; -static bool errata_97(void) __UNUSED; -static bool errata_98(void) __UNUSED; -static bool errata_101(void) __UNUSED; -static bool errata_102(void) __UNUSED; -static bool errata_103(void) __UNUSED; -static bool errata_104(void) __UNUSED; -static bool errata_106(void) __UNUSED; -static bool errata_107(void) __UNUSED; -static bool errata_108(void) __UNUSED; -static bool errata_109(void) __UNUSED; -static bool errata_110(void) __UNUSED; -static bool errata_111(void) __UNUSED; -static bool errata_112(void) __UNUSED; -static bool errata_113(void) __UNUSED; -static bool errata_115(void) __UNUSED; -static bool errata_116(void) __UNUSED; -static bool errata_117(void) __UNUSED; -static bool errata_118(void) __UNUSED; -static bool errata_119(void) __UNUSED; -static bool errata_120(void) __UNUSED; -static bool errata_121(void) __UNUSED; -static bool errata_122(void) __UNUSED; -static bool errata_127(void) __UNUSED; -static bool errata_128(void) __UNUSED; -static bool errata_131(void) __UNUSED; -static bool errata_132(void) __UNUSED; -static bool errata_133(void) __UNUSED; -static bool errata_134(void) __UNUSED; -static bool errata_135(void) __UNUSED; -static bool errata_136(void) __UNUSED; -static bool errata_138(void) __UNUSED; -static bool errata_140(void) __UNUSED; -static bool errata_141(void) __UNUSED; -static bool errata_142(void) __UNUSED; -static bool errata_143(void) __UNUSED; -static bool errata_144(void) __UNUSED; -static bool errata_145(void) __UNUSED; -static bool errata_146(void) __UNUSED; -static bool errata_147(void) __UNUSED; -static bool errata_149(void) __UNUSED; -static bool errata_150(void) __UNUSED; -static bool errata_151(void) __UNUSED; -static bool errata_153(void) __UNUSED; -static bool errata_154(void) __UNUSED; -static bool errata_155(void) __UNUSED; -static bool errata_156(void) __UNUSED; -static bool errata_158(void) __UNUSED; -static bool errata_160(void) __UNUSED; -static bool errata_162(void) __UNUSED; -static bool errata_163(void) __UNUSED; -static bool errata_164(void) __UNUSED; -static bool errata_166(void) __UNUSED; -static bool errata_170(void) __UNUSED; -static bool errata_171(void) __UNUSED; -static bool errata_172(void) __UNUSED; -static bool errata_173(void) __UNUSED; -static bool errata_174(void) __UNUSED; -static bool errata_176(void) __UNUSED; -static bool errata_178(void) __UNUSED; -static bool errata_179(void) __UNUSED; -static bool errata_180(void) __UNUSED; -static bool errata_181(void) __UNUSED; -static bool errata_182(void) __UNUSED; -static bool errata_183(void) __UNUSED; -static bool errata_184(void) __UNUSED; -static bool errata_186(void) __UNUSED; -static bool errata_187(void) __UNUSED; -static bool errata_189(void) __UNUSED; -static bool errata_190(void) __UNUSED; -static bool errata_191(void) __UNUSED; -static bool errata_192(void) __UNUSED; -static bool errata_193(void) __UNUSED; -static bool errata_194(void) __UNUSED; -static bool errata_195(void) __UNUSED; -static bool errata_196(void) __UNUSED; -static bool errata_197(void) __UNUSED; -static bool errata_198(void) __UNUSED; -static bool errata_199(void) __UNUSED; -static bool errata_200(void) __UNUSED; -static bool errata_201(void) __UNUSED; -static bool errata_202(void) __UNUSED; -static bool errata_204(void) __UNUSED; -static bool errata_208(void) __UNUSED; -static bool errata_209(void) __UNUSED; -static bool errata_210(void) __UNUSED; -static bool errata_212(void) __UNUSED; -static bool errata_213(void) __UNUSED; -static bool errata_214(void) __UNUSED; -static bool errata_215(void) __UNUSED; -static bool errata_217(void) __UNUSED; -static bool errata_218(void) __UNUSED; -static bool errata_219(void) __UNUSED; -static bool errata_225(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_79(void) -{ - return false; -} - -static bool errata_81(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_83(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_84(void) -{ - return false; -} - -static bool errata_86(void) -{ - return false; -} - -static bool errata_87(void) -{ - return false; -} - -static bool errata_88(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_89(void) -{ - return false; -} - -static bool errata_91(void) -{ - return false; -} - -static bool errata_94(void) -{ - return false; -} - -static bool errata_96(void) -{ - return false; -} - -static bool errata_97(void) -{ - return false; -} - -static bool errata_98(void) -{ - return false; -} - -static bool errata_101(void) -{ - return false; -} - -static bool errata_102(void) -{ - return false; -} - -static bool errata_103(void) -{ - return false; -} - -static bool errata_104(void) -{ - return false; -} - -static bool errata_106(void) -{ - return false; -} - -static bool errata_107(void) -{ - return false; -} - -static bool errata_108(void) -{ - return false; -} - -static bool errata_109(void) -{ - return false; -} - -static bool errata_110(void) -{ - return false; -} - -static bool errata_111(void) -{ - return false; -} - -static bool errata_112(void) -{ - return false; -} - -static bool errata_113(void) -{ - return false; -} - -static bool errata_115(void) -{ - return false; -} - -static bool errata_116(void) -{ - return false; -} - -static bool errata_117(void) -{ - return false; -} - -static bool errata_118(void) -{ - return false; -} - -static bool errata_119(void) -{ - return false; -} - -static bool errata_120(void) -{ - return false; -} - -static bool errata_121(void) -{ - return false; -} - -static bool errata_122(void) -{ - return false; -} - -static bool errata_127(void) -{ - return false; -} - -static bool errata_128(void) -{ - return false; -} - -static bool errata_131(void) -{ - return false; -} - -static bool errata_132(void) -{ - return false; -} - -static bool errata_133(void) -{ - return false; -} - -static bool errata_134(void) -{ - return false; -} - -static bool errata_135(void) -{ - return false; -} - -static bool errata_136(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_138(void) -{ - return false; -} - -static bool errata_140(void) -{ - return false; -} - -static bool errata_141(void) -{ - return false; -} - -static bool errata_142(void) -{ - return false; -} - -static bool errata_143(void) -{ - return false; -} - -static bool errata_144(void) -{ - return false; -} - -static bool errata_145(void) -{ - return false; -} - -static bool errata_146(void) -{ - return false; -} - -static bool errata_147(void) -{ - return false; -} - -static bool errata_149(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_150(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_151(void) -{ - return false; -} - -static bool errata_153(void) -{ - return false; -} - -static bool errata_154(void) -{ - return false; -} - -static bool errata_155(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_156(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_158(void) -{ - return false; -} - -static bool errata_160(void) -{ - return false; -} - -static bool errata_162(void) -{ - return false; -} - -static bool errata_163(void) -{ - return false; -} - -static bool errata_164(void) -{ - return false; -} - -static bool errata_166(void) -{ - return false; -} - -static bool errata_170(void) -{ - return false; -} - -static bool errata_171(void) -{ - return false; -} - -static bool errata_172(void) -{ - return false; -} - -static bool errata_173(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_174(void) -{ - return false; -} - -static bool errata_176(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_178(void) -{ - return false; -} - -static bool errata_179(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_180(void) -{ - return false; -} - -static bool errata_181(void) -{ - return false; -} - -static bool errata_182(void) -{ - return false; -} - -static bool errata_183(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_184(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_186(void) -{ - return false; -} - -static bool errata_187(void) -{ - return false; -} - -static bool errata_189(void) -{ - return false; -} - -static bool errata_190(void) -{ - return false; -} - -static bool errata_191(void) -{ - return false; -} - -static bool errata_192(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_193(void) -{ - return false; -} - -static bool errata_194(void) -{ - return false; -} - -static bool errata_195(void) -{ - return false; -} - -static bool errata_196(void) -{ - return false; -} - -static bool errata_197(void) -{ - return false; -} - -static bool errata_198(void) -{ - return false; -} - -static bool errata_199(void) -{ - return false; -} - -static bool errata_200(void) -{ - return false; -} - -static bool errata_201(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_202(void) -{ - return false; -} - -static bool errata_204(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_208(void) -{ - return false; -} - -static bool errata_209(void) -{ - return false; -} - -static bool errata_210(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_212(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_213(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_214(void) -{ - return false; -} - -static bool errata_215(void) -{ - return false; -} - -static bool errata_217(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_218(void) -{ - return false; -} - -static bool errata_219(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0A: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_225(void) -{ - return false; -} - -#endif /* NRF52810_ERRATAS_H */ diff --git a/mdk/nrf52810_peripherals.h b/mdk/nrf52810_peripherals.h index bee437cbf..3db16d9c6 100644 --- a/mdk/nrf52810_peripherals.h +++ b/mdk/nrf52810_peripherals.h @@ -63,6 +63,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf52811.h b/mdk/nrf52811.h index 625229026..65272e165 100644 --- a/mdk/nrf52811.h +++ b/mdk/nrf52811.h @@ -30,10 +30,10 @@ * @file nrf52811.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:33 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:30 * from File 'nrf52811.svd', - * last modified on Friday, 25.10.2019 07:35:25 + * last modified on Friday, 17.01.2020 16:08:23 */ diff --git a/mdk/nrf52811_erratas.h b/mdk/nrf52811_erratas.h deleted file mode 100644 index d6caa4406..000000000 --- a/mdk/nrf52811_erratas.h +++ /dev/null @@ -1,1481 +0,0 @@ -#ifndef NRF52811_ERRATAS_H -#define NRF52811_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; -static bool errata_79(void) __UNUSED; -static bool errata_81(void) __UNUSED; -static bool errata_83(void) __UNUSED; -static bool errata_84(void) __UNUSED; -static bool errata_86(void) __UNUSED; -static bool errata_87(void) __UNUSED; -static bool errata_88(void) __UNUSED; -static bool errata_89(void) __UNUSED; -static bool errata_91(void) __UNUSED; -static bool errata_94(void) __UNUSED; -static bool errata_96(void) __UNUSED; -static bool errata_97(void) __UNUSED; -static bool errata_98(void) __UNUSED; -static bool errata_101(void) __UNUSED; -static bool errata_102(void) __UNUSED; -static bool errata_103(void) __UNUSED; -static bool errata_104(void) __UNUSED; -static bool errata_106(void) __UNUSED; -static bool errata_107(void) __UNUSED; -static bool errata_108(void) __UNUSED; -static bool errata_109(void) __UNUSED; -static bool errata_110(void) __UNUSED; -static bool errata_111(void) __UNUSED; -static bool errata_112(void) __UNUSED; -static bool errata_113(void) __UNUSED; -static bool errata_115(void) __UNUSED; -static bool errata_116(void) __UNUSED; -static bool errata_117(void) __UNUSED; -static bool errata_118(void) __UNUSED; -static bool errata_119(void) __UNUSED; -static bool errata_120(void) __UNUSED; -static bool errata_121(void) __UNUSED; -static bool errata_122(void) __UNUSED; -static bool errata_127(void) __UNUSED; -static bool errata_128(void) __UNUSED; -static bool errata_131(void) __UNUSED; -static bool errata_132(void) __UNUSED; -static bool errata_133(void) __UNUSED; -static bool errata_134(void) __UNUSED; -static bool errata_135(void) __UNUSED; -static bool errata_136(void) __UNUSED; -static bool errata_138(void) __UNUSED; -static bool errata_140(void) __UNUSED; -static bool errata_141(void) __UNUSED; -static bool errata_142(void) __UNUSED; -static bool errata_143(void) __UNUSED; -static bool errata_144(void) __UNUSED; -static bool errata_145(void) __UNUSED; -static bool errata_146(void) __UNUSED; -static bool errata_147(void) __UNUSED; -static bool errata_149(void) __UNUSED; -static bool errata_150(void) __UNUSED; -static bool errata_151(void) __UNUSED; -static bool errata_153(void) __UNUSED; -static bool errata_154(void) __UNUSED; -static bool errata_155(void) __UNUSED; -static bool errata_156(void) __UNUSED; -static bool errata_158(void) __UNUSED; -static bool errata_160(void) __UNUSED; -static bool errata_162(void) __UNUSED; -static bool errata_163(void) __UNUSED; -static bool errata_164(void) __UNUSED; -static bool errata_166(void) __UNUSED; -static bool errata_170(void) __UNUSED; -static bool errata_171(void) __UNUSED; -static bool errata_172(void) __UNUSED; -static bool errata_173(void) __UNUSED; -static bool errata_174(void) __UNUSED; -static bool errata_176(void) __UNUSED; -static bool errata_178(void) __UNUSED; -static bool errata_179(void) __UNUSED; -static bool errata_180(void) __UNUSED; -static bool errata_181(void) __UNUSED; -static bool errata_182(void) __UNUSED; -static bool errata_183(void) __UNUSED; -static bool errata_184(void) __UNUSED; -static bool errata_186(void) __UNUSED; -static bool errata_187(void) __UNUSED; -static bool errata_189(void) __UNUSED; -static bool errata_190(void) __UNUSED; -static bool errata_191(void) __UNUSED; -static bool errata_192(void) __UNUSED; -static bool errata_193(void) __UNUSED; -static bool errata_194(void) __UNUSED; -static bool errata_195(void) __UNUSED; -static bool errata_196(void) __UNUSED; -static bool errata_197(void) __UNUSED; -static bool errata_198(void) __UNUSED; -static bool errata_199(void) __UNUSED; -static bool errata_200(void) __UNUSED; -static bool errata_201(void) __UNUSED; -static bool errata_202(void) __UNUSED; -static bool errata_204(void) __UNUSED; -static bool errata_208(void) __UNUSED; -static bool errata_209(void) __UNUSED; -static bool errata_210(void) __UNUSED; -static bool errata_212(void) __UNUSED; -static bool errata_213(void) __UNUSED; -static bool errata_214(void) __UNUSED; -static bool errata_215(void) __UNUSED; -static bool errata_217(void) __UNUSED; -static bool errata_218(void) __UNUSED; -static bool errata_219(void) __UNUSED; -static bool errata_225(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_79(void) -{ - return false; -} - -static bool errata_81(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_83(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_84(void) -{ - return false; -} - -static bool errata_86(void) -{ - return false; -} - -static bool errata_87(void) -{ - return false; -} - -static bool errata_88(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_89(void) -{ - return false; -} - -static bool errata_91(void) -{ - return false; -} - -static bool errata_94(void) -{ - return false; -} - -static bool errata_96(void) -{ - return false; -} - -static bool errata_97(void) -{ - return false; -} - -static bool errata_98(void) -{ - return false; -} - -static bool errata_101(void) -{ - return false; -} - -static bool errata_102(void) -{ - return false; -} - -static bool errata_103(void) -{ - return false; -} - -static bool errata_104(void) -{ - return false; -} - -static bool errata_106(void) -{ - return false; -} - -static bool errata_107(void) -{ - return false; -} - -static bool errata_108(void) -{ - return false; -} - -static bool errata_109(void) -{ - return false; -} - -static bool errata_110(void) -{ - return false; -} - -static bool errata_111(void) -{ - return false; -} - -static bool errata_112(void) -{ - return false; -} - -static bool errata_113(void) -{ - return false; -} - -static bool errata_115(void) -{ - return false; -} - -static bool errata_116(void) -{ - return false; -} - -static bool errata_117(void) -{ - return false; -} - -static bool errata_118(void) -{ - return false; -} - -static bool errata_119(void) -{ - return false; -} - -static bool errata_120(void) -{ - return false; -} - -static bool errata_121(void) -{ - return false; -} - -static bool errata_122(void) -{ - return false; -} - -static bool errata_127(void) -{ - return false; -} - -static bool errata_128(void) -{ - return false; -} - -static bool errata_131(void) -{ - return false; -} - -static bool errata_132(void) -{ - return false; -} - -static bool errata_133(void) -{ - return false; -} - -static bool errata_134(void) -{ - return false; -} - -static bool errata_135(void) -{ - return false; -} - -static bool errata_136(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_138(void) -{ - return false; -} - -static bool errata_140(void) -{ - return false; -} - -static bool errata_141(void) -{ - return false; -} - -static bool errata_142(void) -{ - return false; -} - -static bool errata_143(void) -{ - return false; -} - -static bool errata_144(void) -{ - return false; -} - -static bool errata_145(void) -{ - return false; -} - -static bool errata_146(void) -{ - return false; -} - -static bool errata_147(void) -{ - return false; -} - -static bool errata_149(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_150(void) -{ - return false; -} - -static bool errata_151(void) -{ - return false; -} - -static bool errata_153(void) -{ - return false; -} - -static bool errata_154(void) -{ - return false; -} - -static bool errata_155(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_156(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_158(void) -{ - return false; -} - -static bool errata_160(void) -{ - return false; -} - -static bool errata_162(void) -{ - return false; -} - -static bool errata_163(void) -{ - return false; -} - -static bool errata_164(void) -{ - return false; -} - -static bool errata_166(void) -{ - return false; -} - -static bool errata_170(void) -{ - return false; -} - -static bool errata_171(void) -{ - return false; -} - -static bool errata_172(void) -{ - return false; -} - -static bool errata_173(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_174(void) -{ - return false; -} - -static bool errata_176(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_178(void) -{ - return false; -} - -static bool errata_179(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_180(void) -{ - return false; -} - -static bool errata_181(void) -{ - return false; -} - -static bool errata_182(void) -{ - return false; -} - -static bool errata_183(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_184(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_186(void) -{ - return false; -} - -static bool errata_187(void) -{ - return false; -} - -static bool errata_189(void) -{ - return false; -} - -static bool errata_190(void) -{ - return false; -} - -static bool errata_191(void) -{ - return false; -} - -static bool errata_192(void) -{ - return false; -} - -static bool errata_193(void) -{ - return false; -} - -static bool errata_194(void) -{ - return false; -} - -static bool errata_195(void) -{ - return false; -} - -static bool errata_196(void) -{ - return false; -} - -static bool errata_197(void) -{ - return false; -} - -static bool errata_198(void) -{ - return false; -} - -static bool errata_199(void) -{ - return false; -} - -static bool errata_200(void) -{ - return false; -} - -static bool errata_201(void) -{ - return false; -} - -static bool errata_202(void) -{ - return false; -} - -static bool errata_204(void) -{ - return false; -} - -static bool errata_208(void) -{ - return false; -} - -static bool errata_209(void) -{ - return false; -} - -static bool errata_210(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_212(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_213(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_214(void) -{ - return false; -} - -static bool errata_215(void) -{ - return false; -} - -static bool errata_217(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_218(void) -{ - return false; -} - -static bool errata_219(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0E: - switch(var2) - { - case 0x00ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_225(void) -{ - return false; -} - -#endif /* NRF52811_ERRATAS_H */ diff --git a/mdk/nrf52811_peripherals.h b/mdk/nrf52811_peripherals.h index 6df3cfcaa..e2c8c6e95 100644 --- a/mdk/nrf52811_peripherals.h +++ b/mdk/nrf52811_peripherals.h @@ -63,6 +63,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT @@ -74,6 +76,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_COUNT 1 #define RADIO_EASYDMA_MAXCNT_SIZE 8 +#define RADIO_FEATURE_IEEE_802_15_4_PRESENT /* Accelerated Address Resolver */ #define AAR_PRESENT diff --git a/mdk/nrf52832_erratas.h b/mdk/nrf52832_erratas.h deleted file mode 100644 index aa73dd6db..000000000 --- a/mdk/nrf52832_erratas.h +++ /dev/null @@ -1,4268 +0,0 @@ -#ifndef NRF52832_ERRATAS_H -#define NRF52832_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; -static bool errata_79(void) __UNUSED; -static bool errata_81(void) __UNUSED; -static bool errata_83(void) __UNUSED; -static bool errata_84(void) __UNUSED; -static bool errata_86(void) __UNUSED; -static bool errata_87(void) __UNUSED; -static bool errata_88(void) __UNUSED; -static bool errata_89(void) __UNUSED; -static bool errata_91(void) __UNUSED; -static bool errata_94(void) __UNUSED; -static bool errata_96(void) __UNUSED; -static bool errata_97(void) __UNUSED; -static bool errata_98(void) __UNUSED; -static bool errata_101(void) __UNUSED; -static bool errata_102(void) __UNUSED; -static bool errata_103(void) __UNUSED; -static bool errata_104(void) __UNUSED; -static bool errata_106(void) __UNUSED; -static bool errata_107(void) __UNUSED; -static bool errata_108(void) __UNUSED; -static bool errata_109(void) __UNUSED; -static bool errata_110(void) __UNUSED; -static bool errata_111(void) __UNUSED; -static bool errata_112(void) __UNUSED; -static bool errata_113(void) __UNUSED; -static bool errata_115(void) __UNUSED; -static bool errata_116(void) __UNUSED; -static bool errata_117(void) __UNUSED; -static bool errata_118(void) __UNUSED; -static bool errata_119(void) __UNUSED; -static bool errata_120(void) __UNUSED; -static bool errata_121(void) __UNUSED; -static bool errata_122(void) __UNUSED; -static bool errata_127(void) __UNUSED; -static bool errata_128(void) __UNUSED; -static bool errata_131(void) __UNUSED; -static bool errata_132(void) __UNUSED; -static bool errata_133(void) __UNUSED; -static bool errata_134(void) __UNUSED; -static bool errata_135(void) __UNUSED; -static bool errata_136(void) __UNUSED; -static bool errata_138(void) __UNUSED; -static bool errata_140(void) __UNUSED; -static bool errata_141(void) __UNUSED; -static bool errata_142(void) __UNUSED; -static bool errata_143(void) __UNUSED; -static bool errata_144(void) __UNUSED; -static bool errata_145(void) __UNUSED; -static bool errata_146(void) __UNUSED; -static bool errata_147(void) __UNUSED; -static bool errata_149(void) __UNUSED; -static bool errata_150(void) __UNUSED; -static bool errata_151(void) __UNUSED; -static bool errata_153(void) __UNUSED; -static bool errata_154(void) __UNUSED; -static bool errata_155(void) __UNUSED; -static bool errata_156(void) __UNUSED; -static bool errata_158(void) __UNUSED; -static bool errata_160(void) __UNUSED; -static bool errata_162(void) __UNUSED; -static bool errata_163(void) __UNUSED; -static bool errata_164(void) __UNUSED; -static bool errata_166(void) __UNUSED; -static bool errata_170(void) __UNUSED; -static bool errata_171(void) __UNUSED; -static bool errata_172(void) __UNUSED; -static bool errata_173(void) __UNUSED; -static bool errata_174(void) __UNUSED; -static bool errata_176(void) __UNUSED; -static bool errata_178(void) __UNUSED; -static bool errata_179(void) __UNUSED; -static bool errata_180(void) __UNUSED; -static bool errata_181(void) __UNUSED; -static bool errata_182(void) __UNUSED; -static bool errata_183(void) __UNUSED; -static bool errata_184(void) __UNUSED; -static bool errata_186(void) __UNUSED; -static bool errata_187(void) __UNUSED; -static bool errata_189(void) __UNUSED; -static bool errata_190(void) __UNUSED; -static bool errata_191(void) __UNUSED; -static bool errata_192(void) __UNUSED; -static bool errata_193(void) __UNUSED; -static bool errata_194(void) __UNUSED; -static bool errata_195(void) __UNUSED; -static bool errata_196(void) __UNUSED; -static bool errata_197(void) __UNUSED; -static bool errata_198(void) __UNUSED; -static bool errata_199(void) __UNUSED; -static bool errata_200(void) __UNUSED; -static bool errata_201(void) __UNUSED; -static bool errata_202(void) __UNUSED; -static bool errata_204(void) __UNUSED; -static bool errata_208(void) __UNUSED; -static bool errata_209(void) __UNUSED; -static bool errata_210(void) __UNUSED; -static bool errata_212(void) __UNUSED; -static bool errata_213(void) __UNUSED; -static bool errata_214(void) __UNUSED; -static bool errata_215(void) __UNUSED; -static bool errata_217(void) __UNUSED; -static bool errata_218(void) __UNUSED; -static bool errata_219(void) __UNUSED; -static bool errata_225(void) __UNUSED; - -static bool errata_1(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_2(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_3(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_4(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_7(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_8(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_9(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_10(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_11(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_12(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_17(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_24(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_25(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_28(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_29(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_30(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_31(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_33(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_34(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_35(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_36(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_38(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_39(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_40(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_41(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_42(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_43(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_44(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_46(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_48(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_49(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_51(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_54(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_55(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_58(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_63(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_64(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_65(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_66(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_68(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_71(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_72(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_73(void) -{ - uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return false; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_74(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_75(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_76(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_77(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_78(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_79(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_81(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_83(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_84(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_86(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_87(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_88(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_89(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_91(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_94(void) -{ - return false; -} - -static bool errata_96(void) -{ - return false; -} - -static bool errata_97(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_98(void) -{ - return false; -} - -static bool errata_101(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_102(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_103(void) -{ - return false; -} - -static bool errata_104(void) -{ - return false; -} - -static bool errata_106(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_107(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_108(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_109(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_110(void) -{ - return false; -} - -static bool errata_111(void) -{ - return false; -} - -static bool errata_112(void) -{ - return false; -} - -static bool errata_113(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_115(void) -{ - return false; -} - -static bool errata_116(void) -{ - return false; -} - -static bool errata_117(void) -{ - return false; -} - -static bool errata_118(void) -{ - return false; -} - -static bool errata_119(void) -{ - return false; -} - -static bool errata_120(void) -{ - return false; -} - -static bool errata_121(void) -{ - return false; -} - -static bool errata_122(void) -{ - return false; -} - -static bool errata_127(void) -{ - return false; -} - -static bool errata_128(void) -{ - return false; -} - -static bool errata_131(void) -{ - return false; -} - -static bool errata_132(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_133(void) -{ - return false; -} - -static bool errata_134(void) -{ - return false; -} - -static bool errata_135(void) -{ - return false; -} - -static bool errata_136(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_138(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_140(void) -{ - return false; -} - -static bool errata_141(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_142(void) -{ - return false; -} - -static bool errata_143(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_144(void) -{ - return false; -} - -static bool errata_145(void) -{ - return false; -} - -static bool errata_146(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_147(void) -{ - return false; -} - -static bool errata_149(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_150(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_151(void) -{ - return false; -} - -static bool errata_153(void) -{ - return false; -} - -static bool errata_154(void) -{ - return false; -} - -static bool errata_155(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_156(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_158(void) -{ - return false; -} - -static bool errata_160(void) -{ - return false; -} - -static bool errata_162(void) -{ - return false; -} - -static bool errata_163(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_164(void) -{ - return false; -} - -static bool errata_166(void) -{ - return false; -} - -static bool errata_170(void) -{ - return false; -} - -static bool errata_171(void) -{ - return false; -} - -static bool errata_172(void) -{ - return false; -} - -static bool errata_173(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_174(void) -{ - return false; -} - -static bool errata_176(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_178(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_179(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_180(void) -{ - return false; -} - -static bool errata_181(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_182(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return false; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_183(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_184(void) -{ - return false; -} - -static bool errata_186(void) -{ - return false; -} - -static bool errata_187(void) -{ - return false; -} - -static bool errata_189(void) -{ - return false; -} - -static bool errata_190(void) -{ - return false; -} - -static bool errata_191(void) -{ - return false; -} - -static bool errata_192(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_193(void) -{ - return false; -} - -static bool errata_194(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_195(void) -{ - return false; -} - -static bool errata_196(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_197(void) -{ - return false; -} - -static bool errata_198(void) -{ - return false; -} - -static bool errata_199(void) -{ - return false; -} - -static bool errata_200(void) -{ - return false; -} - -static bool errata_201(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_202(void) -{ - return false; -} - -static bool errata_204(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_208(void) -{ - return false; -} - -static bool errata_209(void) -{ - return false; -} - -static bool errata_210(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_212(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_213(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return true; - case 0x04ul: - return true; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_214(void) -{ - return false; -} - -static bool errata_215(void) -{ - return false; -} - -static bool errata_217(void) -{ - return false; -} - -static bool errata_218(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_219(void) -{ - uint32_t var1; - uint32_t var2; - - if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) - { - var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); - var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; - } - else - { - var1 = *(uint32_t *)0x10000130ul; - var2 = *(uint32_t *)0x10000134ul; - } - - switch(var1) - { - case 0x06: - switch(var2) - { - case 0x03ul: - return false; - case 0x04ul: - return false; - case 0x05ul: - return true; - case 0x06ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_225(void) -{ - return false; -} - -#endif /* NRF52832_ERRATAS_H */ diff --git a/mdk/nrf52832_peripherals.h b/mdk/nrf52832_peripherals.h index 85c965f67..a1e22821d 100644 --- a/mdk/nrf52832_peripherals.h +++ b/mdk/nrf52832_peripherals.h @@ -73,6 +73,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* MPU and BPROT */ #define BPROT_PRESENT diff --git a/mdk/nrf52833.h b/mdk/nrf52833.h index 49966598c..e557fb518 100644 --- a/mdk/nrf52833.h +++ b/mdk/nrf52833.h @@ -30,10 +30,10 @@ * @file nrf52833.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:33 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:30 * from File 'nrf52833.svd', - * last modified on Friday, 25.10.2019 07:35:25 + * last modified on Friday, 17.01.2020 16:08:23 */ @@ -1093,8 +1093,10 @@ typedef struct { /*!< (@ 0x40001000) RADIO Struct __IOM uint32_t EVENTS_RXREADY; /*!< (@ 0x00000158) RADIO has ramped up and is ready to be started RX path */ __IOM uint32_t EVENTS_MHRMATCH; /*!< (@ 0x0000015C) MAC header match found */ - __IM uint32_t RESERVED3[3]; - __IOM uint32_t EVENTS_PHYEND; /*!< (@ 0x0000016C) Generated when last bit is sent on air */ + __IM uint32_t RESERVED3[2]; + __IOM uint32_t EVENTS_SYNC; /*!< (@ 0x00000168) Preamble indicator */ + __IOM uint32_t EVENTS_PHYEND; /*!< (@ 0x0000016C) Generated when last bit is sent on air, or received + from air */ __IOM uint32_t EVENTS_CTEPRESENT; /*!< (@ 0x00000170) CTE is present (early warning right after receiving CTEInfo byte) */ __IM uint32_t RESERVED4[35]; @@ -1150,7 +1152,7 @@ typedef struct { /*!< (@ 0x40001000) RADIO Struct __IM uint32_t RESERVED16[3]; __IOM uint32_t SFD; /*!< (@ 0x00000660) IEEE 802.15.4 start of frame delimiter */ __IOM uint32_t EDCNT; /*!< (@ 0x00000664) IEEE 802.15.4 energy detect loop count */ - __IOM uint32_t EDSAMPLE; /*!< (@ 0x00000668) IEEE 802.15.4 energy detect level */ + __IM uint32_t EDSAMPLE; /*!< (@ 0x00000668) IEEE 802.15.4 energy detect level */ __IOM uint32_t CCACTRL; /*!< (@ 0x0000066C) IEEE 802.15.4 clear channel assessment control */ __IM uint32_t RESERVED17[164]; __IOM uint32_t DFEMODE; /*!< (@ 0x00000900) Whether to use Angle-of-Arrival (AOA) or Angle-of-Departure diff --git a/mdk/nrf52833.svd b/mdk/nrf52833.svd index 483342e85..cb9025039 100644 --- a/mdk/nrf52833.svd +++ b/mdk/nrf52833.svd @@ -2003,12 +2003,12 @@ POSSIBILITY OF SUCH DAMAGE.\n Db256us - 256 us debounce time. Recommended for TSX-3225, FA-20H and FA-128 crystals. + 256 us debounce time. Recommended for 1.6 mm x 2.0 mm crystals and larger. 0x10 Db1024us - 1024 us debounce time. Recommended for NX1612AA and NX1210AB crystals. + 1024 us debounce time. Recommended for 1.6 mm x 1.2 mm crystals and smaller. 0x40 @@ -11550,15 +11550,41 @@ POSSIBILITY OF SUCH DAMAGE.\n + + EVENTS_SYNC + Preamble indicator + 0x168 + read-write + + + EVENTS_SYNC + Preamble indicator + 0 + 0 + + + NotGenerated + Event not generated + 0 + + + Generated + Event generated + 1 + + + + + EVENTS_PHYEND - Generated when last bit is sent on air + Generated when last bit is sent on air, or received from air 0x16C read-write EVENTS_PHYEND - Generated when last bit is sent on air + Generated when last bit is sent on air, or received from air 0 0 @@ -12525,6 +12551,33 @@ POSSIBILITY OF SUCH DAMAGE.\n + + SYNC + Write '1' to enable interrupt for event SYNC + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Set + Enable + 1 + + + PHYEND Write '1' to enable interrupt for event PHYEND @@ -13154,6 +13207,33 @@ POSSIBILITY OF SUCH DAMAGE.\n + + SYNC + Write '1' to disable interrupt for event SYNC + 26 + 26 + + read + + Disabled + Read: Disabled + 0 + + + Enabled + Read: Enabled + 1 + + + + write + + Clear + Disable + 1 + + + PHYEND Write '1' to disable interrupt for event PHYEND @@ -14574,7 +14654,7 @@ POSSIBILITY OF SUCH DAMAGE.\n EDSAMPLE IEEE 802.15.4 energy detect level 0x668 - read-write + read-only 0x00000000 @@ -15001,7 +15081,7 @@ POSSIBILITY OF SUCH DAMAGE.\n REPEATPATTERN - Repeat every antenna pattern N times. + Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc. 20 23 @@ -40187,17 +40267,17 @@ POSSIBILITY OF SUCH DAMAGE.\n MinGain - -20dB gain adjustment (minimum) + -20 dB gain adjustment (minimum) 0x00 DefaultGain - 0dB gain adjustment + 0 dB gain adjustment 0x28 MaxGain - +20dB gain adjustment (maximum) + +20 dB gain adjustment (maximum) 0x50 @@ -40219,17 +40299,17 @@ POSSIBILITY OF SUCH DAMAGE.\n MinGain - -20dB gain adjustment (minimum) + -20 dB gain adjustment (minimum) 0x00 DefaultGain - 0dB gain adjustment + 0 dB gain adjustment 0x28 MaxGain - +20dB gain adjustment (maximum) + +20 dB gain adjustment (maximum) 0x50 @@ -40618,7 +40698,7 @@ POSSIBILITY OF SUCH DAMAGE.\n ERASEALL - Erase all non-volatile memory including UICR registers. Note that the erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased. + Erase all non-volatile memory including UICR registers. The erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased. 0 0 @@ -40658,7 +40738,7 @@ POSSIBILITY OF SUCH DAMAGE.\n ERASEUICR - Register starting erase of all user information configuration registers. Note that the erase must be enabled using CONFIG.WEN before the UICR can be erased. + Register starting erase of all user information configuration registers. The erase must be enabled using CONFIG.WEN before the UICR can be erased. 0 0 @@ -40758,7 +40838,7 @@ POSSIBILITY OF SUCH DAMAGE.\n HITS - Number of cache hits + Number of cache hits. Register is writable, but only to '0'. 0 31 @@ -40772,7 +40852,7 @@ POSSIBILITY OF SUCH DAMAGE.\n MISSES - Number of cache misses + Number of cache misses. Register is writable, but only to '0'. 0 31 diff --git a/mdk/nrf52833_bitfields.h b/mdk/nrf52833_bitfields.h index 6a92f0f36..1a034f6db 100644 --- a/mdk/nrf52833_bitfields.h +++ b/mdk/nrf52833_bitfields.h @@ -705,8 +705,8 @@ POSSIBILITY OF SUCH DAMAGE. /* Bits 7..0 : HFXO debounce time. Debounce time = HFXODEBOUNCE * 16 us. */ #define CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Pos (0UL) /*!< Position of HFXODEBOUNCE field. */ #define CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Msk (0xFFUL << CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Pos) /*!< Bit mask of HFXODEBOUNCE field. */ -#define CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Db256us (0x10UL) /*!< 256 us debounce time. Recommended for TSX-3225, FA-20H and FA-128 crystals. */ -#define CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Db1024us (0x40UL) /*!< 1024 us debounce time. Recommended for NX1612AA and NX1210AB crystals. */ +#define CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Db256us (0x10UL) /*!< 256 us debounce time. Recommended for 1.6 mm x 2.0 mm crystals and larger. */ +#define CLOCK_HFXODEBOUNCE_HFXODEBOUNCE_Db1024us (0x40UL) /*!< 1024 us debounce time. Recommended for 1.6 mm x 1.2 mm crystals and smaller. */ /* Register: CLOCK_LFXODEBOUNCE */ /* Description: LFXO debounce time. The LFXO is started by triggering the TASKS_LFCLKSTART task when the LFCLKSRC register is configured for Xtal. */ @@ -4858,7 +4858,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: NVMC_ERASEALL */ /* Description: Register for erasing all non-volatile user memory */ -/* Bit 0 : Erase all non-volatile memory including UICR registers. Note that the erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased. */ +/* Bit 0 : Erase all non-volatile memory including UICR registers. The erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased. */ #define NVMC_ERASEALL_ERASEALL_Pos (0UL) /*!< Position of ERASEALL field. */ #define NVMC_ERASEALL_ERASEALL_Msk (0x1UL << NVMC_ERASEALL_ERASEALL_Pos) /*!< Bit mask of ERASEALL field. */ #define NVMC_ERASEALL_ERASEALL_NoOperation (0UL) /*!< No operation */ @@ -4874,7 +4874,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: NVMC_ERASEUICR */ /* Description: Register for erasing user information configuration registers */ -/* Bit 0 : Register starting erase of all user information configuration registers. Note that the erase must be enabled using CONFIG.WEN before the UICR can be erased. */ +/* Bit 0 : Register starting erase of all user information configuration registers. The erase must be enabled using CONFIG.WEN before the UICR can be erased. */ #define NVMC_ERASEUICR_ERASEUICR_Pos (0UL) /*!< Position of ERASEUICR field. */ #define NVMC_ERASEUICR_ERASEUICR_Msk (0x1UL << NVMC_ERASEUICR_ERASEUICR_Pos) /*!< Bit mask of ERASEUICR field. */ #define NVMC_ERASEUICR_ERASEUICR_NoOperation (0UL) /*!< No operation */ @@ -4912,14 +4912,14 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: NVMC_IHIT */ /* Description: I-code cache hit counter */ -/* Bits 31..0 : Number of cache hits */ +/* Bits 31..0 : Number of cache hits. Register is writable, but only to '0'. */ #define NVMC_IHIT_HITS_Pos (0UL) /*!< Position of HITS field. */ #define NVMC_IHIT_HITS_Msk (0xFFFFFFFFUL << NVMC_IHIT_HITS_Pos) /*!< Bit mask of HITS field. */ /* Register: NVMC_IMISS */ /* Description: I-code cache miss counter */ -/* Bits 31..0 : Number of cache misses */ +/* Bits 31..0 : Number of cache misses. Register is writable, but only to '0'. */ #define NVMC_IMISS_MISSES_Pos (0UL) /*!< Position of MISSES field. */ #define NVMC_IMISS_MISSES_Msk (0xFFFFFFFFUL << NVMC_IMISS_MISSES_Pos) /*!< Bit mask of MISSES field. */ @@ -6824,9 +6824,9 @@ POSSIBILITY OF SUCH DAMAGE. /* Bits 6..0 : Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust */ #define PDM_GAINL_GAINL_Pos (0UL) /*!< Position of GAINL field. */ #define PDM_GAINL_GAINL_Msk (0x7FUL << PDM_GAINL_GAINL_Pos) /*!< Bit mask of GAINL field. */ -#define PDM_GAINL_GAINL_MinGain (0x00UL) /*!< -20dB gain adjustment (minimum) */ -#define PDM_GAINL_GAINL_DefaultGain (0x28UL) /*!< 0dB gain adjustment */ -#define PDM_GAINL_GAINL_MaxGain (0x50UL) /*!< +20dB gain adjustment (maximum) */ +#define PDM_GAINL_GAINL_MinGain (0x00UL) /*!< -20 dB gain adjustment (minimum) */ +#define PDM_GAINL_GAINL_DefaultGain (0x28UL) /*!< 0 dB gain adjustment */ +#define PDM_GAINL_GAINL_MaxGain (0x50UL) /*!< +20 dB gain adjustment (maximum) */ /* Register: PDM_GAINR */ /* Description: Right output gain adjustment */ @@ -6834,9 +6834,9 @@ POSSIBILITY OF SUCH DAMAGE. /* Bits 6..0 : Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) */ #define PDM_GAINR_GAINR_Pos (0UL) /*!< Position of GAINR field. */ #define PDM_GAINR_GAINR_Msk (0x7FUL << PDM_GAINR_GAINR_Pos) /*!< Bit mask of GAINR field. */ -#define PDM_GAINR_GAINR_MinGain (0x00UL) /*!< -20dB gain adjustment (minimum) */ -#define PDM_GAINR_GAINR_DefaultGain (0x28UL) /*!< 0dB gain adjustment */ -#define PDM_GAINR_GAINR_MaxGain (0x50UL) /*!< +20dB gain adjustment (maximum) */ +#define PDM_GAINR_GAINR_MinGain (0x00UL) /*!< -20 dB gain adjustment (minimum) */ +#define PDM_GAINR_GAINR_DefaultGain (0x28UL) /*!< 0 dB gain adjustment */ +#define PDM_GAINR_GAINR_MaxGain (0x50UL) /*!< +20 dB gain adjustment (maximum) */ /* Register: PDM_RATIO */ /* Description: Selects the ratio between PDM_CLK and output sample rate. Change PDMCLKCTRL accordingly. */ @@ -9677,10 +9677,19 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_EVENTS_MHRMATCH_EVENTS_MHRMATCH_NotGenerated (0UL) /*!< Event not generated */ #define RADIO_EVENTS_MHRMATCH_EVENTS_MHRMATCH_Generated (1UL) /*!< Event generated */ +/* Register: RADIO_EVENTS_SYNC */ +/* Description: Preamble indicator */ + +/* Bit 0 : Preamble indicator */ +#define RADIO_EVENTS_SYNC_EVENTS_SYNC_Pos (0UL) /*!< Position of EVENTS_SYNC field. */ +#define RADIO_EVENTS_SYNC_EVENTS_SYNC_Msk (0x1UL << RADIO_EVENTS_SYNC_EVENTS_SYNC_Pos) /*!< Bit mask of EVENTS_SYNC field. */ +#define RADIO_EVENTS_SYNC_EVENTS_SYNC_NotGenerated (0UL) /*!< Event not generated */ +#define RADIO_EVENTS_SYNC_EVENTS_SYNC_Generated (1UL) /*!< Event generated */ + /* Register: RADIO_EVENTS_PHYEND */ -/* Description: Generated when last bit is sent on air */ +/* Description: Generated when last bit is sent on air, or received from air */ -/* Bit 0 : Generated when last bit is sent on air */ +/* Bit 0 : Generated when last bit is sent on air, or received from air */ #define RADIO_EVENTS_PHYEND_EVENTS_PHYEND_Pos (0UL) /*!< Position of EVENTS_PHYEND field. */ #define RADIO_EVENTS_PHYEND_EVENTS_PHYEND_Msk (0x1UL << RADIO_EVENTS_PHYEND_EVENTS_PHYEND_Pos) /*!< Bit mask of EVENTS_PHYEND field. */ #define RADIO_EVENTS_PHYEND_EVENTS_PHYEND_NotGenerated (0UL) /*!< Event not generated */ @@ -9829,6 +9838,13 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_INTENSET_PHYEND_Enabled (1UL) /*!< Read: Enabled */ #define RADIO_INTENSET_PHYEND_Set (1UL) /*!< Enable */ +/* Bit 26 : Write '1' to enable interrupt for event SYNC */ +#define RADIO_INTENSET_SYNC_Pos (26UL) /*!< Position of SYNC field. */ +#define RADIO_INTENSET_SYNC_Msk (0x1UL << RADIO_INTENSET_SYNC_Pos) /*!< Bit mask of SYNC field. */ +#define RADIO_INTENSET_SYNC_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENSET_SYNC_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENSET_SYNC_Set (1UL) /*!< Enable */ + /* Bit 23 : Write '1' to enable interrupt for event MHRMATCH */ #define RADIO_INTENSET_MHRMATCH_Pos (23UL) /*!< Position of MHRMATCH field. */ #define RADIO_INTENSET_MHRMATCH_Msk (0x1UL << RADIO_INTENSET_MHRMATCH_Pos) /*!< Bit mask of MHRMATCH field. */ @@ -9993,6 +10009,13 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_INTENCLR_PHYEND_Enabled (1UL) /*!< Read: Enabled */ #define RADIO_INTENCLR_PHYEND_Clear (1UL) /*!< Disable */ +/* Bit 26 : Write '1' to disable interrupt for event SYNC */ +#define RADIO_INTENCLR_SYNC_Pos (26UL) /*!< Position of SYNC field. */ +#define RADIO_INTENCLR_SYNC_Msk (0x1UL << RADIO_INTENCLR_SYNC_Pos) /*!< Bit mask of SYNC field. */ +#define RADIO_INTENCLR_SYNC_Disabled (0UL) /*!< Read: Disabled */ +#define RADIO_INTENCLR_SYNC_Enabled (1UL) /*!< Read: Enabled */ +#define RADIO_INTENCLR_SYNC_Clear (1UL) /*!< Disable */ + /* Bit 23 : Write '1' to disable interrupt for event MHRMATCH */ #define RADIO_INTENCLR_MHRMATCH_Pos (23UL) /*!< Position of MHRMATCH field. */ #define RADIO_INTENCLR_MHRMATCH_Msk (0x1UL << RADIO_INTENCLR_MHRMATCH_Pos) /*!< Bit mask of MHRMATCH field. */ @@ -10776,7 +10799,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_DFECTRL1_AGCBACKOFFGAIN_Pos (24UL) /*!< Position of AGCBACKOFFGAIN field. */ #define RADIO_DFECTRL1_AGCBACKOFFGAIN_Msk (0xFUL << RADIO_DFECTRL1_AGCBACKOFFGAIN_Pos) /*!< Bit mask of AGCBACKOFFGAIN field. */ -/* Bits 23..20 : Repeat every antenna pattern N times. */ +/* Bits 23..20 : Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc. */ #define RADIO_DFECTRL1_REPEATPATTERN_Pos (20UL) /*!< Position of REPEATPATTERN field. */ #define RADIO_DFECTRL1_REPEATPATTERN_Msk (0xFUL << RADIO_DFECTRL1_REPEATPATTERN_Pos) /*!< Bit mask of REPEATPATTERN field. */ #define RADIO_DFECTRL1_REPEATPATTERN_NoRepeat (0UL) /*!< Do not repeat (1 time in total) */ diff --git a/mdk/nrf52833_erratas.h b/mdk/nrf52833_erratas.h deleted file mode 100644 index 221bbcf46..000000000 --- a/mdk/nrf52833_erratas.h +++ /dev/null @@ -1,1471 +0,0 @@ -#ifndef NRF52833_ERRATAS_H -#define NRF52833_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; -static bool errata_79(void) __UNUSED; -static bool errata_81(void) __UNUSED; -static bool errata_83(void) __UNUSED; -static bool errata_84(void) __UNUSED; -static bool errata_86(void) __UNUSED; -static bool errata_87(void) __UNUSED; -static bool errata_88(void) __UNUSED; -static bool errata_89(void) __UNUSED; -static bool errata_91(void) __UNUSED; -static bool errata_94(void) __UNUSED; -static bool errata_96(void) __UNUSED; -static bool errata_97(void) __UNUSED; -static bool errata_98(void) __UNUSED; -static bool errata_101(void) __UNUSED; -static bool errata_102(void) __UNUSED; -static bool errata_103(void) __UNUSED; -static bool errata_104(void) __UNUSED; -static bool errata_106(void) __UNUSED; -static bool errata_107(void) __UNUSED; -static bool errata_108(void) __UNUSED; -static bool errata_109(void) __UNUSED; -static bool errata_110(void) __UNUSED; -static bool errata_111(void) __UNUSED; -static bool errata_112(void) __UNUSED; -static bool errata_113(void) __UNUSED; -static bool errata_115(void) __UNUSED; -static bool errata_116(void) __UNUSED; -static bool errata_117(void) __UNUSED; -static bool errata_118(void) __UNUSED; -static bool errata_119(void) __UNUSED; -static bool errata_120(void) __UNUSED; -static bool errata_121(void) __UNUSED; -static bool errata_122(void) __UNUSED; -static bool errata_127(void) __UNUSED; -static bool errata_128(void) __UNUSED; -static bool errata_131(void) __UNUSED; -static bool errata_132(void) __UNUSED; -static bool errata_133(void) __UNUSED; -static bool errata_134(void) __UNUSED; -static bool errata_135(void) __UNUSED; -static bool errata_136(void) __UNUSED; -static bool errata_138(void) __UNUSED; -static bool errata_140(void) __UNUSED; -static bool errata_141(void) __UNUSED; -static bool errata_142(void) __UNUSED; -static bool errata_143(void) __UNUSED; -static bool errata_144(void) __UNUSED; -static bool errata_145(void) __UNUSED; -static bool errata_146(void) __UNUSED; -static bool errata_147(void) __UNUSED; -static bool errata_149(void) __UNUSED; -static bool errata_150(void) __UNUSED; -static bool errata_151(void) __UNUSED; -static bool errata_153(void) __UNUSED; -static bool errata_154(void) __UNUSED; -static bool errata_155(void) __UNUSED; -static bool errata_156(void) __UNUSED; -static bool errata_158(void) __UNUSED; -static bool errata_160(void) __UNUSED; -static bool errata_162(void) __UNUSED; -static bool errata_163(void) __UNUSED; -static bool errata_164(void) __UNUSED; -static bool errata_166(void) __UNUSED; -static bool errata_170(void) __UNUSED; -static bool errata_171(void) __UNUSED; -static bool errata_172(void) __UNUSED; -static bool errata_173(void) __UNUSED; -static bool errata_174(void) __UNUSED; -static bool errata_176(void) __UNUSED; -static bool errata_178(void) __UNUSED; -static bool errata_179(void) __UNUSED; -static bool errata_180(void) __UNUSED; -static bool errata_181(void) __UNUSED; -static bool errata_182(void) __UNUSED; -static bool errata_183(void) __UNUSED; -static bool errata_184(void) __UNUSED; -static bool errata_186(void) __UNUSED; -static bool errata_187(void) __UNUSED; -static bool errata_189(void) __UNUSED; -static bool errata_190(void) __UNUSED; -static bool errata_191(void) __UNUSED; -static bool errata_192(void) __UNUSED; -static bool errata_193(void) __UNUSED; -static bool errata_194(void) __UNUSED; -static bool errata_195(void) __UNUSED; -static bool errata_196(void) __UNUSED; -static bool errata_197(void) __UNUSED; -static bool errata_198(void) __UNUSED; -static bool errata_199(void) __UNUSED; -static bool errata_200(void) __UNUSED; -static bool errata_201(void) __UNUSED; -static bool errata_202(void) __UNUSED; -static bool errata_204(void) __UNUSED; -static bool errata_208(void) __UNUSED; -static bool errata_209(void) __UNUSED; -static bool errata_210(void) __UNUSED; -static bool errata_212(void) __UNUSED; -static bool errata_213(void) __UNUSED; -static bool errata_214(void) __UNUSED; -static bool errata_215(void) __UNUSED; -static bool errata_217(void) __UNUSED; -static bool errata_218(void) __UNUSED; -static bool errata_219(void) __UNUSED; -static bool errata_225(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_15(void) -{ - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_54(void) -{ - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - return false; -} - -static bool errata_68(void) -{ - return false; -} - -static bool errata_70(void) -{ - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_79(void) -{ - return false; -} - -static bool errata_81(void) -{ - return false; -} - -static bool errata_83(void) -{ - return false; -} - -static bool errata_84(void) -{ - return false; -} - -static bool errata_86(void) -{ - return false; -} - -static bool errata_87(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_88(void) -{ - return false; -} - -static bool errata_89(void) -{ - return false; -} - -static bool errata_91(void) -{ - return false; -} - -static bool errata_94(void) -{ - return false; -} - -static bool errata_96(void) -{ - return false; -} - -static bool errata_97(void) -{ - return false; -} - -static bool errata_98(void) -{ - return false; -} - -static bool errata_101(void) -{ - return false; -} - -static bool errata_102(void) -{ - return false; -} - -static bool errata_103(void) -{ - return false; -} - -static bool errata_104(void) -{ - return false; -} - -static bool errata_106(void) -{ - return false; -} - -static bool errata_107(void) -{ - return false; -} - -static bool errata_108(void) -{ - return false; -} - -static bool errata_109(void) -{ - return false; -} - -static bool errata_110(void) -{ - return false; -} - -static bool errata_111(void) -{ - return false; -} - -static bool errata_112(void) -{ - return false; -} - -static bool errata_113(void) -{ - return false; -} - -static bool errata_115(void) -{ - return false; -} - -static bool errata_116(void) -{ - return false; -} - -static bool errata_117(void) -{ - return false; -} - -static bool errata_118(void) -{ - return false; -} - -static bool errata_119(void) -{ - return false; -} - -static bool errata_120(void) -{ - return false; -} - -static bool errata_121(void) -{ - return false; -} - -static bool errata_122(void) -{ - return false; -} - -static bool errata_127(void) -{ - return false; -} - -static bool errata_128(void) -{ - return false; -} - -static bool errata_131(void) -{ - return false; -} - -static bool errata_132(void) -{ - return false; -} - -static bool errata_133(void) -{ - return false; -} - -static bool errata_134(void) -{ - return false; -} - -static bool errata_135(void) -{ - return false; -} - -static bool errata_136(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_138(void) -{ - return false; -} - -static bool errata_140(void) -{ - return false; -} - -static bool errata_141(void) -{ - return false; -} - -static bool errata_142(void) -{ - return false; -} - -static bool errata_143(void) -{ - return false; -} - -static bool errata_144(void) -{ - return false; -} - -static bool errata_145(void) -{ - return false; -} - -static bool errata_146(void) -{ - return false; -} - -static bool errata_147(void) -{ - return false; -} - -static bool errata_149(void) -{ - return false; -} - -static bool errata_150(void) -{ - return false; -} - -static bool errata_151(void) -{ - return false; -} - -static bool errata_153(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_154(void) -{ - return false; -} - -static bool errata_155(void) -{ - return false; -} - -static bool errata_156(void) -{ - return false; -} - -static bool errata_158(void) -{ - return false; -} - -static bool errata_160(void) -{ - return false; -} - -static bool errata_162(void) -{ - return false; -} - -static bool errata_163(void) -{ - return false; -} - -static bool errata_164(void) -{ - return false; -} - -static bool errata_166(void) -{ - return false; -} - -static bool errata_170(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_171(void) -{ - return false; -} - -static bool errata_172(void) -{ - return false; -} - -static bool errata_173(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_174(void) -{ - return false; -} - -static bool errata_176(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_178(void) -{ - return false; -} - -static bool errata_179(void) -{ - return false; -} - -static bool errata_180(void) -{ - return false; -} - -static bool errata_181(void) -{ - return false; -} - -static bool errata_182(void) -{ - return false; -} - -static bool errata_183(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_184(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_186(void) -{ - return false; -} - -static bool errata_187(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_189(void) -{ - return false; -} - -static bool errata_190(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_191(void) -{ - return false; -} - -static bool errata_192(void) -{ - return false; -} - -static bool errata_193(void) -{ - return false; -} - -static bool errata_194(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_195(void) -{ - return false; -} - -static bool errata_196(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_197(void) -{ - return false; -} - -static bool errata_198(void) -{ - return false; -} - -static bool errata_199(void) -{ - return false; -} - -static bool errata_200(void) -{ - return false; -} - -static bool errata_201(void) -{ - return false; -} - -static bool errata_202(void) -{ - return false; -} - -static bool errata_204(void) -{ - return false; -} - -static bool errata_208(void) -{ - return false; -} - -static bool errata_209(void) -{ - return false; -} - -static bool errata_210(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_212(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_213(void) -{ - return false; -} - -static bool errata_214(void) -{ - return false; -} - -static bool errata_215(void) -{ - return false; -} - -static bool errata_217(void) -{ - return false; -} - -static bool errata_218(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_219(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_225(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x0D: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -#endif /* NRF52833_ERRATAS_H */ diff --git a/mdk/nrf52833_peripherals.h b/mdk/nrf52833_peripherals.h index 0ec441b62..b40fa85e0 100644 --- a/mdk/nrf52833_peripherals.h +++ b/mdk/nrf52833_peripherals.h @@ -77,6 +77,9 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 #define P1_PIN_NUM 10 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL +#define P1_FEATURE_PINS_PRESENT 0x000003FFUL + /* ACL */ #define ACL_PRESENT @@ -87,6 +90,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_COUNT 1 #define RADIO_EASYDMA_MAXCNT_SIZE 8 +#define RADIO_FEATURE_IEEE_802_15_4_PRESENT /* Accelerated Address Resolver */ #define AAR_PRESENT diff --git a/mdk/nrf52840.h b/mdk/nrf52840.h index 0550187ee..06fb208d3 100644 --- a/mdk/nrf52840.h +++ b/mdk/nrf52840.h @@ -30,10 +30,10 @@ * @file nrf52840.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:34 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:31 * from File 'nrf52840.svd', - * last modified on Friday, 25.10.2019 07:35:25 + * last modified on Friday, 17.01.2020 16:08:23 */ diff --git a/mdk/nrf52840_erratas.h b/mdk/nrf52840_erratas.h deleted file mode 100644 index 407779f0d..000000000 --- a/mdk/nrf52840_erratas.h +++ /dev/null @@ -1,3239 +0,0 @@ -#ifndef NRF52840_ERRATAS_H -#define NRF52840_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_3(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_25(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_31(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_33(void) __UNUSED; -static bool errata_34(void) __UNUSED; -static bool errata_35(void) __UNUSED; -static bool errata_36(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_38(void) __UNUSED; -static bool errata_39(void) __UNUSED; -static bool errata_40(void) __UNUSED; -static bool errata_41(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_43(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_48(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_51(void) __UNUSED; -static bool errata_54(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_63(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; -static bool errata_66(void) __UNUSED; -static bool errata_67(void) __UNUSED; -static bool errata_68(void) __UNUSED; -static bool errata_70(void) __UNUSED; -static bool errata_71(void) __UNUSED; -static bool errata_72(void) __UNUSED; -static bool errata_73(void) __UNUSED; -static bool errata_74(void) __UNUSED; -static bool errata_75(void) __UNUSED; -static bool errata_76(void) __UNUSED; -static bool errata_77(void) __UNUSED; -static bool errata_78(void) __UNUSED; -static bool errata_79(void) __UNUSED; -static bool errata_81(void) __UNUSED; -static bool errata_83(void) __UNUSED; -static bool errata_84(void) __UNUSED; -static bool errata_86(void) __UNUSED; -static bool errata_87(void) __UNUSED; -static bool errata_88(void) __UNUSED; -static bool errata_89(void) __UNUSED; -static bool errata_91(void) __UNUSED; -static bool errata_94(void) __UNUSED; -static bool errata_96(void) __UNUSED; -static bool errata_97(void) __UNUSED; -static bool errata_98(void) __UNUSED; -static bool errata_101(void) __UNUSED; -static bool errata_102(void) __UNUSED; -static bool errata_103(void) __UNUSED; -static bool errata_104(void) __UNUSED; -static bool errata_106(void) __UNUSED; -static bool errata_107(void) __UNUSED; -static bool errata_108(void) __UNUSED; -static bool errata_109(void) __UNUSED; -static bool errata_110(void) __UNUSED; -static bool errata_111(void) __UNUSED; -static bool errata_112(void) __UNUSED; -static bool errata_113(void) __UNUSED; -static bool errata_115(void) __UNUSED; -static bool errata_116(void) __UNUSED; -static bool errata_117(void) __UNUSED; -static bool errata_118(void) __UNUSED; -static bool errata_119(void) __UNUSED; -static bool errata_120(void) __UNUSED; -static bool errata_121(void) __UNUSED; -static bool errata_122(void) __UNUSED; -static bool errata_127(void) __UNUSED; -static bool errata_128(void) __UNUSED; -static bool errata_131(void) __UNUSED; -static bool errata_132(void) __UNUSED; -static bool errata_133(void) __UNUSED; -static bool errata_134(void) __UNUSED; -static bool errata_135(void) __UNUSED; -static bool errata_136(void) __UNUSED; -static bool errata_138(void) __UNUSED; -static bool errata_140(void) __UNUSED; -static bool errata_141(void) __UNUSED; -static bool errata_142(void) __UNUSED; -static bool errata_143(void) __UNUSED; -static bool errata_144(void) __UNUSED; -static bool errata_145(void) __UNUSED; -static bool errata_146(void) __UNUSED; -static bool errata_147(void) __UNUSED; -static bool errata_149(void) __UNUSED; -static bool errata_150(void) __UNUSED; -static bool errata_151(void) __UNUSED; -static bool errata_153(void) __UNUSED; -static bool errata_154(void) __UNUSED; -static bool errata_155(void) __UNUSED; -static bool errata_156(void) __UNUSED; -static bool errata_158(void) __UNUSED; -static bool errata_160(void) __UNUSED; -static bool errata_162(void) __UNUSED; -static bool errata_163(void) __UNUSED; -static bool errata_164(void) __UNUSED; -static bool errata_166(void) __UNUSED; -static bool errata_170(void) __UNUSED; -static bool errata_171(void) __UNUSED; -static bool errata_172(void) __UNUSED; -static bool errata_173(void) __UNUSED; -static bool errata_174(void) __UNUSED; -static bool errata_176(void) __UNUSED; -static bool errata_178(void) __UNUSED; -static bool errata_179(void) __UNUSED; -static bool errata_180(void) __UNUSED; -static bool errata_181(void) __UNUSED; -static bool errata_182(void) __UNUSED; -static bool errata_183(void) __UNUSED; -static bool errata_184(void) __UNUSED; -static bool errata_186(void) __UNUSED; -static bool errata_187(void) __UNUSED; -static bool errata_189(void) __UNUSED; -static bool errata_190(void) __UNUSED; -static bool errata_191(void) __UNUSED; -static bool errata_192(void) __UNUSED; -static bool errata_193(void) __UNUSED; -static bool errata_194(void) __UNUSED; -static bool errata_195(void) __UNUSED; -static bool errata_196(void) __UNUSED; -static bool errata_197(void) __UNUSED; -static bool errata_198(void) __UNUSED; -static bool errata_199(void) __UNUSED; -static bool errata_200(void) __UNUSED; -static bool errata_201(void) __UNUSED; -static bool errata_202(void) __UNUSED; -static bool errata_204(void) __UNUSED; -static bool errata_208(void) __UNUSED; -static bool errata_209(void) __UNUSED; -static bool errata_210(void) __UNUSED; -static bool errata_212(void) __UNUSED; -static bool errata_213(void) __UNUSED; -static bool errata_214(void) __UNUSED; -static bool errata_215(void) __UNUSED; -static bool errata_217(void) __UNUSED; -static bool errata_218(void) __UNUSED; -static bool errata_219(void) __UNUSED; -static bool errata_225(void) __UNUSED; - -static bool errata_1(void) -{ - return false; -} - -static bool errata_2(void) -{ - return false; -} - -static bool errata_3(void) -{ - return false; -} - -static bool errata_4(void) -{ - return false; -} - -static bool errata_7(void) -{ - return false; -} - -static bool errata_8(void) -{ - return false; -} - -static bool errata_9(void) -{ - return false; -} - -static bool errata_10(void) -{ - return false; -} - -static bool errata_11(void) -{ - return false; -} - -static bool errata_12(void) -{ - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - return false; -} - -static bool errata_17(void) -{ - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - return false; -} - -static bool errata_24(void) -{ - return false; -} - -static bool errata_25(void) -{ - return false; -} - -static bool errata_26(void) -{ - return false; -} - -static bool errata_27(void) -{ - return false; -} - -static bool errata_28(void) -{ - return false; -} - -static bool errata_29(void) -{ - return false; -} - -static bool errata_30(void) -{ - return false; -} - -static bool errata_31(void) -{ - return false; -} - -static bool errata_32(void) -{ - return false; -} - -static bool errata_33(void) -{ - return false; -} - -static bool errata_34(void) -{ - return false; -} - -static bool errata_35(void) -{ - return false; -} - -static bool errata_36(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - return false; -} - -static bool errata_38(void) -{ - return false; -} - -static bool errata_39(void) -{ - return false; -} - -static bool errata_40(void) -{ - return false; -} - -static bool errata_41(void) -{ - return false; -} - -static bool errata_42(void) -{ - return false; -} - -static bool errata_43(void) -{ - return false; -} - -static bool errata_44(void) -{ - return false; -} - -static bool errata_46(void) -{ - return false; -} - -static bool errata_47(void) -{ - return false; -} - -static bool errata_48(void) -{ - return false; -} - -static bool errata_49(void) -{ - return false; -} - -static bool errata_51(void) -{ - return false; -} - -static bool errata_54(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - return false; -} - -static bool errata_58(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_63(void) -{ - return false; -} - -static bool errata_64(void) -{ - return false; -} - -static bool errata_65(void) -{ - return false; -} - -static bool errata_66(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_67(void) -{ - return false; -} - -static bool errata_68(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_70(void) -{ - return false; -} - -static bool errata_71(void) -{ - return false; -} - -static bool errata_72(void) -{ - return false; -} - -static bool errata_73(void) -{ - return false; -} - -static bool errata_74(void) -{ - return false; -} - -static bool errata_75(void) -{ - return false; -} - -static bool errata_76(void) -{ - return false; -} - -static bool errata_77(void) -{ - return false; -} - -static bool errata_78(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_79(void) -{ - return false; -} - -static bool errata_81(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_83(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_84(void) -{ - return false; -} - -static bool errata_86(void) -{ - return false; -} - -static bool errata_87(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_88(void) -{ - return false; -} - -static bool errata_89(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_91(void) -{ - return false; -} - -static bool errata_94(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_96(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_97(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_98(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_101(void) -{ - return false; -} - -static bool errata_102(void) -{ - return false; -} - -static bool errata_103(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_104(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_106(void) -{ - return false; -} - -static bool errata_107(void) -{ - return false; -} - -static bool errata_108(void) -{ - return false; -} - -static bool errata_109(void) -{ - return false; -} - -static bool errata_110(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_111(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_112(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_113(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_115(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_116(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_117(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_118(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_119(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_120(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_121(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_122(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_127(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_128(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_131(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_132(void) -{ - return false; -} - -static bool errata_133(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_134(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_135(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_136(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_138(void) -{ - return false; -} - -static bool errata_140(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_141(void) -{ - return false; -} - -static bool errata_142(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_143(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_144(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_145(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_146(void) -{ - return false; -} - -static bool errata_147(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_149(void) -{ - return false; -} - -static bool errata_150(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_151(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_153(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_154(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_155(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_156(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_158(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_160(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_162(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_163(void) -{ - return false; -} - -static bool errata_164(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_166(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_170(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_171(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_172(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_173(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_174(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_176(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_178(void) -{ - return false; -} - -static bool errata_179(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_180(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_181(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_182(void) -{ - return false; -} - -static bool errata_183(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_184(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_186(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_187(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_189(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_190(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_191(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_192(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_193(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_194(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_195(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_196(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_197(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_198(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_199(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_200(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return false; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_201(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_202(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_204(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_208(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_209(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_210(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_212(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_213(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_214(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_215(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_217(void) -{ - return false; -} - -static bool errata_218(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return false; - case 0x01ul: - return false; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_219(void) -{ - uint32_t var1 = *(uint32_t *)0x10000130ul; - uint32_t var2 = *(uint32_t *)0x10000134ul; - - switch(var1) - { - case 0x08: - switch(var2) - { - case 0x00ul: - return true; - case 0x01ul: - return true; - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_225(void) -{ - return false; -} - -#endif /* NRF52840_ERRATAS_H */ diff --git a/mdk/nrf52840_peripherals.h b/mdk/nrf52840_peripherals.h index b85de2d68..b20230250 100644 --- a/mdk/nrf52840_peripherals.h +++ b/mdk/nrf52840_peripherals.h @@ -77,6 +77,9 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 #define P1_PIN_NUM 16 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL +#define P1_FEATURE_PINS_PRESENT 0x0000FFFFUL + /* ACL */ #define ACL_PRESENT @@ -87,6 +90,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_COUNT 1 #define RADIO_EASYDMA_MAXCNT_SIZE 8 +#define RADIO_FEATURE_IEEE_802_15_4_PRESENT /* Accelerated Address Resolver */ #define AAR_PRESENT diff --git a/mdk/nrf52_erratas.h b/mdk/nrf52_erratas.h new file mode 100644 index 000000000..29498d00f --- /dev/null +++ b/mdk/nrf52_erratas.h @@ -0,0 +1,7787 @@ +#ifndef NRF52_ERRATAS_H +#define NRF52_ERRATAS_H + +/* + +Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of Nordic Semiconductor ASA nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include +#include +#include "compiler_abstraction.h" + +static bool nrf52_errata_1(void) __UNUSED; +static bool nrf52_errata_2(void) __UNUSED; +static bool nrf52_errata_3(void) __UNUSED; +static bool nrf52_errata_4(void) __UNUSED; +static bool nrf52_errata_7(void) __UNUSED; +static bool nrf52_errata_8(void) __UNUSED; +static bool nrf52_errata_9(void) __UNUSED; +static bool nrf52_errata_10(void) __UNUSED; +static bool nrf52_errata_11(void) __UNUSED; +static bool nrf52_errata_12(void) __UNUSED; +static bool nrf52_errata_15(void) __UNUSED; +static bool nrf52_errata_16(void) __UNUSED; +static bool nrf52_errata_17(void) __UNUSED; +static bool nrf52_errata_20(void) __UNUSED; +static bool nrf52_errata_23(void) __UNUSED; +static bool nrf52_errata_24(void) __UNUSED; +static bool nrf52_errata_25(void) __UNUSED; +static bool nrf52_errata_26(void) __UNUSED; +static bool nrf52_errata_27(void) __UNUSED; +static bool nrf52_errata_28(void) __UNUSED; +static bool nrf52_errata_29(void) __UNUSED; +static bool nrf52_errata_30(void) __UNUSED; +static bool nrf52_errata_31(void) __UNUSED; +static bool nrf52_errata_32(void) __UNUSED; +static bool nrf52_errata_33(void) __UNUSED; +static bool nrf52_errata_34(void) __UNUSED; +static bool nrf52_errata_35(void) __UNUSED; +static bool nrf52_errata_36(void) __UNUSED; +static bool nrf52_errata_37(void) __UNUSED; +static bool nrf52_errata_38(void) __UNUSED; +static bool nrf52_errata_39(void) __UNUSED; +static bool nrf52_errata_40(void) __UNUSED; +static bool nrf52_errata_41(void) __UNUSED; +static bool nrf52_errata_42(void) __UNUSED; +static bool nrf52_errata_43(void) __UNUSED; +static bool nrf52_errata_44(void) __UNUSED; +static bool nrf52_errata_46(void) __UNUSED; +static bool nrf52_errata_47(void) __UNUSED; +static bool nrf52_errata_48(void) __UNUSED; +static bool nrf52_errata_49(void) __UNUSED; +static bool nrf52_errata_51(void) __UNUSED; +static bool nrf52_errata_54(void) __UNUSED; +static bool nrf52_errata_55(void) __UNUSED; +static bool nrf52_errata_57(void) __UNUSED; +static bool nrf52_errata_58(void) __UNUSED; +static bool nrf52_errata_62(void) __UNUSED; +static bool nrf52_errata_63(void) __UNUSED; +static bool nrf52_errata_64(void) __UNUSED; +static bool nrf52_errata_65(void) __UNUSED; +static bool nrf52_errata_66(void) __UNUSED; +static bool nrf52_errata_67(void) __UNUSED; +static bool nrf52_errata_68(void) __UNUSED; +static bool nrf52_errata_70(void) __UNUSED; +static bool nrf52_errata_71(void) __UNUSED; +static bool nrf52_errata_72(void) __UNUSED; +static bool nrf52_errata_73(void) __UNUSED; +static bool nrf52_errata_74(void) __UNUSED; +static bool nrf52_errata_75(void) __UNUSED; +static bool nrf52_errata_76(void) __UNUSED; +static bool nrf52_errata_77(void) __UNUSED; +static bool nrf52_errata_78(void) __UNUSED; +static bool nrf52_errata_79(void) __UNUSED; +static bool nrf52_errata_81(void) __UNUSED; +static bool nrf52_errata_83(void) __UNUSED; +static bool nrf52_errata_84(void) __UNUSED; +static bool nrf52_errata_86(void) __UNUSED; +static bool nrf52_errata_87(void) __UNUSED; +static bool nrf52_errata_88(void) __UNUSED; +static bool nrf52_errata_89(void) __UNUSED; +static bool nrf52_errata_91(void) __UNUSED; +static bool nrf52_errata_94(void) __UNUSED; +static bool nrf52_errata_96(void) __UNUSED; +static bool nrf52_errata_97(void) __UNUSED; +static bool nrf52_errata_98(void) __UNUSED; +static bool nrf52_errata_101(void) __UNUSED; +static bool nrf52_errata_102(void) __UNUSED; +static bool nrf52_errata_103(void) __UNUSED; +static bool nrf52_errata_104(void) __UNUSED; +static bool nrf52_errata_106(void) __UNUSED; +static bool nrf52_errata_107(void) __UNUSED; +static bool nrf52_errata_108(void) __UNUSED; +static bool nrf52_errata_109(void) __UNUSED; +static bool nrf52_errata_110(void) __UNUSED; +static bool nrf52_errata_111(void) __UNUSED; +static bool nrf52_errata_112(void) __UNUSED; +static bool nrf52_errata_113(void) __UNUSED; +static bool nrf52_errata_115(void) __UNUSED; +static bool nrf52_errata_116(void) __UNUSED; +static bool nrf52_errata_117(void) __UNUSED; +static bool nrf52_errata_118(void) __UNUSED; +static bool nrf52_errata_119(void) __UNUSED; +static bool nrf52_errata_120(void) __UNUSED; +static bool nrf52_errata_121(void) __UNUSED; +static bool nrf52_errata_122(void) __UNUSED; +static bool nrf52_errata_127(void) __UNUSED; +static bool nrf52_errata_128(void) __UNUSED; +static bool nrf52_errata_131(void) __UNUSED; +static bool nrf52_errata_132(void) __UNUSED; +static bool nrf52_errata_133(void) __UNUSED; +static bool nrf52_errata_134(void) __UNUSED; +static bool nrf52_errata_135(void) __UNUSED; +static bool nrf52_errata_136(void) __UNUSED; +static bool nrf52_errata_138(void) __UNUSED; +static bool nrf52_errata_140(void) __UNUSED; +static bool nrf52_errata_141(void) __UNUSED; +static bool nrf52_errata_142(void) __UNUSED; +static bool nrf52_errata_143(void) __UNUSED; +static bool nrf52_errata_144(void) __UNUSED; +static bool nrf52_errata_145(void) __UNUSED; +static bool nrf52_errata_146(void) __UNUSED; +static bool nrf52_errata_147(void) __UNUSED; +static bool nrf52_errata_149(void) __UNUSED; +static bool nrf52_errata_150(void) __UNUSED; +static bool nrf52_errata_151(void) __UNUSED; +static bool nrf52_errata_153(void) __UNUSED; +static bool nrf52_errata_154(void) __UNUSED; +static bool nrf52_errata_155(void) __UNUSED; +static bool nrf52_errata_156(void) __UNUSED; +static bool nrf52_errata_158(void) __UNUSED; +static bool nrf52_errata_160(void) __UNUSED; +static bool nrf52_errata_162(void) __UNUSED; +static bool nrf52_errata_163(void) __UNUSED; +static bool nrf52_errata_164(void) __UNUSED; +static bool nrf52_errata_166(void) __UNUSED; +static bool nrf52_errata_170(void) __UNUSED; +static bool nrf52_errata_171(void) __UNUSED; +static bool nrf52_errata_172(void) __UNUSED; +static bool nrf52_errata_173(void) __UNUSED; +static bool nrf52_errata_174(void) __UNUSED; +static bool nrf52_errata_176(void) __UNUSED; +static bool nrf52_errata_178(void) __UNUSED; +static bool nrf52_errata_179(void) __UNUSED; +static bool nrf52_errata_180(void) __UNUSED; +static bool nrf52_errata_181(void) __UNUSED; +static bool nrf52_errata_182(void) __UNUSED; +static bool nrf52_errata_183(void) __UNUSED; +static bool nrf52_errata_184(void) __UNUSED; +static bool nrf52_errata_186(void) __UNUSED; +static bool nrf52_errata_187(void) __UNUSED; +static bool nrf52_errata_189(void) __UNUSED; +static bool nrf52_errata_190(void) __UNUSED; +static bool nrf52_errata_191(void) __UNUSED; +static bool nrf52_errata_192(void) __UNUSED; +static bool nrf52_errata_193(void) __UNUSED; +static bool nrf52_errata_194(void) __UNUSED; +static bool nrf52_errata_195(void) __UNUSED; +static bool nrf52_errata_196(void) __UNUSED; +static bool nrf52_errata_197(void) __UNUSED; +static bool nrf52_errata_198(void) __UNUSED; +static bool nrf52_errata_199(void) __UNUSED; +static bool nrf52_errata_200(void) __UNUSED; +static bool nrf52_errata_201(void) __UNUSED; +static bool nrf52_errata_202(void) __UNUSED; +static bool nrf52_errata_204(void) __UNUSED; +static bool nrf52_errata_208(void) __UNUSED; +static bool nrf52_errata_209(void) __UNUSED; +static bool nrf52_errata_210(void) __UNUSED; +static bool nrf52_errata_212(void) __UNUSED; +static bool nrf52_errata_213(void) __UNUSED; +static bool nrf52_errata_214(void) __UNUSED; +static bool nrf52_errata_215(void) __UNUSED; +static bool nrf52_errata_216(void) __UNUSED; +static bool nrf52_errata_217(void) __UNUSED; +static bool nrf52_errata_218(void) __UNUSED; +static bool nrf52_errata_219(void) __UNUSED; +static bool nrf52_errata_220(void) __UNUSED; +static bool nrf52_errata_225(void) __UNUSED; +static bool nrf52_errata_228(void) __UNUSED; +static bool nrf52_errata_230(void) __UNUSED; + +static bool nrf52_errata_1(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_2(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_3(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_4(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_7(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_8(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_9(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_10(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_11(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_12(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_15(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_16(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_17(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_20(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_23(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_24(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_25(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_26(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_27(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_28(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_29(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_30(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_31(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_32(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_33(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_34(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_35(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_36(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_37(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_38(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_39(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_40(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_41(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_42(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_43(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_44(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_46(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_47(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_48(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_49(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_51(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_54(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_55(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_57(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_58(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_62(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_63(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_64(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_65(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_66(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_67(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_68(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_70(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_71(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_72(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_73(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + uint32_t var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return false; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_74(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_75(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_76(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_77(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_78(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_79(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_81(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_83(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_84(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_86(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_87(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_88(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_89(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_91(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_94(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_96(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_97(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_98(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_101(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_102(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_103(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_104(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_106(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_107(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_108(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_109(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_110(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_111(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_112(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_113(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_115(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_116(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_117(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_118(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_119(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_120(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_121(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_122(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_127(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_128(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_131(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_132(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_133(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_134(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_135(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_136(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_138(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_140(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_141(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_142(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_143(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_144(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_145(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_146(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_147(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_149(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_150(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_151(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_153(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_154(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_155(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_156(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_158(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_160(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_162(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_163(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_164(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_166(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_170(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_171(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_172(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_173(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_174(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_176(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_178(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_179(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_180(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_181(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return false; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_182(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return false; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_183(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_184(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_186(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_187(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_189(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_190(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_191(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_192(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_193(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_194(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_195(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_196(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_197(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_198(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_199(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_200(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return false; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_201(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_202(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_204(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_208(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_209(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_210(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_212(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_213(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return true; + case 0x04ul: + return true; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_214(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_215(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_216(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_217(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_218(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return false; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_219(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805)\ + || defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + #if defined (NRF52805_XXAA) || defined (DEVELOP_IN_NRF52805) + if (var1 == 0x0F) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_220(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + uint32_t var1; + uint32_t var2; + + if (*(uint32_t *)0x10000130ul == 0xFFFFFFFF) + { + var1 = ((*(uint32_t *)0xF0000FE0ul) & 0x000000FFul); + var2 = ((*(uint32_t *)0xF0000FE8ul) & 0x000000F0ul) >> 4; + } + else + { + var1 = *(uint32_t *)0x10000130ul; + var2 = *(uint32_t *)0x10000134ul; + } + #endif + #if defined (NRF52832_XXAA) || defined (DEVELOP_IN_NRF52832)\ + || defined (NRF52832_XXAB) || defined (DEVELOP_IN_NRF52832) + if (var1 == 0x06) + { + switch(var2) + { + case 0x03ul: + return false; + case 0x04ul: + return false; + case 0x05ul: + return true; + case 0x06ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_225(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_228(void) +{ + #ifndef NRF52_SERIES + return false; + #else + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810)\ + || defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811)\ + || defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833)\ + || defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + uint32_t var1 = *(uint32_t *)0x10000130ul; + uint32_t var2 = *(uint32_t *)0x10000134ul; + #endif + #if defined (NRF52840_XXAA) || defined (DEVELOP_IN_NRF52840) + if (var1 == 0x08) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + #if defined (NRF52810_XXAA) || defined (DEVELOP_IN_NRF52810) + if (var1 == 0x0A) + { + switch(var2) + { + case 0x00ul: + return false; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52833_XXAA) || defined (DEVELOP_IN_NRF52833) + if (var1 == 0x0D) + { + switch(var2) + { + case 0x00ul: + return true; + case 0x01ul: + return true; + } + } + #endif + #if defined (NRF52811_XXAA) || defined (DEVELOP_IN_NRF52811) + if (var1 == 0x0E) + { + switch(var2) + { + case 0x00ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf52_errata_230(void) +{ + #ifndef NRF52_SERIES + return false; + #else + return false; + #endif +} + +#endif /* NRF52_ERRATAS_H */ diff --git a/mdk/nrf5340_application.h b/mdk/nrf5340_application.h index 0a3fe465e..68c4839ba 100644 --- a/mdk/nrf5340_application.h +++ b/mdk/nrf5340_application.h @@ -18,10 +18,10 @@ * @file nrf5340_application.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:34 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:31 * from File 'nrf5340_application.svd', - * last modified on Friday, 25.10.2019 07:35:26 + * last modified on Friday, 17.01.2020 16:08:24 */ @@ -76,7 +76,9 @@ typedef enum { CLOCK_POWER_IRQn = 5, /*!< 5 CLOCK_POWER */ SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQn= 8, /*!< 8 SPIM0_SPIS0_TWIM0_TWIS0_UARTE0 */ SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQn= 9, /*!< 9 SPIM1_SPIS1_TWIM1_TWIS1_UARTE1 */ - SPIM2_IRQn = 10, /*!< 10 SPIM2 */ + SPIM4_IRQn = 10, /*!< 10 SPIM4 */ + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQn= 11, /*!< 11 SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 */ + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQn= 12, /*!< 12 SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 */ GPIOTE0_IRQn = 13, /*!< 13 GPIOTE0 */ SAADC_IRQn = 14, /*!< 14 SAADC */ TIMER0_IRQn = 15, /*!< 15 TIMER0 */ @@ -96,13 +98,15 @@ typedef enum { PWM0_IRQn = 33, /*!< 33 PWM0 */ PWM1_IRQn = 34, /*!< 34 PWM1 */ PWM2_IRQn = 35, /*!< 35 PWM2 */ + PWM3_IRQn = 36, /*!< 36 PWM3 */ PDM0_IRQn = 38, /*!< 38 PDM0 */ I2S0_IRQn = 40, /*!< 40 I2S0 */ IPC_IRQn = 42, /*!< 42 IPC */ QSPI_IRQn = 43, /*!< 43 QSPI */ NFCT_IRQn = 45, /*!< 45 NFCT */ GPIOTE1_IRQn = 47, /*!< 47 GPIOTE1 */ - QDEC_IRQn = 51, /*!< 51 QDEC */ + QDEC0_IRQn = 51, /*!< 51 QDEC0 */ + QDEC1_IRQn = 52, /*!< 52 QDEC1 */ USBD_IRQn = 54, /*!< 54 USBD */ USBREGULATOR_IRQn = 55, /*!< 55 USBREGULATOR */ KMU_IRQn = 57, /*!< 57 KMU */ @@ -254,11 +258,11 @@ typedef struct { __IOM uint32_t DEST; /*!< (@ 0x00000000) Description cluster: Destination address where content of the key value registers (KEYSLOT.KEYn.VALUE[0-3 ) will be pushed by KMU. Note that this - address MUST match that of a peripherals + address must match that of a peripherals APB mapped write-only key registers, else the KMU can push this key value into an address range which the CPU can potentially - read! */ + read. */ __IOM uint32_t PERM; /*!< (@ 0x00000004) Description cluster: Define permissions for the key slot. Bits 0-15 and 16-31 can only be written when equal to 0xFFFF. */ @@ -472,11 +476,11 @@ typedef struct { /** - * @brief RESET_NETWORK [NETWORK] (ULP Network core control) + * @brief RESET_NETWORK [NETWORK] (ULP network core control) */ typedef struct { __IM uint32_t RESERVED; - __IOM uint32_t FORCEOFF; /*!< (@ 0x00000004) Force off power and clock in Network core */ + __IOM uint32_t FORCEOFF; /*!< (@ 0x00000004) Force off power and clock in network core */ } RESET_NETWORK_Type; /*!< Size = 8 (0x8) */ @@ -1409,15 +1413,16 @@ typedef struct { /*!< (@ 0x40004000) REGULATORS_N */ typedef struct { /*!< (@ 0x40005000) CLOCK_NS Structure */ - __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFCLK source */ - __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFCLK source */ - __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK source */ + __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFCLK128M/HFCLK64M source as selected in + HFCLKSRC */ + __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFCLK128M/HFCLK64M source */ + __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK source as selected in LFCLKSRC */ __OM uint32_t TASKS_LFCLKSTOP; /*!< (@ 0x0000000C) Stop LFCLK source */ - __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start RCOSC32k calibration */ + __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start calibration of LFRC oscillator */ __IM uint32_t RESERVED; __OM uint32_t TASKS_HFCLKAUDIOSTART; /*!< (@ 0x00000018) Start HFCLKAUDIO source */ __OM uint32_t TASKS_HFCLKAUDIOSTOP; /*!< (@ 0x0000001C) Stop HFCLKAUDIO source */ - __OM uint32_t TASKS_HFCLK192MSTART; /*!< (@ 0x00000020) Start HFCLK192M source */ + __OM uint32_t TASKS_HFCLK192MSTART; /*!< (@ 0x00000020) Start HFCLK192M source as selected in HFCLK192MSRC */ __OM uint32_t TASKS_HFCLK192MSTOP; /*!< (@ 0x00000024) Stop HFCLK192M source */ __IM uint32_t RESERVED1[22]; __IOM uint32_t SUBSCRIBE_HFCLKSTART; /*!< (@ 0x00000080) Subscribe configuration for task HFCLKSTART */ @@ -1431,10 +1436,10 @@ typedef struct { /*!< (@ 0x40005000) CLOCK_NS Str __IOM uint32_t SUBSCRIBE_HFCLK192MSTART; /*!< (@ 0x000000A0) Subscribe configuration for task HFCLK192MSTART */ __IOM uint32_t SUBSCRIBE_HFCLK192MSTOP; /*!< (@ 0x000000A4) Subscribe configuration for task HFCLK192MSTOP */ __IM uint32_t RESERVED3[22]; - __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFCLK source started */ + __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFCLK128M/HFCLK64M source started */ __IOM uint32_t EVENTS_LFCLKSTARTED; /*!< (@ 0x00000104) LFCLK source started */ __IM uint32_t RESERVED4[5]; - __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000011C) Calibration of LFCLK RC oscillator complete event */ + __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000011C) Calibration of LFRC oscillator complete event */ __IOM uint32_t EVENTS_HFCLKAUDIOSTARTED; /*!< (@ 0x00000120) HFCLKAUDIO source started */ __IOM uint32_t EVENTS_HFCLK192MSTARTED; /*!< (@ 0x00000124) HFCLK192M source started */ __IM uint32_t RESERVED5[22]; @@ -1452,10 +1457,11 @@ typedef struct { /*!< (@ 0x40005000) CLOCK_NS Str __IM uint32_t RESERVED8[62]; __IM uint32_t HFCLKRUN; /*!< (@ 0x00000408) Status indicating that HFCLKSTART task has been triggered */ - __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) Status indicating which HFCLK source is running - Note: Value of this register in any CLOCK - instance reflects status only due to configurations/action - in that CLOCK instance. */ + __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) Status indicating which HFCLK128M/HFCLK64M source + is running Note: Value of this register + in any CLOCK instance reflects status only + due to configurations/actions in that CLOCK + instance. */ __IM uint32_t RESERVED9; __IM uint32_t LFCLKRUN; /*!< (@ 0x00000414) Status indicating that LFCLKSTART task has been triggered */ @@ -1468,22 +1474,23 @@ typedef struct { /*!< (@ 0x40005000) CLOCK_NS Str __IM uint32_t RESERVED10[12]; __IM uint32_t HFCLKAUDIORUN; /*!< (@ 0x00000450) Status indicating that HFCLKAUDIOSTART task has been triggered */ - __IM uint32_t HFCLKAUDIOSTAT; /*!< (@ 0x00000454) Which HFCLKAUDIO source is running */ + __IM uint32_t HFCLKAUDIOSTAT; /*!< (@ 0x00000454) Status indicating which HFCLKAUDIO source is + running */ __IM uint32_t HFCLK192MRUN; /*!< (@ 0x00000458) Status indicating that HFCLK192MSTART task has been triggered */ - __IM uint32_t HFCLK192MSTAT; /*!< (@ 0x0000045C) Which HFCLK192M source is running */ + __IM uint32_t HFCLK192MSTAT; /*!< (@ 0x0000045C) Status indicating which HFCLK192M source is running */ __IM uint32_t RESERVED11[45]; - __IOM uint32_t HFCLKSRC; /*!< (@ 0x00000514) Clock source for HFCLK */ - __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for the LFCLK */ + __IOM uint32_t HFCLKSRC; /*!< (@ 0x00000514) Clock source for HFCLK128M/HFCLK64M */ + __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for LFCLK */ __IM uint32_t RESERVED12[15]; - __IOM uint32_t HFCLKCTRL; /*!< (@ 0x00000558) HFCLK frequency configuration */ + __IOM uint32_t HFCLKCTRL; /*!< (@ 0x00000558) HFCLK128M frequency configuration */ __IOM CLOCK_HFCLKAUDIO_Type HFCLKAUDIO; /*!< (@ 0x0000055C) Unspecified */ __IM uint32_t RESERVED13[4]; - __IM uint32_t HFCLKALWAYSRUN; /*!< (@ 0x00000570) Automatic or manual control of HFCLK */ + __IM uint32_t HFCLKALWAYSRUN; /*!< (@ 0x00000570) Automatic or manual control of HFCLK128M/HFCLK64M */ __IM uint32_t LFCLKALWAYSRUN; /*!< (@ 0x00000574) Automatic or manual control of LFCLK */ __IM uint32_t RESERVED14; __IM uint32_t HFCLKAUDIOALWAYSRUN; /*!< (@ 0x0000057C) Automatic or manual control of HFCLKAUDIO */ - __IOM uint32_t HFCLK192MSRC; /*!< (@ 0x00000580) Clock source for the HFCLK192M oscillator */ + __IOM uint32_t HFCLK192MSRC; /*!< (@ 0x00000580) Clock source for HFCLK192M */ __IM uint32_t HFCLK192MALWAYSRUN; /*!< (@ 0x00000584) Automatic or manual control of HFCLK192M */ __IM uint32_t RESERVED15[12]; __IOM uint32_t HFCLK192MCTRL; /*!< (@ 0x000005B8) HFCLK192M frequency configuration */ @@ -1541,7 +1548,7 @@ typedef struct { /*!< (@ 0x40005000) RESET_NS Str __IM uint32_t RESERVED[256]; __IOM uint32_t RESETREAS; /*!< (@ 0x00000400) Reset reason */ __IM uint32_t RESERVED1[131]; - __IOM RESET_NETWORK_Type NETWORK; /*!< (@ 0x00000610) ULP Network core control */ + __IOM RESET_NETWORK_Type NETWORK; /*!< (@ 0x00000610) ULP network core control */ } NRF_RESET_Type; /*!< Size = 1560 (0x618) */ @@ -2773,15 +2780,15 @@ typedef struct { /*!< (@ 0x40030000) MUTEX_NS Str /* =========================================================================================================================== */ -/* ================ QDEC_NS ================ */ +/* ================ QDEC0_NS ================ */ /* =========================================================================================================================== */ /** - * @brief Quadrature Decoder 0 (QDEC_NS) + * @brief Quadrature Decoder 0 (QDEC0_NS) */ -typedef struct { /*!< (@ 0x40033000) QDEC_NS Structure */ +typedef struct { /*!< (@ 0x40033000) QDEC0_NS Structure */ __OM uint32_t TASKS_START; /*!< (@ 0x00000000) Task starting the quadrature decoder */ __OM uint32_t TASKS_STOP; /*!< (@ 0x00000004) Task stopping the quadrature decoder */ __OM uint32_t TASKS_READCLRACC; /*!< (@ 0x00000008) Read and clear ACC and ACCDBL */ @@ -3188,8 +3195,28 @@ typedef struct { /*!< (@ 0x40081000) VMC_NS Struc #define NRF_TWIM1_S_BASE 0x50009000UL #define NRF_TWIS1_S_BASE 0x50009000UL #define NRF_UARTE1_S_BASE 0x50009000UL -#define NRF_SPIM2_NS_BASE 0x4000A000UL -#define NRF_SPIM2_S_BASE 0x5000A000UL +#define NRF_SPIM4_NS_BASE 0x4000A000UL +#define NRF_SPIM4_S_BASE 0x5000A000UL +#define NRF_SPIM2_NS_BASE 0x4000B000UL +#define NRF_SPIS2_NS_BASE 0x4000B000UL +#define NRF_TWIM2_NS_BASE 0x4000B000UL +#define NRF_TWIS2_NS_BASE 0x4000B000UL +#define NRF_UARTE2_NS_BASE 0x4000B000UL +#define NRF_SPIM2_S_BASE 0x5000B000UL +#define NRF_SPIS2_S_BASE 0x5000B000UL +#define NRF_TWIM2_S_BASE 0x5000B000UL +#define NRF_TWIS2_S_BASE 0x5000B000UL +#define NRF_UARTE2_S_BASE 0x5000B000UL +#define NRF_SPIM3_NS_BASE 0x4000C000UL +#define NRF_SPIS3_NS_BASE 0x4000C000UL +#define NRF_TWIM3_NS_BASE 0x4000C000UL +#define NRF_TWIS3_NS_BASE 0x4000C000UL +#define NRF_UARTE3_NS_BASE 0x4000C000UL +#define NRF_SPIM3_S_BASE 0x5000C000UL +#define NRF_SPIS3_S_BASE 0x5000C000UL +#define NRF_TWIM3_S_BASE 0x5000C000UL +#define NRF_TWIS3_S_BASE 0x5000C000UL +#define NRF_UARTE3_S_BASE 0x5000C000UL #define NRF_GPIOTE0_S_BASE 0x5000D000UL #define NRF_SAADC_NS_BASE 0x4000E000UL #define NRF_SAADC_S_BASE 0x5000E000UL @@ -3231,6 +3258,8 @@ typedef struct { /*!< (@ 0x40081000) VMC_NS Struc #define NRF_PWM1_S_BASE 0x50022000UL #define NRF_PWM2_NS_BASE 0x40023000UL #define NRF_PWM2_S_BASE 0x50023000UL +#define NRF_PWM3_NS_BASE 0x40024000UL +#define NRF_PWM3_S_BASE 0x50024000UL #define NRF_PDM0_NS_BASE 0x40026000UL #define NRF_PDM0_S_BASE 0x50026000UL #define NRF_I2S0_NS_BASE 0x40028000UL @@ -3244,8 +3273,10 @@ typedef struct { /*!< (@ 0x40081000) VMC_NS Struc #define NRF_GPIOTE1_NS_BASE 0x4002F000UL #define NRF_MUTEX_NS_BASE 0x40030000UL #define NRF_MUTEX_S_BASE 0x50030000UL -#define NRF_QDEC_NS_BASE 0x40033000UL -#define NRF_QDEC_S_BASE 0x50033000UL +#define NRF_QDEC0_NS_BASE 0x40033000UL +#define NRF_QDEC0_S_BASE 0x50033000UL +#define NRF_QDEC1_NS_BASE 0x40034000UL +#define NRF_QDEC1_S_BASE 0x50034000UL #define NRF_USBD_NS_BASE 0x40036000UL #define NRF_USBD_S_BASE 0x50036000UL #define NRF_USBREGULATOR_NS_BASE 0x40037000UL @@ -3318,8 +3349,28 @@ typedef struct { /*!< (@ 0x40081000) VMC_NS Struc #define NRF_TWIM1_S ((NRF_TWIM_Type*) NRF_TWIM1_S_BASE) #define NRF_TWIS1_S ((NRF_TWIS_Type*) NRF_TWIS1_S_BASE) #define NRF_UARTE1_S ((NRF_UARTE_Type*) NRF_UARTE1_S_BASE) +#define NRF_SPIM4_NS ((NRF_SPIM_Type*) NRF_SPIM4_NS_BASE) +#define NRF_SPIM4_S ((NRF_SPIM_Type*) NRF_SPIM4_S_BASE) #define NRF_SPIM2_NS ((NRF_SPIM_Type*) NRF_SPIM2_NS_BASE) +#define NRF_SPIS2_NS ((NRF_SPIS_Type*) NRF_SPIS2_NS_BASE) +#define NRF_TWIM2_NS ((NRF_TWIM_Type*) NRF_TWIM2_NS_BASE) +#define NRF_TWIS2_NS ((NRF_TWIS_Type*) NRF_TWIS2_NS_BASE) +#define NRF_UARTE2_NS ((NRF_UARTE_Type*) NRF_UARTE2_NS_BASE) #define NRF_SPIM2_S ((NRF_SPIM_Type*) NRF_SPIM2_S_BASE) +#define NRF_SPIS2_S ((NRF_SPIS_Type*) NRF_SPIS2_S_BASE) +#define NRF_TWIM2_S ((NRF_TWIM_Type*) NRF_TWIM2_S_BASE) +#define NRF_TWIS2_S ((NRF_TWIS_Type*) NRF_TWIS2_S_BASE) +#define NRF_UARTE2_S ((NRF_UARTE_Type*) NRF_UARTE2_S_BASE) +#define NRF_SPIM3_NS ((NRF_SPIM_Type*) NRF_SPIM3_NS_BASE) +#define NRF_SPIS3_NS ((NRF_SPIS_Type*) NRF_SPIS3_NS_BASE) +#define NRF_TWIM3_NS ((NRF_TWIM_Type*) NRF_TWIM3_NS_BASE) +#define NRF_TWIS3_NS ((NRF_TWIS_Type*) NRF_TWIS3_NS_BASE) +#define NRF_UARTE3_NS ((NRF_UARTE_Type*) NRF_UARTE3_NS_BASE) +#define NRF_SPIM3_S ((NRF_SPIM_Type*) NRF_SPIM3_S_BASE) +#define NRF_SPIS3_S ((NRF_SPIS_Type*) NRF_SPIS3_S_BASE) +#define NRF_TWIM3_S ((NRF_TWIM_Type*) NRF_TWIM3_S_BASE) +#define NRF_TWIS3_S ((NRF_TWIS_Type*) NRF_TWIS3_S_BASE) +#define NRF_UARTE3_S ((NRF_UARTE_Type*) NRF_UARTE3_S_BASE) #define NRF_GPIOTE0_S ((NRF_GPIOTE_Type*) NRF_GPIOTE0_S_BASE) #define NRF_SAADC_NS ((NRF_SAADC_Type*) NRF_SAADC_NS_BASE) #define NRF_SAADC_S ((NRF_SAADC_Type*) NRF_SAADC_S_BASE) @@ -3361,6 +3412,8 @@ typedef struct { /*!< (@ 0x40081000) VMC_NS Struc #define NRF_PWM1_S ((NRF_PWM_Type*) NRF_PWM1_S_BASE) #define NRF_PWM2_NS ((NRF_PWM_Type*) NRF_PWM2_NS_BASE) #define NRF_PWM2_S ((NRF_PWM_Type*) NRF_PWM2_S_BASE) +#define NRF_PWM3_NS ((NRF_PWM_Type*) NRF_PWM3_NS_BASE) +#define NRF_PWM3_S ((NRF_PWM_Type*) NRF_PWM3_S_BASE) #define NRF_PDM0_NS ((NRF_PDM_Type*) NRF_PDM0_NS_BASE) #define NRF_PDM0_S ((NRF_PDM_Type*) NRF_PDM0_S_BASE) #define NRF_I2S0_NS ((NRF_I2S_Type*) NRF_I2S0_NS_BASE) @@ -3374,8 +3427,10 @@ typedef struct { /*!< (@ 0x40081000) VMC_NS Struc #define NRF_GPIOTE1_NS ((NRF_GPIOTE_Type*) NRF_GPIOTE1_NS_BASE) #define NRF_MUTEX_NS ((NRF_MUTEX_Type*) NRF_MUTEX_NS_BASE) #define NRF_MUTEX_S ((NRF_MUTEX_Type*) NRF_MUTEX_S_BASE) -#define NRF_QDEC_NS ((NRF_QDEC_Type*) NRF_QDEC_NS_BASE) -#define NRF_QDEC_S ((NRF_QDEC_Type*) NRF_QDEC_S_BASE) +#define NRF_QDEC0_NS ((NRF_QDEC_Type*) NRF_QDEC0_NS_BASE) +#define NRF_QDEC0_S ((NRF_QDEC_Type*) NRF_QDEC0_S_BASE) +#define NRF_QDEC1_NS ((NRF_QDEC_Type*) NRF_QDEC1_NS_BASE) +#define NRF_QDEC1_S ((NRF_QDEC_Type*) NRF_QDEC1_S_BASE) #define NRF_USBD_NS ((NRF_USBD_Type*) NRF_USBD_NS_BASE) #define NRF_USBD_S ((NRF_USBD_Type*) NRF_USBD_S_BASE) #define NRF_USBREGULATOR_NS ((NRF_USBREG_Type*) NRF_USBREGULATOR_NS_BASE) diff --git a/mdk/nrf5340_application.svd b/mdk/nrf5340_application.svd index 9dd8907ac..674d2546a 100644 --- a/mdk/nrf5340_application.svd +++ b/mdk/nrf5340_application.svd @@ -1156,9 +1156,9 @@ POSSIBILITY OF SUCH DAMAGE. DEST Description cluster: Destination address where content of the key value registers (KEYSLOT.KEYn.VALUE[0-3]) - will be pushed by KMU. Note that this address MUST match that of a peripherals + will be pushed by KMU. Note that this address must match that of a peripherals APB mapped write-only key registers, else the KMU can push this key value into - an address range which the CPU can potentially read! + an address range which the CPU can potentially read. 0x000 read-write 0xFFFFFFFF @@ -6861,7 +6861,7 @@ POSSIBILITY OF SUCH DAMAGE. Inactive - Normal voltage mode. Voltage supplied on VDD. + Normal voltage mode. Voltage supplied on VDD and VDDH. 0 @@ -7204,13 +7204,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_HFCLKSTART - Start HFCLK source + Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC 0x000 write-only TASKS_HFCLKSTART - Start HFCLK source + Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC 0 0 @@ -7225,13 +7225,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_HFCLKSTOP - Stop HFCLK source + Stop HFCLK128M/HFCLK64M source 0x004 write-only TASKS_HFCLKSTOP - Stop HFCLK source + Stop HFCLK128M/HFCLK64M source 0 0 @@ -7246,13 +7246,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_LFCLKSTART - Start LFCLK source + Start LFCLK source as selected in LFCLKSRC 0x008 write-only TASKS_LFCLKSTART - Start LFCLK source + Start LFCLK source as selected in LFCLKSRC 0 0 @@ -7288,13 +7288,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_CAL - Start RCOSC32k calibration + Start calibration of LFRC oscillator 0x010 write-only TASKS_CAL - Start RCOSC32k calibration + Start calibration of LFRC oscillator 0 0 @@ -7351,13 +7351,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_HFCLK192MSTART - Start HFCLK192M source + Start HFCLK192M source as selected in HFCLK192MSRC 0x020 write-only TASKS_HFCLK192MSTART - Start HFCLK192M source + Start HFCLK192M source as selected in HFCLK192MSRC 0 0 @@ -7672,13 +7672,13 @@ POSSIBILITY OF SUCH DAMAGE. EVENTS_HFCLKSTARTED - HFCLK source started + HFCLK128M/HFCLK64M source started 0x100 read-write EVENTS_HFCLKSTARTED - HFCLK source started + HFCLK128M/HFCLK64M source started 0 0 @@ -7724,13 +7724,13 @@ POSSIBILITY OF SUCH DAMAGE. EVENTS_DONE - Calibration of LFCLK RC oscillator complete event + Calibration of LFRC oscillator complete event 0x11C read-write EVENTS_DONE - Calibration of LFCLK RC oscillator complete event + Calibration of LFRC oscillator complete event 0 0 @@ -8470,7 +8470,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKSTAT - Status indicating which HFCLK source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. + Status indicating which HFCLK128M/HFCLK64M source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. 0x40C read-only @@ -8482,12 +8482,12 @@ POSSIBILITY OF SUCH DAMAGE. HFINT - HFCLK clock source: HFINT - 128 MHz on-chip oscillator + Clock source: HFINT - 128 MHz on-chip oscillator 0 HFXO - HFCLK clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator + Clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator 1 @@ -8693,7 +8693,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKAUDIOSTAT - Which HFCLKAUDIO source is running + Status indicating which HFCLKAUDIO source is running 0x454 read-only @@ -8763,7 +8763,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLK192MSTAT - Which HFCLK192M source is running + Status indicating which HFCLK192M source is running 0x45C read-only @@ -8825,7 +8825,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKSRC - Clock source for HFCLK + Clock source for HFCLK128M/HFCLK64M 0x514 read-write 0x00000001 @@ -8852,7 +8852,7 @@ POSSIBILITY OF SUCH DAMAGE. LFCLKSRC - Clock source for the LFCLK + Clock source for LFCLK 0x518 read-write 0x00000001 @@ -8889,7 +8889,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKCTRL - HFCLK frequency configuration + HFCLK128M frequency configuration 0x558 read-write 0x00000001 @@ -8938,7 +8938,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKALWAYSRUN - Automatic or manual control of HFCLK + Automatic or manual control of HFCLK128M/HFCLK64M 0x570 read-only @@ -9016,7 +9016,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLK192MSRC - Clock source for the HFCLK192M oscillator + Clock source for HFCLK192M 0x580 read-write 0x00000001 @@ -9696,7 +9696,7 @@ POSSIBILITY OF SUCH DAMAGE. DOG0 - Reset from watchdog timer 0 detected + Reset from application watchdog timer 0 detected 1 1 @@ -9732,7 +9732,7 @@ POSSIBILITY OF SUCH DAMAGE. SREQ - Reset from AIRCR.SYSRESETREQ detected + Reset from application soft reset detected 3 3 @@ -9750,7 +9750,7 @@ POSSIBILITY OF SUCH DAMAGE. LOCKUP - Reset from CPU lockup detected + Reset from application CPU lockup detected 4 4 @@ -9822,7 +9822,7 @@ POSSIBILITY OF SUCH DAMAGE. LSREQ - Reset from local soft reset detected + Reset from network soft reset detected 16 16 @@ -9840,7 +9840,7 @@ POSSIBILITY OF SUCH DAMAGE. LLOCKUP - Reset from local CPU lockup detected + Reset from network CPU lockup detected 17 17 @@ -9858,7 +9858,7 @@ POSSIBILITY OF SUCH DAMAGE. LDOG - Reset from local watchdog timer detected + Reset from network watchdog timer detected 18 18 @@ -9876,7 +9876,7 @@ POSSIBILITY OF SUCH DAMAGE. MFORCEOFF - Force off reset from Application core detected + Force off reset from application core detected 23 23 @@ -9912,7 +9912,7 @@ POSSIBILITY OF SUCH DAMAGE. DOG1 - Reset from watchdog timer 1 detected + Reset from application watchdog timer 1 detected 25 25 @@ -9948,7 +9948,7 @@ POSSIBILITY OF SUCH DAMAGE. LCTRLAP - Reset from local CTRL-AP detected + Reset from network CTRL-AP detected 27 27 @@ -9968,20 +9968,20 @@ POSSIBILITY OF SUCH DAMAGE. NETWORK - ULP Network core control + ULP network core control RESET_NETWORK read-write 0x610 FORCEOFF - Force off power and clock in Network core + Force off power and clock in network core 0x004 read-write 0x00000001 FORCEOFF - Force off power and clock in Network core + Force off power and clock in network core 0 0 @@ -18595,27 +18595,263 @@ POSSIBILITY OF SUCH DAMAGE. - SPIM2_NS + SPIM4_NS Serial Peripheral Interface Master with EasyDMA 4 0x4000A000 - SPIM2 + SPIM4 10 - SPIM2_S + SPIM4_S Serial Peripheral Interface Master with EasyDMA 5 0x5000A000 - SPIM2 + SPIM4 10 + + SPIM2_NS + Serial Peripheral Interface Master with EasyDMA 6 + 0x4000B000 + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + SPIS2_NS + SPI Slave 4 + 0x4000B000 + SPIM2_NS + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + TWIM2_NS + I2C compatible Two-Wire Master Interface with EasyDMA 4 + 0x4000B000 + SPIM2_NS + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + TWIS2_NS + I2C compatible Two-Wire Slave Interface with EasyDMA 4 + 0x4000B000 + SPIM2_NS + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + UARTE2_NS + UART with EasyDMA 4 + 0x4000B000 + SPIM2_NS + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + SPIM2_S + Serial Peripheral Interface Master with EasyDMA 7 + 0x5000B000 + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + SPIS2_S + SPI Slave 5 + 0x5000B000 + SPIM2_S + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + TWIM2_S + I2C compatible Two-Wire Master Interface with EasyDMA 5 + 0x5000B000 + SPIM2_S + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + TWIS2_S + I2C compatible Two-Wire Slave Interface with EasyDMA 5 + 0x5000B000 + SPIM2_S + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + UARTE2_S + UART with EasyDMA 5 + 0x5000B000 + SPIM2_S + + + + SPIM2_SPIS2_TWIM2_TWIS2_UARTE2 + 11 + + + + SPIM3_NS + Serial Peripheral Interface Master with EasyDMA 8 + 0x4000C000 + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + SPIS3_NS + SPI Slave 6 + 0x4000C000 + SPIM3_NS + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + TWIM3_NS + I2C compatible Two-Wire Master Interface with EasyDMA 6 + 0x4000C000 + SPIM3_NS + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + TWIS3_NS + I2C compatible Two-Wire Slave Interface with EasyDMA 6 + 0x4000C000 + SPIM3_NS + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + UARTE3_NS + UART with EasyDMA 6 + 0x4000C000 + SPIM3_NS + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + SPIM3_S + Serial Peripheral Interface Master with EasyDMA 9 + 0x5000C000 + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + SPIS3_S + SPI Slave 7 + 0x5000C000 + SPIM3_S + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + TWIM3_S + I2C compatible Two-Wire Master Interface with EasyDMA 7 + 0x5000C000 + SPIM3_S + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + TWIS3_S + I2C compatible Two-Wire Slave Interface with EasyDMA 7 + 0x5000C000 + SPIM3_S + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + + + UARTE3_S + UART with EasyDMA 7 + 0x5000C000 + SPIM3_S + + + + SPIM3_SPIS3_TWIM3_TWIS3_UARTE3 + 12 + + GPIOTE0_S GPIO Tasks and Events 0 @@ -34281,6 +34517,28 @@ POSSIBILITY OF SUCH DAMAGE. 35 + + PWM3_NS + Pulse width modulation unit 6 + 0x40024000 + + + + PWM3 + 36 + + + + PWM3_S + Pulse width modulation unit 7 + 0x50024000 + + + + PWM3 + 36 + + PDM0_NS Pulse Density Modulation (Digital Microphone) Interface 0 @@ -34851,7 +35109,7 @@ POSSIBILITY OF SUCH DAMAGE. FREQ - PDM_CLK frequency configuration Enumerations are deprecated, use + PDM_CLK frequency configuration. Enumerations are deprecated, use PDMCLKCTRL equation to find the register value. The 12 least significant bits of the register are ignored and shall be set to zero. 0 @@ -34951,17 +35209,17 @@ POSSIBILITY OF SUCH DAMAGE. MinGain - -20dB gain adjustment (minimum) + -20 dB gain adjustment (minimum) 0x00 DefaultGain - 0dB gain adjustment + 0 dB gain adjustment 0x28 MaxGain - +20dB gain adjustment (maximum) + +20 dB gain adjustment (maximum) 0x50 @@ -34983,17 +35241,17 @@ POSSIBILITY OF SUCH DAMAGE. MinGain - -20dB gain adjustment (minimum) + -20 dB gain adjustment (minimum) 0x00 DefaultGain - 0dB gain adjustment + 0 dB gain adjustment 0x28 MaxGain - +20dB gain adjustment (maximum) + +20 dB gain adjustment (maximum) 0x50 @@ -35127,7 +35385,7 @@ POSSIBILITY OF SUCH DAMAGE. PCLK32M - 32MHz peripheral clock + 32 MHz peripheral clock 0 @@ -43926,7 +44184,7 @@ POSSIBILITY OF SUCH DAMAGE. - QDEC_NS + QDEC0_NS Quadrature Decoder 0 0x40033000 QDEC @@ -43938,7 +44196,7 @@ POSSIBILITY OF SUCH DAMAGE. registers - QDEC + QDEC0 51 QDEC @@ -45333,17 +45591,39 @@ POSSIBILITY OF SUCH DAMAGE. - - QDEC_S + + QDEC0_S Quadrature Decoder 1 0x50033000 - QDEC + QDEC0 51 + + QDEC1_NS + Quadrature Decoder 2 + 0x40034000 + + + + QDEC1 + 52 + + + + QDEC1_S + Quadrature Decoder 3 + 0x50034000 + + + + QDEC1 + 52 + + USBD_NS Universal serial bus device 0 @@ -57614,20 +57894,10 @@ POSSIBILITY OF SUCH DAMAGE. Extra high drive '0', extra high drive '1' 11 - - E0H1 - Extra high drive '0', high drive '1' - 12 - - - H0E1 - High drive '0', extra high drive '1' - 13 - D0E1 Disconnect '0', extra high drive '1' (normally used for wired-or connections) - 14 + 13 E0D1 diff --git a/mdk/nrf5340_application_bitfields.h b/mdk/nrf5340_application_bitfields.h index cfc7ece0c..f7cb84a5b 100644 --- a/mdk/nrf5340_application_bitfields.h +++ b/mdk/nrf5340_application_bitfields.h @@ -204,25 +204,25 @@ POSSIBILITY OF SUCH DAMAGE. /* Description: Clock management 0 */ /* Register: CLOCK_TASKS_HFCLKSTART */ -/* Description: Start HFCLK source */ +/* Description: Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC */ -/* Bit 0 : Start HFCLK source */ +/* Bit 0 : Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC */ #define CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Pos (0UL) /*!< Position of TASKS_HFCLKSTART field. */ #define CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Msk (0x1UL << CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Pos) /*!< Bit mask of TASKS_HFCLKSTART field. */ #define CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_HFCLKSTOP */ -/* Description: Stop HFCLK source */ +/* Description: Stop HFCLK128M/HFCLK64M source */ -/* Bit 0 : Stop HFCLK source */ +/* Bit 0 : Stop HFCLK128M/HFCLK64M source */ #define CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Pos (0UL) /*!< Position of TASKS_HFCLKSTOP field. */ #define CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Msk (0x1UL << CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Pos) /*!< Bit mask of TASKS_HFCLKSTOP field. */ #define CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_LFCLKSTART */ -/* Description: Start LFCLK source */ +/* Description: Start LFCLK source as selected in LFCLKSRC */ -/* Bit 0 : Start LFCLK source */ +/* Bit 0 : Start LFCLK source as selected in LFCLKSRC */ #define CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Pos (0UL) /*!< Position of TASKS_LFCLKSTART field. */ #define CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Msk (0x1UL << CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Pos) /*!< Bit mask of TASKS_LFCLKSTART field. */ #define CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Trigger (1UL) /*!< Trigger task */ @@ -236,9 +236,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_TASKS_LFCLKSTOP_TASKS_LFCLKSTOP_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_CAL */ -/* Description: Start RCOSC32k calibration */ +/* Description: Start calibration of LFRC oscillator */ -/* Bit 0 : Start RCOSC32k calibration */ +/* Bit 0 : Start calibration of LFRC oscillator */ #define CLOCK_TASKS_CAL_TASKS_CAL_Pos (0UL) /*!< Position of TASKS_CAL field. */ #define CLOCK_TASKS_CAL_TASKS_CAL_Msk (0x1UL << CLOCK_TASKS_CAL_TASKS_CAL_Pos) /*!< Bit mask of TASKS_CAL field. */ #define CLOCK_TASKS_CAL_TASKS_CAL_Trigger (1UL) /*!< Trigger task */ @@ -260,9 +260,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_TASKS_HFCLKAUDIOSTOP_TASKS_HFCLKAUDIOSTOP_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_HFCLK192MSTART */ -/* Description: Start HFCLK192M source */ +/* Description: Start HFCLK192M source as selected in HFCLK192MSRC */ -/* Bit 0 : Start HFCLK192M source */ +/* Bit 0 : Start HFCLK192M source as selected in HFCLK192MSRC */ #define CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Pos (0UL) /*!< Position of TASKS_HFCLK192MSTART field. */ #define CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Msk (0x1UL << CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Pos) /*!< Bit mask of TASKS_HFCLK192MSTART field. */ #define CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Trigger (1UL) /*!< Trigger task */ @@ -393,9 +393,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_SUBSCRIBE_HFCLK192MSTOP_CHIDX_Msk (0xFFUL << CLOCK_SUBSCRIBE_HFCLK192MSTOP_CHIDX_Pos) /*!< Bit mask of CHIDX field. */ /* Register: CLOCK_EVENTS_HFCLKSTARTED */ -/* Description: HFCLK source started */ +/* Description: HFCLK128M/HFCLK64M source started */ -/* Bit 0 : HFCLK source started */ +/* Bit 0 : HFCLK128M/HFCLK64M source started */ #define CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_Pos (0UL) /*!< Position of EVENTS_HFCLKSTARTED field. */ #define CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_Msk (0x1UL << CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_Pos) /*!< Bit mask of EVENTS_HFCLKSTARTED field. */ #define CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_NotGenerated (0UL) /*!< Event not generated */ @@ -411,9 +411,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_EVENTS_LFCLKSTARTED_EVENTS_LFCLKSTARTED_Generated (1UL) /*!< Event generated */ /* Register: CLOCK_EVENTS_DONE */ -/* Description: Calibration of LFCLK RC oscillator complete event */ +/* Description: Calibration of LFRC oscillator complete event */ -/* Bit 0 : Calibration of LFCLK RC oscillator complete event */ +/* Bit 0 : Calibration of LFRC oscillator complete event */ #define CLOCK_EVENTS_DONE_EVENTS_DONE_Pos (0UL) /*!< Position of EVENTS_DONE field. */ #define CLOCK_EVENTS_DONE_EVENTS_DONE_Msk (0x1UL << CLOCK_EVENTS_DONE_EVENTS_DONE_Pos) /*!< Bit mask of EVENTS_DONE field. */ #define CLOCK_EVENTS_DONE_EVENTS_DONE_NotGenerated (0UL) /*!< Event not generated */ @@ -654,7 +654,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKRUN_STATUS_Triggered (1UL) /*!< Task triggered */ /* Register: CLOCK_HFCLKSTAT */ -/* Description: Status indicating which HFCLK source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. */ +/* Description: Status indicating which HFCLK128M/HFCLK64M source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. */ /* Bit 16 : HFCLK state */ #define CLOCK_HFCLKSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ @@ -671,8 +671,8 @@ POSSIBILITY OF SUCH DAMAGE. /* Bit 0 : Active clock source */ #define CLOCK_HFCLKSTAT_SRC_Pos (0UL) /*!< Position of SRC field. */ #define CLOCK_HFCLKSTAT_SRC_Msk (0x1UL << CLOCK_HFCLKSTAT_SRC_Pos) /*!< Bit mask of SRC field. */ -#define CLOCK_HFCLKSTAT_SRC_HFINT (0UL) /*!< HFCLK clock source: HFINT - 128 MHz on-chip oscillator */ -#define CLOCK_HFCLKSTAT_SRC_HFXO (1UL) /*!< HFCLK clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator */ +#define CLOCK_HFCLKSTAT_SRC_HFINT (0UL) /*!< Clock source: HFINT - 128 MHz on-chip oscillator */ +#define CLOCK_HFCLKSTAT_SRC_HFXO (1UL) /*!< Clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator */ /* Register: CLOCK_LFCLKRUN */ /* Description: Status indicating that LFCLKSTART task has been triggered */ @@ -727,7 +727,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKAUDIORUN_STATUS_Triggered (1UL) /*!< Task triggered */ /* Register: CLOCK_HFCLKAUDIOSTAT */ -/* Description: Which HFCLKAUDIO source is running */ +/* Description: Status indicating which HFCLKAUDIO source is running */ /* Bit 16 : HFCLKAUDIO state */ #define CLOCK_HFCLKAUDIOSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ @@ -751,7 +751,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLK192MRUN_STATUS_Triggered (1UL) /*!< Task triggered */ /* Register: CLOCK_HFCLK192MSTAT */ -/* Description: Which HFCLK192M source is running */ +/* Description: Status indicating which HFCLK192M source is running */ /* Bit 16 : HFCLK192M state */ #define CLOCK_HFCLK192MSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ @@ -772,7 +772,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLK192MSTAT_SRC_HFXO (1UL) /*!< Clock source: HFXO - derived from external 32 MHz crystal oscillator */ /* Register: CLOCK_HFCLKSRC */ -/* Description: Clock source for HFCLK */ +/* Description: Clock source for HFCLK128M/HFCLK64M */ /* Bit 0 : Select which HFCLK source is started by the HFCLKSTART task */ #define CLOCK_HFCLKSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ @@ -781,7 +781,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKSRC_SRC_HFXO (1UL) /*!< HFCLKSTART task starts HFXO oscillator */ /* Register: CLOCK_LFCLKSRC */ -/* Description: Clock source for the LFCLK */ +/* Description: Clock source for LFCLK */ /* Bits 1..0 : Select which LFCLK source is started by the LFCLKSTART task */ #define CLOCK_LFCLKSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ @@ -792,7 +792,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_LFCLKSRC_SRC_LFSYNT (3UL) /*!< 32.768 kHz synthesized from HFCLK */ /* Register: CLOCK_HFCLKCTRL */ -/* Description: HFCLK frequency configuration */ +/* Description: HFCLK128M frequency configuration */ /* Bit 0 : High frequency clock HCLK */ #define CLOCK_HFCLKCTRL_HCLK_Pos (0UL) /*!< Position of HCLK field. */ @@ -808,7 +808,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKAUDIO_FREQUENCY_FREQUENCY_Msk (0xFFFFUL << CLOCK_HFCLKAUDIO_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ /* Register: CLOCK_HFCLKALWAYSRUN */ -/* Description: Automatic or manual control of HFCLK */ +/* Description: Automatic or manual control of HFCLK128M/HFCLK64M */ /* Bit 0 : Ensure clock is always running */ #define CLOCK_HFCLKALWAYSRUN_ALWAYSRUN_Pos (0UL) /*!< Position of ALWAYSRUN field. */ @@ -835,7 +835,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKAUDIOALWAYSRUN_ALWAYSRUN_AlwaysRun (1UL) /*!< Ensure clock is always running */ /* Register: CLOCK_HFCLK192MSRC */ -/* Description: Clock source for the HFCLK192M oscillator */ +/* Description: Clock source for HFCLK192M */ /* Bit 0 : Select which HFCLK192M source is started by the HFCLK192MSTART task */ #define CLOCK_HFCLK192MSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ @@ -8574,9 +8574,7 @@ POSSIBILITY OF SUCH DAMAGE. #define GPIO_PIN_CNF_DRIVE_E0S1 (9UL) /*!< Extra high drive '0', standard '1' */ #define GPIO_PIN_CNF_DRIVE_S0E1 (10UL) /*!< Standard '0', extra high drive '1' */ #define GPIO_PIN_CNF_DRIVE_E0E1 (11UL) /*!< Extra high drive '0', extra high drive '1' */ -#define GPIO_PIN_CNF_DRIVE_E0H1 (12UL) /*!< Extra high drive '0', high drive '1' */ -#define GPIO_PIN_CNF_DRIVE_H0E1 (13UL) /*!< High drive '0', extra high drive '1' */ -#define GPIO_PIN_CNF_DRIVE_D0E1 (14UL) /*!< Disconnect '0', extra high drive '1' (normally used for wired-or connections) */ +#define GPIO_PIN_CNF_DRIVE_D0E1 (13UL) /*!< Disconnect '0', extra high drive '1' (normally used for wired-or connections) */ #define GPIO_PIN_CNF_DRIVE_E0D1 (15UL) /*!< Extra high drive '0', disconnect '1' (normally used for wired-and connections) */ /* Bits 3..2 : Pull configuration */ @@ -8791,7 +8789,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: PDM_PDMCLKCTRL */ /* Description: PDM clock generator control */ -/* Bits 31..0 : PDM_CLK frequency configuration Enumerations are deprecated, use +/* Bits 31..0 : PDM_CLK frequency configuration. Enumerations are deprecated, use PDMCLKCTRL equation to find the register value. The 12 least significant bits of the register are ignored and shall be set to zero. */ #define PDM_PDMCLKCTRL_FREQ_Pos (0UL) /*!< Position of FREQ field. */ @@ -8824,9 +8822,9 @@ POSSIBILITY OF SUCH DAMAGE. /* Bits 6..0 : Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) 0x00 -20 dB gain adjust 0x01 -19.5 dB gain adjust (...) 0x27 -0.5 dB gain adjust 0x28 0 dB gain adjust 0x29 +0.5 dB gain adjust (...) 0x4F +19.5 dB gain adjust 0x50 +20 dB gain adjust */ #define PDM_GAINL_GAINL_Pos (0UL) /*!< Position of GAINL field. */ #define PDM_GAINL_GAINL_Msk (0x7FUL << PDM_GAINL_GAINL_Pos) /*!< Bit mask of GAINL field. */ -#define PDM_GAINL_GAINL_MinGain (0x00UL) /*!< -20dB gain adjustment (minimum) */ -#define PDM_GAINL_GAINL_DefaultGain (0x28UL) /*!< 0dB gain adjustment */ -#define PDM_GAINL_GAINL_MaxGain (0x50UL) /*!< +20dB gain adjustment (maximum) */ +#define PDM_GAINL_GAINL_MinGain (0x00UL) /*!< -20 dB gain adjustment (minimum) */ +#define PDM_GAINL_GAINL_DefaultGain (0x28UL) /*!< 0 dB gain adjustment */ +#define PDM_GAINL_GAINL_MaxGain (0x50UL) /*!< +20 dB gain adjustment (maximum) */ /* Register: PDM_GAINR */ /* Description: Right output gain adjustment */ @@ -8834,9 +8832,9 @@ POSSIBILITY OF SUCH DAMAGE. /* Bits 6..0 : Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters) */ #define PDM_GAINR_GAINR_Pos (0UL) /*!< Position of GAINR field. */ #define PDM_GAINR_GAINR_Msk (0x7FUL << PDM_GAINR_GAINR_Pos) /*!< Bit mask of GAINR field. */ -#define PDM_GAINR_GAINR_MinGain (0x00UL) /*!< -20dB gain adjustment (minimum) */ -#define PDM_GAINR_GAINR_DefaultGain (0x28UL) /*!< 0dB gain adjustment */ -#define PDM_GAINR_GAINR_MaxGain (0x50UL) /*!< +20dB gain adjustment (maximum) */ +#define PDM_GAINR_GAINR_MinGain (0x00UL) /*!< -20 dB gain adjustment (minimum) */ +#define PDM_GAINR_GAINR_DefaultGain (0x28UL) /*!< 0 dB gain adjustment */ +#define PDM_GAINR_GAINR_MaxGain (0x50UL) /*!< +20 dB gain adjustment (maximum) */ /* Register: PDM_RATIO */ /* Description: Selects the ratio between PDM_CLK and output sample rate. Change PDMCLKCTRL accordingly. */ @@ -8887,7 +8885,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Bit 0 : Master clock source selection */ #define PDM_MCLKCONFIG_SRC_Pos (0UL) /*!< Position of SRC field. */ #define PDM_MCLKCONFIG_SRC_Msk (0x1UL << PDM_MCLKCONFIG_SRC_Pos) /*!< Bit mask of SRC field. */ -#define PDM_MCLKCONFIG_SRC_PCLK32M (0UL) /*!< 32MHz peripheral clock */ +#define PDM_MCLKCONFIG_SRC_PCLK32M (0UL) /*!< 32 MHz peripheral clock */ #define PDM_MCLKCONFIG_SRC_ACLK (1UL) /*!< Audio PLL clock */ /* Register: PDM_SAMPLE_PTR */ @@ -10751,7 +10749,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Bit 0 : VREGH status */ #define REGULATORS_MAINREGSTATUS_VREGH_Pos (0UL) /*!< Position of VREGH field. */ #define REGULATORS_MAINREGSTATUS_VREGH_Msk (0x1UL << REGULATORS_MAINREGSTATUS_VREGH_Pos) /*!< Bit mask of VREGH field. */ -#define REGULATORS_MAINREGSTATUS_VREGH_Inactive (0UL) /*!< Normal voltage mode. Voltage supplied on VDD. */ +#define REGULATORS_MAINREGSTATUS_VREGH_Inactive (0UL) /*!< Normal voltage mode. Voltage supplied on VDD and VDDH. */ #define REGULATORS_MAINREGSTATUS_VREGH_Active (1UL) /*!< High voltage mode. Voltage supplied on VDDH. */ /* Register: REGULATORS_SYSTEMOFF */ @@ -10839,7 +10837,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: RESET_RESETREAS */ /* Description: Reset reason */ -/* Bit 27 : Reset from local CTRL-AP detected */ +/* Bit 27 : Reset from network CTRL-AP detected */ #define RESET_RESETREAS_LCTRLAP_Pos (27UL) /*!< Position of LCTRLAP field. */ #define RESET_RESETREAS_LCTRLAP_Msk (0x1UL << RESET_RESETREAS_LCTRLAP_Pos) /*!< Bit mask of LCTRLAP field. */ #define RESET_RESETREAS_LCTRLAP_NotDetected (0UL) /*!< Not detected */ @@ -10851,7 +10849,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_VBUS_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_VBUS_Detected (1UL) /*!< Detected */ -/* Bit 25 : Reset from watchdog timer 1 detected */ +/* Bit 25 : Reset from application watchdog timer 1 detected */ #define RESET_RESETREAS_DOG1_Pos (25UL) /*!< Position of DOG1 field. */ #define RESET_RESETREAS_DOG1_Msk (0x1UL << RESET_RESETREAS_DOG1_Pos) /*!< Bit mask of DOG1 field. */ #define RESET_RESETREAS_DOG1_NotDetected (0UL) /*!< Not detected */ @@ -10863,25 +10861,25 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_NFC_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_NFC_Detected (1UL) /*!< Detected */ -/* Bit 23 : Force off reset from Application core detected */ +/* Bit 23 : Force off reset from application core detected */ #define RESET_RESETREAS_MFORCEOFF_Pos (23UL) /*!< Position of MFORCEOFF field. */ #define RESET_RESETREAS_MFORCEOFF_Msk (0x1UL << RESET_RESETREAS_MFORCEOFF_Pos) /*!< Bit mask of MFORCEOFF field. */ #define RESET_RESETREAS_MFORCEOFF_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_MFORCEOFF_Detected (1UL) /*!< Detected */ -/* Bit 18 : Reset from local watchdog timer detected */ +/* Bit 18 : Reset from network watchdog timer detected */ #define RESET_RESETREAS_LDOG_Pos (18UL) /*!< Position of LDOG field. */ #define RESET_RESETREAS_LDOG_Msk (0x1UL << RESET_RESETREAS_LDOG_Pos) /*!< Bit mask of LDOG field. */ #define RESET_RESETREAS_LDOG_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_LDOG_Detected (1UL) /*!< Detected */ -/* Bit 17 : Reset from local CPU lockup detected */ +/* Bit 17 : Reset from network CPU lockup detected */ #define RESET_RESETREAS_LLOCKUP_Pos (17UL) /*!< Position of LLOCKUP field. */ #define RESET_RESETREAS_LLOCKUP_Msk (0x1UL << RESET_RESETREAS_LLOCKUP_Pos) /*!< Bit mask of LLOCKUP field. */ #define RESET_RESETREAS_LLOCKUP_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_LLOCKUP_Detected (1UL) /*!< Detected */ -/* Bit 16 : Reset from local soft reset detected */ +/* Bit 16 : Reset from network soft reset detected */ #define RESET_RESETREAS_LSREQ_Pos (16UL) /*!< Position of LSREQ field. */ #define RESET_RESETREAS_LSREQ_Msk (0x1UL << RESET_RESETREAS_LSREQ_Pos) /*!< Bit mask of LSREQ field. */ #define RESET_RESETREAS_LSREQ_NotDetected (0UL) /*!< Not detected */ @@ -10905,13 +10903,13 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_OFF_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_OFF_Detected (1UL) /*!< Detected */ -/* Bit 4 : Reset from CPU lockup detected */ +/* Bit 4 : Reset from application CPU lockup detected */ #define RESET_RESETREAS_LOCKUP_Pos (4UL) /*!< Position of LOCKUP field. */ #define RESET_RESETREAS_LOCKUP_Msk (0x1UL << RESET_RESETREAS_LOCKUP_Pos) /*!< Bit mask of LOCKUP field. */ #define RESET_RESETREAS_LOCKUP_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_LOCKUP_Detected (1UL) /*!< Detected */ -/* Bit 3 : Reset from AIRCR.SYSRESETREQ detected */ +/* Bit 3 : Reset from application soft reset detected */ #define RESET_RESETREAS_SREQ_Pos (3UL) /*!< Position of SREQ field. */ #define RESET_RESETREAS_SREQ_Msk (0x1UL << RESET_RESETREAS_SREQ_Pos) /*!< Bit mask of SREQ field. */ #define RESET_RESETREAS_SREQ_NotDetected (0UL) /*!< Not detected */ @@ -10923,7 +10921,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_CTRLAP_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_CTRLAP_Detected (1UL) /*!< Detected */ -/* Bit 1 : Reset from watchdog timer 0 detected */ +/* Bit 1 : Reset from application watchdog timer 0 detected */ #define RESET_RESETREAS_DOG0_Pos (1UL) /*!< Position of DOG0 field. */ #define RESET_RESETREAS_DOG0_Msk (0x1UL << RESET_RESETREAS_DOG0_Pos) /*!< Bit mask of DOG0 field. */ #define RESET_RESETREAS_DOG0_NotDetected (0UL) /*!< Not detected */ @@ -10936,9 +10934,9 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_RESETPIN_Detected (1UL) /*!< Detected */ /* Register: RESET_NETWORK_FORCEOFF */ -/* Description: Force off power and clock in Network core */ +/* Description: Force off power and clock in network core */ -/* Bit 0 : Force off power and clock in Network core */ +/* Bit 0 : Force off power and clock in network core */ #define RESET_NETWORK_FORCEOFF_FORCEOFF_Pos (0UL) /*!< Position of FORCEOFF field. */ #define RESET_NETWORK_FORCEOFF_FORCEOFF_Msk (0x1UL << RESET_NETWORK_FORCEOFF_FORCEOFF_Pos) /*!< Bit mask of FORCEOFF field. */ #define RESET_NETWORK_FORCEOFF_FORCEOFF_Release (0UL) /*!< Release force off signal */ @@ -16504,9 +16502,9 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: UICR_KEYSLOT_CONFIG_DEST */ /* Description: Description cluster: Destination address where content of the key value registers (KEYSLOT.KEYn.VALUE[0-3]) - will be pushed by KMU. Note that this address MUST match that of a peripherals + will be pushed by KMU. Note that this address must match that of a peripherals APB mapped write-only key registers, else the KMU can push this key value into - an address range which the CPU can potentially read! */ + an address range which the CPU can potentially read. */ /* Bits 31..0 : Secure APB destination address */ #define UICR_KEYSLOT_CONFIG_DEST_DEST_Pos (0UL) /*!< Position of DEST field. */ diff --git a/mdk/nrf5340_application_erratas.h b/mdk/nrf5340_application_erratas.h deleted file mode 100644 index b9fc6f300..000000000 --- a/mdk/nrf5340_application_erratas.h +++ /dev/null @@ -1,801 +0,0 @@ -#ifndef NRF5340_APPLICATION_ERRATAS_H -#define NRF5340_APPLICATION_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_3(void) __UNUSED; -static bool errata_5(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_19(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_22(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_42(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_45(void) __UNUSED; -static bool errata_46(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_57(void) __UNUSED; -static bool errata_58(void) __UNUSED; -static bool errata_59(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_64(void) __UNUSED; -static bool errata_65(void) __UNUSED; - -static bool errata_3(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_5(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_7(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_8(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_13(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_18(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_19(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_21(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_22(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_28(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_42(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_44(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_45(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_46(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_49(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_57(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_58(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_59(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_64(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_65(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -#endif /* NRF5340_APPLICATION_ERRATAS_H */ diff --git a/mdk/nrf5340_application_peripherals.h b/mdk/nrf5340_application_peripherals.h index 55a1af01b..b58ae94f6 100644 --- a/mdk/nrf5340_application_peripherals.h +++ b/mdk/nrf5340_application_peripherals.h @@ -59,6 +59,10 @@ POSSIBILITY OF SUCH DAMAGE. #define REGULATORS_FEATURE_VDDH_PRESENT +/* USB Regulator Peripheral */ +#define USBREG_PRESENT +#define USBREG_COUNT 1 + /* Volatile Memory Controller Peripheral */ #define VMC_PRESENT #define VMC_COUNT 1 @@ -89,6 +93,9 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 #define P1_PIN_NUM 12 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL +#define P1_FEATURE_PINS_PRESENT 0x00000FFFUL + /* NFC Tag */ #define NFCT_PRESENT #define NFCT_COUNT 1 @@ -138,59 +145,77 @@ POSSIBILITY OF SUCH DAMAGE. /* Serial Peripheral Interface Master with DMA */ #define SPIM_PRESENT -#define SPIM_COUNT 3 +#define SPIM_COUNT 5 #define SPIM0_MAX_DATARATE 8 #define SPIM1_MAX_DATARATE 8 -#define SPIM2_MAX_DATARATE 32 +#define SPIM2_MAX_DATARATE 8 +#define SPIM3_MAX_DATARATE 8 +#define SPIM4_MAX_DATARATE 32 #define SPIM0_FEATURE_HARDWARE_CSN_PRESENT 0 #define SPIM1_FEATURE_HARDWARE_CSN_PRESENT 0 -#define SPIM2_FEATURE_HARDWARE_CSN_PRESENT 1 +#define SPIM2_FEATURE_HARDWARE_CSN_PRESENT 0 +#define SPIM3_FEATURE_HARDWARE_CSN_PRESENT 0 +#define SPIM4_FEATURE_HARDWARE_CSN_PRESENT 1 #define SPIM0_FEATURE_DCX_PRESENT 0 #define SPIM1_FEATURE_DCX_PRESENT 0 -#define SPIM2_FEATURE_DCX_PRESENT 1 +#define SPIM2_FEATURE_DCX_PRESENT 0 +#define SPIM3_FEATURE_DCX_PRESENT 0 +#define SPIM4_FEATURE_DCX_PRESENT 1 #define SPIM0_FEATURE_RXDELAY_PRESENT 0 #define SPIM1_FEATURE_RXDELAY_PRESENT 0 -#define SPIM2_FEATURE_RXDELAY_PRESENT 1 +#define SPIM2_FEATURE_RXDELAY_PRESENT 0 +#define SPIM3_FEATURE_RXDELAY_PRESENT 0 +#define SPIM4_FEATURE_RXDELAY_PRESENT 1 #define SPIM0_EASYDMA_MAXCNT_SIZE 16 #define SPIM1_EASYDMA_MAXCNT_SIZE 16 #define SPIM2_EASYDMA_MAXCNT_SIZE 16 +#define SPIM3_EASYDMA_MAXCNT_SIZE 16 +#define SPIM4_EASYDMA_MAXCNT_SIZE 16 /* Serial Peripheral Interface Slave with DMA*/ #define SPIS_PRESENT -#define SPIS_COUNT 2 +#define SPIS_COUNT 4 #define SPIS0_EASYDMA_MAXCNT_SIZE 16 #define SPIS1_EASYDMA_MAXCNT_SIZE 16 +#define SPIS2_EASYDMA_MAXCNT_SIZE 16 +#define SPIS3_EASYDMA_MAXCNT_SIZE 16 /* Two Wire Interface Master with DMA */ #define TWIM_PRESENT -#define TWIM_COUNT 2 +#define TWIM_COUNT 4 #define TWIM0_EASYDMA_MAXCNT_SIZE 16 #define TWIM1_EASYDMA_MAXCNT_SIZE 16 +#define TWIM2_EASYDMA_MAXCNT_SIZE 16 +#define TWIM3_EASYDMA_MAXCNT_SIZE 16 /* Two Wire Interface Slave with DMA */ #define TWIS_PRESENT -#define TWIS_COUNT 2 +#define TWIS_COUNT 4 #define TWIS0_EASYDMA_MAXCNT_SIZE 16 #define TWIS1_EASYDMA_MAXCNT_SIZE 16 +#define TWIS2_EASYDMA_MAXCNT_SIZE 16 +#define TWIS3_EASYDMA_MAXCNT_SIZE 16 /* Universal Asynchronous Receiver-Transmitter with DMA */ #define UARTE_PRESENT -#define UARTE_COUNT 2 +#define UARTE_COUNT 4 #define UARTE0_EASYDMA_MAXCNT_SIZE 16 #define UARTE1_EASYDMA_MAXCNT_SIZE 16 +#define UARTE2_EASYDMA_MAXCNT_SIZE 16 +#define UARTE3_EASYDMA_MAXCNT_SIZE 16 /* Quadrature Decoder */ #define QDEC_PRESENT -#define QDEC_COUNT 1 +#define QDEC_COUNT 2 /* Successive Approximation Analog to Digital Converter */ #define SAADC_PRESENT @@ -222,15 +247,17 @@ POSSIBILITY OF SUCH DAMAGE. /* Pulse Width Modulator */ #define PWM_PRESENT -#define PWM_COUNT 3 +#define PWM_COUNT 4 #define PWM0_CH_NUM 4 #define PWM1_CH_NUM 4 #define PWM2_CH_NUM 4 +#define PWM3_CH_NUM 4 #define PWM0_EASYDMA_MAXCNT_SIZE 15 #define PWM1_EASYDMA_MAXCNT_SIZE 15 #define PWM2_EASYDMA_MAXCNT_SIZE 15 +#define PWM3_EASYDMA_MAXCNT_SIZE 15 /* ARM TrustZone Cryptocell 310 */ #define CRYPTOCELL_PRESENT @@ -270,4 +297,8 @@ POSSIBILITY OF SUCH DAMAGE. #define USBD_EASYDMA_MAXCNT_SIZE 7 +/* Oscillators */ +#define OSCILLATORS_PRESENT +#define OSCILLATORS_COUNT 1 + #endif // _NRF5340_PERIPHERALS_H diff --git a/mdk/nrf5340_network.h b/mdk/nrf5340_network.h index 4af9cba24..faccf77c2 100644 --- a/mdk/nrf5340_network.h +++ b/mdk/nrf5340_network.h @@ -18,10 +18,10 @@ * @file nrf5340_network.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:34 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:31 * from File 'nrf5340_network.svd', - * last modified on Friday, 25.10.2019 07:35:26 + * last modified on Friday, 17.01.2020 16:08:24 */ @@ -185,11 +185,11 @@ typedef struct { /** - * @brief RESET_NETWORK [NETWORK] (ULP Network core control) + * @brief RESET_NETWORK [NETWORK] (ULP network core control) */ typedef struct { __IM uint32_t RESERVED; - __IOM uint32_t FORCEOFF; /*!< (@ 0x00000004) Force off power and clock in Network core */ + __IOM uint32_t FORCEOFF; /*!< (@ 0x00000004) Force off power and clock in network core */ } RESET_NETWORK_Type; /*!< Size = 8 (0x8) */ @@ -624,15 +624,16 @@ typedef struct { /*!< (@ 0x41004000) VREQCTRL_NS */ typedef struct { /*!< (@ 0x41005000) CLOCK_NS Structure */ - __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFCLK source */ - __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFCLK source */ - __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK source */ + __OM uint32_t TASKS_HFCLKSTART; /*!< (@ 0x00000000) Start HFCLK128M/HFCLK64M source as selected in + HFCLKSRC */ + __OM uint32_t TASKS_HFCLKSTOP; /*!< (@ 0x00000004) Stop HFCLK128M/HFCLK64M source */ + __OM uint32_t TASKS_LFCLKSTART; /*!< (@ 0x00000008) Start LFCLK source as selected in LFCLKSRC */ __OM uint32_t TASKS_LFCLKSTOP; /*!< (@ 0x0000000C) Stop LFCLK source */ - __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start RCOSC32k calibration */ + __OM uint32_t TASKS_CAL; /*!< (@ 0x00000010) Start calibration of LFRC oscillator */ __IM uint32_t RESERVED; __OM uint32_t TASKS_HFCLKAUDIOSTART; /*!< (@ 0x00000018) Start HFCLKAUDIO source */ __OM uint32_t TASKS_HFCLKAUDIOSTOP; /*!< (@ 0x0000001C) Stop HFCLKAUDIO source */ - __OM uint32_t TASKS_HFCLK192MSTART; /*!< (@ 0x00000020) Start HFCLK192M source */ + __OM uint32_t TASKS_HFCLK192MSTART; /*!< (@ 0x00000020) Start HFCLK192M source as selected in HFCLK192MSRC */ __OM uint32_t TASKS_HFCLK192MSTOP; /*!< (@ 0x00000024) Stop HFCLK192M source */ __IM uint32_t RESERVED1[22]; __IOM uint32_t SUBSCRIBE_HFCLKSTART; /*!< (@ 0x00000080) Subscribe configuration for task HFCLKSTART */ @@ -646,10 +647,10 @@ typedef struct { /*!< (@ 0x41005000) CLOCK_NS Str __IOM uint32_t SUBSCRIBE_HFCLK192MSTART; /*!< (@ 0x000000A0) Subscribe configuration for task HFCLK192MSTART */ __IOM uint32_t SUBSCRIBE_HFCLK192MSTOP; /*!< (@ 0x000000A4) Subscribe configuration for task HFCLK192MSTOP */ __IM uint32_t RESERVED3[22]; - __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFCLK source started */ + __IOM uint32_t EVENTS_HFCLKSTARTED; /*!< (@ 0x00000100) HFCLK128M/HFCLK64M source started */ __IOM uint32_t EVENTS_LFCLKSTARTED; /*!< (@ 0x00000104) LFCLK source started */ __IM uint32_t RESERVED4[5]; - __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000011C) Calibration of LFCLK RC oscillator complete event */ + __IOM uint32_t EVENTS_DONE; /*!< (@ 0x0000011C) Calibration of LFRC oscillator complete event */ __IOM uint32_t EVENTS_HFCLKAUDIOSTARTED; /*!< (@ 0x00000120) HFCLKAUDIO source started */ __IOM uint32_t EVENTS_HFCLK192MSTARTED; /*!< (@ 0x00000124) HFCLK192M source started */ __IM uint32_t RESERVED5[22]; @@ -667,10 +668,11 @@ typedef struct { /*!< (@ 0x41005000) CLOCK_NS Str __IM uint32_t RESERVED8[62]; __IM uint32_t HFCLKRUN; /*!< (@ 0x00000408) Status indicating that HFCLKSTART task has been triggered */ - __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) Status indicating which HFCLK source is running - Note: Value of this register in any CLOCK - instance reflects status only due to configurations/action - in that CLOCK instance. */ + __IM uint32_t HFCLKSTAT; /*!< (@ 0x0000040C) Status indicating which HFCLK128M/HFCLK64M source + is running Note: Value of this register + in any CLOCK instance reflects status only + due to configurations/actions in that CLOCK + instance. */ __IM uint32_t RESERVED9; __IM uint32_t LFCLKRUN; /*!< (@ 0x00000414) Status indicating that LFCLKSTART task has been triggered */ @@ -683,22 +685,23 @@ typedef struct { /*!< (@ 0x41005000) CLOCK_NS Str __IM uint32_t RESERVED10[12]; __IM uint32_t HFCLKAUDIORUN; /*!< (@ 0x00000450) Status indicating that HFCLKAUDIOSTART task has been triggered */ - __IM uint32_t HFCLKAUDIOSTAT; /*!< (@ 0x00000454) Which HFCLKAUDIO source is running */ + __IM uint32_t HFCLKAUDIOSTAT; /*!< (@ 0x00000454) Status indicating which HFCLKAUDIO source is + running */ __IM uint32_t HFCLK192MRUN; /*!< (@ 0x00000458) Status indicating that HFCLK192MSTART task has been triggered */ - __IM uint32_t HFCLK192MSTAT; /*!< (@ 0x0000045C) Which HFCLK192M source is running */ + __IM uint32_t HFCLK192MSTAT; /*!< (@ 0x0000045C) Status indicating which HFCLK192M source is running */ __IM uint32_t RESERVED11[45]; - __IOM uint32_t HFCLKSRC; /*!< (@ 0x00000514) Clock source for HFCLK */ - __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for the LFCLK */ + __IOM uint32_t HFCLKSRC; /*!< (@ 0x00000514) Clock source for HFCLK128M/HFCLK64M */ + __IOM uint32_t LFCLKSRC; /*!< (@ 0x00000518) Clock source for LFCLK */ __IM uint32_t RESERVED12[15]; - __IOM uint32_t HFCLKCTRL; /*!< (@ 0x00000558) HFCLK frequency configuration */ + __IOM uint32_t HFCLKCTRL; /*!< (@ 0x00000558) HFCLK128M frequency configuration */ __IOM CLOCK_HFCLKAUDIO_Type HFCLKAUDIO; /*!< (@ 0x0000055C) Unspecified */ __IM uint32_t RESERVED13[4]; - __IM uint32_t HFCLKALWAYSRUN; /*!< (@ 0x00000570) Automatic or manual control of HFCLK */ + __IM uint32_t HFCLKALWAYSRUN; /*!< (@ 0x00000570) Automatic or manual control of HFCLK128M/HFCLK64M */ __IM uint32_t LFCLKALWAYSRUN; /*!< (@ 0x00000574) Automatic or manual control of LFCLK */ __IM uint32_t RESERVED14; __IM uint32_t HFCLKAUDIOALWAYSRUN; /*!< (@ 0x0000057C) Automatic or manual control of HFCLKAUDIO */ - __IOM uint32_t HFCLK192MSRC; /*!< (@ 0x00000580) Clock source for the HFCLK192M oscillator */ + __IOM uint32_t HFCLK192MSRC; /*!< (@ 0x00000580) Clock source for HFCLK192M */ __IM uint32_t HFCLK192MALWAYSRUN; /*!< (@ 0x00000584) Automatic or manual control of HFCLK192M */ __IM uint32_t RESERVED15[12]; __IOM uint32_t HFCLK192MCTRL; /*!< (@ 0x000005B8) HFCLK192M frequency configuration */ @@ -756,7 +759,7 @@ typedef struct { /*!< (@ 0x41005000) RESET_NS Str __IM uint32_t RESERVED[256]; __IOM uint32_t RESETREAS; /*!< (@ 0x00000400) Reset reason */ __IM uint32_t RESERVED1[131]; - __IOM RESET_NETWORK_Type NETWORK; /*!< (@ 0x00000610) ULP Network core control */ + __IOM RESET_NETWORK_Type NETWORK; /*!< (@ 0x00000610) ULP network core control */ } NRF_RESET_Type; /*!< Size = 1560 (0x618) */ diff --git a/mdk/nrf5340_network.svd b/mdk/nrf5340_network.svd index 3cc0de1bc..415ca2edd 100644 --- a/mdk/nrf5340_network.svd +++ b/mdk/nrf5340_network.svd @@ -296,7 +296,7 @@ POSSIBILITY OF SUCH DAMAGE. Code memory page size in bytes 0x020 read-only - 0xFFFFFFFF + 0x00000800 CODEPAGESIZE @@ -318,7 +318,7 @@ POSSIBILITY OF SUCH DAMAGE. Code memory size 0x024 read-only - 0xFFFFFFFF + 0x00000080 CODESIZE @@ -340,7 +340,7 @@ POSSIBILITY OF SUCH DAMAGE. Device type 0x028 read-only - 0xFFFFFFFF + 0x00000000 DEVICETYPE @@ -2026,9 +2026,9 @@ POSSIBILITY OF SUCH DAMAGE. CPU ID 0 7 - - - + + + @@ -2128,13 +2128,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_HFCLKSTART - Start HFCLK source + Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC 0x000 write-only TASKS_HFCLKSTART - Start HFCLK source + Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC 0 0 @@ -2149,13 +2149,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_HFCLKSTOP - Stop HFCLK source + Stop HFCLK128M/HFCLK64M source 0x004 write-only TASKS_HFCLKSTOP - Stop HFCLK source + Stop HFCLK128M/HFCLK64M source 0 0 @@ -2170,13 +2170,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_LFCLKSTART - Start LFCLK source + Start LFCLK source as selected in LFCLKSRC 0x008 write-only TASKS_LFCLKSTART - Start LFCLK source + Start LFCLK source as selected in LFCLKSRC 0 0 @@ -2212,13 +2212,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_CAL - Start RCOSC32k calibration + Start calibration of LFRC oscillator 0x010 write-only TASKS_CAL - Start RCOSC32k calibration + Start calibration of LFRC oscillator 0 0 @@ -2275,13 +2275,13 @@ POSSIBILITY OF SUCH DAMAGE. TASKS_HFCLK192MSTART - Start HFCLK192M source + Start HFCLK192M source as selected in HFCLK192MSRC 0x020 write-only TASKS_HFCLK192MSTART - Start HFCLK192M source + Start HFCLK192M source as selected in HFCLK192MSRC 0 0 @@ -2596,13 +2596,13 @@ POSSIBILITY OF SUCH DAMAGE. EVENTS_HFCLKSTARTED - HFCLK source started + HFCLK128M/HFCLK64M source started 0x100 read-write EVENTS_HFCLKSTARTED - HFCLK source started + HFCLK128M/HFCLK64M source started 0 0 @@ -2648,13 +2648,13 @@ POSSIBILITY OF SUCH DAMAGE. EVENTS_DONE - Calibration of LFCLK RC oscillator complete event + Calibration of LFRC oscillator complete event 0x11C read-write EVENTS_DONE - Calibration of LFCLK RC oscillator complete event + Calibration of LFRC oscillator complete event 0 0 @@ -3394,7 +3394,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKSTAT - Status indicating which HFCLK source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. + Status indicating which HFCLK128M/HFCLK64M source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. 0x40C read-only @@ -3406,12 +3406,12 @@ POSSIBILITY OF SUCH DAMAGE. HFINT - HFCLK clock source: HFINT - 128 MHz on-chip oscillator + Clock source: HFINT - 128 MHz on-chip oscillator 0 HFXO - HFCLK clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator + Clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator 1 @@ -3617,7 +3617,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKAUDIOSTAT - Which HFCLKAUDIO source is running + Status indicating which HFCLKAUDIO source is running 0x454 read-only @@ -3687,7 +3687,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLK192MSTAT - Which HFCLK192M source is running + Status indicating which HFCLK192M source is running 0x45C read-only @@ -3749,7 +3749,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKSRC - Clock source for HFCLK + Clock source for HFCLK128M/HFCLK64M 0x514 read-write 0x00000001 @@ -3776,7 +3776,7 @@ POSSIBILITY OF SUCH DAMAGE. LFCLKSRC - Clock source for the LFCLK + Clock source for LFCLK 0x518 read-write 0x00000001 @@ -3813,7 +3813,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKCTRL - HFCLK frequency configuration + HFCLK128M frequency configuration 0x558 read-write 0x00000000 @@ -3862,7 +3862,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLKALWAYSRUN - Automatic or manual control of HFCLK + Automatic or manual control of HFCLK128M/HFCLK64M 0x570 read-only @@ -3940,7 +3940,7 @@ POSSIBILITY OF SUCH DAMAGE. HFCLK192MSRC - Clock source for the HFCLK192M oscillator + Clock source for HFCLK192M 0x580 read-write 0x00000001 @@ -4620,7 +4620,7 @@ POSSIBILITY OF SUCH DAMAGE. DOG0 - Reset from watchdog timer 0 detected + Reset from application watchdog timer 0 detected 1 1 @@ -4656,7 +4656,7 @@ POSSIBILITY OF SUCH DAMAGE. SREQ - Reset from AIRCR.SYSRESETREQ detected + Reset from application soft reset detected 3 3 @@ -4674,7 +4674,7 @@ POSSIBILITY OF SUCH DAMAGE. LOCKUP - Reset from CPU lockup detected + Reset from application CPU lockup detected 4 4 @@ -4746,7 +4746,7 @@ POSSIBILITY OF SUCH DAMAGE. LSREQ - Reset from local soft reset detected + Reset from network soft reset detected 16 16 @@ -4764,7 +4764,7 @@ POSSIBILITY OF SUCH DAMAGE. LLOCKUP - Reset from local CPU lockup detected + Reset from network CPU lockup detected 17 17 @@ -4782,7 +4782,7 @@ POSSIBILITY OF SUCH DAMAGE. LDOG - Reset from local watchdog timer detected + Reset from network watchdog timer detected 18 18 @@ -4800,7 +4800,7 @@ POSSIBILITY OF SUCH DAMAGE. MFORCEOFF - Force off reset from Application core detected + Force off reset from application core detected 23 23 @@ -4836,7 +4836,7 @@ POSSIBILITY OF SUCH DAMAGE. DOG1 - Reset from watchdog timer 1 detected + Reset from application watchdog timer 1 detected 25 25 @@ -4872,7 +4872,7 @@ POSSIBILITY OF SUCH DAMAGE. LCTRLAP - Reset from local CTRL-AP detected + Reset from network CTRL-AP detected 27 27 @@ -4892,20 +4892,20 @@ POSSIBILITY OF SUCH DAMAGE. NETWORK - ULP Network core control + ULP network core control RESET_NETWORK read-write 0x610 FORCEOFF - Force off power and clock in Network core + Force off power and clock in network core 0x004 read-write 0x00000001 FORCEOFF - Force off power and clock in Network core + Force off power and clock in network core 0 0 @@ -38119,20 +38119,10 @@ POSSIBILITY OF SUCH DAMAGE. Extra high drive '0', extra high drive '1' 11 - - E0H1 - Extra high drive '0', high drive '1' - 12 - - - H0E1 - High drive '0', extra high drive '1' - 13 - D0E1 Disconnect '0', extra high drive '1' (normally used for wired-or connections) - 14 + 13 E0D1 diff --git a/mdk/nrf5340_network_bitfields.h b/mdk/nrf5340_network_bitfields.h index 9174f1f16..516db8601 100644 --- a/mdk/nrf5340_network_bitfields.h +++ b/mdk/nrf5340_network_bitfields.h @@ -595,25 +595,25 @@ POSSIBILITY OF SUCH DAMAGE. /* Description: Clock management */ /* Register: CLOCK_TASKS_HFCLKSTART */ -/* Description: Start HFCLK source */ +/* Description: Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC */ -/* Bit 0 : Start HFCLK source */ +/* Bit 0 : Start HFCLK128M/HFCLK64M source as selected in HFCLKSRC */ #define CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Pos (0UL) /*!< Position of TASKS_HFCLKSTART field. */ #define CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Msk (0x1UL << CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Pos) /*!< Bit mask of TASKS_HFCLKSTART field. */ #define CLOCK_TASKS_HFCLKSTART_TASKS_HFCLKSTART_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_HFCLKSTOP */ -/* Description: Stop HFCLK source */ +/* Description: Stop HFCLK128M/HFCLK64M source */ -/* Bit 0 : Stop HFCLK source */ +/* Bit 0 : Stop HFCLK128M/HFCLK64M source */ #define CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Pos (0UL) /*!< Position of TASKS_HFCLKSTOP field. */ #define CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Msk (0x1UL << CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Pos) /*!< Bit mask of TASKS_HFCLKSTOP field. */ #define CLOCK_TASKS_HFCLKSTOP_TASKS_HFCLKSTOP_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_LFCLKSTART */ -/* Description: Start LFCLK source */ +/* Description: Start LFCLK source as selected in LFCLKSRC */ -/* Bit 0 : Start LFCLK source */ +/* Bit 0 : Start LFCLK source as selected in LFCLKSRC */ #define CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Pos (0UL) /*!< Position of TASKS_LFCLKSTART field. */ #define CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Msk (0x1UL << CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Pos) /*!< Bit mask of TASKS_LFCLKSTART field. */ #define CLOCK_TASKS_LFCLKSTART_TASKS_LFCLKSTART_Trigger (1UL) /*!< Trigger task */ @@ -627,9 +627,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_TASKS_LFCLKSTOP_TASKS_LFCLKSTOP_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_CAL */ -/* Description: Start RCOSC32k calibration */ +/* Description: Start calibration of LFRC oscillator */ -/* Bit 0 : Start RCOSC32k calibration */ +/* Bit 0 : Start calibration of LFRC oscillator */ #define CLOCK_TASKS_CAL_TASKS_CAL_Pos (0UL) /*!< Position of TASKS_CAL field. */ #define CLOCK_TASKS_CAL_TASKS_CAL_Msk (0x1UL << CLOCK_TASKS_CAL_TASKS_CAL_Pos) /*!< Bit mask of TASKS_CAL field. */ #define CLOCK_TASKS_CAL_TASKS_CAL_Trigger (1UL) /*!< Trigger task */ @@ -651,9 +651,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_TASKS_HFCLKAUDIOSTOP_TASKS_HFCLKAUDIOSTOP_Trigger (1UL) /*!< Trigger task */ /* Register: CLOCK_TASKS_HFCLK192MSTART */ -/* Description: Start HFCLK192M source */ +/* Description: Start HFCLK192M source as selected in HFCLK192MSRC */ -/* Bit 0 : Start HFCLK192M source */ +/* Bit 0 : Start HFCLK192M source as selected in HFCLK192MSRC */ #define CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Pos (0UL) /*!< Position of TASKS_HFCLK192MSTART field. */ #define CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Msk (0x1UL << CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Pos) /*!< Bit mask of TASKS_HFCLK192MSTART field. */ #define CLOCK_TASKS_HFCLK192MSTART_TASKS_HFCLK192MSTART_Trigger (1UL) /*!< Trigger task */ @@ -784,9 +784,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_SUBSCRIBE_HFCLK192MSTOP_CHIDX_Msk (0xFFUL << CLOCK_SUBSCRIBE_HFCLK192MSTOP_CHIDX_Pos) /*!< Bit mask of CHIDX field. */ /* Register: CLOCK_EVENTS_HFCLKSTARTED */ -/* Description: HFCLK source started */ +/* Description: HFCLK128M/HFCLK64M source started */ -/* Bit 0 : HFCLK source started */ +/* Bit 0 : HFCLK128M/HFCLK64M source started */ #define CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_Pos (0UL) /*!< Position of EVENTS_HFCLKSTARTED field. */ #define CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_Msk (0x1UL << CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_Pos) /*!< Bit mask of EVENTS_HFCLKSTARTED field. */ #define CLOCK_EVENTS_HFCLKSTARTED_EVENTS_HFCLKSTARTED_NotGenerated (0UL) /*!< Event not generated */ @@ -802,9 +802,9 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_EVENTS_LFCLKSTARTED_EVENTS_LFCLKSTARTED_Generated (1UL) /*!< Event generated */ /* Register: CLOCK_EVENTS_DONE */ -/* Description: Calibration of LFCLK RC oscillator complete event */ +/* Description: Calibration of LFRC oscillator complete event */ -/* Bit 0 : Calibration of LFCLK RC oscillator complete event */ +/* Bit 0 : Calibration of LFRC oscillator complete event */ #define CLOCK_EVENTS_DONE_EVENTS_DONE_Pos (0UL) /*!< Position of EVENTS_DONE field. */ #define CLOCK_EVENTS_DONE_EVENTS_DONE_Msk (0x1UL << CLOCK_EVENTS_DONE_EVENTS_DONE_Pos) /*!< Bit mask of EVENTS_DONE field. */ #define CLOCK_EVENTS_DONE_EVENTS_DONE_NotGenerated (0UL) /*!< Event not generated */ @@ -1045,7 +1045,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKRUN_STATUS_Triggered (1UL) /*!< Task triggered */ /* Register: CLOCK_HFCLKSTAT */ -/* Description: Status indicating which HFCLK source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. */ +/* Description: Status indicating which HFCLK128M/HFCLK64M source is running Note: Value of this register in any CLOCK instance reflects status only due to configurations/actions in that CLOCK instance. */ /* Bit 16 : HFCLK state */ #define CLOCK_HFCLKSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ @@ -1062,8 +1062,8 @@ POSSIBILITY OF SUCH DAMAGE. /* Bit 0 : Active clock source */ #define CLOCK_HFCLKSTAT_SRC_Pos (0UL) /*!< Position of SRC field. */ #define CLOCK_HFCLKSTAT_SRC_Msk (0x1UL << CLOCK_HFCLKSTAT_SRC_Pos) /*!< Bit mask of SRC field. */ -#define CLOCK_HFCLKSTAT_SRC_HFINT (0UL) /*!< HFCLK clock source: HFINT - 128 MHz on-chip oscillator */ -#define CLOCK_HFCLKSTAT_SRC_HFXO (1UL) /*!< HFCLK clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator */ +#define CLOCK_HFCLKSTAT_SRC_HFINT (0UL) /*!< Clock source: HFINT - 128 MHz on-chip oscillator */ +#define CLOCK_HFCLKSTAT_SRC_HFXO (1UL) /*!< Clock source: HFXO - 128 MHz clock derived from external 32 MHz crystal oscillator */ /* Register: CLOCK_LFCLKRUN */ /* Description: Status indicating that LFCLKSTART task has been triggered */ @@ -1118,7 +1118,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKAUDIORUN_STATUS_Triggered (1UL) /*!< Task triggered */ /* Register: CLOCK_HFCLKAUDIOSTAT */ -/* Description: Which HFCLKAUDIO source is running */ +/* Description: Status indicating which HFCLKAUDIO source is running */ /* Bit 16 : HFCLKAUDIO state */ #define CLOCK_HFCLKAUDIOSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ @@ -1142,7 +1142,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLK192MRUN_STATUS_Triggered (1UL) /*!< Task triggered */ /* Register: CLOCK_HFCLK192MSTAT */ -/* Description: Which HFCLK192M source is running */ +/* Description: Status indicating which HFCLK192M source is running */ /* Bit 16 : HFCLK192M state */ #define CLOCK_HFCLK192MSTAT_STATE_Pos (16UL) /*!< Position of STATE field. */ @@ -1163,7 +1163,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLK192MSTAT_SRC_HFXO (1UL) /*!< Clock source: HFXO - derived from external 32 MHz crystal oscillator */ /* Register: CLOCK_HFCLKSRC */ -/* Description: Clock source for HFCLK */ +/* Description: Clock source for HFCLK128M/HFCLK64M */ /* Bit 0 : Select which HFCLK source is started by the HFCLKSTART task */ #define CLOCK_HFCLKSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ @@ -1172,7 +1172,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKSRC_SRC_HFXO (1UL) /*!< HFCLKSTART task starts HFXO oscillator */ /* Register: CLOCK_LFCLKSRC */ -/* Description: Clock source for the LFCLK */ +/* Description: Clock source for LFCLK */ /* Bits 1..0 : Select which LFCLK source is started by the LFCLKSTART task */ #define CLOCK_LFCLKSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ @@ -1183,7 +1183,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_LFCLKSRC_SRC_LFSYNT (3UL) /*!< 32.768 kHz synthesized from HFCLK */ /* Register: CLOCK_HFCLKCTRL */ -/* Description: HFCLK frequency configuration */ +/* Description: HFCLK128M frequency configuration */ /* Bit 0 : High frequency clock HCLK */ #define CLOCK_HFCLKCTRL_HCLK_Pos (0UL) /*!< Position of HCLK field. */ @@ -1199,7 +1199,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKAUDIO_FREQUENCY_FREQUENCY_Msk (0xFFFFUL << CLOCK_HFCLKAUDIO_FREQUENCY_FREQUENCY_Pos) /*!< Bit mask of FREQUENCY field. */ /* Register: CLOCK_HFCLKALWAYSRUN */ -/* Description: Automatic or manual control of HFCLK */ +/* Description: Automatic or manual control of HFCLK128M/HFCLK64M */ /* Bit 0 : Ensure clock is always running */ #define CLOCK_HFCLKALWAYSRUN_ALWAYSRUN_Pos (0UL) /*!< Position of ALWAYSRUN field. */ @@ -1226,7 +1226,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CLOCK_HFCLKAUDIOALWAYSRUN_ALWAYSRUN_AlwaysRun (1UL) /*!< Ensure clock is always running */ /* Register: CLOCK_HFCLK192MSRC */ -/* Description: Clock source for the HFCLK192M oscillator */ +/* Description: Clock source for HFCLK192M */ /* Bit 0 : Select which HFCLK192M source is started by the HFCLK192MSTART task */ #define CLOCK_HFCLK192MSRC_SRC_Pos (0UL) /*!< Position of SRC field. */ @@ -5774,9 +5774,7 @@ POSSIBILITY OF SUCH DAMAGE. #define GPIO_PIN_CNF_DRIVE_E0S1 (9UL) /*!< Extra high drive '0', standard '1' */ #define GPIO_PIN_CNF_DRIVE_S0E1 (10UL) /*!< Standard '0', extra high drive '1' */ #define GPIO_PIN_CNF_DRIVE_E0E1 (11UL) /*!< Extra high drive '0', extra high drive '1' */ -#define GPIO_PIN_CNF_DRIVE_E0H1 (12UL) /*!< Extra high drive '0', high drive '1' */ -#define GPIO_PIN_CNF_DRIVE_H0E1 (13UL) /*!< High drive '0', extra high drive '1' */ -#define GPIO_PIN_CNF_DRIVE_D0E1 (14UL) /*!< Disconnect '0', extra high drive '1' (normally used for wired-or connections) */ +#define GPIO_PIN_CNF_DRIVE_D0E1 (13UL) /*!< Disconnect '0', extra high drive '1' (normally used for wired-or connections) */ #define GPIO_PIN_CNF_DRIVE_E0D1 (15UL) /*!< Extra high drive '0', disconnect '1' (normally used for wired-and connections) */ /* Bits 3..2 : Pull configuration */ @@ -7977,7 +7975,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Register: RESET_RESETREAS */ /* Description: Reset reason */ -/* Bit 27 : Reset from local CTRL-AP detected */ +/* Bit 27 : Reset from network CTRL-AP detected */ #define RESET_RESETREAS_LCTRLAP_Pos (27UL) /*!< Position of LCTRLAP field. */ #define RESET_RESETREAS_LCTRLAP_Msk (0x1UL << RESET_RESETREAS_LCTRLAP_Pos) /*!< Bit mask of LCTRLAP field. */ #define RESET_RESETREAS_LCTRLAP_NotDetected (0UL) /*!< Not detected */ @@ -7989,7 +7987,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_VBUS_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_VBUS_Detected (1UL) /*!< Detected */ -/* Bit 25 : Reset from watchdog timer 1 detected */ +/* Bit 25 : Reset from application watchdog timer 1 detected */ #define RESET_RESETREAS_DOG1_Pos (25UL) /*!< Position of DOG1 field. */ #define RESET_RESETREAS_DOG1_Msk (0x1UL << RESET_RESETREAS_DOG1_Pos) /*!< Bit mask of DOG1 field. */ #define RESET_RESETREAS_DOG1_NotDetected (0UL) /*!< Not detected */ @@ -8001,25 +7999,25 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_NFC_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_NFC_Detected (1UL) /*!< Detected */ -/* Bit 23 : Force off reset from Application core detected */ +/* Bit 23 : Force off reset from application core detected */ #define RESET_RESETREAS_MFORCEOFF_Pos (23UL) /*!< Position of MFORCEOFF field. */ #define RESET_RESETREAS_MFORCEOFF_Msk (0x1UL << RESET_RESETREAS_MFORCEOFF_Pos) /*!< Bit mask of MFORCEOFF field. */ #define RESET_RESETREAS_MFORCEOFF_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_MFORCEOFF_Detected (1UL) /*!< Detected */ -/* Bit 18 : Reset from local watchdog timer detected */ +/* Bit 18 : Reset from network watchdog timer detected */ #define RESET_RESETREAS_LDOG_Pos (18UL) /*!< Position of LDOG field. */ #define RESET_RESETREAS_LDOG_Msk (0x1UL << RESET_RESETREAS_LDOG_Pos) /*!< Bit mask of LDOG field. */ #define RESET_RESETREAS_LDOG_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_LDOG_Detected (1UL) /*!< Detected */ -/* Bit 17 : Reset from local CPU lockup detected */ +/* Bit 17 : Reset from network CPU lockup detected */ #define RESET_RESETREAS_LLOCKUP_Pos (17UL) /*!< Position of LLOCKUP field. */ #define RESET_RESETREAS_LLOCKUP_Msk (0x1UL << RESET_RESETREAS_LLOCKUP_Pos) /*!< Bit mask of LLOCKUP field. */ #define RESET_RESETREAS_LLOCKUP_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_LLOCKUP_Detected (1UL) /*!< Detected */ -/* Bit 16 : Reset from local soft reset detected */ +/* Bit 16 : Reset from network soft reset detected */ #define RESET_RESETREAS_LSREQ_Pos (16UL) /*!< Position of LSREQ field. */ #define RESET_RESETREAS_LSREQ_Msk (0x1UL << RESET_RESETREAS_LSREQ_Pos) /*!< Bit mask of LSREQ field. */ #define RESET_RESETREAS_LSREQ_NotDetected (0UL) /*!< Not detected */ @@ -8043,13 +8041,13 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_OFF_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_OFF_Detected (1UL) /*!< Detected */ -/* Bit 4 : Reset from CPU lockup detected */ +/* Bit 4 : Reset from application CPU lockup detected */ #define RESET_RESETREAS_LOCKUP_Pos (4UL) /*!< Position of LOCKUP field. */ #define RESET_RESETREAS_LOCKUP_Msk (0x1UL << RESET_RESETREAS_LOCKUP_Pos) /*!< Bit mask of LOCKUP field. */ #define RESET_RESETREAS_LOCKUP_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_LOCKUP_Detected (1UL) /*!< Detected */ -/* Bit 3 : Reset from AIRCR.SYSRESETREQ detected */ +/* Bit 3 : Reset from application soft reset detected */ #define RESET_RESETREAS_SREQ_Pos (3UL) /*!< Position of SREQ field. */ #define RESET_RESETREAS_SREQ_Msk (0x1UL << RESET_RESETREAS_SREQ_Pos) /*!< Bit mask of SREQ field. */ #define RESET_RESETREAS_SREQ_NotDetected (0UL) /*!< Not detected */ @@ -8061,7 +8059,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_CTRLAP_NotDetected (0UL) /*!< Not detected */ #define RESET_RESETREAS_CTRLAP_Detected (1UL) /*!< Detected */ -/* Bit 1 : Reset from watchdog timer 0 detected */ +/* Bit 1 : Reset from application watchdog timer 0 detected */ #define RESET_RESETREAS_DOG0_Pos (1UL) /*!< Position of DOG0 field. */ #define RESET_RESETREAS_DOG0_Msk (0x1UL << RESET_RESETREAS_DOG0_Pos) /*!< Bit mask of DOG0 field. */ #define RESET_RESETREAS_DOG0_NotDetected (0UL) /*!< Not detected */ @@ -8074,9 +8072,9 @@ POSSIBILITY OF SUCH DAMAGE. #define RESET_RESETREAS_RESETPIN_Detected (1UL) /*!< Detected */ /* Register: RESET_NETWORK_FORCEOFF */ -/* Description: Force off power and clock in Network core */ +/* Description: Force off power and clock in network core */ -/* Bit 0 : Force off power and clock in Network core */ +/* Bit 0 : Force off power and clock in network core */ #define RESET_NETWORK_FORCEOFF_FORCEOFF_Pos (0UL) /*!< Position of FORCEOFF field. */ #define RESET_NETWORK_FORCEOFF_FORCEOFF_Msk (0x1UL << RESET_NETWORK_FORCEOFF_FORCEOFF_Pos) /*!< Bit mask of FORCEOFF field. */ #define RESET_NETWORK_FORCEOFF_FORCEOFF_Release (0UL) /*!< Release force off signal */ diff --git a/mdk/nrf5340_network_erratas.h b/mdk/nrf5340_network_erratas.h deleted file mode 100644 index a197a10c6..000000000 --- a/mdk/nrf5340_network_erratas.h +++ /dev/null @@ -1,619 +0,0 @@ -#ifndef NRF5340_NETWORK_ERRATAS_H -#define NRF5340_NETWORK_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_6(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_11(void) __UNUSED; -static bool errata_13(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_18(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_28(void) __UNUSED; -static bool errata_29(void) __UNUSED; -static bool errata_30(void) __UNUSED; -static bool errata_32(void) __UNUSED; -static bool errata_37(void) __UNUSED; -static bool errata_44(void) __UNUSED; -static bool errata_47(void) __UNUSED; -static bool errata_49(void) __UNUSED; -static bool errata_55(void) __UNUSED; -static bool errata_62(void) __UNUSED; -static bool errata_64(void) __UNUSED; - -static bool errata_6(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_10(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_11(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_13(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_14(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_18(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_21(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_28(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_29(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_30(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_32(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_37(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_44(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_47(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_49(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_55(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_62(void) -{ - return false; -} - -static bool errata_64(void) -{ - uint32_t var1 = *(uint32_t *)0x01FF0130ul; - uint32_t var2 = *(uint32_t *)0x01FF0134ul; - - switch(var1) - { - case 0x07: - switch(var2) - { - case 0x02ul: - return true; - case 0x03ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -#endif /* NRF5340_NETWORK_ERRATAS_H */ diff --git a/mdk/nrf5340_network_peripherals.h b/mdk/nrf5340_network_peripherals.h index 86c34cbe8..071a602f6 100644 --- a/mdk/nrf5340_network_peripherals.h +++ b/mdk/nrf5340_network_peripherals.h @@ -78,6 +78,9 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 #define P1_PIN_NUM 12 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL +#define P1_FEATURE_PINS_PRESENT 0x00000FFFUL + /* ACL */ #define ACL_PRESENT @@ -88,6 +91,7 @@ POSSIBILITY OF SUCH DAMAGE. #define RADIO_COUNT 1 #define RADIO_EASYDMA_MAXCNT_SIZE 9 +#define RADIO_FEATURE_IEEE_802_15_4_PRESENT /* Accelerated Address Resolver */ #define AAR_PRESENT diff --git a/mdk/nrf53_erratas.h b/mdk/nrf53_erratas.h new file mode 100644 index 000000000..28b2d4165 --- /dev/null +++ b/mdk/nrf53_erratas.h @@ -0,0 +1,1609 @@ +#ifndef NRF53_ERRATAS_H +#define NRF53_ERRATAS_H + +/* + +Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of Nordic Semiconductor ASA nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include +#include +#include "compiler_abstraction.h" + +static bool nrf53_errata_3(void) __UNUSED; +static bool nrf53_errata_4(void) __UNUSED; +static bool nrf53_errata_5(void) __UNUSED; +static bool nrf53_errata_6(void) __UNUSED; +static bool nrf53_errata_7(void) __UNUSED; +static bool nrf53_errata_8(void) __UNUSED; +static bool nrf53_errata_9(void) __UNUSED; +static bool nrf53_errata_10(void) __UNUSED; +static bool nrf53_errata_11(void) __UNUSED; +static bool nrf53_errata_12(void) __UNUSED; +static bool nrf53_errata_13(void) __UNUSED; +static bool nrf53_errata_14(void) __UNUSED; +static bool nrf53_errata_15(void) __UNUSED; +static bool nrf53_errata_16(void) __UNUSED; +static bool nrf53_errata_18(void) __UNUSED; +static bool nrf53_errata_19(void) __UNUSED; +static bool nrf53_errata_20(void) __UNUSED; +static bool nrf53_errata_21(void) __UNUSED; +static bool nrf53_errata_22(void) __UNUSED; +static bool nrf53_errata_23(void) __UNUSED; +static bool nrf53_errata_26(void) __UNUSED; +static bool nrf53_errata_27(void) __UNUSED; +static bool nrf53_errata_28(void) __UNUSED; +static bool nrf53_errata_29(void) __UNUSED; +static bool nrf53_errata_30(void) __UNUSED; +static bool nrf53_errata_32(void) __UNUSED; +static bool nrf53_errata_33(void) __UNUSED; +static bool nrf53_errata_37(void) __UNUSED; +static bool nrf53_errata_42(void) __UNUSED; +static bool nrf53_errata_43(void) __UNUSED; +static bool nrf53_errata_44(void) __UNUSED; +static bool nrf53_errata_45(void) __UNUSED; +static bool nrf53_errata_46(void) __UNUSED; +static bool nrf53_errata_47(void) __UNUSED; +static bool nrf53_errata_49(void) __UNUSED; +static bool nrf53_errata_50(void) __UNUSED; +static bool nrf53_errata_51(void) __UNUSED; +static bool nrf53_errata_53(void) __UNUSED; +static bool nrf53_errata_54(void) __UNUSED; +static bool nrf53_errata_55(void) __UNUSED; +static bool nrf53_errata_57(void) __UNUSED; +static bool nrf53_errata_58(void) __UNUSED; +static bool nrf53_errata_59(void) __UNUSED; +static bool nrf53_errata_62(void) __UNUSED; +static bool nrf53_errata_64(void) __UNUSED; +static bool nrf53_errata_65(void) __UNUSED; +static bool nrf53_errata_69(void) __UNUSED; +static bool nrf53_errata_72(void) __UNUSED; +static bool nrf53_errata_73(void) __UNUSED; +static bool nrf53_errata_74(void) __UNUSED; +static bool nrf53_errata_79(void) __UNUSED; +static bool nrf53_errata_80(void) __UNUSED; +static bool nrf53_errata_81(void) __UNUSED; +static bool nrf53_errata_82(void) __UNUSED; +static bool nrf53_errata_83(void) __UNUSED; +static bool nrf53_errata_84(void) __UNUSED; + +static bool nrf53_errata_3(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_4(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_5(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_6(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_7(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_8(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_9(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_10(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_11(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_12(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_13(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_14(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_15(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_16(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_18(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_19(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_20(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_21(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_22(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_23(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_26(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_27(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_28(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_29(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_30(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_32(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_33(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_37(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_42(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_43(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_44(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_45(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_46(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_47(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_49(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_50(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_51(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_53(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_54(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #if defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_55(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_57(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_58(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_59(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_62(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_64(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_65(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_69(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_72(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_73(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_74(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + #if defined(NRF_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #elif defined(NRF_NETWORK) + uint32_t var1 = *(uint32_t *)0x01FF0130ul; + uint32_t var2 = *(uint32_t *)0x01FF0134ul; + #endif + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION)\ + || defined (NRF5340_XXAA_NETWORK) || defined (DEVELOP_IN_NRF5340_NETWORK) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_79(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_80(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_81(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_82(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_83(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf53_errata_84(void) +{ + #ifndef NRF53_SERIES + return false; + #else + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF5340_XXAA_APPLICATION) || defined (DEVELOP_IN_NRF5340_APPLICATION) + if (var1 == 0x07) + { + switch(var2) + { + case 0x02ul: + return true; + case 0x03ul: + return false; + } + } + #endif + return false; + #endif +} + +#endif /* NRF53_ERRATAS_H */ diff --git a/mdk/nrf9160.h b/mdk/nrf9160.h index bc96babeb..ab5066ac1 100644 --- a/mdk/nrf9160.h +++ b/mdk/nrf9160.h @@ -30,10 +30,10 @@ * @file nrf9160.h * @brief CMSIS HeaderFile * @version 1 - * @date 25. October 2019 - * @note Generated by SVDConv V3.3.25 on Friday, 25.10.2019 09:35:35 + * @date 17. January 2020 + * @note Generated by SVDConv V3.3.25 on Friday, 17.01.2020 17:08:31 * from File 'nrf9160.svd', - * last modified on Friday, 25.10.2019 07:35:26 + * last modified on Friday, 17.01.2020 16:08:24 */ diff --git a/mdk/nrf9160_erratas.h b/mdk/nrf9160_erratas.h deleted file mode 100644 index c86469214..000000000 --- a/mdk/nrf9160_erratas.h +++ /dev/null @@ -1,561 +0,0 @@ -#ifndef NRF9160_ERRATAS_H -#define NRF9160_ERRATAS_H - -/* - -Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of Nordic Semiconductor ASA nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include -#include -#include "compiler_abstraction.h" - -static bool errata_1(void) __UNUSED; -static bool errata_2(void) __UNUSED; -static bool errata_4(void) __UNUSED; -static bool errata_6(void) __UNUSED; -static bool errata_7(void) __UNUSED; -static bool errata_8(void) __UNUSED; -static bool errata_9(void) __UNUSED; -static bool errata_10(void) __UNUSED; -static bool errata_12(void) __UNUSED; -static bool errata_14(void) __UNUSED; -static bool errata_15(void) __UNUSED; -static bool errata_16(void) __UNUSED; -static bool errata_17(void) __UNUSED; -static bool errata_20(void) __UNUSED; -static bool errata_21(void) __UNUSED; -static bool errata_23(void) __UNUSED; -static bool errata_24(void) __UNUSED; -static bool errata_26(void) __UNUSED; -static bool errata_27(void) __UNUSED; -static bool errata_31(void) __UNUSED; - -static bool errata_1(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_2(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_4(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_6(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_7(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_8(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_9(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return false; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_10(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_12(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_14(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_15(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return false; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_16(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_17(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_20(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return false; - default: - return false; - break; - } - break; - - } - - return false; -} - -static bool errata_21(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_23(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_24(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_26(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_27(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return false; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -static bool errata_31(void) -{ - uint32_t var1 = *(uint32_t *)0x00FF0130ul; - uint32_t var2 = *(uint32_t *)0x00FF0134ul; - - switch(var1) - { - case 0x09: - switch(var2) - { - case 0x01ul: - return true; - case 0x02ul: - return true; - default: - return true; - break; - } - break; - - } - - return false; -} - -#endif /* NRF9160_ERRATAS_H */ diff --git a/mdk/nrf9160_peripherals.h b/mdk/nrf9160_peripherals.h index bd1933358..cc1f32fb3 100644 --- a/mdk/nrf9160_peripherals.h +++ b/mdk/nrf9160_peripherals.h @@ -56,6 +56,8 @@ POSSIBILITY OF SUCH DAMAGE. #define P0_PIN_NUM 32 +#define P0_FEATURE_PINS_PRESENT 0xFFFFFFFFUL + /* Distributed Peripheral to Peripheral Interconnect */ #define DPPI_PRESENT #define DPPI_COUNT 1 @@ -107,46 +109,46 @@ POSSIBILITY OF SUCH DAMAGE. #define SPIM2_MAX_DATARATE 8 #define SPIM3_MAX_DATARATE 8 -#define SPIM0_EASYDMA_MAXCNT_SIZE 16 -#define SPIM1_EASYDMA_MAXCNT_SIZE 16 -#define SPIM2_EASYDMA_MAXCNT_SIZE 16 -#define SPIM3_EASYDMA_MAXCNT_SIZE 16 +#define SPIM0_EASYDMA_MAXCNT_SIZE 12 +#define SPIM1_EASYDMA_MAXCNT_SIZE 12 +#define SPIM2_EASYDMA_MAXCNT_SIZE 12 +#define SPIM3_EASYDMA_MAXCNT_SIZE 12 /* Serial Peripheral Interface Slave with DMA*/ #define SPIS_PRESENT #define SPIS_COUNT 4 -#define SPIS0_EASYDMA_MAXCNT_SIZE 16 -#define SPIS1_EASYDMA_MAXCNT_SIZE 16 -#define SPIS2_EASYDMA_MAXCNT_SIZE 16 -#define SPIS3_EASYDMA_MAXCNT_SIZE 16 +#define SPIS0_EASYDMA_MAXCNT_SIZE 12 +#define SPIS1_EASYDMA_MAXCNT_SIZE 12 +#define SPIS2_EASYDMA_MAXCNT_SIZE 12 +#define SPIS3_EASYDMA_MAXCNT_SIZE 12 /* Two Wire Interface Master with DMA */ #define TWIM_PRESENT #define TWIM_COUNT 4 -#define TWIM0_EASYDMA_MAXCNT_SIZE 16 -#define TWIM1_EASYDMA_MAXCNT_SIZE 16 -#define TWIM2_EASYDMA_MAXCNT_SIZE 16 -#define TWIM3_EASYDMA_MAXCNT_SIZE 16 +#define TWIM0_EASYDMA_MAXCNT_SIZE 12 +#define TWIM1_EASYDMA_MAXCNT_SIZE 12 +#define TWIM2_EASYDMA_MAXCNT_SIZE 12 +#define TWIM3_EASYDMA_MAXCNT_SIZE 12 /* Two Wire Interface Slave with DMA */ #define TWIS_PRESENT #define TWIS_COUNT 4 -#define TWIS0_EASYDMA_MAXCNT_SIZE 16 -#define TWIS1_EASYDMA_MAXCNT_SIZE 16 -#define TWIS2_EASYDMA_MAXCNT_SIZE 16 -#define TWIS3_EASYDMA_MAXCNT_SIZE 16 +#define TWIS0_EASYDMA_MAXCNT_SIZE 12 +#define TWIS1_EASYDMA_MAXCNT_SIZE 12 +#define TWIS2_EASYDMA_MAXCNT_SIZE 12 +#define TWIS3_EASYDMA_MAXCNT_SIZE 12 /* Universal Asynchronous Receiver-Transmitter with DMA */ #define UARTE_PRESENT #define UARTE_COUNT 4 -#define UARTE0_EASYDMA_MAXCNT_SIZE 16 -#define UARTE1_EASYDMA_MAXCNT_SIZE 16 -#define UARTE2_EASYDMA_MAXCNT_SIZE 16 -#define UARTE3_EASYDMA_MAXCNT_SIZE 16 +#define UARTE0_EASYDMA_MAXCNT_SIZE 12 +#define UARTE1_EASYDMA_MAXCNT_SIZE 12 +#define UARTE2_EASYDMA_MAXCNT_SIZE 12 +#define UARTE3_EASYDMA_MAXCNT_SIZE 12 /* Successive Approximation Analog to Digital Converter */ #define SAADC_PRESENT diff --git a/mdk/nrf91_erratas.h b/mdk/nrf91_erratas.h new file mode 100644 index 000000000..12312ce7f --- /dev/null +++ b/mdk/nrf91_erratas.h @@ -0,0 +1,639 @@ +#ifndef NRF91_ERRATAS_H +#define NRF91_ERRATAS_H + +/* + +Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of Nordic Semiconductor ASA nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include +#include +#include "compiler_abstraction.h" + +static bool nrf91_errata_1(void) __UNUSED; +static bool nrf91_errata_2(void) __UNUSED; +static bool nrf91_errata_4(void) __UNUSED; +static bool nrf91_errata_6(void) __UNUSED; +static bool nrf91_errata_7(void) __UNUSED; +static bool nrf91_errata_8(void) __UNUSED; +static bool nrf91_errata_9(void) __UNUSED; +static bool nrf91_errata_10(void) __UNUSED; +static bool nrf91_errata_12(void) __UNUSED; +static bool nrf91_errata_14(void) __UNUSED; +static bool nrf91_errata_15(void) __UNUSED; +static bool nrf91_errata_16(void) __UNUSED; +static bool nrf91_errata_17(void) __UNUSED; +static bool nrf91_errata_20(void) __UNUSED; +static bool nrf91_errata_21(void) __UNUSED; +static bool nrf91_errata_23(void) __UNUSED; +static bool nrf91_errata_24(void) __UNUSED; +static bool nrf91_errata_26(void) __UNUSED; +static bool nrf91_errata_27(void) __UNUSED; +static bool nrf91_errata_28(void) __UNUSED; +static bool nrf91_errata_29(void) __UNUSED; +static bool nrf91_errata_30(void) __UNUSED; +static bool nrf91_errata_31(void) __UNUSED; + +static bool nrf91_errata_1(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_2(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_4(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_6(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_7(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_8(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_9(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return false; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_10(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_12(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_14(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_15(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return false; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_16(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_17(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_20(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return false; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_21(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_23(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_24(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_26(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_27(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return false; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_28(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_29(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_30(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +static bool nrf91_errata_31(void) +{ + #ifndef NRF91_SERIES + return false; + #else + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + uint32_t var1 = *(uint32_t *)0x00FF0130ul; + uint32_t var2 = *(uint32_t *)0x00FF0134ul; + #endif + #if defined (NRF9160_XXAA) || defined (DEVELOP_IN_NRF9160) + if (var1 == 0x09) + { + switch(var2) + { + case 0x01ul: + return true; + case 0x02ul: + return true; + } + } + #endif + return false; + #endif +} + +#endif /* NRF91_ERRATAS_H */ diff --git a/mdk/nrf_erratas.h b/mdk/nrf_erratas.h index f71e70b8b..85ea75263 100644 --- a/mdk/nrf_erratas.h +++ b/mdk/nrf_erratas.h @@ -30,71 +30,18 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef NRF_ERRATAS_H__ -#define NRF_ERRATAS_H__ +#ifndef NRF_ERRATAS_H +#define NRF_ERRATAS_H #include "nrf.h" /*lint ++flb "Enter library region */ -#if defined(NRF51422_XXAA) ||\ - defined(NRF51422_XXAB) ||\ - defined(NRF51422_XXAC) - #include "nrf51422_erratas.h" -#elif defined(NRF51801_XXAB) - #include "nrf51801_erratas.h" -#elif defined(NRF51802_XXAA) - #include "nrf51802_erratas.h" -#elif defined(NRF51822_XXAA) ||\ - defined(NRF51822_XXAB) ||\ - defined(NRF51822_XXAC) - #include "nrf51822_erratas.h" -#elif defined(NRF51824_XXAA) - #include "nrf51824_erratas.h" -#elif defined(NRF51) - #include "nrf51_erratas.h" -#elif defined(NRF52805_XXAA) - #include "nrf52805_erratas.h" -#elif defined(NRF52810_XXAA) - #include "nrf52810_erratas.h" -#elif defined(NRF52811_XXAA) - #include "nrf52811_erratas.h" -#elif defined(NRF52832_XXAA) ||\ - defined(NRF52832_XXAB) - #include "nrf52832_erratas.h" -#elif defined(NRF52833_XXAA) - #include "nrf52833_erratas.h" -#elif defined(NRF52840_XXAA) - #include "nrf52840_erratas.h" -#elif defined(NRF5340_XXAA_APPLICATION) - #include "nrf5340_application_erratas.h" -#elif defined(NRF5340_XXAA_NETWORK) - #include "nrf5340_network_erratas.h" -#elif defined(NRF9160_XXAA) - #include "nrf9160_erratas.h" -#else - #error "Device must be defined. See nrf.h." -#endif /* NRF51422_XXAA, - NRF51422_XXAB, - NRF51422_XXAC, - NRF51801_XXAB, - NRF51802_XXAA, - NRF51822_XXAA, - NRF51822_XXAB, - NRF51822_XXAC, - NRF51824_XXAA, - NRF51, - NRF52805_XXAA, - NRF52810_XXAA, - NRF52811_XXAA, - NRF52832_XXAA, - NRF52832_XXAB, - NRF52833_XXAA, - NRF52840_XXAA, - NRF5340_XXAA_APPLICATION, - NRF5340_XXAA_NETWORK, - NRF9160_XXAA */ +#include "nrf51_erratas.h" +#include "nrf52_erratas.h" +#include "nrf53_erratas.h" +#include "nrf91_erratas.h" /*lint --flb "Leave library region" */ -#endif // NRF_ERRATAS_H__ +#endif // NRF_ERRATAS_H diff --git a/mdk/ses_startup_nrf5340_application.s b/mdk/ses_startup_nrf5340_application.s index 2ce047c6e..7d244c2b1 100644 --- a/mdk/ses_startup_nrf5340_application.s +++ b/mdk/ses_startup_nrf5340_application.s @@ -138,8 +138,14 @@ Dummy_Handler: .weak SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler .thumb_set SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler, Dummy_Handler -.weak SPIM2_IRQHandler -.thumb_set SPIM2_IRQHandler, Dummy_Handler +.weak SPIM4_IRQHandler +.thumb_set SPIM4_IRQHandler, Dummy_Handler + +.weak SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +.thumb_set SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler, Dummy_Handler + +.weak SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +.thumb_set SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler, Dummy_Handler .weak GPIOTE0_IRQHandler .thumb_set GPIOTE0_IRQHandler, Dummy_Handler @@ -198,6 +204,9 @@ Dummy_Handler: .weak PWM2_IRQHandler .thumb_set PWM2_IRQHandler, Dummy_Handler +.weak PWM3_IRQHandler +.thumb_set PWM3_IRQHandler, Dummy_Handler + .weak PDM0_IRQHandler .thumb_set PDM0_IRQHandler, Dummy_Handler @@ -216,8 +225,11 @@ Dummy_Handler: .weak GPIOTE1_IRQHandler .thumb_set GPIOTE1_IRQHandler, Dummy_Handler -.weak QDEC_IRQHandler -.thumb_set QDEC_IRQHandler, Dummy_Handler +.weak QDEC0_IRQHandler +.thumb_set QDEC0_IRQHandler, Dummy_Handler + +.weak QDEC1_IRQHandler +.thumb_set QDEC1_IRQHandler, Dummy_Handler .weak USBD_IRQHandler .thumb_set USBD_IRQHandler, Dummy_Handler @@ -282,9 +294,9 @@ _vectors: .word 0 /*Reserved */ .word SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler .word SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - .word SPIM2_IRQHandler - .word 0 /*Reserved */ - .word 0 /*Reserved */ + .word SPIM4_IRQHandler + .word SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler + .word SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler .word GPIOTE0_IRQHandler .word SAADC_IRQHandler .word TIMER0_IRQHandler @@ -308,7 +320,7 @@ _vectors: .word PWM0_IRQHandler .word PWM1_IRQHandler .word PWM2_IRQHandler - .word 0 /*Reserved */ + .word PWM3_IRQHandler .word 0 /*Reserved */ .word PDM0_IRQHandler .word 0 /*Reserved */ @@ -323,8 +335,8 @@ _vectors: .word 0 /*Reserved */ .word 0 /*Reserved */ .word 0 /*Reserved */ - .word QDEC_IRQHandler - .word 0 /*Reserved */ + .word QDEC0_IRQHandler + .word QDEC1_IRQHandler .word 0 /*Reserved */ .word USBD_IRQHandler .word USBREGULATOR_IRQHandler diff --git a/mdk/system_nrf51.c b/mdk/system_nrf51.c index 7d48309cf..f7e8bb2eb 100644 --- a/mdk/system_nrf51.c +++ b/mdk/system_nrf51.c @@ -57,7 +57,7 @@ void SystemInit(void) https://infocenter.nordicsemi.com/index.jsp The side effect of executing these instructions in the devices that do not need it is that the new peripherals in the second generation devices (LPCOMP for example) will not be available. */ - if (errata_26()) + if (nrf51_errata_26()) { *(uint32_t volatile *)0x40000504 = 0xC007FFDF; *(uint32_t volatile *)0x40006C18 = 0x00008000; @@ -66,7 +66,7 @@ void SystemInit(void) /* Disable PROTENSET registers under debug, as indicated by PAN 59 "MPU: Reset value of DISABLEINDEBUG register is incorrect" found at Product Anomaly document for your device found at https://infocenter.nordicsemi.com/index.jsp There is no side effect of using these instruction if not needed. */ - if (errata_59()) + if (nrf51_errata_59()) { NRF_MPU->DISABLEINDEBUG = MPU_DISABLEINDEBUG_DISABLEINDEBUG_Disabled << MPU_DISABLEINDEBUG_DISABLEINDEBUG_Pos; } @@ -74,7 +74,7 @@ void SystemInit(void) /* Execute the following code to eliminate excessive current in sleep mode with RAM retention in nRF51802 devices, as indicated by PAN 76 "System: Excessive current in sleep mode with retention" found at Product Anomaly document for your device found at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_76()){ + if (nrf51_errata_76()){ if (*(uint32_t volatile *)0x4006EC00 != 1){ *(uint32_t volatile *)0x4006EC00 = 0x9375; while (*(uint32_t volatile *)0x4006EC00 != 1){ @@ -82,6 +82,8 @@ void SystemInit(void) } *(uint32_t volatile *)0x4006EC14 = 0xC0; } + + SystemCoreClockUpdate(); } /*lint --flb "Leave library region" */ diff --git a/mdk/system_nrf52.c b/mdk/system_nrf52.c index 07b5c4c7e..03286a1ac 100644 --- a/mdk/system_nrf52.c +++ b/mdk/system_nrf52.c @@ -71,31 +71,31 @@ void SystemInit(void) /* Workaround for Errata 12 "COMP: Reference ladder not correctly calibrated" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_12()){ + if (nrf52_errata_12()){ *(volatile uint32_t *)0x40013540 = (*(uint32_t *)0x10000324 & 0x00001F00) >> 8; } /* Workaround for Errata 16 "System: RAM may be corrupt on wakeup from CPU IDLE" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_16()){ + if (nrf52_errata_16()){ *(volatile uint32_t *)0x4007C074 = 3131961357ul; } /* Workaround for Errata 31 "CLOCK: Calibration values are not correctly loaded from FICR at reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_31()){ + if (nrf52_errata_31()){ *(volatile uint32_t *)0x4000053C = ((*(volatile uint32_t *)0x10000244) & 0x0000E000) >> 13; } /* Workaround for Errata 32 "DIF: Debug session automatically enables TracePort pins" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_32()){ + if (nrf52_errata_32()){ CoreDebug->DEMCR &= ~CoreDebug_DEMCR_TRCENA_Msk; } /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_36()){ + if (nrf52_errata_36()){ NRF_CLOCK->EVENTS_DONE = 0; NRF_CLOCK->EVENTS_CTTO = 0; NRF_CLOCK->CTIV = 0; @@ -103,13 +103,13 @@ void SystemInit(void) /* Workaround for Errata 37 "RADIO: Encryption engine is slow by default" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_37()){ + if (nrf52_errata_37()){ *(volatile uint32_t *)0x400005A0 = 0x3; } /* Workaround for Errata 57 "NFCT: NFC Modulation amplitude" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_57()){ + if (nrf52_errata_57()){ *(volatile uint32_t *)0x40005610 = 0x00000005; *(volatile uint32_t *)0x40005688 = 0x00000001; *(volatile uint32_t *)0x40005618 = 0x00000000; @@ -118,7 +118,7 @@ void SystemInit(void) /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_66()){ + if (nrf52_errata_66()){ NRF_TEMP->A0 = NRF_FICR->TEMP.A0; NRF_TEMP->A1 = NRF_FICR->TEMP.A1; NRF_TEMP->A2 = NRF_FICR->TEMP.A2; @@ -140,13 +140,13 @@ void SystemInit(void) /* Workaround for Errata 108 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_108()){ + if (nrf52_errata_108()){ *(volatile uint32_t *)0x40000EE4ul = *(volatile uint32_t *)0x10000258ul & 0x0000004Ful; } /* Workaround for Errata 136 "System: Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_136()){ + if (nrf52_errata_136()){ if (NRF_POWER->RESETREAS & POWER_RESETREAS_RESETPIN_Msk){ NRF_POWER->RESETREAS = ~POWER_RESETREAS_RESETPIN_Msk; } @@ -154,7 +154,7 @@ void SystemInit(void) /* Workaround for Errata 182 "RADIO: Fixes for anomalies #102, #106, and #107 do not take effect" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_182()){ + if (nrf52_errata_182()){ *(volatile uint32_t *) 0x4000173C |= (0x1 << 10); } diff --git a/mdk/system_nrf52805.c b/mdk/system_nrf52805.c index db8255ed2..d78017677 100644 --- a/mdk/system_nrf52805.c +++ b/mdk/system_nrf52805.c @@ -50,13 +50,13 @@ void SystemInit(void) { /* Workaround for Errata 31 "CLOCK: Calibration values are not correctly loaded from FICR at reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_31()){ + if (nrf52_errata_31()){ *(volatile uint32_t *)0x4000053C = ((*(volatile uint32_t *)0x10000244) & 0x0000E000) >> 13; } /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_36()){ + if (nrf52_errata_36()){ NRF_CLOCK->EVENTS_DONE = 0; NRF_CLOCK->EVENTS_CTTO = 0; NRF_CLOCK->CTIV = 0; @@ -64,7 +64,7 @@ void SystemInit(void) /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_66()){ + if (nrf52_errata_66()){ NRF_TEMP->A0 = NRF_FICR->TEMP.A0; NRF_TEMP->A1 = NRF_FICR->TEMP.A1; NRF_TEMP->A2 = NRF_FICR->TEMP.A2; @@ -86,7 +86,7 @@ void SystemInit(void) /* Workaround for Errata 136 "System: Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_136()){ + if (nrf52_errata_136()){ if (NRF_POWER->RESETREAS & POWER_RESETREAS_RESETPIN_Msk){ NRF_POWER->RESETREAS = ~POWER_RESETREAS_RESETPIN_Msk; } @@ -94,7 +94,7 @@ void SystemInit(void) /* Workaround for Errata 217 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_217()){ + if (nrf52_errata_217()){ *(volatile uint32_t *)0x40000EE4ul |= 0x0000000Ful; } diff --git a/mdk/system_nrf52810.c b/mdk/system_nrf52810.c index 2e9b2a8ea..61d678b58 100644 --- a/mdk/system_nrf52810.c +++ b/mdk/system_nrf52810.c @@ -51,7 +51,7 @@ void SystemInit(void) #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 12 "COMP: Reference ladder not correctly calibrated" found at the Errata document for nRF52832 device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_12()){ + if (nrf52_errata_12()){ *(volatile uint32_t *)0x40013540 = (*(uint32_t *)0x10000324 & 0x00001F00) >> 8; } #endif @@ -59,28 +59,28 @@ void SystemInit(void) #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 16 "System: RAM may be corrupt on wakeup from CPU IDLE" found at the Errata document for nRF52832 device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_16()){ + if (nrf52_errata_16()){ *(volatile uint32_t *)0x4007C074 = 3131961357ul; } #endif /* Workaround for Errata 31 "CLOCK: Calibration values are not correctly loaded from FICR at reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_31()){ + if (nrf52_errata_31()){ *(volatile uint32_t *)0x4000053C = ((*(volatile uint32_t *)0x10000244) & 0x0000E000) >> 13; } #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 32 "DIF: Debug session automatically enables TracePort pins" found at the Errata document for nRF52832 device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_32()){ + if (nrf52_errata_32()){ CoreDebug->DEMCR &= ~CoreDebug_DEMCR_TRCENA_Msk; } #endif /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_36()){ + if (nrf52_errata_36()){ NRF_CLOCK->EVENTS_DONE = 0; NRF_CLOCK->EVENTS_CTTO = 0; NRF_CLOCK->CTIV = 0; @@ -89,7 +89,7 @@ void SystemInit(void) #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 37 "RADIO: Encryption engine is slow by default" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_37()){ + if (nrf52_errata_37()){ *(volatile uint32_t *)0x400005A0 = 0x3; } #endif @@ -97,7 +97,7 @@ void SystemInit(void) #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 57 "NFCT: NFC Modulation amplitude" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_57()){ + if (nrf52_errata_57()){ *(volatile uint32_t *)0x40005610 = 0x00000005; *(volatile uint32_t *)0x40005688 = 0x00000001; *(volatile uint32_t *)0x40005618 = 0x00000000; @@ -107,7 +107,7 @@ void SystemInit(void) /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_66()){ + if (nrf52_errata_66()){ NRF_TEMP->A0 = NRF_FICR->TEMP.A0; NRF_TEMP->A1 = NRF_FICR->TEMP.A1; NRF_TEMP->A2 = NRF_FICR->TEMP.A2; @@ -129,21 +129,21 @@ void SystemInit(void) /* Workaround for Errata 103 "CCM: Wrong reset value of CCM MAXPACKETSIZE" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_103()){ + if (nrf52_errata_103()){ NRF_CCM->MAXPACKETSIZE = 0xFBul; } #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 108 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_108()){ + if (nrf52_errata_108()){ *(volatile uint32_t *)0x40000EE4ul = *(volatile uint32_t *)0x10000258ul & 0x0000004Ful; } #endif /* Workaround for Errata 136 "System: Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_136()){ + if (nrf52_errata_136()){ if (NRF_POWER->RESETREAS & POWER_RESETREAS_RESETPIN_Msk){ NRF_POWER->RESETREAS = ~POWER_RESETREAS_RESETPIN_Msk; } @@ -152,14 +152,14 @@ void SystemInit(void) #if defined (DEVELOP_IN_NRF52832) /* Workaround for Errata 182 "RADIO: Fixes for anomalies #102, #106, and #107 do not take effect" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_182()){ + if (nrf52_errata_182()){ *(volatile uint32_t *) 0x4000173C |= (0x1 << 10); } #endif /* Workaround for Errata 217 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_217()){ + if (nrf52_errata_217()){ *(volatile uint32_t *)0x40000EE4ul |= 0x0000000Ful; } diff --git a/mdk/system_nrf52811.c b/mdk/system_nrf52811.c index cd2b28065..2e29e83c2 100644 --- a/mdk/system_nrf52811.c +++ b/mdk/system_nrf52811.c @@ -50,13 +50,13 @@ void SystemInit(void) { /* Workaround for Errata 31 "CLOCK: Calibration values are not correctly loaded from FICR at reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_31()){ + if (nrf52_errata_31()){ *(volatile uint32_t *)0x4000053C = ((*(volatile uint32_t *)0x10000244) & 0x0000E000) >> 13; } /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_36()){ + if (nrf52_errata_36()){ NRF_CLOCK->EVENTS_DONE = 0; NRF_CLOCK->EVENTS_CTTO = 0; NRF_CLOCK->CTIV = 0; @@ -64,7 +64,7 @@ void SystemInit(void) /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_66()){ + if (nrf52_errata_66()){ NRF_TEMP->A0 = NRF_FICR->TEMP.A0; NRF_TEMP->A1 = NRF_FICR->TEMP.A1; NRF_TEMP->A2 = NRF_FICR->TEMP.A2; @@ -88,20 +88,20 @@ void SystemInit(void) /* Workaround for Errata 103 "CCM: Wrong reset value of CCM MAXPACKETSIZE" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_103()){ + if (nrf52_errata_103()){ NRF_CCM->MAXPACKETSIZE = 0xFBul; } /* Workaround for Errata 115 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_115()){ + if (nrf52_errata_115()){ *(volatile uint32_t *)0x40000EE4 = (*(volatile uint32_t *)0x40000EE4 & 0xFFFFFFF0) | (*(uint32_t *)0x10000258 & 0x0000000F); } #endif /* Workaround for Errata 136 "System: Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_136()){ + if (nrf52_errata_136()){ if (NRF_POWER->RESETREAS & POWER_RESETREAS_RESETPIN_Msk){ NRF_POWER->RESETREAS = ~POWER_RESETREAS_RESETPIN_Msk; } @@ -109,7 +109,7 @@ void SystemInit(void) /* Workaround for Errata 217 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_217()){ + if (nrf52_errata_217()){ *(volatile uint32_t *)0x40000EE4ul |= 0x0000000Ful; } diff --git a/mdk/system_nrf52833.c b/mdk/system_nrf52833.c index 1b33fc3f8..0bb3b4f6f 100644 --- a/mdk/system_nrf52833.c +++ b/mdk/system_nrf52833.c @@ -70,7 +70,7 @@ void SystemInit(void) /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_36()){ + if (nrf52_errata_36()){ NRF_CLOCK->EVENTS_DONE = 0; NRF_CLOCK->EVENTS_CTTO = 0; NRF_CLOCK->CTIV = 0; @@ -78,7 +78,7 @@ void SystemInit(void) /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_66()){ + if (nrf52_errata_66()){ NRF_TEMP->A0 = NRF_FICR->TEMP.A0; NRF_TEMP->A1 = NRF_FICR->TEMP.A1; NRF_TEMP->A2 = NRF_FICR->TEMP.A2; @@ -100,7 +100,7 @@ void SystemInit(void) /* Workaround for Errata 136 "System: Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_136()){ + if (nrf52_errata_136()){ if (NRF_POWER->RESETREAS & POWER_RESETREAS_RESETPIN_Msk){ NRF_POWER->RESETREAS = ~POWER_RESETREAS_RESETPIN_Msk; } diff --git a/mdk/system_nrf52840.c b/mdk/system_nrf52840.c index 5b12f9539..0783835df 100644 --- a/mdk/system_nrf52840.c +++ b/mdk/system_nrf52840.c @@ -71,7 +71,7 @@ void SystemInit(void) /* Workaround for Errata 36 "CLOCK: Some registers are not reset when expected" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_36()){ + if (nrf52_errata_36()){ NRF_CLOCK->EVENTS_DONE = 0; NRF_CLOCK->EVENTS_CTTO = 0; NRF_CLOCK->CTIV = 0; @@ -79,7 +79,7 @@ void SystemInit(void) /* Workaround for Errata 66 "TEMP: Linearity specification not met with default settings" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_66()){ + if (nrf52_errata_66()){ NRF_TEMP->A0 = NRF_FICR->TEMP.A0; NRF_TEMP->A1 = NRF_FICR->TEMP.A1; NRF_TEMP->A2 = NRF_FICR->TEMP.A2; @@ -101,31 +101,31 @@ void SystemInit(void) /* Workaround for Errata 98 "NFCT: Not able to communicate with the peer" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_98()){ + if (nrf52_errata_98()){ *(volatile uint32_t *)0x4000568Cul = 0x00038148ul; } /* Workaround for Errata 103 "CCM: Wrong reset value of CCM MAXPACKETSIZE" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_103()){ + if (nrf52_errata_103()){ NRF_CCM->MAXPACKETSIZE = 0xFBul; } /* Workaround for Errata 115 "RAM: RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_115()){ + if (nrf52_errata_115()){ *(volatile uint32_t *)0x40000EE4ul = (*(volatile uint32_t *)0x40000EE4ul & 0xFFFFFFF0ul) | (*(uint32_t *)0x10000258ul & 0x0000000Ful); } /* Workaround for Errata 120 "QSPI: Data read or written is corrupted" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_120()){ + if (nrf52_errata_120()){ *(volatile uint32_t *)0x40029640ul = 0x200ul; } /* Workaround for Errata 136 "System: Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_136()){ + if (nrf52_errata_136()){ if (NRF_POWER->RESETREAS & POWER_RESETREAS_RESETPIN_Msk){ NRF_POWER->RESETREAS = ~POWER_RESETREAS_RESETPIN_Msk; } diff --git a/mdk/system_nrf5340_application.c b/mdk/system_nrf5340_application.c index 387555e00..58949e8d2 100644 --- a/mdk/system_nrf5340_application.c +++ b/mdk/system_nrf5340_application.c @@ -32,7 +32,9 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA. /*lint ++flb "Enter library region" */ -#define __SYSTEM_CLOCK (128000000UL) /*!< NRF5340 application core uses a fixed System Clock Frequency of 128MHz */ +/* NRF5340 application core uses a variable System Clock Frequency that starts at 64MHz */ +#define __SYSTEM_CLOCK_MAX (128000000UL) +#define __SYSTEM_CLOCK_INITIAL ( 64000000UL) #define TRACE_PIN_CNF_VALUE ( (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) | \ (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | \ @@ -48,19 +50,19 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA. #define TRACE_TRACEDATA3_PIN TAD_PSEL_TRACEDATA3_PIN_Tracedata3 #if defined ( __CC_ARM ) - uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK; + uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK_INITIAL; #elif defined ( __ICCARM__ ) - __root uint32_t SystemCoreClock = __SYSTEM_CLOCK; + __root uint32_t SystemCoreClock = __SYSTEM_CLOCK_INITIAL; #elif defined ( __GNUC__ ) - uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK; + uint32_t SystemCoreClock __attribute__((used)) = __SYSTEM_CLOCK_INITIAL; #endif void SystemCoreClockUpdate(void) { #if defined(NRF_TRUSTZONE_NONSECURE) - SystemCoreClock = __SYSTEM_CLOCK >> (NRF_CLOCK_NS->HFCLKCTRL & (CLOCK_HFCLKCTRL_HCLK_Msk)); + SystemCoreClock = __SYSTEM_CLOCK_MAX >> (NRF_CLOCK_NS->HFCLKCTRL & (CLOCK_HFCLKCTRL_HCLK_Msk)); #else - SystemCoreClock = __SYSTEM_CLOCK >> (NRF_CLOCK_S->HFCLKCTRL & (CLOCK_HFCLKCTRL_HCLK_Msk)); + SystemCoreClock = __SYSTEM_CLOCK_MAX >> (NRF_CLOCK_S->HFCLKCTRL & (CLOCK_HFCLKCTRL_HCLK_Msk)); #endif } @@ -78,7 +80,7 @@ void SystemInit(void) /* Trimming of the device. Copy all the trimming values from FICR into the target addresses. Trim until one ADDR is not initialized. */ uint32_t index = 0; - for (index = 0; index < 256ul && NRF_FICR_S->TRIMCNF[index].ADDR != (uint32_t *)0xFFFFFFFFul; index++){ + for (index = 0; index < 32ul && NRF_FICR_S->TRIMCNF[index].ADDR != (uint32_t *)0xFFFFFFFFul; index++){ #if defined ( __ICCARM__ ) /* IAR will complain about the order of volatile pointer accesses. */ #pragma diag_suppress=Pa082 @@ -89,36 +91,33 @@ void SystemInit(void) #endif } + /* errata 64 must be before errata 42, as errata 42 is dependant on the changes in errata 64*/ /* Workaround for Errata 64 "VREGMAIN has invalid configuration when CPU is running at 128 MHz" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_64()) + if (nrf53_errata_64()) { - *((volatile uint32_t *)0x50004708ul) = 0x3; + *((volatile uint32_t *)0x5000470Cul) = 0x29ul; + *((volatile uint32_t *)0x5000473Cul) = 0x3ul; } /* Workaround for Errata 42 "Reset value of HFCLKCTRL is invalid" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_42()) + if (nrf53_errata_42()) { *((volatile uint32_t *)0x50039530ul) = 0xBEEF0044ul; NRF_CLOCK_S->HFCLKCTRL = CLOCK_HFCLKCTRL_HCLK_Div2 << CLOCK_HFCLKCTRL_HCLK_Pos; - - if (errata_64()) - { - *((volatile uint32_t *)0x50004710ul) = 0x0; - } } /* Workaround for Errata 46 "Higher power consumption of LFRC" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_46()) + if (nrf53_errata_46()) { *((volatile uint32_t *)0x5003254Cul) = 0; } /* Workaround for Errata 49 "SLEEPENTER and SLEEPEXIT events asserted after pin reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_49()) + if (nrf53_errata_49()) { if (NRF_RESET_S->RESETREAS & RESET_RESETREAS_RESETPIN_Msk) { @@ -129,12 +128,19 @@ void SystemInit(void) /* Workaround for Errata 55 "Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_55()) + if (nrf53_errata_55()) { if (NRF_RESET_S->RESETREAS & RESET_RESETREAS_RESETPIN_Msk){ NRF_RESET_S->RESETREAS = ~RESET_RESETREAS_RESETPIN_Msk; } } + + /* Workaround for Errata 69 "VREGMAIN configuration is not retained in System OFF" found at the Errata document + for your device located at https://infocenter.nordicsemi.com/index.jsp */ + if (nrf53_errata_69()) + { + *((volatile uint32_t *)0x5000470Cul) =0x65ul; + } #if defined(CONFIG_NFCT_PINS_AS_GPIOS) diff --git a/mdk/system_nrf5340_network.c b/mdk/system_nrf5340_network.c index b72b48dcd..f988d0fec 100644 --- a/mdk/system_nrf5340_network.c +++ b/mdk/system_nrf5340_network.c @@ -52,7 +52,7 @@ void SystemInit(void) /* Trimming of the device. Copy all the trimming values from FICR into the target addresses. Trim until one ADDR is not initialized. */ uint32_t index = 0; - for (index = 0; index < 256ul && NRF_FICR_NS->TRIMCNF[index].ADDR != (uint32_t *)0xFFFFFFFFul; index++){ + for (index = 0; index < 32ul && NRF_FICR_NS->TRIMCNF[index].ADDR != (uint32_t *)0xFFFFFFFFul; index++){ #if defined ( __ICCARM__ ) /* IAR will complain about the order of volatile pointer accesses. */ #pragma diag_suppress=Pa082 @@ -65,7 +65,7 @@ void SystemInit(void) /* Workaround for Errata 49 "SLEEPENTER and SLEEPEXIT events asserted after pin reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_49()) + if (nrf53_errata_49()) { if (NRF_RESET_NS->RESETREAS & RESET_RESETREAS_RESETPIN_Msk) { @@ -76,7 +76,7 @@ void SystemInit(void) /* Workaround for Errata 55 "Bits in RESETREAS are set when they should not be" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_55()) + if (nrf53_errata_55()) { if (NRF_RESET_NS->RESETREAS & RESET_RESETREAS_RESETPIN_Msk){ NRF_RESET_NS->RESETREAS = ~RESET_RESETREAS_RESETPIN_Msk; diff --git a/mdk/system_nrf9160.c b/mdk/system_nrf9160.c index 335db2e0a..689ee108c 100644 --- a/mdk/system_nrf9160.c +++ b/mdk/system_nrf9160.c @@ -84,33 +84,33 @@ void SystemInit(void) /* Workaround for Errata 6 "POWER: SLEEPENTER and SLEEPEXIT events asserted after pin reset" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_6()){ + if (nrf91_errata_6()){ NRF_POWER_S->EVENTS_SLEEPENTER = (POWER_EVENTS_SLEEPENTER_EVENTS_SLEEPENTER_NotGenerated << POWER_EVENTS_SLEEPENTER_EVENTS_SLEEPENTER_Pos); NRF_POWER_S->EVENTS_SLEEPEXIT = (POWER_EVENTS_SLEEPEXIT_EVENTS_SLEEPEXIT_NotGenerated << POWER_EVENTS_SLEEPEXIT_EVENTS_SLEEPEXIT_Pos); } /* Workaround for Errata 14 "REGULATORS: LDO mode at startup" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_14()){ + if (nrf91_errata_14()){ *((volatile uint32_t *)0x50004A38) = 0x01ul; NRF_REGULATORS_S->DCDCEN = REGULATORS_DCDCEN_DCDCEN_Enabled << REGULATORS_DCDCEN_DCDCEN_Pos; } /* Workaround for Errata 15 "REGULATORS: LDO mode at startup" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_15()){ + if (nrf91_errata_15()){ NRF_REGULATORS_S->DCDCEN = REGULATORS_DCDCEN_DCDCEN_Enabled << REGULATORS_DCDCEN_DCDCEN_Pos; } /* Workaround for Errata 20 "RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_20()){ + if (nrf91_errata_20()){ *((volatile uint32_t *)0x5003AEE4) = 0xE; } /* Workaround for Errata 31 "XOSC32k Startup Failure" found at the Errata document for your device located at https://infocenter.nordicsemi.com/index.jsp */ - if (errata_31()){ + if (nrf91_errata_31()){ *((volatile uint32_t *)0x5000470Cul) = 0x0; *((volatile uint32_t *)0x50004710ul) = 0x1; } diff --git a/nrfx.h b/nrfx.h index ae1d51d02..ac261665a 100644 --- a/nrfx.h +++ b/nrfx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_atomic.c b/soc/nrfx_atomic.c index f75800620..60130330d 100644 --- a/soc/nrfx_atomic.c +++ b/soc/nrfx_atomic.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_atomic.h b/soc/nrfx_atomic.h index 6cf6c0b9b..30d72cc59 100644 --- a/soc/nrfx_atomic.h +++ b/soc/nrfx_atomic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_atomic_internal.h b/soc/nrfx_atomic_internal.h index c94e7a049..27e5c9981 100644 --- a/soc/nrfx_atomic_internal.h +++ b/soc/nrfx_atomic_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2016 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_coredep.h b/soc/nrfx_coredep.h index 5561ae1e8..0b818ac2a 100644 --- a/soc/nrfx_coredep.h +++ b/soc/nrfx_coredep.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs.h b/soc/nrfx_irqs.h index 8bd4102fe..1f2ecd544 100644 --- a/soc/nrfx_irqs.h +++ b/soc/nrfx_irqs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf51.h b/soc/nrfx_irqs_nrf51.h index 3729c71da..96647ff75 100644 --- a/soc/nrfx_irqs_nrf51.h +++ b/soc/nrfx_irqs_nrf51.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf52810.h b/soc/nrfx_irqs_nrf52810.h index 5e27a6879..a38e9f203 100644 --- a/soc/nrfx_irqs_nrf52810.h +++ b/soc/nrfx_irqs_nrf52810.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf52811.h b/soc/nrfx_irqs_nrf52811.h index f4e4aca00..a43c7c2a8 100644 --- a/soc/nrfx_irqs_nrf52811.h +++ b/soc/nrfx_irqs_nrf52811.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf52832.h b/soc/nrfx_irqs_nrf52832.h index 85e86855a..310498ef6 100644 --- a/soc/nrfx_irqs_nrf52832.h +++ b/soc/nrfx_irqs_nrf52832.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf52833.h b/soc/nrfx_irqs_nrf52833.h index 00d21a63b..32944bc7d 100644 --- a/soc/nrfx_irqs_nrf52833.h +++ b/soc/nrfx_irqs_nrf52833.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf52840.h b/soc/nrfx_irqs_nrf52840.h index f3ee5135c..1f85026b7 100644 --- a/soc/nrfx_irqs_nrf52840.h +++ b/soc/nrfx_irqs_nrf52840.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf5340_application.h b/soc/nrfx_irqs_nrf5340_application.h index 2d9c05a7c..15d1e2504 100644 --- a/soc/nrfx_irqs_nrf5340_application.h +++ b/soc/nrfx_irqs_nrf5340_application.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,11 +67,33 @@ extern "C" { #define nrfx_uarte_1_irq_handler SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler #endif -// SPIM2_IRQn -#define nrfx_spim_2_irq_handler SPIM2_IRQHandler +// SPIM4_IRQn +#define nrfx_spim_4_irq_handler SPIM4_IRQHandler + +// SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQn +#if NRFX_CHECK(NRFX_PRS_ENABLED) && NRFX_CHECK(NRFX_PRS_BOX_2_ENABLED) +#define nrfx_prs_box_2_irq_handler SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +#else +#define nrfx_spim_2_irq_handler SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +#define nrfx_spis_2_irq_handler SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +#define nrfx_twim_2_irq_handler SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +#define nrfx_twis_2_irq_handler SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +#define nrfx_uarte_2_irq_handler SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler +#endif + +// SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQn +#if NRFX_CHECK(NRFX_PRS_ENABLED) && NRFX_CHECK(NRFX_PRS_BOX_3_ENABLED) +#define nrfx_prs_box_3_irq_handler SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +#else +#define nrfx_spim_3_irq_handler SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +#define nrfx_spis_3_irq_handler SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +#define nrfx_twim_3_irq_handler SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +#define nrfx_twis_3_irq_handler SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +#define nrfx_uarte_3_irq_handler SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler +#endif // GPIOTE0_IRQn -#define nrfx_gpiote_irq_handler GPIOTE0_IRQHandler +#define nrfx_gpiote_irq_handler GPIOTE_IRQHandler // SAADC_IRQn #define nrfx_saadc_irq_handler SAADC_IRQHandler @@ -98,8 +120,8 @@ extern "C" { #define nrfx_wdt_1_irq_handler WDT1_IRQHandler // COMP_LPCOMP_IRQn -#if NRFX_CHECK(NRFX_PRS_ENABLED) && NRFX_CHECK(NRFX_PRS_BOX_2_ENABLED) -#define nrfx_prs_box_2_irq_handler COMP_LPCOMP_IRQHandler +#if NRFX_CHECK(NRFX_PRS_ENABLED) && NRFX_CHECK(NRFX_PRS_BOX_4_ENABLED) +#define nrfx_prs_box_4_irq_handler COMP_LPCOMP_IRQHandler #else #define nrfx_comp_irq_handler COMP_LPCOMP_IRQHandler #define nrfx_lpcomp_irq_handler COMP_LPCOMP_IRQHandler @@ -132,6 +154,9 @@ extern "C" { // PWM2_IRQn #define nrfx_pwm_2_irq_handler PWM2_IRQHandler +// PWM3_IRQn +#define nrfx_pwm_3_irq_handler PWM3_IRQHandler + // PDM0_IRQn #define nrfx_pdm_irq_handler PDM0_IRQHandler @@ -149,13 +174,16 @@ extern "C" { // GPIOTE1_IRQn -// QDEC_IRQn +// QDEC0_IRQn #define nrfx_qdec_irq_handler QDEC_IRQHandler +// QDEC1_IRQn + // USBD_IRQn #define nrfx_usbd_irq_handler USBD_IRQHandler // USBREGULATOR_IRQn +#define nrfx_usbreg_irq_handler USBREGULATOR_IRQHandler // KMU_IRQn diff --git a/soc/nrfx_irqs_nrf5340_network.h b/soc/nrfx_irqs_nrf5340_network.h index bac71c7e1..db2c395d1 100644 --- a/soc/nrfx_irqs_nrf5340_network.h +++ b/soc/nrfx_irqs_nrf5340_network.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Nordic Semiconductor ASA + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/soc/nrfx_irqs_nrf9160.h b/soc/nrfx_irqs_nrf9160.h index 2140f8981..dab9878c3 100644 --- a/soc/nrfx_irqs_nrf9160.h +++ b/soc/nrfx_irqs_nrf9160.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/templates/nrfx_config.h b/templates/nrfx_config.h new file mode 100644 index 000000000..f01ed1549 --- /dev/null +++ b/templates/nrfx_config.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_H__ +#define NRFX_CONFIG_H__ + +#if defined(NRF51) + #include +#elif defined(NRF52810_XXAA) + #include +#elif defined(NRF52811_XXAA) + #include +#elif defined(NRF52832_XXAA) || defined (NRF52832_XXAB) + #include +#elif defined(NRF52833_XXAA) + #include +#elif defined(NRF52840_XXAA) + #include +#elif defined(NRF5340_XXAA_APPLICATION) + #include +#elif defined(NRF5340_XXAA_NETWORK) + #include +#elif defined(NRF9160_XXAA) + #include +#else + #error "Unknown device." +#endif + +#endif // NRFX_CONFIG_H__ diff --git a/templates/nRF51/nrfx_config.h b/templates/nrfx_config_nrf51.h similarity index 89% rename from templates/nRF51/nrfx_config.h rename to templates/nrfx_config_nrf51.h index 0eba35703..e56655b87 100644 --- a/templates/nRF51/nrfx_config.h +++ b/templates/nrfx_config_nrf51.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF51_H__ +#define NRFX_CONFIG_NRF51_H__ // <<< Use Configuration Wizard in Context Menu >>>\n @@ -8,7 +39,7 @@ // NRFX_ADC_ENABLED - nrfx_adc - ADC peripheral driver //========================================================== #ifndef NRFX_ADC_ENABLED -#define NRFX_ADC_ENABLED 1 +#define NRFX_ADC_ENABLED 0 #endif // NRFX_ADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -77,7 +108,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source @@ -162,7 +193,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -236,7 +267,7 @@ // NRFX_LPCOMP_ENABLED - nrfx_lpcomp - LPCOMP peripheral driver //========================================================== #ifndef NRFX_LPCOMP_ENABLED -#define NRFX_LPCOMP_ENABLED 1 +#define NRFX_LPCOMP_ENABLED 0 #endif // NRFX_LPCOMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -306,7 +337,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -314,7 +345,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -332,7 +363,7 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== #ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 1 +#define NRFX_PPI_ENABLED 0 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -390,20 +421,20 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_CONFIG_LOG_ENABLED - Enables logging in the module. @@ -462,7 +493,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -532,7 +563,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -602,18 +633,18 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enable RTC0 instance #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enable RTC1 instance #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -683,13 +714,13 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS1_ENABLED - Enable SPIS1 instance #ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS1_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -759,20 +790,20 @@ // NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver //========================================================== #ifndef NRFX_SPI_ENABLED -#define NRFX_SPI_ENABLED 1 +#define NRFX_SPI_ENABLED 0 #endif // NRFX_SPI0_ENABLED - Enable SPI0 instance #ifndef NRFX_SPI0_ENABLED -#define NRFX_SPI0_ENABLED 1 +#define NRFX_SPI0_ENABLED 0 #endif // NRFX_SPI1_ENABLED - Enable SPI1 instance #ifndef NRFX_SPI1_ENABLED -#define NRFX_SPI1_ENABLED 1 +#define NRFX_SPI1_ENABLED 0 #endif // NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -842,7 +873,7 @@ // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -861,25 +892,25 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enable TIMER0 instance #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enable TIMER1 instance #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enable TIMER2 instance #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -949,19 +980,19 @@ // NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver //========================================================== #ifndef NRFX_TWI_ENABLED -#define NRFX_TWI_ENABLED 1 +#define NRFX_TWI_ENABLED 0 #endif // NRFX_TWI0_ENABLED - Enable TWI0 instance #ifndef NRFX_TWI0_ENABLED -#define NRFX_TWI0_ENABLED 1 +#define NRFX_TWI0_ENABLED 0 #endif // NRFX_TWI1_ENABLED - Enable TWI1 instance #ifndef NRFX_TWI1_ENABLED -#define NRFX_TWI1_ENABLED 1 +#define NRFX_TWI1_ENABLED 0 #endif // NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1031,13 +1062,13 @@ // NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver //========================================================== #ifndef NRFX_UART_ENABLED -#define NRFX_UART_ENABLED 1 +#define NRFX_UART_ENABLED 0 #endif // NRFX_UART0_ENABLED - Enable UART0 instance #ifndef NRFX_UART0_ENABLED -#define NRFX_UART0_ENABLED 1 +#define NRFX_UART0_ENABLED 0 #endif // NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1107,13 +1138,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver @@ -1191,4 +1222,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF51_H__ diff --git a/templates/nRF52811/nrfx_config.h b/templates/nrfx_config_nrf52810.h similarity index 91% rename from templates/nRF52811/nrfx_config.h rename to templates/nrfx_config_nrf52810.h index 87840aaa2..286811344 100644 --- a/templates/nRF52811/nrfx_config.h +++ b/templates/nrfx_config_nrf52810.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF52810_H__ +#define NRFX_CONFIG_NRF52810_H__ // <<< Use Configuration Wizard in Context Menu >>>\n @@ -8,7 +39,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source @@ -99,7 +130,7 @@ // NRFX_COMP_ENABLED - nrfx_comp - COMP peripheral driver //========================================================== #ifndef NRFX_COMP_ENABLED -#define NRFX_COMP_ENABLED 1 +#define NRFX_COMP_ENABLED 0 #endif // NRFX_COMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -173,19 +204,19 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -208,7 +239,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -286,7 +317,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -294,7 +325,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -368,7 +399,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -390,7 +421,7 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== #ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 1 +#define NRFX_PPI_ENABLED 0 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -448,27 +479,27 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 #endif @@ -528,13 +559,13 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enable PWM0 instance #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -608,7 +639,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -682,7 +713,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -756,18 +787,18 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enable RTC0 instance #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enable RTC1 instance #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -841,7 +872,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -916,17 +947,13 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enable SPIM0 instance #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 -#endif - -#ifndef NRFX_SPIM1_ENABLED -#define NRFX_SPIM1_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif // NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1000,17 +1027,13 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enable SPIS0 instance #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 -#endif - -#ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1084,20 +1107,13 @@ // NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver //========================================================== #ifndef NRFX_SPI_ENABLED -#define NRFX_SPI_ENABLED 1 +#define NRFX_SPI_ENABLED 0 #endif // NRFX_SPI0_ENABLED - Enable SPI0 instance #ifndef NRFX_SPI0_ENABLED -#define NRFX_SPI0_ENABLED 1 -#endif - -// NRFX_SPI1_ENABLED - Enable SPI1 instance - - -#ifndef NRFX_SPI1_ENABLED -#define NRFX_SPI1_ENABLED 1 +#define NRFX_SPI0_ENABLED 0 #endif // NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1172,13 +1188,13 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1201,25 +1217,25 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enable TIMER0 instance #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enable TIMER1 instance #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enable TIMER2 instance #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1293,13 +1309,13 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enable TWIM0 instance #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1373,13 +1389,13 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enable TWIS0 instance #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assume that any instance would be initialized only once @@ -1469,13 +1485,13 @@ // NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver //========================================================== #ifndef NRFX_TWI_ENABLED -#define NRFX_TWI_ENABLED 1 +#define NRFX_TWI_ENABLED 0 #endif // NRFX_TWI0_ENABLED - Enable TWI0 instance #ifndef NRFX_TWI0_ENABLED -#define NRFX_TWI0_ENABLED 1 +#define NRFX_TWI0_ENABLED 0 #endif // NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1549,13 +1565,13 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enable UARTE0 instance #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1629,13 +1645,13 @@ // NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver //========================================================== #ifndef NRFX_UART_ENABLED -#define NRFX_UART_ENABLED 1 +#define NRFX_UART_ENABLED 0 #endif // NRFX_UART0_ENABLED - Enable UART0 instance #ifndef NRFX_UART0_ENABLED -#define NRFX_UART0_ENABLED 1 +#define NRFX_UART0_ENABLED 0 #endif // NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1709,13 +1725,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver @@ -1797,4 +1813,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF52810_H__ diff --git a/templates/nRF52810/nrfx_config.h b/templates/nrfx_config_nrf52811.h similarity index 91% rename from templates/nRF52810/nrfx_config.h rename to templates/nrfx_config_nrf52811.h index 531c40f31..a1e8d402b 100644 --- a/templates/nRF52810/nrfx_config.h +++ b/templates/nrfx_config_nrf52811.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF52811_H__ +#define NRFX_CONFIG_NRF52811_H__ // <<< Use Configuration Wizard in Context Menu >>>\n @@ -8,7 +39,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source @@ -99,7 +130,7 @@ // NRFX_COMP_ENABLED - nrfx_comp - COMP peripheral driver //========================================================== #ifndef NRFX_COMP_ENABLED -#define NRFX_COMP_ENABLED 1 +#define NRFX_COMP_ENABLED 0 #endif // NRFX_COMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -173,19 +204,19 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -208,7 +239,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -286,7 +317,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -294,7 +325,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -368,7 +399,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -390,7 +421,7 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== #ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 1 +#define NRFX_PPI_ENABLED 0 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -448,27 +479,27 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 #endif @@ -528,13 +559,13 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enable PWM0 instance #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -608,7 +639,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -682,7 +713,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -756,18 +787,18 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enable RTC0 instance #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enable RTC1 instance #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -841,7 +872,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -916,13 +947,17 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enable SPIM0 instance #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 +#endif + +#ifndef NRFX_SPIM1_ENABLED +#define NRFX_SPIM1_ENABLED 0 #endif // NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -996,13 +1031,17 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enable SPIS0 instance #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 +#endif + +#ifndef NRFX_SPIS1_ENABLED +#define NRFX_SPIS1_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1076,13 +1115,20 @@ // NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver //========================================================== #ifndef NRFX_SPI_ENABLED -#define NRFX_SPI_ENABLED 1 +#define NRFX_SPI_ENABLED 0 #endif // NRFX_SPI0_ENABLED - Enable SPI0 instance #ifndef NRFX_SPI0_ENABLED -#define NRFX_SPI0_ENABLED 1 +#define NRFX_SPI0_ENABLED 0 +#endif + +// NRFX_SPI1_ENABLED - Enable SPI1 instance + + +#ifndef NRFX_SPI1_ENABLED +#define NRFX_SPI1_ENABLED 0 #endif // NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1157,13 +1203,13 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1186,25 +1232,25 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enable TIMER0 instance #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enable TIMER1 instance #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enable TIMER2 instance #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1278,13 +1324,13 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enable TWIM0 instance #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1358,13 +1404,13 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enable TWIS0 instance #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assume that any instance would be initialized only once @@ -1454,13 +1500,13 @@ // NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver //========================================================== #ifndef NRFX_TWI_ENABLED -#define NRFX_TWI_ENABLED 1 +#define NRFX_TWI_ENABLED 0 #endif // NRFX_TWI0_ENABLED - Enable TWI0 instance #ifndef NRFX_TWI0_ENABLED -#define NRFX_TWI0_ENABLED 1 +#define NRFX_TWI0_ENABLED 0 #endif // NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1534,13 +1580,13 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enable UARTE0 instance #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1614,13 +1660,13 @@ // NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver //========================================================== #ifndef NRFX_UART_ENABLED -#define NRFX_UART_ENABLED 1 +#define NRFX_UART_ENABLED 0 #endif // NRFX_UART0_ENABLED - Enable UART0 instance #ifndef NRFX_UART0_ENABLED -#define NRFX_UART0_ENABLED 1 +#define NRFX_UART0_ENABLED 0 #endif // NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1694,13 +1740,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver @@ -1782,4 +1828,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF52811_H__ diff --git a/templates/nRF52832/nrfx_config.h b/templates/nrfx_config_nrf52832.h similarity index 92% rename from templates/nRF52832/nrfx_config.h rename to templates/nrfx_config_nrf52832.h index 6150a73df..4e0be0564 100644 --- a/templates/nRF52832/nrfx_config.h +++ b/templates/nrfx_config_nrf52832.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF52832_H__ +#define NRFX_CONFIG_NRF52832_H__ // <<< Use Configuration Wizard in Context Menu >>>\n @@ -8,7 +39,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source @@ -99,7 +130,7 @@ // NRFX_COMP_ENABLED - nrfx_comp - COMP peripheral driver //========================================================== #ifndef NRFX_COMP_ENABLED -#define NRFX_COMP_ENABLED 1 +#define NRFX_COMP_ENABLED 0 #endif // NRFX_COMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -173,43 +204,43 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU2_ENABLED - Enable EGU2 instance. #ifndef NRFX_EGU2_ENABLED -#define NRFX_EGU2_ENABLED 1 +#define NRFX_EGU2_ENABLED 0 #endif // NRFX_EGU3_ENABLED - Enable EGU3 instance. #ifndef NRFX_EGU3_ENABLED -#define NRFX_EGU3_ENABLED 1 +#define NRFX_EGU3_ENABLED 0 #endif // NRFX_EGU4_ENABLED - Enable EGU4 instance. #ifndef NRFX_EGU4_ENABLED -#define NRFX_EGU4_ENABLED 1 +#define NRFX_EGU4_ENABLED 0 #endif // NRFX_EGU5_ENABLED - Enable EGU5 instance. #ifndef NRFX_EGU5_ENABLED -#define NRFX_EGU5_ENABLED 1 +#define NRFX_EGU5_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -232,7 +263,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -310,7 +341,7 @@ // NRFX_I2S_ENABLED - nrfx_i2s - I2S peripheral driver //========================================================== #ifndef NRFX_I2S_ENABLED -#define NRFX_I2S_ENABLED 1 +#define NRFX_I2S_ENABLED 0 #endif // NRFX_I2S_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -384,7 +415,7 @@ // NRFX_LPCOMP_ENABLED - nrfx_lpcomp - LPCOMP peripheral driver //========================================================== #ifndef NRFX_LPCOMP_ENABLED -#define NRFX_LPCOMP_ENABLED 1 +#define NRFX_LPCOMP_ENABLED 0 #endif // NRFX_LPCOMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -458,7 +489,7 @@ // NRFX_NFCT_ENABLED - nrfx_nfct - NFCT peripheral driver //========================================================== #ifndef NRFX_NFCT_ENABLED -#define NRFX_NFCT_ENABLED 1 +#define NRFX_NFCT_ENABLED 0 #endif // NRFX_NFCT_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -543,7 +574,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -551,7 +582,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -625,7 +656,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -647,7 +678,7 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== #ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 1 +#define NRFX_PPI_ENABLED 0 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -705,41 +736,41 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 #endif // NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module. #ifndef NRFX_PRS_BOX_3_ENABLED -#define NRFX_PRS_BOX_3_ENABLED 1 +#define NRFX_PRS_BOX_3_ENABLED 0 #endif // NRFX_PRS_BOX_4_ENABLED - Enables box 4 in the module. #ifndef NRFX_PRS_BOX_4_ENABLED -#define NRFX_PRS_BOX_4_ENABLED 1 +#define NRFX_PRS_BOX_4_ENABLED 0 #endif // NRFX_PRS_CONFIG_LOG_ENABLED - Enables logging in the module. @@ -798,25 +829,25 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enable PWM0 instance #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM1_ENABLED - Enable PWM1 instance #ifndef NRFX_PWM1_ENABLED -#define NRFX_PWM1_ENABLED 1 +#define NRFX_PWM1_ENABLED 0 #endif // NRFX_PWM2_ENABLED - Enable PWM2 instance #ifndef NRFX_PWM2_ENABLED -#define NRFX_PWM2_ENABLED 1 +#define NRFX_PWM2_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -918,7 +949,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -992,7 +1023,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1066,24 +1097,24 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enable RTC0 instance #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enable RTC1 instance #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC2_ENABLED - Enable RTC2 instance #ifndef NRFX_RTC2_ENABLED -#define NRFX_RTC2_ENABLED 1 +#define NRFX_RTC2_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1157,7 +1188,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1231,27 +1262,27 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enable SPIM0 instance #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif // NRFX_SPIM1_ENABLED - Enable SPIM1 instance #ifndef NRFX_SPIM1_ENABLED -#define NRFX_SPIM1_ENABLED 1 +#define NRFX_SPIM1_ENABLED 0 #endif // NRFX_SPIM2_ENABLED - Enable SPIM2 instance #ifndef NRFX_SPIM2_ENABLED -#define NRFX_SPIM2_ENABLED 1 +#define NRFX_SPIM2_ENABLED 0 #endif // NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1339,27 +1370,27 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enable SPIS0 instance #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif // NRFX_SPIS1_ENABLED - Enable SPIS1 instance #ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS1_ENABLED 0 #endif // NRFX_SPIS2_ENABLED - Enable SPIS2 instance #ifndef NRFX_SPIS2_ENABLED -#define NRFX_SPIS2_ENABLED 1 +#define NRFX_SPIS2_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1447,27 +1478,27 @@ // NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver //========================================================== #ifndef NRFX_SPI_ENABLED -#define NRFX_SPI_ENABLED 1 +#define NRFX_SPI_ENABLED 0 #endif // NRFX_SPI0_ENABLED - Enable SPI0 instance #ifndef NRFX_SPI0_ENABLED -#define NRFX_SPI0_ENABLED 1 +#define NRFX_SPI0_ENABLED 0 #endif // NRFX_SPI1_ENABLED - Enable SPI1 instance #ifndef NRFX_SPI1_ENABLED -#define NRFX_SPI1_ENABLED 1 +#define NRFX_SPI1_ENABLED 0 #endif // NRFX_SPI2_ENABLED - Enable SPI2 instance #ifndef NRFX_SPI2_ENABLED -#define NRFX_SPI2_ENABLED 1 +#define NRFX_SPI2_ENABLED 0 #endif // NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1542,13 +1573,13 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1571,37 +1602,37 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enable TIMER0 instance #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enable TIMER1 instance #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enable TIMER2 instance #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER3_ENABLED - Enable TIMER3 instance #ifndef NRFX_TIMER3_ENABLED -#define NRFX_TIMER3_ENABLED 1 +#define NRFX_TIMER3_ENABLED 0 #endif // NRFX_TIMER4_ENABLED - Enable TIMER4 instance #ifndef NRFX_TIMER4_ENABLED -#define NRFX_TIMER4_ENABLED 1 +#define NRFX_TIMER4_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1675,19 +1706,19 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enable TWIM0 instance #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM1_ENABLED - Enable TWIM1 instance #ifndef NRFX_TWIM1_ENABLED -#define NRFX_TWIM1_ENABLED 1 +#define NRFX_TWIM1_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1774,19 +1805,19 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enable TWIS0 instance #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS1_ENABLED - Enable TWIS1 instance #ifndef NRFX_TWIS1_ENABLED -#define NRFX_TWIS1_ENABLED 1 +#define NRFX_TWIS1_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assume that any instance would be initialized only once @@ -1876,19 +1907,19 @@ // NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver //========================================================== #ifndef NRFX_TWI_ENABLED -#define NRFX_TWI_ENABLED 1 +#define NRFX_TWI_ENABLED 0 #endif // NRFX_TWI0_ENABLED - Enable TWI0 instance #ifndef NRFX_TWI0_ENABLED -#define NRFX_TWI0_ENABLED 1 +#define NRFX_TWI0_ENABLED 0 #endif // NRFX_TWI1_ENABLED - Enable TWI1 instance #ifndef NRFX_TWI1_ENABLED -#define NRFX_TWI1_ENABLED 1 +#define NRFX_TWI1_ENABLED 0 #endif // NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1962,13 +1993,13 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enable UARTE0 instance #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2042,13 +2073,13 @@ // NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver //========================================================== #ifndef NRFX_UART_ENABLED -#define NRFX_UART_ENABLED 1 +#define NRFX_UART_ENABLED 0 #endif // NRFX_UART0_ENABLED - Enable UART0 instance #ifndef NRFX_UART0_ENABLED -#define NRFX_UART0_ENABLED 1 +#define NRFX_UART0_ENABLED 0 #endif // NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2122,13 +2153,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver @@ -2210,4 +2241,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF52832_H__ diff --git a/templates/nRF52833/nrfx_config.h b/templates/nrfx_config_nrf52833.h similarity index 91% rename from templates/nRF52833/nrfx_config.h rename to templates/nrfx_config_nrf52833.h index c12d768a9..effcbb613 100644 --- a/templates/nRF52833/nrfx_config.h +++ b/templates/nrfx_config_nrf52833.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF52833_H__ +#define NRFX_CONFIG_NRF52833_H__ // <<< Use Configuration Wizard in Context Menu >>>\n @@ -8,7 +39,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source @@ -99,7 +130,7 @@ // NRFX_COMP_ENABLED - nrfx_comp - COMP peripheral driver //========================================================== #ifndef NRFX_COMP_ENABLED -#define NRFX_COMP_ENABLED 1 +#define NRFX_COMP_ENABLED 0 #endif // NRFX_COMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -173,43 +204,43 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU2_ENABLED - Enable EGU2 instance. #ifndef NRFX_EGU2_ENABLED -#define NRFX_EGU2_ENABLED 1 +#define NRFX_EGU2_ENABLED 0 #endif // NRFX_EGU3_ENABLED - Enable EGU3 instance. #ifndef NRFX_EGU3_ENABLED -#define NRFX_EGU3_ENABLED 1 +#define NRFX_EGU3_ENABLED 0 #endif // NRFX_EGU4_ENABLED - Enable EGU4 instance. #ifndef NRFX_EGU4_ENABLED -#define NRFX_EGU4_ENABLED 1 +#define NRFX_EGU4_ENABLED 0 #endif // NRFX_EGU5_ENABLED - Enable EGU5 instance. #ifndef NRFX_EGU5_ENABLED -#define NRFX_EGU5_ENABLED 1 +#define NRFX_EGU5_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -232,7 +263,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -310,7 +341,7 @@ // NRFX_I2S_ENABLED - nrfx_i2s - I2S peripheral driver //========================================================== #ifndef NRFX_I2S_ENABLED -#define NRFX_I2S_ENABLED 1 +#define NRFX_I2S_ENABLED 0 #endif // NRFX_I2S_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -384,7 +415,7 @@ // NRFX_LPCOMP_ENABLED - nrfx_lpcomp - LPCOMP peripheral driver //========================================================== #ifndef NRFX_LPCOMP_ENABLED -#define NRFX_LPCOMP_ENABLED 1 +#define NRFX_LPCOMP_ENABLED 0 #endif // NRFX_LPCOMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -458,7 +489,7 @@ // NRFX_NFCT_ENABLED - nrfx_nfct - NFCT peripheral driver //========================================================== #ifndef NRFX_NFCT_ENABLED -#define NRFX_NFCT_ENABLED 1 +#define NRFX_NFCT_ENABLED 0 #endif // NRFX_NFCT_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -543,7 +574,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -551,7 +582,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -625,7 +656,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -647,7 +678,7 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== #ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 1 +#define NRFX_PPI_ENABLED 0 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -705,41 +736,41 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 #endif // NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module. #ifndef NRFX_PRS_BOX_3_ENABLED -#define NRFX_PRS_BOX_3_ENABLED 1 +#define NRFX_PRS_BOX_3_ENABLED 0 #endif // NRFX_PRS_BOX_4_ENABLED - Enables box 4 in the module. #ifndef NRFX_PRS_BOX_4_ENABLED -#define NRFX_PRS_BOX_4_ENABLED 1 +#define NRFX_PRS_BOX_4_ENABLED 0 #endif // NRFX_PRS_CONFIG_LOG_ENABLED - Enables logging in the module. @@ -798,31 +829,31 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enable PWM0 instance #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM1_ENABLED - Enable PWM1 instance #ifndef NRFX_PWM1_ENABLED -#define NRFX_PWM1_ENABLED 1 +#define NRFX_PWM1_ENABLED 0 #endif // NRFX_PWM2_ENABLED - Enable PWM2 instance #ifndef NRFX_PWM2_ENABLED -#define NRFX_PWM2_ENABLED 1 +#define NRFX_PWM2_ENABLED 0 #endif // NRFX_PWM3_ENABLED - Enable PWM3 instance #ifndef NRFX_PWM3_ENABLED -#define NRFX_PWM3_ENABLED 1 +#define NRFX_PWM3_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -896,7 +927,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -970,7 +1001,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1044,24 +1075,24 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enable RTC0 instance #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enable RTC1 instance #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC2_ENABLED - Enable RTC2 instance #ifndef NRFX_RTC2_ENABLED -#define NRFX_RTC2_ENABLED 1 +#define NRFX_RTC2_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1135,7 +1166,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1209,34 +1240,34 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enable SPIM0 instance #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif // NRFX_SPIM1_ENABLED - Enable SPIM1 instance #ifndef NRFX_SPIM1_ENABLED -#define NRFX_SPIM1_ENABLED 1 +#define NRFX_SPIM1_ENABLED 0 #endif // NRFX_SPIM2_ENABLED - Enable SPIM2 instance #ifndef NRFX_SPIM2_ENABLED -#define NRFX_SPIM2_ENABLED 1 +#define NRFX_SPIM2_ENABLED 0 #endif // NRFX_SPIM3_ENABLED - Enable SPIM3 instance #ifndef NRFX_SPIM3_ENABLED -#define NRFX_SPIM3_ENABLED 1 +#define NRFX_SPIM3_ENABLED 0 #endif // NRFX_SPIM_EXTENDED_ENABLED - Enable extended SPIM features @@ -1317,27 +1348,27 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enable SPIS0 instance #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif // NRFX_SPIS1_ENABLED - Enable SPIS1 instance #ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS1_ENABLED 0 #endif // NRFX_SPIS2_ENABLED - Enable SPIS2 instance #ifndef NRFX_SPIS2_ENABLED -#define NRFX_SPIS2_ENABLED 1 +#define NRFX_SPIS2_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1411,27 +1442,27 @@ // NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver //========================================================== #ifndef NRFX_SPI_ENABLED -#define NRFX_SPI_ENABLED 1 +#define NRFX_SPI_ENABLED 0 #endif // NRFX_SPI0_ENABLED - Enable SPI0 instance #ifndef NRFX_SPI0_ENABLED -#define NRFX_SPI0_ENABLED 1 +#define NRFX_SPI0_ENABLED 0 #endif // NRFX_SPI1_ENABLED - Enable SPI1 instance #ifndef NRFX_SPI1_ENABLED -#define NRFX_SPI1_ENABLED 1 +#define NRFX_SPI1_ENABLED 0 #endif // NRFX_SPI2_ENABLED - Enable SPI2 instance #ifndef NRFX_SPI2_ENABLED -#define NRFX_SPI2_ENABLED 1 +#define NRFX_SPI2_ENABLED 0 #endif // NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1506,13 +1537,13 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1535,37 +1566,37 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enable TIMER0 instance #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enable TIMER1 instance #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enable TIMER2 instance #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER3_ENABLED - Enable TIMER3 instance #ifndef NRFX_TIMER3_ENABLED -#define NRFX_TIMER3_ENABLED 1 +#define NRFX_TIMER3_ENABLED 0 #endif // NRFX_TIMER4_ENABLED - Enable TIMER4 instance #ifndef NRFX_TIMER4_ENABLED -#define NRFX_TIMER4_ENABLED 1 +#define NRFX_TIMER4_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1639,19 +1670,19 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enable TWIM0 instance #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM1_ENABLED - Enable TWIM1 instance #ifndef NRFX_TWIM1_ENABLED -#define NRFX_TWIM1_ENABLED 1 +#define NRFX_TWIM1_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1725,19 +1756,19 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enable TWIS0 instance #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS1_ENABLED - Enable TWIS1 instance #ifndef NRFX_TWIS1_ENABLED -#define NRFX_TWIS1_ENABLED 1 +#define NRFX_TWIS1_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assume that any instance would be initialized only once @@ -1827,19 +1858,19 @@ // NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver //========================================================== #ifndef NRFX_TWI_ENABLED -#define NRFX_TWI_ENABLED 1 +#define NRFX_TWI_ENABLED 0 #endif // NRFX_TWI0_ENABLED - Enable TWI0 instance #ifndef NRFX_TWI0_ENABLED -#define NRFX_TWI0_ENABLED 1 +#define NRFX_TWI0_ENABLED 0 #endif // NRFX_TWI1_ENABLED - Enable TWI1 instance #ifndef NRFX_TWI1_ENABLED -#define NRFX_TWI1_ENABLED 1 +#define NRFX_TWI1_ENABLED 0 #endif // NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1913,19 +1944,19 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enable UARTE0 instance #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE1_ENABLED - Enable UARTE1 instance #ifndef NRFX_UARTE1_ENABLED -#define NRFX_UARTE1_ENABLED 1 +#define NRFX_UARTE1_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1999,13 +2030,13 @@ // NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver //========================================================== #ifndef NRFX_UART_ENABLED -#define NRFX_UART_ENABLED 1 +#define NRFX_UART_ENABLED 0 #endif // NRFX_UART0_ENABLED - Enable UART0 instance #ifndef NRFX_UART0_ENABLED -#define NRFX_UART0_ENABLED 1 +#define NRFX_UART0_ENABLED 0 #endif // NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2079,7 +2110,7 @@ // NRFX_USBD_ENABLED - nrfx_usbd - USBD peripheral driver //========================================================== #ifndef NRFX_USBD_ENABLED -#define NRFX_USBD_ENABLED 1 +#define NRFX_USBD_ENABLED 0 #endif // NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2174,13 +2205,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver @@ -2262,4 +2293,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF52833_H__ diff --git a/templates/nRF52840/nrfx_config.h b/templates/nrfx_config_nrf52840.h similarity index 91% rename from templates/nRF52840/nrfx_config.h rename to templates/nrfx_config_nrf52840.h index ee1e03f79..49a5bb47e 100644 --- a/templates/nRF52840/nrfx_config.h +++ b/templates/nrfx_config_nrf52840.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF52840_H__ +#define NRFX_CONFIG_NRF52840_H__ // <<< Use Configuration Wizard in Context Menu >>>\n @@ -8,7 +39,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF Clock Source @@ -99,7 +130,7 @@ // NRFX_COMP_ENABLED - nrfx_comp - COMP peripheral driver //========================================================== #ifndef NRFX_COMP_ENABLED -#define NRFX_COMP_ENABLED 1 +#define NRFX_COMP_ENABLED 0 #endif // NRFX_COMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -173,43 +204,43 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU2_ENABLED - Enable EGU2 instance. #ifndef NRFX_EGU2_ENABLED -#define NRFX_EGU2_ENABLED 1 +#define NRFX_EGU2_ENABLED 0 #endif // NRFX_EGU3_ENABLED - Enable EGU3 instance. #ifndef NRFX_EGU3_ENABLED -#define NRFX_EGU3_ENABLED 1 +#define NRFX_EGU3_ENABLED 0 #endif // NRFX_EGU4_ENABLED - Enable EGU4 instance. #ifndef NRFX_EGU4_ENABLED -#define NRFX_EGU4_ENABLED 1 +#define NRFX_EGU4_ENABLED 0 #endif // NRFX_EGU5_ENABLED - Enable EGU5 instance. #ifndef NRFX_EGU5_ENABLED -#define NRFX_EGU5_ENABLED 1 +#define NRFX_EGU5_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -232,7 +263,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -310,7 +341,7 @@ // NRFX_I2S_ENABLED - nrfx_i2s - I2S peripheral driver //========================================================== #ifndef NRFX_I2S_ENABLED -#define NRFX_I2S_ENABLED 1 +#define NRFX_I2S_ENABLED 0 #endif // NRFX_I2S_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -384,7 +415,7 @@ // NRFX_LPCOMP_ENABLED - nrfx_lpcomp - LPCOMP peripheral driver //========================================================== #ifndef NRFX_LPCOMP_ENABLED -#define NRFX_LPCOMP_ENABLED 1 +#define NRFX_LPCOMP_ENABLED 0 #endif // NRFX_LPCOMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -458,7 +489,7 @@ // NRFX_NFCT_ENABLED - nrfx_nfct - NFCT peripheral driver //========================================================== #ifndef NRFX_NFCT_ENABLED -#define NRFX_NFCT_ENABLED 1 +#define NRFX_NFCT_ENABLED 0 #endif // NRFX_NFCT_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -543,7 +574,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -551,7 +582,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -625,7 +656,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -647,7 +678,7 @@ // NRFX_PPI_ENABLED - nrfx_ppi - PPI peripheral allocator //========================================================== #ifndef NRFX_PPI_ENABLED -#define NRFX_PPI_ENABLED 1 +#define NRFX_PPI_ENABLED 0 #endif // NRFX_PPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -705,41 +736,41 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 #endif // NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module. #ifndef NRFX_PRS_BOX_3_ENABLED -#define NRFX_PRS_BOX_3_ENABLED 1 +#define NRFX_PRS_BOX_3_ENABLED 0 #endif // NRFX_PRS_BOX_4_ENABLED - Enables box 4 in the module. #ifndef NRFX_PRS_BOX_4_ENABLED -#define NRFX_PRS_BOX_4_ENABLED 1 +#define NRFX_PRS_BOX_4_ENABLED 0 #endif // NRFX_PRS_CONFIG_LOG_ENABLED - Enables logging in the module. @@ -798,31 +829,31 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enable PWM0 instance #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM1_ENABLED - Enable PWM1 instance #ifndef NRFX_PWM1_ENABLED -#define NRFX_PWM1_ENABLED 1 +#define NRFX_PWM1_ENABLED 0 #endif // NRFX_PWM2_ENABLED - Enable PWM2 instance #ifndef NRFX_PWM2_ENABLED -#define NRFX_PWM2_ENABLED 1 +#define NRFX_PWM2_ENABLED 0 #endif // NRFX_PWM3_ENABLED - Enable PWM3 instance #ifndef NRFX_PWM3_ENABLED -#define NRFX_PWM3_ENABLED 1 +#define NRFX_PWM3_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -896,7 +927,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -970,7 +1001,7 @@ // NRFX_QSPI_ENABLED - nrfx_qspi - QSPI peripheral driver //========================================================== #ifndef NRFX_QSPI_ENABLED -#define NRFX_QSPI_ENABLED 1 +#define NRFX_QSPI_ENABLED 0 #endif // NRFX_QSPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -993,7 +1024,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1067,24 +1098,24 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enable RTC0 instance #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enable RTC1 instance #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC2_ENABLED - Enable RTC2 instance #ifndef NRFX_RTC2_ENABLED -#define NRFX_RTC2_ENABLED 1 +#define NRFX_RTC2_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1158,7 +1189,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1232,34 +1263,34 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enable SPIM0 instance #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif // NRFX_SPIM1_ENABLED - Enable SPIM1 instance #ifndef NRFX_SPIM1_ENABLED -#define NRFX_SPIM1_ENABLED 1 +#define NRFX_SPIM1_ENABLED 0 #endif // NRFX_SPIM2_ENABLED - Enable SPIM2 instance #ifndef NRFX_SPIM2_ENABLED -#define NRFX_SPIM2_ENABLED 1 +#define NRFX_SPIM2_ENABLED 0 #endif // NRFX_SPIM3_ENABLED - Enable SPIM3 instance #ifndef NRFX_SPIM3_ENABLED -#define NRFX_SPIM3_ENABLED 1 +#define NRFX_SPIM3_ENABLED 0 #endif // NRFX_SPIM_EXTENDED_ENABLED - Enable extended SPIM features @@ -1350,27 +1381,27 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enable SPIS0 instance #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif // NRFX_SPIS1_ENABLED - Enable SPIS1 instance #ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS1_ENABLED 0 #endif // NRFX_SPIS2_ENABLED - Enable SPIS2 instance #ifndef NRFX_SPIS2_ENABLED -#define NRFX_SPIS2_ENABLED 1 +#define NRFX_SPIS2_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1444,27 +1475,27 @@ // NRFX_SPI_ENABLED - nrfx_spi - SPI peripheral driver //========================================================== #ifndef NRFX_SPI_ENABLED -#define NRFX_SPI_ENABLED 1 +#define NRFX_SPI_ENABLED 0 #endif // NRFX_SPI0_ENABLED - Enable SPI0 instance #ifndef NRFX_SPI0_ENABLED -#define NRFX_SPI0_ENABLED 1 +#define NRFX_SPI0_ENABLED 0 #endif // NRFX_SPI1_ENABLED - Enable SPI1 instance #ifndef NRFX_SPI1_ENABLED -#define NRFX_SPI1_ENABLED 1 +#define NRFX_SPI1_ENABLED 0 #endif // NRFX_SPI2_ENABLED - Enable SPI2 instance #ifndef NRFX_SPI2_ENABLED -#define NRFX_SPI2_ENABLED 1 +#define NRFX_SPI2_ENABLED 0 #endif // NRFX_SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1539,13 +1570,13 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1568,37 +1599,37 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enable TIMER0 instance #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enable TIMER1 instance #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enable TIMER2 instance #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER3_ENABLED - Enable TIMER3 instance #ifndef NRFX_TIMER3_ENABLED -#define NRFX_TIMER3_ENABLED 1 +#define NRFX_TIMER3_ENABLED 0 #endif // NRFX_TIMER4_ENABLED - Enable TIMER4 instance #ifndef NRFX_TIMER4_ENABLED -#define NRFX_TIMER4_ENABLED 1 +#define NRFX_TIMER4_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1672,19 +1703,19 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enable TWIM0 instance #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM1_ENABLED - Enable TWIM1 instance #ifndef NRFX_TWIM1_ENABLED -#define NRFX_TWIM1_ENABLED 1 +#define NRFX_TWIM1_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1758,19 +1789,19 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enable TWIS0 instance #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS1_ENABLED - Enable TWIS1 instance #ifndef NRFX_TWIS1_ENABLED -#define NRFX_TWIS1_ENABLED 1 +#define NRFX_TWIS1_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assume that any instance would be initialized only once @@ -1860,19 +1891,19 @@ // NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver //========================================================== #ifndef NRFX_TWI_ENABLED -#define NRFX_TWI_ENABLED 1 +#define NRFX_TWI_ENABLED 0 #endif // NRFX_TWI0_ENABLED - Enable TWI0 instance #ifndef NRFX_TWI0_ENABLED -#define NRFX_TWI0_ENABLED 1 +#define NRFX_TWI0_ENABLED 0 #endif // NRFX_TWI1_ENABLED - Enable TWI1 instance #ifndef NRFX_TWI1_ENABLED -#define NRFX_TWI1_ENABLED 1 +#define NRFX_TWI1_ENABLED 0 #endif // NRFX_TWI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1946,19 +1977,19 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enable UARTE0 instance #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE1_ENABLED - Enable UARTE1 instance #ifndef NRFX_UARTE1_ENABLED -#define NRFX_UARTE1_ENABLED 1 +#define NRFX_UARTE1_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2032,13 +2063,13 @@ // NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver //========================================================== #ifndef NRFX_UART_ENABLED -#define NRFX_UART_ENABLED 1 +#define NRFX_UART_ENABLED 0 #endif // NRFX_UART0_ENABLED - Enable UART0 instance #ifndef NRFX_UART0_ENABLED -#define NRFX_UART0_ENABLED 1 +#define NRFX_UART0_ENABLED 0 #endif // NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2112,7 +2143,7 @@ // NRFX_USBD_ENABLED - nrfx_usbd - USBD peripheral driver //========================================================== #ifndef NRFX_USBD_ENABLED -#define NRFX_USBD_ENABLED 1 +#define NRFX_USBD_ENABLED 0 #endif // NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -2207,13 +2238,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver @@ -2295,4 +2326,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF52840_H__ diff --git a/templates/nRF5340_application/nrfx_config.h b/templates/nrfx_config_nrf5340_application.h similarity index 79% rename from templates/nRF5340_application/nrfx_config.h rename to templates/nrfx_config_nrf5340_application.h index 1b46e5736..dd5e009c2 100644 --- a/templates/nRF5340_application/nrfx_config.h +++ b/templates/nrfx_config_nrf5340_application.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF5340_APPLICATION_H__ +#define NRFX_CONFIG_NRF5340_APPLICATION_H__ /* * The MDK provides macros for accessing the peripheral register structures @@ -11,6 +42,7 @@ */ #define NRF_COMP NRF_COMP_S #define NRF_CLOCK NRF_CLOCK_S +#define NRF_DCNF NRF_DCNF_S #define NRF_DPPIC NRF_DPPIC_S #define NRF_EGU0 NRF_EGU0_S #define NRF_EGU1 NRF_EGU1_S @@ -19,8 +51,6 @@ #define NRF_EGU4 NRF_EGU4_S #define NRF_EGU5 NRF_EGU5_S #define NRF_FPU NRF_FPU_S -#define NRF_P0 NRF_P0_S -#define NRF_P1 NRF_P1_S #define NRF_I2S NRF_I2S0_S #define NRF_IPC NRF_IPC_S #define NRF_KMU NRF_KMU_S @@ -28,11 +58,17 @@ #define NRF_MUTEX NRF_MUTEX_S #define NRF_NFCT NRF_NFCT_S #define NRF_NVMC NRF_NVMC_S +#define NRF_OSCILLATORS NRF_OSCILLATORS_S +#define NRF_P0 NRF_P0_S +#define NRF_P1 NRF_P1_S +#define NRF_PDM0 NRF_PDM0_S #define NRF_POWER NRF_POWER_S #define NRF_PWM0 NRF_PWM0_S #define NRF_PWM1 NRF_PWM1_S #define NRF_PWM2 NRF_PWM2_S -#define NRF_QDEC NRF_QDEC_S +#define NRF_PWM3 NRF_PWM3_S +#define NRF_QDEC0 NRF_QDEC0_S +#define NRF_QDEC1 NRF_QDEC1_S #define NRF_QSPI NRF_QSPI_S #define NRF_REGULATORS NRF_REGULATORS_S #define NRF_RESET NRF_RESET_S @@ -42,24 +78,38 @@ #define NRF_SPIM0 NRF_SPIM0_S #define NRF_SPIM1 NRF_SPIM1_S #define NRF_SPIM2 NRF_SPIM2_S +#define NRF_SPIM3 NRF_SPIM3_S +#define NRF_SPIM4 NRF_SPIM4_S #define NRF_SPIS0 NRF_SPIS0_S #define NRF_SPIS1 NRF_SPIS1_S +#define NRF_SPIS2 NRF_SPIS2_S +#define NRF_SPIS3 NRF_SPIS3_S #define NRF_TIMER0 NRF_TIMER0_S #define NRF_TIMER1 NRF_TIMER1_S #define NRF_TIMER2 NRF_TIMER2_S #define NRF_TWIM0 NRF_TWIM0_S #define NRF_TWIM1 NRF_TWIM1_S +#define NRF_TWIM2 NRF_TWIM2_S +#define NRF_TWIM3 NRF_TWIM3_S #define NRF_TWIS0 NRF_TWIS0_S #define NRF_TWIS1 NRF_TWIS1_S +#define NRF_TWIS2 NRF_TWIS2_S +#define NRF_TWIS3 NRF_TWIS3_S #define NRF_UARTE0 NRF_UARTE0_S #define NRF_UARTE1 NRF_UARTE1_S +#define NRF_UARTE2 NRF_UARTE2_S +#define NRF_UARTE3 NRF_UARTE3_S #define NRF_USBD NRF_USBD_S #define NRF_USBREGULATOR NRF_USBREGULATOR_S #define NRF_VMC NRF_VMC_S #define NRF_WDT0 NRF_WDT0_S #define NRF_WDT1 NRF_WDT1_S -/* Unchangable configuration. */ +/* + * The following section provides the name translation for peripherals with + * only one type of access available. For these peripherals, you cannot choose + * between secure and non-secure mapping. + */ #define NRF_CACHE NRF_CACHE_S #define NRF_CACHEINFO NRF_CACHEINFO_S #define NRF_CACHEDATA NRF_CACHEDATA_S @@ -70,15 +120,13 @@ #define NRF_SPU NRF_SPU_S #define NRF_UICR NRF_UICR_S -/* Fixups for GPIOTE/WDT/PDM HAL and driver. */ +/* Fixups for GPIOTE driver. */ #define NRF_GPIOTE NRF_GPIOTE0_S -#define GPIOTE_IRQn GPIOTE0_IRQn #define GPIOTE_IRQHandler GPIOTE0_IRQHandler - -#define NRF_PDM NRF_PDM0_S -#define PDM_IRQn PDM0_IRQn -#define PDM_IRQHandler PDM0_IRQHandler +/* Fixups for QDEC driver. */ +#define NRF_QDEC NRF_QDEC0 +#define QDEC_IRQHandler QDEC0_IRQHandler // <<< Use Configuration Wizard in Context Menu >>>\n @@ -87,18 +135,32 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver. //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF clock source. -// <0=> RC -// <1=> XTAL -// <2=> Synth -// <131073=> External Low Swing -// <196609=> External Full Swing +// <0=> ULP +// <1=> RC +// <2=> XTAL +// <3=> Synth #ifndef NRFX_CLOCK_CONFIG_LF_SRC -#define NRFX_CLOCK_CONFIG_LF_SRC 1 +#define NRFX_CLOCK_CONFIG_LF_SRC 2 +#endif + +// NRFX_CLOCK_CONFIG_LF_CAL_ENABLED - Enables LF Clock Calibration Support + +#ifndef NRFX_CLOCK_CONFIG_LF_CAL_ENABLED +#define NRFX_CLOCK_CONFIG_LF_CAL_ENABLED 0 +#endif + +// NRFX_CLOCK_CONFIG_HFCLK192M_SRC - HFCLK192M source. + +// <0=> HFINT +// <1=> HFXO + +#ifndef NRFX_CLOCK_CONFIG_HFCLK192M_SRC +#define NRFX_CLOCK_CONFIG_HFCLK192M_SRC 1 #endif // NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -172,7 +234,7 @@ // NRFX_COMP_ENABLED - nrfx_comp - COMP peripheral driver //========================================================== #ifndef NRFX_COMP_ENABLED -#define NRFX_COMP_ENABLED 1 +#define NRFX_COMP_ENABLED 0 #endif // NRFX_COMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -246,7 +308,7 @@ // NRFX_DPPI_ENABLED - nrfx_dppi - DPPI allocator. //========================================================== #ifndef NRFX_DPPI_ENABLED -#define NRFX_DPPI_ENABLED 1 +#define NRFX_DPPI_ENABLED 0 #endif // NRFX_DPPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -304,43 +366,43 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU2_ENABLED - Enable EGU2 instance. #ifndef NRFX_EGU2_ENABLED -#define NRFX_EGU2_ENABLED 1 +#define NRFX_EGU2_ENABLED 0 #endif // NRFX_EGU3_ENABLED - Enable EGU3 instance. #ifndef NRFX_EGU3_ENABLED -#define NRFX_EGU3_ENABLED 1 +#define NRFX_EGU3_ENABLED 0 #endif // NRFX_EGU4_ENABLED - Enable EGU4 instance. #ifndef NRFX_EGU4_ENABLED -#define NRFX_EGU4_ENABLED 1 +#define NRFX_EGU4_ENABLED 0 #endif // NRFX_EGU5_ENABLED - Enable EGU5 instance. #ifndef NRFX_EGU5_ENABLED -#define NRFX_EGU5_ENABLED 1 +#define NRFX_EGU5_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -363,7 +425,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver. //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins. #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -441,7 +503,7 @@ // NRFX_I2S_ENABLED - nrfx_i2s - I2S peripheral driver. //========================================================== #ifndef NRFX_I2S_ENABLED -#define NRFX_I2S_ENABLED 1 +#define NRFX_I2S_ENABLED 0 #endif // NRFX_I2S_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -515,7 +577,7 @@ // NRFX_IPC_ENABLED - nrfx_ipc - IPC peripheral driver //========================================================== #ifndef NRFX_IPC_ENABLED -#define NRFX_IPC_ENABLED 1 +#define NRFX_IPC_ENABLED 0 #endif // @@ -523,7 +585,7 @@ // NRFX_LPCOMP_ENABLED - nrfx_lpcomp - LPCOMP peripheral driver //========================================================== #ifndef NRFX_LPCOMP_ENABLED -#define NRFX_LPCOMP_ENABLED 1 +#define NRFX_LPCOMP_ENABLED 0 #endif // NRFX_LPCOMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -597,7 +659,7 @@ // NRFX_NFCT_ENABLED - nrfx_nfct - NFCT peripheral driver //========================================================== #ifndef NRFX_NFCT_ENABLED -#define NRFX_NFCT_ENABLED 1 +#define NRFX_NFCT_ENABLED 0 #endif // NRFX_NFCT_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -680,7 +742,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -688,7 +750,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver. //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -762,7 +824,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver. //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -784,27 +846,41 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing (PRS) module. //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 +#endif + +// NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module. + + +#ifndef NRFX_PRS_BOX_3_ENABLED +#define NRFX_PRS_BOX_3_ENABLED 0 +#endif + +// NRFX_PRS_BOX_4_ENABLED - Enables box 4 in the module. + + +#ifndef NRFX_PRS_BOX_4_ENABLED +#define NRFX_PRS_BOX_4_ENABLED 0 #endif @@ -864,27 +940,34 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver. //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enables PWM0 instance. #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM1_ENABLED - Enables PWM1 instance. #ifndef NRFX_PWM1_ENABLED -#define NRFX_PWM1_ENABLED 1 +#define NRFX_PWM1_ENABLED 0 #endif // NRFX_PWM2_ENABLED - Enables PWM2 instance. #ifndef NRFX_PWM2_ENABLED -#define NRFX_PWM2_ENABLED 1 +#define NRFX_PWM2_ENABLED 0 +#endif + +// NRFX_PWM3_ENABLED - Enables PWM3 instance. + + +#ifndef NRFX_PWM3_ENABLED +#define NRFX_PWM3_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -958,7 +1041,7 @@ // NRFX_QDEC_ENABLED - nrfx_qdec - QDEC peripheral driver //========================================================== #ifndef NRFX_QDEC_ENABLED -#define NRFX_QDEC_ENABLED 1 +#define NRFX_QDEC_ENABLED 0 #endif // NRFX_QDEC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1032,7 +1115,7 @@ // NRFX_QSPI_ENABLED - nrfx_qspi - QSPI peripheral driver //========================================================== #ifndef NRFX_QSPI_ENABLED -#define NRFX_QSPI_ENABLED 1 +#define NRFX_QSPI_ENABLED 0 #endif // NRFX_QSPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -1055,20 +1138,20 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver. //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enables RTC0 instance. #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enables RTC1 instance. #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1142,7 +1225,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver. //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1216,29 +1299,49 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver. //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enables SPIM0 instance. #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif // NRFX_SPIM1_ENABLED - Enables SPIM1 instance. #ifndef NRFX_SPIM1_ENABLED -#define NRFX_SPIM1_ENABLED 1 +#define NRFX_SPIM1_ENABLED 0 #endif // NRFX_SPIM2_ENABLED - Enables SPIM2 instance. #ifndef NRFX_SPIM2_ENABLED -#define NRFX_SPIM2_ENABLED 1 +#define NRFX_SPIM2_ENABLED 0 +#endif + +// NRFX_SPIM3_ENABLED - Enables SPIM3 instance. + + +#ifndef NRFX_SPIM3_ENABLED +#define NRFX_SPIM3_ENABLED 0 +#endif + +// NRFX_SPIM4_ENABLED - Enables SPIM4 instance. + + +#ifndef NRFX_SPIM4_ENABLED +#define NRFX_SPIM4_ENABLED 0 #endif +// NRFX_SPIM_EXTENDED_ENABLED - Enable extended SPIM features + + +#ifndef NRFX_SPIM_EXTENDED_ENABLED +#define NRFX_SPIM_EXTENDED_ENABLED 0 +#endif // NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1311,20 +1414,34 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver. //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enables SPIS0 instance. #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif // NRFX_SPIS1_ENABLED - Enables SPIS1 instance. #ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS1_ENABLED 0 +#endif + +// NRFX_SPIS2_ENABLED - Enables SPIS2 instance. + + +#ifndef NRFX_SPIS2_ENABLED +#define NRFX_SPIS2_ENABLED 0 +#endif + +// NRFX_SPIS3_ENABLED - Enables SPIS3 instance. + + +#ifndef NRFX_SPIS3_ENABLED +#define NRFX_SPIS3_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1399,33 +1516,33 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver. //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enables TIMER0 instance. #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enables TIMER1 instance. #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enables TIMER2 instance. #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1499,20 +1616,34 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver. //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enables TWIM0 instance. #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM1_ENABLED - Enables TWIM1 instance. #ifndef NRFX_TWIM1_ENABLED -#define NRFX_TWIM1_ENABLED 1 +#define NRFX_TWIM1_ENABLED 0 +#endif + +// NRFX_TWIM2_ENABLED - Enables TWIM2 instance. + + +#ifndef NRFX_TWIM2_ENABLED +#define NRFX_TWIM2_ENABLED 0 +#endif + +// NRFX_TWIM3_ENABLED - Enables TWIM3 instance. + + +#ifndef NRFX_TWIM3_ENABLED +#define NRFX_TWIM3_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1586,19 +1717,31 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver. //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enables TWIS0 instance. #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS1_ENABLED - Enables TWIS1 instance. #ifndef NRFX_TWIS1_ENABLED -#define NRFX_TWIS1_ENABLED 1 +#define NRFX_TWIS1_ENABLED 0 +#endif + +// NRFX_TWIS2_ENABLED - Enables TWIS2 instance. + +#ifndef NRFX_TWIS2_ENABLED +#define NRFX_TWIS2_ENABLED 0 +#endif + +// NRFX_TWIS3_ENABLED - Enables TWIS3 instance. + +#ifndef NRFX_TWIS3_ENABLED +#define NRFX_TWIS3_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assumes that any instance would be initialized only once. @@ -1688,16 +1831,26 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver. //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enables UARTE0 instances #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE1_ENABLED - Enables UARTE1 instance. #ifndef NRFX_UARTE1_ENABLED -#define NRFX_UARTE1_ENABLED 1 +#define NRFX_UARTE1_ENABLED 0 +#endif + +// NRFX_UARTE2_ENABLED - Enables UARTE2 instance. +#ifndef NRFX_UARTE2_ENABLED +#define NRFX_UARTE2_ENABLED 0 +#endif + +// NRFX_UARTE3_ENABLED - Enables UARTE3 instance. +#ifndef NRFX_UARTE3_ENABLED +#define NRFX_UARTE3_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1768,23 +1921,142 @@ // +// NRFX_USBD_ENABLED - nrfx_usbd - USBD peripheral driver +//========================================================== +#ifndef NRFX_USBD_ENABLED +#define NRFX_USBD_ENABLED 0 +#endif +// NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority + +// <0=> 0 (highest) +// <1=> 1 +// <2=> 2 +// <3=> 3 +// <4=> 4 +// <5=> 5 +// <6=> 6 +// <7=> 7 + +#ifndef NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY +#define NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY 7 +#endif + +// USBD_CONFIG_DMASCHEDULER_ISO_BOOST - Give priority to isochronous transfers + +// This option gives priority to isochronous transfers. +// Enabling it assures that isochronous transfers are always processed, +// even if multiple other transfers are pending. +// Isochronous endpoints are prioritized before the usbd_dma_scheduler_algorithm +// function is called, so the option is independent of the algorithm chosen. + +#ifndef NRFX_USBD_CONFIG_DMASCHEDULER_ISO_BOOST +#define NRFX_USBD_CONFIG_DMASCHEDULER_ISO_BOOST 1 +#endif + +// USBD_CONFIG_ISO_IN_ZLP - Respond to an IN token on ISO IN endpoint with ZLP when no data is ready + + +// If set, ISO IN endpoint will respond to an IN token with ZLP when no data is ready to be sent. +// Else, there will be no response. + +#ifndef NRFX_USBD_CONFIG_ISO_IN_ZLP +#define NRFX_USBD_CONFIG_ISO_IN_ZLP 0 +#endif + +// NRFX_USBD_CONFIG_LOG_ENABLED - Enable logging in the module +//========================================================== +#ifndef NRFX_USBD_CONFIG_LOG_ENABLED +#define NRFX_USBD_CONFIG_LOG_ENABLED 0 +#endif +// NRFX_USBD_CONFIG_LOG_LEVEL - Default Severity level + +// <0=> Off +// <1=> Error +// <2=> Warning +// <3=> Info +// <4=> Debug + +#ifndef NRFX_USBD_CONFIG_LOG_LEVEL +#define NRFX_USBD_CONFIG_LOG_LEVEL 3 +#endif + +// NRFX_USBD_CONFIG_INFO_COLOR - ANSI escape code prefix. + +// <0=> Default +// <1=> Black +// <2=> Red +// <3=> Green +// <4=> Yellow +// <5=> Blue +// <6=> Magenta +// <7=> Cyan +// <8=> White + +#ifndef NRFX_USBD_CONFIG_INFO_COLOR +#define NRFX_USBD_CONFIG_INFO_COLOR 0 +#endif + +// NRFX_USBD_CONFIG_DEBUG_COLOR - ANSI escape code prefix. + +// <0=> Default +// <1=> Black +// <2=> Red +// <3=> Green +// <4=> Yellow +// <5=> Blue +// <6=> Magenta +// <7=> Cyan +// <8=> White + +#ifndef NRFX_USBD_CONFIG_DEBUG_COLOR +#define NRFX_USBD_CONFIG_DEBUG_COLOR 0 +#endif + +// + +// + +// NRFX_USBREG_ENABLED - nrfx_usbreg - USBREG peripheral driver +//========================================================== +#ifndef NRFX_USBREG_ENABLED +#define NRFX_USBREG_ENABLED 0 +#endif +// NRFX_USBREG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority + +// <0=> 0 (highest) +// <1=> 1 +// <2=> 2 +// <3=> 3 +// <4=> 4 +// <5=> 5 +// <6=> 6 +// <7=> 7 + +#ifndef NRFX_USBREG_DEFAULT_CONFIG_IRQ_PRIORITY +#define NRFX_USBREG_DEFAULT_CONFIG_IRQ_PRIORITY 7 +#endif + +// + +// + // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver. //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance. #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT1_ENABLED - Enable WDT1 instance. #ifndef NRFX_WDT1_ENABLED -#define NRFX_WDT1_ENABLED 1 +#define NRFX_WDT1_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver. @@ -1866,4 +2138,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF5340_APPLICATION_H__ diff --git a/templates/nRF5340_network/nrfx_config.h b/templates/nrfx_config_nrf5340_network.h similarity index 88% rename from templates/nRF5340_network/nrfx_config.h rename to templates/nrfx_config_nrf5340_network.h index 93abc5b5c..08844bd7a 100644 --- a/templates/nRF5340_network/nrfx_config.h +++ b/templates/nrfx_config_nrf5340_network.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2019 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF5340_NETWORK_H__ +#define NRFX_CONFIG_NRF5340_NETWORK_H__ /* * The MDK provides macros for accessing the peripheral register structures @@ -12,6 +43,7 @@ #define NRF_AAR NRF_AAR_NS #define NRF_CCM NRF_CCM_NS #define NRF_CLOCK NRF_CLOCK_NS +#define NRF_DCNF NRF_DCNF_NS #define NRF_DPPIC NRF_DPPIC_NS #define NRF_ECB NRF_ECB_NS #define NRF_EGU0 NRF_EGU0_NS @@ -42,6 +74,7 @@ #define NRF_UARTE0 NRF_UARTE0_NS #define NRF_UICR NRF_UICR_NS #define NRF_VMC NRF_VMC_NS +#define NRF_VREQCTRL NRF_VREQCTRL_NS #define NRF_WDT NRF_WDT_NS @@ -52,20 +85,35 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver. //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF clock source. -// <0=> RC -// <1=> XTAL -// <2=> Synth -// <131073=> External Low Swing -// <196609=> External Full Swing +// <0=> ULP +// <1=> RC +// <2=> XTAL +// <3=> Synth #ifndef NRFX_CLOCK_CONFIG_LF_SRC -#define NRFX_CLOCK_CONFIG_LF_SRC 1 +#define NRFX_CLOCK_CONFIG_LF_SRC 2 +#endif + +// NRFX_CLOCK_CONFIG_LF_CAL_ENABLED - Enables LF Clock Calibration Support + +#ifndef NRFX_CLOCK_CONFIG_LF_CAL_ENABLED +#define NRFX_CLOCK_CONFIG_LF_CAL_ENABLED 0 #endif +// NRFX_CLOCK_CONFIG_HFCLK192M_SRC - HFCLK192M source. + +// <0=> HFINT +// <1=> HFXO + +#ifndef NRFX_CLOCK_CONFIG_HFCLK192M_SRC +#define NRFX_CLOCK_CONFIG_HFCLK192M_SRC 1 +#endif + + // NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. // <0=> 0 (highest) @@ -137,7 +185,7 @@ // NRFX_DPPI_ENABLED - nrfx_dppi - DPPI allocator. //========================================================== #ifndef NRFX_DPPI_ENABLED -#define NRFX_DPPI_ENABLED 1 +#define NRFX_DPPI_ENABLED 0 #endif // NRFX_DPPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -195,13 +243,13 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -224,7 +272,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver. //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins. #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -302,7 +350,7 @@ // NRFX_IPC_ENABLED - nrfx_ipc - IPC peripheral driver //========================================================== #ifndef NRFX_IPC_ENABLED -#define NRFX_IPC_ENABLED 1 +#define NRFX_IPC_ENABLED 0 #endif // @@ -310,7 +358,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -318,7 +366,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver. //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -340,13 +388,13 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing (PRS) module. //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif @@ -406,7 +454,7 @@ // NRFX_RNG_ENABLED - nrfx_rng - RNG peripheral driver //========================================================== #ifndef NRFX_RNG_ENABLED -#define NRFX_RNG_ENABLED 1 +#define NRFX_RNG_ENABLED 0 #endif // NRFX_RNG_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -480,20 +528,20 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver. //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enables RTC0 instance. #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enables RTC1 instance. #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -568,13 +616,13 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver. //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enables SPIM0 instance. #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif @@ -649,13 +697,13 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver. //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enables SPIS0 instance. #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif @@ -731,13 +779,13 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TEMP_ENABLED - nrfx_temp - TEMP peripheral driver //========================================================== #ifndef NRFX_TEMP_ENABLED -#define NRFX_TEMP_ENABLED 1 +#define NRFX_TEMP_ENABLED 0 #endif // NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority @@ -760,27 +808,27 @@ // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver. //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enables TIMER0 instance. #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enables TIMER1 instance. #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enables TIMER2 instance. #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -854,13 +902,13 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver. //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enables TWIM0 instance. #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -934,13 +982,13 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver. //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enables TWIS0 instance. #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif @@ -1031,11 +1079,11 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver. //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enables UARTE0 instances #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1109,13 +1157,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver. //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance. #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver. @@ -1197,4 +1245,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF5340_NETWORK_H__ diff --git a/templates/nRF9160/nrfx_config.h b/templates/nrfx_config_nrf9160.h similarity index 89% rename from templates/nRF9160/nrfx_config.h rename to templates/nrfx_config_nrf9160.h index 129c30682..ad85bcd5c 100644 --- a/templates/nRF9160/nrfx_config.h +++ b/templates/nrfx_config_nrf9160.h @@ -1,5 +1,36 @@ -#ifndef NRFX_CONFIG_H__ -#define NRFX_CONFIG_H__ +/* + * Copyright (c) 2018 - 2020, Nordic Semiconductor ASA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NRFX_CONFIG_NRF9160_H__ +#define NRFX_CONFIG_NRF9160_H__ /* * The MDK provides macros for accessing the peripheral register structures @@ -18,11 +49,11 @@ #define NRF_EGU4 NRF_EGU4_S #define NRF_EGU5 NRF_EGU5_S #define NRF_FPU NRF_FPU_S -#define NRF_P0 NRF_P0_S #define NRF_I2S NRF_I2S_S #define NRF_IPC NRF_IPC_S #define NRF_KMU NRF_KMU_S #define NRF_NVMC NRF_NVMC_S +#define NRF_P0 NRF_P0_S #define NRF_PDM NRF_PDM_S #define NRF_POWER NRF_POWER_S #define NRF_PWM0 NRF_PWM0_S @@ -71,7 +102,7 @@ #define NRF_SPU NRF_SPU_S #define NRF_UICR NRF_UICR_S -/* Fixups for GPIOTE HAL and driver. */ +/* Fixups for GPIOTE driver. */ #define NRF_GPIOTE NRF_GPIOTE0_S #define GPIOTE_IRQHandler GPIOTE0_IRQHandler @@ -82,7 +113,7 @@ // NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver. //========================================================== #ifndef NRFX_CLOCK_ENABLED -#define NRFX_CLOCK_ENABLED 1 +#define NRFX_CLOCK_ENABLED 0 #endif // NRFX_CLOCK_CONFIG_LF_SRC - LF clock source. @@ -164,7 +195,7 @@ // NRFX_DPPI_ENABLED - nrfx_dppi - DPPI allocator. //========================================================== #ifndef NRFX_DPPI_ENABLED -#define NRFX_DPPI_ENABLED 1 +#define NRFX_DPPI_ENABLED 0 #endif // NRFX_DPPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== @@ -222,43 +253,43 @@ // NRFX_EGU_ENABLED - nrfx_egu - EGU peripheral driver. //========================================================== #ifndef NRFX_EGU_ENABLED -#define NRFX_EGU_ENABLED 1 +#define NRFX_EGU_ENABLED 0 #endif // NRFX_EGU0_ENABLED - Enable EGU0 instance. #ifndef NRFX_EGU0_ENABLED -#define NRFX_EGU0_ENABLED 1 +#define NRFX_EGU0_ENABLED 0 #endif // NRFX_EGU1_ENABLED - Enable EGU1 instance. #ifndef NRFX_EGU1_ENABLED -#define NRFX_EGU1_ENABLED 1 +#define NRFX_EGU1_ENABLED 0 #endif // NRFX_EGU2_ENABLED - Enable EGU2 instance. #ifndef NRFX_EGU2_ENABLED -#define NRFX_EGU2_ENABLED 1 +#define NRFX_EGU2_ENABLED 0 #endif // NRFX_EGU3_ENABLED - Enable EGU3 instance. #ifndef NRFX_EGU3_ENABLED -#define NRFX_EGU3_ENABLED 1 +#define NRFX_EGU3_ENABLED 0 #endif // NRFX_EGU4_ENABLED - Enable EGU4 instance. #ifndef NRFX_EGU4_ENABLED -#define NRFX_EGU4_ENABLED 1 +#define NRFX_EGU4_ENABLED 0 #endif // NRFX_EGU5_ENABLED - Enable EGU5 instance. #ifndef NRFX_EGU5_ENABLED -#define NRFX_EGU5_ENABLED 1 +#define NRFX_EGU5_ENABLED 0 #endif // NRFX_EGU_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -281,7 +312,7 @@ // NRFX_GPIOTE_ENABLED - nrfx_gpiote - GPIOTE peripheral driver. //========================================================== #ifndef NRFX_GPIOTE_ENABLED -#define NRFX_GPIOTE_ENABLED 1 +#define NRFX_GPIOTE_ENABLED 0 #endif // NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS - Number of lower power input pins. #ifndef NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS @@ -359,7 +390,7 @@ // NRFX_I2S_ENABLED - nrfx_i2s - I2S peripheral driver. //========================================================== #ifndef NRFX_I2S_ENABLED -#define NRFX_I2S_ENABLED 1 +#define NRFX_I2S_ENABLED 0 #endif // NRFX_I2S_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -433,7 +464,7 @@ // NRFX_IPC_ENABLED - nrfx_ipc - IPC peripheral driver //========================================================== #ifndef NRFX_IPC_ENABLED -#define NRFX_IPC_ENABLED 1 +#define NRFX_IPC_ENABLED 0 #endif // @@ -441,7 +472,7 @@ // NRFX_NVMC_ENABLED - nrfx_nvmc - NVMC peripheral driver //========================================================== #ifndef NRFX_NVMC_ENABLED -#define NRFX_NVMC_ENABLED 1 +#define NRFX_NVMC_ENABLED 0 #endif // @@ -449,7 +480,7 @@ // NRFX_PDM_ENABLED - nrfx_pdm - PDM peripheral driver. //========================================================== #ifndef NRFX_PDM_ENABLED -#define NRFX_PDM_ENABLED 1 +#define NRFX_PDM_ENABLED 0 #endif // NRFX_PDM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -523,7 +554,7 @@ // NRFX_POWER_ENABLED - nrfx_power - POWER peripheral driver. //========================================================== #ifndef NRFX_POWER_ENABLED -#define NRFX_POWER_ENABLED 1 +#define NRFX_POWER_ENABLED 0 #endif // NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -545,34 +576,34 @@ // NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing (PRS) module. //========================================================== #ifndef NRFX_PRS_ENABLED -#define NRFX_PRS_ENABLED 1 +#define NRFX_PRS_ENABLED 0 #endif // NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module. #ifndef NRFX_PRS_BOX_0_ENABLED -#define NRFX_PRS_BOX_0_ENABLED 1 +#define NRFX_PRS_BOX_0_ENABLED 0 #endif // NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module. #ifndef NRFX_PRS_BOX_1_ENABLED -#define NRFX_PRS_BOX_1_ENABLED 1 +#define NRFX_PRS_BOX_1_ENABLED 0 #endif // NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module. #ifndef NRFX_PRS_BOX_2_ENABLED -#define NRFX_PRS_BOX_2_ENABLED 1 +#define NRFX_PRS_BOX_2_ENABLED 0 #endif // NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module. #ifndef NRFX_PRS_BOX_3_ENABLED -#define NRFX_PRS_BOX_3_ENABLED 1 +#define NRFX_PRS_BOX_3_ENABLED 0 #endif // NRFX_PRS_CONFIG_LOG_ENABLED - Enables logging in the module. @@ -631,34 +662,34 @@ // NRFX_PWM_ENABLED - nrfx_pwm - PWM peripheral driver. //========================================================== #ifndef NRFX_PWM_ENABLED -#define NRFX_PWM_ENABLED 1 +#define NRFX_PWM_ENABLED 0 #endif // NRFX_PWM0_ENABLED - Enables PWM0 instance. #ifndef NRFX_PWM0_ENABLED -#define NRFX_PWM0_ENABLED 1 +#define NRFX_PWM0_ENABLED 0 #endif // NRFX_PWM1_ENABLED - Enables PWM1 instance. #ifndef NRFX_PWM1_ENABLED -#define NRFX_PWM1_ENABLED 1 +#define NRFX_PWM1_ENABLED 0 #endif // NRFX_PWM2_ENABLED - Enables PWM2 instance. #ifndef NRFX_PWM2_ENABLED -#define NRFX_PWM2_ENABLED 1 +#define NRFX_PWM2_ENABLED 0 #endif // NRFX_PWM3_ENABLED - Enables PWM3 instance. #ifndef NRFX_PWM3_ENABLED -#define NRFX_PWM3_ENABLED 1 +#define NRFX_PWM3_ENABLED 0 #endif // NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -732,20 +763,20 @@ // NRFX_RTC_ENABLED - nrfx_rtc - RTC peripheral driver. //========================================================== #ifndef NRFX_RTC_ENABLED -#define NRFX_RTC_ENABLED 1 +#define NRFX_RTC_ENABLED 0 #endif // NRFX_RTC0_ENABLED - Enables RTC0 instance. #ifndef NRFX_RTC0_ENABLED -#define NRFX_RTC0_ENABLED 1 +#define NRFX_RTC0_ENABLED 0 #endif // NRFX_RTC1_ENABLED - Enables RTC1 instance. #ifndef NRFX_RTC1_ENABLED -#define NRFX_RTC1_ENABLED 1 +#define NRFX_RTC1_ENABLED 0 #endif // NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -819,7 +850,7 @@ // NRFX_SAADC_ENABLED - nrfx_saadc - SAADC peripheral driver. //========================================================== #ifndef NRFX_SAADC_ENABLED -#define NRFX_SAADC_ENABLED 1 +#define NRFX_SAADC_ENABLED 0 #endif // NRFX_SAADC_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -893,34 +924,34 @@ // NRFX_SPIM_ENABLED - nrfx_spim - SPIM peripheral driver. //========================================================== #ifndef NRFX_SPIM_ENABLED -#define NRFX_SPIM_ENABLED 1 +#define NRFX_SPIM_ENABLED 0 #endif // NRFX_SPIM0_ENABLED - Enables SPIM0 instance. #ifndef NRFX_SPIM0_ENABLED -#define NRFX_SPIM0_ENABLED 1 +#define NRFX_SPIM0_ENABLED 0 #endif // NRFX_SPIM1_ENABLED - Enables SPIM1 instance. #ifndef NRFX_SPIM1_ENABLED -#define NRFX_SPIM1_ENABLED 1 +#define NRFX_SPIM1_ENABLED 0 #endif // NRFX_SPIM2_ENABLED - Enables SPIM2 instance. #ifndef NRFX_SPIM2_ENABLED -#define NRFX_SPIM2_ENABLED 1 +#define NRFX_SPIM2_ENABLED 0 #endif // NRFX_SPIM3_ENABLED - Enables SPIM3 instance. #ifndef NRFX_SPIM3_ENABLED -#define NRFX_SPIM3_ENABLED 1 +#define NRFX_SPIM3_ENABLED 0 #endif // NRFX_SPIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -994,34 +1025,34 @@ // NRFX_SPIS_ENABLED - nrfx_spis - SPIS peripheral driver. //========================================================== #ifndef NRFX_SPIS_ENABLED -#define NRFX_SPIS_ENABLED 1 +#define NRFX_SPIS_ENABLED 0 #endif // NRFX_SPIS0_ENABLED - Enables SPIS0 instance. #ifndef NRFX_SPIS0_ENABLED -#define NRFX_SPIS0_ENABLED 1 +#define NRFX_SPIS0_ENABLED 0 #endif // NRFX_SPIS1_ENABLED - Enables SPIS1 instance. #ifndef NRFX_SPIS1_ENABLED -#define NRFX_SPIS1_ENABLED 1 +#define NRFX_SPIS1_ENABLED 0 #endif // NRFX_SPIS2_ENABLED - Enables SPIS2 instance. #ifndef NRFX_SPIS2_ENABLED -#define NRFX_SPIS2_ENABLED 1 +#define NRFX_SPIS2_ENABLED 0 #endif // NRFX_SPIS3_ENABLED - Enables SPIS3 instance. #ifndef NRFX_SPIS3_ENABLED -#define NRFX_SPIS3_ENABLED 1 +#define NRFX_SPIS3_ENABLED 0 #endif // NRFX_SPIS_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1096,31 +1127,31 @@ #ifndef NRFX_SYSTICK_ENABLED -#define NRFX_SYSTICK_ENABLED 1 +#define NRFX_SYSTICK_ENABLED 0 #endif // NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver. //========================================================== #ifndef NRFX_TIMER_ENABLED -#define NRFX_TIMER_ENABLED 1 +#define NRFX_TIMER_ENABLED 0 #endif // NRFX_TIMER0_ENABLED - Enables TIMER0 instance. #ifndef NRFX_TIMER0_ENABLED -#define NRFX_TIMER0_ENABLED 1 +#define NRFX_TIMER0_ENABLED 0 #endif // NRFX_TIMER1_ENABLED - Enables TIMER1 instance. #ifndef NRFX_TIMER1_ENABLED -#define NRFX_TIMER1_ENABLED 1 +#define NRFX_TIMER1_ENABLED 0 #endif // NRFX_TIMER2_ENABLED - Enables TIMER2 instance. #ifndef NRFX_TIMER2_ENABLED -#define NRFX_TIMER2_ENABLED 1 +#define NRFX_TIMER2_ENABLED 0 #endif // NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1194,34 +1225,34 @@ // NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver. //========================================================== #ifndef NRFX_TWIM_ENABLED -#define NRFX_TWIM_ENABLED 1 +#define NRFX_TWIM_ENABLED 0 #endif // NRFX_TWIM0_ENABLED - Enables TWIM0 instance. #ifndef NRFX_TWIM0_ENABLED -#define NRFX_TWIM0_ENABLED 1 +#define NRFX_TWIM0_ENABLED 0 #endif // NRFX_TWIM1_ENABLED - Enables TWIM1 instance. #ifndef NRFX_TWIM1_ENABLED -#define NRFX_TWIM1_ENABLED 1 +#define NRFX_TWIM1_ENABLED 0 #endif // NRFX_TWIM2_ENABLED - Enables TWIM2 instance. #ifndef NRFX_TWIM2_ENABLED -#define NRFX_TWIM2_ENABLED 1 +#define NRFX_TWIM2_ENABLED 0 #endif // NRFX_TWIM3_ENABLED - Enables TWIM3 instance. #ifndef NRFX_TWIM3_ENABLED -#define NRFX_TWIM3_ENABLED 1 +#define NRFX_TWIM3_ENABLED 0 #endif // NRFX_TWIM_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1295,34 +1326,34 @@ // NRFX_TWIS_ENABLED - nrfx_twis - TWIS peripheral driver. //========================================================== #ifndef NRFX_TWIS_ENABLED -#define NRFX_TWIS_ENABLED 1 +#define NRFX_TWIS_ENABLED 0 #endif // NRFX_TWIS0_ENABLED - Enables TWIS0 instance. #ifndef NRFX_TWIS0_ENABLED -#define NRFX_TWIS0_ENABLED 1 +#define NRFX_TWIS0_ENABLED 0 #endif // NRFX_TWIS1_ENABLED - Enables TWIS1 instance. #ifndef NRFX_TWIS1_ENABLED -#define NRFX_TWIS1_ENABLED 1 +#define NRFX_TWIS1_ENABLED 0 #endif // NRFX_TWIS2_ENABLED - Enables TWIS2 instance. #ifndef NRFX_TWIS2_ENABLED -#define NRFX_TWIS2_ENABLED 1 +#define NRFX_TWIS2_ENABLED 0 #endif // NRFX_TWIS3_ENABLED - Enables TWIS3 instance. #ifndef NRFX_TWIS3_ENABLED -#define NRFX_TWIS3_ENABLED 1 +#define NRFX_TWIS3_ENABLED 0 #endif // NRFX_TWIS_ASSUME_INIT_AFTER_RESET_ONLY - Assumes that any instance would be initialized only once. @@ -1413,26 +1444,26 @@ // NRFX_UARTE_ENABLED - nrfx_uarte - UARTE peripheral driver. //========================================================== #ifndef NRFX_UARTE_ENABLED -#define NRFX_UARTE_ENABLED 1 +#define NRFX_UARTE_ENABLED 0 #endif // NRFX_UARTE0_ENABLED - Enables UARTE0 instances #ifndef NRFX_UARTE0_ENABLED -#define NRFX_UARTE0_ENABLED 1 +#define NRFX_UARTE0_ENABLED 0 #endif // NRFX_UARTE1_ENABLED - Enables UARTE1 instance. #ifndef NRFX_UARTE1_ENABLED -#define NRFX_UARTE1_ENABLED 1 +#define NRFX_UARTE1_ENABLED 0 #endif // NRFX_UARTE2_ENABLED - Enables UARTE2 instance. #ifndef NRFX_UARTE2_ENABLED -#define NRFX_UARTE2_ENABLED 1 +#define NRFX_UARTE2_ENABLED 0 #endif // NRFX_UARTE3_ENABLED - Enables UARTE3 instance. #ifndef NRFX_UARTE3_ENABLED -#define NRFX_UARTE3_ENABLED 1 +#define NRFX_UARTE3_ENABLED 0 #endif // NRFX_UARTE_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority. @@ -1506,13 +1537,13 @@ // NRFX_WDT_ENABLED - nrfx_wdt - WDT peripheral driver. //========================================================== #ifndef NRFX_WDT_ENABLED -#define NRFX_WDT_ENABLED 1 +#define NRFX_WDT_ENABLED 0 #endif // NRFX_WDT0_ENABLED - Enable WDT0 instance. #ifndef NRFX_WDT0_ENABLED -#define NRFX_WDT0_ENABLED 1 +#define NRFX_WDT0_ENABLED 0 #endif // NRFX_WDT_CONFIG_NO_IRQ - Remove WDT IRQ handling from WDT driver. @@ -1594,4 +1625,4 @@ // -#endif // NRFX_CONFIG_H__ +#endif // NRFX_CONFIG_NRF9160_H__ diff --git a/templates/nrfx_glue.h b/templates/nrfx_glue.h index 19bff520b..316a40856 100644 --- a/templates/nrfx_glue.h +++ b/templates/nrfx_glue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/templates/nrfx_log.h b/templates/nrfx_log.h index 3bc1b424e..80d8efbdf 100644 --- a/templates/nrfx_log.h +++ b/templates/nrfx_log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2019, Nordic Semiconductor ASA + * Copyright (c) 2017 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without