diff --git a/Telemetry/README.md b/Telemetry/README.md new file mode 100644 index 00000000..7bc66e07 --- /dev/null +++ b/Telemetry/README.md @@ -0,0 +1,131 @@ +# Telemetry_V1 – Project Layout + +This project separates **generated code** (Harmony/MPLAB X) from **hand-written code**. +Your own modules live at the project root **outside** the `.X` folder. + +``` +Telemetry_V1/ +├─ Telemetry_V1.X/ # MPLAB X project metadata & build configs (IDE files) +├─ src/ # Harmony-generated sources (owned by generator) +│ └─ config/ # Board/peripheral init generated by MHC +├─ app/ # Your application layer +│ ├─ include/ # Public app headers +│ └─ src/ # App .c files (main loop, tasks, state machines) +├─ drivers/ # Reusable drivers you own +│ └─ ws2812/ +│ ├─ include/ # Public headers (e.g., ws2812_spi_enc.h) +│ └─ src/ # Driver sources (e.g., ws2812_spi_enc.c) +├─ utils/ # Shared helpers (no board dependencies) +│ ├─ include/ # Public helper headers +│ └─ src/ # Helper sources +└─ README.md # This file +``` + +## Folder purposes + +### `Telemetry_V1.X/` +- **Do not put hand-written code here.** +- MPLAB X / nbproject metadata, build configs, linker settings, Harmony artifacts. +- Contents may be modified automatically by the IDE/generator. + +### `src/` (generated) +- Harmony/MHC generated startup and peripheral init code. +- Generally **do not edit**; re-run the generator to change configuration. +- `src/config/` contains SERCOM/clock/pin setup your code will use. + +### `app/` +- Your application logic. +- `include/`: public app headers (APIs, types). +- `src/`: implementations—`main.c`, tasks, schedulers, state machines. + +### `drivers/` +- Encapsulated modules interfacing hardware or external parts. +- Each driver has its own subfolder with `include/` and `src/`. +- Example: `drivers/ws2812/` (SPI encoder for WS2812B). + +### `utils/` +- Generic helpers (timers, ring buffers, math, logging). +- No board/peripheral dependencies; safe to include anywhere. + +## Include paths (MPLAB X v6.20) + +Add header search paths so the compiler can find your module headers. + +**C compiler (xc32-gcc):** +1) Right-click project → **Properties**. +2) Under **Conf: [your config] → XC32 (vX.Y.Z)**, select **xc32-gcc**. +3) Set **Option categories** = **Preprocessing and messages**. +4) **Include directories (-I)** → **…** → add (one per line): + - `app/include` + - `drivers/ws2812/include` + - `drivers/wsen_pads/include` *(add any other driver include paths)* + - `utils/include` +5) **OK** → **Apply**. + +**If you also build C++:** repeat under **xc32-g++**. + +**Can’t find the field?** As a fallback, put this in **xc32-gcc → General → Additional options**: + + +**Usage in code (no `../` needed):** +```c +#include "ws2812_spi_enc.h" +#include "wsen_pads.h" +#include "ringbuf.h" + +## Adding files to the project (logical view) +- Right-click **Header Files** → *Add Existing Item…* → select files under any `*/include`. +- Right-click **Source Files** → *Add Existing Item…* → select files under any `*/src`. +- The IDE’s logical folders don’t need to mirror disk exactly, but keeping them aligned helps. + +## Build & ownership rules +- Generated code in `src/config/...` is **owned by the generator**. +- Your code in `app/`, `drivers/`, `utils/` is **owned by you**. +- Don’t edit generated files; instead change Harmony settings or wrap/extend from your modules. + +## Naming & style (suggested) +- Lowercase file names with underscores: `ws2812_spi_enc.c`, `app_config.h`. +- Public headers live in `include/`; private headers use `*_priv.h` in `src/`. +- Prefix symbols by module: `ws2812_…`, `util_…`, `app_…`. + +## Example: WS2812 driver +- Header: `drivers/ws2812/include/ws2812_spi_enc.h` +- Source: `drivers/ws2812/src/ws2812_spi_enc.c` +- Pair with SERCOM SPI ≈ 2.4 MHz (Mode 0) and continuous TX (DMA or tight loop). + +--- + +## How to add a **new driver** (step-by-step) + +1) **Create folders on disk** +``` +drivers// + include/ + src/ +``` + +2) **Add your files** +- Public API header → `drivers//include/.h` +- Implementation(s) → `drivers//src/.c` +- Optional internal header → `drivers//src/_priv.h` (not exported) + +3) **Add to project (logical view)** +- Right-click **Header Files** → *Add Existing Item…* → pick files from `drivers//include/` +- Right-click **Source Files** → *Add Existing Item…* → pick files from `drivers//src/` + +4) **Expose headers to the compiler** +- Project Properties → **Include directories** → add `drivers//include` + +5) **Use it in code** +```c +#include ".h" +``` +- Call the driver’s `init()` from your app startup (e.g., after Harmony `SYS_Initialize()`). +- Link any ISR hooks or callbacks the driver requires (e.g., DMAC, SERCOM events). + +6) **Keep dependencies clean** +- The driver should not include app files; export only what’s needed via its public header. +- If the driver needs board pins/config, pass them in via an `init()` struct instead of including generated headers. + +7) **Version control** +- Commit the new `drivers//...` tree and the updated project settings (the `.X` metadata will record added files and include paths). diff --git a/Telemetry/Telemetry_V1.X/Drivers.mc3.bak0 b/Telemetry/Telemetry_V1.X/Drivers.mc3.bak0 new file mode 100644 index 00000000..8f008805 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Drivers.mc3.bak0 @@ -0,0 +1,18288 @@ + + + + + can0 + class com.microchip.mcc.harmony.HarmonyModule + + + cmsis + class com.microchip.mcc.harmony.HarmonyModule + + + core + class com.microchip.mcc.harmony.HarmonyModule + + + dfp + class com.microchip.mcc.harmony.HarmonyModule + + + eic + class com.microchip.mcc.harmony.HarmonyModule + + + evsys + class com.microchip.mcc.harmony.HarmonyModule + + + nvmctrl + class com.microchip.mcc.harmony.HarmonyModule + + + sercom0 + class com.microchip.mcc.harmony.HarmonyModule + + + sercom1 + class com.microchip.mcc.harmony.HarmonyModule + + + sercom2 + class com.microchip.mcc.harmony.HarmonyModule + + + sercom3 + class com.microchip.mcc.harmony.HarmonyModule + + + stdio + class com.microchip.mcc.harmony.HarmonyModule + + + tc3 + class com.microchip.mcc.harmony.HarmonyModule + + + + + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="AUTO_DATA_BIT_TIMING_CALCULATION"> + <Values dnOrder="0"> + <User dnOrder="0" value="true"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="AUTO_NOMINAL_BIT_TIMING_CALCULATION"> + <Values dnOrder="0"> + <User dnOrder="0" value="true"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CALCULATED_DATA_BITRATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="2000"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CALCULATED_DATA_ERRORRATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="0.000"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CALCULATED_NOMINAL_BITRATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="500"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CALCULATED_NOMINAL_ERRORRATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="0.000"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER10_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER10_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER10_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER10_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER11_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER11_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER11_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER11_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER12_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER12_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER12_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER12_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER13_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER13_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER13_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER13_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER14_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER14_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER14_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER14_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER15_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER15_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER15_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER15_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER16_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER16_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER16_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER16_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER17_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER17_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER17_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER17_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER18_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER18_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER18_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER18_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER19_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER19_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER19_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER19_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER1_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER1_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER1_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER1_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER20_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER20_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER20_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER20_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER21_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER21_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER21_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER21_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER22_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER22_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER22_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER22_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER23_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER23_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER23_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER23_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER24_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER24_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER24_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER24_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER25_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER25_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER25_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER25_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER26_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER26_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER26_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER26_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER27_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER27_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER27_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER27_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER28_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER28_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER28_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER28_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER29_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER29_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER29_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER29_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER2_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER2_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER2_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER2_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER30_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER30_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER30_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER30_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER31_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER31_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER31_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER31_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER32_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER32_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER32_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER32_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER33_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER33_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER33_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER33_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER34_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER34_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER34_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER34_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER35_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER35_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER35_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER35_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER36_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER36_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER36_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER36_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER37_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER37_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER37_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER37_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER38_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER38_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER38_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER38_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER39_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER39_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER39_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER39_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER3_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER3_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER3_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER3_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER40_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER40_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER40_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER40_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER41_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER41_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER41_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER41_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER42_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER42_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER42_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER42_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER43_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER43_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER43_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER43_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER44_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER44_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER44_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER44_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER45_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER45_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER45_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER45_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER46_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER46_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER46_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER46_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER47_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER47_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER47_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER47_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER48_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER48_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER48_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER48_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER49_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER49_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER49_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER49_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER4_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER4_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER4_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER4_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER50_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER50_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER50_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER50_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER51_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER51_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER51_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER51_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER52_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER52_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER52_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER52_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER53_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER53_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER53_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER53_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER54_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER54_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER54_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER54_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER55_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER55_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER55_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER55_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER56_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER56_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER56_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER56_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER57_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER57_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER57_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER57_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER58_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER58_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER58_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER58_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER59_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER59_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER59_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER59_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER5_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER5_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER5_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER5_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER60_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER60_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER60_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER60_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER61_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER61_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER61_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER61_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER62_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER62_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER62_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER62_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER63_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER63_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER63_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER63_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER64_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER64_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER64_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER64_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER6_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER6_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER6_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER6_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER7_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER7_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER7_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER7_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER8_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER8_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER8_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER8_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER9_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER9_EFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER9_EFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_EXT_FILTER9_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER100_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER100_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER100_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER100_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER101_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER101_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER101_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER101_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER102_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER102_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER102_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER102_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER103_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER103_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER103_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER103_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER104_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER104_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER104_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER104_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER105_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER105_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER105_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER105_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER106_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER106_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER106_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER106_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER107_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER107_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER107_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER107_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER108_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER108_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER108_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER108_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER109_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER109_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER109_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER109_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER10_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER10_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER10_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER10_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER110_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER110_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER110_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER110_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER111_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER111_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER111_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER111_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER112_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER112_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER112_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER112_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER113_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER113_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER113_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER113_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER114_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER114_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER114_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER114_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER115_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER115_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER115_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER115_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER116_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER116_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER116_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER116_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER117_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER117_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER117_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER117_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER118_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER118_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER118_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER118_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER119_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER119_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER119_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER119_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER11_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER11_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER11_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER11_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER120_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER120_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER120_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER120_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER121_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER121_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER121_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER121_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER122_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER122_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER122_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER122_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER123_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER123_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER123_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER123_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER124_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER124_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER124_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER124_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER125_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER125_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER125_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER125_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER126_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER126_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER126_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER126_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER127_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER127_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER127_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER127_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER128_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER128_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER128_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER128_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER12_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER12_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER12_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER12_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER13_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER13_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER13_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER13_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER14_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER14_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER14_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER14_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER15_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER15_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER15_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER15_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER16_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER16_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER16_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER16_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER17_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER17_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER17_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER17_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER18_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER18_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER18_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER18_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER19_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER19_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER19_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER19_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER1_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER1_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER1_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER1_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER20_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER20_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER20_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER20_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER21_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER21_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER21_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER21_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER22_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER22_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER22_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER22_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER23_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER23_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER23_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER23_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER24_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER24_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER24_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER24_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER25_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER25_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER25_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER25_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER26_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER26_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER26_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER26_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER27_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER27_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER27_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER27_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER28_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER28_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER28_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER28_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER29_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER29_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER29_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER29_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER2_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER2_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER2_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER2_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER30_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER30_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER30_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER30_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER31_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER31_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER31_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER31_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER32_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER32_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER32_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER32_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER33_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER33_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER33_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER33_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER34_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER34_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER34_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER34_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER35_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER35_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER35_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER35_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER36_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER36_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER36_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER36_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER37_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER37_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER37_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER37_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER38_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER38_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER38_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER38_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER39_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER39_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER39_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER39_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER3_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER3_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER3_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER3_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER40_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER40_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER40_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER40_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER41_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER41_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER41_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER41_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER42_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER42_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER42_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER42_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER43_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER43_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER43_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER43_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER44_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER44_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER44_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER44_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER45_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER45_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER45_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER45_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER46_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER46_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER46_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER46_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER47_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER47_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER47_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER47_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER48_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER48_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER48_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER48_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER49_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER49_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER49_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER49_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER4_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER4_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER4_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER4_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER50_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER50_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER50_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER50_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER51_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER51_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER51_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER51_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER52_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER52_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER52_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER52_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER53_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER53_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER53_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER53_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER54_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER54_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER54_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER54_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER55_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER55_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER55_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER55_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER56_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER56_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER56_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER56_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER57_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER57_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER57_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER57_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER58_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER58_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER58_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER58_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER59_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER59_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER59_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER59_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER5_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER5_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER5_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER5_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER60_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER60_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER60_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER60_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER61_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER61_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER61_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER61_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER62_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER62_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER62_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER62_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER63_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER63_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER63_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER63_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER64_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER64_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER64_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER64_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER65_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER65_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER65_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER65_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER66_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER66_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER66_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER66_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER67_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER67_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER67_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER67_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER68_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER68_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER68_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER68_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER69_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER69_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER69_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER69_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER6_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER6_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER6_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER6_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER70_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER70_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER70_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER70_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER71_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER71_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER71_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER71_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER72_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER72_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER72_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER72_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER73_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER73_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER73_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER73_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER74_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER74_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER74_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER74_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER75_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER75_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER75_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER75_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER76_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER76_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER76_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER76_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER77_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER77_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER77_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER77_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER78_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER78_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER78_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER78_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER79_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER79_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER79_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER79_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER7_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER7_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER7_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER7_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER80_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER80_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER80_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER80_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER81_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER81_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER81_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER81_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER82_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER82_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER82_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER82_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER83_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER83_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER83_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER83_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER84_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER84_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER84_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER84_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER85_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER85_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER85_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER85_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER86_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER86_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER86_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER86_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER87_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER87_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER87_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER87_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER88_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER88_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER88_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER88_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER89_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER89_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER89_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER89_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER8_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER8_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER8_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER8_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER90_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER90_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER90_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER90_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER91_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER91_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER91_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER91_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER92_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER92_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER92_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER92_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER93_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER93_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER93_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER93_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER94_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER94_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER94_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER94_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER95_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER95_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER95_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER95_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER96_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER96_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER96_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER96_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER97_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER97_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER97_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER97_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER98_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER98_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER98_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER98_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER99_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER99_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER99_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER99_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER9_CONFIG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER9_SFID1"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER9_SFID2"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN0_STD_FILTER9_TYPE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_CORE_CLOCK_FREQ"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_GENERATE_LEGACY_APIS"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_IE_BECE_ENABLE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_IE_BEUE_ENABLE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_INSTANCE_NAME"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_OPMODE"> + <Values dnOrder="0"> + <User dnOrder="0" value="CAN FD"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="CAN_TIMEOUT"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DATA_BITRATE"> + <Values dnOrder="0"> + <User dnOrder="0" value="2000"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DATA_SAMPLE_POINT"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="readOnly"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <Dynamic dnOrder="0" id="can0" value="87.5"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DATA_TIME_QUANTA_PERIOD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="62.500"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DBTP_DBRP"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="readOnly"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <Dynamic dnOrder="0" id="can0" value="2"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DBTP_DSJW"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="1"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DBTP_DTSEG1"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="6"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DBTP_DTSEG2"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="1"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DBTP_SYNC"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="DBTP_TOTAL_TIME_QUANTA"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="8"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="FILTERS_EXT"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="FILTERS_EXT_NOMATCH"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="FILTERS_EXT_REJECT"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="FILTERS_STD"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="FILTERS_STD_NOMATCH"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="FILTERS_STD_REJECT"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="INTERRUPT_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value="true"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NBTP_NBRP"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="readOnly"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <Dynamic dnOrder="0" id="can0" value="2"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NBTP_NSJW"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="1"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NBTP_NTSEG1"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="30"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NBTP_NTSEG2"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="1"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NBTP_SYNC"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NBTP_TOTAL_TIME_QUANTA"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="32"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NOMINAL_BITRATE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NOMINAL_SAMPLE_POINT"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="readOnly"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <Dynamic dnOrder="0" id="can0" value="96.875"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="NOMINAL_TIME_QUANTA_PERIOD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="62.500"/> + </Values> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXBUF_USE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF0_BYTES_CFG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF0_ELEMENTS"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF0_OVERWRITE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF0_USE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF0_WATERMARK"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF0_WP"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF1_BYTES_CFG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF1_ELEMENTS"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF1_OVERWRITE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF1_USE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF1_WATERMARK"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RXF1_WP"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RX_BUFFER_BYTES_CFG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="RX_BUFFER_ELEMENTS"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TIMEOUT_COUNT"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TIMEOUT_SELECT"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TIMESTAMP_ENABLE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TIMESTAMP_MODE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TIMESTAMP_PRESCALER"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TXBUF_USE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_BUFFER_ELEMENTS"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_FIFO_BYTES_CFG"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_FIFO_ELEMENTS"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_FIFO_WATERMARK"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_FIFO_WP"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_PAUSE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="TX_USE"> + <Values dnOrder="0"/> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="instHeaderFile"> + <Attributes dnOrder="0"> + <String dnOrder="0" id="source"> + <Value dnOrder="0">../peripheral/can_u2003/templates/plib_can_interrupt.h.ftl</Value> + </String> + </Attributes> + </can0> +</can0> + + + + + <?xml version="1.0" encoding="UTF-8"?><can0> + <can0 dnOrder="0" id="sourceFile"> + <Attributes dnOrder="0"> + <String dnOrder="0" id="source"> + <Value dnOrder="0">../peripheral/can_u2003/templates/plib_can_interrupt.c.ftl</Value> + </String> + </Attributes> + </can0> +</can0> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><UserData> + <UserData dnOrder="0"> + <GraphSettings canvasHeight="549" canvasWidth="612" dnOrder="0"/> + <PowerProfiles dnOrder="1"> + <Profile dnOrder="0" id="profile0" name="Main"/> + </PowerProfiles> + <ComponentGraph dnOrder="2" id="__ROOTVIEW"> + <ElementPositions dnOrder="0"> + <ElementPosition dnOrder="0" id="can0" x="475" y="116"/> + <ElementPosition dnOrder="1" id="cmsis" x="330" y="60"/> + <ElementPosition dnOrder="2" id="core" x="340" y="20"/> + <ElementPosition dnOrder="3" id="dfp" x="440" y="20"/> + <ElementPosition dnOrder="4" id="eic" x="476" y="186"/> + <ElementPosition dnOrder="5" id="evsys" x="180" y="20"/> + <ElementPosition dnOrder="6" id="nvmctrl" x="20" y="20"/> + <ElementPosition dnOrder="7" id="sercom0" x="20" y="88"/> + <ElementPosition dnOrder="8" id="sercom1" x="19" y="204"/> + <ElementPosition dnOrder="9" id="sercom2" x="20" y="320"/> + <ElementPosition dnOrder="10" id="sercom3" x="19" y="389"/> + <ElementPosition dnOrder="11" id="stdio" x="190" y="314"/> + <ElementPosition dnOrder="12" id="tc3" x="476" y="236"/> + </ElementPositions> + </ComponentGraph> + </UserData> +</UserData> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CAN0_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CAN0_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CAN0_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CAN0_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CAN0_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="CAN0_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CAN0_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="can0" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="CoreMainFileName"> + <Values dnOrder="0"> + <User dnOrder="0" value="main"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="EIC_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="EIC_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="EIC_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="EIC_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="EIC_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="EIC_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="EIC_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_19_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_19_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_20_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_20_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_21_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_21_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_22_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_22_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_23_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_23_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_25_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_25_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_26_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_26_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_2_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_2_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_31_CHEN"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="GCLK_ID_31_FREQ"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="MCLK_AHB_INITIAL_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1dff"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="MCLK_APBA_INITIAL_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0xfff"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="MCLK_APBC_INITIAL_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x801e"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_10_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_10_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="SERCOM1_USART_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_10_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_11_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_11_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="SERCOM2_Handler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_11_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_12_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_12_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="SERCOM3_I2C_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_12_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_13_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_13_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="SERCOM4_Handler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_13_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_14_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_14_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="SERCOM5_Handler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_14_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_15_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_15_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="CAN0_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_15_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_23_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_23_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="TC3_TimerInterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_23_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_3_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_3_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="EIC_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_3_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_9_0_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_9_0_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="SERCOM0_SPI_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="NVIC_9_0_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM0_PAD2"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="D"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_15_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_16_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM0_PAD3"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_16_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_16_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="D"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_17_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM2_PAD0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_17_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_17_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="D"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_18_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM2_PAD1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_18_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_18_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="D"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_23_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_24_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_29_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_30_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_35_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM1_PAD0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_35_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_35_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="C"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_36_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM1_PAD1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_36_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_36_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="C"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_37_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM3_PAD0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="C"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_43_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="SERCOM3_PAD1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="C"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_44_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_45_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="CAN0_TX"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_45_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_45_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="G"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_46_FUNCTION_TYPE"> + <Values dnOrder="0"> + <User dnOrder="0" value="CAN0_RX"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_46_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_46_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value="G"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_49_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_50_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_61_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_62_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_63_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_DIR"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_FUNCTION_TYPE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_INEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_LAT"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_MODE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_PERIPHERAL_FUNCTION"> + <Values dnOrder="0"> + <User dnOrder="0" value=""/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PIN_64_PULLEN"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_DIR"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_OUT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_12"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA12"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_13"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA13"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_16"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA16"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_17"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA17"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_18"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA18"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_22"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA22"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_23"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA23"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_24"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA24"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_25"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA25"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_6"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA06"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_7"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA07"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_8"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA08"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PAD_9"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PA09"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG12"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG13"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG16"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG17"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG18"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG22"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG23"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG24"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG25"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG6"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG7"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG8"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PINCFG9"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x1"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_12_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_13_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_16_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_17_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_18_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_22_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_23_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_24_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_25_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_6_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_7_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_8_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PIN_9_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX11"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x22"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX12"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x66"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX3"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x33"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX4"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x33"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX6"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX8"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x22"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_0_PMUX9"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_DIR"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_OUT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_0"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB00"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_1"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB01"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_10"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB10"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_11"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB11"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_2"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB02"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_22"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB22"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_23"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB23"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PAD_3"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="PB03"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG0"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG1"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG10"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG11"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG2"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG22"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG23"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PINCFG3"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_0_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_10_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_11_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_1_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_22_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_23_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_2_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PIN_3_USED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PMUX0"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PMUX1"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PMUX11"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="PORT_GROUP_1_PMUX5"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0x0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM0_CORE_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM0_CORE_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM0_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM0_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM0_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="SERCOM0_SPI_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM0_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM1_CORE_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM1_CORE_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM1_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM1_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM1_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="SERCOM1_USART_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM1_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM2_CORE_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM2_CORE_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM2_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM2_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM2_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="SERCOM2_Handler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM2_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM3_CORE_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM3_CORE_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM3_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM3_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM3_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="SERCOM3_I2C_InterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM3_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM4_CORE_CLOCK_ENABLE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM4_CORE_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM4_INTERRUPT_ENABLE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM4_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM4_INTERRUPT_HANDLER"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM4_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM5_CORE_CLOCK_ENABLE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM5_CORE_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="0"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM5_INTERRUPT_ENABLE"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM5_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM5_INTERRUPT_HANDLER"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="SERCOM5_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"/> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="TC3_CLOCK_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="TC3_CLOCK_FREQUENCY"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="48000000"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="TC3_INTERRUPT_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="tc3" value="true"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="TC3_INTERRUPT_ENABLE_UPDATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="core" value="false"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="TC3_INTERRUPT_HANDLER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="tc3" value="TC3_TimerInterruptHandler"/> + </Values> + </core> +</core> + + + + + <?xml version="1.0" encoding="UTF-8"?><core> + <core dnOrder="0" id="TC3_INTERRUPT_HANDLER_LOCK"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="tc3" value="true"/> + </Values> + </core> +</core> + + + + + __ROOTVIEW + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="0"/> + </Values> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_0"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_1"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_10"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_11"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_12"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_13"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_14"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_15"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_2"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_3"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_4"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_5"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_6"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_7"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_8"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_ASYNCH_9"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_0"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_1"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_10"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_11"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_12"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_13"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_14"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_15"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_2"> + <Values dnOrder="0"> + <User dnOrder="0" value="true"/> + </Values> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_3"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_4"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_5"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_6"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_7"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_8"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CHAN_9"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CLKSEL"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_0"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_1"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_10"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_11"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_12"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_13"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_14"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_15"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_2"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_3"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_4"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_5"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_6"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_7"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_8"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_FILTEN_9"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_0"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_1"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_10"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_11"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_12"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_13"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_14"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_15"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_2"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_3"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_4"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_5"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_6"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_7"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_8"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_CONFIG_SENSE_9"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="0"/> + </Values> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_0"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_1"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_10"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_11"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_12"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_13"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_14"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_15"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_2"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_3"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_4"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_5"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_6"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_7"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_8"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_EXTINTEO_9"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INSTANCE_NAME"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="4"/> + </Values> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_0"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_1"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_10"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_11"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_12"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_13"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_14"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_15"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_2"> + <Values dnOrder="0"> + <User dnOrder="0" value="true"/> + </Values> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_3"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_4"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_5"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_6"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_7"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_8"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_9"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="EIC_INT_COUNT"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="NMI_ASYNCH"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="NMI_CTRL"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="NMI_FILTEN"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + <?xml version="1.0" encoding="UTF-8"?><eic> + <eic dnOrder="0" id="NMI_SENSE"> + <Values dnOrder="0"/> + </eic> +</eic> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_0_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_10_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_11_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_1_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_2_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_3_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_4_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_5_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_6_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_7_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_8_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="EVSYS_CHANNEL_9_GENERATOR_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="evsys" value="false"/> + </Values> + </evsys> +</evsys> + + + + + <?xml version="1.0" encoding="UTF-8"?><evsys> + <evsys dnOrder="0" id="GENERATOR_EIC_EXTINT_2_ACTIVE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="eic" value="false"/> + </Values> + </evsys> +</evsys> + + + + + __ROOTVIEW + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CM_ADDR_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CM_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="232"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CM_BAUD_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CM_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CM_TRISE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_LOWTOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_LOWTOUT_SUPPORT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_SCLSM"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_SEXTTOEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_SEXTTOOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_SLAVE_ADDDRESS"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_SMEN"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2CS_TENBITEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_ADDR_TENBITEN"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_CLOCK_SPEED"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_CLOCK_SPEED_HZ"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_MASTER_CODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_MASTER_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_SCLSM"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="I2C_SLAVE_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="RECEIVE_DATA_REGISTER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="&amp;(SERCOM0_REGS-&gt;SPIM.SERCOM_DATA)"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_INSTANCE_NAME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value="1"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_SPIM_COMMON_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_SPIM_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_SPIM_SOURCE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_SPI_REG_NAME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_SPI_SLAVE_REG_NAME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_SYNCBUSY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_USART_COMMON_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_USART_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_USART_REG_NAME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SERCOM_USART_SOURCE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIM_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_BUSY_PIN_LOGIC_LEVEL"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_DATA_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_DIPO"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_DOPO"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_RX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_SSDE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_TX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPIS_USE_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_BAUD_RATE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="visible"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <User dnOrder="0" value="2400000"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_BAUD_REG_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="9"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CHARSIZE_BITS_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CHARSIZE_BITS_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CLOCK_PHASE_LEADING_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CLOCK_PHASE_TRAILING_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CLOCK_POLARITY_HIGH_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_CLOCK_POLARITY_LOW_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_DIPO"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_DOPO"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="visible"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <User dnOrder="0" value="1"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_MSSEN"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_RECIEVER_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="SPI_STATUS_OVERRUN_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="TRANSMIT_DATA_REGISTER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="&amp;(SERCOM0_REGS-&gt;SPIM.SERCOM_DATA)"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_BAUD_VALUE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_CARD_DETECT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_CLOCK_OUTPUT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_DSNACK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_GTIME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_INACK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_MAXITER"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_RESET"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_7816_VCC_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_BAUD_RATE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_BAUD_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="63019"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_COMM_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_CTRLC_GTIME"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_DATA_5_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_DATA_6_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_DATA_7_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_DATA_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_DATA_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_DATA_BITS"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_FLOW_CONTROL"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_FORM"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_FRAMING_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_INTERRUPT_MODE_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_LIN_MASTER_BREAK_LEN"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_LIN_MASTER_HDRDLY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_LIN_MASTER_SUPPORTED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="true"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_OPERATING_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_OVERRUN_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_PARITY_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_PARITY_EVEN_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_PARITY_MODE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_PARITY_NONE_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_PARITY_ODD_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RING_BUFFER_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RING_BUFFER_MODE_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RS485"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RXPO"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RX_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_RX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_SAMPLE_COUNT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="16"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_SAMPLE_RATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="0"/> + </Values> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_SFDE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_STOP_1_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_STOP_2_BIT_MASK"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_STOP_BIT"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_TXPO"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_TX_ENABLE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_TX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom0> +</sercom0> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom0> + <sercom0 dnOrder="0" id="USART_USE_FRACTIONAL_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom0" value="false"/> + </Values> + </sercom0> +</sercom0> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CM_ADDR_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CM_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="232"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CM_BAUD_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CM_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CM_TRISE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_LOWTOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_LOWTOUT_SUPPORT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_SCLSM"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_SEXTTOEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_SEXTTOOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_SLAVE_ADDDRESS"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_SMEN"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2CS_TENBITEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_ADDR_TENBITEN"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_CLOCK_SPEED"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_CLOCK_SPEED_HZ"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_MASTER_CODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_MASTER_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_SCLSM"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="I2C_SLAVE_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="RECEIVE_DATA_REGISTER"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SERCOM_INSTANCE_NAME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SERCOM_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SERCOM_SPI_REG_NAME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SERCOM_SPI_SLAVE_REG_NAME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SERCOM_SYNCBUSY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SERCOM_USART_REG_NAME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIM_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_BUSY_PIN_LOGIC_LEVEL"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_DATA_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_DIPO"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_DOPO"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_RX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_SSDE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_TX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPIS_USE_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_BAUD_RATE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_BAUD_REG_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="23"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CHARSIZE_BITS_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CHARSIZE_BITS_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CLOCK_PHASE_LEADING_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CLOCK_PHASE_TRAILING_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CLOCK_POLARITY_HIGH_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_CLOCK_POLARITY_LOW_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_DIPO"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_DOPO"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_MSSEN"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_RECIEVER_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="SPI_STATUS_OVERRUN_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="TRANSMIT_DATA_REGISTER"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_BAUD_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="-1"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_CARD_DETECT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_CLOCK_OUTPUT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_DSNACK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_GTIME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_INACK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_MAXITER"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_RESET"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_7816_VCC_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_BAUD_RATE"> + <Values dnOrder="0"> + <User dnOrder="0" value="5180000"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_BAUD_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="8956"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_COMM_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_CTRLC_GTIME"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_DATA_5_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_DATA_6_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_DATA_7_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_DATA_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_DATA_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_DATA_BITS"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_FLOW_CONTROL"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_FORM"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_FRAMING_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_INTERRUPT_MODE_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_LIN_MASTER_BREAK_LEN"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_LIN_MASTER_HDRDLY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_LIN_MASTER_SUPPORTED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="true"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_OPERATING_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_OVERRUN_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_PARITY_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_PARITY_EVEN_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_PARITY_MODE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_PARITY_NONE_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_PARITY_ODD_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RING_BUFFER_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RING_BUFFER_MODE_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RS485"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RXPO"> + <Values dnOrder="0"> + <User dnOrder="0" value="1"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RX_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_RX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_SAMPLE_COUNT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="8"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_SAMPLE_RATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="2"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_SFDE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_STOP_1_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_STOP_2_BIT_MASK"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_STOP_BIT"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_TXPO"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_TX_ENABLE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_TX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom1> + <sercom1 dnOrder="0" id="USART_USE_FRACTIONAL_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom1" value="false"/> + </Values> + </sercom1> +</sercom1> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0"> + <Attachments dnOrder="0"> + <DirectCapability dnOrder="0" id="SERCOM2_I2C"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </DirectCapability> + <DirectCapability dnOrder="1" id="SERCOM2_SPI"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </DirectCapability> + <DirectCapability dnOrder="2" id="SERCOM2_UART"> + <Attributes dnOrder="0"> + <String dnOrder="0" id="targetComponentID"> + <Value dnOrder="0">stdio</Value> + </String> + <String dnOrder="1" id="targetAttachmentID"> + <Value dnOrder="0">UART</Value> + </String> + </Attributes> + </DirectCapability> + </Attachments> + </sercom2> +</sercom2> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CM_ADDR_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CM_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="232"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CM_BAUD_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CM_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CM_TRISE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_LOWTOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_LOWTOUT_SUPPORT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_SCLSM"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_SEXTTOEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_SEXTTOOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_SLAVE_ADDDRESS"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_SMEN"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2CS_TENBITEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_ADDR_TENBITEN"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_CLOCK_SPEED"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_CLOCK_SPEED_HZ"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_MASTER_CODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_MASTER_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_SCLSM"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="I2C_SLAVE_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="RECEIVE_DATA_REGISTER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="&amp;(SERCOM2_REGS-&gt;USART_INT.SERCOM_DATA)"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_I2CM_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_I2CM_MASTER_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_I2CM_SOURCE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_INSTANCE_NAME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_MODE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="readOnly"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <Dynamic dnOrder="0" id="sercom2" value="0"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_SPI_REG_NAME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_SPI_SLAVE_REG_NAME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_SYNCBUSY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_USART_COMMON_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_USART_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_USART_REG_NAME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SERCOM_USART_SOURCE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIM_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_BUSY_PIN_LOGIC_LEVEL"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_DATA_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_DIPO"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_DOPO"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_RX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_SSDE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_TX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPIS_USE_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_BAUD_RATE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_BAUD_REG_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="23"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CHARSIZE_BITS_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CHARSIZE_BITS_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CLOCK_PHASE_LEADING_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CLOCK_PHASE_TRAILING_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CLOCK_POLARITY_HIGH_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_CLOCK_POLARITY_LOW_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_DIPO"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_DOPO"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_MSSEN"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_RECIEVER_ENABLE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="SPI_STATUS_OVERRUN_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="TRANSMIT_DATA_REGISTER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="&amp;(SERCOM2_REGS-&gt;USART_INT.SERCOM_DATA)"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_BAUD_VALUE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_CARD_DETECT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_CLOCK_OUTPUT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_DSNACK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_GTIME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_INACK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_MAXITER"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_RESET"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_7816_VCC_ENABLE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_BAUD_RATE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_BAUD_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="63019"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_COMM_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_CTRLC_GTIME"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_DATA_5_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_DATA_6_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_DATA_7_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_DATA_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_DATA_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_DATA_BITS"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_FLOW_CONTROL"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_FORM"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_FRAMING_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_INTERRUPT_MODE_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="false"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_LIN_MASTER_BREAK_LEN"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_LIN_MASTER_HDRDLY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_LIN_MASTER_SUPPORTED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="true"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_OPERATING_MODE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="readOnly"> + <Value dnOrder="0">true</Value> + </Boolean> + <Boolean dnOrder="1" id="visible"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <Dynamic dnOrder="0" id="sercom2" value="0"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_OVERRUN_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_PARITY_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_PARITY_EVEN_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_PARITY_MODE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_PARITY_NONE_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_PARITY_ODD_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RING_BUFFER_ENABLE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RING_BUFFER_MODE_ENABLE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="false"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RS485"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RXPO"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="visible"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + <Values dnOrder="1"> + <User dnOrder="0" value="1"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RX_ENABLE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_RX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_SAMPLE_COUNT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="16"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_SAMPLE_RATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="0"/> + </Values> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_SFDE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_STOP_1_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_STOP_2_BIT_MASK"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_STOP_BIT"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_TXPO"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_TX_ENABLE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_TX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom2> +</sercom2> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom2> + <sercom2 dnOrder="0" id="USART_USE_FRACTIONAL_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom2" value="false"/> + </Values> + </sercom2> +</sercom2> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CM_ADDR_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CM_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="232"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CM_BAUD_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CM_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CM_TRISE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_LOWTOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_LOWTOUT_SUPPORT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_SCLSM"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_SEXTTOEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_SEXTTOOUT_ERROR_SUPPORT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_SLAVE_ADDDRESS"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_SMEN"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2CS_TENBITEN_SUPPORT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_ADDR_TENBITEN"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_CLOCK_SPEED"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_CLOCK_SPEED_HZ"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_MASTER_CODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_MASTER_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_SCLSM"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_SDAHOLD_TIME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="I2C_SLAVE_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="RECEIVE_DATA_REGISTER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value=""/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_I2CM_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_I2CM_MASTER_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_I2CM_SOURCE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">true</Value> + </Boolean> + </Attributes> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_INSTANCE_NAME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_MODE"> + <Values dnOrder="0"> + <User dnOrder="0" value="2"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_SPI_REG_NAME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_SPI_SLAVE_REG_NAME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_SYNCBUSY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_USART_COMMON_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_USART_HEADER"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_USART_REG_NAME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SERCOM_USART_SOURCE"> + <Attributes dnOrder="0"> + <Boolean dnOrder="0" id="enabled"> + <Value dnOrder="0">false</Value> + </Boolean> + </Attributes> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIM_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_BUSY_PIN_LOGIC_LEVEL"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_DATA_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_DIPO"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_DOPO"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_RX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_SSDE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_TX_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPIS_USE_BUSY_PIN"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_BAUD_RATE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_BAUD_REG_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="23"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CHARSIZE_BITS_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CHARSIZE_BITS_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CLOCK_PHASE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CLOCK_PHASE_LEADING_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CLOCK_PHASE_TRAILING_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CLOCK_POLARITY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CLOCK_POLARITY_HIGH_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_CLOCK_POLARITY_LOW_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_DATA_ORDER"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_DIPO"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_DOPO"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_MSSEN"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_RECIEVER_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="SPI_STATUS_OVERRUN_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="TRANSMIT_DATA_REGISTER"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value=""/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_BAUD_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="-1"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_CARD_DETECT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_CLOCK_OUTPUT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_DSNACK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_GTIME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_INACK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_MAXITER"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_RESET"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_7816_VCC_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_BAUD_RATE"> + <Values dnOrder="0"> + <User dnOrder="0" value="5180000"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_BAUD_VALUE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="8956"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_CHARSIZE_BITS"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_COMM_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_CTRLC_GTIME"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_DATA_5_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_DATA_6_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_DATA_7_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_DATA_8_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_DATA_9_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_DATA_BITS"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_FLOW_CONTROL"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_FORM"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_FRAMING_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_INTENSET_ERROR"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_INTERRUPT_MODE_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_LIN_MASTER_BREAK_LEN"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_LIN_MASTER_HDRDLY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_LIN_MASTER_SUPPORTED"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="true"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_OPERATING_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_OVERRUN_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_PARITY_ERROR_VALUE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_PARITY_EVEN_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_PARITY_MODE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_PARITY_NONE_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_PARITY_ODD_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_PLIB_API_PREFIX"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RING_BUFFER_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RING_BUFFER_MODE_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RS485"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RUNSTDBY"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RXPO"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RX_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_RX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_SAMPLE_COUNT"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="8"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_SAMPLE_RATE"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="2"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_SFDE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_STOP_1_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_STOP_2_BIT_MASK"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_STOP_BIT"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_TXPO"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_TX_ENABLE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_TX_RING_BUFFER_SIZE"> + <Values dnOrder="0"/> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><sercom3> + <sercom3 dnOrder="0" id="USART_USE_FRACTIONAL_BAUD"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="sercom3" value="false"/> + </Values> + </sercom3> +</sercom3> + + + + + <?xml version="1.0" encoding="UTF-8"?><stdio> + <stdio dnOrder="0"> + <Attachments dnOrder="0"> + <DirectDependency dnOrder="0" id="UART"> + <Attributes dnOrder="0"> + <String dnOrder="0" id="targetComponentID"> + <Value dnOrder="0">sercom2</Value> + </String> + <String dnOrder="1" id="targetAttachmentID"> + <Value dnOrder="0">SERCOM2_UART</Value> + </String> + </Attributes> + </DirectDependency> + </Attachments> + </stdio> +</stdio> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><stdio> + <stdio dnOrder="0" id="DEBUG_PERIPHERAL"> + <Values dnOrder="0"> + <Dynamic dnOrder="0" id="stdio" value="sercom2"/> + </Values> + </stdio> +</stdio> + + + + + <?xml version="1.0" encoding="UTF-8"?><stdio> + <stdio dnOrder="0" id="STDIN_BUFF_MODE"> + <Values dnOrder="0"/> + </stdio> +</stdio> + + + + + <?xml version="1.0" encoding="UTF-8"?><stdio> + <stdio dnOrder="0" id="STDOUT_BUFF_MODE"> + <Values dnOrder="0"/> + </stdio> +</stdio> + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="CALLBACK_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="COMPARE_SET_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="COUNTER_GET_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="DVRT_COMPONENT_ID"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="DVRT_PLIB_OPERATION_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="FREQUENCY_GET_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="IRQ_ENUM_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="PERIOD_SET_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="SYS_TIME_COMPONENT_ID"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="SYS_TIME_PLIB_OPERATION_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_CTRLA_CAPTEN0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_CTRLA_CAPTEN1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_CTRLA_COPEN0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_CTRLA_COPEN1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_ERR_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_EVCTRL_MCEO0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_EVCTRL_MCEO1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_INTSET_MC0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_INTSET_MC1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_OVF_INTERRUPT_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_TRIGGER_ACTION0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_TRIGGER_EDGE0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CAPTURE_TRIGGER_EDGE1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_CC0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_CC1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_CTRLBSET_DIR"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_CTRLBSET_LUPD"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_CTRLBSET_ONESHOT"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_DRVCTRL_INVEN0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_DRVCTRL_INVEN1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_EVCTRL_EV"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_EVCTRL_EVACT"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_EVCTRL_MCEO0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_EVCTRL_MCEO1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_EVCTRL_OVFEO"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_EVCTRL_TCINV"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_INTENSET_MC0"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_INTENSET_MC1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_INTENSET_OVF"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_PERIOD"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_COMPARE_WAVE_WAVEGEN"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CTRLA_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CTRLA_ONDEMAND"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CTRLA_PRESCALER"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CTRLA_PRESCYNC"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_CTRLA_RUNSTDBY"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_FREQUENCY"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_INSTANCE_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_NUM_CHANNELS"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_OPERATION_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_SLAVE_MODE"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_CTRLBSET_ONESHOT"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_EVCTRL_EV"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_EVCTRL_EVACT"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_EVCTRL_OVFEO"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_EVCTRL_TCINV"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_INTENSET_MC1"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_INTENSET_OVF"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_PERIOD"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_TIME_MS"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TC_TIMER_UNIT"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TIMER_PERIOD_MAX"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TIMER_START_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TIMER_STOP_API_NAME"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + <?xml version="1.0" encoding="UTF-8"?><tc3> + <tc3 dnOrder="0" id="TIMER_WIDTH"> + <Values dnOrder="0"/> + </tc3> +</tc3> + + + + + + ..\src\config\default\ATSAMC21J18A.ld + 3fc7dbb63ae72ecd9b52572e4dd84ed79cbd37feb6064cb6d4df6fca301d09af + + + ..\src\config\default\definitions.h + 08b62119aed11e5c1995146cd9894295b0bfc932970fe21a4f75517af5959655 + + + ..\src\config\default\device.h + e539bb402fa4783d95ccf06235458b2e1fe01207c83c0e046a853e0385d0b6f4 + + + ..\src\config\default\device_cache.h + e2914501b361bbc93a56d6915b1bf4fac00277e61f31fdee87a587bc15dea5b6 + + + ..\src\config\default\device_vectors.h + 0ffcf2109c1550773094e211109c77b5ce60b5d264766d8e479d6ed2104425b8 + + + ..\src\config\default\exceptions.c + 42f9da2668e04ccb3473d45b149683a00f80072c6883c7918d6ce93997cd6987 + + + ..\src\config\default\initialization.c + a5c520efe05523f2e28668bfde094f8d3864511604237d7c108adba672243b0c + + + ..\src\config\default\interrupts.c + 374460ac8d966bb6f6066135dbc63d80e3409f10997dd851c0b2becb7c425e89 + + + ..\src\config\default\interrupts.h + 2abb02e33123af8ac02c79015c4c33e4cf2e37e377f10484898ab0b65185b162 + + + ..\src\config\default\libc_syscalls.c + 88bb2e34c939601b5b7ad076556e3ee0fcedf388436b8cddb6d6fd3e9d07472f + + + ..\src\config\default\peripheral\can\plib_can0.c + 7f0eea33ffe3942f00d645cc9590cbeb93e3aacf764aa27d47528f8200877f0f + + + ..\src\config\default\peripheral\can\plib_can0.h + 82effa7ee26a29add640e0239848f8265bf69247e1c29d24fa8b05ed853de21e + + + ..\src\config\default\peripheral\can\plib_can_common.h + e0e3b54f69be9d8811bbe507f91daa443ae7bff5dc724ac51baebc160097b2d6 + + + ..\src\config\default\peripheral\clock\plib_clock.c + eacb57f35a495c5fee15558fef56910ba076122a3fbdc6e0b06b5fafbfe77024 + + + ..\src\config\default\peripheral\clock\plib_clock.h + 01c269741541514e997ef61546f4dbb0e23f66e27c6a957162557f13b4638baf + + + ..\src\config\default\peripheral\eic\plib_eic.c + 8074ed9d3d1f9c9ea0463942d8165ce09377457c6e41e82533b4a378381c3dd5 + + + ..\src\config\default\peripheral\eic\plib_eic.h + d1643d3a9799315b60d11c8bebbffd89ca83d2e7c9fe47c9fe2f06d05c1034a1 + + + ..\src\config\default\peripheral\evsys\plib_evsys.c + 7bb3bc0d60c4cf18638d76d3dfe9e5b13d2915d09e6a8a7bc4b5faae870c8f48 + + + ..\src\config\default\peripheral\evsys\plib_evsys.h + f7d08eb8162f271ce1db384c082586a6624e506aa7f502c64c4ab5a1aadac47d + + + ..\src\config\default\peripheral\nvic\plib_nvic.c + 8c63b22fb38a1ccb32f55e038b395f2243c065a894e46f818401b76f9d9d5801 + + + ..\src\config\default\peripheral\nvic\plib_nvic.h + 9936ac782115af41003255283fa2f603f4ff2212d16275b7c80ea8d067a9e208 + + + ..\src\config\default\peripheral\nvmctrl\plib_nvmctrl.c + 1fb8d05a455e4b5ec9a5e2fdfe11470cbde614fa7df8a005b0f0110a95f071bc + + + ..\src\config\default\peripheral\nvmctrl\plib_nvmctrl.h + a2f572d8ba174971959f4a9319fc61b460c00432512d38e19e28e2dfddf6cde5 + + + ..\src\config\default\peripheral\port\plib_port.c + 339b6345aecf4e0c5487f0640398e8d04807e2ce97c315a3ba9efa107d16e413 + + + ..\src\config\default\peripheral\port\plib_port.h + 37b3577514fd3e294b932259b5f72b0ddd0a8c2c578c780a8c2528cff27701a7 + + + ..\src\config\default\peripheral\sercom\i2c_master\plib_sercom3_i2c_master.c + 4662954bd67ba8d3a7fb3b23bc73b987e7e8acb5b4957e37148058b6adcb2fde + + + ..\src\config\default\peripheral\sercom\i2c_master\plib_sercom3_i2c_master.h + fbfc71be917562e4ba7232fbb2e2ec9ac086d69c2d33f3127d12cc909479d4fc + + + ..\src\config\default\peripheral\sercom\i2c_master\plib_sercom_i2c_master_common.h + f167b04b3c6a0f83fe41b7b6f810cbf0a48b8ca7d5a747b76463dd53d3c1a2a2 + + + ..\src\config\default\peripheral\sercom\spi_master\plib_sercom0_spi_master.c + dbd555fdec52e709c0945f28076780e7aff5063bd3519ac47364293a3cbc7a59 + + + ..\src\config\default\peripheral\sercom\spi_master\plib_sercom0_spi_master.h + 8e1550559a741d9ace2e6fb145ac015c8457aa417c877996855b73238051babb + + + ..\src\config\default\peripheral\sercom\spi_master\plib_sercom_spi_master_common.h + 06e3c7813e1608b5008e3c8955569f9cff04bef321a34c35421f7979368a4ada + + + ..\src\config\default\peripheral\sercom\usart\plib_sercom1_usart.c + 3b45cc8fc8540ebcc8375ebe09611fce2b89b56ddbf4ac9025034bf44f491d1e + + + ..\src\config\default\peripheral\sercom\usart\plib_sercom1_usart.h + 721b767702c85a60634480b2759b12de7c24e3a3d3cbba8e540ed6ca0c083828 + + + ..\src\config\default\peripheral\sercom\usart\plib_sercom2_usart.c + 3735cac21a1b0ebd824ea4138fc47608edbd726b5f54405c1e24d41e6eb157e0 + + + ..\src\config\default\peripheral\sercom\usart\plib_sercom2_usart.h + a0d35d03c527d1fb9c99d575f99b91a9d1d49d345b20cacee95c2aec45c0d7cb + + + ..\src\config\default\peripheral\sercom\usart\plib_sercom_usart_common.h + 3653b66472c558c50f7037a1dd25d2678e9a13aa718f3c53a2195e6f3919ea48 + + + ..\src\config\default\peripheral\tc\plib_tc3.c + 2c8a833a0cc3b721e21c297d5b429b4dab2c0d3ec815785cc023405440614606 + + + ..\src\config\default\peripheral\tc\plib_tc3.h + 36173921130720b871c8cbb1fccfc4c23e1f05752441386c7b9e34ddf43bfbbf + + + ..\src\config\default\peripheral\tc\plib_tc_common.h + 487b4f489229b8e16b24ab48ddc1f414b095585439f0e10d53b2285fc3979f63 + + + ..\src\config\default\pin_configurations.csv + d073c2500dcc4772e5734defb083abd297bd87d1cffe179fb51c2f1ae8416b07 + + + ..\src\config\default\startup_xc32.c + e6227d89e36b74af1bc21e00e80b390502c97aaaa65796291f63b2d96cf0678e + + + ..\src\config\default\stdio\xc32_monitor.c + 1395dbc052b1c3c61d798c93f81efa8bc498027c4f6de749df5e4c06dbee4d31 + + + ..\src\config\default\toolchain_specifics.h + a4f1774c6f1f8c6cd522567536c9e9d75ca63259b868015ac9b0fb0aeeffe1f4 + + + ..\src\main.c + d3c233d419e6304bfacbafc18cc68c0f5c26e365f23b20ea40ccfac458f664c5 + + + ..\src\packs\ATSAMC21J18A_DFP\component\ac.h + 18e965ceee994e73f9c30612a73b9ef37049d092638a21c7bcd1e6fc69350cc1 + + + ..\src\packs\ATSAMC21J18A_DFP\component\adc.h + da8c9fa2b7b683ac6f72c84ab14b91e952f89655b503edc22c0a3e046567ac0c + + + ..\src\packs\ATSAMC21J18A_DFP\component\can.h + c98eb7bcbcb5158e4b581552609cb44b6a4bca28b1c322c387925e8d25d94c00 + + + ..\src\packs\ATSAMC21J18A_DFP\component\ccl.h + 3a86fd07e87114509b7d3a79035076371e32deddee93a460a9eeaa0f1c5d9f85 + + + ..\src\packs\ATSAMC21J18A_DFP\component\dac.h + dc0977de3b63a7f7656d1109f6acf5c07c993a5f35407cb91322e35dc983675f + + + ..\src\packs\ATSAMC21J18A_DFP\component\divas.h + 51af87912aab3a155701b249766aedbf09a6913b3a0a962a72604a22fc97cec0 + + + ..\src\packs\ATSAMC21J18A_DFP\component\dmac.h + e11903d19310facd45f67fab22f2d1d8f1f412be94b8973a98badfcfe3470c69 + + + ..\src\packs\ATSAMC21J18A_DFP\component\dsu.h + 8cf5dde6a110986dc9622cc3badd8b5dddefe3c8edee7d587308043a518af07d + + + ..\src\packs\ATSAMC21J18A_DFP\component\eic.h + 10d9c2dcf2d257b13f1e03d1f6fc3a1de4773d59fa51ce442d0dc87bf692a70b + + + ..\src\packs\ATSAMC21J18A_DFP\component\evsys.h + 31524ca0584c9bc0666c320e37cdfe2d195ad55d2f4026738360e77beb2c22f0 + + + ..\src\packs\ATSAMC21J18A_DFP\component\freqm.h + 38c404513f1615e10fb0d5bb7cfb60a68aca145bc83e892685abf14bcd7f4704 + + + ..\src\packs\ATSAMC21J18A_DFP\component\fuses.h + 7d2605026995dabe18daace7f46e8721184fd78b612ec867099d1b02d94a4485 + + + ..\src\packs\ATSAMC21J18A_DFP\component\gclk.h + 5f4ab08d002ca6b5e214a945ddd8fe81cfb9491d5911df33f04ca0069fd474f7 + + + ..\src\packs\ATSAMC21J18A_DFP\component\hmatrixb.h + ab8986d64e0f6e7507e943805a6efc9ff3882e7a137a919b30dbb5e2be448f88 + + + ..\src\packs\ATSAMC21J18A_DFP\component\mclk.h + df1d30fcf7aa067e61c6c6c7763e752e57e8b8926a9106882600ea15aad988ea + + + ..\src\packs\ATSAMC21J18A_DFP\component\mtb.h + 6836d7b1a525ac65a6f1541133e755a21724516f55580b77c2ec4adfaa5f1a34 + + + ..\src\packs\ATSAMC21J18A_DFP\component\nvmctrl.h + bf92be4473d6ed8377e485d7c6d8bc458334ec9a58e0fe7a213a40227b7fed80 + + + ..\src\packs\ATSAMC21J18A_DFP\component\osc32kctrl.h + 54698c9c67fb890f8ea2f03dc0b0aa245c1e4fee14fe8002f7c6af9964c31ef3 + + + ..\src\packs\ATSAMC21J18A_DFP\component\oscctrl.h + 99132d41fada0546495b7ceee25fae8259f4d0db4986a354a300ff86703d8b84 + + + ..\src\packs\ATSAMC21J18A_DFP\component\pac.h + 75028e2e4a1670401b71397a1a6012011dd9d2bbc2721116e6294f8e76d1ed15 + + + ..\src\packs\ATSAMC21J18A_DFP\component\pm.h + 9dde14b19423791c50e5c317b67b5c49e0befa12d947eea2c8c45e3398c398bd + + + ..\src\packs\ATSAMC21J18A_DFP\component\port.h + 01737ce08be6b8a7f4f2c12bb535952ac0f824289159c03e337279d57cbd6d48 + + + ..\src\packs\ATSAMC21J18A_DFP\component\ptc.h + 395a8341491f808fdae9d42817c3b4199386e8879722e0029ed792e089d3e727 + + + ..\src\packs\ATSAMC21J18A_DFP\component\rstc.h + a66c3da8443c9b304664e11d6c69fe881459f22dbea770e38271e87e31fead7a + + + ..\src\packs\ATSAMC21J18A_DFP\component\rtc.h + 1b8f8def088a7507e62c82281d4a6b3890f2cb32c6aae1b15ba2070ee384e70d + + + ..\src\packs\ATSAMC21J18A_DFP\component\sdadc.h + ca3a9fab07d72b420b54486f0399f32bd954f3bcbe957b298a01fd73085de877 + + + ..\src\packs\ATSAMC21J18A_DFP\component\sercom.h + cde3c9cce2d5b9937ad1a3c43d155694654785c55ff7c1f365cbc77666b69d0e + + + ..\src\packs\ATSAMC21J18A_DFP\component\supc.h + d4cc7a715fbc23834cf9749c4d12295df6a5c9fcc2212be9b5cd224db657d2cb + + + ..\src\packs\ATSAMC21J18A_DFP\component\tc.h + b2007af7212367dea3006c0fbb83da05e47201af81711ebb1284aa96b980e6c0 + + + ..\src\packs\ATSAMC21J18A_DFP\component\tcc.h + 5b473343ac6fa6cef135fdef2298cb05733e64588be1b46680e201e29a8beca0 + + + ..\src\packs\ATSAMC21J18A_DFP\component\tsens.h + dfca5719ba8e1e3d1e1c6b662602f7b8f5d65d43e04671d0241dc5dc4c8761e0 + + + ..\src\packs\ATSAMC21J18A_DFP\component\wdt.h + fa4d3defc5736ec0c753d5a49713f717e5254f4da5cf6118e8b739522f7ac5e7 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\ac.h + 62793feaaa1067011e3023f96630cb76e94378c88e9306df3163cb3304410f22 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\adc0.h + 3c173f1d5185d3c9476a96fa024e13292fef92ef0241504e017d99f18a46061e + + + ..\src\packs\ATSAMC21J18A_DFP\instance\adc1.h + d9ffea72619d13d48be17b27bd0e99257799d716263a94de19853f56fb5b8aa6 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\can0.h + b0d5b3cdf228f37930be21a37f588ae575f22bbd96726c88d544017587bae5e9 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\can1.h + 197d3f6fefd4a42bdc4fff4e4fe4276a3f54e96b2f388779c049f4cf48933ae1 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\ccl.h + 6ac447f4ee6ce0334f7577abe5c3a55c5b4ce6eb903c934ad9344260240df635 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\dac.h + 73d6d793dba5a68165453e9d16bff9286f7f14fc56deb1f339a28874f2d3a273 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\divas.h + 09a5d9ff42f1aaafef2e3ed611878a4bbe446138e875fd174c926e054ad8ced8 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\dmac.h + d0f0c9e6b06f974dc2fc3e6c327ad825e6baf4c8104eb4bd00c6482ebffc88d4 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\dsu.h + ea2ba1caa093d27825e012f4949aa8d89bf489aff4bf04d893e425b5cb5092ae + + + ..\src\packs\ATSAMC21J18A_DFP\instance\eic.h + 27a31e65a37a33848d7edce235cfdf4bbd1e985694cc099487a7684d8fbca2d4 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\evsys.h + 3b9594a298307c6fabd944bf6acd890692fe1eb8d7266d71de17e7387c19c74f + + + ..\src\packs\ATSAMC21J18A_DFP\instance\freqm.h + 961aa1416eec5d2f3a93cd64792ec7055f8b00542821649c475b972b640364d7 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\fuses.h + ba80c7f480244dee44906821d457a1c4e21522071095da87a4f1877ece6bcf6d + + + ..\src\packs\ATSAMC21J18A_DFP\instance\gclk.h + a1a9f3656d879a750280245cecb1cb3c084ade2685cecbb19677a260d66fece5 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\hmatrixhs.h + 70305a77185753d34672bc82d403b9463351b422880e1472254555456612e1c5 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\mclk.h + c8364d869bac94fbe99e29bc50a40962d8ea30f106c0ca71c0a207bec409f738 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\mtb.h + e8abf874930994235fafc0c19e3f3af454ec626a8890f0c98577fe0016075497 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\nvmctrl.h + b5d30ac44fce76d81ac1b96e1254388af4f2b62b503b69f1a0f64cf65e74977c + + + ..\src\packs\ATSAMC21J18A_DFP\instance\osc32kctrl.h + 7927c74509e1d2b606593de0e3fa810a3baec7f77dc55f848feeb4fd40d2ce71 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\oscctrl.h + 92cdf00281fd42b618d9343d212fdf729731a738a39c9cc019fcdf3aef884964 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\pac.h + 2defd48c2c35bafad2f6d7912b5d6192813d2b0fd9b902c6b3770a3beb6a49c6 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\pm.h + e509da951ad2b2a360967a27a6e130065ad0e7325987f846859fcf1c329018f5 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\port.h + 759fe53a842c0bc873798da32e99a92ab0139dcfb3fa6e522b82123db96f4c67 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\ptc.h + 1c2fad0cc9faa280bcd539d8fdafbb3ac41d72596d96ecbb59c030568aad5dfd + + + ..\src\packs\ATSAMC21J18A_DFP\instance\rstc.h + 2741d2c342b77550eb9f3f058b723552f2f8db0c13b11c4f127ec5bfbec19c6f + + + ..\src\packs\ATSAMC21J18A_DFP\instance\rtc.h + 0e0c21a6c3045665a163e7b5bebeb960a372ae925b2db1321de1ae276beb23dd + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sdadc.h + 18a03bc6bf1a127c9e785f1520554e99daaaaa15d3078b8181e477316681ede8 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sercom0.h + e7414434ab9e46e8aa6668d587af76544df30db74f12eee2b124b6b93299989d + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sercom1.h + d5cc94e270e48e59925acb90b5bbe8bbc6fa62d4ddf8b2c214b8bfb6c8a03920 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sercom2.h + 31472109d5d3b3c2d2a20ed8a2bb2d009b0eb3ca65cd45c3ba6d5745d47d4b60 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sercom3.h + 2c77d8f3131ca34a22de0d26c5c13fbe716607a61b10636bfbad56b0558a3c11 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sercom4.h + 9ab2b43df3c30cffab9491c9f3900951456a83adc2f61603599799fc503208e1 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\sercom5.h + 6e7988bf9dfc9e02361b183d2c02b97feb2d16631c254bd4f6f8f5d55e57c4c5 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\supc.h + 067c041bb4218d55e12dffcc255951d5389f8971bb61ccab9d387f8d7810d94e + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tc0.h + f82a3a62fdb5c1b56dcd752d1dbf66e2b4cc562696cd8bb22e82188f84e9d4af + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tc1.h + d38eb0a461fe865155bc4b13d7b8fb21bac08f969aaaa39dec3bcf070c9d848a + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tc2.h + ca0944228b2b637f22c90a7c9a5060b68b309f81c0eb4e6db3fbe00661169f4d + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tc3.h + 24027477db3c0f7cc7806688fa3c18a7567c80cbb7ffe024cf1e8076997e689e + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tc4.h + 3cc30104024853d10ee578e046d1cd5868f192beb545060c62eecae37d785dd3 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tcc0.h + a6be43a643719c88c01e762270bf24cdf399febd11c6e2e62d3b1f825e373b72 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tcc1.h + a3d5b071198abb54ebdd2808b3c22b69a9c1f49975e9e73c6742788eddab7b8f + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tcc2.h + d22e7f06b755c5d71fe924fcf9a18da26869884c7563dbb24ce85500a78b3dfb + + + ..\src\packs\ATSAMC21J18A_DFP\instance\tsens.h + e6b16c504a31e922cd9cb8674886e9d797cfd8359ea0f387c310f79b7d737778 + + + ..\src\packs\ATSAMC21J18A_DFP\instance\wdt.h + 6a3d811efd0f749d1864ad9cf1777c35ba575b0d13ebfbad9a268a04a47e1e90 + + + ..\src\packs\ATSAMC21J18A_DFP\pio\samc21j18a.h + d4920a5074f62dff1f8213991c83b2689c6ad59364d094e0997990dfb4fd4789 + + + ..\src\packs\ATSAMC21J18A_DFP\samc21j18a.h + 35c3b0e29e6a92608192900edd4bc31d7b605c58d752fae0952040e9e805e746 + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cachel1_armv7.h + 6cdb5b324f2fd1bb5b2f47298ba6e6777e735d7cad3bb8d942cd36e2c6e65328 + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_armcc.h + d074534d7106cec83474b3b0a897bd2553e1a8895ecbd54f4f4fb25928066eee + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_armclang.h + 11b39b96ddc1125124762b3423a77b90dd40ea5b4582a3513830245046b24311 + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_armclang_ltm.h + 8621969ea669a1b230ff2125a760ef66d575c48cb45e9e457f768909abcbda46 + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_compiler.h + 869640702d811c4c63abb52206715c891a93fd03be954df5ad40d378355af3d6 + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_gcc.h + 3d4e265d0aa42f888385ccf073666e6ebb5ec9f834760b9da27c474e177f708d + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_iccarm.h + f28119adbc81fb0e3c957c9aebe8fb423ad93634e76ead3caa2b0818d2e123ae + + + ..\src\packs\CMSIS\CMSIS\Core\Include\cmsis_version.h + 8cda7ac3ff6f0eb5e83c4fe613dd195151b24da54167f5c3c007e599a03f1edc + + + ..\src\packs\CMSIS\CMSIS\Core\Include\core_cm0plus.h + a19e24c136145b4c72630d0ab7c83a7aef010f3ba165e34c56a05057a2d9fed5 + + + ..\src\packs\CMSIS\CMSIS\Core\Include\mpu_armv7.h + de1b5eb9ed566527b66dc06f4ecb6a43ab6800f7dac47e87c9cb42984dca41bb + + + \ No newline at end of file diff --git a/Telemetry/Telemetry_V1.X/Makefile b/Telemetry/Telemetry_V1.X/Makefile new file mode 100644 index 00000000..fca8e2cc --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Makefile @@ -0,0 +1,113 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... +# WARNING: the IDE does not call this target since it takes a long time to +# simply run make. Instead, the IDE removes the configuration directories +# under build and dist directly without calling make. +# This target is left here so people can do a clean when running a clean +# outside the IDE. + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1.mc3 b/Telemetry/Telemetry_V1.X/Telemetry_V1.mc3 new file mode 100644 index 00000000..26cee1fa --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1.mc3 @@ -0,0 +1,72 @@ + + + + + cmsis + class com.microchip.mcc.harmony.HarmonyModule + + + core + class com.microchip.mcc.harmony.HarmonyModule + + + dfp + class com.microchip.mcc.harmony.HarmonyModule + + + evsys + class com.microchip.mcc.harmony.HarmonyModule + + + nvmctrl + class com.microchip.mcc.harmony.HarmonyModule + + + + + + + + + __ROOTVIEW + + + + <?xml version="1.0" encoding="UTF-8"?><UserData> + <UserData dnOrder="0"> + <GraphSettings canvasHeight="132" canvasWidth="426" dnOrder="0"/> + <PowerProfiles dnOrder="1"> + <Profile dnOrder="0" id="profile0" name="Main"/> + </PowerProfiles> + <ComponentGraph dnOrder="2" id="__ROOTVIEW"> + <ElementPositions dnOrder="0"> + <ElementPosition dnOrder="0" id="cmsis" x="390" y="60"/> + <ElementPosition dnOrder="1" id="core" x="340" y="20"/> + <ElementPosition dnOrder="2" id="dfp" x="170" y="80"/> + <ElementPosition dnOrder="3" id="evsys" x="187" y="18"/> + <ElementPosition dnOrder="4" id="nvmctrl" x="20" y="20"/> + </ElementPositions> + </ComponentGraph> + </UserData> +</UserData> + + + + + __ROOTVIEW + + + + __ROOTVIEW + + + + __ROOTVIEW + + + + __ROOTVIEW + + + + \ No newline at end of file diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/can0.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/can0.yml new file mode 100644 index 00000000..c5b233d9 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/can0.yml @@ -0,0 +1,311 @@ +configVersion: 1.0.0 +componentName: can0 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: can0 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: can0 + x: '475' + y: '116' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + AUTO_DATA_BIT_TIMING_CALCULATION: + attributes: + id: AUTO_DATA_BIT_TIMING_CALCULATION + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + AUTO_NOMINAL_BIT_TIMING_CALCULATION: + attributes: + id: AUTO_NOMINAL_BIT_TIMING_CALCULATION + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + CALCULATED_DATA_BITRATE: + attributes: + id: CALCULATED_DATA_BITRATE + children: + - children: + - attributes: + id: can0 + value: '2000' + type: Dynamic + type: Values + type: Integer + CALCULATED_DATA_ERRORRATE: + attributes: + id: CALCULATED_DATA_ERRORRATE + children: + - children: + - attributes: + id: can0 + value: '0.000' + type: Dynamic + type: Values + type: String + CALCULATED_NOMINAL_BITRATE: + attributes: + id: CALCULATED_NOMINAL_BITRATE + children: + - children: + - attributes: + id: can0 + value: '500' + type: Dynamic + type: Values + type: Integer + CALCULATED_NOMINAL_ERRORRATE: + attributes: + id: CALCULATED_NOMINAL_ERRORRATE + children: + - children: + - attributes: + id: can0 + value: '0.000' + type: Dynamic + type: Values + type: String + CAN_OPMODE: + attributes: + id: CAN_OPMODE + children: + - children: + - attributes: + value: CAN FD + type: User + type: Values + type: Combo + DATA_BITRATE: + attributes: + id: DATA_BITRATE + children: + - children: + - attributes: + value: '2000' + type: User + type: Values + type: Integer + DATA_SAMPLE_POINT: + attributes: + id: DATA_SAMPLE_POINT + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '87.5' + type: Dynamic + type: Values + type: Float + DATA_TIME_QUANTA_PERIOD: + attributes: + id: DATA_TIME_QUANTA_PERIOD + children: + - children: + - attributes: + id: can0 + value: '62.500' + type: Dynamic + type: Values + type: String + DBTP_DBRP: + attributes: + id: DBTP_DBRP + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '2' + type: Dynamic + type: Values + type: Integer + DBTP_DSJW: + attributes: + id: DBTP_DSJW + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + DBTP_DTSEG1: + attributes: + id: DBTP_DTSEG1 + children: + - children: + - attributes: + id: can0 + value: '6' + type: Dynamic + type: Values + type: Integer + DBTP_DTSEG2: + attributes: + id: DBTP_DTSEG2 + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + DBTP_TOTAL_TIME_QUANTA: + attributes: + id: DBTP_TOTAL_TIME_QUANTA + children: + - children: + - attributes: + id: can0 + value: '8' + type: Dynamic + type: Values + type: Integer + INTERRUPT_MODE: + attributes: + id: INTERRUPT_MODE + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + NBTP_NBRP: + attributes: + id: NBTP_NBRP + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '2' + type: Dynamic + type: Values + type: Integer + NBTP_NSJW: + attributes: + id: NBTP_NSJW + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + NBTP_NTSEG1: + attributes: + id: NBTP_NTSEG1 + children: + - children: + - attributes: + id: can0 + value: '30' + type: Dynamic + type: Values + type: Integer + NBTP_NTSEG2: + attributes: + id: NBTP_NTSEG2 + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + NBTP_TOTAL_TIME_QUANTA: + attributes: + id: NBTP_TOTAL_TIME_QUANTA + children: + - children: + - attributes: + id: can0 + value: '32' + type: Dynamic + type: Values + type: Integer + NOMINAL_SAMPLE_POINT: + attributes: + id: NOMINAL_SAMPLE_POINT + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '96.875' + type: Dynamic + type: Values + type: Float + NOMINAL_TIME_QUANTA_PERIOD: + attributes: + id: NOMINAL_TIME_QUANTA_PERIOD + children: + - children: + - attributes: + id: can0 + value: '62.500' + type: Dynamic + type: Values + type: String + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/cmsis.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/cmsis.yml new file mode 100644 index 00000000..cc2de097 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/cmsis.yml @@ -0,0 +1,35 @@ +configVersion: 1.0.0 +componentName: cmsis +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: cmsis + type: module + version: '' +- dependencyPackage: '' + name: CMSIS_5 + type: package + version: 5.9.0 +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: cmsis + x: '330' + y: '60' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: {} + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/core.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/core.yml new file mode 100644 index 00000000..6b26edc9 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/core.yml @@ -0,0 +1,2798 @@ +configVersion: 1.0.0 +componentName: core +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: core + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: core + x: '340' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + CAN0_CLOCK_ENABLE: + attributes: + id: CAN0_CLOCK_ENABLE + children: + - children: + - attributes: + id: can0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + CAN0_CLOCK_FREQUENCY: + attributes: + id: CAN0_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + CAN0_INTERRUPT_ENABLE: + attributes: + id: CAN0_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: can0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + CAN0_INTERRUPT_ENABLE_UPDATE: + attributes: + id: CAN0_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + CAN0_INTERRUPT_HANDLER: + attributes: + id: CAN0_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: can0 + value: CAN0_InterruptHandler + type: Dynamic + type: Values + type: String + CAN0_INTERRUPT_HANDLER_LOCK: + attributes: + id: CAN0_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: can0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + CoreMainFileName: + attributes: + id: CoreMainFileName + children: + - children: + - attributes: + value: main + type: User + type: Values + type: String + EIC_CLOCK_ENABLE: + attributes: + id: EIC_CLOCK_ENABLE + children: + - children: + - attributes: + id: eic + value: 'true' + type: Dynamic + type: Values + type: Boolean + EIC_CLOCK_FREQUENCY: + attributes: + id: EIC_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + EIC_INTERRUPT_ENABLE: + attributes: + id: EIC_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: eic + value: 'true' + type: Dynamic + type: Values + type: Boolean + EIC_INTERRUPT_ENABLE_UPDATE: + attributes: + id: EIC_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + EIC_INTERRUPT_HANDLER: + attributes: + id: EIC_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: eic + value: EIC_InterruptHandler + type: Dynamic + type: Values + type: String + EIC_INTERRUPT_HANDLER_LOCK: + attributes: + id: EIC_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: eic + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_19_CHEN: + attributes: + id: GCLK_ID_19_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_19_FREQ: + attributes: + id: GCLK_ID_19_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_20_CHEN: + attributes: + id: GCLK_ID_20_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_20_FREQ: + attributes: + id: GCLK_ID_20_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_21_CHEN: + attributes: + id: GCLK_ID_21_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_21_FREQ: + attributes: + id: GCLK_ID_21_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_22_CHEN: + attributes: + id: GCLK_ID_22_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_22_FREQ: + attributes: + id: GCLK_ID_22_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_23_CHEN: + attributes: + id: GCLK_ID_23_CHEN + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_23_FREQ: + attributes: + id: GCLK_ID_23_FREQ + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + GCLK_ID_25_CHEN: + attributes: + id: GCLK_ID_25_CHEN + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_25_FREQ: + attributes: + id: GCLK_ID_25_FREQ + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + GCLK_ID_26_CHEN: + attributes: + id: GCLK_ID_26_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_26_FREQ: + attributes: + id: GCLK_ID_26_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_2_CHEN: + attributes: + id: GCLK_ID_2_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_2_FREQ: + attributes: + id: GCLK_ID_2_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_31_CHEN: + attributes: + id: GCLK_ID_31_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_31_FREQ: + attributes: + id: GCLK_ID_31_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + MCLK_AHB_INITIAL_VALUE: + attributes: + id: MCLK_AHB_INITIAL_VALUE + children: + - children: + - attributes: + id: core + value: '0x1dff' + type: Dynamic + type: Values + type: String + MCLK_APBA_INITIAL_VALUE: + attributes: + id: MCLK_APBA_INITIAL_VALUE + children: + - children: + - attributes: + id: core + value: '0xfff' + type: Dynamic + type: Values + type: String + MCLK_APBC_INITIAL_VALUE: + attributes: + id: MCLK_APBC_INITIAL_VALUE + children: + - children: + - attributes: + id: core + value: '0xc01e' + type: Dynamic + type: Values + type: String + NVIC_10_0_ENABLE: + attributes: + id: NVIC_10_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_10_0_HANDLER: + attributes: + id: NVIC_10_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM1_USART_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_10_0_HANDLER_LOCK: + attributes: + id: NVIC_10_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_11_0_ENABLE: + attributes: + id: NVIC_11_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_11_0_HANDLER: + attributes: + id: NVIC_11_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM2_Handler + type: Dynamic + type: Values + type: String + NVIC_11_0_HANDLER_LOCK: + attributes: + id: NVIC_11_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_12_0_ENABLE: + attributes: + id: NVIC_12_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_12_0_HANDLER: + attributes: + id: NVIC_12_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM3_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_12_0_HANDLER_LOCK: + attributes: + id: NVIC_12_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_13_0_ENABLE: + attributes: + id: NVIC_13_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_13_0_HANDLER: + attributes: + id: NVIC_13_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM4_Handler + type: Dynamic + type: Values + type: String + NVIC_13_0_HANDLER_LOCK: + attributes: + id: NVIC_13_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_14_0_ENABLE: + attributes: + id: NVIC_14_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_14_0_HANDLER: + attributes: + id: NVIC_14_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM5_Handler + type: Dynamic + type: Values + type: String + NVIC_14_0_HANDLER_LOCK: + attributes: + id: NVIC_14_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_15_0_ENABLE: + attributes: + id: NVIC_15_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_15_0_HANDLER: + attributes: + id: NVIC_15_0_HANDLER + children: + - children: + - attributes: + id: core + value: CAN0_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_15_0_HANDLER_LOCK: + attributes: + id: NVIC_15_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_23_0_ENABLE: + attributes: + id: NVIC_23_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_23_0_HANDLER: + attributes: + id: NVIC_23_0_HANDLER + children: + - children: + - attributes: + id: core + value: TC3_TimerInterruptHandler + type: Dynamic + type: Values + type: String + NVIC_23_0_HANDLER_LOCK: + attributes: + id: NVIC_23_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_3_0_ENABLE: + attributes: + id: NVIC_3_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_3_0_HANDLER: + attributes: + id: NVIC_3_0_HANDLER + children: + - children: + - attributes: + id: core + value: EIC_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_3_0_HANDLER_LOCK: + attributes: + id: NVIC_3_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_9_0_ENABLE: + attributes: + id: NVIC_9_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_9_0_HANDLER: + attributes: + id: NVIC_9_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM0_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_9_0_HANDLER_LOCK: + attributes: + id: NVIC_9_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_15_FUNCTION_TYPE: + attributes: + id: PIN_15_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM0_PAD2 + type: User + type: Values + type: String + PIN_15_MODE: + attributes: + id: PIN_15_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_15_PERIPHERAL_FUNCTION: + attributes: + id: PIN_15_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_16_FUNCTION_TYPE: + attributes: + id: PIN_16_FUNCTION_TYPE + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_16_MODE: + attributes: + id: PIN_16_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_16_PERIPHERAL_FUNCTION: + attributes: + id: PIN_16_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_17_FUNCTION_TYPE: + attributes: + id: PIN_17_FUNCTION_TYPE + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_17_MODE: + attributes: + id: PIN_17_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_17_PERIPHERAL_FUNCTION: + attributes: + id: PIN_17_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_18_FUNCTION_TYPE: + attributes: + id: PIN_18_FUNCTION_TYPE + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_18_MODE: + attributes: + id: PIN_18_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_18_PERIPHERAL_FUNCTION: + attributes: + id: PIN_18_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_23_PERIPHERAL_FUNCTION: + attributes: + id: PIN_23_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_24_PERIPHERAL_FUNCTION: + attributes: + id: PIN_24_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_29_PERIPHERAL_FUNCTION: + attributes: + id: PIN_29_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_30_PERIPHERAL_FUNCTION: + attributes: + id: PIN_30_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_35_FUNCTION_TYPE: + attributes: + id: PIN_35_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM3_PAD0 + type: User + type: Values + type: String + PIN_35_MODE: + attributes: + id: PIN_35_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_35_PERIPHERAL_FUNCTION: + attributes: + id: PIN_35_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_36_FUNCTION_TYPE: + attributes: + id: PIN_36_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM3_PAD1 + type: User + type: Values + type: String + PIN_36_MODE: + attributes: + id: PIN_36_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_36_PERIPHERAL_FUNCTION: + attributes: + id: PIN_36_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_37_PERIPHERAL_FUNCTION: + attributes: + id: PIN_37_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: A + type: User + type: Values + type: String + PIN_38_PERIPHERAL_FUNCTION: + attributes: + id: PIN_38_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_43_PERIPHERAL_FUNCTION: + attributes: + id: PIN_43_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_44_PERIPHERAL_FUNCTION: + attributes: + id: PIN_44_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_45_FUNCTION_TYPE: + attributes: + id: PIN_45_FUNCTION_TYPE + children: + - children: + - attributes: + value: CAN0_TX + type: User + type: Values + type: String + PIN_45_MODE: + attributes: + id: PIN_45_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_45_PERIPHERAL_FUNCTION: + attributes: + id: PIN_45_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: G + type: User + type: Values + type: String + PIN_46_FUNCTION_TYPE: + attributes: + id: PIN_46_FUNCTION_TYPE + children: + - children: + - attributes: + value: CAN0_RX + type: User + type: Values + type: String + PIN_46_MODE: + attributes: + id: PIN_46_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_46_PERIPHERAL_FUNCTION: + attributes: + id: PIN_46_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: G + type: User + type: Values + type: String + PIN_49_PERIPHERAL_FUNCTION: + attributes: + id: PIN_49_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_50_PERIPHERAL_FUNCTION: + attributes: + id: PIN_50_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_61_PERIPHERAL_FUNCTION: + attributes: + id: PIN_61_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_62_PERIPHERAL_FUNCTION: + attributes: + id: PIN_62_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_63_PERIPHERAL_FUNCTION: + attributes: + id: PIN_63_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_64_PERIPHERAL_FUNCTION: + attributes: + id: PIN_64_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PORT_GROUP_0_DIR: + attributes: + id: PORT_GROUP_0_DIR + children: + - children: + - attributes: + id: core + value: '0x380' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_OUT: + attributes: + id: PORT_GROUP_0_OUT + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_12: + attributes: + id: PORT_GROUP_0_PAD_12 + children: + - children: + - attributes: + id: core + value: PA12 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_13: + attributes: + id: PORT_GROUP_0_PAD_13 + children: + - children: + - attributes: + id: core + value: PA13 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_16: + attributes: + id: PORT_GROUP_0_PAD_16 + children: + - children: + - attributes: + id: core + value: PA16 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_17: + attributes: + id: PORT_GROUP_0_PAD_17 + children: + - children: + - attributes: + id: core + value: PA17 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_18: + attributes: + id: PORT_GROUP_0_PAD_18 + children: + - children: + - attributes: + id: core + value: PA18 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_19: + attributes: + id: PORT_GROUP_0_PAD_19 + children: + - children: + - attributes: + id: core + value: PA19 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_22: + attributes: + id: PORT_GROUP_0_PAD_22 + children: + - children: + - attributes: + id: core + value: PA22 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_23: + attributes: + id: PORT_GROUP_0_PAD_23 + children: + - children: + - attributes: + id: core + value: PA23 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_24: + attributes: + id: PORT_GROUP_0_PAD_24 + children: + - children: + - attributes: + id: core + value: PA24 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_25: + attributes: + id: PORT_GROUP_0_PAD_25 + children: + - children: + - attributes: + id: core + value: PA25 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_6: + attributes: + id: PORT_GROUP_0_PAD_6 + children: + - children: + - attributes: + id: core + value: PA06 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_7: + attributes: + id: PORT_GROUP_0_PAD_7 + children: + - children: + - attributes: + id: core + value: PA07 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_8: + attributes: + id: PORT_GROUP_0_PAD_8 + children: + - children: + - attributes: + id: core + value: PA08 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_9: + attributes: + id: PORT_GROUP_0_PAD_9 + children: + - children: + - attributes: + id: core + value: PA09 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG12: + attributes: + id: PORT_GROUP_0_PINCFG12 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG13: + attributes: + id: PORT_GROUP_0_PINCFG13 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG16: + attributes: + id: PORT_GROUP_0_PINCFG16 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG17: + attributes: + id: PORT_GROUP_0_PINCFG17 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG18: + attributes: + id: PORT_GROUP_0_PINCFG18 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG19: + attributes: + id: PORT_GROUP_0_PINCFG19 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG22: + attributes: + id: PORT_GROUP_0_PINCFG22 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG23: + attributes: + id: PORT_GROUP_0_PINCFG23 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG24: + attributes: + id: PORT_GROUP_0_PINCFG24 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG25: + attributes: + id: PORT_GROUP_0_PINCFG25 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG6: + attributes: + id: PORT_GROUP_0_PINCFG6 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG7: + attributes: + id: PORT_GROUP_0_PINCFG7 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG8: + attributes: + id: PORT_GROUP_0_PINCFG8 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG9: + attributes: + id: PORT_GROUP_0_PINCFG9 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_12_USED: + attributes: + id: PORT_GROUP_0_PIN_12_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_13_USED: + attributes: + id: PORT_GROUP_0_PIN_13_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_16_USED: + attributes: + id: PORT_GROUP_0_PIN_16_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_17_USED: + attributes: + id: PORT_GROUP_0_PIN_17_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_18_USED: + attributes: + id: PORT_GROUP_0_PIN_18_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_19_USED: + attributes: + id: PORT_GROUP_0_PIN_19_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_22_USED: + attributes: + id: PORT_GROUP_0_PIN_22_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_23_USED: + attributes: + id: PORT_GROUP_0_PIN_23_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_24_USED: + attributes: + id: PORT_GROUP_0_PIN_24_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_25_USED: + attributes: + id: PORT_GROUP_0_PIN_25_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_6_USED: + attributes: + id: PORT_GROUP_0_PIN_6_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_7_USED: + attributes: + id: PORT_GROUP_0_PIN_7_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_8_USED: + attributes: + id: PORT_GROUP_0_PIN_8_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_9_USED: + attributes: + id: PORT_GROUP_0_PIN_9_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PMUX11: + attributes: + id: PORT_GROUP_0_PMUX11 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX12: + attributes: + id: PORT_GROUP_0_PMUX12 + children: + - children: + - attributes: + id: core + value: '0x66' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX3: + attributes: + id: PORT_GROUP_0_PMUX3 + children: + - children: + - attributes: + id: core + value: '0x3' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX4: + attributes: + id: PORT_GROUP_0_PMUX4 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX6: + attributes: + id: PORT_GROUP_0_PMUX6 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX8: + attributes: + id: PORT_GROUP_0_PMUX8 + children: + - children: + - attributes: + id: core + value: '0x33' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX9: + attributes: + id: PORT_GROUP_0_PMUX9 + children: + - children: + - attributes: + id: core + value: '0x30' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_DIR: + attributes: + id: PORT_GROUP_1_DIR + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_OUT: + attributes: + id: PORT_GROUP_1_OUT + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_0: + attributes: + id: PORT_GROUP_1_PAD_0 + children: + - children: + - attributes: + id: core + value: PB00 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_1: + attributes: + id: PORT_GROUP_1_PAD_1 + children: + - children: + - attributes: + id: core + value: PB01 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_10: + attributes: + id: PORT_GROUP_1_PAD_10 + children: + - children: + - attributes: + id: core + value: PB10 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_11: + attributes: + id: PORT_GROUP_1_PAD_11 + children: + - children: + - attributes: + id: core + value: PB11 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_2: + attributes: + id: PORT_GROUP_1_PAD_2 + children: + - children: + - attributes: + id: core + value: PB02 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_22: + attributes: + id: PORT_GROUP_1_PAD_22 + children: + - children: + - attributes: + id: core + value: PB22 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_23: + attributes: + id: PORT_GROUP_1_PAD_23 + children: + - children: + - attributes: + id: core + value: PB23 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_3: + attributes: + id: PORT_GROUP_1_PAD_3 + children: + - children: + - attributes: + id: core + value: PB03 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG0: + attributes: + id: PORT_GROUP_1_PINCFG0 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG1: + attributes: + id: PORT_GROUP_1_PINCFG1 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG10: + attributes: + id: PORT_GROUP_1_PINCFG10 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG11: + attributes: + id: PORT_GROUP_1_PINCFG11 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG2: + attributes: + id: PORT_GROUP_1_PINCFG2 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG22: + attributes: + id: PORT_GROUP_1_PINCFG22 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG23: + attributes: + id: PORT_GROUP_1_PINCFG23 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG3: + attributes: + id: PORT_GROUP_1_PINCFG3 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PIN_0_USED: + attributes: + id: PORT_GROUP_1_PIN_0_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_10_USED: + attributes: + id: PORT_GROUP_1_PIN_10_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_11_USED: + attributes: + id: PORT_GROUP_1_PIN_11_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_1_USED: + attributes: + id: PORT_GROUP_1_PIN_1_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_22_USED: + attributes: + id: PORT_GROUP_1_PIN_22_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_23_USED: + attributes: + id: PORT_GROUP_1_PIN_23_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_2_USED: + attributes: + id: PORT_GROUP_1_PIN_2_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_3_USED: + attributes: + id: PORT_GROUP_1_PIN_3_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PMUX0: + attributes: + id: PORT_GROUP_1_PMUX0 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PMUX1: + attributes: + id: PORT_GROUP_1_PMUX1 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PMUX11: + attributes: + id: PORT_GROUP_1_PMUX11 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PMUX5: + attributes: + id: PORT_GROUP_1_PMUX5 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + SERCOM0_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM0_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM0_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM0_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM0_INTERRUPT_ENABLE: + attributes: + id: SERCOM0_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM0_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM0_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM0_INTERRUPT_HANDLER: + attributes: + id: SERCOM0_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom0 + value: SERCOM0_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + SERCOM0_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM0_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM1_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM1_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM1_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM1_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM1_INTERRUPT_ENABLE: + attributes: + id: SERCOM1_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM1_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM1_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM1_INTERRUPT_HANDLER: + attributes: + id: SERCOM1_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom1 + value: SERCOM1_USART_InterruptHandler + type: Dynamic + type: Values + type: String + SERCOM1_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM1_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM2_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM2_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM2_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM2_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM2_INTERRUPT_ENABLE: + attributes: + id: SERCOM2_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM2_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM2_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM2_INTERRUPT_HANDLER: + attributes: + id: SERCOM2_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom2 + value: SERCOM2_Handler + type: Dynamic + type: Values + type: String + SERCOM2_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM2_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM3_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM3_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM3_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM3_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM3_INTERRUPT_ENABLE: + attributes: + id: SERCOM3_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM3_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM3_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM3_INTERRUPT_HANDLER: + attributes: + id: SERCOM3_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom3 + value: SERCOM3_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + SERCOM3_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM3_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM4_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM4_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + SERCOM4_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM4_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM5_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM5_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + SERCOM5_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM5_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC3_CLOCK_ENABLE: + attributes: + id: TC3_CLOCK_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC3_CLOCK_FREQUENCY: + attributes: + id: TC3_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + TC3_INTERRUPT_ENABLE: + attributes: + id: TC3_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: tc3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC3_INTERRUPT_ENABLE_UPDATE: + attributes: + id: TC3_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + TC3_INTERRUPT_HANDLER: + attributes: + id: TC3_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: tc3 + value: TC3_TimerInterruptHandler + type: Dynamic + type: Values + type: String + TC3_INTERRUPT_HANDLER_LOCK: + attributes: + id: TC3_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: tc3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_CLOCK_FREQUENCY: + attributes: + id: TC2_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + TC2_CLOCK_ENABLE: + attributes: + id: TC2_CLOCK_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_INTERRUPT_ENABLE_UPDATE: + attributes: + id: TC2_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_22_0_ENABLE: + attributes: + id: NVIC_22_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_INTERRUPT_ENABLE: + attributes: + id: TC2_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: tc2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_22_0_HANDLER: + attributes: + id: NVIC_22_0_HANDLER + children: + - children: + - attributes: + id: core + value: TC2_TimerInterruptHandler + type: Dynamic + type: Values + type: String + TC2_INTERRUPT_HANDLER: + attributes: + id: TC2_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: tc2 + value: TC2_TimerInterruptHandler + type: Dynamic + type: Values + type: String + NVIC_22_0_HANDLER_LOCK: + attributes: + id: NVIC_22_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_INTERRUPT_HANDLER_LOCK: + attributes: + id: TC2_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: tc2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_53_MODE: + attributes: + id: PIN_53_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_53_FUNCTION_TYPE: + attributes: + id: PIN_53_FUNCTION_TYPE + children: + - children: + - attributes: + value: EIC_EXTINT8 + type: User + type: Values + type: String + PORT_GROUP_0_PMUX14: + attributes: + id: PORT_GROUP_0_PMUX14 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_28: + attributes: + id: PORT_GROUP_0_PAD_28 + children: + - children: + - attributes: + id: core + value: PA28 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG28: + attributes: + id: PORT_GROUP_0_PINCFG28 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_28_USED: + attributes: + id: PORT_GROUP_0_PIN_28_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_53_PERIPHERAL_FUNCTION: + attributes: + id: PIN_53_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: A + type: User + type: Values + type: String + PIN_37_MODE: + attributes: + id: PIN_37_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_37_FUNCTION_TYPE: + attributes: + id: PIN_37_FUNCTION_TYPE + children: + - children: + - attributes: + value: EIC_EXTINT2 + type: User + type: Values + type: String + PIN_38_MODE: + attributes: + id: PIN_38_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_38_FUNCTION_TYPE: + attributes: + id: PIN_38_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM3_PAD3 + type: User + type: Values + type: String + PIN_16_INEN: + attributes: + id: PIN_16_INEN + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_16_DIR: + attributes: + id: PIN_16_DIR + children: + - children: + - attributes: + value: Out + type: User + type: Values + type: String + PIN_16_FUNCTION_NAME: + attributes: + id: PIN_16_FUNCTION_NAME + children: + - children: + - attributes: + value: GPIO_PA07 + type: User + type: Values + type: String + PIN_17_INEN: + attributes: + id: PIN_17_INEN + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_17_DIR: + attributes: + id: PIN_17_DIR + children: + - children: + - attributes: + value: Out + type: User + type: Values + type: String + PIN_17_FUNCTION_NAME: + attributes: + id: PIN_17_FUNCTION_NAME + children: + - children: + - attributes: + value: GPIO_PA08 + type: User + type: Values + type: String + PIN_18_INEN: + attributes: + id: PIN_18_INEN + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_18_DIR: + attributes: + id: PIN_18_DIR + children: + - children: + - attributes: + value: Out + type: User + type: Values + type: String + PIN_18_FUNCTION_NAME: + attributes: + id: PIN_18_FUNCTION_NAME + children: + - children: + - attributes: + value: GPIO_PA09 + type: User + type: Values + type: String + PIN_32_MODE: + attributes: + id: PIN_32_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_32_FUNCTION_TYPE: + attributes: + id: PIN_32_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM2_PAD3 + type: User + type: Values + type: String + PORT_GROUP_0_PMUX7: + attributes: + id: PORT_GROUP_0_PMUX7 + children: + - children: + - attributes: + id: core + value: '0x22' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_15: + attributes: + id: PORT_GROUP_0_PAD_15 + children: + - children: + - attributes: + id: core + value: PA15 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG15: + attributes: + id: PORT_GROUP_0_PINCFG15 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_15_USED: + attributes: + id: PORT_GROUP_0_PIN_15_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_32_PERIPHERAL_FUNCTION: + attributes: + id: PIN_32_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: C + type: User + type: Values + type: String + PIN_31_MODE: + attributes: + id: PIN_31_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_31_FUNCTION_TYPE: + attributes: + id: PIN_31_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM2_PAD2 + type: User + type: Values + type: String + PORT_GROUP_0_PAD_14: + attributes: + id: PORT_GROUP_0_PAD_14 + children: + - children: + - attributes: + id: core + value: PA14 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG14: + attributes: + id: PORT_GROUP_0_PINCFG14 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_14_USED: + attributes: + id: PORT_GROUP_0_PIN_14_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_31_PERIPHERAL_FUNCTION: + attributes: + id: PIN_31_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: C + type: User + type: Values + type: String + userData: + children: + - attributes: + canvasHeight: '549' + canvasWidth: '612' + type: GraphSettings + - children: + - attributes: + id: profile0 + name: Main + type: Profile + type: PowerProfiles + type: UserData diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/dfp.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/dfp.yml new file mode 100644 index 00000000..03c2a3ff --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/dfp.yml @@ -0,0 +1,31 @@ +configVersion: 1.0.0 +componentName: dfp +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: dfp + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: dfp + x: '440' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: {} + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/eic.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/eic.yml new file mode 100644 index 00000000..c363261c --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/eic.yml @@ -0,0 +1,162 @@ +configVersion: 1.0.0 +componentName: eic +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: eic + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: eic + x: '476' + y: '186' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + EIC_ASYNCH: + attributes: + id: EIC_ASYNCH + children: + - children: + - attributes: + id: eic + value: '0' + type: Dynamic + type: Values + type: Hex + EIC_CHAN_2: + attributes: + id: EIC_CHAN_2 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_CHAN_3: + attributes: + id: EIC_CHAN_3 + children: + - children: + - attributes: + value: 'false' + type: User + type: Values + type: Boolean + EIC_CONFIG_FILTEN_3: + attributes: + id: EIC_CONFIG_FILTEN_3 + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: 'false' + type: User + type: Values + type: Boolean + EIC_CONFIG_SENSE_3: + attributes: + id: EIC_CONFIG_SENSE_3 + children: + - children: + - attributes: + value: '2' + type: User + type: Values + type: KeyValueSet + EIC_EXTINTEO: + attributes: + id: EIC_EXTINTEO + children: + - children: + - attributes: + id: eic + value: '0' + type: Dynamic + type: Values + type: Hex + EIC_INT: + attributes: + id: EIC_INT + children: + - children: + - attributes: + id: eic + value: '260' + type: Dynamic + type: Values + type: Hex + EIC_INT_2: + attributes: + id: EIC_INT_2 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_INT_3: + attributes: + id: EIC_INT_3 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_CHAN_8: + attributes: + id: EIC_CHAN_8 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_INT_8: + attributes: + id: EIC_INT_8 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_CONFIG_SENSE_8: + attributes: + id: EIC_CONFIG_SENSE_8 + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/evsys.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/evsys.yml new file mode 100644 index 00000000..c987a65d --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/evsys.yml @@ -0,0 +1,196 @@ +configVersion: 1.0.0 +componentName: evsys +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: evsys + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: evsys + x: '180' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + EVSYS_CHANNEL_0_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_0_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_10_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_10_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_11_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_11_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_1_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_1_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_2_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_2_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_3_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_3_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_4_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_4_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_5_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_5_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_6_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_6_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_7_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_7_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_8_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_8_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_9_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_9_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + GENERATOR_EIC_EXTINT_2_ACTIVE: + attributes: + id: GENERATOR_EIC_EXTINT_2_ACTIVE + children: + - children: + - attributes: + id: eic + value: 'false' + type: Dynamic + type: Values + type: Boolean + GENERATOR_EIC_EXTINT_3_ACTIVE: + attributes: + id: GENERATOR_EIC_EXTINT_3_ACTIVE + children: + - children: + - attributes: + id: eic + value: 'false' + type: Dynamic + type: Values + type: Boolean + GENERATOR_EIC_EXTINT_8_ACTIVE: + attributes: + id: GENERATOR_EIC_EXTINT_8_ACTIVE + children: + - children: + - attributes: + id: eic + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/nvmctrl.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/nvmctrl.yml new file mode 100644 index 00000000..4b532a55 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/nvmctrl.yml @@ -0,0 +1,31 @@ +configVersion: 1.0.0 +componentName: nvmctrl +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: nvmctrl + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: nvmctrl + x: '20' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: {} + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom0.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom0.yml new file mode 100644 index 00000000..7be1757f --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom0.yml @@ -0,0 +1,176 @@ +configVersion: 1.0.0 +componentName: sercom0 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom0 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom0 + x: '20' + y: '88' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom0 + value: '232' + type: Dynamic + type: Values + type: Hex + RECEIVE_DATA_REGISTER: + attributes: + id: RECEIVE_DATA_REGISTER + children: + - children: + - attributes: + id: sercom0 + value: '&(SERCOM0_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + SERCOM_MODE: + attributes: + id: SERCOM_MODE + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_BAUD_RATE: + attributes: + id: SPI_BAUD_RATE + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '2400000' + type: User + type: Values + type: Integer + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom0 + value: '9' + type: Dynamic + type: Values + type: Integer + SPI_DOPO: + attributes: + id: SPI_DOPO + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + TRANSMIT_DATA_REGISTER: + attributes: + id: TRANSMIT_DATA_REGISTER + children: + - children: + - attributes: + id: sercom0 + value: '&(SERCOM0_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom0 + value: '63019' + type: Dynamic + type: Values + type: Integer + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom0 + value: '16' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom0 + value: '0' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom0 + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom1.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom1.yml new file mode 100644 index 00000000..e52b93c2 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom1.yml @@ -0,0 +1,139 @@ +configVersion: 1.0.0 +componentName: sercom1 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom1 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom1 + x: '19' + y: '204' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom1 + value: '232' + type: Dynamic + type: Values + type: Hex + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom1 + value: '23' + type: Dynamic + type: Values + type: Integer + USART_7816_BAUD_VALUE: + attributes: + id: USART_7816_BAUD_VALUE + children: + - children: + - attributes: + id: sercom1 + value: '-1' + type: Dynamic + type: Values + type: Integer + USART_BAUD_RATE: + attributes: + id: USART_BAUD_RATE + children: + - children: + - attributes: + value: '5180000' + type: User + type: Values + type: Integer + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom1 + value: '8956' + type: Dynamic + type: Values + type: Integer + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_RXPO: + attributes: + id: USART_RXPO + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom1 + value: '8' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom1 + value: '2' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom1 + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom2.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom2.yml new file mode 100644 index 00000000..732a11c1 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom2.yml @@ -0,0 +1,256 @@ +configVersion: 1.0.0 +componentName: sercom2 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom2 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: + children: + - children: + - attributes: + id: SERCOM2_I2C + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: DirectCapability + - attributes: + id: SERCOM2_SPI + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: DirectCapability + - attributes: + id: SERCOM2_UART + children: + - children: + - attributes: + id: targetComponentID + children: + - type: Value + value: stdio + type: String + - attributes: + id: targetAttachmentID + children: + - type: Value + value: UART + type: String + type: Attributes + type: DirectCapability + type: Attachments + type: sercom2 + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom2 + x: '20' + y: '320' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom2 + value: '232' + type: Dynamic + type: Values + type: Hex + RECEIVE_DATA_REGISTER: + attributes: + id: RECEIVE_DATA_REGISTER + children: + - children: + - attributes: + id: sercom2 + value: '&(SERCOM2_REGS->USART_INT.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + SERCOM_MODE: + attributes: + id: SERCOM_MODE + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: sercom2 + value: '0' + type: Dynamic + type: Values + type: KeyValueSet + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom2 + value: '23' + type: Dynamic + type: Values + type: Integer + TRANSMIT_DATA_REGISTER: + attributes: + id: TRANSMIT_DATA_REGISTER + children: + - children: + - attributes: + id: sercom2 + value: '&(SERCOM2_REGS->USART_INT.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom2 + value: '63019' + type: Dynamic + type: Values + type: Integer + USART_INTERRUPT_MODE_ENABLE: + attributes: + id: USART_INTERRUPT_MODE_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_OPERATING_MODE: + attributes: + id: USART_OPERATING_MODE + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: sercom2 + value: '0' + type: Dynamic + type: Values + type: KeyValueSet + USART_RING_BUFFER_MODE_ENABLE: + attributes: + id: USART_RING_BUFFER_MODE_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + USART_RXPO: + attributes: + id: USART_RXPO + children: + - children: + - attributes: + value: '3' + type: User + type: Values + type: KeyValueSet + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom2 + value: '16' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom2 + value: '0' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + USART_TXPO: + attributes: + id: USART_TXPO + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom3.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom3.yml new file mode 100644 index 00000000..11048ef8 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/sercom3.yml @@ -0,0 +1,408 @@ +configVersion: 1.0.0 +componentName: sercom3 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom3 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom3 + x: '19' + y: '389' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom3 + value: '232' + type: Dynamic + type: Values + type: Hex + RECEIVE_DATA_REGISTER: + attributes: + id: RECEIVE_DATA_REGISTER + children: + - children: + - attributes: + id: sercom3 + value: '&(SERCOM3_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + SERCOM_MODE: + attributes: + id: SERCOM_MODE + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom3 + value: '1' + type: Dynamic + type: Values + type: Integer + TRANSMIT_DATA_REGISTER: + attributes: + id: TRANSMIT_DATA_REGISTER + children: + - children: + - attributes: + id: sercom3 + value: '&(SERCOM3_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + USART_7816_BAUD_VALUE: + attributes: + id: USART_7816_BAUD_VALUE + children: + - children: + - attributes: + id: sercom3 + value: '-1' + type: Dynamic + type: Values + type: Integer + USART_BAUD_RATE: + attributes: + id: USART_BAUD_RATE + children: + - children: + - attributes: + value: '5180000' + type: User + type: Values + type: Integer + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom3 + value: '8956' + type: Dynamic + type: Values + type: Integer + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom3 + value: '8' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom3 + value: '2' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom3 + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM_USART_HEADER: + attributes: + id: SERCOM_USART_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_USART_SOURCE: + attributes: + id: SERCOM_USART_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_USART_COMMON_HEADER: + attributes: + id: SERCOM_USART_COMMON_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_I2CM_SOURCE: + attributes: + id: SERCOM_I2CM_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_I2CM_HEADER: + attributes: + id: SERCOM_I2CM_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_I2CM_MASTER_HEADER: + attributes: + id: SERCOM_I2CM_MASTER_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + I2C_SCLSM: + attributes: + id: I2C_SCLSM + children: + - children: + - attributes: + id: sercom3 + value: '0' + type: Dynamic + type: Values + type: Integer + I2C_CLOCK_SPEED_HZ: + attributes: + id: I2C_CLOCK_SPEED_HZ + children: + - children: + - attributes: + id: sercom3 + value: '100000' + type: Dynamic + type: Values + type: Integer + SERCOM_SPIM_SOURCE: + attributes: + id: SERCOM_SPIM_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + SERCOM_SPIM_HEADER: + attributes: + id: SERCOM_SPIM_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + SERCOM_SPIM_COMMON_HEADER: + attributes: + id: SERCOM_SPIM_COMMON_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + SPI_MSSEN: + attributes: + id: SPI_MSSEN + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: 'false' + type: User + type: Values + type: Boolean + SPI_DOPO: + attributes: + id: SPI_DOPO + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '3' + type: User + type: Values + type: KeyValueSet + SPI_DIPO: + attributes: + id: SPI_DIPO + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_BAUD_RATE: + attributes: + id: SPI_BAUD_RATE + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '10000000' + type: User + type: Values + type: Integer + SPI_CLOCK_POLARITY: + attributes: + id: SPI_CLOCK_POLARITY + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_CLOCK_PHASE: + attributes: + id: SPI_CLOCK_PHASE + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/stdio.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/stdio.yml new file mode 100644 index 00000000..1b1e089d --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/stdio.yml @@ -0,0 +1,64 @@ +configVersion: 1.0.0 +componentName: stdio +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: stdio + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: + children: + - children: + - attributes: + id: UART + children: + - children: + - attributes: + id: targetComponentID + children: + - type: Value + value: sercom2 + type: String + - attributes: + id: targetAttachmentID + children: + - type: Value + value: SERCOM2_UART + type: String + type: Attributes + type: DirectDependency + type: Attachments + type: stdio + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: stdio + x: '189' + y: '322' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + DEBUG_PERIPHERAL: + attributes: + id: DEBUG_PERIPHERAL + children: + - children: + - attributes: + id: stdio + value: sercom2 + type: Dynamic + type: Values + type: String + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/tc2.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/tc2.yml new file mode 100644 index 00000000..4381e4c9 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/tc2.yml @@ -0,0 +1,89 @@ +configVersion: 1.0.0 +componentName: tc2 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: tc2 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: tc2 + x: '477' + y: '308' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + TC_TIMER_PERIOD: + attributes: + id: TC_TIMER_PERIOD + children: + - children: + - attributes: + id: max + children: + - type: Value + value: '65535' + type: Long + type: Attributes + - children: + - attributes: + id: tc2 + value: '37499' + type: Dynamic + type: Values + type: Long + TC_FREQUENCY: + attributes: + id: TC_FREQUENCY + children: + - children: + - attributes: + id: tc2 + value: '187500' + type: Dynamic + type: Values + type: Integer + TC_TIMER_TIME_MS: + attributes: + id: TC_TIMER_TIME_MS + children: + - children: + - attributes: + id: max + children: + - type: Value + value: '349.52533' + type: Float + type: Attributes + - children: + - attributes: + value: '200.0' + type: User + type: Values + type: Float + TC_CTRLA_PRESCALER: + attributes: + id: TC_CTRLA_PRESCALER + children: + - children: + - attributes: + value: '6' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/tc3.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/tc3.yml new file mode 100644 index 00000000..397cb6dc --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/components/tc3.yml @@ -0,0 +1,150 @@ +configVersion: 1.0.0 +componentName: tc3 +coreVersion: 5.8.2 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: tc3 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: tc3 + x: '476' + y: '236' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + TC_TIMER_PERIOD: + attributes: + id: TC_TIMER_PERIOD + children: + - children: + - attributes: + id: max + children: + - type: Value + value: '65535' + type: Long + type: Attributes + - children: + - attributes: + id: tc3 + value: '47999' + type: Dynamic + type: Values + type: Long + TC_FREQUENCY: + attributes: + id: TC_FREQUENCY + children: + - children: + - attributes: + id: tc3 + value: '48000000' + type: Dynamic + type: Values + type: Integer + TC_TIMER_HEADER: + attributes: + id: TC_TIMER_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + TC_TIMER_SOURCE: + attributes: + id: TC_TIMER_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + TC_COMPARE_HEADER: + attributes: + id: TC_COMPARE_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_COMPARE_SOURCE: + attributes: + id: TC_COMPARE_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_CAPTURE_HEADER: + attributes: + id: TC_CAPTURE_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_CAPTURE_SOURCE: + attributes: + id: TC_CAPTURE_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_SLAVE_MODE: + attributes: + id: TC_SLAVE_MODE + children: + - children: + - attributes: + id: tc3 + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/mcc-config.mc4 b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/mcc-config.mc4 new file mode 100644 index 00000000..9990f659 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default.bak0/mcc-config.mc4 @@ -0,0 +1,291 @@ +configVersion: 1.0.0 +coreVersion: 5.8.2 +spaHostVersion: 1.0.0 +device: ATSAMC21J18A +deviceLibrary: + className: com.microchip.mcc.harmony.Harmony3Library +groupModules: [] +modules: +- can0 +- cmsis +- core +- dfp +- eic +- evsys +- nvmctrl +- sercom0 +- sercom1 +- sercom2 +- sercom3 +- stdio +- tc2 +- tc3 +generatedFileHashHistoryMap: +- file: ../src/config/default/ATSAMC21J18A.ld + hash: 3fc7dbb63ae72ecd9b52572e4dd84ed79cbd37feb6064cb6d4df6fca301d09af +- file: ../src/config/default/definitions.h + hash: 04859d790caf5eff2e493c4d3d9a18d6ad8fca4cdc9f950205e214ee366d1b05 +- file: ../src/config/default/device.h + hash: e539bb402fa4783d95ccf06235458b2e1fe01207c83c0e046a853e0385d0b6f4 +- file: ../src/config/default/device_cache.h + hash: e2914501b361bbc93a56d6915b1bf4fac00277e61f31fdee87a587bc15dea5b6 +- file: ../src/config/default/device_vectors.h + hash: 0ffcf2109c1550773094e211109c77b5ce60b5d264766d8e479d6ed2104425b8 +- file: ../src/config/default/exceptions.c + hash: 42f9da2668e04ccb3473d45b149683a00f80072c6883c7918d6ce93997cd6987 +- file: ../src/config/default/initialization.c + hash: 1eafb71f633fbaf8aead4b59efb4635037c69248e7200d8c658682e3cf59ab53 +- file: ../src/config/default/interrupts.c + hash: e0c2136ece0ce0783f29322ea6009619f03ceded2621248b9ce596ef8e104b4e +- file: ../src/config/default/interrupts.h + hash: 7d566278d15f14a635910b00ef9628836ff29cd0f95b43e73b9a38ed923c2409 +- file: ../src/config/default/libc_syscalls.c + hash: 88bb2e34c939601b5b7ad076556e3ee0fcedf388436b8cddb6d6fd3e9d07472f +- file: ../src/config/default/peripheral/can/plib_can0.c + hash: 7f0eea33ffe3942f00d645cc9590cbeb93e3aacf764aa27d47528f8200877f0f +- file: ../src/config/default/peripheral/can/plib_can0.h + hash: 82effa7ee26a29add640e0239848f8265bf69247e1c29d24fa8b05ed853de21e +- file: ../src/config/default/peripheral/can/plib_can_common.h + hash: e0e3b54f69be9d8811bbe507f91daa443ae7bff5dc724ac51baebc160097b2d6 +- file: ../src/config/default/peripheral/clock/plib_clock.c + hash: 972c24eea53d5ae9b7b6580a2774cf1b029a14e9dcefb23ccfa11fb7cf07d52e +- file: ../src/config/default/peripheral/clock/plib_clock.h + hash: 01c269741541514e997ef61546f4dbb0e23f66e27c6a957162557f13b4638baf +- file: ../src/config/default/peripheral/eic/plib_eic.c + hash: 3fff48a77d91b0b6e9f00e1ebafd36cf03848297cff9b676997b2fb05ff92092 +- file: ../src/config/default/peripheral/eic/plib_eic.h + hash: 422653519e8f6f4ba4605148473b0d6afb1e4a27797ad3c1fc172b0e90b9b287 +- file: ../src/config/default/peripheral/evsys/plib_evsys.c + hash: 7bb3bc0d60c4cf18638d76d3dfe9e5b13d2915d09e6a8a7bc4b5faae870c8f48 +- file: ../src/config/default/peripheral/evsys/plib_evsys.h + hash: f7d08eb8162f271ce1db384c082586a6624e506aa7f502c64c4ab5a1aadac47d +- file: ../src/config/default/peripheral/nvic/plib_nvic.c + hash: e428272e8e558ffc3483b557441875e3c9cf7471b7a93b02e4be2e2cbb4c7770 +- file: ../src/config/default/peripheral/nvic/plib_nvic.h + hash: 9936ac782115af41003255283fa2f603f4ff2212d16275b7c80ea8d067a9e208 +- file: ../src/config/default/peripheral/nvmctrl/plib_nvmctrl.c + hash: 1fb8d05a455e4b5ec9a5e2fdfe11470cbde614fa7df8a005b0f0110a95f071bc +- file: ../src/config/default/peripheral/nvmctrl/plib_nvmctrl.h + hash: a2f572d8ba174971959f4a9319fc61b460c00432512d38e19e28e2dfddf6cde5 +- file: ../src/config/default/peripheral/port/plib_port.c + hash: ea1b1fc9ea66bd15d97dd065aa1226aaf2bb81db6da54a7d02de36092fe7bc87 +- file: ../src/config/default/peripheral/port/plib_port.h + hash: a90ff3ae67901cc9a53dbe555c73fe85438a441b2c89ba7bcd5450a9572bf55c +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.c + hash: dbd555fdec52e709c0945f28076780e7aff5063bd3519ac47364293a3cbc7a59 +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.h + hash: 8e1550559a741d9ace2e6fb145ac015c8457aa417c877996855b73238051babb +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.c + hash: cd273a3f2f1ff8c22a95bfc4b98d17fb45da709b1c99b390c80afc61e7e2fdf4 +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.h + hash: 351b72a164869e3672e455b02f4de6083ca436a862a6e55388c9a221911b4c39 +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom_spi_master_common.h + hash: 06e3c7813e1608b5008e3c8955569f9cff04bef321a34c35421f7979368a4ada +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom1_usart.c + hash: 3b45cc8fc8540ebcc8375ebe09611fce2b89b56ddbf4ac9025034bf44f491d1e +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom1_usart.h + hash: 721b767702c85a60634480b2759b12de7c24e3a3d3cbba8e540ed6ca0c083828 +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom2_usart.c + hash: c4cd5be8c789669f4a91f1e56aa7973e6db5f12d105fd041f8e605d59e382480 +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom2_usart.h + hash: a0d35d03c527d1fb9c99d575f99b91a9d1d49d345b20cacee95c2aec45c0d7cb +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom_usart_common.h + hash: 3653b66472c558c50f7037a1dd25d2678e9a13aa718f3c53a2195e6f3919ea48 +- file: ../src/config/default/peripheral/tc/plib_tc2.c + hash: cbfba6ba974bb3ff6886ef20d2044ad598afea92ce9fba62f96a7ccabf16071a +- file: ../src/config/default/peripheral/tc/plib_tc2.h + hash: 1161939c7397bd6697e244159377607749f3a272bf67ea3af5c3cbdc690eab59 +- file: ../src/config/default/peripheral/tc/plib_tc3.c + hash: 2c8a833a0cc3b721e21c297d5b429b4dab2c0d3ec815785cc023405440614606 +- file: ../src/config/default/peripheral/tc/plib_tc3.h + hash: 36173921130720b871c8cbb1fccfc4c23e1f05752441386c7b9e34ddf43bfbbf +- file: ../src/config/default/peripheral/tc/plib_tc_common.h + hash: 487b4f489229b8e16b24ab48ddc1f414b095585439f0e10d53b2285fc3979f63 +- file: ../src/config/default/pin_configurations.csv + hash: b447d5bce495506ab494702101635ff35aedb0387a0c967fbd78283119f367e9 +- file: ../src/config/default/startup_xc32.c + hash: e6227d89e36b74af1bc21e00e80b390502c97aaaa65796291f63b2d96cf0678e +- file: ../src/config/default/stdio/xc32_monitor.c + hash: 1395dbc052b1c3c61d798c93f81efa8bc498027c4f6de749df5e4c06dbee4d31 +- file: ../src/config/default/toolchain_specifics.h + hash: a4f1774c6f1f8c6cd522567536c9e9d75ca63259b868015ac9b0fb0aeeffe1f4 +- file: ../src/main.c + hash: d3c233d419e6304bfacbafc18cc68c0f5c26e365f23b20ea40ccfac458f664c5 +- file: ../src/packs/ATSAMC21J18A_DFP/component/ac.h + hash: 18e965ceee994e73f9c30612a73b9ef37049d092638a21c7bcd1e6fc69350cc1 +- file: ../src/packs/ATSAMC21J18A_DFP/component/adc.h + hash: da8c9fa2b7b683ac6f72c84ab14b91e952f89655b503edc22c0a3e046567ac0c +- file: ../src/packs/ATSAMC21J18A_DFP/component/can.h + hash: c98eb7bcbcb5158e4b581552609cb44b6a4bca28b1c322c387925e8d25d94c00 +- file: ../src/packs/ATSAMC21J18A_DFP/component/ccl.h + hash: 3a86fd07e87114509b7d3a79035076371e32deddee93a460a9eeaa0f1c5d9f85 +- file: ../src/packs/ATSAMC21J18A_DFP/component/dac.h + hash: dc0977de3b63a7f7656d1109f6acf5c07c993a5f35407cb91322e35dc983675f +- file: ../src/packs/ATSAMC21J18A_DFP/component/divas.h + hash: 51af87912aab3a155701b249766aedbf09a6913b3a0a962a72604a22fc97cec0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/dmac.h + hash: e11903d19310facd45f67fab22f2d1d8f1f412be94b8973a98badfcfe3470c69 +- file: ../src/packs/ATSAMC21J18A_DFP/component/dsu.h + hash: 8cf5dde6a110986dc9622cc3badd8b5dddefe3c8edee7d587308043a518af07d +- file: ../src/packs/ATSAMC21J18A_DFP/component/eic.h + hash: 10d9c2dcf2d257b13f1e03d1f6fc3a1de4773d59fa51ce442d0dc87bf692a70b +- file: ../src/packs/ATSAMC21J18A_DFP/component/evsys.h + hash: 31524ca0584c9bc0666c320e37cdfe2d195ad55d2f4026738360e77beb2c22f0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/freqm.h + hash: 38c404513f1615e10fb0d5bb7cfb60a68aca145bc83e892685abf14bcd7f4704 +- file: ../src/packs/ATSAMC21J18A_DFP/component/fuses.h + hash: 7d2605026995dabe18daace7f46e8721184fd78b612ec867099d1b02d94a4485 +- file: ../src/packs/ATSAMC21J18A_DFP/component/gclk.h + hash: 5f4ab08d002ca6b5e214a945ddd8fe81cfb9491d5911df33f04ca0069fd474f7 +- file: ../src/packs/ATSAMC21J18A_DFP/component/hmatrixb.h + hash: ab8986d64e0f6e7507e943805a6efc9ff3882e7a137a919b30dbb5e2be448f88 +- file: ../src/packs/ATSAMC21J18A_DFP/component/mclk.h + hash: df1d30fcf7aa067e61c6c6c7763e752e57e8b8926a9106882600ea15aad988ea +- file: ../src/packs/ATSAMC21J18A_DFP/component/mtb.h + hash: 6836d7b1a525ac65a6f1541133e755a21724516f55580b77c2ec4adfaa5f1a34 +- file: ../src/packs/ATSAMC21J18A_DFP/component/nvmctrl.h + hash: bf92be4473d6ed8377e485d7c6d8bc458334ec9a58e0fe7a213a40227b7fed80 +- file: ../src/packs/ATSAMC21J18A_DFP/component/osc32kctrl.h + hash: 54698c9c67fb890f8ea2f03dc0b0aa245c1e4fee14fe8002f7c6af9964c31ef3 +- file: ../src/packs/ATSAMC21J18A_DFP/component/oscctrl.h + hash: 99132d41fada0546495b7ceee25fae8259f4d0db4986a354a300ff86703d8b84 +- file: ../src/packs/ATSAMC21J18A_DFP/component/pac.h + hash: 75028e2e4a1670401b71397a1a6012011dd9d2bbc2721116e6294f8e76d1ed15 +- file: ../src/packs/ATSAMC21J18A_DFP/component/pm.h + hash: 9dde14b19423791c50e5c317b67b5c49e0befa12d947eea2c8c45e3398c398bd +- file: ../src/packs/ATSAMC21J18A_DFP/component/port.h + hash: 01737ce08be6b8a7f4f2c12bb535952ac0f824289159c03e337279d57cbd6d48 +- file: ../src/packs/ATSAMC21J18A_DFP/component/ptc.h + hash: 395a8341491f808fdae9d42817c3b4199386e8879722e0029ed792e089d3e727 +- file: ../src/packs/ATSAMC21J18A_DFP/component/rstc.h + hash: a66c3da8443c9b304664e11d6c69fe881459f22dbea770e38271e87e31fead7a +- file: ../src/packs/ATSAMC21J18A_DFP/component/rtc.h + hash: 1b8f8def088a7507e62c82281d4a6b3890f2cb32c6aae1b15ba2070ee384e70d +- file: ../src/packs/ATSAMC21J18A_DFP/component/sdadc.h + hash: ca3a9fab07d72b420b54486f0399f32bd954f3bcbe957b298a01fd73085de877 +- file: ../src/packs/ATSAMC21J18A_DFP/component/sercom.h + hash: cde3c9cce2d5b9937ad1a3c43d155694654785c55ff7c1f365cbc77666b69d0e +- file: ../src/packs/ATSAMC21J18A_DFP/component/supc.h + hash: d4cc7a715fbc23834cf9749c4d12295df6a5c9fcc2212be9b5cd224db657d2cb +- file: ../src/packs/ATSAMC21J18A_DFP/component/tc.h + hash: b2007af7212367dea3006c0fbb83da05e47201af81711ebb1284aa96b980e6c0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/tcc.h + hash: 5b473343ac6fa6cef135fdef2298cb05733e64588be1b46680e201e29a8beca0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/tsens.h + hash: dfca5719ba8e1e3d1e1c6b662602f7b8f5d65d43e04671d0241dc5dc4c8761e0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/wdt.h + hash: fa4d3defc5736ec0c753d5a49713f717e5254f4da5cf6118e8b739522f7ac5e7 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/ac.h + hash: 62793feaaa1067011e3023f96630cb76e94378c88e9306df3163cb3304410f22 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/adc0.h + hash: 3c173f1d5185d3c9476a96fa024e13292fef92ef0241504e017d99f18a46061e +- file: ../src/packs/ATSAMC21J18A_DFP/instance/adc1.h + hash: d9ffea72619d13d48be17b27bd0e99257799d716263a94de19853f56fb5b8aa6 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/can0.h + hash: b0d5b3cdf228f37930be21a37f588ae575f22bbd96726c88d544017587bae5e9 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/can1.h + hash: 197d3f6fefd4a42bdc4fff4e4fe4276a3f54e96b2f388779c049f4cf48933ae1 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/ccl.h + hash: 6ac447f4ee6ce0334f7577abe5c3a55c5b4ce6eb903c934ad9344260240df635 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/dac.h + hash: 73d6d793dba5a68165453e9d16bff9286f7f14fc56deb1f339a28874f2d3a273 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/divas.h + hash: 09a5d9ff42f1aaafef2e3ed611878a4bbe446138e875fd174c926e054ad8ced8 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/dmac.h + hash: d0f0c9e6b06f974dc2fc3e6c327ad825e6baf4c8104eb4bd00c6482ebffc88d4 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/dsu.h + hash: ea2ba1caa093d27825e012f4949aa8d89bf489aff4bf04d893e425b5cb5092ae +- file: ../src/packs/ATSAMC21J18A_DFP/instance/eic.h + hash: 27a31e65a37a33848d7edce235cfdf4bbd1e985694cc099487a7684d8fbca2d4 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/evsys.h + hash: 3b9594a298307c6fabd944bf6acd890692fe1eb8d7266d71de17e7387c19c74f +- file: ../src/packs/ATSAMC21J18A_DFP/instance/freqm.h + hash: 961aa1416eec5d2f3a93cd64792ec7055f8b00542821649c475b972b640364d7 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/fuses.h + hash: ba80c7f480244dee44906821d457a1c4e21522071095da87a4f1877ece6bcf6d +- file: ../src/packs/ATSAMC21J18A_DFP/instance/gclk.h + hash: a1a9f3656d879a750280245cecb1cb3c084ade2685cecbb19677a260d66fece5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/hmatrixhs.h + hash: 70305a77185753d34672bc82d403b9463351b422880e1472254555456612e1c5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/mclk.h + hash: c8364d869bac94fbe99e29bc50a40962d8ea30f106c0ca71c0a207bec409f738 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/mtb.h + hash: e8abf874930994235fafc0c19e3f3af454ec626a8890f0c98577fe0016075497 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/nvmctrl.h + hash: b5d30ac44fce76d81ac1b96e1254388af4f2b62b503b69f1a0f64cf65e74977c +- file: ../src/packs/ATSAMC21J18A_DFP/instance/osc32kctrl.h + hash: 7927c74509e1d2b606593de0e3fa810a3baec7f77dc55f848feeb4fd40d2ce71 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/oscctrl.h + hash: 92cdf00281fd42b618d9343d212fdf729731a738a39c9cc019fcdf3aef884964 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/pac.h + hash: 2defd48c2c35bafad2f6d7912b5d6192813d2b0fd9b902c6b3770a3beb6a49c6 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/pm.h + hash: e509da951ad2b2a360967a27a6e130065ad0e7325987f846859fcf1c329018f5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/port.h + hash: 759fe53a842c0bc873798da32e99a92ab0139dcfb3fa6e522b82123db96f4c67 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/ptc.h + hash: 1c2fad0cc9faa280bcd539d8fdafbb3ac41d72596d96ecbb59c030568aad5dfd +- file: ../src/packs/ATSAMC21J18A_DFP/instance/rstc.h + hash: 2741d2c342b77550eb9f3f058b723552f2f8db0c13b11c4f127ec5bfbec19c6f +- file: ../src/packs/ATSAMC21J18A_DFP/instance/rtc.h + hash: 0e0c21a6c3045665a163e7b5bebeb960a372ae925b2db1321de1ae276beb23dd +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sdadc.h + hash: 18a03bc6bf1a127c9e785f1520554e99daaaaa15d3078b8181e477316681ede8 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom0.h + hash: e7414434ab9e46e8aa6668d587af76544df30db74f12eee2b124b6b93299989d +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom1.h + hash: d5cc94e270e48e59925acb90b5bbe8bbc6fa62d4ddf8b2c214b8bfb6c8a03920 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom2.h + hash: 31472109d5d3b3c2d2a20ed8a2bb2d009b0eb3ca65cd45c3ba6d5745d47d4b60 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom3.h + hash: 2c77d8f3131ca34a22de0d26c5c13fbe716607a61b10636bfbad56b0558a3c11 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom4.h + hash: 9ab2b43df3c30cffab9491c9f3900951456a83adc2f61603599799fc503208e1 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom5.h + hash: 6e7988bf9dfc9e02361b183d2c02b97feb2d16631c254bd4f6f8f5d55e57c4c5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/supc.h + hash: 067c041bb4218d55e12dffcc255951d5389f8971bb61ccab9d387f8d7810d94e +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc0.h + hash: f82a3a62fdb5c1b56dcd752d1dbf66e2b4cc562696cd8bb22e82188f84e9d4af +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc1.h + hash: d38eb0a461fe865155bc4b13d7b8fb21bac08f969aaaa39dec3bcf070c9d848a +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc2.h + hash: ca0944228b2b637f22c90a7c9a5060b68b309f81c0eb4e6db3fbe00661169f4d +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc3.h + hash: 24027477db3c0f7cc7806688fa3c18a7567c80cbb7ffe024cf1e8076997e689e +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc4.h + hash: 3cc30104024853d10ee578e046d1cd5868f192beb545060c62eecae37d785dd3 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tcc0.h + hash: a6be43a643719c88c01e762270bf24cdf399febd11c6e2e62d3b1f825e373b72 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tcc1.h + hash: a3d5b071198abb54ebdd2808b3c22b69a9c1f49975e9e73c6742788eddab7b8f +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tcc2.h + hash: d22e7f06b755c5d71fe924fcf9a18da26869884c7563dbb24ce85500a78b3dfb +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tsens.h + hash: e6b16c504a31e922cd9cb8674886e9d797cfd8359ea0f387c310f79b7d737778 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/wdt.h + hash: 6a3d811efd0f749d1864ad9cf1777c35ba575b0d13ebfbad9a268a04a47e1e90 +- file: ../src/packs/ATSAMC21J18A_DFP/pio/samc21j18a.h + hash: d4920a5074f62dff1f8213991c83b2689c6ad59364d094e0997990dfb4fd4789 +- file: ../src/packs/ATSAMC21J18A_DFP/samc21j18a.h + hash: 35c3b0e29e6a92608192900edd4bc31d7b605c58d752fae0952040e9e805e746 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cachel1_armv7.h + hash: 6cdb5b324f2fd1bb5b2f47298ba6e6777e735d7cad3bb8d942cd36e2c6e65328 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armcc.h + hash: d074534d7106cec83474b3b0a897bd2553e1a8895ecbd54f4f4fb25928066eee +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang.h + hash: 11b39b96ddc1125124762b3423a77b90dd40ea5b4582a3513830245046b24311 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang_ltm.h + hash: 8621969ea669a1b230ff2125a760ef66d575c48cb45e9e457f768909abcbda46 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h + hash: 869640702d811c4c63abb52206715c891a93fd03be954df5ad40d378355af3d6 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h + hash: 3d4e265d0aa42f888385ccf073666e6ebb5ec9f834760b9da27c474e177f708d +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_iccarm.h + hash: f28119adbc81fb0e3c957c9aebe8fb423ad93634e76ead3caa2b0818d2e123ae +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h + hash: 8cda7ac3ff6f0eb5e83c4fe613dd195151b24da54167f5c3c007e599a03f1edc +- file: ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h + hash: a19e24c136145b4c72630d0ab7c83a7aef010f3ba165e34c56a05057a2d9fed5 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/mpu_armv7.h + hash: de1b5eb9ed566527b66dc06f4ecb6a43ab6800f7dac47e87c9cb42984dca41bb diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/can0.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/can0.yml new file mode 100644 index 00000000..523c6e8f --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/can0.yml @@ -0,0 +1,311 @@ +configVersion: 1.0.0 +componentName: can0 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: can0 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: can0 + x: '475' + y: '116' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + AUTO_DATA_BIT_TIMING_CALCULATION: + attributes: + id: AUTO_DATA_BIT_TIMING_CALCULATION + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + AUTO_NOMINAL_BIT_TIMING_CALCULATION: + attributes: + id: AUTO_NOMINAL_BIT_TIMING_CALCULATION + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + CALCULATED_DATA_BITRATE: + attributes: + id: CALCULATED_DATA_BITRATE + children: + - children: + - attributes: + id: can0 + value: '2000' + type: Dynamic + type: Values + type: Integer + CALCULATED_DATA_ERRORRATE: + attributes: + id: CALCULATED_DATA_ERRORRATE + children: + - children: + - attributes: + id: can0 + value: '0.000' + type: Dynamic + type: Values + type: String + CALCULATED_NOMINAL_BITRATE: + attributes: + id: CALCULATED_NOMINAL_BITRATE + children: + - children: + - attributes: + id: can0 + value: '500' + type: Dynamic + type: Values + type: Integer + CALCULATED_NOMINAL_ERRORRATE: + attributes: + id: CALCULATED_NOMINAL_ERRORRATE + children: + - children: + - attributes: + id: can0 + value: '0.000' + type: Dynamic + type: Values + type: String + CAN_OPMODE: + attributes: + id: CAN_OPMODE + children: + - children: + - attributes: + value: CAN FD + type: User + type: Values + type: Combo + DATA_BITRATE: + attributes: + id: DATA_BITRATE + children: + - children: + - attributes: + value: '2000' + type: User + type: Values + type: Integer + DATA_SAMPLE_POINT: + attributes: + id: DATA_SAMPLE_POINT + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '87.5' + type: Dynamic + type: Values + type: Float + DATA_TIME_QUANTA_PERIOD: + attributes: + id: DATA_TIME_QUANTA_PERIOD + children: + - children: + - attributes: + id: can0 + value: '62.500' + type: Dynamic + type: Values + type: String + DBTP_DBRP: + attributes: + id: DBTP_DBRP + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '2' + type: Dynamic + type: Values + type: Integer + DBTP_DSJW: + attributes: + id: DBTP_DSJW + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + DBTP_DTSEG1: + attributes: + id: DBTP_DTSEG1 + children: + - children: + - attributes: + id: can0 + value: '6' + type: Dynamic + type: Values + type: Integer + DBTP_DTSEG2: + attributes: + id: DBTP_DTSEG2 + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + DBTP_TOTAL_TIME_QUANTA: + attributes: + id: DBTP_TOTAL_TIME_QUANTA + children: + - children: + - attributes: + id: can0 + value: '8' + type: Dynamic + type: Values + type: Integer + INTERRUPT_MODE: + attributes: + id: INTERRUPT_MODE + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + NBTP_NBRP: + attributes: + id: NBTP_NBRP + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '2' + type: Dynamic + type: Values + type: Integer + NBTP_NSJW: + attributes: + id: NBTP_NSJW + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + NBTP_NTSEG1: + attributes: + id: NBTP_NTSEG1 + children: + - children: + - attributes: + id: can0 + value: '30' + type: Dynamic + type: Values + type: Integer + NBTP_NTSEG2: + attributes: + id: NBTP_NTSEG2 + children: + - children: + - attributes: + id: can0 + value: '1' + type: Dynamic + type: Values + type: Integer + NBTP_TOTAL_TIME_QUANTA: + attributes: + id: NBTP_TOTAL_TIME_QUANTA + children: + - children: + - attributes: + id: can0 + value: '32' + type: Dynamic + type: Values + type: Integer + NOMINAL_SAMPLE_POINT: + attributes: + id: NOMINAL_SAMPLE_POINT + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: can0 + value: '96.875' + type: Dynamic + type: Values + type: Float + NOMINAL_TIME_QUANTA_PERIOD: + attributes: + id: NOMINAL_TIME_QUANTA_PERIOD + children: + - children: + - attributes: + id: can0 + value: '62.500' + type: Dynamic + type: Values + type: String + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/cmsis.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/cmsis.yml new file mode 100644 index 00000000..ac11fff8 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/cmsis.yml @@ -0,0 +1,35 @@ +configVersion: 1.0.0 +componentName: cmsis +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: cmsis + type: module + version: '' +- dependencyPackage: '' + name: CMSIS_5 + type: package + version: 5.9.0 +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: cmsis + x: '330' + y: '60' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: {} + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/core.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/core.yml new file mode 100644 index 00000000..4237468d --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/core.yml @@ -0,0 +1,2798 @@ +configVersion: 1.0.0 +componentName: core +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: core + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: core + x: '340' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + CAN0_CLOCK_ENABLE: + attributes: + id: CAN0_CLOCK_ENABLE + children: + - children: + - attributes: + id: can0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + CAN0_CLOCK_FREQUENCY: + attributes: + id: CAN0_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + CAN0_INTERRUPT_ENABLE: + attributes: + id: CAN0_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: can0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + CAN0_INTERRUPT_ENABLE_UPDATE: + attributes: + id: CAN0_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + CAN0_INTERRUPT_HANDLER: + attributes: + id: CAN0_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: can0 + value: CAN0_InterruptHandler + type: Dynamic + type: Values + type: String + CAN0_INTERRUPT_HANDLER_LOCK: + attributes: + id: CAN0_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: can0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + CoreMainFileName: + attributes: + id: CoreMainFileName + children: + - children: + - attributes: + value: main + type: User + type: Values + type: String + EIC_CLOCK_ENABLE: + attributes: + id: EIC_CLOCK_ENABLE + children: + - children: + - attributes: + id: eic + value: 'true' + type: Dynamic + type: Values + type: Boolean + EIC_CLOCK_FREQUENCY: + attributes: + id: EIC_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + EIC_INTERRUPT_ENABLE: + attributes: + id: EIC_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: eic + value: 'true' + type: Dynamic + type: Values + type: Boolean + EIC_INTERRUPT_ENABLE_UPDATE: + attributes: + id: EIC_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + EIC_INTERRUPT_HANDLER: + attributes: + id: EIC_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: eic + value: EIC_InterruptHandler + type: Dynamic + type: Values + type: String + EIC_INTERRUPT_HANDLER_LOCK: + attributes: + id: EIC_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: eic + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_19_CHEN: + attributes: + id: GCLK_ID_19_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_19_FREQ: + attributes: + id: GCLK_ID_19_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_20_CHEN: + attributes: + id: GCLK_ID_20_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_20_FREQ: + attributes: + id: GCLK_ID_20_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_21_CHEN: + attributes: + id: GCLK_ID_21_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_21_FREQ: + attributes: + id: GCLK_ID_21_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_22_CHEN: + attributes: + id: GCLK_ID_22_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_22_FREQ: + attributes: + id: GCLK_ID_22_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_23_CHEN: + attributes: + id: GCLK_ID_23_CHEN + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_23_FREQ: + attributes: + id: GCLK_ID_23_FREQ + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + GCLK_ID_25_CHEN: + attributes: + id: GCLK_ID_25_CHEN + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_25_FREQ: + attributes: + id: GCLK_ID_25_FREQ + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + GCLK_ID_26_CHEN: + attributes: + id: GCLK_ID_26_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_26_FREQ: + attributes: + id: GCLK_ID_26_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_2_CHEN: + attributes: + id: GCLK_ID_2_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_2_FREQ: + attributes: + id: GCLK_ID_2_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + GCLK_ID_31_CHEN: + attributes: + id: GCLK_ID_31_CHEN + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + GCLK_ID_31_FREQ: + attributes: + id: GCLK_ID_31_FREQ + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + MCLK_AHB_INITIAL_VALUE: + attributes: + id: MCLK_AHB_INITIAL_VALUE + children: + - children: + - attributes: + id: core + value: '0x1dff' + type: Dynamic + type: Values + type: String + MCLK_APBA_INITIAL_VALUE: + attributes: + id: MCLK_APBA_INITIAL_VALUE + children: + - children: + - attributes: + id: core + value: '0xfff' + type: Dynamic + type: Values + type: String + MCLK_APBC_INITIAL_VALUE: + attributes: + id: MCLK_APBC_INITIAL_VALUE + children: + - children: + - attributes: + id: core + value: '0xc01e' + type: Dynamic + type: Values + type: String + NVIC_10_0_ENABLE: + attributes: + id: NVIC_10_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_10_0_HANDLER: + attributes: + id: NVIC_10_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM1_USART_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_10_0_HANDLER_LOCK: + attributes: + id: NVIC_10_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_11_0_ENABLE: + attributes: + id: NVIC_11_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_11_0_HANDLER: + attributes: + id: NVIC_11_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM2_Handler + type: Dynamic + type: Values + type: String + NVIC_11_0_HANDLER_LOCK: + attributes: + id: NVIC_11_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_12_0_ENABLE: + attributes: + id: NVIC_12_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_12_0_HANDLER: + attributes: + id: NVIC_12_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM3_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_12_0_HANDLER_LOCK: + attributes: + id: NVIC_12_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_13_0_ENABLE: + attributes: + id: NVIC_13_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_13_0_HANDLER: + attributes: + id: NVIC_13_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM4_Handler + type: Dynamic + type: Values + type: String + NVIC_13_0_HANDLER_LOCK: + attributes: + id: NVIC_13_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_14_0_ENABLE: + attributes: + id: NVIC_14_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_14_0_HANDLER: + attributes: + id: NVIC_14_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM5_Handler + type: Dynamic + type: Values + type: String + NVIC_14_0_HANDLER_LOCK: + attributes: + id: NVIC_14_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_15_0_ENABLE: + attributes: + id: NVIC_15_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_15_0_HANDLER: + attributes: + id: NVIC_15_0_HANDLER + children: + - children: + - attributes: + id: core + value: CAN0_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_15_0_HANDLER_LOCK: + attributes: + id: NVIC_15_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_23_0_ENABLE: + attributes: + id: NVIC_23_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_23_0_HANDLER: + attributes: + id: NVIC_23_0_HANDLER + children: + - children: + - attributes: + id: core + value: TC3_TimerInterruptHandler + type: Dynamic + type: Values + type: String + NVIC_23_0_HANDLER_LOCK: + attributes: + id: NVIC_23_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_3_0_ENABLE: + attributes: + id: NVIC_3_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_3_0_HANDLER: + attributes: + id: NVIC_3_0_HANDLER + children: + - children: + - attributes: + id: core + value: EIC_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_3_0_HANDLER_LOCK: + attributes: + id: NVIC_3_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_9_0_ENABLE: + attributes: + id: NVIC_9_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_9_0_HANDLER: + attributes: + id: NVIC_9_0_HANDLER + children: + - children: + - attributes: + id: core + value: SERCOM0_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + NVIC_9_0_HANDLER_LOCK: + attributes: + id: NVIC_9_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_15_FUNCTION_TYPE: + attributes: + id: PIN_15_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM0_PAD2 + type: User + type: Values + type: String + PIN_15_MODE: + attributes: + id: PIN_15_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_15_PERIPHERAL_FUNCTION: + attributes: + id: PIN_15_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_16_FUNCTION_TYPE: + attributes: + id: PIN_16_FUNCTION_TYPE + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_16_MODE: + attributes: + id: PIN_16_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_16_PERIPHERAL_FUNCTION: + attributes: + id: PIN_16_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_17_FUNCTION_TYPE: + attributes: + id: PIN_17_FUNCTION_TYPE + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_17_MODE: + attributes: + id: PIN_17_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_17_PERIPHERAL_FUNCTION: + attributes: + id: PIN_17_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_18_FUNCTION_TYPE: + attributes: + id: PIN_18_FUNCTION_TYPE + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_18_MODE: + attributes: + id: PIN_18_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_18_PERIPHERAL_FUNCTION: + attributes: + id: PIN_18_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: GPIO + type: User + type: Values + type: String + PIN_23_PERIPHERAL_FUNCTION: + attributes: + id: PIN_23_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_24_PERIPHERAL_FUNCTION: + attributes: + id: PIN_24_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_29_PERIPHERAL_FUNCTION: + attributes: + id: PIN_29_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_30_PERIPHERAL_FUNCTION: + attributes: + id: PIN_30_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_35_FUNCTION_TYPE: + attributes: + id: PIN_35_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM3_PAD0 + type: User + type: Values + type: String + PIN_35_MODE: + attributes: + id: PIN_35_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_35_PERIPHERAL_FUNCTION: + attributes: + id: PIN_35_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_36_FUNCTION_TYPE: + attributes: + id: PIN_36_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM3_PAD1 + type: User + type: Values + type: String + PIN_36_MODE: + attributes: + id: PIN_36_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_36_PERIPHERAL_FUNCTION: + attributes: + id: PIN_36_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_37_PERIPHERAL_FUNCTION: + attributes: + id: PIN_37_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: A + type: User + type: Values + type: String + PIN_38_PERIPHERAL_FUNCTION: + attributes: + id: PIN_38_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: D + type: User + type: Values + type: String + PIN_43_PERIPHERAL_FUNCTION: + attributes: + id: PIN_43_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_44_PERIPHERAL_FUNCTION: + attributes: + id: PIN_44_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_45_FUNCTION_TYPE: + attributes: + id: PIN_45_FUNCTION_TYPE + children: + - children: + - attributes: + value: CAN0_TX + type: User + type: Values + type: String + PIN_45_MODE: + attributes: + id: PIN_45_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_45_PERIPHERAL_FUNCTION: + attributes: + id: PIN_45_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: G + type: User + type: Values + type: String + PIN_46_FUNCTION_TYPE: + attributes: + id: PIN_46_FUNCTION_TYPE + children: + - children: + - attributes: + value: CAN0_RX + type: User + type: Values + type: String + PIN_46_MODE: + attributes: + id: PIN_46_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_46_PERIPHERAL_FUNCTION: + attributes: + id: PIN_46_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: G + type: User + type: Values + type: String + PIN_49_PERIPHERAL_FUNCTION: + attributes: + id: PIN_49_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_50_PERIPHERAL_FUNCTION: + attributes: + id: PIN_50_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_61_PERIPHERAL_FUNCTION: + attributes: + id: PIN_61_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_62_PERIPHERAL_FUNCTION: + attributes: + id: PIN_62_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_63_PERIPHERAL_FUNCTION: + attributes: + id: PIN_63_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_64_PERIPHERAL_FUNCTION: + attributes: + id: PIN_64_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PORT_GROUP_0_DIR: + attributes: + id: PORT_GROUP_0_DIR + children: + - children: + - attributes: + id: core + value: '0x380' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_OUT: + attributes: + id: PORT_GROUP_0_OUT + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_12: + attributes: + id: PORT_GROUP_0_PAD_12 + children: + - children: + - attributes: + id: core + value: PA12 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_13: + attributes: + id: PORT_GROUP_0_PAD_13 + children: + - children: + - attributes: + id: core + value: PA13 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_16: + attributes: + id: PORT_GROUP_0_PAD_16 + children: + - children: + - attributes: + id: core + value: PA16 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_17: + attributes: + id: PORT_GROUP_0_PAD_17 + children: + - children: + - attributes: + id: core + value: PA17 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_18: + attributes: + id: PORT_GROUP_0_PAD_18 + children: + - children: + - attributes: + id: core + value: PA18 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_19: + attributes: + id: PORT_GROUP_0_PAD_19 + children: + - children: + - attributes: + id: core + value: PA19 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_22: + attributes: + id: PORT_GROUP_0_PAD_22 + children: + - children: + - attributes: + id: core + value: PA22 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_23: + attributes: + id: PORT_GROUP_0_PAD_23 + children: + - children: + - attributes: + id: core + value: PA23 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_24: + attributes: + id: PORT_GROUP_0_PAD_24 + children: + - children: + - attributes: + id: core + value: PA24 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_25: + attributes: + id: PORT_GROUP_0_PAD_25 + children: + - children: + - attributes: + id: core + value: PA25 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_6: + attributes: + id: PORT_GROUP_0_PAD_6 + children: + - children: + - attributes: + id: core + value: PA06 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_7: + attributes: + id: PORT_GROUP_0_PAD_7 + children: + - children: + - attributes: + id: core + value: PA07 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_8: + attributes: + id: PORT_GROUP_0_PAD_8 + children: + - children: + - attributes: + id: core + value: PA08 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_9: + attributes: + id: PORT_GROUP_0_PAD_9 + children: + - children: + - attributes: + id: core + value: PA09 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG12: + attributes: + id: PORT_GROUP_0_PINCFG12 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG13: + attributes: + id: PORT_GROUP_0_PINCFG13 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG16: + attributes: + id: PORT_GROUP_0_PINCFG16 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG17: + attributes: + id: PORT_GROUP_0_PINCFG17 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG18: + attributes: + id: PORT_GROUP_0_PINCFG18 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG19: + attributes: + id: PORT_GROUP_0_PINCFG19 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG22: + attributes: + id: PORT_GROUP_0_PINCFG22 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG23: + attributes: + id: PORT_GROUP_0_PINCFG23 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG24: + attributes: + id: PORT_GROUP_0_PINCFG24 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG25: + attributes: + id: PORT_GROUP_0_PINCFG25 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG6: + attributes: + id: PORT_GROUP_0_PINCFG6 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG7: + attributes: + id: PORT_GROUP_0_PINCFG7 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG8: + attributes: + id: PORT_GROUP_0_PINCFG8 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG9: + attributes: + id: PORT_GROUP_0_PINCFG9 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_12_USED: + attributes: + id: PORT_GROUP_0_PIN_12_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_13_USED: + attributes: + id: PORT_GROUP_0_PIN_13_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_16_USED: + attributes: + id: PORT_GROUP_0_PIN_16_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_17_USED: + attributes: + id: PORT_GROUP_0_PIN_17_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_18_USED: + attributes: + id: PORT_GROUP_0_PIN_18_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_19_USED: + attributes: + id: PORT_GROUP_0_PIN_19_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_22_USED: + attributes: + id: PORT_GROUP_0_PIN_22_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_23_USED: + attributes: + id: PORT_GROUP_0_PIN_23_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_24_USED: + attributes: + id: PORT_GROUP_0_PIN_24_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_25_USED: + attributes: + id: PORT_GROUP_0_PIN_25_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_6_USED: + attributes: + id: PORT_GROUP_0_PIN_6_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_7_USED: + attributes: + id: PORT_GROUP_0_PIN_7_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_8_USED: + attributes: + id: PORT_GROUP_0_PIN_8_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PIN_9_USED: + attributes: + id: PORT_GROUP_0_PIN_9_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_0_PMUX11: + attributes: + id: PORT_GROUP_0_PMUX11 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX12: + attributes: + id: PORT_GROUP_0_PMUX12 + children: + - children: + - attributes: + id: core + value: '0x66' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX3: + attributes: + id: PORT_GROUP_0_PMUX3 + children: + - children: + - attributes: + id: core + value: '0x3' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX4: + attributes: + id: PORT_GROUP_0_PMUX4 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX6: + attributes: + id: PORT_GROUP_0_PMUX6 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX8: + attributes: + id: PORT_GROUP_0_PMUX8 + children: + - children: + - attributes: + id: core + value: '0x33' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PMUX9: + attributes: + id: PORT_GROUP_0_PMUX9 + children: + - children: + - attributes: + id: core + value: '0x30' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_DIR: + attributes: + id: PORT_GROUP_1_DIR + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_OUT: + attributes: + id: PORT_GROUP_1_OUT + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_0: + attributes: + id: PORT_GROUP_1_PAD_0 + children: + - children: + - attributes: + id: core + value: PB00 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_1: + attributes: + id: PORT_GROUP_1_PAD_1 + children: + - children: + - attributes: + id: core + value: PB01 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_10: + attributes: + id: PORT_GROUP_1_PAD_10 + children: + - children: + - attributes: + id: core + value: PB10 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_11: + attributes: + id: PORT_GROUP_1_PAD_11 + children: + - children: + - attributes: + id: core + value: PB11 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_2: + attributes: + id: PORT_GROUP_1_PAD_2 + children: + - children: + - attributes: + id: core + value: PB02 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_22: + attributes: + id: PORT_GROUP_1_PAD_22 + children: + - children: + - attributes: + id: core + value: PB22 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_23: + attributes: + id: PORT_GROUP_1_PAD_23 + children: + - children: + - attributes: + id: core + value: PB23 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PAD_3: + attributes: + id: PORT_GROUP_1_PAD_3 + children: + - children: + - attributes: + id: core + value: PB03 + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG0: + attributes: + id: PORT_GROUP_1_PINCFG0 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG1: + attributes: + id: PORT_GROUP_1_PINCFG1 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG10: + attributes: + id: PORT_GROUP_1_PINCFG10 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG11: + attributes: + id: PORT_GROUP_1_PINCFG11 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG2: + attributes: + id: PORT_GROUP_1_PINCFG2 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG22: + attributes: + id: PORT_GROUP_1_PINCFG22 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG23: + attributes: + id: PORT_GROUP_1_PINCFG23 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PINCFG3: + attributes: + id: PORT_GROUP_1_PINCFG3 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PIN_0_USED: + attributes: + id: PORT_GROUP_1_PIN_0_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_10_USED: + attributes: + id: PORT_GROUP_1_PIN_10_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_11_USED: + attributes: + id: PORT_GROUP_1_PIN_11_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_1_USED: + attributes: + id: PORT_GROUP_1_PIN_1_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_22_USED: + attributes: + id: PORT_GROUP_1_PIN_22_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_23_USED: + attributes: + id: PORT_GROUP_1_PIN_23_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_2_USED: + attributes: + id: PORT_GROUP_1_PIN_2_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PIN_3_USED: + attributes: + id: PORT_GROUP_1_PIN_3_USED + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + PORT_GROUP_1_PMUX0: + attributes: + id: PORT_GROUP_1_PMUX0 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PMUX1: + attributes: + id: PORT_GROUP_1_PMUX1 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PMUX11: + attributes: + id: PORT_GROUP_1_PMUX11 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_1_PMUX5: + attributes: + id: PORT_GROUP_1_PMUX5 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + SERCOM0_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM0_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM0_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM0_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM0_INTERRUPT_ENABLE: + attributes: + id: SERCOM0_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM0_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM0_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM0_INTERRUPT_HANDLER: + attributes: + id: SERCOM0_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom0 + value: SERCOM0_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + SERCOM0_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM0_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM1_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM1_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM1_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM1_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM1_INTERRUPT_ENABLE: + attributes: + id: SERCOM1_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM1_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM1_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM1_INTERRUPT_HANDLER: + attributes: + id: SERCOM1_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom1 + value: SERCOM1_USART_InterruptHandler + type: Dynamic + type: Values + type: String + SERCOM1_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM1_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM2_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM2_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM2_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM2_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM2_INTERRUPT_ENABLE: + attributes: + id: SERCOM2_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM2_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM2_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM2_INTERRUPT_HANDLER: + attributes: + id: SERCOM2_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom2 + value: SERCOM2_Handler + type: Dynamic + type: Values + type: String + SERCOM2_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM2_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM3_CORE_CLOCK_ENABLE: + attributes: + id: SERCOM3_CORE_CLOCK_ENABLE + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM3_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM3_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + SERCOM3_INTERRUPT_ENABLE: + attributes: + id: SERCOM3_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM3_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM3_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM3_INTERRUPT_HANDLER: + attributes: + id: SERCOM3_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: sercom3 + value: SERCOM3_SPI_InterruptHandler + type: Dynamic + type: Values + type: String + SERCOM3_INTERRUPT_HANDLER_LOCK: + attributes: + id: SERCOM3_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM4_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM4_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + SERCOM4_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM4_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + SERCOM5_CORE_CLOCK_FREQUENCY: + attributes: + id: SERCOM5_CORE_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '0' + type: Dynamic + type: Values + type: Integer + SERCOM5_INTERRUPT_ENABLE_UPDATE: + attributes: + id: SERCOM5_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC3_CLOCK_ENABLE: + attributes: + id: TC3_CLOCK_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC3_CLOCK_FREQUENCY: + attributes: + id: TC3_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + TC3_INTERRUPT_ENABLE: + attributes: + id: TC3_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: tc3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC3_INTERRUPT_ENABLE_UPDATE: + attributes: + id: TC3_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + TC3_INTERRUPT_HANDLER: + attributes: + id: TC3_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: tc3 + value: TC3_TimerInterruptHandler + type: Dynamic + type: Values + type: String + TC3_INTERRUPT_HANDLER_LOCK: + attributes: + id: TC3_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: tc3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_CLOCK_FREQUENCY: + attributes: + id: TC2_CLOCK_FREQUENCY + children: + - children: + - attributes: + id: core + value: '48000000' + type: Dynamic + type: Values + type: Integer + TC2_CLOCK_ENABLE: + attributes: + id: TC2_CLOCK_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_INTERRUPT_ENABLE_UPDATE: + attributes: + id: TC2_INTERRUPT_ENABLE_UPDATE + children: + - children: + - attributes: + id: core + value: 'false' + type: Dynamic + type: Values + type: Boolean + NVIC_22_0_ENABLE: + attributes: + id: NVIC_22_0_ENABLE + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_INTERRUPT_ENABLE: + attributes: + id: TC2_INTERRUPT_ENABLE + children: + - children: + - attributes: + id: tc2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + NVIC_22_0_HANDLER: + attributes: + id: NVIC_22_0_HANDLER + children: + - children: + - attributes: + id: core + value: TC2_TimerInterruptHandler + type: Dynamic + type: Values + type: String + TC2_INTERRUPT_HANDLER: + attributes: + id: TC2_INTERRUPT_HANDLER + children: + - children: + - attributes: + id: tc2 + value: TC2_TimerInterruptHandler + type: Dynamic + type: Values + type: String + NVIC_22_0_HANDLER_LOCK: + attributes: + id: NVIC_22_0_HANDLER_LOCK + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + TC2_INTERRUPT_HANDLER_LOCK: + attributes: + id: TC2_INTERRUPT_HANDLER_LOCK + children: + - children: + - attributes: + id: tc2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_53_MODE: + attributes: + id: PIN_53_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_53_FUNCTION_TYPE: + attributes: + id: PIN_53_FUNCTION_TYPE + children: + - children: + - attributes: + value: EIC_EXTINT8 + type: User + type: Values + type: String + PORT_GROUP_0_PMUX14: + attributes: + id: PORT_GROUP_0_PMUX14 + children: + - children: + - attributes: + id: core + value: '0x0' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_28: + attributes: + id: PORT_GROUP_0_PAD_28 + children: + - children: + - attributes: + id: core + value: PA28 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG28: + attributes: + id: PORT_GROUP_0_PINCFG28 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_28_USED: + attributes: + id: PORT_GROUP_0_PIN_28_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_53_PERIPHERAL_FUNCTION: + attributes: + id: PIN_53_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: A + type: User + type: Values + type: String + PIN_37_MODE: + attributes: + id: PIN_37_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_37_FUNCTION_TYPE: + attributes: + id: PIN_37_FUNCTION_TYPE + children: + - children: + - attributes: + value: EIC_EXTINT2 + type: User + type: Values + type: String + PIN_38_MODE: + attributes: + id: PIN_38_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_38_FUNCTION_TYPE: + attributes: + id: PIN_38_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM3_PAD3 + type: User + type: Values + type: String + PIN_16_INEN: + attributes: + id: PIN_16_INEN + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_16_DIR: + attributes: + id: PIN_16_DIR + children: + - children: + - attributes: + value: Out + type: User + type: Values + type: String + PIN_16_FUNCTION_NAME: + attributes: + id: PIN_16_FUNCTION_NAME + children: + - children: + - attributes: + value: GPIO_PA07 + type: User + type: Values + type: String + PIN_17_INEN: + attributes: + id: PIN_17_INEN + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_17_DIR: + attributes: + id: PIN_17_DIR + children: + - children: + - attributes: + value: Out + type: User + type: Values + type: String + PIN_17_FUNCTION_NAME: + attributes: + id: PIN_17_FUNCTION_NAME + children: + - children: + - attributes: + value: GPIO_PA08 + type: User + type: Values + type: String + PIN_18_INEN: + attributes: + id: PIN_18_INEN + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_18_DIR: + attributes: + id: PIN_18_DIR + children: + - children: + - attributes: + value: Out + type: User + type: Values + type: String + PIN_18_FUNCTION_NAME: + attributes: + id: PIN_18_FUNCTION_NAME + children: + - children: + - attributes: + value: GPIO_PA09 + type: User + type: Values + type: String + PIN_32_MODE: + attributes: + id: PIN_32_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_32_FUNCTION_TYPE: + attributes: + id: PIN_32_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM2_PAD3 + type: User + type: Values + type: String + PORT_GROUP_0_PMUX7: + attributes: + id: PORT_GROUP_0_PMUX7 + children: + - children: + - attributes: + id: core + value: '0x22' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PAD_15: + attributes: + id: PORT_GROUP_0_PAD_15 + children: + - children: + - attributes: + id: core + value: PA15 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG15: + attributes: + id: PORT_GROUP_0_PINCFG15 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_15_USED: + attributes: + id: PORT_GROUP_0_PIN_15_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_32_PERIPHERAL_FUNCTION: + attributes: + id: PIN_32_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: C + type: User + type: Values + type: String + PIN_31_MODE: + attributes: + id: PIN_31_MODE + children: + - children: + - attributes: + value: '' + type: User + type: Values + type: String + PIN_31_FUNCTION_TYPE: + attributes: + id: PIN_31_FUNCTION_TYPE + children: + - children: + - attributes: + value: SERCOM2_PAD2 + type: User + type: Values + type: String + PORT_GROUP_0_PAD_14: + attributes: + id: PORT_GROUP_0_PAD_14 + children: + - children: + - attributes: + id: core + value: PA14 + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PINCFG14: + attributes: + id: PORT_GROUP_0_PINCFG14 + children: + - children: + - attributes: + id: core + value: '0x1' + type: Dynamic + type: Values + type: String + PORT_GROUP_0_PIN_14_USED: + attributes: + id: PORT_GROUP_0_PIN_14_USED + children: + - children: + - attributes: + id: core + value: 'true' + type: Dynamic + type: Values + type: Boolean + PIN_31_PERIPHERAL_FUNCTION: + attributes: + id: PIN_31_PERIPHERAL_FUNCTION + children: + - children: + - attributes: + value: C + type: User + type: Values + type: String + userData: + children: + - attributes: + canvasHeight: '549' + canvasWidth: '612' + type: GraphSettings + - children: + - attributes: + id: profile0 + name: Main + type: Profile + type: PowerProfiles + type: UserData diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/dfp.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/dfp.yml new file mode 100644 index 00000000..dafc60ea --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/dfp.yml @@ -0,0 +1,31 @@ +configVersion: 1.0.0 +componentName: dfp +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: dfp + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: dfp + x: '440' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: {} + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/eic.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/eic.yml new file mode 100644 index 00000000..3e94a995 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/eic.yml @@ -0,0 +1,162 @@ +configVersion: 1.0.0 +componentName: eic +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: eic + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: eic + x: '476' + y: '186' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + EIC_ASYNCH: + attributes: + id: EIC_ASYNCH + children: + - children: + - attributes: + id: eic + value: '0' + type: Dynamic + type: Values + type: Hex + EIC_CHAN_2: + attributes: + id: EIC_CHAN_2 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_CHAN_3: + attributes: + id: EIC_CHAN_3 + children: + - children: + - attributes: + value: 'false' + type: User + type: Values + type: Boolean + EIC_CONFIG_FILTEN_3: + attributes: + id: EIC_CONFIG_FILTEN_3 + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: 'false' + type: User + type: Values + type: Boolean + EIC_CONFIG_SENSE_3: + attributes: + id: EIC_CONFIG_SENSE_3 + children: + - children: + - attributes: + value: '2' + type: User + type: Values + type: KeyValueSet + EIC_EXTINTEO: + attributes: + id: EIC_EXTINTEO + children: + - children: + - attributes: + id: eic + value: '0' + type: Dynamic + type: Values + type: Hex + EIC_INT: + attributes: + id: EIC_INT + children: + - children: + - attributes: + id: eic + value: '260' + type: Dynamic + type: Values + type: Hex + EIC_INT_2: + attributes: + id: EIC_INT_2 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_INT_3: + attributes: + id: EIC_INT_3 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_CHAN_8: + attributes: + id: EIC_CHAN_8 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_INT_8: + attributes: + id: EIC_INT_8 + children: + - children: + - attributes: + value: 'true' + type: User + type: Values + type: Boolean + EIC_CONFIG_SENSE_8: + attributes: + id: EIC_CONFIG_SENSE_8 + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/evsys.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/evsys.yml new file mode 100644 index 00000000..7d5aa3f7 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/evsys.yml @@ -0,0 +1,196 @@ +configVersion: 1.0.0 +componentName: evsys +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: evsys + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: evsys + x: '180' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + EVSYS_CHANNEL_0_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_0_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_10_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_10_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_11_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_11_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_1_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_1_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_2_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_2_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_3_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_3_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_4_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_4_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_5_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_5_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_6_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_6_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_7_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_7_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_8_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_8_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + EVSYS_CHANNEL_9_GENERATOR_ACTIVE: + attributes: + id: EVSYS_CHANNEL_9_GENERATOR_ACTIVE + children: + - children: + - attributes: + id: evsys + value: 'false' + type: Dynamic + type: Values + type: Boolean + GENERATOR_EIC_EXTINT_2_ACTIVE: + attributes: + id: GENERATOR_EIC_EXTINT_2_ACTIVE + children: + - children: + - attributes: + id: eic + value: 'false' + type: Dynamic + type: Values + type: Boolean + GENERATOR_EIC_EXTINT_3_ACTIVE: + attributes: + id: GENERATOR_EIC_EXTINT_3_ACTIVE + children: + - children: + - attributes: + id: eic + value: 'false' + type: Dynamic + type: Values + type: Boolean + GENERATOR_EIC_EXTINT_8_ACTIVE: + attributes: + id: GENERATOR_EIC_EXTINT_8_ACTIVE + children: + - children: + - attributes: + id: eic + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/nvmctrl.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/nvmctrl.yml new file mode 100644 index 00000000..56aaaebf --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/nvmctrl.yml @@ -0,0 +1,31 @@ +configVersion: 1.0.0 +componentName: nvmctrl +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: nvmctrl + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: nvmctrl + x: '20' + y: '20' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: {} + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom0.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom0.yml new file mode 100644 index 00000000..e63ddd37 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom0.yml @@ -0,0 +1,176 @@ +configVersion: 1.0.0 +componentName: sercom0 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom0 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom0 + x: '20' + y: '88' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom0 + value: '232' + type: Dynamic + type: Values + type: Hex + RECEIVE_DATA_REGISTER: + attributes: + id: RECEIVE_DATA_REGISTER + children: + - children: + - attributes: + id: sercom0 + value: '&(SERCOM0_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + SERCOM_MODE: + attributes: + id: SERCOM_MODE + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_BAUD_RATE: + attributes: + id: SPI_BAUD_RATE + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '2400000' + type: User + type: Values + type: Integer + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom0 + value: '9' + type: Dynamic + type: Values + type: Integer + SPI_DOPO: + attributes: + id: SPI_DOPO + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + TRANSMIT_DATA_REGISTER: + attributes: + id: TRANSMIT_DATA_REGISTER + children: + - children: + - attributes: + id: sercom0 + value: '&(SERCOM0_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom0 + value: '63019' + type: Dynamic + type: Values + type: Integer + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom0 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom0 + value: '16' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom0 + value: '0' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom0 + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom1.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom1.yml new file mode 100644 index 00000000..05280f26 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom1.yml @@ -0,0 +1,139 @@ +configVersion: 1.0.0 +componentName: sercom1 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom1 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom1 + x: '19' + y: '204' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom1 + value: '232' + type: Dynamic + type: Values + type: Hex + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom1 + value: '23' + type: Dynamic + type: Values + type: Integer + USART_7816_BAUD_VALUE: + attributes: + id: USART_7816_BAUD_VALUE + children: + - children: + - attributes: + id: sercom1 + value: '-1' + type: Dynamic + type: Values + type: Integer + USART_BAUD_RATE: + attributes: + id: USART_BAUD_RATE + children: + - children: + - attributes: + value: '5180000' + type: User + type: Values + type: Integer + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom1 + value: '8956' + type: Dynamic + type: Values + type: Integer + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom1 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_RXPO: + attributes: + id: USART_RXPO + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom1 + value: '8' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom1 + value: '2' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom1 + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom2.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom2.yml new file mode 100644 index 00000000..711bfbad --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom2.yml @@ -0,0 +1,256 @@ +configVersion: 1.0.0 +componentName: sercom2 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom2 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: + children: + - children: + - attributes: + id: SERCOM2_I2C + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: DirectCapability + - attributes: + id: SERCOM2_SPI + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: DirectCapability + - attributes: + id: SERCOM2_UART + children: + - children: + - attributes: + id: targetComponentID + children: + - type: Value + value: stdio + type: String + - attributes: + id: targetAttachmentID + children: + - type: Value + value: UART + type: String + type: Attributes + type: DirectCapability + type: Attachments + type: sercom2 + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom2 + x: '20' + y: '320' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom2 + value: '232' + type: Dynamic + type: Values + type: Hex + RECEIVE_DATA_REGISTER: + attributes: + id: RECEIVE_DATA_REGISTER + children: + - children: + - attributes: + id: sercom2 + value: '&(SERCOM2_REGS->USART_INT.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + SERCOM_MODE: + attributes: + id: SERCOM_MODE + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: sercom2 + value: '0' + type: Dynamic + type: Values + type: KeyValueSet + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom2 + value: '23' + type: Dynamic + type: Values + type: Integer + TRANSMIT_DATA_REGISTER: + attributes: + id: TRANSMIT_DATA_REGISTER + children: + - children: + - attributes: + id: sercom2 + value: '&(SERCOM2_REGS->USART_INT.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom2 + value: '63019' + type: Dynamic + type: Values + type: Integer + USART_INTERRUPT_MODE_ENABLE: + attributes: + id: USART_INTERRUPT_MODE_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom2 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_OPERATING_MODE: + attributes: + id: USART_OPERATING_MODE + children: + - children: + - attributes: + id: readOnly + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + id: sercom2 + value: '0' + type: Dynamic + type: Values + type: KeyValueSet + USART_RING_BUFFER_MODE_ENABLE: + attributes: + id: USART_RING_BUFFER_MODE_ENABLE + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + USART_RXPO: + attributes: + id: USART_RXPO + children: + - children: + - attributes: + value: '3' + type: User + type: Values + type: KeyValueSet + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom2 + value: '16' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom2 + value: '0' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom2 + value: 'false' + type: Dynamic + type: Values + type: Boolean + USART_TXPO: + attributes: + id: USART_TXPO + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom3.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom3.yml new file mode 100644 index 00000000..539a3ebf --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/sercom3.yml @@ -0,0 +1,408 @@ +configVersion: 1.0.0 +componentName: sercom3 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: sercom3 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: sercom3 + x: '19' + y: '389' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + I2CM_BAUD: + attributes: + id: I2CM_BAUD + children: + - children: + - attributes: + id: sercom3 + value: '232' + type: Dynamic + type: Values + type: Hex + RECEIVE_DATA_REGISTER: + attributes: + id: RECEIVE_DATA_REGISTER + children: + - children: + - attributes: + id: sercom3 + value: '&(SERCOM3_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + SERCOM_MODE: + attributes: + id: SERCOM_MODE + children: + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_BAUD_REG_VALUE: + attributes: + id: SPI_BAUD_REG_VALUE + children: + - children: + - attributes: + id: sercom3 + value: '1' + type: Dynamic + type: Values + type: Integer + TRANSMIT_DATA_REGISTER: + attributes: + id: TRANSMIT_DATA_REGISTER + children: + - children: + - attributes: + id: sercom3 + value: '&(SERCOM3_REGS->SPIM.SERCOM_DATA)' + type: Dynamic + type: Values + type: String + USART_7816_BAUD_VALUE: + attributes: + id: USART_7816_BAUD_VALUE + children: + - children: + - attributes: + id: sercom3 + value: '-1' + type: Dynamic + type: Values + type: Integer + USART_BAUD_RATE: + attributes: + id: USART_BAUD_RATE + children: + - children: + - attributes: + value: '5180000' + type: User + type: Values + type: Integer + USART_BAUD_VALUE: + attributes: + id: USART_BAUD_VALUE + children: + - children: + - attributes: + id: sercom3 + value: '8956' + type: Dynamic + type: Values + type: Integer + USART_LIN_MASTER_SUPPORTED: + attributes: + id: USART_LIN_MASTER_SUPPORTED + children: + - children: + - attributes: + id: sercom3 + value: 'true' + type: Dynamic + type: Values + type: Boolean + USART_SAMPLE_COUNT: + attributes: + id: USART_SAMPLE_COUNT + children: + - children: + - attributes: + id: sercom3 + value: '8' + type: Dynamic + type: Values + type: Integer + USART_SAMPLE_RATE: + attributes: + id: USART_SAMPLE_RATE + children: + - children: + - attributes: + id: sercom3 + value: '2' + type: Dynamic + type: Values + type: Integer + USART_USE_FRACTIONAL_BAUD: + attributes: + id: USART_USE_FRACTIONAL_BAUD + children: + - children: + - attributes: + id: sercom3 + value: 'false' + type: Dynamic + type: Values + type: Boolean + SERCOM_USART_HEADER: + attributes: + id: SERCOM_USART_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_USART_SOURCE: + attributes: + id: SERCOM_USART_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_USART_COMMON_HEADER: + attributes: + id: SERCOM_USART_COMMON_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_I2CM_SOURCE: + attributes: + id: SERCOM_I2CM_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_I2CM_HEADER: + attributes: + id: SERCOM_I2CM_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + SERCOM_I2CM_MASTER_HEADER: + attributes: + id: SERCOM_I2CM_MASTER_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + I2C_SCLSM: + attributes: + id: I2C_SCLSM + children: + - children: + - attributes: + id: sercom3 + value: '0' + type: Dynamic + type: Values + type: Integer + I2C_CLOCK_SPEED_HZ: + attributes: + id: I2C_CLOCK_SPEED_HZ + children: + - children: + - attributes: + id: sercom3 + value: '100000' + type: Dynamic + type: Values + type: Integer + SERCOM_SPIM_SOURCE: + attributes: + id: SERCOM_SPIM_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + SERCOM_SPIM_HEADER: + attributes: + id: SERCOM_SPIM_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + SERCOM_SPIM_COMMON_HEADER: + attributes: + id: SERCOM_SPIM_COMMON_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + SPI_MSSEN: + attributes: + id: SPI_MSSEN + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: 'false' + type: User + type: Values + type: Boolean + SPI_DOPO: + attributes: + id: SPI_DOPO + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '3' + type: User + type: Values + type: KeyValueSet + SPI_DIPO: + attributes: + id: SPI_DIPO + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_BAUD_RATE: + attributes: + id: SPI_BAUD_RATE + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '10000000' + type: User + type: Values + type: Integer + SPI_CLOCK_POLARITY: + attributes: + id: SPI_CLOCK_POLARITY + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + SPI_CLOCK_PHASE: + attributes: + id: SPI_CLOCK_PHASE + children: + - children: + - attributes: + id: visible + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + - children: + - attributes: + value: '1' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/stdio.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/stdio.yml new file mode 100644 index 00000000..b247c924 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/stdio.yml @@ -0,0 +1,64 @@ +configVersion: 1.0.0 +componentName: stdio +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: stdio + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: + children: + - children: + - attributes: + id: UART + children: + - children: + - attributes: + id: targetComponentID + children: + - type: Value + value: sercom2 + type: String + - attributes: + id: targetAttachmentID + children: + - type: Value + value: SERCOM2_UART + type: String + type: Attributes + type: DirectDependency + type: Attachments + type: stdio + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: stdio + x: '189' + y: '322' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + DEBUG_PERIPHERAL: + attributes: + id: DEBUG_PERIPHERAL + children: + - children: + - attributes: + id: stdio + value: sercom2 + type: Dynamic + type: Values + type: String + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/tc2.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/tc2.yml new file mode 100644 index 00000000..b620d74f --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/tc2.yml @@ -0,0 +1,89 @@ +configVersion: 1.0.0 +componentName: tc2 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: tc2 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: tc2 + x: '477' + y: '308' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + TC_TIMER_PERIOD: + attributes: + id: TC_TIMER_PERIOD + children: + - children: + - attributes: + id: max + children: + - type: Value + value: '65535' + type: Long + type: Attributes + - children: + - attributes: + id: tc2 + value: '37499' + type: Dynamic + type: Values + type: Long + TC_FREQUENCY: + attributes: + id: TC_FREQUENCY + children: + - children: + - attributes: + id: tc2 + value: '187500' + type: Dynamic + type: Values + type: Integer + TC_TIMER_TIME_MS: + attributes: + id: TC_TIMER_TIME_MS + children: + - children: + - attributes: + id: max + children: + - type: Value + value: '349.52533' + type: Float + type: Attributes + - children: + - attributes: + value: '200.0' + type: User + type: Values + type: Float + TC_CTRLA_PRESCALER: + attributes: + id: TC_CTRLA_PRESCALER + children: + - children: + - attributes: + value: '6' + type: User + type: Values + type: KeyValueSet + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/tc3.yml b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/tc3.yml new file mode 100644 index 00000000..fd82702c --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/components/tc3.yml @@ -0,0 +1,150 @@ +configVersion: 1.0.0 +componentName: tc3 +coreVersion: 5.8.3 +device: ATSAMC21J18A +library: [] +dependency: +- dependencyPackage: class com.microchip.mcc.harmony.HarmonyModule + name: tc3 + type: module + version: '' +- dependencyPackage: '' + name: csp + type: package + version: v3.23.0 +customDataClassName: com.microchip.utils_mh3.utils.persistence.CustomModuleData +data: + attachments: {} + elementPosition: + attributes: + id: __ROOTVIEW + children: + - children: + - attributes: + id: tc3 + x: '476' + y: '236' + type: ElementPosition + type: ElementPositions + type: ComponentGraph + symbols: + TC_TIMER_PERIOD: + attributes: + id: TC_TIMER_PERIOD + children: + - children: + - attributes: + id: max + children: + - type: Value + value: '65535' + type: Long + type: Attributes + - children: + - attributes: + id: tc3 + value: '47999' + type: Dynamic + type: Values + type: Long + TC_FREQUENCY: + attributes: + id: TC_FREQUENCY + children: + - children: + - attributes: + id: tc3 + value: '48000000' + type: Dynamic + type: Values + type: Integer + TC_TIMER_HEADER: + attributes: + id: TC_TIMER_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + TC_TIMER_SOURCE: + attributes: + id: TC_TIMER_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'true' + type: Boolean + type: Attributes + type: File + TC_COMPARE_HEADER: + attributes: + id: TC_COMPARE_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_COMPARE_SOURCE: + attributes: + id: TC_COMPARE_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_CAPTURE_HEADER: + attributes: + id: TC_CAPTURE_HEADER + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_CAPTURE_SOURCE: + attributes: + id: TC_CAPTURE_SOURCE + children: + - children: + - attributes: + id: enabled + children: + - type: Value + value: 'false' + type: Boolean + type: Attributes + type: File + TC_SLAVE_MODE: + attributes: + id: TC_SLAVE_MODE + children: + - children: + - attributes: + id: tc3 + value: 'false' + type: Dynamic + type: Values + type: Boolean + userData: {} diff --git a/Telemetry/Telemetry_V1.X/Telemetry_V1_default/mcc-config.mc4 b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/mcc-config.mc4 new file mode 100644 index 00000000..95b5397e --- /dev/null +++ b/Telemetry/Telemetry_V1.X/Telemetry_V1_default/mcc-config.mc4 @@ -0,0 +1,291 @@ +configVersion: 1.0.0 +coreVersion: 5.8.3 +spaHostVersion: 1.2.0 +device: ATSAMC21J18A +deviceLibrary: + className: com.microchip.mcc.harmony.Harmony3Library +groupModules: [] +modules: +- can0 +- cmsis +- core +- dfp +- eic +- evsys +- nvmctrl +- sercom0 +- sercom1 +- sercom2 +- sercom3 +- stdio +- tc2 +- tc3 +generatedFileHashHistoryMap: +- file: ../src/config/default/ATSAMC21J18A.ld + hash: 3fc7dbb63ae72ecd9b52572e4dd84ed79cbd37feb6064cb6d4df6fca301d09af +- file: ../src/config/default/definitions.h + hash: 04859d790caf5eff2e493c4d3d9a18d6ad8fca4cdc9f950205e214ee366d1b05 +- file: ../src/config/default/device.h + hash: e539bb402fa4783d95ccf06235458b2e1fe01207c83c0e046a853e0385d0b6f4 +- file: ../src/config/default/device_cache.h + hash: e2914501b361bbc93a56d6915b1bf4fac00277e61f31fdee87a587bc15dea5b6 +- file: ../src/config/default/device_vectors.h + hash: 0ffcf2109c1550773094e211109c77b5ce60b5d264766d8e479d6ed2104425b8 +- file: ../src/config/default/exceptions.c + hash: 42f9da2668e04ccb3473d45b149683a00f80072c6883c7918d6ce93997cd6987 +- file: ../src/config/default/initialization.c + hash: 1eafb71f633fbaf8aead4b59efb4635037c69248e7200d8c658682e3cf59ab53 +- file: ../src/config/default/interrupts.c + hash: e0c2136ece0ce0783f29322ea6009619f03ceded2621248b9ce596ef8e104b4e +- file: ../src/config/default/interrupts.h + hash: 7d566278d15f14a635910b00ef9628836ff29cd0f95b43e73b9a38ed923c2409 +- file: ../src/config/default/libc_syscalls.c + hash: 88bb2e34c939601b5b7ad076556e3ee0fcedf388436b8cddb6d6fd3e9d07472f +- file: ../src/config/default/peripheral/can/plib_can0.c + hash: 7f0eea33ffe3942f00d645cc9590cbeb93e3aacf764aa27d47528f8200877f0f +- file: ../src/config/default/peripheral/can/plib_can0.h + hash: 82effa7ee26a29add640e0239848f8265bf69247e1c29d24fa8b05ed853de21e +- file: ../src/config/default/peripheral/can/plib_can_common.h + hash: e0e3b54f69be9d8811bbe507f91daa443ae7bff5dc724ac51baebc160097b2d6 +- file: ../src/config/default/peripheral/clock/plib_clock.c + hash: 972c24eea53d5ae9b7b6580a2774cf1b029a14e9dcefb23ccfa11fb7cf07d52e +- file: ../src/config/default/peripheral/clock/plib_clock.h + hash: 01c269741541514e997ef61546f4dbb0e23f66e27c6a957162557f13b4638baf +- file: ../src/config/default/peripheral/eic/plib_eic.c + hash: 3fff48a77d91b0b6e9f00e1ebafd36cf03848297cff9b676997b2fb05ff92092 +- file: ../src/config/default/peripheral/eic/plib_eic.h + hash: 422653519e8f6f4ba4605148473b0d6afb1e4a27797ad3c1fc172b0e90b9b287 +- file: ../src/config/default/peripheral/evsys/plib_evsys.c + hash: 7bb3bc0d60c4cf18638d76d3dfe9e5b13d2915d09e6a8a7bc4b5faae870c8f48 +- file: ../src/config/default/peripheral/evsys/plib_evsys.h + hash: f7d08eb8162f271ce1db384c082586a6624e506aa7f502c64c4ab5a1aadac47d +- file: ../src/config/default/peripheral/nvic/plib_nvic.c + hash: e428272e8e558ffc3483b557441875e3c9cf7471b7a93b02e4be2e2cbb4c7770 +- file: ../src/config/default/peripheral/nvic/plib_nvic.h + hash: 9936ac782115af41003255283fa2f603f4ff2212d16275b7c80ea8d067a9e208 +- file: ../src/config/default/peripheral/nvmctrl/plib_nvmctrl.c + hash: 1fb8d05a455e4b5ec9a5e2fdfe11470cbde614fa7df8a005b0f0110a95f071bc +- file: ../src/config/default/peripheral/nvmctrl/plib_nvmctrl.h + hash: a2f572d8ba174971959f4a9319fc61b460c00432512d38e19e28e2dfddf6cde5 +- file: ../src/config/default/peripheral/port/plib_port.c + hash: ea1b1fc9ea66bd15d97dd065aa1226aaf2bb81db6da54a7d02de36092fe7bc87 +- file: ../src/config/default/peripheral/port/plib_port.h + hash: a90ff3ae67901cc9a53dbe555c73fe85438a441b2c89ba7bcd5450a9572bf55c +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.c + hash: dbd555fdec52e709c0945f28076780e7aff5063bd3519ac47364293a3cbc7a59 +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.h + hash: 8e1550559a741d9ace2e6fb145ac015c8457aa417c877996855b73238051babb +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.c + hash: cd273a3f2f1ff8c22a95bfc4b98d17fb45da709b1c99b390c80afc61e7e2fdf4 +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.h + hash: 351b72a164869e3672e455b02f4de6083ca436a862a6e55388c9a221911b4c39 +- file: ../src/config/default/peripheral/sercom/spi_master/plib_sercom_spi_master_common.h + hash: 06e3c7813e1608b5008e3c8955569f9cff04bef321a34c35421f7979368a4ada +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom1_usart.c + hash: 3b45cc8fc8540ebcc8375ebe09611fce2b89b56ddbf4ac9025034bf44f491d1e +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom1_usart.h + hash: 721b767702c85a60634480b2759b12de7c24e3a3d3cbba8e540ed6ca0c083828 +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom2_usart.c + hash: c4cd5be8c789669f4a91f1e56aa7973e6db5f12d105fd041f8e605d59e382480 +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom2_usart.h + hash: a0d35d03c527d1fb9c99d575f99b91a9d1d49d345b20cacee95c2aec45c0d7cb +- file: ../src/config/default/peripheral/sercom/usart/plib_sercom_usart_common.h + hash: 3653b66472c558c50f7037a1dd25d2678e9a13aa718f3c53a2195e6f3919ea48 +- file: ../src/config/default/peripheral/tc/plib_tc2.c + hash: cbfba6ba974bb3ff6886ef20d2044ad598afea92ce9fba62f96a7ccabf16071a +- file: ../src/config/default/peripheral/tc/plib_tc2.h + hash: 1161939c7397bd6697e244159377607749f3a272bf67ea3af5c3cbdc690eab59 +- file: ../src/config/default/peripheral/tc/plib_tc3.c + hash: 2c8a833a0cc3b721e21c297d5b429b4dab2c0d3ec815785cc023405440614606 +- file: ../src/config/default/peripheral/tc/plib_tc3.h + hash: 36173921130720b871c8cbb1fccfc4c23e1f05752441386c7b9e34ddf43bfbbf +- file: ../src/config/default/peripheral/tc/plib_tc_common.h + hash: 487b4f489229b8e16b24ab48ddc1f414b095585439f0e10d53b2285fc3979f63 +- file: ../src/config/default/pin_configurations.csv + hash: b447d5bce495506ab494702101635ff35aedb0387a0c967fbd78283119f367e9 +- file: ../src/config/default/startup_xc32.c + hash: e6227d89e36b74af1bc21e00e80b390502c97aaaa65796291f63b2d96cf0678e +- file: ../src/config/default/stdio/xc32_monitor.c + hash: 1395dbc052b1c3c61d798c93f81efa8bc498027c4f6de749df5e4c06dbee4d31 +- file: ../src/config/default/toolchain_specifics.h + hash: a4f1774c6f1f8c6cd522567536c9e9d75ca63259b868015ac9b0fb0aeeffe1f4 +- file: ../src/main.c + hash: d3c233d419e6304bfacbafc18cc68c0f5c26e365f23b20ea40ccfac458f664c5 +- file: ../src/packs/ATSAMC21J18A_DFP/component/ac.h + hash: 18e965ceee994e73f9c30612a73b9ef37049d092638a21c7bcd1e6fc69350cc1 +- file: ../src/packs/ATSAMC21J18A_DFP/component/adc.h + hash: da8c9fa2b7b683ac6f72c84ab14b91e952f89655b503edc22c0a3e046567ac0c +- file: ../src/packs/ATSAMC21J18A_DFP/component/can.h + hash: c98eb7bcbcb5158e4b581552609cb44b6a4bca28b1c322c387925e8d25d94c00 +- file: ../src/packs/ATSAMC21J18A_DFP/component/ccl.h + hash: 3a86fd07e87114509b7d3a79035076371e32deddee93a460a9eeaa0f1c5d9f85 +- file: ../src/packs/ATSAMC21J18A_DFP/component/dac.h + hash: dc0977de3b63a7f7656d1109f6acf5c07c993a5f35407cb91322e35dc983675f +- file: ../src/packs/ATSAMC21J18A_DFP/component/divas.h + hash: 51af87912aab3a155701b249766aedbf09a6913b3a0a962a72604a22fc97cec0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/dmac.h + hash: e11903d19310facd45f67fab22f2d1d8f1f412be94b8973a98badfcfe3470c69 +- file: ../src/packs/ATSAMC21J18A_DFP/component/dsu.h + hash: 8cf5dde6a110986dc9622cc3badd8b5dddefe3c8edee7d587308043a518af07d +- file: ../src/packs/ATSAMC21J18A_DFP/component/eic.h + hash: 10d9c2dcf2d257b13f1e03d1f6fc3a1de4773d59fa51ce442d0dc87bf692a70b +- file: ../src/packs/ATSAMC21J18A_DFP/component/evsys.h + hash: 31524ca0584c9bc0666c320e37cdfe2d195ad55d2f4026738360e77beb2c22f0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/freqm.h + hash: 38c404513f1615e10fb0d5bb7cfb60a68aca145bc83e892685abf14bcd7f4704 +- file: ../src/packs/ATSAMC21J18A_DFP/component/fuses.h + hash: 7d2605026995dabe18daace7f46e8721184fd78b612ec867099d1b02d94a4485 +- file: ../src/packs/ATSAMC21J18A_DFP/component/gclk.h + hash: 5f4ab08d002ca6b5e214a945ddd8fe81cfb9491d5911df33f04ca0069fd474f7 +- file: ../src/packs/ATSAMC21J18A_DFP/component/hmatrixb.h + hash: ab8986d64e0f6e7507e943805a6efc9ff3882e7a137a919b30dbb5e2be448f88 +- file: ../src/packs/ATSAMC21J18A_DFP/component/mclk.h + hash: df1d30fcf7aa067e61c6c6c7763e752e57e8b8926a9106882600ea15aad988ea +- file: ../src/packs/ATSAMC21J18A_DFP/component/mtb.h + hash: 6836d7b1a525ac65a6f1541133e755a21724516f55580b77c2ec4adfaa5f1a34 +- file: ../src/packs/ATSAMC21J18A_DFP/component/nvmctrl.h + hash: bf92be4473d6ed8377e485d7c6d8bc458334ec9a58e0fe7a213a40227b7fed80 +- file: ../src/packs/ATSAMC21J18A_DFP/component/osc32kctrl.h + hash: 54698c9c67fb890f8ea2f03dc0b0aa245c1e4fee14fe8002f7c6af9964c31ef3 +- file: ../src/packs/ATSAMC21J18A_DFP/component/oscctrl.h + hash: 99132d41fada0546495b7ceee25fae8259f4d0db4986a354a300ff86703d8b84 +- file: ../src/packs/ATSAMC21J18A_DFP/component/pac.h + hash: 75028e2e4a1670401b71397a1a6012011dd9d2bbc2721116e6294f8e76d1ed15 +- file: ../src/packs/ATSAMC21J18A_DFP/component/pm.h + hash: 9dde14b19423791c50e5c317b67b5c49e0befa12d947eea2c8c45e3398c398bd +- file: ../src/packs/ATSAMC21J18A_DFP/component/port.h + hash: 01737ce08be6b8a7f4f2c12bb535952ac0f824289159c03e337279d57cbd6d48 +- file: ../src/packs/ATSAMC21J18A_DFP/component/ptc.h + hash: 395a8341491f808fdae9d42817c3b4199386e8879722e0029ed792e089d3e727 +- file: ../src/packs/ATSAMC21J18A_DFP/component/rstc.h + hash: a66c3da8443c9b304664e11d6c69fe881459f22dbea770e38271e87e31fead7a +- file: ../src/packs/ATSAMC21J18A_DFP/component/rtc.h + hash: 1b8f8def088a7507e62c82281d4a6b3890f2cb32c6aae1b15ba2070ee384e70d +- file: ../src/packs/ATSAMC21J18A_DFP/component/sdadc.h + hash: ca3a9fab07d72b420b54486f0399f32bd954f3bcbe957b298a01fd73085de877 +- file: ../src/packs/ATSAMC21J18A_DFP/component/sercom.h + hash: cde3c9cce2d5b9937ad1a3c43d155694654785c55ff7c1f365cbc77666b69d0e +- file: ../src/packs/ATSAMC21J18A_DFP/component/supc.h + hash: d4cc7a715fbc23834cf9749c4d12295df6a5c9fcc2212be9b5cd224db657d2cb +- file: ../src/packs/ATSAMC21J18A_DFP/component/tc.h + hash: b2007af7212367dea3006c0fbb83da05e47201af81711ebb1284aa96b980e6c0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/tcc.h + hash: 5b473343ac6fa6cef135fdef2298cb05733e64588be1b46680e201e29a8beca0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/tsens.h + hash: dfca5719ba8e1e3d1e1c6b662602f7b8f5d65d43e04671d0241dc5dc4c8761e0 +- file: ../src/packs/ATSAMC21J18A_DFP/component/wdt.h + hash: fa4d3defc5736ec0c753d5a49713f717e5254f4da5cf6118e8b739522f7ac5e7 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/ac.h + hash: 62793feaaa1067011e3023f96630cb76e94378c88e9306df3163cb3304410f22 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/adc0.h + hash: 3c173f1d5185d3c9476a96fa024e13292fef92ef0241504e017d99f18a46061e +- file: ../src/packs/ATSAMC21J18A_DFP/instance/adc1.h + hash: d9ffea72619d13d48be17b27bd0e99257799d716263a94de19853f56fb5b8aa6 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/can0.h + hash: b0d5b3cdf228f37930be21a37f588ae575f22bbd96726c88d544017587bae5e9 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/can1.h + hash: 197d3f6fefd4a42bdc4fff4e4fe4276a3f54e96b2f388779c049f4cf48933ae1 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/ccl.h + hash: 6ac447f4ee6ce0334f7577abe5c3a55c5b4ce6eb903c934ad9344260240df635 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/dac.h + hash: 73d6d793dba5a68165453e9d16bff9286f7f14fc56deb1f339a28874f2d3a273 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/divas.h + hash: 09a5d9ff42f1aaafef2e3ed611878a4bbe446138e875fd174c926e054ad8ced8 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/dmac.h + hash: d0f0c9e6b06f974dc2fc3e6c327ad825e6baf4c8104eb4bd00c6482ebffc88d4 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/dsu.h + hash: ea2ba1caa093d27825e012f4949aa8d89bf489aff4bf04d893e425b5cb5092ae +- file: ../src/packs/ATSAMC21J18A_DFP/instance/eic.h + hash: 27a31e65a37a33848d7edce235cfdf4bbd1e985694cc099487a7684d8fbca2d4 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/evsys.h + hash: 3b9594a298307c6fabd944bf6acd890692fe1eb8d7266d71de17e7387c19c74f +- file: ../src/packs/ATSAMC21J18A_DFP/instance/freqm.h + hash: 961aa1416eec5d2f3a93cd64792ec7055f8b00542821649c475b972b640364d7 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/fuses.h + hash: ba80c7f480244dee44906821d457a1c4e21522071095da87a4f1877ece6bcf6d +- file: ../src/packs/ATSAMC21J18A_DFP/instance/gclk.h + hash: a1a9f3656d879a750280245cecb1cb3c084ade2685cecbb19677a260d66fece5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/hmatrixhs.h + hash: 70305a77185753d34672bc82d403b9463351b422880e1472254555456612e1c5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/mclk.h + hash: c8364d869bac94fbe99e29bc50a40962d8ea30f106c0ca71c0a207bec409f738 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/mtb.h + hash: e8abf874930994235fafc0c19e3f3af454ec626a8890f0c98577fe0016075497 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/nvmctrl.h + hash: b5d30ac44fce76d81ac1b96e1254388af4f2b62b503b69f1a0f64cf65e74977c +- file: ../src/packs/ATSAMC21J18A_DFP/instance/osc32kctrl.h + hash: 7927c74509e1d2b606593de0e3fa810a3baec7f77dc55f848feeb4fd40d2ce71 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/oscctrl.h + hash: 92cdf00281fd42b618d9343d212fdf729731a738a39c9cc019fcdf3aef884964 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/pac.h + hash: 2defd48c2c35bafad2f6d7912b5d6192813d2b0fd9b902c6b3770a3beb6a49c6 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/pm.h + hash: e509da951ad2b2a360967a27a6e130065ad0e7325987f846859fcf1c329018f5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/port.h + hash: 759fe53a842c0bc873798da32e99a92ab0139dcfb3fa6e522b82123db96f4c67 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/ptc.h + hash: 1c2fad0cc9faa280bcd539d8fdafbb3ac41d72596d96ecbb59c030568aad5dfd +- file: ../src/packs/ATSAMC21J18A_DFP/instance/rstc.h + hash: 2741d2c342b77550eb9f3f058b723552f2f8db0c13b11c4f127ec5bfbec19c6f +- file: ../src/packs/ATSAMC21J18A_DFP/instance/rtc.h + hash: 0e0c21a6c3045665a163e7b5bebeb960a372ae925b2db1321de1ae276beb23dd +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sdadc.h + hash: 18a03bc6bf1a127c9e785f1520554e99daaaaa15d3078b8181e477316681ede8 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom0.h + hash: e7414434ab9e46e8aa6668d587af76544df30db74f12eee2b124b6b93299989d +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom1.h + hash: d5cc94e270e48e59925acb90b5bbe8bbc6fa62d4ddf8b2c214b8bfb6c8a03920 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom2.h + hash: 31472109d5d3b3c2d2a20ed8a2bb2d009b0eb3ca65cd45c3ba6d5745d47d4b60 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom3.h + hash: 2c77d8f3131ca34a22de0d26c5c13fbe716607a61b10636bfbad56b0558a3c11 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom4.h + hash: 9ab2b43df3c30cffab9491c9f3900951456a83adc2f61603599799fc503208e1 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/sercom5.h + hash: 6e7988bf9dfc9e02361b183d2c02b97feb2d16631c254bd4f6f8f5d55e57c4c5 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/supc.h + hash: 067c041bb4218d55e12dffcc255951d5389f8971bb61ccab9d387f8d7810d94e +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc0.h + hash: f82a3a62fdb5c1b56dcd752d1dbf66e2b4cc562696cd8bb22e82188f84e9d4af +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc1.h + hash: d38eb0a461fe865155bc4b13d7b8fb21bac08f969aaaa39dec3bcf070c9d848a +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc2.h + hash: ca0944228b2b637f22c90a7c9a5060b68b309f81c0eb4e6db3fbe00661169f4d +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc3.h + hash: 24027477db3c0f7cc7806688fa3c18a7567c80cbb7ffe024cf1e8076997e689e +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tc4.h + hash: 3cc30104024853d10ee578e046d1cd5868f192beb545060c62eecae37d785dd3 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tcc0.h + hash: a6be43a643719c88c01e762270bf24cdf399febd11c6e2e62d3b1f825e373b72 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tcc1.h + hash: a3d5b071198abb54ebdd2808b3c22b69a9c1f49975e9e73c6742788eddab7b8f +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tcc2.h + hash: d22e7f06b755c5d71fe924fcf9a18da26869884c7563dbb24ce85500a78b3dfb +- file: ../src/packs/ATSAMC21J18A_DFP/instance/tsens.h + hash: e6b16c504a31e922cd9cb8674886e9d797cfd8359ea0f387c310f79b7d737778 +- file: ../src/packs/ATSAMC21J18A_DFP/instance/wdt.h + hash: 6a3d811efd0f749d1864ad9cf1777c35ba575b0d13ebfbad9a268a04a47e1e90 +- file: ../src/packs/ATSAMC21J18A_DFP/pio/samc21j18a.h + hash: d4920a5074f62dff1f8213991c83b2689c6ad59364d094e0997990dfb4fd4789 +- file: ../src/packs/ATSAMC21J18A_DFP/samc21j18a.h + hash: 35c3b0e29e6a92608192900edd4bc31d7b605c58d752fae0952040e9e805e746 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cachel1_armv7.h + hash: 6cdb5b324f2fd1bb5b2f47298ba6e6777e735d7cad3bb8d942cd36e2c6e65328 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armcc.h + hash: d074534d7106cec83474b3b0a897bd2553e1a8895ecbd54f4f4fb25928066eee +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang.h + hash: 11b39b96ddc1125124762b3423a77b90dd40ea5b4582a3513830245046b24311 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang_ltm.h + hash: 8621969ea669a1b230ff2125a760ef66d575c48cb45e9e457f768909abcbda46 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h + hash: 869640702d811c4c63abb52206715c891a93fd03be954df5ad40d378355af3d6 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h + hash: 3d4e265d0aa42f888385ccf073666e6ebb5ec9f834760b9da27c474e177f708d +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_iccarm.h + hash: f28119adbc81fb0e3c957c9aebe8fb423ad93634e76ead3caa2b0818d2e123ae +- file: ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h + hash: 8cda7ac3ff6f0eb5e83c4fe613dd195151b24da54167f5c3c007e599a03f1edc +- file: ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h + hash: a19e24c136145b4c72630d0ab7c83a7aef010f3ba165e34c56a05057a2d9fed5 +- file: ../src/packs/CMSIS/CMSIS/Core/Include/mpu_armv7.h + hash: de1b5eb9ed566527b66dc06f4ecb6a43ab6800f7dac47e87c9cb42984dca41bb diff --git a/Telemetry/Telemetry_V1.X/mcc-manifest-autosave.yml b/Telemetry/Telemetry_V1.X/mcc-manifest-autosave.yml new file mode 100644 index 00000000..5e67095e --- /dev/null +++ b/Telemetry/Telemetry_V1.X/mcc-manifest-autosave.yml @@ -0,0 +1,22 @@ +# This file has been autogenerated by MPLAB Code Configurator. Please do not edit this file. + +manifest_file_version: 1.0.0 +project: Telemetry_V1 +creation_date: 2026-01-05T15:19:30.022+01:00[Europe/Berlin] +operating_system: Windows 11 +mcc_mode: IDE +mcc_mode_version: v6.25 +device_name: ATSAMC21J18A +compiler: XC32 5.00 +mcc_version: 5.6.3 +mcc_core_version: 5.8.3 +content_manager_version: 6.0.3 +is_mcc_offline: false +is_using_prerelease_versions: false +mcc_content_registries: https://registry.npmjs.org/ +device_library: {library_class: com.microchip.mcc.harmony.Harmony3Library, name: Bundled, + version: Bundled} +packs: {name: SAMC21_DFP, version: 3.8.119} +modules: +- {name: csp, type: HARMONY, version: v3.23.0} +- {name: CMSIS_5, type: HARMONY, version: 5.9.0} diff --git a/Telemetry/Telemetry_V1.X/mcc-manifest-generated-success.yml b/Telemetry/Telemetry_V1.X/mcc-manifest-generated-success.yml new file mode 100644 index 00000000..ec487d3d --- /dev/null +++ b/Telemetry/Telemetry_V1.X/mcc-manifest-generated-success.yml @@ -0,0 +1,22 @@ +# This file has been autogenerated by MPLAB Code Configurator. Please do not edit this file. + +manifest_file_version: 1.0.0 +project: Telemetry_V1 +creation_date: 2025-11-12T15:30:06.976+01:00[Europe/Oslo] +operating_system: Mac OS X +mcc_mode: IDE +mcc_mode_version: v6.25 +device_name: ATSAMC21J18A +compiler: XC32 4.60 +mcc_version: 5.6.2 +mcc_core_version: 5.8.2 +content_manager_version: 6.0.3 +is_mcc_offline: false +is_using_prerelease_versions: false +mcc_content_registries: https://registry.npmjs.org/ +device_library: {library_class: com.microchip.mcc.harmony.Harmony3Library, name: Bundled, + version: Bundled} +packs: {name: SAMC21_DFP, version: 3.8.119} +modules: +- {name: csp, type: HARMONY, version: v3.23.0} +- {name: CMSIS_5, type: HARMONY, version: 5.9.0} diff --git a/Telemetry/Telemetry_V1.X/nbproject/configurations.xml b/Telemetry/Telemetry_V1.X/nbproject/configurations.xml new file mode 100644 index 00000000..5bc0ec3f --- /dev/null +++ b/Telemetry/Telemetry_V1.X/nbproject/configurations.xml @@ -0,0 +1,1492 @@ + + + + + + ../app/include/led_facade.h + ../app/include/pressure_calc.h + + + + + + ../src/config/default/peripheral/can/plib_can0.h + ../src/config/default/peripheral/can/plib_can_common.h + + + ../src/config/default/peripheral/clock/plib_clock.h + + + ../src/config/default/peripheral/eic/plib_eic.h + + + ../src/config/default/peripheral/evsys/plib_evsys.h + + + ../src/config/default/peripheral/nvic/plib_nvic.h + + + ../src/config/default/peripheral/nvmctrl/plib_nvmctrl.h + + + ../src/config/default/peripheral/port/plib_port.h + + + + ../src/config/default/peripheral/sercom/i2c_master/plib_sercom2_i2c_master.h + + + ../src/config/default/peripheral/sercom/spi_master/plib_sercom_spi_master_common.h + ../src/config/default/peripheral/sercom/spi_master/plib_sercom5_spi_master.h + ../src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.h + ../src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.h + + + ../src/config/default/peripheral/sercom/usart/plib_sercom3_usart.h + ../src/config/default/peripheral/sercom/usart/plib_sercom4_usart.h + ../src/config/default/peripheral/sercom/usart/plib_sercom_usart_common.h + ../src/config/default/peripheral/sercom/usart/plib_sercom2_usart.h + ../src/config/default/peripheral/sercom/usart/plib_sercom1_usart.h + + + + ../src/config/default/peripheral/tc/plib_tc3.h + ../src/config/default/peripheral/tc/plib_tc_common.h + ../src/config/default/peripheral/tc/plib_tc2.h + + + ../src/config/default/device.h + ../src/config/default/definitions.h + ../src/config/default/device_vectors.h + ../src/config/default/interrupts.h + ../src/config/default/device_cache.h + ../src/config/default/toolchain_specifics.h + + + + + ../drivers/leakage-sensor/include/leak_sensor_eic.h + + + ../drivers/ws2812/include/ws2812_spi_enc.h + ../drivers/ws2812/include/ws2812_port_sercom5_harmony.h + + + ../drivers/wsen-pads/include/wsen_pads_port_sercom3.h + + + + + + ../src/packs/ATSAMC21J18A_DFP/component/dsu.h + ../src/packs/ATSAMC21J18A_DFP/component/pm.h + ../src/packs/ATSAMC21J18A_DFP/component/hmatrixb.h + ../src/packs/ATSAMC21J18A_DFP/component/ac.h + ../src/packs/ATSAMC21J18A_DFP/component/tc.h + ../src/packs/ATSAMC21J18A_DFP/component/dmac.h + ../src/packs/ATSAMC21J18A_DFP/component/pac.h + ../src/packs/ATSAMC21J18A_DFP/component/ptc.h + ../src/packs/ATSAMC21J18A_DFP/component/divas.h + ../src/packs/ATSAMC21J18A_DFP/component/sercom.h + ../src/packs/ATSAMC21J18A_DFP/component/tsens.h + ../src/packs/ATSAMC21J18A_DFP/component/rtc.h + ../src/packs/ATSAMC21J18A_DFP/component/dac.h + ../src/packs/ATSAMC21J18A_DFP/component/nvmctrl.h + ../src/packs/ATSAMC21J18A_DFP/component/sdadc.h + ../src/packs/ATSAMC21J18A_DFP/component/port.h + ../src/packs/ATSAMC21J18A_DFP/component/ccl.h + ../src/packs/ATSAMC21J18A_DFP/component/freqm.h + ../src/packs/ATSAMC21J18A_DFP/component/fuses.h + ../src/packs/ATSAMC21J18A_DFP/component/rstc.h + ../src/packs/ATSAMC21J18A_DFP/component/mclk.h + ../src/packs/ATSAMC21J18A_DFP/component/supc.h + ../src/packs/ATSAMC21J18A_DFP/component/can.h + ../src/packs/ATSAMC21J18A_DFP/component/evsys.h + ../src/packs/ATSAMC21J18A_DFP/component/tcc.h + ../src/packs/ATSAMC21J18A_DFP/component/eic.h + ../src/packs/ATSAMC21J18A_DFP/component/gclk.h + ../src/packs/ATSAMC21J18A_DFP/component/osc32kctrl.h + ../src/packs/ATSAMC21J18A_DFP/component/wdt.h + ../src/packs/ATSAMC21J18A_DFP/component/oscctrl.h + ../src/packs/ATSAMC21J18A_DFP/component/mtb.h + ../src/packs/ATSAMC21J18A_DFP/component/adc.h + + + ../src/packs/ATSAMC21J18A_DFP/instance/adc1.h + ../src/packs/ATSAMC21J18A_DFP/instance/tsens.h + ../src/packs/ATSAMC21J18A_DFP/instance/rtc.h + ../src/packs/ATSAMC21J18A_DFP/instance/dsu.h + ../src/packs/ATSAMC21J18A_DFP/instance/mtb.h + ../src/packs/ATSAMC21J18A_DFP/instance/sercom3.h + ../src/packs/ATSAMC21J18A_DFP/instance/ptc.h + ../src/packs/ATSAMC21J18A_DFP/instance/tc0.h + ../src/packs/ATSAMC21J18A_DFP/instance/divas.h + ../src/packs/ATSAMC21J18A_DFP/instance/fuses.h + ../src/packs/ATSAMC21J18A_DFP/instance/osc32kctrl.h + ../src/packs/ATSAMC21J18A_DFP/instance/tcc1.h + ../src/packs/ATSAMC21J18A_DFP/instance/pac.h + ../src/packs/ATSAMC21J18A_DFP/instance/dmac.h + ../src/packs/ATSAMC21J18A_DFP/instance/tc4.h + ../src/packs/ATSAMC21J18A_DFP/instance/rstc.h + ../src/packs/ATSAMC21J18A_DFP/instance/wdt.h + ../src/packs/ATSAMC21J18A_DFP/instance/evsys.h + ../src/packs/ATSAMC21J18A_DFP/instance/sercom2.h + ../src/packs/ATSAMC21J18A_DFP/instance/eic.h + ../src/packs/ATSAMC21J18A_DFP/instance/nvmctrl.h + ../src/packs/ATSAMC21J18A_DFP/instance/supc.h + ../src/packs/ATSAMC21J18A_DFP/instance/tcc0.h + ../src/packs/ATSAMC21J18A_DFP/instance/tc3.h + ../src/packs/ATSAMC21J18A_DFP/instance/can1.h + ../src/packs/ATSAMC21J18A_DFP/instance/sercom1.h + ../src/packs/ATSAMC21J18A_DFP/instance/sdadc.h + ../src/packs/ATSAMC21J18A_DFP/instance/hmatrixhs.h + ../src/packs/ATSAMC21J18A_DFP/instance/port.h + ../src/packs/ATSAMC21J18A_DFP/instance/sercom5.h + ../src/packs/ATSAMC21J18A_DFP/instance/dac.h + ../src/packs/ATSAMC21J18A_DFP/instance/freqm.h + ../src/packs/ATSAMC21J18A_DFP/instance/tc2.h + ../src/packs/ATSAMC21J18A_DFP/instance/ac.h + ../src/packs/ATSAMC21J18A_DFP/instance/adc0.h + ../src/packs/ATSAMC21J18A_DFP/instance/can0.h + ../src/packs/ATSAMC21J18A_DFP/instance/sercom0.h + ../src/packs/ATSAMC21J18A_DFP/instance/gclk.h + ../src/packs/ATSAMC21J18A_DFP/instance/pm.h + ../src/packs/ATSAMC21J18A_DFP/instance/ccl.h + ../src/packs/ATSAMC21J18A_DFP/instance/mclk.h + ../src/packs/ATSAMC21J18A_DFP/instance/tc1.h + ../src/packs/ATSAMC21J18A_DFP/instance/tcc2.h + ../src/packs/ATSAMC21J18A_DFP/instance/oscctrl.h + ../src/packs/ATSAMC21J18A_DFP/instance/sercom4.h + + + ../src/packs/ATSAMC21J18A_DFP/pio/samc21j18a.h + + ../src/packs/ATSAMC21J18A_DFP/samc21j18a.h + + + + + + ../src/packs/CMSIS/CMSIS/Core/Include/cachel1_armv7.h + ../src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h + ../src/packs/CMSIS/CMSIS/Core/Include/mpu_armv7.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang_ltm.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_iccarm.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_armcc.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h + ../src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h + + + + + + + + + + Telemetry_V1_default/components/can0.yml + Telemetry_V1_default/components/sercom0.yml + Telemetry_V1_default/components/tc3.yml + Telemetry_V1_default/components/stdio.yml + Telemetry_V1_default/components/sercom3.yml + Telemetry_V1_default/components/core.yml + Telemetry_V1_default/components/eic.yml + Telemetry_V1_default/components/nvmctrl.yml + Telemetry_V1_default/components/evsys.yml + Telemetry_V1_default/components/dfp.yml + Telemetry_V1_default/components/sercom1.yml + Telemetry_V1_default/components/cmsis.yml + Telemetry_V1_default/components/sercom2.yml + Telemetry_V1_default/components/tc2.yml + + Telemetry_V1_default/mcc-config.mc4 + + Makefile + Telemetry_V1.mc3 + + + + + + + ../src/config/default/ATSAMC21J18A.ld + + + + + + ../app/src/led_facade.c + ../app/src/pressure_calc.c + + + + + + ../src/config/default/peripheral/can/plib_can0.c + + + ../src/config/default/peripheral/clock/plib_clock.c + + + ../src/config/default/peripheral/eic/plib_eic.c + + + ../src/config/default/peripheral/evsys/plib_evsys.c + + + ../src/config/default/peripheral/nvic/plib_nvic.c + + + ../src/config/default/peripheral/nvmctrl/plib_nvmctrl.c + + + ../src/config/default/peripheral/port/plib_port.c + + + + ../src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.c + ../src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.c + + + ../src/config/default/peripheral/sercom/usart/plib_sercom2_usart.c + ../src/config/default/peripheral/sercom/usart/plib_sercom1_usart.c + + + + ../src/config/default/peripheral/tc/plib_tc3.c + ../src/config/default/peripheral/tc/plib_tc2.c + + + + ../src/config/default/stdio/xc32_monitor.c + + ../src/config/default/startup_xc32.c + ../src/config/default/exceptions.c + ../src/config/default/interrupts.c + ../src/config/default/initialization.c + ../src/config/default/libc_syscalls.c + + + + + ../drivers/leakage-sensor/src/leak_sensor_eic.c + + + ../drivers/ws2812/src/ws2812_spi_enc.c + ../drivers/ws2812/src/ws2812_port_sercom0_harmony.c + + + ../drivers/wsen-pads/src/wsen_pads_port_sercom3.c + + + ../src/main.c + ../src/config/default/pin_configurations.csv + + + + ../drivers/ws2812/include + ../drivers/ws2812/src + ../app/include + ../app/src + ../drivers/wsen-pads/include + ../drivers/wsen-pads/src + ../drivers/timers/src + ../drivers/timers/include + ../drivers/leakage-sensor/src + ../drivers/leakage-sensor/include + + Makefile + + + + localhost + ATSAMC21J18A + + + Simulator + XC32 + 5.00 + 3 + + + + + + + + + + + + + + + + false + false + + + + + + + false + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Telemetry/Telemetry_V1.X/nbproject/project.xml b/Telemetry/Telemetry_V1.X/nbproject/project.xml new file mode 100644 index 00000000..9f51be53 --- /dev/null +++ b/Telemetry/Telemetry_V1.X/nbproject/project.xml @@ -0,0 +1,34 @@ + + + com.microchip.mplab.nbide.embedded.makeproject + + + Telemetry_V1 + c4028a29-c2d2-47a3-8cbb-054365ae3f3c + 0 + ISO-8859-1 + + + ../drivers/ws2812/include + ../drivers/ws2812/src + ../app/include + ../app/src + ../drivers/wsen-pads/include + ../drivers/wsen-pads/src + ../drivers/timers/src + ../drivers/timers/include + ../drivers/leakage-sensor/src + ../drivers/leakage-sensor/include + + + + default + 2 + + + + false + + + + diff --git a/Telemetry/app/include/led_facade.h b/Telemetry/app/include/led_facade.h new file mode 100644 index 00000000..928cb881 --- /dev/null +++ b/Telemetry/app/include/led_facade.h @@ -0,0 +1,24 @@ +/* + * led_facade.h - Simple app-facing API for WS2812 status LEDs (non-blocking) + */ + +#ifndef LED_FACADE_H +#define LED_FACADE_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +void led_init(void); // init SERCOM0, TC3, encoder, bind async +void led_set(uint8_t i, uint8_t r, uint8_t g, uint8_t b); +bool led_commit_async(void); // returns false if a frame is already in-flight +bool led_busy(void); // query if TX+latch in progress + +#ifdef __cplusplus +} +#endif + +#endif /* LED_FACADE_H */ diff --git a/Telemetry/app/include/pressure_calc.h b/Telemetry/app/include/pressure_calc.h new file mode 100644 index 00000000..5c4f51b2 --- /dev/null +++ b/Telemetry/app/include/pressure_calc.h @@ -0,0 +1,94 @@ +#ifndef PRESSURE_CALC_H +#define PRESSURE_CALC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +// Internal ring buffer for rolling sigma +struct ring_stats { + float* buf; + size_t cap; + size_t head; + size_t count; + float sum; + float sumsq; +}; + +struct leak_conf { + // Sampling + filters + float sample_hz; + float lp_tau_s; // low-pass time constant for P,T + float b_tau_s; // slow background EWMA time constant + // Rolling stats for sigma_e + float sigma_window_s; + // Thresholds + float shewhart_k; // z-threshold + float shewhart_min_hold_s; // require sustain + float cusum_k_sigma; // reference k in units of sigma + float cusum_h_sigma; // decision h in units of sigma + float slow_alarm_min_s; // persistence for slow alarm + // Guards + float tprime_mask_abs; // ignore decisions when |t'| exceeds (e.g., 0.01 + // 1/s ~= 0.6 %/min) + float mask_relax_s; // duration to relax thresholds after mask event + // Hard rate backstop (optional; set <=0 to disable) + float hard_e_abs; // absolute e backstop in 1/s (e.g., 0.0005 -> 0.05%/s) +}; + +// Detector state +struct leak_det { + struct leak_conf cfg; + + // Filters + float alpha_lp; // EMA coeff for P,T + float alpha_b; // EWMA coeff for background b + float dt; // 1/sample_hz + + // State + bool inited; + float P_lp, T_lp; // low-pass filtered P,T + float P_prev, T_prev; + float b; // slow background estimate + struct ring_stats e_stats; // rolling stats for sigma_e + + // Derivative / residuals (latest) + float pprime, tprime, rprime, e, sigma_e, z; + + // Shewhart + int shewhart_hold_needed; // samples required to sustain + int shewhart_hold_count; + + // CUSUM + float cusum_k; // absolute (k = cfg.cusum_k_sigma * sigma_e) + float cusum_h; // absolute (h = cfg.cusum_h_sigma * sigma_e) + float Cplus, Cminus; + int slow_alarm_persist_needed; // samples + int slow_alarm_persist_count; + + // Masking + int relax_countdown; // samples left to relax after |t'| spike + + // Outputs + bool fast_leak_alarm; + bool slow_leak_alarm; +}; + +int leakdet_init(struct leak_det* ld, struct leak_conf* config); +void leakdet_update(struct leak_det* ld, + float P, + float T, + bool* fast_alarm, + bool* slow_alarm); + +extern volatile bool leakdet_tick; +void timing_tc2_init_5hz(void); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/Telemetry/app/src/led_facade.c b/Telemetry/app/src/led_facade.c new file mode 100644 index 00000000..1566f814 --- /dev/null +++ b/Telemetry/app/src/led_facade.c @@ -0,0 +1,44 @@ +/* + * led_facade.c - Simple app-facing API for WS2812 status LEDs (non-blocking) + */ + +#include "ws2812_spi_enc.h" +#include "ws2812_port_sercom0_harmony.h" // Harmony-backed port +#include "led_facade.h" + +#ifndef LED_COUNT +#define LED_COUNT 4 +#endif + +static ws2812_grb_t s_px[LED_COUNT]; +static uint8_t s_enc[LED_COUNT * WS2812_SPI_BYTES_PER_LED]; +static volatile bool s_inflight = false; + +static void _led_done(void *ctx) { (void)ctx; s_inflight = false; } + +void led_init(void) +{ + // SERCOM0 pins/clock and TC3 are configured by SYS_Initialize() (MCC/MHC). + ws2812enc_init(); // build LUT + ws2812_port_bind_sercom0_harmony(); // bind async SPI + TC3 latch + for (unsigned i = 0; i < LED_COUNT; ++i) { + s_px[i].g = s_px[i].r = s_px[i].b = 0; // Set all leds to 0 + } +} + +void led_set(uint8_t i, uint8_t r, uint8_t g, uint8_t b) +{ + if (i >= LED_COUNT) return; + s_px[i].g = g; s_px[i].r = r; s_px[i].b = b; // GRB order +} + +bool led_busy(void) { return s_inflight; } + +bool led_commit_async(void) +{ + if (s_inflight) return false; + ws2812enc_encode_grb(s_px, LED_COUNT, s_enc); + s_inflight = true; + size_t len = ws2812enc_buffer_bytes(LED_COUNT); + return ws2812_send_encoded_async(s_enc, len, _led_done, NULL); +} diff --git a/Telemetry/app/src/pressure_calc.c b/Telemetry/app/src/pressure_calc.c new file mode 100644 index 00000000..73d0ac71 --- /dev/null +++ b/Telemetry/app/src/pressure_calc.c @@ -0,0 +1,280 @@ +// #include "wsen_pads_port_sercom3.h" +// temperature T. Model: r' = dP/P - dT/T; estimate slow background b (hull +// compliance/depth drift), residual e = r' - b ~ dn/n, then Shewhart + CUSUM +// on e. + +#include "pressure_calc.h" +#include +#include +#include +#include +#include +#include "definitions.h" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +// Reasonable defaults +static inline struct leak_conf leak_conf_defaults(void) { + struct leak_conf c = { + .sample_hz = 5.0, + .lp_tau_s = 8.0, + .b_tau_s = 1200.0, // 20 min + .sigma_window_s = 1200.0, // 20 min + .shewhart_k = 4.0, + .shewhart_min_hold_s = 3.0, + .cusum_k_sigma = 0.5, + .cusum_h_sigma = 5.0, + .slow_alarm_min_s = 300.0, // 5 min + .tprime_mask_abs = 0.01, // 1%/s in normalized terms would be 0.01 1/s + .mask_relax_s = 20.0, + .hard_e_abs = 0.0}; + return c; +} + +static bool ring_init(struct ring_stats* r, size_t cap) { + r->buf = (float*)calloc(cap, sizeof(float)); + if (!r->buf) + return false; + r->cap = cap; + r->head = 0; + r->count = 0; + r->sum = 0.0; + r->sumsq = 0.0; + return true; +} + +static void ring_push(struct ring_stats* r, float x) { + if (r->count < r->cap) { + r->buf[r->head++] = x; + r->sum += x; + r->sumsq += x * x; + r->count++; + if (r->head == r->cap) + r->head = 0; + } else { + // overwrite oldest + size_t idx = r->head; + float old = r->buf[idx]; + r->buf[idx] = x; + r->sum += x - old; + r->sumsq += x * x - old * old; + r->head = (r->head + 1) % r->cap; + } +} + +static float ring_std(const struct ring_stats* r) { + if (r->count < 2) + return 0.0; + float n = (float)r->count; + float mu = r->sum / n; + float var = fmax(0.0, (r->sumsq - n * mu * mu) / (n - 1.0)); + return sqrt(var); +} + +// Utility for EMA alpha given tau and dt +static inline float ema_alpha(float tau_s, float dt_s) { + // matched to first-order RC: alpha = dt/(tau+dt) + if (tau_s <= 0.0) + return 1.0; // no filtering + return dt_s / (tau_s + dt_s); +} + +/** + * @brief Initialize a leak_det instance from a configuration. + * + * @param ld Pointer to the leak_det structure to initialize (must be non-NULL). + * @param config Optional pointer to a leak_conf; if NULL, default configuration + * is used. + * + * @return 0 on success, -1 if initialization failed. + */ +int leakdet_init(struct leak_det* ld, struct leak_conf* config) { + struct leak_conf cfg = (config ? *config : leak_conf_defaults()); + memset(ld, 0, sizeof(*ld)); + ld->cfg = cfg; + ld->dt = 1.0 / cfg.sample_hz; + ld->alpha_lp = ema_alpha(cfg.lp_tau_s, ld->dt); + ld->alpha_b = ema_alpha(cfg.b_tau_s, ld->dt); + ld->shewhart_hold_needed = + (int)ceil(cfg.shewhart_min_hold_s * cfg.sample_hz); + ld->slow_alarm_persist_needed = + (int)ceil(cfg.slow_alarm_min_s * cfg.sample_hz); + + size_t cap = (size_t)fmax(10.0, ceil(cfg.sigma_window_s * cfg.sample_hz)); + if (!ring_init(&ld->e_stats, cap)) + return -1; + + ld->inited = false; + return 0; +} + +/** + * @brief Process a single pressure/temperature sample, update the algorithm + * state in ld, refresh filtered/derived values and alarm timers, and produce + * alarm outputs. + * + * @param ld Pointer to the pressure-calculation state/context to be updated + * (mutable). + * @param P New pressure sample (kPa). + * @param T New temperature sample (°C). + * @param[out] fast_alarm Set to non-zero when an immediate/fast pressure alarm + * condition is detected. + * @param[out] slow_alarm Set to non-zero when a slower/longer-term pressure + * alarm condition is detected. + */ +void leakdet_update(struct leak_det* ld, + float P, + float T, + bool* fast_alarm, + bool* slow_alarm) { + /* Convert input units to internal units used by the detector */ + /* Pressure: kPa -> Pa */ + P = P * 1000.0f; + /* Temperature: degC -> K */ + T = T + 273.15f; + + if (!ld->inited) { + ld->P_lp = P; + ld->T_lp = T; + ld->P_prev = P; + ld->T_prev = T; + ld->b = 0.0; + ld->sigma_e = 1e-6; // small non-zero to start + ld->cusum_k = ld->cfg.cusum_k_sigma * ld->sigma_e; + ld->cusum_h = ld->cfg.cusum_h_sigma * ld->sigma_e; + ld->Cplus = ld->Cminus = 0.0; + ld->shewhart_hold_count = 0; + ld->slow_alarm_persist_count = 0; + ld->relax_countdown = 0; + ld->inited = true; + if (fast_alarm) + *fast_alarm = false; + if (slow_alarm) + *slow_alarm = false; + return; + } + + const float dt = ld->dt; + + // --- EMA low-pass + ld->P_lp = ld->P_lp + ld->alpha_lp * (P - ld->P_lp); + ld->T_lp = ld->T_lp + ld->alpha_lp * (T - ld->T_lp); + + // --- Derivatives (first-order difference on filtered signal) + float dP = (ld->P_lp - ld->P_prev) / dt; + float dT = (ld->T_lp - ld->T_prev) / dt; + ld->P_prev = ld->P_lp; + ld->T_prev = ld->T_lp; + + // Guard: avoid division by zero + float P_for_norm = (fabs(ld->P_lp) < 1e-6 ? 1e-6 : ld->P_lp); + float T_for_norm = (fabs(ld->T_lp) < 1e-6 ? 1e-6 : ld->T_lp); + + // --- Normalized rates + ld->pprime = dP / P_for_norm; // 1/s + ld->tprime = dT / T_for_norm; // 1/s + ld->rprime = ld->pprime - ld->tprime; + + // --- Background follower b (very slow EWMA of r') + ld->b = (1.0 - ld->alpha_b) * ld->b + ld->alpha_b * ld->rprime; + + // --- Residual ~ leak term + ld->e = ld->rprime - ld->b; + + // --- Rolling sigma_e + ring_push(&ld->e_stats, ld->e); + ld->sigma_e = ring_std(&ld->e_stats); + if (ld->sigma_e < 1e-9) + ld->sigma_e = 1e-9; // floor + + // Update CUSUM thresholds based on *current* sigma + ld->cusum_k = ld->cfg.cusum_k_sigma * ld->sigma_e; + ld->cusum_h = ld->cfg.cusum_h_sigma * ld->sigma_e; + + // Z-score for Shewhart + ld->z = ld->e / ld->sigma_e; + + // --- Masking around big thermal transients + bool masked = false; + if (fabs(ld->tprime) > ld->cfg.tprime_mask_abs) { + ld->relax_countdown = + (int)ceil(ld->cfg.mask_relax_s * ld->cfg.sample_hz); + } + if (ld->relax_countdown > 0) { + masked = true; + ld->relax_countdown--; + } + + // --- Shewhart (fast) + bool fast = false; + if (!masked) { + bool cond = fabs(ld->z) >= ld->cfg.shewhart_k; + if (ld->cfg.hard_e_abs > 0.0) + cond = cond || (fabs(ld->e) >= ld->cfg.hard_e_abs); + if (cond) { + if (++ld->shewhart_hold_count >= ld->shewhart_hold_needed) { + fast = true; + } + } else { + ld->shewhart_hold_count = 0; + } + } else { + // While masked, do not accumulate hold + ld->shewhart_hold_count = 0; + } + + // --- CUSUM (slow) + bool slow = false; + if (!masked) { + // one-sided CUSUMs + ld->Cplus = fmax(0.0, ld->Cplus + (ld->e - ld->cusum_k)); + ld->Cminus = fmax(0.0, ld->Cminus - (ld->e + ld->cusum_k)); + + bool trip = (ld->Cplus >= ld->cusum_h) || (ld->Cminus >= ld->cusum_h); + if (trip) { + if (++ld->slow_alarm_persist_count >= + ld->slow_alarm_persist_needed) { + slow = true; + } + } else { + // decay persistence when below threshold + if (ld->slow_alarm_persist_count > 0) + ld->slow_alarm_persist_count--; + // optional: small leakage of CUSUM over long time to avoid latching + float leak = + 0.0; // set e.g. to 0.001*cusum_h per sample if desired + if (ld->Cplus > 0.0) + ld->Cplus = fmax(0.0, ld->Cplus - leak); + if (ld->Cminus > 0.0) + ld->Cminus = fmax(0.0, ld->Cminus - leak); + } + } else { + // During mask, don't accumulate CUSUM + // (Optionally, you could still run but widen k/h.) + } + + ld->fast_leak_alarm = fast; + ld->slow_leak_alarm = slow; + if (fast_alarm) + *fast_alarm = fast; + if (slow_alarm) + *slow_alarm = slow; +} + +volatile bool leakdet_tick = false; // Set to true every 0.2s (5Hz frequency) + +static void tc2_cb(TC_TIMER_STATUS status, uintptr_t context) { + (void)context; + leakdet_tick = true; +} + +/** + * @brief Initializes a timer that sets leakdet_tick to true at a frequency of + * 5Hz. Used in main to call leakdet_update at the correct frequency. + */ +void timing_tc2_init_5hz(void) { + TC2_TimerCallbackRegister(tc2_cb, 0); + TC2_TimerStart(); +} diff --git a/Telemetry/drivers/leakage-sensor/include/leak_sensor_eic.h b/Telemetry/drivers/leakage-sensor/include/leak_sensor_eic.h new file mode 100644 index 00000000..d1e7cbfa --- /dev/null +++ b/Telemetry/drivers/leakage-sensor/include/leak_sensor_eic.h @@ -0,0 +1,15 @@ +#ifndef LEAK_SENSOR_EIC_H +#define LEAK_SENSOR_EIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +void leak_sensor_init(void); + +#ifdef __cplusplus +} + +#endif + +#endif \ No newline at end of file diff --git a/Telemetry/drivers/leakage-sensor/src/leak_sensor_eic.c b/Telemetry/drivers/leakage-sensor/src/leak_sensor_eic.c new file mode 100644 index 00000000..3b82d936 --- /dev/null +++ b/Telemetry/drivers/leakage-sensor/src/leak_sensor_eic.c @@ -0,0 +1,15 @@ +/* #include "plib_eic.h" +#include "plib_port.h" */ +#include "definitions.h" + +static void leak_sensor_isr(uintptr_t context) { + (void)context; + // TODO: handle leak (or set a bool and handle in main.c) +} + +void leak_sensor_init(void) { + PORT_PinPeripheralFunctionConfig(PORT_PIN_PA28, PERIPHERAL_FUNCTION_A); + + EIC_CallbackRegister(EIC_PIN_8, leak_sensor_isr, 0); + EIC_InterruptEnable(EIC_PIN_8); +} \ No newline at end of file diff --git a/Telemetry/drivers/ws2812/include/ws2812_port_sercom0_harmony.h b/Telemetry/drivers/ws2812/include/ws2812_port_sercom0_harmony.h new file mode 100644 index 00000000..b9fb9b82 --- /dev/null +++ b/Telemetry/drivers/ws2812/include/ws2812_port_sercom0_harmony.h @@ -0,0 +1,17 @@ +#ifndef WS2812_PORT_SERCOM0_HARMONY_H +#define WS2812_PORT_SERCOM0_HARMONY_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Bind the Harmony PLIB-backed async port (SERCOM0 SPI + TC3 timer) + * to the ws2812 encoder. Call once after SYS_Initialize(). + */ +void ws2812_port_bind_sercom0_harmony(void); + +#ifdef __cplusplus +} +#endif + +#endif /* WS2812_PORT_SERCOM0_HARMONY_H */ \ No newline at end of file diff --git a/Telemetry/drivers/ws2812/include/ws2812_spi_enc.h b/Telemetry/drivers/ws2812/include/ws2812_spi_enc.h new file mode 100644 index 00000000..ea112d4d --- /dev/null +++ b/Telemetry/drivers/ws2812/include/ws2812_spi_enc.h @@ -0,0 +1,80 @@ +/* + * ws2812_spi_enc.h + * + * Non-blocking 3-bit SPI encoder for WS2812/WS2812B. + * - Encoding: WS bit (1.25us) -> 3 SPI bits at ~2.4 MHz (0->100, 1->110) + * - SPI: Mode 0, MSB-first, continuous, NO gaps + * - Latch: keep DIN low for >= 80us after transfer + * + * This core is hardware-agnostic. You provide async TX callbacks + * (typically SPI+IRQ or SPI+DMAC on SAMC21) via ws2812enc_set_async_port(). + */ + +#ifndef WS2812_SPI_ENC_H +#define WS2812_SPI_ENC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +/* --- Constants --- */ +#define WS2812_SPI_BYTES_PER_COLOR (3u) /* 1 data byte -> 3 SPI bytes */ +#define WS2812_SPI_BYTES_PER_LED (9u) /* GRB -> 3 * 3 bytes */ +#define WS2812_RESET_US (80u) /* latch/reset low time (>= 80us) */ + +/* Pixel format (GRB order) */ +typedef struct { + uint8_t g; + uint8_t r; + uint8_t b; +} ws2812_grb_t; + +/* --- Core API (encoding only) --- */ +void ws2812enc_init(void); /* build LUT */ +size_t ws2812enc_buffer_bytes(size_t num_leds); /* n * 9 */ +void ws2812enc_byte_encode(uint8_t value, uint8_t out3[3]); +void ws2812enc_encode_grb(const ws2812_grb_t *in, size_t num_leds, uint8_t *out); +void ws2812enc_encode_bytes_grb(const uint8_t *grb_bytes, size_t num_leds, uint8_t *out); + +/* --- Async transmit port (to be implemented by platform) --- + * start: begin streaming 'data' (len bytes) out of SPI with NO gaps and return immediately. + * The port must call 'on_tx_done(user)' when the LAST bit has left the shifter. + * busy: true while the SPI/IRQ/DMA is still transmitting the current frame (optional). + * delay_us: schedule a non-blocking >=us delay and invoke 'on_delay_done(user)' for the latch. + */ +typedef void (*ws_on_tx_done_t)(void *user); +typedef void (*ws_on_delay_done_t)(void *user); + +typedef bool (*ws_async_busy_fn_t)(void); +typedef int (*ws_async_start_fn_t)(const uint8_t *data, size_t len, ws_on_tx_done_t on_tx_done, void *user); +typedef int (*ws_async_delay_fn_t)(uint32_t us, ws_on_delay_done_t on_delay_done, void *user); + +void ws2812enc_set_async_port(ws_async_start_fn_t start_fn, + ws_async_busy_fn_t busy_fn, + ws_async_delay_fn_t delay_fn); + +/* --- High-level non-blocking send orchestration --- + * Manages send + latch sequencing using the async port. + */ + +/* Start sending an already-encoded buffer (returns immediately). + * When complete (including latch), your 'user_done_cb(user)' is called. + */ +typedef void (*ws_user_done_cb_t)(void *user); + +int ws2812_send_encoded_async(const uint8_t *encoded, size_t len, ws_user_done_cb_t user_done_cb, void *user); + +/* Convenience: encode then send. Caller provides encoded_out buffer memory. */ +int ws2812_encode_and_send_async(const ws2812_grb_t *pixels, size_t num_leds, + uint8_t *encoded_out, size_t encoded_out_len, + ws_user_done_cb_t user_done_cb, void *user); + +#ifdef __cplusplus +} +#endif + +#endif /* WS2812_SPI_ENC_H */ diff --git a/Telemetry/drivers/ws2812/src/ws2812_port_sercom0_harmony.c b/Telemetry/drivers/ws2812/src/ws2812_port_sercom0_harmony.c new file mode 100644 index 00000000..a76b05c4 --- /dev/null +++ b/Telemetry/drivers/ws2812/src/ws2812_port_sercom0_harmony.c @@ -0,0 +1,93 @@ +/* + * ws2812_port_sercom0_harmony.c + * Harmony-backed async port for WS2812 on SAMC21 + * + * - Uses SERCOM0 SPI Master PLIB non-blocking write + callback + * - Uses TC3 Timer PLIB one-shot for >=80 us latch + * Assumes SERCOM0 and TC3 are configured & pins muxed in MCC/MHC (SYS_Initialize). + */ + +#include "definitions.h" // Harmony PLIBs +#include "ws2812_spi_enc.h" +#include "ws2812_port_sercom0_harmony.h" + +static ws_on_tx_done_t s_tx_done_cb; +static void* s_tx_done_ctx; +static ws_on_delay_done_t s_delay_cb; +static void* s_delay_ctx; + +/* ---------- SERCOM0 SPI non-blocking TX ---------- */ +static void sercom0_spi_cb(uintptr_t context) +{ + (void)context; + if (s_tx_done_cb) s_tx_done_cb(s_tx_done_ctx); +} + +static int start_spi5_write(const uint8_t* data, size_t len, + ws_on_tx_done_t on_tx_done, void* user) +{ + s_tx_done_cb = on_tx_done; + s_tx_done_ctx = user; + + SERCOM0_SPI_CallbackRegister(sercom0_spi_cb, 0); + return SERCOM0_SPI_Write((void*)data, len) ? 1 : 0; // returns immediately +} + +static bool spi5_busy(void) +{ + return SERCOM0_SPI_IsBusy(); +} + +/* ------------------ Latch via TC3 (one-shot >=80 us) ------------------ */ +/* PLIB exposes 16-bit Timer APIs and TC_TIMER_CALLBACK. */ + +static ws_on_delay_done_t s_delay_cb; +static void* s_delay_ctx; + +/* Harmony TC_TIMER_CALLBACK is typically: void (*cb)(uint32_t status, uintptr_t ctx) */ +static void tc3_cb(uint32_t status, uintptr_t context) +{ + (void)status; (void)context; + TC3_TimerStop(); + if (s_delay_cb) s_delay_cb(s_delay_ctx); +} + +/* Utility wrappers for the 16-bit API names you have */ +static inline void tc3_counter_set(uint32_t v) +{ + TC3_Timer16bitCounterSet((uint16_t)v); +} + +static inline void tc3_period_set(uint32_t v) +{ + TC3_Timer16bitPeriodSet((uint16_t)v); +} + +static int delay_us_tc3(uint32_t us, ws_on_delay_done_t on_delay_done, void* user) +{ + s_delay_cb = on_delay_done; + s_delay_ctx = user; + + /* Convert microseconds to TC ticks using the actual TC3 frequency. */ + uint32_t freq = TC3_TimerFrequencyGet(); // Hz + uint32_t ticks = (uint32_t)(((uint64_t)us * freq) / 1000000ULL); + if (ticks == 0) ticks = 1; + if (ticks > 0xFFFFu) ticks = 0xFFFFu; // clamp to 16-bit + + TC3_TimerCallbackRegister((TC_TIMER_CALLBACK)tc3_cb, 0); + TC3_TimerStop(); + tc3_counter_set(0); + tc3_period_set(ticks); + + /* Some MCC versions require a command to load period; if you see no callback, + you can add: TC3_TimerCommandSet(TC_COMMAND_START); instead of TimerStart. */ + TC3_TimerStart(); + return 1; +} + +/* -------- Bind Harmony-backed port to encoder -------- */ +void ws2812_port_bind_sercom0_harmony(void) +{ + // SERCOM0 & TC3 must be initialized by SYS_Initialize() (MCC/MHC). + ws2812enc_set_async_port(start_spi5_write, spi5_busy, delay_us_tc3); +} diff --git a/Telemetry/drivers/ws2812/src/ws2812_spi_enc.c b/Telemetry/drivers/ws2812/src/ws2812_spi_enc.c new file mode 100644 index 00000000..7cd51a73 --- /dev/null +++ b/Telemetry/drivers/ws2812/src/ws2812_spi_enc.c @@ -0,0 +1,134 @@ +/* + * ws2812_spi_enc.c (non-blocking core) + */ + +#include "ws2812_spi_enc.h" + +/* Internal LUT: each input byte expands to 24 bits = 3 output bytes */ +static uint8_t s_lut[256][3]; + +/* Async port callbacks */ +static ws_async_start_fn_t g_start_fn = 0; +static ws_async_busy_fn_t g_busy_fn = 0; +static ws_async_delay_fn_t g_delay_fn = 0; + +/* Forward internal callbacks */ +static void _on_tx_done(void *user); +static void _on_latch_done(void *user); + +/* Small state for sequencing TX -> latch -> user done */ +typedef struct { + ws_user_done_cb_t user_done; + void *user_ctx; +} ws_state_t; + +static void build_lut_3x(void) +{ + #define SYM0 0x4u /* 0b100 */ + #define SYM1 0x6u /* 0b110 */ + for (unsigned v = 0; v < 256; ++v) { + uint32_t stream = 0; + int bitpos = 23; + for (int b = 7; b >= 0; --b) { + unsigned in_bit = (v >> b) & 1u; + unsigned sym = in_bit ? SYM1 : SYM0; + for (int s = 2; s >= 0; --s) { + unsigned sb = (sym >> s) & 1u; + if (sb) stream |= (1u << bitpos); + --bitpos; + } + } + s_lut[v][0] = (uint8_t)((stream >> 16) & 0xFF); + s_lut[v][1] = (uint8_t)((stream >> 8) & 0xFF); + s_lut[v][2] = (uint8_t)( stream & 0xFF); + } +} + +void ws2812enc_init(void) { build_lut_3x(); } + +size_t ws2812enc_buffer_bytes(size_t num_leds) { return num_leds * (size_t)WS2812_SPI_BYTES_PER_LED; } + +void ws2812enc_byte_encode(uint8_t value, uint8_t out3[3]) +{ + out3[0] = s_lut[value][0]; + out3[1] = s_lut[value][1]; + out3[2] = s_lut[value][2]; +} + +void ws2812enc_encode_grb(const ws2812_grb_t *in, size_t num_leds, uint8_t *out) +{ + size_t w = 0; + for (size_t i = 0; i < num_leds; ++i) { + const ws2812_grb_t *px = &in[i]; + const uint8_t *lg = s_lut[px->g]; + const uint8_t *lr = s_lut[px->r]; + const uint8_t *lb = s_lut[px->b]; + out[w+0] = lg[0]; out[w+1] = lg[1]; out[w+2] = lg[2]; + out[w+3] = lr[0]; out[w+4] = lr[1]; out[w+5] = lr[2]; + out[w+6] = lb[0]; out[w+7] = lb[1]; out[w+8] = lb[2]; + w += WS2812_SPI_BYTES_PER_LED; + } +} + +void ws2812enc_encode_bytes_grb(const uint8_t *grb_bytes, size_t num_leds, uint8_t *out) +{ + size_t w = 0, in_idx = 0; + for (size_t i = 0; i < num_leds; ++i) { + const uint8_t *lg = s_lut[grb_bytes[in_idx + 0]]; /* G */ + const uint8_t *lr = s_lut[grb_bytes[in_idx + 1]]; /* R */ + const uint8_t *lb = s_lut[grb_bytes[in_idx + 2]]; /* B */ + out[w+0] = lg[0]; out[w+1] = lg[1]; out[w+2] = lg[2]; + out[w+3] = lr[0]; out[w+4] = lr[1]; out[w+5] = lr[2]; + out[w+6] = lb[0]; out[w+7] = lb[1]; out[w+8] = lb[2]; + w += WS2812_SPI_BYTES_PER_LED; + in_idx += 3; + } +} + +/* --- Async port binding --- */ +void ws2812enc_set_async_port(ws_async_start_fn_t start_fn, + ws_async_busy_fn_t busy_fn, + ws_async_delay_fn_t delay_fn) +{ + g_start_fn = start_fn; + g_busy_fn = busy_fn; + g_delay_fn = delay_fn; +} + +/* User-facing async send: already-encoded buffer */ +int ws2812_send_encoded_async(const uint8_t *encoded, size_t len, ws_user_done_cb_t user_done_cb, void *user) +{ + if (!g_start_fn || !g_delay_fn) return 0; + static ws_state_t s; /* single in-flight; extend if multi-buffer */ + s.user_done = user_done_cb; + s.user_ctx = user; + /* Start async TX; when hardware finishes last bit, _on_tx_done will run */ + return g_start_fn(encoded, len, _on_tx_done, &s); +} + +/* Convenience: encode then send. Caller provides the encoded buffer memory. */ +int ws2812_encode_and_send_async(const ws2812_grb_t *pixels, size_t num_leds, + uint8_t *encoded_out, size_t encoded_out_len, + ws_user_done_cb_t user_done_cb, void *user) +{ + const size_t need = ws2812enc_buffer_bytes(num_leds); + if (encoded_out_len < need) return 0; + ws2812enc_encode_grb(pixels, num_leds, encoded_out); + return ws2812_send_encoded_async(encoded_out, need, user_done_cb, user); +} + +/* --- Internal async chain: TX done -> start latch timer -> latch done -> user callback --- */ +static void _on_tx_done(void *user) +{ + (void)user; + if (g_delay_fn) { + /* schedule >= 80us latch delay; then call _on_latch_done */ + g_delay_fn(WS2812_RESET_US, _on_latch_done, user); + } +} + +static void _on_latch_done(void *user) +{ + ws_state_t *s = (ws_state_t *)user; + if (s && s->user_done) s->user_done(s->user_ctx); +} diff --git a/Telemetry/drivers/wsen-pads/include/wsen_pads_port_sercom3.h b/Telemetry/drivers/wsen-pads/include/wsen_pads_port_sercom3.h new file mode 100644 index 00000000..376c9525 --- /dev/null +++ b/Telemetry/drivers/wsen-pads/include/wsen_pads_port_sercom3.h @@ -0,0 +1,26 @@ +#ifndef WSEN_PADS_PORT_SERCOM3_H +#define WSEN_PADS_PORT_SERCOM3_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include "definitions.h" + +int wsen_init(void); +int wsen_check_device_id(void); +void spi_init(void); +void drdy_init(void); +void wsen_cycle_start(void); +void wsen_cycle_tick(void); +bool wsen_cycle_done_ok(float* kPa, float* degC); +bool wsen_cycle_failed(void); +void wsen_reset(void); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/Telemetry/drivers/wsen-pads/src/wsen_pads_port_sercom3.c b/Telemetry/drivers/wsen-pads/src/wsen_pads_port_sercom3.c new file mode 100644 index 00000000..27d8de18 --- /dev/null +++ b/Telemetry/drivers/wsen-pads/src/wsen_pads_port_sercom3.c @@ -0,0 +1,293 @@ +#include +#include +#include "definitions.h" + +#define WSEN_PADS_ADDR 0x5D // SAO = 1 (0x5C if SAO = 0) + +// Register addresses +#define REG_DEVICE_ID 0x0F +#define REG_CTRL_1 0x10 +#define REG_CTRL_3 0x12 +#define REG_STATUS 0x27 +#define REG_DATA_P_XL 0x28 +#define REG_DATA_T_L 0x2B + +#define EXPECTED_DEVICE_ID 0xB3 + +typedef enum { + WSEN_IDLE = 0, + WSEN_START, // initiate read of 5 bytes (pressure + temp) + WSEN_WAIT, // waiting for callback (when the WriteRead is finished) + WSEN_DONE, + WSEN_ERROR +} WSEN_STATE; + +struct wsen_cycle { + volatile WSEN_STATE state; + volatile bool done; + + volatile float last_pressure; + volatile float last_temp; + + uint8_t read_buf[5]; +}; + +static struct wsen_cycle cycle; + +/* static bool read_measurements(uint8_t* reg, + uint8_t* buf, + uint8_t len, + bool is_read) { + if (is_read) { + return SERCOM3_SPI_WriteRead(®, 1, cycle.read_buf, 5); + } +} */ +static void wsen_cs_set(bool on) { + if (on) { + PORT_REGS->GROUP[0].PORT_OUTSET = (1 << 7); // Set PA7 high (CS for WSEN PADS on) + } else { + PORT_REGS->GROUP[0].PORT_OUTCLR = (1 << 7); // Set PA7 low + } +} + +/** + * @brief Initializes WSEN PADS --> sets output data rate, enables the block + * data update feature and enables data ready interrupts. + * @return -1 on failure to write to wsen-pads registers, 0 otherwise. + */ +int wsen_init(void) { + uint8_t buf[2]; + + // Set sampling rate + uint8_t ctrl1 = 0x72; // ODR 200Hz and BDU high + buf[0] = REG_CTRL_1; + buf[1] = ctrl1; + + wsen_cs_set(true); + if (!SERCOM3_SPI_Write(buf, 2)) { + wsen_cs_set(false); + return -1; + }; + // Enable data ready interrupts + uint8_t ctrl3 = 0x04; // DRDY = 1, INT_S = 00 + buf[0] = REG_CTRL_3; + buf[1] = ctrl3; + + if (!SERCOM3_SPI_Write(buf, 2)) { + wsen_cs_set(false); + return -1; + }; + + wsen_cs_set(false); + return 0; +} + +/** + * @brief Can be used to check successful connection with wsen-pads. + * @return -1 on failure, 0 otherwise. + */ +int wsen_check_device_id(void) { + uint8_t reg = REG_DEVICE_ID | 0x80; // MSB 1 for read + uint8_t device_id = 0; + if (!SERCOM3_SPI_WriteRead(®, 1, &device_id, 1)) { + return -1; + }; + + if (device_id == EXPECTED_DEVICE_ID) { + return 0; + } else { + return -1; + } +} + +// Helper function that reads the 5 wsen-pads registers containing the pressure +// and temperature data. +static bool read_measurements() { + uint8_t reg = REG_DATA_P_XL | 0x80; // MSB is 1 for read + wsen_cs_set(true); + bool result = SERCOM3_SPI_WriteRead(®, 1, cycle.read_buf, 5); + wsen_cs_set(false); + return result; +} + +static void sercom3_spi_cb(uintptr_t context) { + (void)context; + + switch (cycle.state) { + case WSEN_WAIT: { + int32_t raw_p = + (int32_t)((cycle.read_buf[2] << 16) | (cycle.read_buf[1] << 8) | + cycle.read_buf[0]); + if (raw_p & 0x00800000) + raw_p |= 0xFF000000; + cycle.last_pressure = (float)raw_p / 40960.0f; + + int16_t raw_t = + (int16_t)((cycle.read_buf[4] << 8) | cycle.read_buf[3]); + cycle.last_temp = (float)raw_t * 0.01f; // 0.01 °C per LSB + + cycle.state = WSEN_DONE; + cycle.done = true; + break; + } + + default: + cycle.state = WSEN_ERROR; + cycle.done = true; + break; + } +} + +void spi_init(void) { + SERCOM3_SPI_CallbackRegister(sercom3_spi_cb, 0); + cycle.state = WSEN_IDLE; + cycle.done = false; +} + +void wsen_cycle_start(void) { + if (cycle.state != WSEN_IDLE && cycle.state != WSEN_DONE && + cycle.state != WSEN_ERROR) { + return; // already running + } + cycle.done = false; + cycle.state = WSEN_START; + + if (!read_measurements()) { + // If SPI was busy, we'll retry from main loop by calling + // wsen_cycle_tick() + cycle.state = WSEN_START; + } else { + cycle.state = WSEN_WAIT; + } +} + +/** + * @brief Used in the main loop to try reading measurements from the WSEN PADS + * if the measurement cycle is in the WSEN_START state. + */ +void wsen_cycle_tick(void) { + if (cycle.state == WSEN_START) { + if (read_measurements()) { + cycle.state = WSEN_WAIT; + } + } +} + +/** + * @brief Check whether the latest measurement cycle completed successfully and + * obtain the last readings. + * + * @param[out] kPa Pointer to a float that will receive the last measured + * absolute pressure in kilopascals (kPa). Must be a valid, writable pointer + * when the function returns true. + * @param[out] degC Pointer to a float that will receive the last measured + * temperature in degrees Celsius (°C). Must be a valid, writable pointer when + * the function returns true. + * @return false if a measurement cycle is not done or if the driver is in an + * error state, true otherwise. + */ +bool wsen_cycle_done_ok(float* kPa, float* degC) { + if (!cycle.done || cycle.state == WSEN_ERROR) + return false; + *kPa = cycle.last_pressure; + *degC = cycle.last_temp; + return true; +} + +bool wsen_cycle_failed(void) { + if (cycle.state == WSEN_ERROR) { + return true; + } + return false; +}; + +/** + * @brief Reset the WSEN PADS driver cycle to its initial, idle state. + * + * @note This routine modifies global driver state. Call it to abort an ongoing + * cycle, to reinitialize the driver after an error, or before starting a fresh + * transaction. + */ +void wsen_reset(void) { + cycle.state = WSEN_IDLE; + cycle.done = false; +} + +static void drdy_isr(uintptr_t context) { + (void)context; + wsen_cycle_start(); +} + +/** + * @brief Configures the interrupt pin from the WSEN PADS which generates + * interrupts when pressure data is ready. The callback function will start a + * new measurement cycle. + */ +void drdy_init(void) { + PORT_PinPeripheralFunctionConfig(PORT_PIN_PA18, PERIPHERAL_FUNCTION_A); + + EIC_CallbackRegister(EIC_PIN_2, drdy_isr, 0); + EIC_InterruptEnable(EIC_PIN_2); +} + +// This function uses polling to check if the pressure data is ready before +// reading. It is currently not used in the code as we use the interrupt pin +// instead. +int read_pressure(float* pressure) { + uint8_t status = 0; + uint8_t rawData[3]; + int32_t rawPressure; + + uint8_t reg = REG_STATUS; + // Wait until new pressure data available (P_DA bit = 1) + do { + SERCOM3_SPI_WriteRead(®, 1, &status, 1); + } while (!(status & 0x01)); + + // Read the 3 pressure registers (XL, L, H) + reg = REG_DATA_P_XL; + if (!SERCOM3_SPI_WriteRead(®, 1, rawData, 3)) { + return -1; + }; + + // Combine into signed 24-bit value + rawPressure = + (int32_t)((rawData[2] << 16) | (rawData[1] << 8) | rawData[0]); + if (rawPressure & 0x00800000) { // Sign extend negative numbers + rawPressure |= 0xFF000000; + } + + // Convert to kPa using sensitivity 1/40960 kPa/digit + *pressure = (float)rawPressure / 40960.0f; + + return 0; +} + +// This function uses polling to check if the temperature data is ready before +// reading. It is currently not used in the code as we use the interrupt pin +// instead. +int read_temp(float* temp) { + uint8_t status = 0; + uint8_t rawData[2]; + int16_t rawTemp; + + // Wait until new temperature data available (T_DA bit = 1) + uint8_t reg = REG_STATUS; + do { + SERCOM3_SPI_WriteRead(®, 1, &status, 1); + } while (!(status & 0x02)); + + reg = REG_DATA_T_L; + // Read 2 temperature bytes: L, H + if (!SERCOM3_SPI_WriteRead(®, 1, rawData, 2)) { + return -1; + }; + + // Combine into signed 16-bit value + rawTemp = (int16_t)((rawData[1] << 8) | rawData[0]); + + // Convert to °C (0.01 °C per digit) + *temp = (float)rawTemp * 0.01f; + + return 0; +} diff --git a/Telemetry/src/config/default/ATSAMC21J18A.ld b/Telemetry/src/config/default/ATSAMC21J18A.ld new file mode 100644 index 00000000..53cd639e --- /dev/null +++ b/Telemetry/src/config/default/ATSAMC21J18A.ld @@ -0,0 +1,241 @@ +/*-------------------------------------------------------------------------- + * MPLAB XC32 Compiler - ATSAMC21J18A linker script + * + * Copyright (c) 2022, Microchip Technology Inc. and its subsidiaries ("Microchip") + * All rights reserved. + * + * This software is developed by Microchip Technology Inc. and its + * subsidiaries ("Microchip"). + * + * 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. Microchip's name may not be used to endorse or promote products + * derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY MICROCHIP "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL MICROCHIP 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) HOWSOEVER 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. + * + */ + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) +SEARCH_DIR(.) + +/* + * Define the __XC32_RESET_HANDLER_NAME macro on the command line when you + * want to use a different name for the Reset Handler function. + */ +#ifndef __XC32_RESET_HANDLER_NAME +#define __XC32_RESET_HANDLER_NAME Reset_Handler +#endif /* __XC32_RESET_HANDLER_NAME */ + +/* Set the entry point in the ELF file. Once the entry point is in the ELF + * file, you can then use the --write-sla option to xc32-bin2hex to place + * the address into the hex file using the SLA field (RECTYPE 5). This hex + * record may be useful for a bootloader that needs to determine the entry + * point to the application. + */ +ENTRY(__XC32_RESET_HANDLER_NAME) + +/************************************************************************* + * Memory-Region Macro Definitions + * The XC32 linker preprocesses linker scripts. You may define these + * macros in the MPLAB X project properties or on the command line when + * calling the linker via the xc32-gcc shell. + *************************************************************************/ + +#ifndef ROM_ORIGIN +# define ROM_ORIGIN 0x0 +#endif +#ifndef ROM_LENGTH +# define ROM_LENGTH 0x40000 +#elif (ROM_LENGTH > 0x40000) +# error ROM_LENGTH is greater than the max size of 0x40000 +#endif +#ifndef RAM_ORIGIN +# define RAM_ORIGIN 0x20000000 +#endif +#ifndef RAM_LENGTH +# define RAM_LENGTH 0x8000 +#elif (RAM_LENGTH > 0x8000) +# error RAM_LENGTH is greater than the max size of 0x8000 +#endif + + +/************************************************************************* + * Memory-Region Definitions + * The MEMORY command describes the location and size of blocks of memory + * on the target device. The command below uses the macros defined above. + *************************************************************************/ +MEMORY +{ + rom (LRX) : ORIGIN = ROM_ORIGIN, LENGTH = ROM_LENGTH + ram (WX!R) : ORIGIN = RAM_ORIGIN, LENGTH = RAM_LENGTH + config_00804000 : ORIGIN = 0x00804000, LENGTH = 0x4 + config_00804004 : ORIGIN = 0x00804004, LENGTH = 0x4 + +} +/************************************************************************* + * Output region definitions. + * CODE_REGION defines the output region for .text/.rodata. + * DATA_REGION defines the output region for .data/.bss + * VECTOR_REGION defines the output region for .vectors. + * + * CODE_REGION defaults to 'rom', if rom is present (non-zero length), + * and 'ram' otherwise. + * DATA_REGION defaults to 'ram', which must be present. + * VECTOR_REGION defaults to CODE_REGION, unless 'boot_rom' is present. + */ +#ifndef CODE_REGION +# if ROM_LENGTH > 0 +# define CODE_REGION rom +# else +# define CODE_REGION ram +# endif +#endif +#ifndef DATA_REGION +# define DATA_REGION ram +#endif +#ifndef VECTOR_REGION +# define VECTOR_REGION CODE_REGION +#endif + +__rom_end = ORIGIN(rom) + LENGTH(rom); +__ram_end = ORIGIN(ram) + LENGTH(ram); + +/************************************************************************* + * Section Definitions - Map input sections to output sections + *************************************************************************/ +SECTIONS +{ + .config_00804000 : { + KEEP(*(.config_00804000)) + } > config_00804000 + .config_00804004 : { + KEEP(*(.config_00804004)) + } > config_00804004 + + /* + * The linker moves the .vectors section into itcm when itcm is + * enabled via the -mitcm option, but only when this .vectors output + * section exists in the linker script. + */ + .vectors : + { + . = ALIGN(4); + _sfixed = .; + KEEP(*(.vectors .vectors.* .vectors_default .vectors_default.*)) + KEEP(*(.isr_vector)) + KEEP(*(.reset*)) + KEEP(*(.after_vectors)) + } > VECTOR_REGION + /* + * Code Sections - Note that standard input sections such as + * *(.text), *(.text.*), *(.rodata), & *(.rodata.*) + * are not mapped here. The best-fit allocator locates them, + * so that input sections may flow around absolute sections + * as needed. + */ + .text : + { + . = ALIGN(4); + *(.glue_7t) *(.glue_7) + *(.gnu.linkonce.r.*) + *(.ARM.extab* .gnu.linkonce.armextab.*) + + /* Support C constructors, and C destructors in both user code + and the C library. This also provides support for C++ code. */ + . = ALIGN(4); + KEEP(*(.init)) + . = ALIGN(4); + __preinit_array_start = .; + KEEP (*(.preinit_array)) + __preinit_array_end = .; + + . = ALIGN(4); + __init_array_start = .; + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array)) + __init_array_end = .; + + . = ALIGN(0x4); + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*crtend.o(.ctors)) + + . = ALIGN(4); + KEEP(*(.fini)) + + . = ALIGN(4); + __fini_array_start = .; + KEEP (*(.fini_array)) + KEEP (*(SORT(.fini_array.*))) + __fini_array_end = .; + + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*crtend.o(.dtors)) + + . = ALIGN(4); + _efixed = .; /* End of text section */ + } > CODE_REGION + + /* .ARM.exidx is sorted, so has to go in its own output section. */ + PROVIDE_HIDDEN (__exidx_start = .); + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > CODE_REGION + PROVIDE_HIDDEN (__exidx_end = .); + + . = ALIGN(4); + _etext = .; + + + /* + * Align here to ensure that the .bss section occupies space up to + * _end. Align after .bss to ensure correct alignment even if the + * .bss section disappears because there are no input sections. + * + * Note that input sections named .bss* are no longer mapped here. + * The best-fit allocator locates them, so that they may flow + * around absolute sections as needed. + */ + .bss (NOLOAD) : + { + . = ALIGN(4); + __bss_start__ = .; + _sbss = . ; + _szero = .; + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + _ebss = . ; + _ezero = .; + } > DATA_REGION + + . = ALIGN(4); + _end = . ; + _ram_end_ = ORIGIN(ram) + LENGTH(ram) -1 ; + +} + diff --git a/Telemetry/src/config/default/definitions.h b/Telemetry/src/config/default/definitions.h new file mode 100644 index 00000000..e8579a52 --- /dev/null +++ b/Telemetry/src/config/default/definitions.h @@ -0,0 +1,152 @@ +/******************************************************************************* + System Definitions + + File Name: + definitions.h + + Summary: + project system definitions. + + Description: + This file contains the system-wide prototypes and definitions for a project. + + *******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + *******************************************************************************/ +//DOM-IGNORE-END + +#ifndef DEFINITIONS_H +#define DEFINITIONS_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include +#include +#include +#include +#include "peripheral/sercom/spi_master/plib_sercom3_spi_master.h" +#include "peripheral/nvmctrl/plib_nvmctrl.h" +#include "peripheral/sercom/usart/plib_sercom2_usart.h" +#include "peripheral/sercom/usart/plib_sercom1_usart.h" +#include "peripheral/sercom/spi_master/plib_sercom0_spi_master.h" +#include "peripheral/evsys/plib_evsys.h" +#include "peripheral/port/plib_port.h" +#include "peripheral/clock/plib_clock.h" +#include "peripheral/nvic/plib_nvic.h" +#include "peripheral/can/plib_can0.h" +#include "peripheral/eic/plib_eic.h" +#include "peripheral/tc/plib_tc3.h" +#include "peripheral/tc/plib_tc2.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif +// DOM-IGNORE-END + +/* Device Information */ +#define DEVICE_NAME "ATSAMC21J18A" +#define DEVICE_ARCH "CORTEX-M0PLUS" +#define DEVICE_FAMILY "SAMC" +#define DEVICE_SERIES "SAMC21" + +/* CPU clock frequency */ +#define CPU_CLOCK_FREQUENCY 48000000U + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Functions +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* System Initialization Function + + Function: + void SYS_Initialize( void *data ) + + Summary: + Function that initializes all modules in the system. + + Description: + This function initializes all modules in the system, including any drivers, + services, middleware, and applications. + + Precondition: + None. + + Parameters: + data - Pointer to the data structure containing any data + necessary to initialize the module. This pointer may + be null if no data is required and default initialization + is to be used. + + Returns: + None. + + Example: + + SYS_Initialize ( NULL ); + + while ( true ) + { + SYS_Tasks ( ); + } + + + Remarks: + This function will only be called once, after system reset. +*/ + +void SYS_Initialize( void *data ); + +/* Nullify SYS_Tasks() if only PLIBs are used. */ +#define SYS_Tasks() + +// ***************************************************************************** +// ***************************************************************************** +// Section: extern declarations +// ***************************************************************************** +// ***************************************************************************** + + + + +//DOM-IGNORE-BEGIN +#ifdef __cplusplus +} +#endif +//DOM-IGNORE-END + +#endif /* DEFINITIONS_H */ +/******************************************************************************* + End of File +*/ + diff --git a/Telemetry/src/config/default/device.h b/Telemetry/src/config/default/device.h new file mode 100644 index 00000000..515d6b3b --- /dev/null +++ b/Telemetry/src/config/default/device.h @@ -0,0 +1,65 @@ +/******************************************************************************* + Device Header File + + Company: + Microchip Technology Inc. + + File Name: + device.h + + Summary: + This file includes the selected device from within the project. + The device will provide access to respective device packs. + + Description: + None + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef DEVICE_H +#define DEVICE_H + +#pragma GCC diagnostic push +#ifndef __cplusplus +#pragma GCC diagnostic ignored "-Wnested-externs" +#endif +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wattributes" +#pragma GCC diagnostic ignored "-Wundef" +#ifndef DONT_USE_PREDEFINED_CORE_HANDLERS + #define DONT_USE_PREDEFINED_CORE_HANDLERS +#endif //DONT_USE_PREDEFINED_CORE_HANDLERS +#ifndef DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS + #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS +#endif //DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS +#include "samc21j18a.h" +#pragma GCC diagnostic pop +#include "device_cache.h" +#include "toolchain_specifics.h" + +#endif //DEVICE_H diff --git a/Telemetry/src/config/default/device_cache.h b/Telemetry/src/config/default/device_cache.h new file mode 100644 index 00000000..891f8294 --- /dev/null +++ b/Telemetry/src/config/default/device_cache.h @@ -0,0 +1,94 @@ +/******************************************************************************* + Cortex-M L1 Cache Header + + File Name: + device_cache.h + + Summary: + Preprocessor definitions to provide L1 Cache control. + + Description: + An MPLAB PLIB or Project can include this header to perform cache cleans, + invalidates etc. For the DCache and ICache. + + Remarks: + This header should not define any prototypes or data definitions, or + include any files that do. The file only provides macro definitions for + build-time. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef DEVICE_CACHE_H +#define DEVICE_CACHE_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section Includes other configuration headers necessary to completely + define this configuration. +*/ + +#include "device.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: L1 Cache Configuration +// ***************************************************************************** +// ***************************************************************************** + + +#define ICACHE_ENABLE() +#define ICACHE_DISABLE() +#define ICACHE_INVALIDATE() + +#define DCACHE_ENABLE() +#define DCACHE_DISABLE() +#define DCACHE_INVALIDATE() +#define DCACHE_CLEAN() +#define DCACHE_CLEAN_INVALIDATE() +#define DCACHE_CLEAN_BY_ADDR(addr,sz) +#define DCACHE_INVALIDATE_BY_ADDR(addr,sz) +#define DCACHE_CLEAN_INVALIDATE_BY_ADDR(addr,sz) + +//DOM-IGNORE-BEGIN +#ifdef __cplusplus +} +#endif +//DOM-IGNORE-END + +#endif // #ifndef DEVICE_CACHE_H diff --git a/Telemetry/src/config/default/device_vectors.h b/Telemetry/src/config/default/device_vectors.h new file mode 100644 index 00000000..0ae18399 --- /dev/null +++ b/Telemetry/src/config/default/device_vectors.h @@ -0,0 +1,118 @@ +/******************************************************************************* + Cortex-M device vectors file + + Company: + Microchip Technology Inc. + + File Name: + device_vectors.h + + Summary: + Harmony3 device handler structure for cortex-M devices + + Description: + This file contains Harmony3 device handler structure for cortex-M devices + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + *******************************************************************************/ +// DOM-IGNORE-END + +#ifndef DEVICE_VECTORS_H +#define DEVICE_VECTORS_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** + +/* Function pointer type for vector handlers */ +typedef void (*pfn_handler_t)(void); + +/* Structure defining device vector types */ +typedef struct H3DeviceVectorsTag +{ + /* Stack pointer */ + uint32_t* pvStack; + + /* CORTEX-M0PLUS handlers */ + pfn_handler_t pfnReset_Handler; /* -15 Reset Vector, invoked on Power up and warm reset */ + pfn_handler_t pfnNonMaskableInt_Handler; /* -14 Non maskable Interrupt, cannot be stopped or preempted */ + pfn_handler_t pfnHardFault_Handler; /* -13 Hard Fault, all classes of Fault */ + pfn_handler_t pfnReservedC12; + pfn_handler_t pfnReservedC11; + pfn_handler_t pfnReservedC10; + pfn_handler_t pfnReservedC9; + pfn_handler_t pfnReservedC8; + pfn_handler_t pfnReservedC7; + pfn_handler_t pfnReservedC6; + pfn_handler_t pfnSVCall_Handler; /* -5 System Service Call via SVC instruction */ + pfn_handler_t pfnReservedC4; + pfn_handler_t pfnReservedC3; + pfn_handler_t pfnPendSV_Handler; /* -2 Pendable request for system service */ + pfn_handler_t pfnSysTick_Handler; /* -1 System Tick Timer */ + + /* Peripheral handlers */ + pfn_handler_t pfnSYSTEM_Handler; /* 0 System peripherals shared interrupt */ + pfn_handler_t pfnWDT_Handler; /* 1 Watchdog Timer */ + pfn_handler_t pfnRTC_Handler; /* 2 Real Time Counter */ + pfn_handler_t pfnEIC_Handler; /* 3 External Interrupt Controller */ + pfn_handler_t pfnFREQM_Handler; /* 4 Frequency Meter */ + pfn_handler_t pfnTSENS_Handler; /* 5 Temperature Sensor */ + pfn_handler_t pfnNVMCTRL_Handler; /* 6 Non-Volatile Memory Controller */ + pfn_handler_t pfnDMAC_Handler; /* 7 Direct Memory Controller */ + pfn_handler_t pfnEVSYS_Handler; /* 8 Event Systems */ + pfn_handler_t pfnSERCOM0_Handler; /* 9 Serial Communication Interface 0 */ + pfn_handler_t pfnSERCOM1_Handler; /* 10 Serial Communication Interface 1 */ + pfn_handler_t pfnSERCOM2_Handler; /* 11 Serial Communication Interface 2 */ + pfn_handler_t pfnSERCOM3_Handler; /* 12 Serial Communication Interface 3 */ + pfn_handler_t pfnSERCOM4_Handler; /* 13 Serial Communication Interface 4 */ + pfn_handler_t pfnSERCOM5_Handler; /* 14 Serial Communication Interface 5 */ + pfn_handler_t pfnCAN0_Handler; /* 15 Control Area Network 0 */ + pfn_handler_t pfnCAN1_Handler; /* 16 Control Area Network 1 */ + pfn_handler_t pfnTCC0_Handler; /* 17 Timer/Counter for Control Applications 0 */ + pfn_handler_t pfnTCC1_Handler; /* 18 Timer/Counter for Control Applications 1 */ + pfn_handler_t pfnTCC2_Handler; /* 19 Timer/Counter for Control Applications 2 */ + pfn_handler_t pfnTC0_Handler; /* 20 Timer/Counter 0 */ + pfn_handler_t pfnTC1_Handler; /* 21 Timer/Counter 1 */ + pfn_handler_t pfnTC2_Handler; /* 22 Timer/Counter 2 */ + pfn_handler_t pfnTC3_Handler; /* 23 Timer/Counter 3 */ + pfn_handler_t pfnTC4_Handler; /* 24 Timer/Counter 4 */ + pfn_handler_t pfnADC0_Handler; /* 25 Analog-to-Digital Converter 0 */ + pfn_handler_t pfnADC1_Handler; /* 26 Analog-to-Digital Converter 1 */ + pfn_handler_t pfnAC_Handler; /* 27 Analog Comparators */ + pfn_handler_t pfnDAC_Handler; /* 28 Digital-to-Analog Converter */ + pfn_handler_t pfnSDADC_Handler; /* 29 Sigma-Delat Analog-to-Digital Converter */ + pfn_handler_t pfnPTC_Handler; /* 30 Peripheral Touch Controller */ +}H3DeviceVectors; + +#endif //DEVICE_VECTORS_H diff --git a/Telemetry/src/config/default/exceptions.c b/Telemetry/src/config/default/exceptions.c new file mode 100644 index 00000000..5c7ae56f --- /dev/null +++ b/Telemetry/src/config/default/exceptions.c @@ -0,0 +1,89 @@ +/******************************************************************************* + System Exceptions File + + File Name: + exceptions.c + + Summary: + This file contains a function which overrides the default _weak_ exception + handlers provided by the interrupt.c file. + + Description: + This file redefines the default _weak_ exception handler with a more debug + friendly one. If an unexpected exception occurs the code will stop in a + while(1) loop. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include "interrupts.h" +#include "definitions.h" + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Exception Handling Routine +// ***************************************************************************** +// ***************************************************************************** +/* MISRAC 2012 deviation block start */ +/* MISRA C-2012 Rule 8.6 might be violated here if the users provide a strong + implementations to these weak handler functions. Deviation record ID - H3_MISRAC_2012_R_8_6_DR_1 +*/ + + +/* Brief default interrupt handlers for core IRQs.*/ +void __attribute__((noreturn, weak)) NonMaskableInt_Handler(void) +{ +#if defined(__DEBUG) || defined(__DEBUG_D) && defined(__XC32) + __builtin_software_breakpoint(); +#endif + while (true) + { + } +} + +void __attribute__((noreturn, weak)) HardFault_Handler(void) +{ +#if defined(__DEBUG) || defined(__DEBUG_D) && defined(__XC32) + __builtin_software_breakpoint(); +#endif + while (true) + { + } +} + + +/* MISRAC 2012 deviation block end for rule 8.6 */ + +/******************************************************************************* + End of File + */ diff --git a/Telemetry/src/config/default/harmony-manifest-success.yml b/Telemetry/src/config/default/harmony-manifest-success.yml new file mode 100644 index 00000000..f4b6ec24 --- /dev/null +++ b/Telemetry/src/config/default/harmony-manifest-success.yml @@ -0,0 +1,22 @@ + +# This file has been autogenerated by MPLAB Code Configurator. Please do not edit this file. +# Project "Telemetry_V1" has been created by using mentioned Harmony 3 packages + + +project: Telemetry_V1 +creation_date: 2025-11-12T15:30:06.989+01:00[Europe/Oslo] # ISO 8601 format: https://www.w3.org/TR/NOTE-datetime +operating_system: Mac OS X +mcc_mode: IDE # [IDE|Standalone|Headless] +mcc_version: v5.6.2 +mcc_core_version: v5.8.2 +mplabx_version: v6.25 # if MPLAB X plugin only +harmony_version: v5.6.2 +compiler: XC32 4.60 + +modules: + - {name: "csp", version: "v3.23.0"} + - {name: "CMSIS_5", version: "5.9.0"} + +packs: + - {name: "SAMC21_DFP", version: "3.8.119"} + diff --git a/Telemetry/src/config/default/initialization.c b/Telemetry/src/config/default/initialization.c new file mode 100644 index 00000000..4d2bf014 --- /dev/null +++ b/Telemetry/src/config/default/initialization.c @@ -0,0 +1,198 @@ +/******************************************************************************* + System Initialization File + + File Name: + initialization.c + + Summary: + This file contains source code necessary to initialize the system. + + Description: + This file contains source code necessary to initialize the system. It + implements the "SYS_Initialize" function, defines the configuration bits, + and allocates any necessary global system resources, + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + *******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include "definitions.h" +#include "device.h" + + +// **************************************************************************** +// **************************************************************************** +// Section: Configuration Bits +// **************************************************************************** +// **************************************************************************** +#pragma config NVMCTRL_BOOTPROT = SIZE_0BYTES +#pragma config NVMCTRL_EEPROM_SIZE = SIZE_0BYTES +#pragma config BODVDDUSERLEVEL = 0x8U // Enter Hexadecimal value +#pragma config BODVDD_DIS = DISABLED +#pragma config BODVDD_ACTION = NONE + +#pragma config BODVDD_HYST = DISABLED +#pragma config NVMCTRL_REGION_LOCKS = 0xffffU // Enter Hexadecimal value + +#pragma config WDT_ENABLE = DISABLED +#pragma config WDT_ALWAYSON = DISABLED +#pragma config WDT_PER = CYC8 + +#pragma config WDT_WINDOW = CYC8 +#pragma config WDT_EWOFFSET = CYC8 +#pragma config WDT_WEN = DISABLED + + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Driver Initialization Data +// ***************************************************************************** +// ***************************************************************************** +/* Following MISRA-C rules are deviated in the below code block */ +/* MISRA C-2012 Rule 7.2 - Deviation record ID - H3_MISRAC_2012_R_7_2_DR_1 */ +/* MISRA C-2012 Rule 11.1 - Deviation record ID - H3_MISRAC_2012_R_11_1_DR_1 */ +/* MISRA C-2012 Rule 11.3 - Deviation record ID - H3_MISRAC_2012_R_11_3_DR_1 */ +/* MISRA C-2012 Rule 11.8 - Deviation record ID - H3_MISRAC_2012_R_11_8_DR_1 */ + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Data +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +// ***************************************************************************** +// Section: Library/Stack Initialization Data +// ***************************************************************************** +// ***************************************************************************** + + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Initialization +// ***************************************************************************** +// ***************************************************************************** + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Local initialization functions +// ***************************************************************************** +// ***************************************************************************** + +/******************************************************************************* + Function: + void STDIO_BufferModeSet ( void ) + + Summary: + Sets the buffering mode for stdin and stdout + + Remarks: + ********************************************************************************/ +static void STDIO_BufferModeSet(void) +{ + /* MISRAC 2012 deviation block start */ + /* MISRA C-2012 Rule 21.6 deviated 2 times in this file. Deviation record ID - H3_MISRAC_2012_R_21_6_DR_3 */ + + /* Make stdin unbuffered */ + setbuf(stdin, NULL); + + /* Make stdout unbuffered */ + setbuf(stdout, NULL); + /* MISRAC 2012 deviation block end */ +} + + +/* MISRAC 2012 deviation block end */ + +/******************************************************************************* + Function: + void SYS_Initialize ( void *data ) + + Summary: + Initializes the board, services, drivers, application and other modules. + + Remarks: + */ + +void SYS_Initialize ( void* data ) +{ + + /* MISRAC 2012 deviation block start */ + /* MISRA C-2012 Rule 2.2 deviated in this file. Deviation record ID - H3_MISRAC_2012_R_2_2_DR_1 */ + + NVMCTRL_REGS->NVMCTRL_CTRLB = NVMCTRL_CTRLB_RWS(3UL); + + STDIO_BufferModeSet(); + + + + PORT_Initialize(); + + CLOCK_Initialize(); + + + + + SERCOM3_SPI_Initialize(); + + NVMCTRL_Initialize( ); + + SERCOM2_USART_Initialize(); + + SERCOM1_USART_Initialize(); + + SERCOM0_SPI_Initialize(); + + EVSYS_Initialize(); + + CAN0_Initialize(); + + EIC_Initialize(); + + TC3_TimerInitialize(); + + TC2_TimerInitialize(); + + + NVIC_Initialize(); + + + /* MISRAC 2012 deviation block end */ +} + +/******************************************************************************* + End of File +*/ diff --git a/Telemetry/src/config/default/interrupts.c b/Telemetry/src/config/default/interrupts.c new file mode 100644 index 00000000..1ff51e4f --- /dev/null +++ b/Telemetry/src/config/default/interrupts.c @@ -0,0 +1,164 @@ +/******************************************************************************* + System Interrupts File + + Company: + Microchip Technology Inc. + + File Name: + interrupt.c + + Summary: + Interrupt vectors mapping + + Description: + This file maps all the interrupt vectors to their corresponding + implementations. If a particular module interrupt is used, then its ISR + definition can be found in corresponding PLIB source file. If a module + interrupt is not used, then its ISR implementation is mapped to dummy + handler. + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + *******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include "device_vectors.h" +#include "interrupts.h" +#include "definitions.h" + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: System Interrupt Vector Functions +// ***************************************************************************** +// ***************************************************************************** + +/* MISRA C-2012 Rule 8.6 deviated below. Deviation record ID - H3_MISRAC_2012_R_8_6_DR_1 */ +extern uint32_t _stack; +extern const H3DeviceVectors exception_table; + +extern void Dummy_Handler(void); + +/* Brief default interrupt handler for unused IRQs.*/ +void __attribute__((optimize("-O1"), long_call, noreturn, used))Dummy_Handler(void) +{ + while (true) + { + } +} + +/* MISRAC 2012 deviation block start */ +/* MISRA C-2012 Rule 8.6 deviated 27 times. Deviation record ID - H3_MISRAC_2012_R_8_6_DR_1 */ +/* Device vectors list dummy definition*/ +extern void SVCall_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void PendSV_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void SysTick_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void SYSTEM_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void WDT_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void RTC_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void FREQM_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TSENS_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void NVMCTRL_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void DMAC_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void EVSYS_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void SERCOM2_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void SERCOM4_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void SERCOM5_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void CAN1_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TCC0_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TCC1_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TCC2_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TC0_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TC1_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void TC4_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void ADC0_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void ADC1_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void AC_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void DAC_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void SDADC_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); +extern void PTC_Handler ( void ) __attribute__((weak, alias("Dummy_Handler"),noreturn)); + + +/* MISRAC 2012 deviation block end */ + +/* Multiple handlers for vector */ + + + +__attribute__ ((section(".vectors"), used)) +const H3DeviceVectors exception_table= +{ + /* Configure Initial Stack Pointer, using linker-generated symbols */ + .pvStack = &_stack, + + .pfnReset_Handler = Reset_Handler, + .pfnNonMaskableInt_Handler = NonMaskableInt_Handler, + .pfnHardFault_Handler = HardFault_Handler, + .pfnSVCall_Handler = SVCall_Handler, + .pfnPendSV_Handler = PendSV_Handler, + .pfnSysTick_Handler = SysTick_Handler, + .pfnSYSTEM_Handler = SYSTEM_Handler, + .pfnWDT_Handler = WDT_Handler, + .pfnRTC_Handler = RTC_Handler, + .pfnEIC_Handler = EIC_InterruptHandler, + .pfnFREQM_Handler = FREQM_Handler, + .pfnTSENS_Handler = TSENS_Handler, + .pfnNVMCTRL_Handler = NVMCTRL_Handler, + .pfnDMAC_Handler = DMAC_Handler, + .pfnEVSYS_Handler = EVSYS_Handler, + .pfnSERCOM0_Handler = SERCOM0_SPI_InterruptHandler, + .pfnSERCOM1_Handler = SERCOM1_USART_InterruptHandler, + .pfnSERCOM2_Handler = SERCOM2_Handler, + .pfnSERCOM3_Handler = SERCOM3_SPI_InterruptHandler, + .pfnSERCOM4_Handler = SERCOM4_Handler, + .pfnSERCOM5_Handler = SERCOM5_Handler, + .pfnCAN0_Handler = CAN0_InterruptHandler, + .pfnCAN1_Handler = CAN1_Handler, + .pfnTCC0_Handler = TCC0_Handler, + .pfnTCC1_Handler = TCC1_Handler, + .pfnTCC2_Handler = TCC2_Handler, + .pfnTC0_Handler = TC0_Handler, + .pfnTC1_Handler = TC1_Handler, + .pfnTC2_Handler = TC2_TimerInterruptHandler, + .pfnTC3_Handler = TC3_TimerInterruptHandler, + .pfnTC4_Handler = TC4_Handler, + .pfnADC0_Handler = ADC0_Handler, + .pfnADC1_Handler = ADC1_Handler, + .pfnAC_Handler = AC_Handler, + .pfnDAC_Handler = DAC_Handler, + .pfnSDADC_Handler = SDADC_Handler, + .pfnPTC_Handler = PTC_Handler, + + +}; + +/******************************************************************************* + End of File +*/ diff --git a/Telemetry/src/config/default/interrupts.h b/Telemetry/src/config/default/interrupts.h new file mode 100644 index 00000000..ae55e453 --- /dev/null +++ b/Telemetry/src/config/default/interrupts.h @@ -0,0 +1,72 @@ +/******************************************************************************* + System Interrupts File + + Company: + Microchip Technology Inc. + + File Name: + interrupt.h + + Summary: + Interrupt vectors mapping + + Description: + This file contains declarations of device vectors used by Harmony 3 + *******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + *******************************************************************************/ +// DOM-IGNORE-END + +#ifndef INTERRUPTS_H +#define INTERRUPTS_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Handler Routines +// ***************************************************************************** +// ***************************************************************************** +void Reset_Handler (void); +void NonMaskableInt_Handler (void); +void HardFault_Handler (void); +void EIC_InterruptHandler (void); +void SERCOM0_SPI_InterruptHandler (void); +void SERCOM1_USART_InterruptHandler (void); +void SERCOM3_SPI_InterruptHandler (void); +void CAN0_InterruptHandler (void); +void TC2_TimerInterruptHandler (void); +void TC3_TimerInterruptHandler (void); + + + +#endif // INTERRUPTS_H diff --git a/Telemetry/src/config/default/libc_syscalls.c b/Telemetry/src/config/default/libc_syscalls.c new file mode 100644 index 00000000..238ff02a --- /dev/null +++ b/Telemetry/src/config/default/libc_syscalls.c @@ -0,0 +1,61 @@ +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#include +#include +#include +#include +#include "device.h" /* for ARM CMSIS __BKPT() */ + +#ifdef __cplusplus +extern "C" { +#endif + + +/* MISRAC 2012 deviation block start */ +/* MISRA C-2012 Rule 21.2 deviated twice. Deviation record ID - H3_MISRAC_2012_R_21_2_DR_1 */ +/* Harmony specific + * We implement only the syscalls we want over the stubs provided by libpic32c + */ +extern void _exit(int status); + +void _exit(int status) +{ + /* Software breakpoint */ +#ifdef __DEBUG + __BKPT(0); +#endif + + /* halt CPU */ + while (true) + { + } +} + +#ifdef __cplusplus +} +#endif + +/* MISRAC 2012 deviation block end */ diff --git a/Telemetry/src/config/default/peripheral/can/plib_can0.c b/Telemetry/src/config/default/peripheral/can/plib_can0.c new file mode 100644 index 00000000..e7e43032 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/can/plib_can0.c @@ -0,0 +1,911 @@ +/******************************************************************************* + Controller Area Network (CAN) Peripheral Library Source File + + Company: + Microchip Technology Inc. + + File Name: + plib_can0.c + + Summary: + CAN peripheral library interface. + + Description: + This file defines the interface to the CAN peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. +*******************************************************************************/ + +//DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +//DOM-IGNORE-END +// ***************************************************************************** +// ***************************************************************************** +// Header Includes +// ***************************************************************************** +// ***************************************************************************** + +#include "device.h" +#include "interrupts.h" +#include "plib_can0.h" + +// ***************************************************************************** +// ***************************************************************************** +// Global Data +// ***************************************************************************** +// ***************************************************************************** +#define CAN_STD_ID_Msk 0x7FFU + +static volatile CAN_TX_FIFO_CALLBACK_OBJ can0TxFifoCallbackObj; +static volatile CAN_TX_EVENT_FIFO_CALLBACK_OBJ can0TxEventFifoCallbackObj; +static volatile CAN_RX_FIFO_CALLBACK_OBJ can0RxFifoCallbackObj[2]; +static volatile CAN_CALLBACK_OBJ can0CallbackObj; +static volatile CAN_OBJ can0Obj; + +static inline void CAN0_ZeroInitialize(volatile void* pData, size_t dataSize) +{ + volatile uint8_t* data = (volatile uint8_t*)pData; + for (uint32_t index = 0; index < dataSize; index++) + { + data[index] = 0U; + } +} + +// ***************************************************************************** +// ***************************************************************************** +// CAN0 PLib Interface Routines +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** +/* Function: + void CAN0_Initialize(void) + + Summary: + Initializes given instance of the CAN peripheral. + + Precondition: + None. + + Parameters: + None. + + Returns: + None +*/ +void CAN0_Initialize(void) +{ + /* Start CAN initialization */ + CAN0_REGS->CAN_CCCR = CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) != CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } + + /* Set CCE to unlock the configuration registers */ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_CCE_Msk; + + /* Set Data Bit Timing and Prescaler Register */ + CAN0_REGS->CAN_DBTP = CAN_DBTP_DTSEG2(0UL) | CAN_DBTP_DTSEG1(5UL) | CAN_DBTP_DBRP(2UL) | CAN_DBTP_DSJW(0UL); + + /* Set Nominal Bit timing and Prescaler Register */ + CAN0_REGS->CAN_NBTP = CAN_NBTP_NTSEG2(0UL) | CAN_NBTP_NTSEG1(29UL) | CAN_NBTP_NBRP(2UL) | CAN_NBTP_NSJW(0UL); + + /* Receive Buffer / FIFO Element Size Configuration Register */ + CAN0_REGS->CAN_RXESC = 0UL | CAN_RXESC_F0DS(0UL) | CAN_RXESC_F1DS(0UL); + /* Transmit Buffer/FIFO Element Size Configuration Register */ + CAN0_REGS->CAN_TXESC = CAN_TXESC_TBDS(0UL); + + /* Global Filter Configuration Register */ + CAN0_REGS->CAN_GFC = CAN_GFC_ANFS_REJECT | CAN_GFC_ANFE_REJECT; + + /* Set the operation mode */ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_FDOE_Msk | CAN_CCCR_BRSE_Msk; + + + CAN0_REGS->CAN_CCCR &= ~CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) == CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } + + /* Select interrupt line */ + CAN0_REGS->CAN_ILS = 0x0U; + + /* Enable interrupt line */ + CAN0_REGS->CAN_ILE = CAN_ILE_EINT0_Msk; + + /* Enable CAN interrupts */ + CAN0_REGS->CAN_IE = CAN_IE_BOE_Msk | CAN_IE_ARAE_Msk | CAN_IE_PEDE_Msk | CAN_IE_PEAE_Msk | CAN_IE_WDIE_Msk + | CAN_IE_EWE_Msk | CAN_IE_EPE_Msk | CAN_IE_ELOE_Msk | CAN_IE_BEUE_Msk | CAN_IE_BECE_Msk + | CAN_IE_TFEE_Msk + | CAN_IE_TEFNE_Msk | CAN_IE_TEFLE_Msk | CAN_IE_TEFFE_Msk | CAN_IE_TCFE_Msk | CAN_IE_HPME_Msk + | CAN_IE_RF0NE_Msk | CAN_IE_RF0LE_Msk | CAN_IE_RF0FE_Msk + | CAN_IE_RF1NE_Msk | CAN_IE_RF1LE_Msk | CAN_IE_RF1FE_Msk + + | CAN_IE_MRAFE_Msk; + + CAN0_ZeroInitialize(&can0Obj.msgRAMConfig, sizeof(CAN_MSG_RAM_CONFIG)); +} + + +// ***************************************************************************** +/* Function: + bool CAN0_MessageTransmitFifo(uint8_t numberOfMessage, CAN_TX_BUFFER *txBuffer) + + Summary: + Transmit multiple messages into CAN bus from Tx FIFO. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + numberOfMessage - Total number of message. + txBuffer - Pointer to Tx buffer + + Returns: + Request status. + true - Request was successful. + false - Request has failed. +*/ +bool CAN0_MessageTransmitFifo(uint8_t numberOfMessage, CAN_TX_BUFFER *txBuffer) +{ + uint8_t *txFifo = NULL; + uint8_t *txBuf = (uint8_t *)txBuffer; + uint32_t bufferNumber = 0U; + uint8_t tfqpi = 0U; + uint8_t count = 0U; + bool transmitFifo_event = false; + + if (!(((numberOfMessage < 1U) || (numberOfMessage > 1U)) || (txBuffer == NULL))) + { + tfqpi = (uint8_t)((CAN0_REGS->CAN_TXFQS & CAN_TXFQS_TFQPI_Msk) >> CAN_TXFQS_TFQPI_Pos); + + for (count = 0U; count < numberOfMessage; count++) + { + txFifo = (uint8_t *)((uint8_t*)can0Obj.msgRAMConfig.txBuffersAddress + ((uint32_t)tfqpi * CAN0_TX_FIFO_BUFFER_ELEMENT_SIZE)); + + (void) memcpy(txFifo, txBuf, CAN0_TX_FIFO_BUFFER_ELEMENT_SIZE); + + txBuf += CAN0_TX_FIFO_BUFFER_ELEMENT_SIZE; + bufferNumber |= (1UL << tfqpi); + tfqpi++; + if (tfqpi == 1U) + { + tfqpi = 0U; + } + } + + __DSB(); + + /* Set Transmission request */ + CAN0_REGS->CAN_TXBAR = bufferNumber; + + transmitFifo_event = true; + } + return transmitFifo_event; +} + +// ***************************************************************************** +/* Function: + uint8_t CAN0_TxFifoFreeLevelGet(void) + + Summary: + Returns Tx FIFO Free Level. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + None. + + Returns: + Tx FIFO Free Level. +*/ +uint8_t CAN0_TxFifoFreeLevelGet(void) +{ + return (uint8_t)(CAN0_REGS->CAN_TXFQS & CAN_TXFQS_TFFL_Msk); +} + +// ***************************************************************************** +/* Function: + bool CAN0_TxBufferIsBusy(uint8_t bufferNumber) + + Summary: + Check if Transmission request is pending for the specific Tx buffer. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + None. + + Returns: + true - Transmission request is pending. + false - Transmission request is not pending. +*/ +bool CAN0_TxBufferIsBusy(uint8_t bufferNumber) +{ + return ((CAN0_REGS->CAN_TXBRP & (1UL << bufferNumber)) != 0U); +} + +// ***************************************************************************** +/* Function: + bool CAN0_TxEventFifoRead(uint8_t numberOfTxEvent, CAN_TX_EVENT_FIFO *txEventFifo) + + Summary: + Read Tx Event FIFO for the transmitted messages. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + numberOfTxEvent - Total number of Tx Event + txEventFifo - Pointer to Tx Event FIFO + + Returns: + Request status. + true - Request was successful. + false - Request has failed. +*/ +bool CAN0_TxEventFifoRead(uint8_t numberOfTxEvent, CAN_TX_EVENT_FIFO *txEventFifo) +{ + uint8_t txefgi = 0U; + uint8_t count = 0U; + uint8_t *txEvent = NULL; + uint8_t *txEvtFifo = (uint8_t *)txEventFifo; + bool txFifo_event = false; + + if (txEventFifo != NULL) + { + /* Read data from the Rx FIFO0 */ + txefgi = (uint8_t)((CAN0_REGS->CAN_TXEFS & CAN_TXEFS_EFGI_Msk) >> CAN_TXEFS_EFGI_Pos); + for (count = 0U; count < numberOfTxEvent; count++) + { + txEvent = (uint8_t *) ((uint8_t *)can0Obj.msgRAMConfig.txEventFIFOAddress + ((uint32_t)txefgi * sizeof(CAN_TX_EVENT_FIFO))); + + (void) memcpy(txEvtFifo, txEvent, sizeof(CAN_TX_EVENT_FIFO)); + + if ((count + 1U) == numberOfTxEvent) + { + break; + } + txEvtFifo += sizeof(CAN_TX_EVENT_FIFO); + txefgi++; + if (txefgi == 1U) + { + txefgi = 0U; + } + } + + /* Ack the Tx Event FIFO position */ + CAN0_REGS->CAN_TXEFA = CAN_TXEFA_EFAI((uint32_t)txefgi); + + txFifo_event = true; + } + return txFifo_event; +} + + +// ***************************************************************************** +/* Function: + bool CAN0_MessageReceiveFifo(CAN_RX_FIFO_NUM rxFifoNum, uint8_t numberOfMessage, CAN_RX_BUFFER *rxBuffer) + + Summary: + Read messages from Rx FIFO0/FIFO1. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + rxFifoNum - Rx FIFO number + numberOfMessage - Total number of message + rxBuffer - Pointer to Rx buffer + + Returns: + Request status. + true - Request was successful. + false - Request has failed. +*/ +bool CAN0_MessageReceiveFifo(CAN_RX_FIFO_NUM rxFifoNum, uint8_t numberOfMessage, CAN_RX_BUFFER *rxBuffer) +{ + uint8_t rxgi = 0U; + uint8_t count = 0U; + uint8_t *rxFifo = NULL; + uint8_t *rxBuf = (uint8_t *)rxBuffer; + bool status = false; + + if (rxBuffer != NULL) + { + switch (rxFifoNum) + { + case CAN_RX_FIFO_0: + /* Read data from the Rx FIFO0 */ + rxgi = (uint8_t)((CAN0_REGS->CAN_RXF0S & CAN_RXF0S_F0GI_Msk) >> CAN_RXF0S_F0GI_Pos); + for (count = 0U; count < numberOfMessage; count++) + { + rxFifo = (uint8_t *) ((uint8_t *)can0Obj.msgRAMConfig.rxFIFO0Address + ((uint32_t)rxgi * CAN0_RX_FIFO0_ELEMENT_SIZE)); + + (void) memcpy(rxBuf, rxFifo, CAN0_RX_FIFO0_ELEMENT_SIZE); + + if ((count + 1U) == numberOfMessage) + { + break; + } + rxBuf += CAN0_RX_FIFO0_ELEMENT_SIZE; + rxgi++; + if (rxgi == 1U) + { + rxgi = 0U; + } + } + + /* Ack the fifo position */ + CAN0_REGS->CAN_RXF0A = CAN_RXF0A_F0AI((uint32_t)rxgi); + + status = true; + break; + case CAN_RX_FIFO_1: + /* Read data from the Rx FIFO1 */ + rxgi = (uint8_t)((CAN0_REGS->CAN_RXF1S & CAN_RXF1S_F1GI_Msk) >> CAN_RXF1S_F1GI_Pos); + for (count = 0U; count < numberOfMessage; count++) + { + rxFifo = (uint8_t *) ((uint8_t *)can0Obj.msgRAMConfig.rxFIFO1Address + ((uint32_t)rxgi * CAN0_RX_FIFO1_ELEMENT_SIZE)); + + (void) memcpy(rxBuf, rxFifo, CAN0_RX_FIFO1_ELEMENT_SIZE); + + if ((count + 1U) == numberOfMessage) + { + break; + } + rxBuf += CAN0_RX_FIFO1_ELEMENT_SIZE; + rxgi++; + if (rxgi == 1U) + { + rxgi = 0U; + } + } + /* Ack the fifo position */ + CAN0_REGS->CAN_RXF1A = CAN_RXF1A_F1AI((uint32_t)rxgi); + + status = true; + break; + default: + /* Do nothing */ + break; + } + } + return status; +} + +// ***************************************************************************** +/* Function: + CAN_ERROR CAN0_ErrorGet(void) + + Summary: + Returns the error during transfer. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + None. + + Returns: + Error during transfer. +*/ +CAN_ERROR CAN0_ErrorGet(void) +{ + CAN_ERROR error; + uint32_t errorStatus = CAN0_REGS->CAN_PSR; + + error = (CAN_ERROR) ((errorStatus & CAN_PSR_LEC_Msk) | (errorStatus & CAN_PSR_EP_Msk) | (errorStatus & CAN_PSR_EW_Msk) + | (errorStatus & CAN_PSR_BO_Msk) | (errorStatus & CAN_PSR_DLEC_Msk) | (errorStatus & CAN_PSR_PXE_Msk)); + + if ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) == CAN_CCCR_INIT_Msk) + { + CAN0_REGS->CAN_CCCR &= ~CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) == CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } + } + + return error; +} + +// ***************************************************************************** +/* Function: + void CAN0_ErrorCountGet(uint8_t *txErrorCount, uint8_t *rxErrorCount) + + Summary: + Returns the transmit and receive error count during transfer. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + txErrorCount - Transmit Error Count to be received + rxErrorCount - Receive Error Count to be received + + Returns: + None. +*/ +void CAN0_ErrorCountGet(uint8_t *txErrorCount, uint8_t *rxErrorCount) +{ + *txErrorCount = (uint8_t)(CAN0_REGS->CAN_ECR & CAN_ECR_TEC_Msk); + *rxErrorCount = (uint8_t)((CAN0_REGS->CAN_ECR & CAN_ECR_REC_Msk) >> CAN_ECR_REC_Pos); +} + +// ***************************************************************************** +/* Function: + void CAN0_MessageRAMConfigSet(uint8_t *msgRAMConfigBaseAddress) + + Summary: + Set the Message RAM Configuration. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + msgRAMConfigBaseAddress - Pointer to application allocated buffer base address. + Application must allocate buffer from non-cached + contiguous memory and buffer size must be + CAN0_MESSAGE_RAM_CONFIG_SIZE + + Returns: + None +*/ +/* MISRA C-2012 Rule 11.3 violated 4 times below. Deviation record ID - H3_MISRAC_2012_R_11_3_DR_1*/ +void CAN0_MessageRAMConfigSet(uint8_t *msgRAMConfigBaseAddress) +{ + uint32_t offset = 0U; + uint32_t msgRAMConfigBaseAddr = (uint32_t)msgRAMConfigBaseAddress; + + (void) memset(msgRAMConfigBaseAddress, 0x00, CAN0_MESSAGE_RAM_CONFIG_SIZE); + + /* Set CAN CCCR Init for Message RAM Configuration */ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) != CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } + + /* Set CCE to unlock the configuration registers */ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_CCE_Msk; + + can0Obj.msgRAMConfig.rxFIFO0Address = (can_rxf0e_registers_t *)msgRAMConfigBaseAddr; + offset = CAN0_RX_FIFO0_SIZE; + /* Receive FIFO 0 Configuration Register */ + CAN0_REGS->CAN_RXF0C = CAN_RXF0C_F0S(1UL) | CAN_RXF0C_F0WM(0UL) | CAN_RXF0C_F0OM_Msk | + CAN_RXF0C_F0SA((uint32_t)can0Obj.msgRAMConfig.rxFIFO0Address); + + can0Obj.msgRAMConfig.rxFIFO1Address = (can_rxf1e_registers_t *)(msgRAMConfigBaseAddr + offset); + offset += CAN0_RX_FIFO1_SIZE; + /* Receive FIFO 1 Configuration Register */ + CAN0_REGS->CAN_RXF1C = CAN_RXF1C_F1S(1UL) | CAN_RXF1C_F1WM(0UL) | CAN_RXF1C_F1OM_Msk | + CAN_RXF1C_F1SA((uint32_t)can0Obj.msgRAMConfig.rxFIFO1Address); + + can0Obj.msgRAMConfig.txBuffersAddress = (can_txbe_registers_t *)(msgRAMConfigBaseAddr + offset); + offset += CAN0_TX_FIFO_BUFFER_SIZE; + /* Transmit Buffer/FIFO Configuration Register */ + CAN0_REGS->CAN_TXBC = CAN_TXBC_TFQS(1UL) | + CAN_TXBC_TBSA((uint32_t)can0Obj.msgRAMConfig.txBuffersAddress); + + can0Obj.msgRAMConfig.txEventFIFOAddress = (can_txefe_registers_t *)(msgRAMConfigBaseAddr + offset); + offset += CAN0_TX_EVENT_FIFO_SIZE; + /* Transmit Event FIFO Configuration Register */ + CAN0_REGS->CAN_TXEFC = CAN_TXEFC_EFWM(0UL) | CAN_TXEFC_EFS(1UL) | + CAN_TXEFC_EFSA((uint32_t)can0Obj.msgRAMConfig.txEventFIFOAddress); + + + /* Reference offset variable once to remove warning about the variable not being used after increment */ + (void)offset; + + /* Complete Message RAM Configuration by clearing CAN CCCR Init */ + CAN0_REGS->CAN_CCCR &= ~CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) == CAN_CCCR_INIT_Msk) + { + /* Wait for configuration complete */ + } +} +/* MISRAC 2012 deviation block end for Rule 11.3*/ + + + + +void CAN0_SleepModeEnter(void) +{ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_CSR_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_CSA_Msk) != CAN_CCCR_CSA_Msk) + { + /* Wait for clock stop request to complete */ + } +} + +void CAN0_SleepModeExit(void) +{ + CAN0_REGS->CAN_CCCR &= ~CAN_CCCR_CSR_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_CSA_Msk) == CAN_CCCR_CSA_Msk) + { + /* Wait for no clock stop */ + } + CAN0_REGS->CAN_CCCR &= ~CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) == CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } +} + +bool CAN0_BitTimingCalculationGet(CAN_BIT_TIMING_SETUP *setup, CAN_BIT_TIMING *bitTiming) +{ + bool status = false; + uint32_t numOfTimeQuanta; + uint8_t tseg1; + float temp1; + float temp2; + + if ((setup != NULL) && (bitTiming != NULL)) + { + if (setup->nominalBitTimingSet == true) + { + numOfTimeQuanta = CAN0_CLOCK_FREQUENCY / (setup->nominalBitRate * ((uint32_t)setup->nominalPrescaler + 1U)); + if ((numOfTimeQuanta >= 4U) && (numOfTimeQuanta <= 385U)) + { + if (setup->nominalSamplePoint < 50.0f) + { + setup->nominalSamplePoint = 50.0f; + } + temp1 = (float)numOfTimeQuanta; + temp2 = (temp1 * setup->nominalSamplePoint) / 100.0f; + tseg1 = (uint8_t)temp2; + bitTiming->nominalBitTiming.nominalTimeSegment2 = (uint8_t)(numOfTimeQuanta - tseg1 - 1U); + bitTiming->nominalBitTiming.nominalTimeSegment1 = tseg1 - 2U; + bitTiming->nominalBitTiming.nominalSJW = bitTiming->nominalBitTiming.nominalTimeSegment2; + bitTiming->nominalBitTiming.nominalPrescaler = setup->nominalPrescaler; + bitTiming->nominalBitTimingSet = true; + status = true; + } + else + { + bitTiming->nominalBitTimingSet = false; + } + } + if (setup->dataBitTimingSet == true) + { + numOfTimeQuanta = CAN0_CLOCK_FREQUENCY / (setup->dataBitRate * ((uint32_t)setup->dataPrescaler + 1U)); + if ((numOfTimeQuanta >= 4U) && (numOfTimeQuanta <= 49U)) + { + if (setup->dataSamplePoint < 50.0f) + { + setup->dataSamplePoint = 50.0f; + } + temp1 = (float)numOfTimeQuanta; + temp2 = (temp1 * setup->dataSamplePoint) / 100.0f; + tseg1 = (uint8_t)temp2; + bitTiming->dataBitTiming.dataTimeSegment2 = (uint8_t)(numOfTimeQuanta - tseg1 - 1U); + bitTiming->dataBitTiming.dataTimeSegment1 = tseg1 - 2U; + bitTiming->dataBitTiming.dataSJW = bitTiming->dataBitTiming.dataTimeSegment2; + bitTiming->dataBitTiming.dataPrescaler = setup->dataPrescaler; + bitTiming->dataBitTimingSet = true; + status = true; + } + else + { + bitTiming->dataBitTimingSet = false; + status = false; + } + } + } + + return status; +} + +bool CAN0_BitTimingSet(CAN_BIT_TIMING *bitTiming) +{ + bool status = false; + bool nominalBitTimingSet = false; + bool dataBitTimingSet = false; + + if ((bitTiming->nominalBitTimingSet == true) + && (bitTiming->nominalBitTiming.nominalTimeSegment1 >= 0x1U) + && (bitTiming->nominalBitTiming.nominalTimeSegment2 <= 0x7FU) + && (bitTiming->nominalBitTiming.nominalPrescaler <= 0x1FFU) + && (bitTiming->nominalBitTiming.nominalSJW <= 0x7FU)) + { + nominalBitTimingSet = true; + } + + if ((bitTiming->dataBitTimingSet == true) + && ((bitTiming->dataBitTiming.dataTimeSegment1 >= 0x1U) && (bitTiming->dataBitTiming.dataTimeSegment1 <= 0x1FU)) + && (bitTiming->dataBitTiming.dataTimeSegment2 <= 0xFU) + && (bitTiming->dataBitTiming.dataPrescaler <= 0x1FU) + && (bitTiming->dataBitTiming.dataSJW <= 0xFU)) + { + dataBitTimingSet = true; + } + + if ((nominalBitTimingSet == true) || (dataBitTimingSet == true)) + { + /* Start CAN initialization */ + CAN0_REGS->CAN_CCCR = CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) != CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } + + /* Set CCE to unlock the configuration registers */ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_CCE_Msk; + + if (dataBitTimingSet == true) + { + /* Set Data Bit Timing and Prescaler Register */ + CAN0_REGS->CAN_DBTP = CAN_DBTP_DTSEG2(bitTiming->dataBitTiming.dataTimeSegment2) | CAN_DBTP_DTSEG1(bitTiming->dataBitTiming.dataTimeSegment1) | CAN_DBTP_DBRP(bitTiming->dataBitTiming.dataPrescaler) | CAN_DBTP_DSJW(bitTiming->dataBitTiming.dataSJW); + } + if (nominalBitTimingSet == true) + { + /* Set Nominal Bit timing and Prescaler Register */ + CAN0_REGS->CAN_NBTP = CAN_NBTP_NTSEG2(bitTiming->nominalBitTiming.nominalTimeSegment2) | CAN_NBTP_NTSEG1(bitTiming->nominalBitTiming.nominalTimeSegment1) | CAN_NBTP_NBRP(bitTiming->nominalBitTiming.nominalPrescaler) | CAN_NBTP_NSJW(bitTiming->nominalBitTiming.nominalSJW); + } + + /* Set the operation mode */ + CAN0_REGS->CAN_CCCR |= CAN_CCCR_FDOE_Msk | CAN_CCCR_BRSE_Msk; + + + CAN0_REGS->CAN_CCCR &= ~CAN_CCCR_INIT_Msk; + while ((CAN0_REGS->CAN_CCCR & CAN_CCCR_INIT_Msk) == CAN_CCCR_INIT_Msk) + { + /* Wait for initialization complete */ + } + status = true; + } + return status; +} + + +// ***************************************************************************** +/* Function: + void CAN0_TxFifoCallbackRegister(CAN_TX_FIFO_CALLBACK callback, uintptr_t contextHandle) + + Summary: + Sets the pointer to the function (and it's context) to be called when the + given CAN's transfer events occur. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + callback - A pointer to a function with a calling signature defined + by the CAN_TX_FIFO_CALLBACK data type. + + contextHandle - A value (usually a pointer) passed (unused) into the function + identified by the callback parameter. + + Returns: + None. +*/ +void CAN0_TxFifoCallbackRegister(CAN_TX_FIFO_CALLBACK callback, uintptr_t contextHandle) +{ + if (callback != NULL) + { + can0TxFifoCallbackObj.callback = callback; + can0TxFifoCallbackObj.context = contextHandle; + } +} + +// ***************************************************************************** +/* Function: + void CAN0_TxEventFifoCallbackRegister(CAN_TX_EVENT_FIFO_CALLBACK callback, uintptr_t contextHandle) + + Summary: + Sets the pointer to the function (and it's context) to be called when the + given CAN's transfer events occur. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + callback - A pointer to a function with a calling signature defined + by the CAN_TX_EVENT_FIFO_CALLBACK data type. + + contextHandle - A value (usually a pointer) passed (unused) into the function + identified by the callback parameter. + + Returns: + None. +*/ +void CAN0_TxEventFifoCallbackRegister(CAN_TX_EVENT_FIFO_CALLBACK callback, uintptr_t contextHandle) +{ + if (callback != NULL) + { + can0TxEventFifoCallbackObj.callback = callback; + can0TxEventFifoCallbackObj.context = contextHandle; + + } +} + + +// ***************************************************************************** +/* Function: + void CAN0_RxFifoCallbackRegister(CAN_RX_FIFO_NUM rxFifoNum, CAN_RX_FIFO_CALLBACK callback, uintptr_t contextHandle) + + Summary: + Sets the pointer to the function (and it's context) to be called when the + given CAN's transfer events occur. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + rxFifoNum - Rx FIFO Number + + callback - A pointer to a function with a calling signature defined + by the CAN_RX_FIFO_CALLBACK data type. + + contextHandle - A value (usually a pointer) passed (unused) into the function + identified by the callback parameter. + + Returns: + None. +*/ +void CAN0_RxFifoCallbackRegister(CAN_RX_FIFO_NUM rxFifoNum, CAN_RX_FIFO_CALLBACK callback, uintptr_t contextHandle) +{ + if (callback != NULL) + { + can0RxFifoCallbackObj[rxFifoNum].callback = callback; + can0RxFifoCallbackObj[rxFifoNum].context = contextHandle; + } +} + +// ***************************************************************************** +/* Function: + void CAN0_CallbackRegister(CAN_CALLBACK callback, uintptr_t contextHandle) + + Summary: + Sets the pointer to the function (and it's context) to be called when the + given CAN's transfer events occur. + + Precondition: + CAN0_Initialize must have been called for the associated CAN instance. + + Parameters: + callback - A pointer to a function with a calling signature defined + by the CAN_CALLBACK data type. + + contextHandle - A value (usually a pointer) passed (unused) into the function + identified by the callback parameter. + + Returns: + None. +*/ +void CAN0_CallbackRegister(CAN_CALLBACK callback, uintptr_t contextHandle) +{ + if (callback != NULL) + { + can0CallbackObj.callback = callback; + can0CallbackObj.context = contextHandle; + } +} + +// ***************************************************************************** +/* Function: + void CAN0_InterruptHandler(void) + + Summary: + CAN0 Peripheral Interrupt Handler. + + Description: + This function is CAN0 Peripheral Interrupt Handler and will + called on every CAN0 interrupt. + + Precondition: + None. + + Parameters: + None. + + Returns: + None. + + Remarks: + The function is called as peripheral instance's interrupt handler if the + instance interrupt is enabled. If peripheral instance's interrupt is not + enabled user need to call it from the main while loop of the application. +*/ +void __attribute__((used)) CAN0_InterruptHandler(void) +{ + uint8_t numberOfMessage = 0; + uint8_t numberOfTxEvent = 0; + + uint32_t ir = CAN0_REGS->CAN_IR; + + /* Additional temporary variable used to prevent MISRA violations (Rule 13.x) */ + uintptr_t context; + + if ((ir & (~(CAN_IR_RF0N_Msk | CAN_IR_RF1N_Msk | CAN_IR_TFE_Msk | CAN_IR_TEFN_Msk))) != 0U) + { + CAN0_REGS->CAN_IR = (ir & (~(CAN_IR_RF0N_Msk | CAN_IR_RF1N_Msk | CAN_IR_TFE_Msk | CAN_IR_TEFN_Msk))); + if (can0CallbackObj.callback != NULL) + { + context = can0CallbackObj.context; + can0CallbackObj.callback(ir, context); + } + } + /* New Message in Rx FIFO 0 */ + if ((ir & CAN_IR_RF0N_Msk) != 0U) + { + CAN0_REGS->CAN_IR = CAN_IR_RF0N_Msk; + + numberOfMessage = (uint8_t)(CAN0_REGS->CAN_RXF0S & CAN_RXF0S_F0FL_Msk); + + if (can0RxFifoCallbackObj[CAN_RX_FIFO_0].callback != NULL) + { + context = can0RxFifoCallbackObj[CAN_RX_FIFO_0].context; + can0RxFifoCallbackObj[CAN_RX_FIFO_0].callback(numberOfMessage, context); + } + } + /* New Message in Rx FIFO 1 */ + if ((ir & CAN_IR_RF1N_Msk) != 0U) + { + CAN0_REGS->CAN_IR = CAN_IR_RF1N_Msk; + + numberOfMessage = (uint8_t)(CAN0_REGS->CAN_RXF1S & CAN_RXF1S_F1FL_Msk); + + if (can0RxFifoCallbackObj[CAN_RX_FIFO_1].callback != NULL) + { + context = can0RxFifoCallbackObj[CAN_RX_FIFO_1].context; + can0RxFifoCallbackObj[CAN_RX_FIFO_1].callback(numberOfMessage, context); + } + } + + /* TX FIFO is empty */ + if ((ir & CAN_IR_TFE_Msk) != 0U) + { + CAN0_REGS->CAN_IR = CAN_IR_TFE_Msk; + if (can0TxFifoCallbackObj.callback != NULL) + { + context = can0TxFifoCallbackObj.context; + can0TxFifoCallbackObj.callback(context); + } + } + /* Tx Event FIFO new entry */ + if ((ir & CAN_IR_TEFN_Msk) != 0U) + { + CAN0_REGS->CAN_IR = CAN_IR_TEFN_Msk; + + numberOfTxEvent = (uint8_t)(CAN0_REGS->CAN_TXEFS & CAN_TXEFS_EFFL_Msk); + + if (can0TxEventFifoCallbackObj.callback != NULL) + { + context = can0TxEventFifoCallbackObj.context; + can0TxEventFifoCallbackObj.callback(numberOfTxEvent, context); + } + } +} + +/******************************************************************************* + End of File +*/ diff --git a/Telemetry/src/config/default/peripheral/can/plib_can0.h b/Telemetry/src/config/default/peripheral/can/plib_can0.h new file mode 100644 index 00000000..dcc19caa --- /dev/null +++ b/Telemetry/src/config/default/peripheral/can/plib_can0.h @@ -0,0 +1,123 @@ +/******************************************************************************* + CAN Peripheral Library Interface Header File + + Company: + Microchip Technology Inc. + + File Name: + plib_can0.h + + Summary: + CAN PLIB interface declarations. + + Description: + The CAN plib provides a simple interface to manage the CAN modules on + Microchip microcontrollers. This file defines the interface declarations + for the CAN plib. + + Remarks: + None. + +*******************************************************************************/ +//DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +//DOM-IGNORE-END + +#ifndef PLIB_CAN0_H +#define PLIB_CAN0_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +/* + * This section lists the other files that are included in this file. + */ +#include +#include + +#include "device.h" +#include "plib_can_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + extern "C" { +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** +#define CAN0_CLOCK_FREQUENCY 48000000U + +/* CAN0 Message RAM Configuration Size */ +#define CAN0_RX_FIFO0_ELEMENT_SIZE 16U +#define CAN0_RX_FIFO0_SIZE 16U +#define CAN0_RX_FIFO1_ELEMENT_SIZE 16U +#define CAN0_RX_FIFO1_SIZE 16U +#define CAN0_TX_FIFO_BUFFER_ELEMENT_SIZE 16U +#define CAN0_TX_FIFO_BUFFER_SIZE 16U +#define CAN0_TX_EVENT_FIFO_SIZE 8U + +/* CAN0_MESSAGE_RAM_CONFIG_SIZE to be used by application or driver + for allocating buffer from non-cached contiguous memory */ +#define CAN0_MESSAGE_RAM_CONFIG_SIZE 56U + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** +void CAN0_Initialize(void); +bool CAN0_MessageTransmitFifo(uint8_t numberOfMessage, CAN_TX_BUFFER *txBuffer); +uint8_t CAN0_TxFifoFreeLevelGet(void); +bool CAN0_TxBufferIsBusy(uint8_t bufferNumber); +bool CAN0_TxEventFifoRead(uint8_t numberOfTxEvent, CAN_TX_EVENT_FIFO *txEventFifo); +bool CAN0_MessageReceiveFifo(CAN_RX_FIFO_NUM rxFifoNum, uint8_t numberOfMessage, CAN_RX_BUFFER *rxBuffer); +CAN_ERROR CAN0_ErrorGet(void); +void CAN0_ErrorCountGet(uint8_t *txErrorCount, uint8_t *rxErrorCount); +void CAN0_MessageRAMConfigSet(uint8_t *msgRAMConfigBaseAddress); +void CAN0_SleepModeEnter(void); +void CAN0_SleepModeExit(void); +bool CAN0_BitTimingCalculationGet(CAN_BIT_TIMING_SETUP *setup, CAN_BIT_TIMING *bitTiming); +bool CAN0_BitTimingSet(CAN_BIT_TIMING *bitTiming); +void CAN0_TxFifoCallbackRegister(CAN_TX_FIFO_CALLBACK callback, uintptr_t contextHandle); +void CAN0_TxEventFifoCallbackRegister(CAN_TX_EVENT_FIFO_CALLBACK callback, uintptr_t contextHandle); +void CAN0_RxFifoCallbackRegister(CAN_RX_FIFO_NUM rxFifoNum, CAN_RX_FIFO_CALLBACK callback, uintptr_t contextHandle); +void CAN0_CallbackRegister(CAN_CALLBACK callback, uintptr_t contextHandle); +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + } +#endif +// DOM-IGNORE-END + +#endif // PLIB_CAN0_H + +/******************************************************************************* + End of File +*/ diff --git a/Telemetry/src/config/default/peripheral/can/plib_can_common.h b/Telemetry/src/config/default/peripheral/can/plib_can_common.h new file mode 100644 index 00000000..4ee6bd7e --- /dev/null +++ b/Telemetry/src/config/default/peripheral/can/plib_can_common.h @@ -0,0 +1,668 @@ +/******************************************************************************* + CAN Peripheral Library Interface Header File + + Company + Microchip Technology Inc. + + File Name + plib_can_common.h + + Summary + CAN peripheral library interface. + + Description + This file defines the interface to the CAN peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_CAN_COMMON_H +#define PLIB_CAN_COMMON_H + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Preprocessor macros +// ***************************************************************************** +// ***************************************************************************** + + // ***************************************************************************** +/* CAN Transfer Errors + + Summary: + CAN Transfer Error macros. + + Description: + Helper macros to identify CAN errors. + + Remarks: + None. +*/ + +#define CAN_ERROR_NONE 0x0U +#define CAN_ERROR_LEC_STUFF 0x1U +#define CAN_ERROR_LEC_FORM 0x2U +#define CAN_ERROR_LEC_ACK 0x3U +#define CAN_ERROR_LEC_BIT1 0x4U +#define CAN_ERROR_LEC_BIT0 0x5U +#define CAN_ERROR_LEC_CRC 0x6U +#define CAN_ERROR_LEC_NC 0x7U +#define CAN_ERROR_PASSIVE 0x20U +#define CAN_ERROR_WARNING_STATUS 0x40U +#define CAN_ERROR_BUS_OFF 0x80U +#define CAN_ERROR_DLEC_STUFF 0x100U +#define CAN_ERROR_DLEC_FORM 0x200U +#define CAN_ERROR_DLEC_ACK 0x300U +#define CAN_ERROR_DLEC_BIT1 0x400U +#define CAN_ERROR_DLEC_BIT0 0x500U +#define CAN_ERROR_DLEC_CRC 0x600U +#define CAN_ERROR_DLEC_NC 0x700U +#define CAN_ERROR_PROTOCOL_EXCEPTION_EVENT 0x4000U +#define CAN_ERROR_INVALID 0xFFFFFFFFU + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* CAN Rx FIFO Number + + Summary: + CAN Rx FIFO Number. + + Description: + This data type defines CAN Rx FIFO number for Rx FIFO0 and FIFO1. + + Remarks: + None. +*/ +typedef enum +{ + CAN_RX_FIFO_0 = 0U, + CAN_RX_FIFO_1 +} CAN_RX_FIFO_NUM; + +// ***************************************************************************** +/* CAN Interrupt Mask + + Summary: + CAN Interrupt Mask. + + Description: + This data type defines the CAN Interrupt sources number. + + Remarks: + None. +*/ +typedef enum +{ + CAN_INTERRUPT_RF0N_MASK = (1UL << 0U), + CAN_INTERRUPT_RF0W_MASK = (1UL << 1U), + CAN_INTERRUPT_RF0F_MASK = (1UL << 2U), + CAN_INTERRUPT_RF0L_MASK = (1UL << 3U), + CAN_INTERRUPT_RF1N_MASK = (1UL << 4U), + CAN_INTERRUPT_RF1W_MASK = (1UL << 5U), + CAN_INTERRUPT_RF1F_MASK = (1UL << 6U), + CAN_INTERRUPT_RF1L_MASK = (1UL << 7U), + CAN_INTERRUPT_HPM_MASK = (1UL << 8U), + CAN_INTERRUPT_TC_MASK = (1UL << 9U), + CAN_INTERRUPT_TCF_MASK = (1UL << 10U), + CAN_INTERRUPT_TFE_MASK = (1UL << 11U), + CAN_INTERRUPT_TEFN_MASK = (1UL << 12U), + CAN_INTERRUPT_TEFW_MASK = (1UL << 13U), + CAN_INTERRUPT_TEFF_MASK = (1UL << 14U), + CAN_INTERRUPT_TEFL_MASK = (1UL << 15U), + CAN_INTERRUPT_TSW_MASK = (1UL << 16U), + CAN_INTERRUPT_MRAF_MASK = (1UL << 17U), + CAN_INTERRUPT_TOO_MASK = (1UL << 18U), + CAN_INTERRUPT_DRX_MASK = (1UL << 19U), + CAN_INTERRUPT_ELO_MASK = (1UL << 22U), + CAN_INTERRUPT_EP_MASK = (1UL << 23U), + CAN_INTERRUPT_EW_MASK = (1UL << 24U), + CAN_INTERRUPT_BO_MASK = (1UL << 25U), + CAN_INTERRUPT_WDI_MASK = (1UL << 26U), + CAN_INTERRUPT_PEA_MASK = (1UL << 27U), + CAN_INTERRUPT_PED_MASK = (1UL << 28U), + CAN_INTERRUPT_ARA_MASK = (1UL << 29U) +}CAN_INTERRUPT_MASK; + +// ***************************************************************************** +/* CAN Transfer Error + + Summary: + CAN Transfer Error data type. + + Description: + This data type defines the CAN Transfer Error. + + Remarks: + None. +*/ +typedef uint32_t CAN_ERROR; + +// ***************************************************************************** +/* CAN Tx FIFO Callback + + Summary: + CAN Callback Function Pointer for Tx FIFO. + + Description: + This data type defines the CAN Callback Function Pointer for Tx FIFO. + + Remarks: + None. +*/ +typedef void (*CAN_TX_FIFO_CALLBACK) (uintptr_t contextHandle); + +// ***************************************************************************** +/* CAN TX/RX Buffers Callback + + Summary: + CAN Callback Function Pointer for TX/RX Buffers. + + Description: + This data type defines the CAN Callback Function Pointer for TX/RX Buffers. + + Remarks: + None. +*/ +typedef void (*CAN_TXRX_BUFFERS_CALLBACK) (uint8_t bufferNumber, uintptr_t contextHandle); + +// ***************************************************************************** +/* CAN Tx Event FIFO Callback + + Summary: + CAN Callback Function Pointer for Tx Event FIFO. + + Description: + This data type defines the CAN Callback Function Pointer for Tx Event FIFO. + + Remarks: + None. +*/ +typedef void (*CAN_TX_EVENT_FIFO_CALLBACK) (uint8_t numberOfTxEvent, uintptr_t contextHandle); + +// ***************************************************************************** +/* CAN Rx FIFO0/FIFO1 Callback + + Summary: + CAN Callback Function Pointer for Rx FIFO0/FIFO1. + + Description: + This data type defines the CAN Callback Function Pointer for Rx FIFO0/FIFO1. + + Remarks: + None. +*/ +typedef void (*CAN_RX_FIFO_CALLBACK) (uint8_t numberOfMessage, uintptr_t contextHandle); + +// ***************************************************************************** +/* CAN Callback + + Summary: + CAN Callback Function Pointer. + + Description: + This data type defines the CAN Callback Function Pointer. + + Remarks: + None. +*/ +typedef void (*CAN_CALLBACK) (uint32_t interruptStatus, uintptr_t contextHandle); + +// ***************************************************************************** +/* CAN Message RAM Configuration + + Summary: + CAN Message RAM Configuration structure. + + Description: + This data structure defines the CAN Message RAM Base address for Rx FIFO0, + Rx FIFO1, Rx Buffers, Tx Buffers/FIFO, Tx Event FIFO, Standard Message ID Filter and + Extended Message ID Filter configuration. + + Remarks: + None. +*/ +typedef struct +{ + /* Rx FIFO0 base address */ + can_rxf0e_registers_t *rxFIFO0Address; + + /* Rx FIFO1 base address */ + can_rxf1e_registers_t *rxFIFO1Address; + + /* Rx Buffer base address */ + can_rxbe_registers_t *rxBuffersAddress; + + /* Tx Buffers/FIFO base address */ + can_txbe_registers_t *txBuffersAddress; + + /* Tx Event FIFO base address */ + can_txefe_registers_t *txEventFIFOAddress; + + /* Standard Message ID Filter base address */ + can_sidfe_registers_t *stdMsgIDFilterAddress; + + /* Extended Message ID Filter base address */ + can_xidfe_registers_t *extMsgIDFilterAddress; +} CAN_MSG_RAM_CONFIG; + +// ***************************************************************************** +/* CAN Rx Buffer and FIFO Element + + Summary: + CAN Rx Buffer and FIFO Element Structure. + + Description: + This data structure defines CAN Rx Buffer and FIFO Element. + + Remarks: + None. +*/ +typedef struct +{ + /* Identifier */ + unsigned int id:29; + /* Remote Transmission Request */ + unsigned int rtr:1; + /* Extended Identifier */ + unsigned int xtd:1; + /* Error State Indicator */ + unsigned int esi:1; + + /* Rx Timestamp */ + unsigned int rxts:16; + /* Data Length Code */ + unsigned int dlc:4; + /* Bit Rate Switching */ + unsigned int brs:1; + /* FD Format */ + unsigned int fdf:1; + /* Reserved */ + unsigned int :2; + /* Filter Index */ + unsigned int fidx:7; + /* Accepted Non-matching Frame */ + unsigned int anmf:1; + + /* Data field */ + uint8_t data[8]; + +} CAN_RX_BUFFER; + +// ***************************************************************************** +/* CAN Tx Buffer Element + + Summary: + CAN Tx Buffer Element Structure. + + Description: + This data structure defines CAN Tx Buffer Element. + + Remarks: + None. +*/ +typedef struct +{ + /* Identifier */ + unsigned int id:29; + /* Remote Transmission Request */ + unsigned int rtr:1; + /* Extended Identifier */ + unsigned int xtd:1; + /* Error State Indicator */ + unsigned int esi:1; + + /* Reserved */ + unsigned int :16; + /* Data Length Code */ + unsigned int dlc:4; + /* Bit Rate Switching */ + unsigned int brs:1; + /* FD Format */ + unsigned int fdf:1; + /* Reserved */ + unsigned int :1; + /* Event FIFO Control */ + unsigned int efc:1; + /* Message Marker */ + unsigned int mm:8; + + /* Data field */ + uint8_t data[8]; + +} CAN_TX_BUFFER; + +// ***************************************************************************** +/* CAN Tx Event FIFO Element + + Summary: + CAN Tx Event FIFO Element Structure. + + Description: + This data structure defines CAN Tx Event FIFO Element. + + Remarks: + None. +*/ +typedef struct +{ + /* Identifier */ + unsigned int id:29; + /* Remote Transmission Request */ + unsigned int rtr:1; + /* Extended Identifier */ + unsigned int xtd:1; + /* Error State Indicator */ + unsigned int esi:1; + + /* Tx Timestamp */ + unsigned int txts:16; + /* Data Length Code */ + unsigned int dlc:4; + /* Bit Rate Switch */ + unsigned int brs:1; + /* FD Format */ + unsigned int fdf:1; + /* Event Type */ + unsigned int et:2; + /* Message Marker */ + unsigned int mm:8; + +} CAN_TX_EVENT_FIFO; + +// ***************************************************************************** +/* CAN Nominal Bit Timing Parameters + + Summary: + CAN Nominal Bit Timing Parameter structure. + + Description: + This data structure defines Nominal Bit Timing Parameters. + + Remarks: + None. +*/ +typedef struct +{ + /* Nominal Time segment after sample point */ + uint8_t nominalTimeSegment2; + + /* Nominal Time segment before sample point */ + uint8_t nominalTimeSegment1; + + /* Nominal Baud Rate Prescaler */ + uint16_t nominalPrescaler; + + /* Nominal Syncronization Jump Width */ + uint8_t nominalSJW; + +} CAN_NOMINAL_BIT_TIMING; + +// ***************************************************************************** +/* CAN Data Bit Timing Parameters + + Summary: + CAN Data Bit Timing Parameter structure. + + Description: + This data structure defines Data Bit Timing Parameters. + + Remarks: + None. +*/ +typedef struct +{ + /* Data Time segment after sample point */ + uint8_t dataTimeSegment2; + + /* Data Time segment before sample point */ + uint8_t dataTimeSegment1; + + /* Data Baud Rate Prescaler */ + uint8_t dataPrescaler; + + /* Data Syncronization Jump Width */ + uint8_t dataSJW; + +} CAN_DATA_BIT_TIMING; + +// ***************************************************************************** +/* CAN Bit Timing Parameters + + Summary: + CAN Bit Timing Parameter structure. + + Description: + This data structure defines Bit Timing Parameters. + + Remarks: + None. +*/ +typedef struct +{ + /* Nominal bit timing set flag */ + bool nominalBitTimingSet; + + /* Nominal bit timing parameters */ + CAN_NOMINAL_BIT_TIMING nominalBitTiming; + + /* Data bit timing set flag */ + bool dataBitTimingSet; + + /* Data bit timing parameters */ + CAN_DATA_BIT_TIMING dataBitTiming; +} CAN_BIT_TIMING; + +// ***************************************************************************** +/* CAN Bit Timing Setup + + Summary: + CAN Bit Timing Setup structure. + + Description: + This data structure defines Bit Timing Setup parameters. + + Remarks: + None. +*/ +typedef struct +{ + /* Nominal bit timing set flag */ + bool nominalBitTimingSet; + + /* Nominal bit rate */ + uint32_t nominalBitRate; + + /* Nominal Sample Point */ + float nominalSamplePoint; + + /* Nominal Baud Rate Prescaler */ + uint16_t nominalPrescaler; + + /* Data bit timing set flag */ + bool dataBitTimingSet; + + /* Data bit rate */ + uint32_t dataBitRate; + + /* Data Sample Point */ + float dataSamplePoint; + + /* Data Baud Rate Prescaler */ + uint8_t dataPrescaler; + +} CAN_BIT_TIMING_SETUP; + +// ***************************************************************************** +/* CAN Tx FIFO Callback Object + + Summary: + CAN transfer event callback structure for Tx FIFO. + + Description: + This data structure stores transfer event callback and it's context. + + Remarks: + None. +*/ +typedef struct +{ + /* Transfer Event Callback */ + CAN_TX_FIFO_CALLBACK callback; + + /* Transfer Event Callback Context */ + uintptr_t context; +} CAN_TX_FIFO_CALLBACK_OBJ; + +// ***************************************************************************** +/* CAN Tx/Rx Buffers Callback Object + + Summary: + CAN transfer event callback structure for Tx/Rx Buffers. + + Description: + This data structure stores transfer event callback and it's context. + + Remarks: + None. +*/ +typedef struct +{ + /* Transfer Event Callback */ + CAN_TXRX_BUFFERS_CALLBACK callback; + + /* Transfer Event Callback Context */ + uintptr_t context; +} CAN_TXRX_BUFFERS_CALLBACK_OBJ; + +// ***************************************************************************** +/* CAN Tx Event FIFO Callback Object + + Summary: + CAN transfer event callback structure for Tx Event FIFO. + + Description: + This data structure stores transfer event callback and it's context. + + Remarks: + None. +*/ +typedef struct +{ + /* Transfer Event Callback */ + CAN_TX_EVENT_FIFO_CALLBACK callback; + + /* Transfer Event Callback Context */ + uintptr_t context; +} CAN_TX_EVENT_FIFO_CALLBACK_OBJ; + +// ***************************************************************************** +/* CAN Rx FIFO0/FIFO1 Callback Object + + Summary: + CAN transfer event callback structure for Rx FIFO0/FIFO1. + + Description: + This data structure stores transfer event callback and it's context. + + Remarks: + None. +*/ +typedef struct +{ + /* Transfer Event Callback */ + CAN_RX_FIFO_CALLBACK callback; + + /* Transfer Event Callback Context */ + uintptr_t context; +} CAN_RX_FIFO_CALLBACK_OBJ; + +// ***************************************************************************** +/* CAN Callback Object + + Summary: + CAN interrupt status callback structure. + + Description: + This data structure stores interrupt status callback and it's context. + + Remarks: + None. +*/ +typedef struct +{ + /* CAN Interrupt Status Callback */ + CAN_CALLBACK callback; + + /* CAN Interrupt Status Callback Context */ + uintptr_t context; +} CAN_CALLBACK_OBJ; + +// ***************************************************************************** +/* CAN PLib Instance Object + + Summary: + CAN PLib Object structure. + + Description: + This data structure defines the CAN PLib Instance Object. + + Remarks: + None. +*/ +typedef struct +{ + /* Message RAM Configuration */ + CAN_MSG_RAM_CONFIG msgRAMConfig; + +} CAN_OBJ; + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility +} +#endif +// DOM-IGNORE-END + +#endif //PLIB_CAN_COMMON_H +/******************************************************************************* + End of File +*/ diff --git a/Telemetry/src/config/default/peripheral/clock/plib_clock.c b/Telemetry/src/config/default/peripheral/clock/plib_clock.c new file mode 100644 index 00000000..dfa7bbe0 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/clock/plib_clock.c @@ -0,0 +1,162 @@ +/******************************************************************************* + CLOCK PLIB + + Company: + Microchip Technology Inc. + + File Name: + plib_clock.c + + Summary: + CLOCK PLIB Implementation File. + + Description: + None + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#include "plib_clock.h" +#include "device.h" +#include "interrupts.h" + + + + +static void OSCCTRL_Initialize(void) +{ + uint32_t calibValue = (uint32_t)(((*(uint64_t*)0x00806020UL) >> 19 ) & 0x3fffffUL); + OSCCTRL_REGS->OSCCTRL_CAL48M = calibValue; + + + /* Selection of the Division Value */ + OSCCTRL_REGS->OSCCTRL_OSC48MDIV = (uint8_t)OSCCTRL_OSC48MDIV_DIV(0UL); + + while((OSCCTRL_REGS->OSCCTRL_OSC48MSYNCBUSY & OSCCTRL_OSC48MSYNCBUSY_OSC48MDIV_Msk) == OSCCTRL_OSC48MSYNCBUSY_OSC48MDIV_Msk) + { + /* Waiting for the synchronization */ + } + + while((OSCCTRL_REGS->OSCCTRL_STATUS & OSCCTRL_STATUS_OSC48MRDY_Msk) != OSCCTRL_STATUS_OSC48MRDY_Msk) + { + /* Waiting for the OSC48M Ready state */ + } + OSCCTRL_REGS->OSCCTRL_OSC48MCTRL |= OSCCTRL_OSC48MCTRL_ONDEMAND_Msk; + +} + +static void OSC32KCTRL_Initialize(void) +{ + OSC32KCTRL_REGS->OSC32KCTRL_OSC32K = 0x0UL; + + OSC32KCTRL_REGS->OSC32KCTRL_RTCCTRL = OSC32KCTRL_RTCCTRL_RTCSEL(0UL); +} + + + +static void GCLK0_Initialize(void) +{ + + GCLK_REGS->GCLK_GENCTRL[0] = GCLK_GENCTRL_DIV(1UL) | GCLK_GENCTRL_SRC(6UL) | GCLK_GENCTRL_GENEN_Msk; + + while((GCLK_REGS->GCLK_SYNCBUSY & GCLK_SYNCBUSY_GENCTRL0_Msk) == GCLK_SYNCBUSY_GENCTRL0_Msk) + { + /* wait for the Generator 0 synchronization */ + } +} + +void CLOCK_Initialize (void) +{ + /* Function to Initialize the Oscillators */ + OSCCTRL_Initialize(); + + /* Function to Initialize the 32KHz Oscillators */ + OSC32KCTRL_Initialize(); + + GCLK0_Initialize(); + + + /* Selection of the Generator and write Lock for EIC */ + GCLK_REGS->GCLK_PCHCTRL[2] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[2] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Selection of the Generator and write Lock for SERCOM0_CORE */ + GCLK_REGS->GCLK_PCHCTRL[19] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[19] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Selection of the Generator and write Lock for SERCOM1_CORE */ + GCLK_REGS->GCLK_PCHCTRL[20] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[20] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Selection of the Generator and write Lock for SERCOM2_CORE */ + GCLK_REGS->GCLK_PCHCTRL[21] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[21] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Selection of the Generator and write Lock for SERCOM3_CORE */ + GCLK_REGS->GCLK_PCHCTRL[22] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[22] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Selection of the Generator and write Lock for CAN0 */ + GCLK_REGS->GCLK_PCHCTRL[26] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[26] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Selection of the Generator and write Lock for TC2 TC3 */ + GCLK_REGS->GCLK_PCHCTRL[31] = GCLK_PCHCTRL_GEN(0x0UL) | GCLK_PCHCTRL_CHEN_Msk; + + while ((GCLK_REGS->GCLK_PCHCTRL[31] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) + { + /* Wait for synchronization */ + } + /* Configure the AHB Bridge Clocks */ + MCLK_REGS->MCLK_AHBMASK = 0x1dffU; + + + + /* Configure the APBC Bridge Clocks */ + MCLK_REGS->MCLK_APBCMASK = 0xc01eU; + + +} + + + diff --git a/Telemetry/src/config/default/peripheral/clock/plib_clock.h b/Telemetry/src/config/default/peripheral/clock/plib_clock.h new file mode 100644 index 00000000..b651a2b5 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/clock/plib_clock.h @@ -0,0 +1,143 @@ +/******************************************************************************* + CLOCK PLIB + + Company: + Microchip Technology Inc. + + File Name: + plib_clock.h + + Summary: + CLOCK PLIB Header File. + + Description: + The Clock PLIB initializes all the oscillators based on the + requirements. + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef PLIB_CLOCK_H +#define PLIB_CLOCK_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ +#include +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility +extern "C" { +#endif + +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** +/* The following functions make up the methods (set of possible operations) of +this interface. +*/ + +// ***************************************************************************** +/* Function: + void CLOCK_Initialize (void); + + Summary: + Initializes all the modules related to the system clock. + + Description: + This function initializes the clock as defined by the MHC and Clock Manager + selections. The function will configure the NVM Flash Wait states based on + the configured CPU operational frequency. It will then configure the + oscillators. + + For each of the clock sources (External Oscillator, Digital Phase Locked + Loop, Internal 48MHz Oscillator, External 32KHz oscillator and the Internal + 32KHz oscillator) enabled in MHC, the function will configure the clock + settings and will then wait till the clock is ready. In case of DPLL, the + function will wait till a lock is obtained. + + The function will then configure the Generic clock generators based on MHC + configurations. If a Generic Clock is enabled in MHC, this will be enabled + in the CLOCK_Initialize() function. The function will apply the CPU clock + divider and will wait for the Main Clock module to get ready. If the Main + Clock to the Peripheral APB and AHB interfaces was enabled in MHC, these + will be enabled in the CLOCK_Initialize() function. If the Peripheral Clock + Channels were enabled in MHC, these will be enabled in the + CLOCK_Initialize() function. + + The peripheral AHB and APB main clock and peripheral channel clocks will be + enabled when the peripheral specific initialize functions are called. This + will override the setting in MHC. The Generic Clock Generator source for + desired peripheral channel must be configured in MHC. + + Precondition: + MHC GUI should be configured with the right values. Incorrect configuration + of the Clock will result in incorrect peripheral behavior or a non + functional device. + + Parameters: + None. + + Returns: + None. + + Example: + + CLOCK_Initialize(); + + + Remarks: + This function should be called before calling other Clock library functions. +*/ + +void CLOCK_Initialize (void); + + + + +#ifdef __cplusplus // Provide C++ Compatibility +} +#endif + +#endif /* PLIB_CLOCK_H */ + diff --git a/Telemetry/src/config/default/peripheral/eic/plib_eic.c b/Telemetry/src/config/default/peripheral/eic/plib_eic.c new file mode 100644 index 00000000..74b9f63f --- /dev/null +++ b/Telemetry/src/config/default/peripheral/eic/plib_eic.c @@ -0,0 +1,187 @@ +/******************************************************************************* + External Interrupt Controller (EIC) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_eic.c + + Summary + Source for EIC peripheral library interface Implementation. + + Description + This file defines the interface to the EIC peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "plib_eic.h" +#include "interrupts.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data +// ***************************************************************************** +// ***************************************************************************** + +/* EIC Channel Callback object */ +static volatile EIC_CALLBACK_OBJ eicCallbackObject[EXTINT_COUNT]; + + +void EIC_Initialize (void) +{ + /* Reset all registers in the EIC module to their initial state and + EIC will be disabled. */ + EIC_REGS->EIC_CTRLA |= (uint8_t)EIC_CTRLA_SWRST_Msk; + + while((EIC_REGS->EIC_SYNCBUSY & EIC_SYNCBUSY_SWRST_Msk) == EIC_SYNCBUSY_SWRST_Msk) + { + /* Wait for sync */ + } + + /* EIC is by default clocked by GCLK */ + + /* NMI Control register */ + + /* Interrupt sense type and filter control for EXTINT channels 0 to 7*/ + EIC_REGS->EIC_CONFIG[0] = EIC_CONFIG_SENSE0_NONE | + EIC_CONFIG_SENSE1_NONE | + EIC_CONFIG_SENSE2_NONE | + EIC_CONFIG_SENSE3_FALL | + EIC_CONFIG_SENSE4_NONE | + EIC_CONFIG_SENSE5_NONE | + EIC_CONFIG_SENSE6_NONE | + EIC_CONFIG_SENSE7_NONE ; + + /* Interrupt sense type and filter control for EXTINT channels 8 to 15 */ + EIC_REGS->EIC_CONFIG[1] = EIC_CONFIG_SENSE0_RISE + | EIC_CONFIG_SENSE1_NONE + | EIC_CONFIG_SENSE2_NONE + | EIC_CONFIG_SENSE3_NONE + | EIC_CONFIG_SENSE4_NONE + | EIC_CONFIG_SENSE5_NONE + | EIC_CONFIG_SENSE6_NONE + | EIC_CONFIG_SENSE7_NONE ; + + + + + + + /* External Interrupt enable*/ + EIC_REGS->EIC_INTENSET = 0x104U; + + /* Callbacks for enabled interrupts */ + eicCallbackObject[0].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[1].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[2].eicPinNo = EIC_PIN_2; + eicCallbackObject[3].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[4].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[5].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[6].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[7].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[8].eicPinNo = EIC_PIN_8; + eicCallbackObject[9].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[10].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[11].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[12].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[13].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[14].eicPinNo = EIC_PIN_MAX; + eicCallbackObject[15].eicPinNo = EIC_PIN_MAX; + /* Enable the EIC */ + EIC_REGS->EIC_CTRLA |= (uint8_t)EIC_CTRLA_ENABLE_Msk; + + while((EIC_REGS->EIC_SYNCBUSY & EIC_SYNCBUSY_ENABLE_Msk) == EIC_SYNCBUSY_ENABLE_Msk) + { + /* Wait for sync */ + } +} + +void EIC_InterruptEnable (EIC_PIN pin) +{ + EIC_REGS->EIC_INTENSET = (1UL << (uint32_t)pin); +} + +void EIC_InterruptDisable (EIC_PIN pin) +{ + EIC_REGS->EIC_INTENCLR = (1UL << (uint32_t)pin); +} + +void EIC_CallbackRegister(EIC_PIN pin, EIC_CALLBACK callback, uintptr_t context) +{ + if (eicCallbackObject[pin].eicPinNo == pin) + { + eicCallbackObject[pin].callback = callback; + + eicCallbackObject[pin].context = context; + } +} + +void __attribute__((used)) EIC_InterruptHandler(void) +{ + uint8_t currentChannel; + uint32_t eicIntFlagStatus; + + /* Find any triggered channels, run associated callback handlers */ + for (currentChannel = 0U; currentChannel < EXTINT_COUNT; currentChannel++) + { + /* Verify if the EXTINT x Interrupt Pin is enabled */ + if (((uint8_t)eicCallbackObject[currentChannel].eicPinNo == currentChannel)) + { + /* Read the interrupt flag status */ + eicIntFlagStatus = EIC_REGS->EIC_INTFLAG & (1UL << currentChannel); + + if (0U != eicIntFlagStatus) + { + /* Find any associated callback entries in the callback table */ + if ((eicCallbackObject[currentChannel].callback != NULL)) + { + uintptr_t context = eicCallbackObject[currentChannel].context; + eicCallbackObject[currentChannel].callback(context); + } + + /* Clear interrupt flag */ + EIC_REGS->EIC_INTFLAG = (1UL << currentChannel); + } + } + } +} + diff --git a/Telemetry/src/config/default/peripheral/eic/plib_eic.h b/Telemetry/src/config/default/peripheral/eic/plib_eic.h new file mode 100644 index 00000000..ceb79180 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/eic/plib_eic.h @@ -0,0 +1,327 @@ +/******************************************************************************* External Interrupt Controller (EIC) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_eic.h + + Summary + EIC PLIB Header File. + + Description + This file defines the interface to the EIC peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +/* Guards against multiple inclusion */ +#ifndef PLIB_EIC_H +#define PLIB_EIC_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "device.h" +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** +/* The following data type definitions are used by the functions in this + interface and should be considered part of it. +*/ + +/* EIC Pin Count */ +#define EXTINT_COUNT (16U) + +// ***************************************************************************** +/* EIC Pins + + Summary: + Identifies the available EIC pins. + + Description: + This enumeration identifies all the available EIC pins. Not all pins will be + implemented in a device. The pins described here are for documentation + purposes only. The MHC will generate this enumeration with the enabled EIC + pins only. The application should not use the constant value that are + assigned to enumeration constants as this may vary between devices. + + Remarks: + None. +*/ + + + /* External Interrupt Controller Pin 2 */ +#define EIC_PIN_2 (2U) + + /* External Interrupt Controller Pin 8 */ +#define EIC_PIN_8 (8U) + +#define EIC_PIN_MAX (16U) + +typedef uint16_t EIC_PIN; + +// ***************************************************************************** +/* EIC Interrupt Pin Callback Function Pointer Type + + Summary: + Defines the data type and function signature of the EIC peripheral callback + function. + + Description: + This data type defines the function signature for the EIC peripheral + callback function. The EIC peripheral will call back the client's function + with this signature when an interrupt condition has been sensed on the pin. + The EIC library allows the application to register a callback function for + each enabled external interrupt. + + Function: + void (*EIC_CALLBACK)(uintptr_t context ) + + Precondition: + EIC_Initialize must have been called for the given EIC + peripheral instance and EIC_CallbackRegister must have been + called to set the function to be called. + + Parameters: + context - Allows the caller to provide a context value (usually a pointer + to the callers context for multi-instance clients). + + Returns: + None. + + Example: + + + void EIC_Pin0Callback (uintptr_t context) + { + This means an interrupt condition has been sensed on EIC Pin 0. + } + + EIC_CallbackRegister(EIC_PIN_0, EIC_Pin0Callback, 0); + + + Remarks: + None. +*/ + +typedef void (*EIC_CALLBACK) (uintptr_t context); + +typedef struct +{ + /* External Interrupt Pin Callback Handler */ + EIC_CALLBACK callback; + + /* External Interrupt Pin Client context */ + uintptr_t context; + + /* External Interrupt Pin number */ + EIC_PIN eicPinNo; + +} EIC_CALLBACK_OBJ; + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** +/* The following functions make up the methods (set of possible operations) of + this interface. +*/ + +// ***************************************************************************** +/* Function: + void EIC_Initialize (void); + + Summary: + Initializes given instance of EIC peripheral. + + Description: + This function initializes given instance of EIC peripheral of the device + with the values configured in MHC GUI. + + Precondition: + MHC GUI should be configured with the right values. + + Parameters: + None. + + Returns: + None. + + Example: + + EIC_Initialize(); + + + Remarks: + This function should only be called once during system initialization + before any other EIC function is called. +*/ + +void EIC_Initialize (void); + +// ***************************************************************************** +/* Function: + void EIC_InterruptEnable (EIC_PIN pin) + + Summary: + Enables interrupts on a pin. + + Description + This function enables interrupts on an external interrupt pin. + When enabled, the interrupt pin sense will be configured as per the + configuration set in MHC. + + Precondition: + EIC_Initialize() function must have been called for the + associated instance. + + Parameters: + pin - EIC Pin number + + Returns: + None + + Example: + + EIC_Initialize(); + EIC_InterruptEnable(EIC_PIN_3); + + + Remarks: + None. +*/ +void EIC_InterruptEnable (EIC_PIN pin); + +// ***************************************************************************** +/* Function: + void EIC_InterruptDisable (EIC_PIN pin) + + Summary: + Disables interrupts on a pin. + + Description + This function disables interrupts on an external interrupt pin. + + Precondition: + EIC_Initialize() function must have been called for the + associated instance. + + Parameters: + pin - EIC Pin number. + + Returns: + None + + Example: + + EIC_Initialize(); + EIC_InterruptDisable(EIC_PIN_3); + + + Remarks: + None. +*/ + +void EIC_InterruptDisable (EIC_PIN pin); + +// ***************************************************************************** +/* Function: + void EIC_CallbackRegister (EIC_PIN pin, EIC_CALLBACK callback + uintptr_t context); + + Summary: + Registers the function to be called when an interrupt condition has been + sensed on the pin. + + Description + This function registers the callback function to be called when an interrupt + condition has been sensed on the pin. A unique callback function can be + registered for each pin. + + When an interrupt condition has been sensed on the pin, the library will + call the registered callback function and will then clear the interrupt + condition when the callback function exits. + + Precondition: + EIC_Initialize() must have been called first for the associated + instance. + + Parameters: + pin - EIC Pin number + + callback - callback function pointer. Setting this to NULL will disable the + callback feature. + + context - An application defined context value that will be passed to the + callback function. + + Returns: + None. + + Example: + + Refer to the description of the EIC_CALLBACK data type for details on API + usage. + + + Remarks: + Context value can be set to NULL, if not required. +*/ + +void EIC_CallbackRegister(EIC_PIN pin, EIC_CALLBACK callback, uintptr_t context); + + + +#ifdef __cplusplus // Provide C++ Compatibility +} +#endif +#endif /* PLIB_EIC_H */ diff --git a/Telemetry/src/config/default/peripheral/evsys/plib_evsys.c b/Telemetry/src/config/default/peripheral/evsys/plib_evsys.c new file mode 100644 index 00000000..7b0c357e --- /dev/null +++ b/Telemetry/src/config/default/peripheral/evsys/plib_evsys.c @@ -0,0 +1,52 @@ +/******************************************************************************* + EVSYS Peripheral Library + + Company: + Microchip Technology Inc. + + File Name: + plib_evsys.c + + Summary: + EVSYS Source File + + Description: + None + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#include "plib_evsys.h" +#include "interrupts.h" + + +void EVSYS_Initialize( void ) +{ /*Event Channel User Configuration*/ + + +} + + + diff --git a/Telemetry/src/config/default/peripheral/evsys/plib_evsys.h b/Telemetry/src/config/default/peripheral/evsys/plib_evsys.h new file mode 100644 index 00000000..1220d7eb --- /dev/null +++ b/Telemetry/src/config/default/peripheral/evsys/plib_evsys.h @@ -0,0 +1,68 @@ +/******************************************************************************* + Interface definition of EVSYS PLIB. + + Company: + Microchip Technology Inc. + + File Name: + plib_evsys.h + + Summary: + Interface definition of the Event System Plib (EVSYS). + + Description: + This file defines the interface for the EVSYS Plib. + It allows user to setup event generators and users. +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef EVSYS_H // Guards against multiple inclusion +#define EVSYS_H + +#include "device.h" +#include +#include + +#ifdef __cplusplus // Provide C++ Compatibility + extern "C" { +#endif + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface +// ***************************************************************************** +// ***************************************************************************** + + + +/***************************** EVSYS API *******************************/ +void EVSYS_Initialize( void ); + +#ifdef __cplusplus // Provide C++ Compatibility + } +#endif + +#endif diff --git a/Telemetry/src/config/default/peripheral/nvic/plib_nvic.c b/Telemetry/src/config/default/peripheral/nvic/plib_nvic.c new file mode 100644 index 00000000..26b45b41 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/nvic/plib_nvic.c @@ -0,0 +1,131 @@ +/******************************************************************************* + NVIC PLIB Implementation + + Company: + Microchip Technology Inc. + + File Name: + plib_nvic.c + + Summary: + NVIC PLIB Source File + + Description: + None + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#include "device.h" +#include "plib_nvic.h" + + +// ***************************************************************************** +// ***************************************************************************** +// Section: NVIC Implementation +// ***************************************************************************** +// ***************************************************************************** + +void NVIC_Initialize( void ) +{ + + /* Enable NVIC Controller */ + __DMB(); + __enable_irq(); + + /* Enable the interrupt sources and configure the priorities as configured + * from within the "Interrupt Manager" of MHC. */ + NVIC_SetPriority(EIC_IRQn, 3); + NVIC_EnableIRQ(EIC_IRQn); + NVIC_SetPriority(SERCOM0_IRQn, 3); + NVIC_EnableIRQ(SERCOM0_IRQn); + NVIC_SetPriority(SERCOM1_IRQn, 3); + NVIC_EnableIRQ(SERCOM1_IRQn); + NVIC_SetPriority(SERCOM3_IRQn, 3); + NVIC_EnableIRQ(SERCOM3_IRQn); + NVIC_SetPriority(CAN0_IRQn, 3); + NVIC_EnableIRQ(CAN0_IRQn); + NVIC_SetPriority(TC2_IRQn, 3); + NVIC_EnableIRQ(TC2_IRQn); + NVIC_SetPriority(TC3_IRQn, 3); + NVIC_EnableIRQ(TC3_IRQn); + + + + +} + +void NVIC_INT_Enable( void ) +{ + __DMB(); + __enable_irq(); +} + +bool NVIC_INT_Disable( void ) +{ + bool processorStatus = (__get_PRIMASK() == 0U); + + __disable_irq(); + __DMB(); + + return processorStatus; +} + +void NVIC_INT_Restore( bool state ) +{ + if( state == true ) + { + __DMB(); + __enable_irq(); + } + else + { + __disable_irq(); + __DMB(); + } +} + +bool NVIC_INT_SourceDisable( IRQn_Type source ) +{ + bool processorStatus; + bool intSrcStatus; + + processorStatus = NVIC_INT_Disable(); + intSrcStatus = (NVIC_GetEnableIRQ(source) != 0U); + NVIC_DisableIRQ( source ); + NVIC_INT_Restore( processorStatus ); + + /* return the source status */ + return intSrcStatus; +} + +void NVIC_INT_SourceRestore( IRQn_Type source, bool status ) +{ + if( status ) { + NVIC_EnableIRQ( source ); + } + + return; +} \ No newline at end of file diff --git a/Telemetry/src/config/default/peripheral/nvic/plib_nvic.h b/Telemetry/src/config/default/peripheral/nvic/plib_nvic.h new file mode 100644 index 00000000..aa9ec085 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/nvic/plib_nvic.h @@ -0,0 +1,72 @@ +/******************************************************************************* + NVIC PLIB Header + + Company: + Microchip Technology Inc. + + File Name: + plib_nvic.h + + Summary: + NVIC PLIB Header File + + Description: + None + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef PLIB_NVIC_H +#define PLIB_NVIC_H + +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + + +/***************************** NVIC Inline *******************************/ + +void NVIC_Initialize( void ); +void NVIC_INT_Enable( void ); +bool NVIC_INT_Disable( void ); +void NVIC_INT_Restore( bool state ); +bool NVIC_INT_SourceDisable( IRQn_Type source ); +void NVIC_INT_SourceRestore( IRQn_Type source, bool status ); + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END +#endif // PLIB_NVIC_H diff --git a/Telemetry/src/config/default/peripheral/nvmctrl/plib_nvmctrl.c b/Telemetry/src/config/default/peripheral/nvmctrl/plib_nvmctrl.c new file mode 100644 index 00000000..5671d4f0 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/nvmctrl/plib_nvmctrl.c @@ -0,0 +1,260 @@ +/******************************************************************************* + Non-Volatile Memory Controller(NVMCTRL) PLIB. + + Company: + Microchip Technology Inc. + + File Name: + plib_nvmctrl.c + + Summary: + Interface definition of NVMCTRL Plib. + + Description: + This file defines the interface for the NVMCTRL Plib. + It allows user to Program, Erase and lock the on-chip Non Volatile Flash + Memory. +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include "interrupts.h" +#include "plib_nvmctrl.h" + + +// ***************************************************************************** +// ***************************************************************************** +// Section: NVMCTRL Implementation +// ***************************************************************************** +// ***************************************************************************** + + +void NVMCTRL_Initialize(void) +{ + NVMCTRL_REGS->NVMCTRL_CTRLB = NVMCTRL_CTRLB_READMODE_NO_MISS_PENALTY | NVMCTRL_CTRLB_SLEEPPRM_WAKEONACCESS | NVMCTRL_CTRLB_RWS(2UL) | NVMCTRL_CTRLB_MANW_Msk; +} + +void NVMCTRL_CacheInvalidate(void) +{ + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_INVALL | NVMCTRL_CTRLA_CMDEX_KEY); +} +bool NVMCTRL_RWWEEPROM_Read( uint32_t *data, uint32_t length, const uint32_t address ) +{ + uint32_t *paddress = (uint32_t*)address; + (void)memcpy(data, paddress, length); + return true; +} + +bool NVMCTRL_RWWEEPROM_PageWrite ( uint32_t *data, const uint32_t address ) +{ + uint32_t i; + uint32_t * paddress = (uint32_t *)address; + + /* Writing 32-bit words in the given address */ + for ( i = 0U; i < (NVMCTRL_RWWEEPROM_PAGESIZE/4U); i++) + { + *paddress = *(data + i); + paddress++; + } + + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_RWWEEWP | NVMCTRL_CTRLA_CMDEX_KEY); + + return true; +} + +bool NVMCTRL_RWWEEPROM_RowErase( uint32_t address ) +{ + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_RWWEEER | NVMCTRL_CTRLA_CMDEX_KEY); + + return true; +} +bool NVMCTRL_Read( uint32_t *data, uint32_t length, const uint32_t address ) +{ + uint32_t *paddress = (uint32_t*)address; + (void)memcpy(data, paddress, length); + return true; +} + +bool NVMCTRL_PageBufferWrite( uint32_t *data, const uint32_t address) +{ + uint32_t i; + uint32_t * paddress = (uint32_t *)address; + + /* writing 32-bit data into the given address */ + for (i = 0U; i < (NVMCTRL_FLASH_PAGESIZE/4U); i++) + { + *paddress = *(data + i); + paddress++; + } + + return true; +} + +bool NVMCTRL_PageBufferCommit( const uint32_t address) +{ + uint16_t command = NVMCTRL_CTRLA_CMD_WP_Val; + + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + if (address >= NVMCTRL_RWWEEPROM_START_ADDRESS) + { + command = NVMCTRL_CTRLA_CMD_RWWEEWP; + } + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(command | NVMCTRL_CTRLA_CMDEX_KEY); + + + return true; +} + +bool NVMCTRL_PageWrite( uint32_t *data, const uint32_t address ) +{ + uint32_t i; + uint32_t * paddress = (uint32_t *)address; + + /* writing 32-bit data into the given address */ + for (i = 0U; i < (NVMCTRL_FLASH_PAGESIZE/4U); i++) + { + *paddress = *(data + i); + paddress++; + } + + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_WP_Val | NVMCTRL_CTRLA_CMDEX_KEY); + + return true; +} + +bool NVMCTRL_RowErase( uint32_t address ) +{ + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_ER_Val | NVMCTRL_CTRLA_CMDEX_KEY); + + return true; +} + +bool NVMCTRL_USER_ROW_PageWrite( uint32_t *data, const uint32_t address ) +{ + uint32_t i; + uint32_t * paddress = (uint32_t *)address; + bool pagewrite_val = false; + + if ((address >= NVMCTRL_USERROW_START_ADDRESS) && (address <= ((NVMCTRL_USERROW_START_ADDRESS + NVMCTRL_USERROW_SIZE) - NVMCTRL_USERROW_PAGESIZE))) + { + /* writing 32-bit data into the given address */ + for (i = 0U; i < (NVMCTRL_USERROW_PAGESIZE/4U); i++) + { + *paddress = data[i]; + paddress++; + } + + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = NVMCTRL_CTRLA_CMD_WAP_Val | NVMCTRL_CTRLA_CMDEX_KEY; + + + pagewrite_val = true; + } + + return pagewrite_val; +} + +bool NVMCTRL_USER_ROW_RowErase( uint32_t address ) +{ + bool rowerase = false; + if ((address >= NVMCTRL_USERROW_START_ADDRESS) && (address <= (NVMCTRL_USERROW_START_ADDRESS + NVMCTRL_USERROW_SIZE))) + { + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = NVMCTRL_CTRLA_CMD_EAR_Val | NVMCTRL_CTRLA_CMDEX_KEY; + + + rowerase = true; + } + + return rowerase; +} + +NVMCTRL_ERROR NVMCTRL_ErrorGet( void ) +{ + uint16_t nvm_error; + + /* Get the error bits set */ + nvm_error = (NVMCTRL_REGS->NVMCTRL_STATUS & (NVMCTRL_STATUS_NVME_Msk | NVMCTRL_STATUS_LOCKE_Msk | NVMCTRL_STATUS_PROGE_Msk)); + + /* Clear the error bits in both STATUS and INTFLAG register */ + NVMCTRL_REGS->NVMCTRL_STATUS |= nvm_error; + + NVMCTRL_REGS->NVMCTRL_INTFLAG = NVMCTRL_INTFLAG_ERROR_Msk; + + return ((NVMCTRL_ERROR) nvm_error); +} + +bool NVMCTRL_IsBusy(void) +{ + return ((NVMCTRL_REGS->NVMCTRL_INTFLAG & NVMCTRL_INTFLAG_READY_Msk)!= NVMCTRL_INTFLAG_READY_Msk); +} + +void NVMCTRL_RegionLock(uint32_t address) +{ + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_LR_Val | NVMCTRL_CTRLA_CMDEX_KEY); +} + +void NVMCTRL_RegionUnlock(uint32_t address) +{ + /* Set address and command */ + NVMCTRL_REGS->NVMCTRL_ADDR = address >> 1U; + + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_UR_Val | NVMCTRL_CTRLA_CMDEX_KEY); +} + +void NVMCTRL_SecurityBitSet(void) +{ + NVMCTRL_REGS->NVMCTRL_CTRLA = (uint16_t)(NVMCTRL_CTRLA_CMD_SSB_Val | NVMCTRL_CTRLA_CMDEX_KEY); +} diff --git a/Telemetry/src/config/default/peripheral/nvmctrl/plib_nvmctrl.h b/Telemetry/src/config/default/peripheral/nvmctrl/plib_nvmctrl.h new file mode 100644 index 00000000..8cc75594 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/nvmctrl/plib_nvmctrl.h @@ -0,0 +1,137 @@ +/******************************************************************************* + Non-Volatile Memory Controller(NVMCTRL) PLIB. + + Company: + Microchip Technology Inc. + + File Name: + plib_nvmctrl.h + + Summary: + Interface definition of NVMCTRL Plib. + + Description: + This file defines the interface for the NVMCTRL Plib. + It allows user to Program, Erase and lock the on-chip Non Volatile Flash + Memory. +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_NVMCTRL_H +#define PLIB_NVMCTRL_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "device.h" +#include +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + extern "C" { +#endif + +// DOM-IGNORE-END +// ***************************************************************************** +// ***************************************************************************** +// Section: Preprocessor macros +// ***************************************************************************** +// ***************************************************************************** + +#define NVMCTRL_FLASH_START_ADDRESS (0x00000000U) +#define NVMCTRL_FLASH_PAGESIZE (64U) +#define NVMCTRL_FLASH_ROWSIZE (256U) + +#define NVMCTRL_EMULATED_EEPROM_START_ADDRESS (0x40000U) +#define NVMCTRL_EMULATED_EEPROM_PAGESIZE (64U) +#define NVMCTRL_EMULATED_EEPROM_SIZE (0U) + +#define NVMCTRL_RWWEEPROM_START_ADDRESS (0x00400000U) +#define NVMCTRL_RWWEEPROM_SIZE (0x2000U) +#define NVMCTRL_RWWEEPROM_PAGESIZE (64U) +#define NVMCTRL_RWWEEPROM_ROWSIZE (256U) + +#define NVMCTRL_USERROW_START_ADDRESS (0x00804000U) +#define NVMCTRL_USERROW_SIZE (0x100U) +#define NVMCTRL_USERROW_PAGESIZE (64U) + +#define NVMCTRL_ERROR_NONE 0x0U +#define NVMCTRL_ERROR_PROG 0x4U +#define NVMCTRL_ERROR_LOCK 0x8U +#define NVMCTRL_ERROR_NVM 0x10U + +typedef uint16_t NVMCTRL_ERROR; + + +void NVMCTRL_Initialize(void); + +bool NVMCTRL_Read( uint32_t *data, uint32_t length, const uint32_t address ); + +bool NVMCTRL_PageWrite( uint32_t *data, const uint32_t address ); + + +bool NVMCTRL_PageBufferWrite( uint32_t *data, const uint32_t address); + +bool NVMCTRL_PageBufferCommit( const uint32_t address); + + +bool NVMCTRL_RowErase( uint32_t address ); + +bool NVMCTRL_RWWEEPROM_Read( uint32_t *data, uint32_t length, const uint32_t address ); + +bool NVMCTRL_RWWEEPROM_PageWrite ( uint32_t *data, const uint32_t address ); + +bool NVMCTRL_RWWEEPROM_RowErase ( uint32_t address ); + +NVMCTRL_ERROR NVMCTRL_ErrorGet( void ); + +bool NVMCTRL_IsBusy( void ); + +void NVMCTRL_RegionLock (uint32_t address); + +void NVMCTRL_RegionUnlock (uint32_t address); + +void NVMCTRL_SecurityBitSet(void); + + +bool NVMCTRL_USER_ROW_PageWrite( uint32_t *data, const uint32_t address ); + +bool NVMCTRL_USER_ROW_RowErase( uint32_t address ); + +void NVMCTRL_CacheInvalidate ( void ); + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility +} +#endif +// DOM-IGNORE-END +#endif // PLIB_NVMCTRL_H diff --git a/Telemetry/src/config/default/peripheral/port/plib_port.c b/Telemetry/src/config/default/peripheral/port/plib_port.c new file mode 100644 index 00000000..846480d2 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/port/plib_port.c @@ -0,0 +1,355 @@ +/******************************************************************************* + PORT PLIB + + Company: + Microchip Technology Inc. + + File Name: + plib_port.c + + Summary: + Interface definition of PORT PLIB + + Description: + This file provides an interface to control and interact with PORT-I/O + Pin controller module. + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "plib_port.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: PORT Implementation +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** +/* Function: + + void PORT_Initialize(void) + + Summary: + Initializes the PORT Library. + + Description: + This function initializes all ports and pins as configured in the + MHC Pin Manager. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_Initialize(void) +{ + /************************** GROUP 0 Initialization *************************/ + PORT_REGS->GROUP[0].PORT_DIR = 0x380U; + PORT_REGS->GROUP[0].PORT_PINCFG[6] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[7] = 0x0U; + PORT_REGS->GROUP[0].PORT_PINCFG[8] = 0x0U; + PORT_REGS->GROUP[0].PORT_PINCFG[9] = 0x0U; + PORT_REGS->GROUP[0].PORT_PINCFG[14] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[15] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[16] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[17] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[18] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[19] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[24] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[25] = 0x1U; + PORT_REGS->GROUP[0].PORT_PINCFG[28] = 0x1U; + + PORT_REGS->GROUP[0].PORT_PMUX[3] = 0x3U; + PORT_REGS->GROUP[0].PORT_PMUX[4] = 0x0U; + PORT_REGS->GROUP[0].PORT_PMUX[7] = 0x22U; + PORT_REGS->GROUP[0].PORT_PMUX[8] = 0x33U; + PORT_REGS->GROUP[0].PORT_PMUX[9] = 0x30U; + PORT_REGS->GROUP[0].PORT_PMUX[12] = 0x66U; + PORT_REGS->GROUP[0].PORT_PMUX[14] = 0x0U; + + /************************** GROUP 1 Initialization *************************/ + + + +} +// ***************************************************************************** +/* Function: + uint32_t PORT_GroupRead(PORT_GROUP group) + + Summary: + Read all the I/O pins in the specified port group. + + Description: + The function reads the hardware pin state of all pins in the specified group + and returns this as a 32 bit value. Each bit in the 32 bit value represent a + pin. For example, bit 0 in group 0 will represent pin PA0. Bit 1 will + represent PA1 and so on. The application should only consider the value of + the port group pins which are implemented on the device. + + Remarks: + Refer plib_port.h file for more information. +*/ + +uint32_t PORT_GroupRead(PORT_GROUP group) +{ + return (((port_group_registers_t*)group)->PORT_IN); +} + +// ***************************************************************************** +/* Function: + void PORT_GroupWrite(PORT_GROUP group, uint32_t mask, uint32_t value); + + Summary: + Write value on the masked pins of the selected port group. + + Description: + This function writes the value contained in the value parameter to the + port group. Port group pins which are configured for output will be updated. + The mask parameter provides additional control on the bits in the group to + be affected. Setting a bit to 1 in the mask will cause the corresponding + bit in the port group to be updated. Clearing a bit in the mask will cause + that corresponding bit in the group to stay unaffected. For example, + setting a mask value 0xFFFFFFFF will cause all bits in the port group + to be updated. Setting a value 0x3 will only cause port group bit 0 and + bit 1 to be updated. + + For port pins which are not configured for output and have the pull feature + enabled, this function will affect pull value (pull up or pull down). A bit + value of 1 will enable the pull up. A bit value of 0 will enable the pull + down. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_GroupWrite(PORT_GROUP group, uint32_t mask, uint32_t value) +{ + /* Write the desired value */ + ((port_group_registers_t*)group)->PORT_OUT = (((port_group_registers_t*)group)->PORT_OUT & (~mask)) | (mask & value); +} + +// ***************************************************************************** +/* Function: + uint32_t PORT_GroupLatchRead(PORT_GROUP group) + + Summary: + Read the data driven on all the I/O pins of the selected port group. + + Description: + The function will return a 32-bit value representing the logic levels being + driven on the output pins within the group. The function will not sample the + actual hardware state of the output pin. Each bit in the 32-bit return value + will represent one of the 32 port pins within the group. The application + should only consider the value of the pins which are available on the + device. + + Remarks: + Refer plib_port.h file for more information. +*/ + +uint32_t PORT_GroupLatchRead(PORT_GROUP group) +{ + return (((port_group_registers_t*)group)->PORT_OUT); +} + +// ***************************************************************************** +/* Function: + void PORT_GroupSet(PORT_GROUP group, uint32_t mask) + + Summary: + Set the selected IO pins of a group. + + Description: + This function sets (drives a logic high) on the selected output pins of a + group. The mask parameter control the pins to be updated. A mask bit + position with a value 1 will cause that corresponding port pin to be set. A + mask bit position with a value 0 will cause the corresponding port pin to + stay un-affected. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_GroupSet(PORT_GROUP group, uint32_t mask) +{ + ((port_group_registers_t*)group)->PORT_OUTSET = mask; +} + +// ***************************************************************************** +/* Function: + void PORT_GroupClear(PORT_GROUP group, uint32_t mask) + + Summary: + Clears the selected IO pins of a group. + + Description: + This function clears (drives a logic 0) on the selected output pins of a + group. The mask parameter control the pins to be updated. A mask bit + position with a value 1 will cause that corresponding port pin to be clear. + A mask bit position with a value 0 will cause the corresponding port pin to + stay un-affected. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_GroupClear(PORT_GROUP group, uint32_t mask) +{ + ((port_group_registers_t*)group)->PORT_OUTCLR = mask; +} + +// ***************************************************************************** +/* Function: + void PORT_GroupToggle(PORT_GROUP group, uint32_t mask) + + Summary: + Toggles the selected IO pins of a group. + + Description: + This function toggles the selected output pins of a group. The mask + parameter control the pins to be updated. A mask bit position with a value 1 + will cause that corresponding port pin to be toggled. A mask bit position + with a value 0 will cause the corresponding port pin to stay un-affected. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_GroupToggle(PORT_GROUP group, uint32_t mask) +{ + ((port_group_registers_t*)group)->PORT_OUTTGL = mask; +} + +// ***************************************************************************** +/* Function: + void PORT_GroupInputEnable(PORT_GROUP group, uint32_t mask) + + Summary: + Configures the selected IO pins of a group as input. + + Description: + This function configures the selected IO pins of a group as input. The pins + to be configured as input are selected by setting the corresponding bits in + the mask parameter to 1. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_GroupInputEnable(PORT_GROUP group, uint32_t mask) +{ + ((port_group_registers_t*)group)->PORT_DIRCLR = mask; + + for(uint32_t i = 0U; i < 32U; i++) + { + if((mask & ((uint32_t)1U << i)) != 0U) + { + ((port_group_registers_t*)group)->PORT_PINCFG[i] |= PORT_PINCFG_INEN_Msk; + } + } +} + +// ***************************************************************************** +/* Function: + void PORT_GroupOutputEnable(PORT_GROUP group, uint32_t mask) + + Summary: + Configures the selected IO pins of a group as output. + + Description: + This function configures the selected IO pins of a group as output. The pins + to be configured as output are selected by setting the corresponding bits in + the mask parameter to 1. + + Remarks: + Refer plib_port.h file for more information. +*/ + +void PORT_GroupOutputEnable(PORT_GROUP group, uint32_t mask) +{ + ((port_group_registers_t*)group)->PORT_DIRSET = mask; +} + +// ***************************************************************************** +/* Function: + void PORT_PinPeripheralFunctionConfig(PORT_PIN pin, PERIPHERAL_FUNCTION function) + + Summary: + Configures the peripheral function on the selected port pin + + Description: + This function configures the selected peripheral function on the given port pin. + + Remarks: + Refer plib_port.h file for more information. +*/ +void PORT_PinPeripheralFunctionConfig(PORT_PIN pin, PERIPHERAL_FUNCTION function) +{ + uint32_t periph_func = (uint32_t) function; + PORT_GROUP group = GET_PORT_GROUP(pin); + uint32_t pin_num = ((uint32_t)pin) & 0x1FU; + uint32_t pinmux_val = (uint32_t)((port_group_registers_t*)group)->PORT_PMUX[(pin_num >> 1)]; + + /* For odd pins */ + if (0U != (pin_num & 0x01U)) + { + pinmux_val = (pinmux_val & ~0xF0U) | (periph_func << 4); + } + else + { + pinmux_val = (pinmux_val & ~0x0FU) | periph_func; + } + ((port_group_registers_t*)group)->PORT_PMUX[(pin_num >> 1)] = (uint8_t)pinmux_val; + + /* Enable peripheral control of the pin */ + ((port_group_registers_t*)group)->PORT_PINCFG[pin_num] |= (uint8_t)PORT_PINCFG_PMUXEN_Msk; +} + +// ***************************************************************************** +/* Function: + void PORT_PinGPIOConfig(PORT_PIN pin) + + Summary: + Configures the selected pin as GPIO + + Description: + This function configures the given pin as GPIO. + + Remarks: + Refer plib_port.h file for more information. +*/ +void PORT_PinGPIOConfig(PORT_PIN pin) +{ + PORT_GROUP group = GET_PORT_GROUP(pin); + uint32_t pin_num = ((uint32_t)pin) & 0x1FU; + + /* Disable peripheral control of the pin */ + ((port_group_registers_t*)group)->PORT_PINCFG[pin_num] &= ((uint8_t)(~PORT_PINCFG_PMUXEN_Msk)); +} \ No newline at end of file diff --git a/Telemetry/src/config/default/peripheral/port/plib_port.h b/Telemetry/src/config/default/peripheral/port/plib_port.h new file mode 100644 index 00000000..02e97ec6 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/port/plib_port.h @@ -0,0 +1,1060 @@ +/******************************************************************************* + PORT PLIB + + Company: + Microchip Technology Inc. + + File Name: + plib_port.h + + Summary: + PORT PLIB Header File + + Description: + This file provides an interface to control and interact with PORT-I/O + Pin controller module. + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef PLIB_PORT_H +#define PLIB_PORT_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "device.h" +#include +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + extern "C" { +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data types and constants +// ***************************************************************************** +// ***************************************************************************** + +/*** Macros for GPIO_PA07 pin ***/ +#define GPIO_PA07_Set() (PORT_REGS->GROUP[0].PORT_OUTSET = ((uint32_t)1U << 7U)) +#define GPIO_PA07_Clear() (PORT_REGS->GROUP[0].PORT_OUTCLR = ((uint32_t)1U << 7U)) +#define GPIO_PA07_Toggle() (PORT_REGS->GROUP[0].PORT_OUTTGL = ((uint32_t)1U << 7U)) +#define GPIO_PA07_OutputEnable() (PORT_REGS->GROUP[0].PORT_DIRSET = ((uint32_t)1U << 7U)) +#define GPIO_PA07_InputEnable() (PORT_REGS->GROUP[0].PORT_DIRCLR = ((uint32_t)1U << 7U)) +#define GPIO_PA07_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 7U)) & 0x01U) +#define GPIO_PA07_PIN PORT_PIN_PA07 + +/*** Macros for GPIO_PA08 pin ***/ +#define GPIO_PA08_Set() (PORT_REGS->GROUP[0].PORT_OUTSET = ((uint32_t)1U << 8U)) +#define GPIO_PA08_Clear() (PORT_REGS->GROUP[0].PORT_OUTCLR = ((uint32_t)1U << 8U)) +#define GPIO_PA08_Toggle() (PORT_REGS->GROUP[0].PORT_OUTTGL = ((uint32_t)1U << 8U)) +#define GPIO_PA08_OutputEnable() (PORT_REGS->GROUP[0].PORT_DIRSET = ((uint32_t)1U << 8U)) +#define GPIO_PA08_InputEnable() (PORT_REGS->GROUP[0].PORT_DIRCLR = ((uint32_t)1U << 8U)) +#define GPIO_PA08_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 8U)) & 0x01U) +#define GPIO_PA08_PIN PORT_PIN_PA08 + +/*** Macros for GPIO_PA09 pin ***/ +#define GPIO_PA09_Set() (PORT_REGS->GROUP[0].PORT_OUTSET = ((uint32_t)1U << 9U)) +#define GPIO_PA09_Clear() (PORT_REGS->GROUP[0].PORT_OUTCLR = ((uint32_t)1U << 9U)) +#define GPIO_PA09_Toggle() (PORT_REGS->GROUP[0].PORT_OUTTGL = ((uint32_t)1U << 9U)) +#define GPIO_PA09_OutputEnable() (PORT_REGS->GROUP[0].PORT_DIRSET = ((uint32_t)1U << 9U)) +#define GPIO_PA09_InputEnable() (PORT_REGS->GROUP[0].PORT_DIRCLR = ((uint32_t)1U << 9U)) +#define GPIO_PA09_Get() (((PORT_REGS->GROUP[0].PORT_IN >> 9U)) & 0x01U) +#define GPIO_PA09_PIN PORT_PIN_PA09 + +// ***************************************************************************** +/* PORT Group + + Summary: + Identifies the port groups available on the device. + + Description: + These macros identifies all the ports groups that are available on this + device. + + Remarks: + The caller should not use the constant expressions assigned to any of + the preprocessor macros as these may vary between devices. + + Port groups shown here are the ones available on the selected device. Not + all ports groups are implemented. Refer to the device specific datasheet + for more details. The MHC will generate these macros with the port + groups that are available on the device. +*/ + +/* Group 0 */ +#define PORT_GROUP_0 (PORT_BASE_ADDRESS + (0U * 0x80U)) + +/* Group 1 */ +#define PORT_GROUP_1 (PORT_BASE_ADDRESS + (1U * 0x80U)) + + +/* Helper macros to get port information from the pin */ +#define GET_PORT_GROUP(pin) ((PORT_GROUP)(PORT_BASE_ADDRESS + (0x80U * (((uint32_t)pin) >> 5U)))) +#define GET_PIN_MASK(pin) (((uint32_t)(0x1U)) << (((uint32_t)pin) & 0x1FU)) + +/* Named type for port group */ +typedef uint32_t PORT_GROUP; + + +typedef enum +{ +PERIPHERAL_FUNCTION_A = 0x0, +PERIPHERAL_FUNCTION_B = 0x1, +PERIPHERAL_FUNCTION_C = 0x2, +PERIPHERAL_FUNCTION_D = 0x3, +PERIPHERAL_FUNCTION_E = 0x4, +PERIPHERAL_FUNCTION_F = 0x5, +PERIPHERAL_FUNCTION_G = 0x6, +PERIPHERAL_FUNCTION_H = 0x7, +PERIPHERAL_FUNCTION_I = 0x8, + +}PERIPHERAL_FUNCTION; + +// ***************************************************************************** +/* PORT Pins + + Summary: + Identifies the available Ports pins. + + Description: + This enumeration identifies all the ports pins that are available on this + device. + + Remarks: + The caller should not use the constant expressions assigned to any of + the enumeration constants as these may vary between devices. + + Port pins shown here are the ones available on the selected device. Not + all ports pins within a port group are implemented. Refer to the device + specific datasheet for more details. +*/ + +typedef enum +{ + /* PA00 pin */ + PORT_PIN_PA00 = 0U, + + /* PA01 pin */ + PORT_PIN_PA01 = 1U, + + /* PA02 pin */ + PORT_PIN_PA02 = 2U, + + /* PA03 pin */ + PORT_PIN_PA03 = 3U, + + /* PA04 pin */ + PORT_PIN_PA04 = 4U, + + /* PA05 pin */ + PORT_PIN_PA05 = 5U, + + /* PA06 pin */ + PORT_PIN_PA06 = 6U, + + /* PA07 pin */ + PORT_PIN_PA07 = 7U, + + /* PA08 pin */ + PORT_PIN_PA08 = 8U, + + /* PA09 pin */ + PORT_PIN_PA09 = 9U, + + /* PA10 pin */ + PORT_PIN_PA10 = 10U, + + /* PA11 pin */ + PORT_PIN_PA11 = 11U, + + /* PA12 pin */ + PORT_PIN_PA12 = 12U, + + /* PA13 pin */ + PORT_PIN_PA13 = 13U, + + /* PA14 pin */ + PORT_PIN_PA14 = 14U, + + /* PA15 pin */ + PORT_PIN_PA15 = 15U, + + /* PA16 pin */ + PORT_PIN_PA16 = 16U, + + /* PA17 pin */ + PORT_PIN_PA17 = 17U, + + /* PA18 pin */ + PORT_PIN_PA18 = 18U, + + /* PA19 pin */ + PORT_PIN_PA19 = 19U, + + /* PA20 pin */ + PORT_PIN_PA20 = 20U, + + /* PA21 pin */ + PORT_PIN_PA21 = 21U, + + /* PA22 pin */ + PORT_PIN_PA22 = 22U, + + /* PA23 pin */ + PORT_PIN_PA23 = 23U, + + /* PA24 pin */ + PORT_PIN_PA24 = 24U, + + /* PA25 pin */ + PORT_PIN_PA25 = 25U, + + /* PA27 pin */ + PORT_PIN_PA27 = 27U, + + /* PA28 pin */ + PORT_PIN_PA28 = 28U, + + /* PA30 pin */ + PORT_PIN_PA30 = 30U, + + /* PA31 pin */ + PORT_PIN_PA31 = 31U, + + /* PB00 pin */ + PORT_PIN_PB00 = 32U, + + /* PB01 pin */ + PORT_PIN_PB01 = 33U, + + /* PB02 pin */ + PORT_PIN_PB02 = 34U, + + /* PB03 pin */ + PORT_PIN_PB03 = 35U, + + /* PB04 pin */ + PORT_PIN_PB04 = 36U, + + /* PB05 pin */ + PORT_PIN_PB05 = 37U, + + /* PB06 pin */ + PORT_PIN_PB06 = 38U, + + /* PB07 pin */ + PORT_PIN_PB07 = 39U, + + /* PB08 pin */ + PORT_PIN_PB08 = 40U, + + /* PB09 pin */ + PORT_PIN_PB09 = 41U, + + /* PB10 pin */ + PORT_PIN_PB10 = 42U, + + /* PB11 pin */ + PORT_PIN_PB11 = 43U, + + /* PB12 pin */ + PORT_PIN_PB12 = 44U, + + /* PB13 pin */ + PORT_PIN_PB13 = 45U, + + /* PB14 pin */ + PORT_PIN_PB14 = 46U, + + /* PB15 pin */ + PORT_PIN_PB15 = 47U, + + /* PB16 pin */ + PORT_PIN_PB16 = 48U, + + /* PB17 pin */ + PORT_PIN_PB17 = 49U, + + /* PB22 pin */ + PORT_PIN_PB22 = 54U, + + /* PB23 pin */ + PORT_PIN_PB23 = 55U, + + /* PB30 pin */ + PORT_PIN_PB30 = 62U, + + /* PB31 pin */ + PORT_PIN_PB31 = 63U, + + /* This element should not be used in any of the PORT APIs. + * It will be used by other modules or application to denote that none of + * the PORT Pin is used */ + PORT_PIN_NONE = 65535U, + +} PORT_PIN; + +// ***************************************************************************** +// ***************************************************************************** +// Section: Generated API based on pin configurations done in Pin Manager +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** +/* Function: + void PORT_Initialize(void) + + Summary: + Initializes the PORT Library. + + Description: + This function initializes all ports and pins as configured in the + MHC Pin Manager. + + Precondition: + None. + + Parameters: + None. + + Returns: + None. + + Example: + + + PORT_Initialize(); + + + + Remarks: + The function should be called once before calling any other PORTS PLIB + functions. +*/ + +void PORT_Initialize(void); + +// ***************************************************************************** +// ***************************************************************************** +// Section: PORT APIs which operates on multiple pins of a group +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + uint32_t PORT_GroupRead(PORT_GROUP group) + + Summary: + Read all the I/O pins in the specified port group. + + Description: + The function reads the hardware pin state of all pins in the specified group + and returns this as a 32 bit value. Each bit in the 32 bit value represent a + pin. For example, bit 0 in group 0 will represent pin PA0. Bit 1 will + represent PA1 and so on. The application should only consider the value of + the port group pins which are implemented on the device. + + Precondition: + The PORT_Initialize() function should have been called. Input buffer + (INEN bit in the Pin Configuration register) should be enabled in MHC. + + Parameters: + group - One of the IO groups from the enum PORT_GROUP. + + Returns: + A 32-bit value representing the hardware state of of all the I/O pins in the + selected port group. + + Example: + + + uint32_t value; + value = PORT_Read(PORT_GROUP_C); + + + + Remarks: + None. +*/ + +uint32_t PORT_GroupRead(PORT_GROUP group); + +// ***************************************************************************** +/* Function: + uint32_t PORT_GroupLatchRead(PORT_GROUP group) + + Summary: + Read the data driven on all the I/O pins of the selected port group. + + Description: + The function will return a 32-bit value representing the logic levels being + driven on the output pins within the group. The function will not sample the + actual hardware state of the output pin. Each bit in the 32-bit return value + will represent one of the 32 port pins within the group. The application + should only consider the value of the pins which are available on the + device. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One of the IO groups from the enum PORT_GROUP. + + Returns: + A 32-bit value representing the output state of of all the I/O pins in the + selected port group. + + Example: + + + uint32_t value; + value = PORT_GroupLatchRead(PORT_GROUP_C); + + + + Remarks: + None. +*/ + +uint32_t PORT_GroupLatchRead(PORT_GROUP group); + +// ***************************************************************************** +/* Function: + void PORT_GroupWrite(PORT_GROUP group, uint32_t mask, uint32_t value); + + Summary: + Write value on the masked pins of the selected port group. + + Description: + This function writes the value contained in the value parameter to the + port group. Port group pins which are configured for output will be updated. + The mask parameter provides additional control on the bits in the group to + be affected. Setting a bit to 1 in the mask will cause the corresponding + bit in the port group to be updated. Clearing a bit in the mask will cause + that corresponding bit in the group to stay unaffected. For example, + setting a mask value 0xFFFFFFFF will cause all bits in the port group + to be updated. Setting a value 0x3 will only cause port group bit 0 and + bit 1 to be updated. + + For port pins which are not configured for output and have the pull feature + enabled, this function will affect pull value (pull up or pull down). A bit + value of 1 will enable the pull up. A bit value of 0 will enable the pull + down. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One of the IO groups from the enum PORT_GROUP. + + mask - A 32 bit value in which positions of 0s and 1s decide + which IO pins of the selected port group will be written. + 1's - Will write to corresponding IO pins. + 0's - Will remain unchanged. + + value - Value which has to be written/driven on the I/O + lines of the selected port for which mask bits are '1'. + Values for the corresponding mask bit '0' will be ignored. + Refer to the function description for effect on pins + which are not configured for output. + + Returns: + None. + + Example: + + + PORT_GroupWrite(PORT_GROUP_C, 0x0F, 0xF563D453); + + + + Remarks: + None. +*/ + +void PORT_GroupWrite(PORT_GROUP group, uint32_t mask, uint32_t value); + +// ***************************************************************************** +/* Function: + void PORT_GroupSet(PORT_GROUP group, uint32_t mask) + + Summary: + Set the selected IO pins of a group. + + Description: + This function sets (drives a logic high) on the selected output pins of a + group. The mask parameter control the pins to be updated. A mask bit + position with a value 1 will cause that corresponding port pin to be set. A + mask bit position with a value 0 will cause the corresponding port pin to + stay un-affected. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One of the IO ports from the enum PORT_GROUP. + mask - A 32 bit value in which a bit represent a pin in the group. If the + value of the bit is 1, the corresponding port pin will driven to logic 1. If + the value of the bit is 0. the corresponding port pin will stay un-affected. + + Returns: + None. + + Example: + + + PORT_GroupSet(PORT_GROUP_C, 0x00A0); + + + + Remarks: + If the port pin within the the group is not configured for output and has + the pull feature enabled, driving a logic 1 on this pin will cause the pull + up to be enabled. +*/ + +void PORT_GroupSet(PORT_GROUP group, uint32_t mask); + +// ***************************************************************************** +/* Function: + void PORT_GroupClear(PORT_GROUP group, uint32_t mask) + + Summary: + Clears the selected IO pins of a group. + + Description: + This function clears (drives a logic 0) on the selected output pins of a + group. The mask parameter control the pins to be updated. A mask bit + position with a value 1 will cause that corresponding port pin to be clear. + A mask bit position with a value 0 will cause the corresponding port pin to + stay un-affected. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One of the IO ports from the enum PORT_GROUP. + mask - A 32 bit value in which a bit represent a pin in the group. If the + value of the bit is 1, the corresponding port pin will driven to logic 0. If + the value of the bit is 0. the corresponding port pin will stay un-affected. + + Returns: + None. + + Example: + + + PORT_GroupClear(PORT_GROUP_C, 0x00A0); + + + + Remarks: + If the port pin within the the group is not configured for output and has + the pull feature enabled, driving a logic 0 on this pin will cause the pull + down to be enabled. +*/ + +void PORT_GroupClear(PORT_GROUP group, uint32_t mask); + +// ***************************************************************************** +/* Function: + void PORT_GroupToggle(PORT_GROUP group, uint32_t mask) + + Summary: + Toggles the selected IO pins of a group. + + Description: + This function toggles the selected output pins of a group. The mask + parameter control the pins to be updated. A mask bit position with a value 1 + will cause that corresponding port pin to be toggled. A mask bit position + with a value 0 will cause the corresponding port pin to stay un-affected. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One of the IO ports from the enum PORT_GROUP. + mask - A 32 bit value in which a bit represent a pin in the group. If the + value of the bit is 1, the corresponding port pin will be toggled. If the + value of the bit is 0. the corresponding port pin will stay un-affected. + + Returns: + None. + + Example: + + + PORT_GroupToggle(PORT_GROUP_C, 0x00A0); + + + + Remarks: + If the port pin within the the group is not configured for output and has + the pull feature enabled, driving a logic 0 on this pin will cause the pull + down to be enabled. Driving a logic 1 on this pin will cause the pull up to + be enabled. +*/ + +void PORT_GroupToggle(PORT_GROUP group, uint32_t mask); + +// ***************************************************************************** +/* Function: + void PORT_GroupInputEnable(PORT_GROUP group, uint32_t mask) + + Summary: + Configures the selected IO pins of a group as input. + + Description: + This function configures the selected IO pins of a group as input. The pins + to be configured as input are selected by setting the corresponding bits in + the mask parameter to 1. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One or more of the of the IO ports from the enum PORT_GROUP. + mask - A 32 bit value in which a bit represents a pin in the group. If the + value of the bit is 1, the corresponding port pin will be configured as + input. If the value of the bit is 0. the corresponding port pin will stay + un-affected. + + Returns: + None. + + Example: + + + PORT_GroupInputEnable(PORT_GROUP_C, 0x00A0); + + + + Remarks: + None. +*/ + +void PORT_GroupInputEnable(PORT_GROUP group, uint32_t mask); + +// ***************************************************************************** +/* Function: + void PORT_GroupOutputEnable(PORT_GROUP group, uint32_t mask) + + Summary: + Configures the selected IO pins of a group as output. + + Description: + This function configures the selected IO pins of a group as output. The pins + to be configured as output are selected by setting the corresponding bits in + the mask parameter to 1. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + group - One or more of the of the IO ports from the enum PORT_GROUP. + mask - A 32 bit value in which a bit represents a pin in the group. If the + value of the bit is 1, the corresponding port pin will be configured as + output. If the value of the bit is 0. the corresponding port pin will stay + un-affected. + + Returns: + None. + + Example: + + + PORT_GroupOutputEnable(PORT_GROUP_C, 0x00A0); + + + + Remarks: + None. +*/ + +void PORT_GroupOutputEnable(PORT_GROUP group, uint32_t mask); + +// ***************************************************************************** +/* Function: + void PORT_PinPeripheralFunctionConfig(PORT_PIN pin, PERIPHERAL_FUNCTION function) + + Summary: + Configures the peripheral function on the selected port pin + + Description: + This function configures the selected peripheral function on the given port pin. + + Remarks: + None +*/ +void PORT_PinPeripheralFunctionConfig(PORT_PIN pin, PERIPHERAL_FUNCTION function); + +// ***************************************************************************** +/* Function: + void PORT_PinGPIOConfig(PORT_PIN pin) + + Summary: + Configures the selected pin as GPIO + + Description: + This function configures the given pin as GPIO. + + Remarks: + None +*/ +void PORT_PinGPIOConfig(PORT_PIN pin); + +// ***************************************************************************** +// ***************************************************************************** +// Section: PORT APIs which operates on one pin at a time +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + void PORT_PinWrite(PORT_PIN pin, bool value) + + Summary: + Writes the specified value to the selected pin. + + Description: + This function writes/drives the "value" on the selected I/O line/pin. + + Precondition: + The PORT_Initialize() function should have been called once. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + value - value to be written on the selected pin. + true = set pin to high (1). + false = clear pin to low (0). + + Returns: + None. + + Example: + + + bool value = true; + PORT_PinWrite(PORT_PIN_PB3, value); + + + + Remarks: + Calling this function with an input pin with the pull-up/pull-down feature + enabled will affect the pull-up/pull-down configuration. If the value is + false, the pull-down will be enabled. If the value is true, the pull-up will + be enabled. +*/ + +static inline void PORT_PinWrite(PORT_PIN pin, bool value) +{ + PORT_GroupWrite(GET_PORT_GROUP(pin), + GET_PIN_MASK(pin), + (value ? GET_PIN_MASK(pin) : 0U)); +} + + +// ***************************************************************************** +/* Function: + bool PORT_PinRead(PORT_PIN pin) + + Summary: + Read the selected pin value. + + Description: + This function reads the present state at the selected input pin. The + function can also be called to read the value of an output pin if input + sampling on the output pin is enabled in MHC. If input synchronization on + the pin is disabled in MHC, the function will cause a 2 PORT Clock cycles + delay. Enabling the synchronization eliminates the delay but will increase + power consumption. + + Precondition: + The PORT_Initialize() function should have been called. Input buffer + (INEN bit in the Pin Configuration register) should be enabled in MHC. + + Parameters: + pin - the port pin whose state needs to be read. + + Returns: + true - the state at the pin is a logic high. + false - the state at the pin is a logic low. + + Example: + + + bool value; + value = PORT_PinRead(PORT_PIN_PB3); + + + + Remarks: + None. +*/ + +static inline bool PORT_PinRead(PORT_PIN pin) +{ + return ((PORT_GroupRead(GET_PORT_GROUP(pin)) & GET_PIN_MASK(pin)) != 0U); +} + + +// ***************************************************************************** +/* Function: + bool PORT_PinLatchRead(PORT_PIN pin) + + Summary: + Read the value driven on the selected pin. + + Description: + This function reads the data driven on the selected I/O line/pin. The + function does not sample the state of the hardware pin. It only returns the + value that is written to output register. Refer to the PORT_PinRead() + function if the state of the output pin needs to be read. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + + Returns: + true - the present value in the output latch is a logic high. + false - the present value in the output latch is a logic low. + + Example: + + + bool value; + value = PORT_PinLatchRead(PORT_PIN_PB3); + + + + Remarks: + To read actual pin value, PIN_Read API should be used. +*/ + +static inline bool PORT_PinLatchRead(PORT_PIN pin) +{ + return ((PORT_GroupLatchRead(GET_PORT_GROUP(pin)) & GET_PIN_MASK(pin)) != 0U); +} + + +// ***************************************************************************** +/* Function: + void PORT_PinToggle(PORT_PIN pin) + + Summary: + Toggles the selected pin. + + Description: + This function toggles/inverts the present value on the selected I/O line/pin. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + + Returns: + None. + + Example: + + + PORT_PinToggle(PORT_PIN_PB3); + + + + Remarks: + None. +*/ + +static inline void PORT_PinToggle(PORT_PIN pin) +{ + PORT_GroupToggle(GET_PORT_GROUP(pin), GET_PIN_MASK(pin)); +} + + +// ***************************************************************************** +/* Function: + void PORT_PinSet(PORT_PIN pin) + + Summary: + Sets the selected pin. + + Description: + This function drives a logic 1 on the selected I/O line/pin. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + + Returns: + None. + + Example: + + + PORT_PinSet(PORT_PIN_PB3); + + + + Remarks: + None. +*/ + +static inline void PORT_PinSet(PORT_PIN pin) +{ + PORT_GroupSet(GET_PORT_GROUP(pin), GET_PIN_MASK(pin)); +} + + +// ***************************************************************************** +/* Function: + void PORT_PinClear(PORT_PIN pin) + + Summary: + Clears the selected pin. + + Description: + This function drives a logic 0 on the selected I/O line/pin. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + + Returns: + None. + + Example: + + + PORT_PinClear(PORT_PIN_PB3); + + + + Remarks: + None. +*/ + +static inline void PORT_PinClear(PORT_PIN pin) +{ + PORT_GroupClear(GET_PORT_GROUP(pin), GET_PIN_MASK(pin)); +} + + +// ***************************************************************************** +/* Function: + void PORT_PinInputEnable(PORT_PIN pin) + + Summary: + Configures the selected IO pin as input. + + Description: + This function configures the selected IO pin as input. This function + override the MHC input output pin settings. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + + Returns: + None. + + Example: + + + PORT_PinInputEnable(PORT_PIN_PB3); + + + + Remarks: + None. +*/ + +static inline void PORT_PinInputEnable(PORT_PIN pin) +{ + PORT_GroupInputEnable(GET_PORT_GROUP(pin), GET_PIN_MASK(pin)); +} + + +// ***************************************************************************** +/* Function: + void PORT_PinOutputEnable(PORT_PIN pin) + + Summary: + Enables selected IO pin as output. + + Description: + This function enables selected IO pin as output. Calling this function will + override the MHC input output pin configuration. + + Precondition: + The PORT_Initialize() function should have been called. + + Parameters: + pin - One of the IO pins from the enum PORT_PIN. + + Returns: + None. + + Example: + + + PORT_PinOutputEnable(PORT_PIN_PB3); + + + + Remarks: + None. +*/ + +static inline void PORT_PinOutputEnable(PORT_PIN pin) +{ + PORT_GroupOutputEnable(GET_PORT_GROUP(pin), GET_PIN_MASK(pin)); +} + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +} + +#endif +// DOM-IGNORE-END +#endif // PLIB_PORT_H diff --git a/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.c b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.c new file mode 100644 index 00000000..c255a8ae --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.c @@ -0,0 +1,622 @@ +/******************************************************************************* + SERIAL COMMUNICATION SERIAL PERIPHERAL INTERFACE(SERCOM0_SPI) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom0_spi_master.c + + Summary + SERCOM0_SPI Master PLIB Implementation File. + + Description + This file defines the interface to the SERCOM SPI peripheral library. + This library provides access to and control of the associated + peripheral instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#include "interrupts.h" +#include "plib_sercom0_spi_master.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: MACROS Definitions +// ***************************************************************************** +// ***************************************************************************** + + +/* SERCOM0 clk freq value for the baud calculation */ +#define SERCOM0_Frequency (48000000UL) + +/* SERCOM0 SPI baud value for 2400000 Hz baud rate */ +#define SERCOM0_SPIM_BAUD_VALUE (9UL) + +/*Global object to save SPI Exchange related data */ +static volatile SPI_OBJECT sercom0SPIObj; + +// ***************************************************************************** +// ***************************************************************************** +// Section: SERCOM0_SPI Implementation +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + void SERCOM0_SPI_Initialize(void); + + Summary: + Initializes instance SERCOM0 of the SERCOM module operating in SPI mode. + + Description: + This function initializes instance SERCOM0 of SERCOM module operating in SPI mode. + This function should be called before any other library function. The SERCOM + module will be configured as per the MHC settings. + + Remarks: + Refer plib_sercom0_spi.h file for more information. +*/ + +void SERCOM0_SPI_Initialize(void) +{ + /* Instantiate the SERCOM0 SPI object */ + sercom0SPIObj.callback = NULL ; + sercom0SPIObj.transferIsBusy = false ; + sercom0SPIObj.txSize = 0U; + sercom0SPIObj.rxSize = 0U; + + /* Selection of the Character Size and Receiver Enable */ + SERCOM0_REGS->SPIM.SERCOM_CTRLB = SERCOM_SPIM_CTRLB_CHSIZE_8_BIT | SERCOM_SPIM_CTRLB_RXEN_Msk ; + + /* Wait for synchronization */ + while((SERCOM0_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Selection of the Baud Value */ + SERCOM0_REGS->SPIM.SERCOM_BAUD = (uint8_t)SERCOM_SPIM_BAUD_BAUD(SERCOM0_SPIM_BAUD_VALUE); + + /* Configure Data Out Pin Out , Master Mode, + * Data In and Pin Out,Data Order and Standby mode if configured + * and Selection of the Clock Phase and Polarity and Enable the SPI Module + */ + SERCOM0_REGS->SPIM.SERCOM_CTRLA = SERCOM_SPIM_CTRLA_MODE_SPI_MASTER | SERCOM_SPIM_CTRLA_DOPO_PAD1 | SERCOM_SPIM_CTRLA_DIPO_PAD0 | SERCOM_SPIM_CTRLA_CPOL_IDLE_LOW | SERCOM_SPIM_CTRLA_CPHA_LEADING_EDGE | SERCOM_SPIM_CTRLA_DORD_MSB | SERCOM_SPIM_CTRLA_ENABLE_Msk ; + + + /* Wait for synchronization */ + while((SERCOM0_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, + uint32_t spiSourceClock); + + Summary: + Configure SERCOM SPI operational parameters at run time. + + Description: + This function allows the application to change the SERCOM SPI operational + parameter at run time. The application can thus override the MHC defined + configuration for these parameters. The parameter are specified via the + SPI_TRANSFER_SETUP type setup parameter. Each member of this parameter + should be initialized to the desired value. + + The application may feel need to call this function in situation where + multiple SPI slaves, each with different operation parameters, are connected + to one SPI master. This function can thus be used to setup the SPI Master to + meet the communication needs of the slave. + + Calling this function will affect any ongoing communication. The application + must thus ensure that there is no on-going communication on the SPI before + calling this function. + + Remarks: + Refer plib_sercom0_spi.h file for more information. +*/ + +bool SERCOM0_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, uint32_t spiSourceClock) +{ + uint32_t baudValue = 0U; + + bool statusValue = false; + + if(spiSourceClock == 0U) + { + /* Fetch Master Clock Frequency directly */ + spiSourceClock = SERCOM0_Frequency; + } + + /* Disable the SPI Module */ + SERCOM0_REGS->SPIM.SERCOM_CTRLA &= ~(SERCOM_SPIM_CTRLA_ENABLE_Msk); + + /* Disabling SPI module, also clears the TXC (Transmit Complete) bit to 0. TXC = 0 means transfer is not complete (busy). + As a result, calling SERCOM0_SPI_IsBusy() after a call to SERCOM0_SPI_TransferSetup() always returns busy. + Since, application must call the SERCOM0_SPI_TransferSetup() API only after ensuring that no transfer is in progress, + it is safe to clear the rxSize and txSize to 0, so as to let the SERCOM0_SPI_IsBusy() return false (not busy). + */ + sercom0SPIObj.rxSize = 0; + sercom0SPIObj.txSize = 0; + + /* Wait for synchronization */ + while((SERCOM0_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + if(setup != NULL) + { + if (setup->clockFrequency <= spiSourceClock/2U) + { + baudValue = (spiSourceClock/(2U*(setup->clockFrequency))) - 1U; + + /* Set the lowest possible baud */ + if (baudValue >= 255U) + { + baudValue = 255U; + } + + /* Selection of the Clock Polarity and Clock Phase */ + SERCOM0_REGS->SPIM.SERCOM_CTRLA &= ~(SERCOM_SPIM_CTRLA_CPOL_Msk | SERCOM_SPIM_CTRLA_CPHA_Msk); + SERCOM0_REGS->SPIM.SERCOM_CTRLA |= (uint32_t)setup->clockPolarity | (uint32_t)setup->clockPhase; + + /* Selection of the Baud Value */ + SERCOM0_REGS->SPIM.SERCOM_BAUD = (uint8_t)baudValue; + + /* Selection of the Character Size */ + SERCOM0_REGS->SPIM.SERCOM_CTRLB &= ~SERCOM_SPIM_CTRLB_CHSIZE_Msk; + SERCOM0_REGS->SPIM.SERCOM_CTRLB |= (uint32_t)setup->dataBits; + + /* Wait for synchronization */ + while((SERCOM0_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + statusValue = true; + } + } + + /* Enabling the SPI Module */ + SERCOM0_REGS->SPIM.SERCOM_CTRLA |= SERCOM_SPIM_CTRLA_ENABLE_Msk; + + /* Wait for synchronization */ + while((SERCOM0_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + return statusValue; +} + + +// ***************************************************************************** +/* Function: + void SERCOM0_SPI_CallbackRegister(const SERCOM_SPI_CALLBACK* callBack, + uintptr_t context); + + Summary: + Allows application to register callback with PLIB. + + Description: + This function allows application to register an event handling function + for the PLIB to call back when requested data exchange operation has + completed or any error has occurred. + The callback should be registered before the client performs exchange + operation. + At any point if application wants to stop the callback, it can use this + function with "callBack" value as NULL. + + Remarks: + Refer plib_sercom0_spi.h file for more information. +*/ + +void SERCOM0_SPI_CallbackRegister(SERCOM_SPI_CALLBACK callBack, uintptr_t context ) +{ + sercom0SPIObj.callback = callBack; + + sercom0SPIObj.context = context; +} + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_IsBusy(void); + + Summary: + Returns transfer status of SERCOM SERCOM0SPI. + + Description: + This function ture if the SERCOM SERCOM0SPI module is busy with a transfer. The + application can use the function to check if SERCOM SERCOM0SPI module is busy + before calling any of the data transfer functions. The library does not + allow a data transfer operation if another transfer operation is already in + progress. + + This function can be used as an alternative to the callback function when + the library is operating interrupt mode. The allow the application to + implement a synchronous interface to the library. + + Remarks: + Refer plib_sercom0_spi.h file for more information. +*/ + +bool SERCOM0_SPI_IsBusy(void) +{ + bool isBusy = false; + size_t txSize = sercom0SPIObj.txSize; + bool transferIsBusy = sercom0SPIObj.transferIsBusy; + + if ((sercom0SPIObj.rxSize == 0U) && (txSize == 0U)) + { + /* This means no transfer has been requested yet; hence SPI is not busy. */ + isBusy = false; + } + else + { + /* if transmit is not complete or if the state flag is not set, SPI is busy */ + isBusy = (((SERCOM0_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_TXC_Msk) == 0U) || transferIsBusy); + } + return isBusy; +} + +bool SERCOM0_SPI_IsTransmitterBusy(void) +{ + return ((SERCOM0_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_TXC_Msk) == 0U)? true : false; +} + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_WriteRead (void* pTransmitData, size_t txSize + void* pReceiveData, size_t rxSize); + + Summary: + Write and Read data on SERCOM SERCOM0 SPI peripheral. + + Description: + This function transmits "txSize" number of bytes and receives "rxSize" + number of bytes on SERCOM SERCOM0 SPI module. Data pointed by pTransmitData is + transmitted and received data is saved in the location pointed by + pReceiveData. The function will transfer the maximum of "txSize" or "rxSize" + data units towards completion. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + transferring all the data. This indicates that the operation has been + completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + transmit and receive buffer are ownerd by the library until the data + transfer is complete and should not be modified by the application till the + transfer is complete. Only one transfer is allowed at any time. The + Application can use a callback function or a polling function to check for + completion of the transfer. If a callback is required, this should be + registered prior to calling the SERCOM0_SPI_WriteRead() function. The + application can use the SERCOM0_SPI_IsBusy() to poll for completion. + + Remarks: + Refer plib_sercom0_spi.h file for more information. +*/ + +bool SERCOM0_SPI_WriteRead (void* pTransmitData, size_t txSize, void* pReceiveData, size_t rxSize) +{ + bool isRequestAccepted = false; + uint32_t dummyData = 0U; + size_t txSz; + + if (sercom0SPIObj.transferIsBusy == false) + { + /* Verify the request */ + if(((txSize > 0U) && (pTransmitData != NULL)) || ((rxSize > 0U) && (pReceiveData != NULL))) + { + if((SERCOM0_REGS->SPIM.SERCOM_CTRLB & SERCOM_SPIM_CTRLB_CHSIZE_Msk) == (uint32_t)SPI_DATA_BITS_9) + { + /* For 9-bit transmission, the txSize and rxSize must be an even number. */ + if(((txSize > 0U) && ((txSize & 0x01U) != 0U)) || ((rxSize > 0U) && ((rxSize & 0x01U) != 0U))) + { + return isRequestAccepted; + } + } + + isRequestAccepted = true; + sercom0SPIObj.txBuffer = pTransmitData; + sercom0SPIObj.rxBuffer = pReceiveData; + sercom0SPIObj.rxCount = 0U; + sercom0SPIObj.txCount = 0U; + sercom0SPIObj.dummySize = 0U; + + if(pTransmitData != NULL) + { + sercom0SPIObj.txSize = txSize; + } + else + { + sercom0SPIObj.txSize = 0U; + } + + if(pReceiveData != NULL) + { + sercom0SPIObj.rxSize = rxSize; + } + else + { + sercom0SPIObj.rxSize = 0U; + } + + sercom0SPIObj.transferIsBusy = true; + + /* Flush out any unread data in SPI read buffer */ + while((SERCOM0_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_RXC_Msk) == SERCOM_SPIM_INTFLAG_RXC_Msk) + { + dummyData = SERCOM0_REGS->SPIM.SERCOM_DATA; + (void)dummyData; + } + + SERCOM0_REGS->SPIM.SERCOM_STATUS |= SERCOM_SPIM_STATUS_BUFOVF_Msk; + + SERCOM0_REGS->SPIM.SERCOM_INTFLAG |= (uint8_t)SERCOM_SPIM_INTFLAG_ERROR_Msk; + + txSz = sercom0SPIObj.txSize; + + if(sercom0SPIObj.rxSize > txSz) + { + sercom0SPIObj.dummySize = sercom0SPIObj.rxSize - txSz; + } + + /* Start the first write here itself, rest will happen in ISR context */ + if((SERCOM0_REGS->SPIM.SERCOM_CTRLB & SERCOM_SPIM_CTRLB_CHSIZE_Msk) == (uint32_t)SPI_DATA_BITS_8) + { + if(sercom0SPIObj.txCount < txSz) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = *((uint8_t*)sercom0SPIObj.txBuffer); + + sercom0SPIObj.txCount++; + } + else if(sercom0SPIObj.dummySize > 0U) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = 0xFFU; + + sercom0SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + else + { + sercom0SPIObj.txSize >>= 1U; + sercom0SPIObj.dummySize >>= 1U; + sercom0SPIObj.rxSize >>= 1U; + + txSz = sercom0SPIObj.txSize; + + if(sercom0SPIObj.txCount < txSz) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = *((uint16_t*)sercom0SPIObj.txBuffer) & SERCOM_SPIM_DATA_Msk; + + sercom0SPIObj.txCount++; + } + else if(sercom0SPIObj.dummySize > 0U) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = 0xFFFFU & SERCOM_SPIM_DATA_Msk; + + sercom0SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + + if(rxSize > 0U) + { + /* Enable ReceiveComplete */ + SERCOM0_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_RXC_Msk; + } + else + { + /* Enable the DataRegisterEmpty */ + SERCOM0_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_DRE_Msk; + } + } + } + + return isRequestAccepted; +} + +bool SERCOM0_SPI_Write(void* pTransmitData, size_t txSize) +{ + return SERCOM0_SPI_WriteRead(pTransmitData, txSize, NULL, 0U); +} + +bool SERCOM0_SPI_Read(void* pReceiveData, size_t rxSize) +{ + return SERCOM0_SPI_WriteRead(NULL, 0U, pReceiveData, rxSize); +} + +// ***************************************************************************** +/* Function: + void SERCOM0_SPI_InterruptHandler(void); + + Summary: + Handler that handles the SPI interrupts + + Description: + This Function is called from the handler to handle the exchange based on the + Interrupts. + + Remarks: + Refer plib_sercom0_spi.h file for more information. +*/ + +void __attribute__((used)) SERCOM0_SPI_InterruptHandler(void) +{ + uint32_t dataBits = 0U; + uint32_t receivedData = 0U; + static bool isLastByteTransferInProgress = false; + uintptr_t context = sercom0SPIObj.context; + + if(SERCOM0_REGS->SPIM.SERCOM_INTENSET != 0U) + { + dataBits = SERCOM0_REGS->SPIM.SERCOM_CTRLB & SERCOM_SPIM_CTRLB_CHSIZE_Msk; + + size_t rxCount = sercom0SPIObj.rxCount; + size_t txCount = sercom0SPIObj.txCount; + size_t txSize = sercom0SPIObj.txSize; + + if((SERCOM0_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_RXC_Msk) == SERCOM_SPIM_INTFLAG_RXC_Msk) + { + receivedData = SERCOM0_REGS->SPIM.SERCOM_DATA; + + if(rxCount < sercom0SPIObj.rxSize) + { + if(dataBits == (uint32_t)SPI_DATA_BITS_8) + { + ((uint8_t*)sercom0SPIObj.rxBuffer)[rxCount] = (uint8_t)receivedData; + rxCount++; + } + else + { + ((uint16_t*)sercom0SPIObj.rxBuffer)[rxCount] = (uint16_t)receivedData; + rxCount++; + } + } + } + + /* If there are more words to be transmitted, then transmit them here and keep track of the count */ + if((SERCOM0_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_DRE_Msk) == SERCOM_SPIM_INTFLAG_DRE_Msk) + { + /* Disable the DRE interrupt. This will be enabled back if more than + * one byte is pending to be transmitted */ + SERCOM0_REGS->SPIM.SERCOM_INTENCLR = (uint8_t)SERCOM_SPIM_INTENCLR_DRE_Msk; + + if(dataBits == (uint32_t)SPI_DATA_BITS_8) + { + if(txCount < sercom0SPIObj.txSize) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = ((uint8_t*)sercom0SPIObj.txBuffer)[txCount]; + txCount++; + } + else if(sercom0SPIObj.dummySize > 0U) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = 0xFFU; + + sercom0SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + else + { + if(txCount < sercom0SPIObj.txSize) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = ((uint16_t*)sercom0SPIObj.txBuffer)[txCount]; + txCount++; + } + else if(sercom0SPIObj.dummySize > 0U) + { + SERCOM0_REGS->SPIM.SERCOM_DATA = 0xFFFFU; + + sercom0SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + + if((sercom0SPIObj.dummySize == 0U) && (txCount == txSize)) + { + /* At higher baud rates, the data in the shift register can be + * shifted out and TXC flag can get set resulting in a + * callback been given to the application with the SPI interrupt + * pending with the application. This will then result in the + * interrupt handler being called again with nothing to transmit. + * To avoid this, a software flag is set, but + * the TXC interrupt is not enabled until the very end. + */ + + isLastByteTransferInProgress = true; + } + else if(rxCount == sercom0SPIObj.rxSize) + { + SERCOM0_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_DRE_Msk; + + SERCOM0_REGS->SPIM.SERCOM_INTENCLR = (uint8_t)SERCOM_SPIM_INTENCLR_RXC_Msk; + } + else + { + /* Do nothing */ + } + } + + sercom0SPIObj.rxCount = rxCount; + sercom0SPIObj.txCount = txCount; + + if(((SERCOM0_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_TXC_Msk) == SERCOM_SPIM_INTFLAG_TXC_Msk) && (isLastByteTransferInProgress == true)) + { + if(rxCount == sercom0SPIObj.rxSize) + { + sercom0SPIObj.transferIsBusy = false; + + /* Disable the Data Register empty and Receive Complete Interrupt flags */ + SERCOM0_REGS->SPIM.SERCOM_INTENCLR = (uint8_t)(SERCOM_SPIM_INTENCLR_DRE_Msk | SERCOM_SPIM_INTENCLR_RXC_Msk | SERCOM_SPIM_INTENSET_TXC_Msk); + + isLastByteTransferInProgress = false; + + if(sercom0SPIObj.callback != NULL) + { + sercom0SPIObj.callback(context); + } + } + } + + if(isLastByteTransferInProgress == true) + { + /* For the last byte transfer, the DRE interrupt is already disabled. + * Enable TXC interrupt to ensure no data is present in the shift + * register before application callback is called. + */ + SERCOM0_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_TXC_Msk; + } + } +} diff --git a/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.h b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.h new file mode 100644 index 00000000..16b50165 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom0_spi_master.h @@ -0,0 +1,624 @@ +/******************************************************************************* + SERIAL COMMUNICATION SERIAL PERIPHERAL INTERFACE (SERCOM0_SPI ) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom0_spi_master.h + + Summary + SERCOM0_SPI Master PLIB Header File. + + Description + This file defines the interface to the SERCOM SPI peripheral library. + This library provides access to and control of the associated + peripheral instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_SERCOM0_SPI_MASTER_H // Guards against multiple inclusion +#define PLIB_SERCOM0_SPI_MASTER_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "plib_sercom_spi_master_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif + +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +/* The following functions make up the methods (set of possible operations) of +this interface. +*/ + +// ***************************************************************************** +/* Function: + void SERCOM0_SPI_Initialize (void); + + Summary: + Initializes instance SERCOM0 operating in SPI mode. + + Description: + This function initializes instance SERCOM0 operating in SPI mode. + This function should be called before any other library function. The SERCOM + module will be configured as per the MHC settings. + + Precondition: + MCC GUI should be configured with the right values. The Generic Clock + configuration and the SERCOM Peripheral Clock channel should have been + configured in the clock manager GUI.The function will itself enable the + required peripheral clock channel and main clock. + + Parameters: + None. + + Returns: + None. + + Example: + + SERCOM0_SPI_Initialize(); + + + Remarks: + This function must be called once before any other SPI function is called. +*/ + +void SERCOM0_SPI_Initialize (void); + + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, + uint32_t spiSourceClock); + + Summary: + Configure SERCOM SPI operational parameters at run time. + + Description: + This function allows the application to change the SERCOM SPI operational + parameter at run time. The application can thus override the MHC defined + configuration for these parameters. The parameter are specified via the + SPI_TRANSFER_SETUP type setup parameter. Each member of this parameter + should be initialized to the desired value. + + The application may feel need to call this function in situation where + multiple SPI slaves, each with different operation paramertes, are connected + to one SPI master. This function can thus be used to setup the SPI Master to + meet the communication needs of the slave. + + Calling this function will affect any ongoing communication. The application + must thus ensure that there is no on-going communication on the SPI before + calling this function. + + Precondition: + SERCOM SERCOM0 SPI must first be initialized using SERCOM0_SPI_Initialize(). + + Parameters : + setup - pointer to the data structure of type SPI_TRANSFER_SETUP containing + the operation parameters. Each operation parameter must be specified even if + the parameter does not need to change. + + spiSourceClock - Current value of GCLK frequency feeding the SERCOM0 core. + + Returns: + true - setup was successful. + + false - if spiSourceClock and spi clock frequencies are such that resultant + baud value is out of the possible range. + + Example: Assuming 20 MHz as peripheral Master clock frequency + + SPI_TRANSFER_SETUP setup; + setup.clockFrequency = 1000000; + setup.clockPhase = SPI_CLOCK_PHASE_TRAILING_EDGE; + setup.clockPolarity = SPI_CLOCK_POLARITY_IDLE_LOW; + setup.dataBits = SPI_DATA_BITS_8; + + if (SERCOM0_SPI_TransferSetup (&setup, 20000000) == false) + { + this means setup could not be done, debug the reason. + } + + + + Remarks: + The application would need to call this function only if the operational + parameter need to be different than the ones configured in MHC. +*/ + +bool SERCOM0_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, uint32_t spiSourceClock); + + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_WriteRead (void* pTransmitData, size_t txSize + void* pReceiveData, size_t rxSize); + + Summary: + Write and Read data on SERCOM SERCOM0 SPI peripheral. + + Description: + This function transmits "txSize" number of bytes and receives "rxSize" + number of bytes on SERCOM SERCOM0 SPI module. Data pointed by pTransmitData is + transmitted and received data is saved in the location pointed by + pReceiveData. The function will transfer the maximum of "txSize" or "rxSize" + data units towards completion. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + transferring all the data. This indicates that the operation has been + completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + transmit and receive buffer are ownerd by the library until the data + transfer is complete and should not be modified by the application till the + transfer is complete. Only one transfer is allowed at any time. The + Application can use a callback function or a polling function to check for + completion of the transfer. If a callback is required, this should be + registered prior to calling the SERCOM0_SPI_WriteRead() function. The + application can use the SERCOM0_SPI_IsBusy() to poll for completion. + + Precondition: + The SERCOM0_SPI_Initialize function must have been called. If the + peripheral instance has been configured for Interrupt mode and transfer + completion status needs to be communicated back to application via callback, + a callback should have been registered using SERCOM0_SPI_CallbackRegister() + function. + + Parameters: + pTransmitData - Pointer to the data which has to be transmitted. In a case + where only data reception is required, this pointer can be set to NULL. If + the module is configured for 9 bit data length, the data should be right + aligned in a 16 bit memory location. The size of this buffer should be + txSize. + + txSize - Number of bytes to be transmitted. For 9 but data length, a count + of 1 counts 2 bytes. This value can be different from rxSize. + + pReceiveData - Pointer to the location where the received data has to be + stored. It is user's responsibility to ensure that this location has + sufficient memory to store rxSize amount of data. In a case where only data + transmission is required, this pointer can be set to NULL. If the module is + configured for 9 bit data length, received data will be right aligned and + will be stored in a 16 bit memory location. + + rxSize - Number of bytes to be received. This value can be different from + txSize. For 9 bit data length, a size count of 1 indicates 2 bytes required + to store 9 bits of data. + + Returns: + true - If configured for Non-interrupt mode, the function has recevied and + transmitted the requested number of bytes. If configured for Interrupt mode, + the request was accepted successfully and will be processed in the + interrupt. + + false - If both pTransmitData and pReceiveData are NULL, or if both txSize + and rxSize are 0 or if txSize is non-zero but the pTransmitData is set to + NULL or rxSize is non-zero but pReceiveData is NULL. In Interrupt mode, the + function returns false if there is an on-going data transfer at the time of + calling the function. + + Example: + + + The following code snippet shows an example using the + SERCOM0_SPI_WriteRead() function in interrupt mode operation using the + callback function. + + uint8_t txBuffer[4]; + uint8_t rxBuffer[10]; + size_t txSize = 4; + size_t rxSize = 10; + + void APP_SPITransferHandler(uintptr_t context) + { + Transfer was completed without error, do something else now. + } + + SERCOM0_SPI_Initialize(); + SERCOM0_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL); + if(SERCOM0_SPI_WriteRead(&txBuffer, txSize, &rxBuffer, rxSize)) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + The following code snippet shows non-interrupt or blocking mode + operation. + + uint8_t txBuffer[4]; + uint8_t rxBuffer[10]; + size_t txSize = 4; + size_t rxSize = 10; + + SERCOM0_SPI_Initialize(); + + This function call will block. + SERCOM0_SPI_WriteRead(&txBuffer, txSize, &rxBuffer, rxSize); + + + + Remarks: + None. +*/ + +bool SERCOM0_SPI_WriteRead (void* pTransmitData, size_t txSize, void* pReceiveData, size_t rxSize); + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_Write(void* pTransmitData, size_t txSize); + + Summary: + Writes data to SERCOM SERCOM0 SPI peripheral. + + Description: + This function writes "txSize" number of bytes on SERCOM SERCOM0 SPI module. Data + pointed by pTransmitData is transmitted. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + transferring all the data. This indicates that the operation has been + completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + transmit buffer is ownerd by the library until the data transfer is + complete and should not be modified by the application till the transfer is + complete. Only one transfer is allowed at any time. The application can use + a callback function or a polling function to check for completion of the + transfer. If a callback is required, this should be registered prior to + calling the SERCOM0_SPI_WriteRead() function. The application can use the + SERCOM0_SPI_IsBusy() to poll for completion. + + Precondition: + The SERCOM0_SPI_Initialize function must have been called. + + Callback has to be registered using SERCOM0_SPI_CallbackRegister API if the + peripheral instance has been configured in Interrupt mode and + transfer completion status needs to be communicated back to application via + callback. + + Parameters: + pTransmitData - Pointer to the buffer containing the data which has to be + transmitted. For 9 bit mode, data should be right aligned in the 16 bit + memory location. In "Interrupt Mode", this buffer should not be modified + after calling the function and before the callback function has been called + or the SERCOM0_SPI_IsBusy() function returns false. + + txSize - Number of bytes to be transmitted. For 9 bit mode, 2 bytes make up + a count of 1. + + Returns: + true - If configured for Non-interrupt mode, the function has transmitted + the requested number of bytes. If configured for Interrupt mode, the request + was accepted successfully and will be processed in the interrupt. + + false - If pTransmitData is NULL. In Interrupt mode, the function will + additionally return false if there is an on-going data transfer at the time + of calling the function. + + Example: + + uint8_t txBuffer[4]; + size_t txSize = 4; + + void APP_SPITransferHandler(uintptr_t context) + { + Transfer was completed without error, do something else now. + } + + SERCOM0_SPI_Initialize(); + SERCOM0_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL); + if(SERCOM0_SPI_Write(&txBuffer, txSize)) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + + + + Remarks: + None. + +*/ + +bool SERCOM0_SPI_Write(void* pTransmitData, size_t txSize); + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_Read(void* pReceiveData, size_t rxSize); + + Summary: + Reads data on the SERCOM SERCOM0 SPI peripheral. + + Description: + This function reads "rxSize" number of bytes on SERCOM SERCOM0 SPI module. The + received data is stored in the buffer pointed by pReceiveData. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + receiving "rxSize" number of bytes. This indicates that the operation has + been completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + receive buffer is ownerd by the library until the data transfer is + complete and should not be modified by the application till the transfer is + complete. Only one transfer is allowed at any time. The application can use + a callback function or a polling function to check for completion of the + transfer. If a callback is required, this should be registered prior to + calling the SERCOM0_SPI_WriteRead() function. The application can use the + SERCOM0_SPI_IsBusy() to poll for completion. + + Precondition: + The SERCOM0_SPI_Initialize function must have been called. + + Callback has to be registered using SERCOM0_SPI_CallbackRegister API if the + peripheral instance has been configured in Interrupt mode and + transfer completion status needs to be communicated back to application via + callback. + + Parameters: + pReceiveData - Pointer to the buffer where the received data will be stored. + For 9 bit mode, data should be right aligned in the 16 bit memory location. + In "Interrupt Mode", this buffer should not be modified after calling the + function and before the callback function has been called or the + SERCOM0_SPI_IsBusy() function returns false. + + rxSize - Number of bytes to be received. For 9 bit mode, 2 bytes make up a + count of 1. + + Returns: + true - If configured for Non-interrupt mode, the function has received the + requested number of bytes. If configured for Interrupt mode, the request was + accepted successfully and will be processed in the interrupt. + + false - If pReceiveData is NULL. In Interrupt mode, the function will + additionally return false if there is an on-going data transfer at the time + of calling the function. + + Example: + + uint8_t rxBuffer[10]; + size_t rxSize = 10; + + void APP_SPITransferHandler(uintptr_t context) + { + Transfer was completed without error, do something else now. + } + + SERCOM0_SPI_Initialize(); + SERCOM0_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL); + if(SERCOM0_SPI_Read(&rxBuffer, rxSize)) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + + + Remarks: + None. +*/ + +bool SERCOM0_SPI_Read(void* pReceiveData, size_t rxSize); + +// ***************************************************************************** +/* Function: + void SERCOM0_SPI_CallbackRegister(const SERCOM_SPI_CALLBACK* callBack, + uintptr_t context); + + Summary: + Allows application to register callback with PLIB. + + Description: + This function allows application to register an event handling function + for the PLIB to call back when requested data exchange operation has + completed or any error has occurred. + The callback should be registered before the client performs exchange + operation. + At any point if application wants to stop the callback, it can use this + function with "callBack" value as NULL. + + Precondition: + The SERCOM0_SPI_Initialize function must have been called. + + Parameters: + callBack - Pointer to the event handler function implemented by the + user . + + context - The value of parameter will be passed back to the application + unchanged, when the callBack function is called. It can + be used to identify any application specific data object that + identifies the instance of the client module (for example, + it may be a pointer to the client module's state structure). + + Returns: + None. + + Example: + + uint8_t txBuffer[10]; + uint8_t rxBuffer[10]; + size_t txSize = 10; + size_t rxSize = 10; + + SERCOM0_SPI_Initialize(); + + SERCOM0_SPI_CallbackRegister(&APP_SPICallBack, (uintptr_t)NULL); + + if(SERCOM0_SPI_WriteRead(&txBuffer, txSize, &rxBuffer, rxSize )) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + + void APP_SPICallBack(uintptr_t contextHandle) + { + Exchange was completed without error, do something else. + } + + + Remarks: + If the client does not want to be notified when the queued operation + has completed, it does not need to register a callback. +*/ + +void SERCOM0_SPI_CallbackRegister(SERCOM_SPI_CALLBACK callBack, uintptr_t context); + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_IsBusy (void); + + Summary: + Returns transfer status of SERCOM SERCOM0SPI. + + Description: + This function ture if the SERCOM SERCOM0SPI module is busy with a transfer. The + application can use the function to check if SERCOM SERCOM0SPI module is busy + before calling any of the data transfer functions. The library does not + allow a data transfer operation if another transfer operation is already in + progress. This function returns true when the SPI PLIB software state machine is idle and + all the bytes are transmitted out on the bus (shift register is empty). + + This function can be used as an alternative to the callback function when + the library is operating interrupt mode. The allow the application to + implement a synchronous interface to the library. + + Precondition: + The SERCOM0_SPI_Initialize() should have been called once. The module should + have been configured for interrupt mode operation in MHC. + + Parameters: + None. + + Returns: + true - Transfer is still in progress + false - Transfer is completed or no transfer is currently in progress. + + Example: + + The following code example demonstrates the use of the + SERCOM0_SPI_IsBusy() function. This example shows a blocking while + loop. The function can also be called periodically. + + uint8_t dataBuffer[20]; + + SERCOM0_SPI_Initialize(); + SERCOM0_SPI_Write(dataBuffer, 20); + + while (SERCOM0_SPI_IsBusy() == true) + { + Wait here till the transfer is done. + } + + + Remarks: + None. +*/ + +bool SERCOM0_SPI_IsBusy (void); + +// ***************************************************************************** +/* Function: + bool SERCOM0_SPI_IsTransmitterBusy (void); + + Summary: + Returns hardware transfer status of the SPI transmit shift register + + Description: + This function returns the hardware status of the transmit shift register. + The status is returned true after all the bytes have been shifted out on the + SPI bus. This function should be used when using DMA with SPI PLIB to make + sure that all the bytes have been transmitted out on the bus. For SPI + transfers without DMA, the SERCOM0_SPI_IsBusy() API must be used. + + Precondition: + The SERCOM0_SPI_Initialize() should have been called once. + + Parameters: + None. + + Returns: + true - Data is being shifted out on the SPI bus + false - All the data bytes have been shifted out on the SPI bus + + Example: + + + + + Remarks: + None. +*/ +bool SERCOM0_SPI_IsTransmitterBusy(void); + +#ifdef __cplusplus // Provide C++ Compatibility +} +#endif + +#endif /* PLIB_SERCOM0_SPI_MASTER_H */ \ No newline at end of file diff --git a/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.c b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.c new file mode 100644 index 00000000..8931b8c5 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.c @@ -0,0 +1,622 @@ +/******************************************************************************* + SERIAL COMMUNICATION SERIAL PERIPHERAL INTERFACE(SERCOM3_SPI) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom3_spi_master.c + + Summary + SERCOM3_SPI Master PLIB Implementation File. + + Description + This file defines the interface to the SERCOM SPI peripheral library. + This library provides access to and control of the associated + peripheral instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#include "interrupts.h" +#include "plib_sercom3_spi_master.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: MACROS Definitions +// ***************************************************************************** +// ***************************************************************************** + + +/* SERCOM3 clk freq value for the baud calculation */ +#define SERCOM3_Frequency (48000000UL) + +/* SERCOM3 SPI baud value for 10000000 Hz baud rate */ +#define SERCOM3_SPIM_BAUD_VALUE (1UL) + +/*Global object to save SPI Exchange related data */ +static volatile SPI_OBJECT sercom3SPIObj; + +// ***************************************************************************** +// ***************************************************************************** +// Section: SERCOM3_SPI Implementation +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Function: + void SERCOM3_SPI_Initialize(void); + + Summary: + Initializes instance SERCOM3 of the SERCOM module operating in SPI mode. + + Description: + This function initializes instance SERCOM3 of SERCOM module operating in SPI mode. + This function should be called before any other library function. The SERCOM + module will be configured as per the MHC settings. + + Remarks: + Refer plib_sercom3_spi.h file for more information. +*/ + +void SERCOM3_SPI_Initialize(void) +{ + /* Instantiate the SERCOM3 SPI object */ + sercom3SPIObj.callback = NULL ; + sercom3SPIObj.transferIsBusy = false ; + sercom3SPIObj.txSize = 0U; + sercom3SPIObj.rxSize = 0U; + + /* Selection of the Character Size and Receiver Enable */ + SERCOM3_REGS->SPIM.SERCOM_CTRLB = SERCOM_SPIM_CTRLB_CHSIZE_8_BIT | SERCOM_SPIM_CTRLB_RXEN_Msk ; + + /* Wait for synchronization */ + while((SERCOM3_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Selection of the Baud Value */ + SERCOM3_REGS->SPIM.SERCOM_BAUD = (uint8_t)SERCOM_SPIM_BAUD_BAUD(SERCOM3_SPIM_BAUD_VALUE); + + /* Configure Data Out Pin Out , Master Mode, + * Data In and Pin Out,Data Order and Standby mode if configured + * and Selection of the Clock Phase and Polarity and Enable the SPI Module + */ + SERCOM3_REGS->SPIM.SERCOM_CTRLA = SERCOM_SPIM_CTRLA_MODE_SPI_MASTER | SERCOM_SPIM_CTRLA_DOPO_PAD3 | SERCOM_SPIM_CTRLA_DIPO_PAD1 | SERCOM_SPIM_CTRLA_CPOL_IDLE_HIGH | SERCOM_SPIM_CTRLA_CPHA_TRAILING_EDGE | SERCOM_SPIM_CTRLA_DORD_MSB | SERCOM_SPIM_CTRLA_ENABLE_Msk ; + + + /* Wait for synchronization */ + while((SERCOM3_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, + uint32_t spiSourceClock); + + Summary: + Configure SERCOM SPI operational parameters at run time. + + Description: + This function allows the application to change the SERCOM SPI operational + parameter at run time. The application can thus override the MHC defined + configuration for these parameters. The parameter are specified via the + SPI_TRANSFER_SETUP type setup parameter. Each member of this parameter + should be initialized to the desired value. + + The application may feel need to call this function in situation where + multiple SPI slaves, each with different operation parameters, are connected + to one SPI master. This function can thus be used to setup the SPI Master to + meet the communication needs of the slave. + + Calling this function will affect any ongoing communication. The application + must thus ensure that there is no on-going communication on the SPI before + calling this function. + + Remarks: + Refer plib_sercom3_spi.h file for more information. +*/ + +bool SERCOM3_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, uint32_t spiSourceClock) +{ + uint32_t baudValue = 0U; + + bool statusValue = false; + + if(spiSourceClock == 0U) + { + /* Fetch Master Clock Frequency directly */ + spiSourceClock = SERCOM3_Frequency; + } + + /* Disable the SPI Module */ + SERCOM3_REGS->SPIM.SERCOM_CTRLA &= ~(SERCOM_SPIM_CTRLA_ENABLE_Msk); + + /* Disabling SPI module, also clears the TXC (Transmit Complete) bit to 0. TXC = 0 means transfer is not complete (busy). + As a result, calling SERCOM3_SPI_IsBusy() after a call to SERCOM3_SPI_TransferSetup() always returns busy. + Since, application must call the SERCOM3_SPI_TransferSetup() API only after ensuring that no transfer is in progress, + it is safe to clear the rxSize and txSize to 0, so as to let the SERCOM3_SPI_IsBusy() return false (not busy). + */ + sercom3SPIObj.rxSize = 0; + sercom3SPIObj.txSize = 0; + + /* Wait for synchronization */ + while((SERCOM3_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + if(setup != NULL) + { + if (setup->clockFrequency <= spiSourceClock/2U) + { + baudValue = (spiSourceClock/(2U*(setup->clockFrequency))) - 1U; + + /* Set the lowest possible baud */ + if (baudValue >= 255U) + { + baudValue = 255U; + } + + /* Selection of the Clock Polarity and Clock Phase */ + SERCOM3_REGS->SPIM.SERCOM_CTRLA &= ~(SERCOM_SPIM_CTRLA_CPOL_Msk | SERCOM_SPIM_CTRLA_CPHA_Msk); + SERCOM3_REGS->SPIM.SERCOM_CTRLA |= (uint32_t)setup->clockPolarity | (uint32_t)setup->clockPhase; + + /* Selection of the Baud Value */ + SERCOM3_REGS->SPIM.SERCOM_BAUD = (uint8_t)baudValue; + + /* Selection of the Character Size */ + SERCOM3_REGS->SPIM.SERCOM_CTRLB &= ~SERCOM_SPIM_CTRLB_CHSIZE_Msk; + SERCOM3_REGS->SPIM.SERCOM_CTRLB |= (uint32_t)setup->dataBits; + + /* Wait for synchronization */ + while((SERCOM3_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + statusValue = true; + } + } + + /* Enabling the SPI Module */ + SERCOM3_REGS->SPIM.SERCOM_CTRLA |= SERCOM_SPIM_CTRLA_ENABLE_Msk; + + /* Wait for synchronization */ + while((SERCOM3_REGS->SPIM.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + return statusValue; +} + + +// ***************************************************************************** +/* Function: + void SERCOM3_SPI_CallbackRegister(const SERCOM_SPI_CALLBACK* callBack, + uintptr_t context); + + Summary: + Allows application to register callback with PLIB. + + Description: + This function allows application to register an event handling function + for the PLIB to call back when requested data exchange operation has + completed or any error has occurred. + The callback should be registered before the client performs exchange + operation. + At any point if application wants to stop the callback, it can use this + function with "callBack" value as NULL. + + Remarks: + Refer plib_sercom3_spi.h file for more information. +*/ + +void SERCOM3_SPI_CallbackRegister(SERCOM_SPI_CALLBACK callBack, uintptr_t context ) +{ + sercom3SPIObj.callback = callBack; + + sercom3SPIObj.context = context; +} + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_IsBusy(void); + + Summary: + Returns transfer status of SERCOM SERCOM3SPI. + + Description: + This function ture if the SERCOM SERCOM3SPI module is busy with a transfer. The + application can use the function to check if SERCOM SERCOM3SPI module is busy + before calling any of the data transfer functions. The library does not + allow a data transfer operation if another transfer operation is already in + progress. + + This function can be used as an alternative to the callback function when + the library is operating interrupt mode. The allow the application to + implement a synchronous interface to the library. + + Remarks: + Refer plib_sercom3_spi.h file for more information. +*/ + +bool SERCOM3_SPI_IsBusy(void) +{ + bool isBusy = false; + size_t txSize = sercom3SPIObj.txSize; + bool transferIsBusy = sercom3SPIObj.transferIsBusy; + + if ((sercom3SPIObj.rxSize == 0U) && (txSize == 0U)) + { + /* This means no transfer has been requested yet; hence SPI is not busy. */ + isBusy = false; + } + else + { + /* if transmit is not complete or if the state flag is not set, SPI is busy */ + isBusy = (((SERCOM3_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_TXC_Msk) == 0U) || transferIsBusy); + } + return isBusy; +} + +bool SERCOM3_SPI_IsTransmitterBusy(void) +{ + return ((SERCOM3_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_TXC_Msk) == 0U)? true : false; +} + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_WriteRead (void* pTransmitData, size_t txSize + void* pReceiveData, size_t rxSize); + + Summary: + Write and Read data on SERCOM SERCOM3 SPI peripheral. + + Description: + This function transmits "txSize" number of bytes and receives "rxSize" + number of bytes on SERCOM SERCOM3 SPI module. Data pointed by pTransmitData is + transmitted and received data is saved in the location pointed by + pReceiveData. The function will transfer the maximum of "txSize" or "rxSize" + data units towards completion. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + transferring all the data. This indicates that the operation has been + completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + transmit and receive buffer are ownerd by the library until the data + transfer is complete and should not be modified by the application till the + transfer is complete. Only one transfer is allowed at any time. The + Application can use a callback function or a polling function to check for + completion of the transfer. If a callback is required, this should be + registered prior to calling the SERCOM3_SPI_WriteRead() function. The + application can use the SERCOM3_SPI_IsBusy() to poll for completion. + + Remarks: + Refer plib_sercom3_spi.h file for more information. +*/ + +bool SERCOM3_SPI_WriteRead (void* pTransmitData, size_t txSize, void* pReceiveData, size_t rxSize) +{ + bool isRequestAccepted = false; + uint32_t dummyData = 0U; + size_t txSz; + + if (sercom3SPIObj.transferIsBusy == false) + { + /* Verify the request */ + if(((txSize > 0U) && (pTransmitData != NULL)) || ((rxSize > 0U) && (pReceiveData != NULL))) + { + if((SERCOM3_REGS->SPIM.SERCOM_CTRLB & SERCOM_SPIM_CTRLB_CHSIZE_Msk) == (uint32_t)SPI_DATA_BITS_9) + { + /* For 9-bit transmission, the txSize and rxSize must be an even number. */ + if(((txSize > 0U) && ((txSize & 0x01U) != 0U)) || ((rxSize > 0U) && ((rxSize & 0x01U) != 0U))) + { + return isRequestAccepted; + } + } + + isRequestAccepted = true; + sercom3SPIObj.txBuffer = pTransmitData; + sercom3SPIObj.rxBuffer = pReceiveData; + sercom3SPIObj.rxCount = 0U; + sercom3SPIObj.txCount = 0U; + sercom3SPIObj.dummySize = 0U; + + if(pTransmitData != NULL) + { + sercom3SPIObj.txSize = txSize; + } + else + { + sercom3SPIObj.txSize = 0U; + } + + if(pReceiveData != NULL) + { + sercom3SPIObj.rxSize = rxSize; + } + else + { + sercom3SPIObj.rxSize = 0U; + } + + sercom3SPIObj.transferIsBusy = true; + + /* Flush out any unread data in SPI read buffer */ + while((SERCOM3_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_RXC_Msk) == SERCOM_SPIM_INTFLAG_RXC_Msk) + { + dummyData = SERCOM3_REGS->SPIM.SERCOM_DATA; + (void)dummyData; + } + + SERCOM3_REGS->SPIM.SERCOM_STATUS |= SERCOM_SPIM_STATUS_BUFOVF_Msk; + + SERCOM3_REGS->SPIM.SERCOM_INTFLAG |= (uint8_t)SERCOM_SPIM_INTFLAG_ERROR_Msk; + + txSz = sercom3SPIObj.txSize; + + if(sercom3SPIObj.rxSize > txSz) + { + sercom3SPIObj.dummySize = sercom3SPIObj.rxSize - txSz; + } + + /* Start the first write here itself, rest will happen in ISR context */ + if((SERCOM3_REGS->SPIM.SERCOM_CTRLB & SERCOM_SPIM_CTRLB_CHSIZE_Msk) == (uint32_t)SPI_DATA_BITS_8) + { + if(sercom3SPIObj.txCount < txSz) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = *((uint8_t*)sercom3SPIObj.txBuffer); + + sercom3SPIObj.txCount++; + } + else if(sercom3SPIObj.dummySize > 0U) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = 0xFFU; + + sercom3SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + else + { + sercom3SPIObj.txSize >>= 1U; + sercom3SPIObj.dummySize >>= 1U; + sercom3SPIObj.rxSize >>= 1U; + + txSz = sercom3SPIObj.txSize; + + if(sercom3SPIObj.txCount < txSz) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = *((uint16_t*)sercom3SPIObj.txBuffer) & SERCOM_SPIM_DATA_Msk; + + sercom3SPIObj.txCount++; + } + else if(sercom3SPIObj.dummySize > 0U) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = 0xFFFFU & SERCOM_SPIM_DATA_Msk; + + sercom3SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + + if(rxSize > 0U) + { + /* Enable ReceiveComplete */ + SERCOM3_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_RXC_Msk; + } + else + { + /* Enable the DataRegisterEmpty */ + SERCOM3_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_DRE_Msk; + } + } + } + + return isRequestAccepted; +} + +bool SERCOM3_SPI_Write(void* pTransmitData, size_t txSize) +{ + return SERCOM3_SPI_WriteRead(pTransmitData, txSize, NULL, 0U); +} + +bool SERCOM3_SPI_Read(void* pReceiveData, size_t rxSize) +{ + return SERCOM3_SPI_WriteRead(NULL, 0U, pReceiveData, rxSize); +} + +// ***************************************************************************** +/* Function: + void SERCOM3_SPI_InterruptHandler(void); + + Summary: + Handler that handles the SPI interrupts + + Description: + This Function is called from the handler to handle the exchange based on the + Interrupts. + + Remarks: + Refer plib_sercom3_spi.h file for more information. +*/ + +void __attribute__((used)) SERCOM3_SPI_InterruptHandler(void) +{ + uint32_t dataBits = 0U; + uint32_t receivedData = 0U; + static bool isLastByteTransferInProgress = false; + uintptr_t context = sercom3SPIObj.context; + + if(SERCOM3_REGS->SPIM.SERCOM_INTENSET != 0U) + { + dataBits = SERCOM3_REGS->SPIM.SERCOM_CTRLB & SERCOM_SPIM_CTRLB_CHSIZE_Msk; + + size_t rxCount = sercom3SPIObj.rxCount; + size_t txCount = sercom3SPIObj.txCount; + size_t txSize = sercom3SPIObj.txSize; + + if((SERCOM3_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_RXC_Msk) == SERCOM_SPIM_INTFLAG_RXC_Msk) + { + receivedData = SERCOM3_REGS->SPIM.SERCOM_DATA; + + if(rxCount < sercom3SPIObj.rxSize) + { + if(dataBits == (uint32_t)SPI_DATA_BITS_8) + { + ((uint8_t*)sercom3SPIObj.rxBuffer)[rxCount] = (uint8_t)receivedData; + rxCount++; + } + else + { + ((uint16_t*)sercom3SPIObj.rxBuffer)[rxCount] = (uint16_t)receivedData; + rxCount++; + } + } + } + + /* If there are more words to be transmitted, then transmit them here and keep track of the count */ + if((SERCOM3_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_DRE_Msk) == SERCOM_SPIM_INTFLAG_DRE_Msk) + { + /* Disable the DRE interrupt. This will be enabled back if more than + * one byte is pending to be transmitted */ + SERCOM3_REGS->SPIM.SERCOM_INTENCLR = (uint8_t)SERCOM_SPIM_INTENCLR_DRE_Msk; + + if(dataBits == (uint32_t)SPI_DATA_BITS_8) + { + if(txCount < sercom3SPIObj.txSize) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = ((uint8_t*)sercom3SPIObj.txBuffer)[txCount]; + txCount++; + } + else if(sercom3SPIObj.dummySize > 0U) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = 0xFFU; + + sercom3SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + else + { + if(txCount < sercom3SPIObj.txSize) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = ((uint16_t*)sercom3SPIObj.txBuffer)[txCount]; + txCount++; + } + else if(sercom3SPIObj.dummySize > 0U) + { + SERCOM3_REGS->SPIM.SERCOM_DATA = 0xFFFFU; + + sercom3SPIObj.dummySize--; + } + else + { + /* Do nothing */ + } + } + + if((sercom3SPIObj.dummySize == 0U) && (txCount == txSize)) + { + /* At higher baud rates, the data in the shift register can be + * shifted out and TXC flag can get set resulting in a + * callback been given to the application with the SPI interrupt + * pending with the application. This will then result in the + * interrupt handler being called again with nothing to transmit. + * To avoid this, a software flag is set, but + * the TXC interrupt is not enabled until the very end. + */ + + isLastByteTransferInProgress = true; + } + else if(rxCount == sercom3SPIObj.rxSize) + { + SERCOM3_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_DRE_Msk; + + SERCOM3_REGS->SPIM.SERCOM_INTENCLR = (uint8_t)SERCOM_SPIM_INTENCLR_RXC_Msk; + } + else + { + /* Do nothing */ + } + } + + sercom3SPIObj.rxCount = rxCount; + sercom3SPIObj.txCount = txCount; + + if(((SERCOM3_REGS->SPIM.SERCOM_INTFLAG & SERCOM_SPIM_INTFLAG_TXC_Msk) == SERCOM_SPIM_INTFLAG_TXC_Msk) && (isLastByteTransferInProgress == true)) + { + if(rxCount == sercom3SPIObj.rxSize) + { + sercom3SPIObj.transferIsBusy = false; + + /* Disable the Data Register empty and Receive Complete Interrupt flags */ + SERCOM3_REGS->SPIM.SERCOM_INTENCLR = (uint8_t)(SERCOM_SPIM_INTENCLR_DRE_Msk | SERCOM_SPIM_INTENCLR_RXC_Msk | SERCOM_SPIM_INTENSET_TXC_Msk); + + isLastByteTransferInProgress = false; + + if(sercom3SPIObj.callback != NULL) + { + sercom3SPIObj.callback(context); + } + } + } + + if(isLastByteTransferInProgress == true) + { + /* For the last byte transfer, the DRE interrupt is already disabled. + * Enable TXC interrupt to ensure no data is present in the shift + * register before application callback is called. + */ + SERCOM3_REGS->SPIM.SERCOM_INTENSET = (uint8_t)SERCOM_SPIM_INTENSET_TXC_Msk; + } + } +} diff --git a/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.h b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.h new file mode 100644 index 00000000..742f634b --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom3_spi_master.h @@ -0,0 +1,624 @@ +/******************************************************************************* + SERIAL COMMUNICATION SERIAL PERIPHERAL INTERFACE (SERCOM3_SPI ) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom3_spi_master.h + + Summary + SERCOM3_SPI Master PLIB Header File. + + Description + This file defines the interface to the SERCOM SPI peripheral library. + This library provides access to and control of the associated + peripheral instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_SERCOM3_SPI_MASTER_H // Guards against multiple inclusion +#define PLIB_SERCOM3_SPI_MASTER_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "plib_sercom_spi_master_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + +extern "C" { + +#endif + +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +/* The following functions make up the methods (set of possible operations) of +this interface. +*/ + +// ***************************************************************************** +/* Function: + void SERCOM3_SPI_Initialize (void); + + Summary: + Initializes instance SERCOM3 operating in SPI mode. + + Description: + This function initializes instance SERCOM3 operating in SPI mode. + This function should be called before any other library function. The SERCOM + module will be configured as per the MHC settings. + + Precondition: + MCC GUI should be configured with the right values. The Generic Clock + configuration and the SERCOM Peripheral Clock channel should have been + configured in the clock manager GUI.The function will itself enable the + required peripheral clock channel and main clock. + + Parameters: + None. + + Returns: + None. + + Example: + + SERCOM3_SPI_Initialize(); + + + Remarks: + This function must be called once before any other SPI function is called. +*/ + +void SERCOM3_SPI_Initialize (void); + + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, + uint32_t spiSourceClock); + + Summary: + Configure SERCOM SPI operational parameters at run time. + + Description: + This function allows the application to change the SERCOM SPI operational + parameter at run time. The application can thus override the MHC defined + configuration for these parameters. The parameter are specified via the + SPI_TRANSFER_SETUP type setup parameter. Each member of this parameter + should be initialized to the desired value. + + The application may feel need to call this function in situation where + multiple SPI slaves, each with different operation paramertes, are connected + to one SPI master. This function can thus be used to setup the SPI Master to + meet the communication needs of the slave. + + Calling this function will affect any ongoing communication. The application + must thus ensure that there is no on-going communication on the SPI before + calling this function. + + Precondition: + SERCOM SERCOM3 SPI must first be initialized using SERCOM3_SPI_Initialize(). + + Parameters : + setup - pointer to the data structure of type SPI_TRANSFER_SETUP containing + the operation parameters. Each operation parameter must be specified even if + the parameter does not need to change. + + spiSourceClock - Current value of GCLK frequency feeding the SERCOM3 core. + + Returns: + true - setup was successful. + + false - if spiSourceClock and spi clock frequencies are such that resultant + baud value is out of the possible range. + + Example: Assuming 20 MHz as peripheral Master clock frequency + + SPI_TRANSFER_SETUP setup; + setup.clockFrequency = 1000000; + setup.clockPhase = SPI_CLOCK_PHASE_TRAILING_EDGE; + setup.clockPolarity = SPI_CLOCK_POLARITY_IDLE_LOW; + setup.dataBits = SPI_DATA_BITS_8; + + if (SERCOM3_SPI_TransferSetup (&setup, 20000000) == false) + { + this means setup could not be done, debug the reason. + } + + + + Remarks: + The application would need to call this function only if the operational + parameter need to be different than the ones configured in MHC. +*/ + +bool SERCOM3_SPI_TransferSetup(SPI_TRANSFER_SETUP *setup, uint32_t spiSourceClock); + + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_WriteRead (void* pTransmitData, size_t txSize + void* pReceiveData, size_t rxSize); + + Summary: + Write and Read data on SERCOM SERCOM3 SPI peripheral. + + Description: + This function transmits "txSize" number of bytes and receives "rxSize" + number of bytes on SERCOM SERCOM3 SPI module. Data pointed by pTransmitData is + transmitted and received data is saved in the location pointed by + pReceiveData. The function will transfer the maximum of "txSize" or "rxSize" + data units towards completion. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + transferring all the data. This indicates that the operation has been + completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + transmit and receive buffer are ownerd by the library until the data + transfer is complete and should not be modified by the application till the + transfer is complete. Only one transfer is allowed at any time. The + Application can use a callback function or a polling function to check for + completion of the transfer. If a callback is required, this should be + registered prior to calling the SERCOM3_SPI_WriteRead() function. The + application can use the SERCOM3_SPI_IsBusy() to poll for completion. + + Precondition: + The SERCOM3_SPI_Initialize function must have been called. If the + peripheral instance has been configured for Interrupt mode and transfer + completion status needs to be communicated back to application via callback, + a callback should have been registered using SERCOM3_SPI_CallbackRegister() + function. + + Parameters: + pTransmitData - Pointer to the data which has to be transmitted. In a case + where only data reception is required, this pointer can be set to NULL. If + the module is configured for 9 bit data length, the data should be right + aligned in a 16 bit memory location. The size of this buffer should be + txSize. + + txSize - Number of bytes to be transmitted. For 9 but data length, a count + of 1 counts 2 bytes. This value can be different from rxSize. + + pReceiveData - Pointer to the location where the received data has to be + stored. It is user's responsibility to ensure that this location has + sufficient memory to store rxSize amount of data. In a case where only data + transmission is required, this pointer can be set to NULL. If the module is + configured for 9 bit data length, received data will be right aligned and + will be stored in a 16 bit memory location. + + rxSize - Number of bytes to be received. This value can be different from + txSize. For 9 bit data length, a size count of 1 indicates 2 bytes required + to store 9 bits of data. + + Returns: + true - If configured for Non-interrupt mode, the function has recevied and + transmitted the requested number of bytes. If configured for Interrupt mode, + the request was accepted successfully and will be processed in the + interrupt. + + false - If both pTransmitData and pReceiveData are NULL, or if both txSize + and rxSize are 0 or if txSize is non-zero but the pTransmitData is set to + NULL or rxSize is non-zero but pReceiveData is NULL. In Interrupt mode, the + function returns false if there is an on-going data transfer at the time of + calling the function. + + Example: + + + The following code snippet shows an example using the + SERCOM3_SPI_WriteRead() function in interrupt mode operation using the + callback function. + + uint8_t txBuffer[4]; + uint8_t rxBuffer[10]; + size_t txSize = 4; + size_t rxSize = 10; + + void APP_SPITransferHandler(uintptr_t context) + { + Transfer was completed without error, do something else now. + } + + SERCOM3_SPI_Initialize(); + SERCOM3_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL); + if(SERCOM3_SPI_WriteRead(&txBuffer, txSize, &rxBuffer, rxSize)) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + The following code snippet shows non-interrupt or blocking mode + operation. + + uint8_t txBuffer[4]; + uint8_t rxBuffer[10]; + size_t txSize = 4; + size_t rxSize = 10; + + SERCOM3_SPI_Initialize(); + + This function call will block. + SERCOM3_SPI_WriteRead(&txBuffer, txSize, &rxBuffer, rxSize); + + + + Remarks: + None. +*/ + +bool SERCOM3_SPI_WriteRead (void* pTransmitData, size_t txSize, void* pReceiveData, size_t rxSize); + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_Write(void* pTransmitData, size_t txSize); + + Summary: + Writes data to SERCOM SERCOM3 SPI peripheral. + + Description: + This function writes "txSize" number of bytes on SERCOM SERCOM3 SPI module. Data + pointed by pTransmitData is transmitted. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + transferring all the data. This indicates that the operation has been + completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + transmit buffer is ownerd by the library until the data transfer is + complete and should not be modified by the application till the transfer is + complete. Only one transfer is allowed at any time. The application can use + a callback function or a polling function to check for completion of the + transfer. If a callback is required, this should be registered prior to + calling the SERCOM3_SPI_WriteRead() function. The application can use the + SERCOM3_SPI_IsBusy() to poll for completion. + + Precondition: + The SERCOM3_SPI_Initialize function must have been called. + + Callback has to be registered using SERCOM3_SPI_CallbackRegister API if the + peripheral instance has been configured in Interrupt mode and + transfer completion status needs to be communicated back to application via + callback. + + Parameters: + pTransmitData - Pointer to the buffer containing the data which has to be + transmitted. For 9 bit mode, data should be right aligned in the 16 bit + memory location. In "Interrupt Mode", this buffer should not be modified + after calling the function and before the callback function has been called + or the SERCOM3_SPI_IsBusy() function returns false. + + txSize - Number of bytes to be transmitted. For 9 bit mode, 2 bytes make up + a count of 1. + + Returns: + true - If configured for Non-interrupt mode, the function has transmitted + the requested number of bytes. If configured for Interrupt mode, the request + was accepted successfully and will be processed in the interrupt. + + false - If pTransmitData is NULL. In Interrupt mode, the function will + additionally return false if there is an on-going data transfer at the time + of calling the function. + + Example: + + uint8_t txBuffer[4]; + size_t txSize = 4; + + void APP_SPITransferHandler(uintptr_t context) + { + Transfer was completed without error, do something else now. + } + + SERCOM3_SPI_Initialize(); + SERCOM3_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL); + if(SERCOM3_SPI_Write(&txBuffer, txSize)) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + + + + Remarks: + None. + +*/ + +bool SERCOM3_SPI_Write(void* pTransmitData, size_t txSize); + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_Read(void* pReceiveData, size_t rxSize); + + Summary: + Reads data on the SERCOM SERCOM3 SPI peripheral. + + Description: + This function reads "rxSize" number of bytes on SERCOM SERCOM3 SPI module. The + received data is stored in the buffer pointed by pReceiveData. + + When "Interrupt Mode" option is unchecked in MHC, this function will be + blocking in nature. In this mode, the function will not return until all + the requested data is transferred. The function returns true after + receiving "rxSize" number of bytes. This indicates that the operation has + been completed. + + When "Interrupt Mode" option is selected in MHC, the function will be + non-blocking in nature. The function returns immediately. The data transfer + process continues in the peripheral interrupt. The application specified + receive buffer is ownerd by the library until the data transfer is + complete and should not be modified by the application till the transfer is + complete. Only one transfer is allowed at any time. The application can use + a callback function or a polling function to check for completion of the + transfer. If a callback is required, this should be registered prior to + calling the SERCOM3_SPI_WriteRead() function. The application can use the + SERCOM3_SPI_IsBusy() to poll for completion. + + Precondition: + The SERCOM3_SPI_Initialize function must have been called. + + Callback has to be registered using SERCOM3_SPI_CallbackRegister API if the + peripheral instance has been configured in Interrupt mode and + transfer completion status needs to be communicated back to application via + callback. + + Parameters: + pReceiveData - Pointer to the buffer where the received data will be stored. + For 9 bit mode, data should be right aligned in the 16 bit memory location. + In "Interrupt Mode", this buffer should not be modified after calling the + function and before the callback function has been called or the + SERCOM3_SPI_IsBusy() function returns false. + + rxSize - Number of bytes to be received. For 9 bit mode, 2 bytes make up a + count of 1. + + Returns: + true - If configured for Non-interrupt mode, the function has received the + requested number of bytes. If configured for Interrupt mode, the request was + accepted successfully and will be processed in the interrupt. + + false - If pReceiveData is NULL. In Interrupt mode, the function will + additionally return false if there is an on-going data transfer at the time + of calling the function. + + Example: + + uint8_t rxBuffer[10]; + size_t rxSize = 10; + + void APP_SPITransferHandler(uintptr_t context) + { + Transfer was completed without error, do something else now. + } + + SERCOM3_SPI_Initialize(); + SERCOM3_SPI_CallbackRegister(&APP_SPITransferHandler, (uintptr_t)NULL); + if(SERCOM3_SPI_Read(&rxBuffer, rxSize)) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + + + Remarks: + None. +*/ + +bool SERCOM3_SPI_Read(void* pReceiveData, size_t rxSize); + +// ***************************************************************************** +/* Function: + void SERCOM3_SPI_CallbackRegister(const SERCOM_SPI_CALLBACK* callBack, + uintptr_t context); + + Summary: + Allows application to register callback with PLIB. + + Description: + This function allows application to register an event handling function + for the PLIB to call back when requested data exchange operation has + completed or any error has occurred. + The callback should be registered before the client performs exchange + operation. + At any point if application wants to stop the callback, it can use this + function with "callBack" value as NULL. + + Precondition: + The SERCOM3_SPI_Initialize function must have been called. + + Parameters: + callBack - Pointer to the event handler function implemented by the + user . + + context - The value of parameter will be passed back to the application + unchanged, when the callBack function is called. It can + be used to identify any application specific data object that + identifies the instance of the client module (for example, + it may be a pointer to the client module's state structure). + + Returns: + None. + + Example: + + uint8_t txBuffer[10]; + uint8_t rxBuffer[10]; + size_t txSize = 10; + size_t rxSize = 10; + + SERCOM3_SPI_Initialize(); + + SERCOM3_SPI_CallbackRegister(&APP_SPICallBack, (uintptr_t)NULL); + + if(SERCOM3_SPI_WriteRead(&txBuffer, txSize, &rxBuffer, rxSize )) + { + request got accepted + } + else + { + request didn't get accepted, try again later with correct arguments + } + + void APP_SPICallBack(uintptr_t contextHandle) + { + Exchange was completed without error, do something else. + } + + + Remarks: + If the client does not want to be notified when the queued operation + has completed, it does not need to register a callback. +*/ + +void SERCOM3_SPI_CallbackRegister(SERCOM_SPI_CALLBACK callBack, uintptr_t context); + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_IsBusy (void); + + Summary: + Returns transfer status of SERCOM SERCOM3SPI. + + Description: + This function ture if the SERCOM SERCOM3SPI module is busy with a transfer. The + application can use the function to check if SERCOM SERCOM3SPI module is busy + before calling any of the data transfer functions. The library does not + allow a data transfer operation if another transfer operation is already in + progress. This function returns true when the SPI PLIB software state machine is idle and + all the bytes are transmitted out on the bus (shift register is empty). + + This function can be used as an alternative to the callback function when + the library is operating interrupt mode. The allow the application to + implement a synchronous interface to the library. + + Precondition: + The SERCOM3_SPI_Initialize() should have been called once. The module should + have been configured for interrupt mode operation in MHC. + + Parameters: + None. + + Returns: + true - Transfer is still in progress + false - Transfer is completed or no transfer is currently in progress. + + Example: + + The following code example demonstrates the use of the + SERCOM3_SPI_IsBusy() function. This example shows a blocking while + loop. The function can also be called periodically. + + uint8_t dataBuffer[20]; + + SERCOM3_SPI_Initialize(); + SERCOM3_SPI_Write(dataBuffer, 20); + + while (SERCOM3_SPI_IsBusy() == true) + { + Wait here till the transfer is done. + } + + + Remarks: + None. +*/ + +bool SERCOM3_SPI_IsBusy (void); + +// ***************************************************************************** +/* Function: + bool SERCOM3_SPI_IsTransmitterBusy (void); + + Summary: + Returns hardware transfer status of the SPI transmit shift register + + Description: + This function returns the hardware status of the transmit shift register. + The status is returned true after all the bytes have been shifted out on the + SPI bus. This function should be used when using DMA with SPI PLIB to make + sure that all the bytes have been transmitted out on the bus. For SPI + transfers without DMA, the SERCOM3_SPI_IsBusy() API must be used. + + Precondition: + The SERCOM3_SPI_Initialize() should have been called once. + + Parameters: + None. + + Returns: + true - Data is being shifted out on the SPI bus + false - All the data bytes have been shifted out on the SPI bus + + Example: + + + + + Remarks: + None. +*/ +bool SERCOM3_SPI_IsTransmitterBusy(void); + +#ifdef __cplusplus // Provide C++ Compatibility +} +#endif + +#endif /* PLIB_SERCOM3_SPI_MASTER_H */ \ No newline at end of file diff --git a/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom_spi_master_common.h b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom_spi_master_common.h new file mode 100644 index 00000000..ec7b9260 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/spi_master/plib_sercom_spi_master_common.h @@ -0,0 +1,296 @@ +/******************************************************************************* + SERCOM_SPI(SERIAL COMMUNICATION SERIAL PERIPHERAL INTERFACE) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom_spi_master_common.h + + Summary + SERCOM_SPI PLIB Master Local Header File. + + Description + This file defines the interface to the SERCOM SPI peripheral library. + This library provides access to and control of the associated + peripheral instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_SERCOM_SPI_MASTER_COMMON_H // Guards against multiple inclusion +#define PLIB_SERCOM_SPI_MASTER_COMMON_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* SPI Clock Phase + + Summary: + Identifies SPI Clock Phase Options + + Description: + This enumeration identifies possible SPI Clock Phase Options. + + Remarks: + None. +*/ + +typedef enum +{ + SPI_CLOCK_PHASE_LEADING_EDGE = SERCOM_SPIM_CTRLA_CPHA_LEADING_EDGE, + SPI_CLOCK_PHASE_TRAILING_EDGE = SERCOM_SPIM_CTRLA_CPHA_TRAILING_EDGE, + + + /* Force the compiler to reserve 32-bit space for each enum value */ + SPI_CLOCK_PHASE_INVALID = 0xFFFFFFFFU + +} SPI_CLOCK_PHASE; + +// ***************************************************************************** +/* SPI Clock Polarity + + Summary: + Identifies SPI Clock Polarity Options + + Description: + This enumeration identifies possible SPI Clock Polarity Options. + + Remarks: + None. +*/ + +typedef enum +{ + SPI_CLOCK_POLARITY_IDLE_LOW = SERCOM_SPIM_CTRLA_CPOL_IDLE_LOW, + SPI_CLOCK_POLARITY_IDLE_HIGH = SERCOM_SPIM_CTRLA_CPOL_IDLE_HIGH, + + + /* Force the compiler to reserve 32-bit space for each enum value */ + SPI_CLOCK_POLARITY_INVALID = 0xFFFFFFFFU + +} SPI_CLOCK_POLARITY; + +// ***************************************************************************** +/* SPI Data Bits + + Summary: + Identifies SPI bits per transfer + + Description: + This enumeration identifies number of bits per SPI transfer. + + Remarks: + For 9 bit mode, data should be right aligned in the 16 bit + memory location. +*/ + +typedef enum +{ + SPI_DATA_BITS_8 = SERCOM_SPIM_CTRLB_CHSIZE_8_BIT, + SPI_DATA_BITS_9 = SERCOM_SPIM_CTRLB_CHSIZE_9_BIT, + + + /* Force the compiler to reserve 32-bit space for each enum value */ + SPI_DATA_BITS_INVALID = 0xFFFFFFFFU + +} SPI_DATA_BITS; + +// ***************************************************************************** +/* SPI Transfer Setup Parameters + + Summary: + Identifies the setup parameters which can be changed dynamically. + + Description + This structure identifies the possible setup parameters for SPI + which can be changed dynamically if needed. + + Remarks: + None. +*/ + +typedef struct +{ + /* Baud Rate or clock frequency */ + uint32_t clockFrequency; + + /* Clock Phase */ + SPI_CLOCK_PHASE clockPhase; + + /* Clock Polarity */ + SPI_CLOCK_POLARITY clockPolarity; + + /* Number of bits per transfer */ + SPI_DATA_BITS dataBits; + +} SPI_TRANSFER_SETUP; + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* SPI CallBack Function Pointer + + Summary: + Pointer to a SPI Call back function. + + Description: + This data type defines the required function signature for the + SPI event handling callback function. Application must register + a pointer to an event handling function whose function signature (parameter + and return value types) match the types specified by this function pointer + in order to receive event calls back from the PLIB. + + The parameters and return values are described here and a partial example + implementation is provided. + + Parameters: + context - Value identifying the context of the application that + registered the event handling function + + Returns: + None. + + Example: + + + SPI1_CallbackRegister(&APP_SPICallBack, NULL); + void APP_SPICallBack(uintptr_t contextHandle) + { + if( SPI_ERROR_NONE == SPI1_ErrorGet()) + { + Exchange was completed without error, do something else now. + } + } + + + Remarks: + The context parameter contains the a handle to the client context, + provided at the time the event handling function was registered using the + SPIx_CallbackRegister function. This context handle value is + passed back to the client as the "context" parameter. It can be any value + (such as a pointer to the client's data) necessary to identify the client + context or instance of the client that made the data exchange + request. + + The event handler function executes in the PLIB's interrupt context. It is + recommended of the application to not perform process intensive or blocking + operations with in this function. +*/ + +typedef void (*SERCOM_SPI_CALLBACK)(uintptr_t context); + +// ***************************************************************************** +// ***************************************************************************** +// Section: Local: **** Local SPI Object**** +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* SPI Object + + Summary: + Defines the data type for the data structures used for peripheral + operations. + + Description: + This may be for used for peripheral operations. + + Remarks: + None. +*/ + +typedef struct +{ + /* Pointer to the transmitter buffer */ + void * txBuffer; + + /* Pointer to the received buffer */ + void * rxBuffer; + + size_t txSize; + + size_t rxSize; + + size_t dummySize; + + /* Size of the receive processed exchange size */ + size_t rxCount; + + /* Size of the transmit processed exchange size */ + size_t txCount; + + /* Exchange busy status of the SPI */ + bool transferIsBusy; + + /* SPI Event handler */ + SERCOM_SPI_CALLBACK callback; + + /* Context */ + uintptr_t context; + + uint32_t status; + +} SPI_OBJECT; + +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif + +#endif //PLIB_SERCOM_SPI_MASTER_COMMON_H \ No newline at end of file diff --git a/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom1_usart.c b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom1_usart.c new file mode 100644 index 00000000..1fefa329 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom1_usart.c @@ -0,0 +1,615 @@ +/******************************************************************************* + SERCOM Universal Synchronous/Asynchrnous Receiver/Transmitter PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom1_usart.c + + Summary + USART peripheral library interface. + + Description + This file defines the interface to the USART peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include "interrupts.h" +#include "plib_sercom1_usart.h" +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data +// ***************************************************************************** +// ***************************************************************************** +/* SERCOM1 USART baud value for 5180000 Hz baud rate */ +#define SERCOM1_USART_INT_BAUD_VALUE (8956UL) + +static volatile SERCOM_USART_OBJECT sercom1USARTObj; + + +// ***************************************************************************** +// ***************************************************************************** +// Section: SERCOM1 USART Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +static void SERCOM1_USART_ErrorClear( void ) +{ + uint8_t u8dummyData = 0U; + USART_ERROR errorStatus = (USART_ERROR) (SERCOM1_REGS->USART_INT.SERCOM_STATUS & (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk )); + + if(errorStatus != USART_ERROR_NONE) + { + /* Clear error flag */ + SERCOM1_REGS->USART_INT.SERCOM_INTFLAG = (uint8_t)SERCOM_USART_INT_INTFLAG_ERROR_Msk; + /* Clear all errors */ + SERCOM1_REGS->USART_INT.SERCOM_STATUS = (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk); + + /* Flush existing error bytes from the RX FIFO */ + while((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & (uint8_t)SERCOM_USART_INT_INTFLAG_RXC_Msk) == (uint8_t)SERCOM_USART_INT_INTFLAG_RXC_Msk) + { + u8dummyData = (uint8_t)SERCOM1_REGS->USART_INT.SERCOM_DATA; + } + } + + /* Ignore the warning */ + (void)u8dummyData; +} + +void SERCOM1_USART_Initialize( void ) +{ + /* + * Configures USART Clock Mode + * Configures TXPO and RXPO + * Configures Data Order + * Configures Standby Mode + * Configures Sampling rate + * Configures IBON + */ + + SERCOM1_REGS->USART_INT.SERCOM_CTRLA = SERCOM_USART_INT_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_INT_CTRLA_RXPO(0x1UL) | SERCOM_USART_INT_CTRLA_TXPO(0x0UL) | SERCOM_USART_INT_CTRLA_DORD_Msk | SERCOM_USART_INT_CTRLA_IBON_Msk | SERCOM_USART_INT_CTRLA_FORM(0x0UL) | SERCOM_USART_INT_CTRLA_SAMPR(2UL) ; + + /* Configure Baud Rate */ + SERCOM1_REGS->USART_INT.SERCOM_BAUD = (uint16_t)SERCOM_USART_INT_BAUD_BAUD(SERCOM1_USART_INT_BAUD_VALUE); + + /* + * Configures RXEN + * Configures TXEN + * Configures CHSIZE + * Configures Parity + * Configures Stop bits + */ + SERCOM1_REGS->USART_INT.SERCOM_CTRLB = SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT | SERCOM_USART_INT_CTRLB_SBMODE_1_BIT | SERCOM_USART_INT_CTRLB_RXEN_Msk | SERCOM_USART_INT_CTRLB_TXEN_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + + /* Enable the UART after the configurations */ + SERCOM1_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Initialize instance object */ + sercom1USARTObj.rxBuffer = NULL; + sercom1USARTObj.rxSize = 0; + sercom1USARTObj.rxProcessedSize = 0; + sercom1USARTObj.rxBusyStatus = false; + sercom1USARTObj.rxCallback = NULL; + sercom1USARTObj.txBuffer = NULL; + sercom1USARTObj.txSize = 0; + sercom1USARTObj.txProcessedSize = 0; + sercom1USARTObj.txBusyStatus = false; + sercom1USARTObj.txCallback = NULL; + sercom1USARTObj.errorStatus = USART_ERROR_NONE; +} + + + + + +uint32_t SERCOM1_USART_FrequencyGet( void ) +{ + return 48000000UL; +} + +bool SERCOM1_USART_SerialSetup( USART_SERIAL_SETUP * serialSetup, uint32_t clkFrequency ) +{ + bool setupStatus = false; + uint32_t baudValue = 0U; + uint32_t sampleRate = 0U; + uint32_t sampleCount = 0U; + + bool transferProgress = sercom1USARTObj.txBusyStatus; + transferProgress = sercom1USARTObj.rxBusyStatus || transferProgress; + if(transferProgress) + { + /* Transaction is in progress, so return without updating settings */ + return setupStatus; + } + + if((serialSetup != NULL) && (serialSetup->baudRate != 0U)) + { + if(clkFrequency == 0U) + { + clkFrequency = SERCOM1_USART_FrequencyGet(); + } + + if(clkFrequency >= (16U * serialSetup->baudRate)) + { + sampleRate = 0U; + sampleCount = 16U; + } + else if(clkFrequency >= (8U * serialSetup->baudRate)) + { + sampleRate = 2U; + sampleCount = 8U; + } + else if(clkFrequency >= (3U * serialSetup->baudRate)) + { + sampleRate = 4U; + sampleCount = 3U; + } + else + { + /* Do nothing */ + } + baudValue = 65536U - (uint32_t)(((uint64_t)65536U * sampleCount * serialSetup->baudRate) / clkFrequency); + /* Disable the USART before configurations */ + SERCOM1_REGS->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Configure Baud Rate */ + SERCOM1_REGS->USART_INT.SERCOM_BAUD = (uint16_t)SERCOM_USART_INT_BAUD_BAUD(baudValue); + + /* Configure Parity Options */ + if(serialSetup->parity == USART_PARITY_NONE) + { + SERCOM1_REGS->USART_INT.SERCOM_CTRLA = (SERCOM1_REGS->USART_INT.SERCOM_CTRLA & ~(SERCOM_USART_INT_CTRLA_SAMPR_Msk | SERCOM_USART_INT_CTRLA_FORM_Msk)) | SERCOM_USART_INT_CTRLA_FORM(0x0UL) | SERCOM_USART_INT_CTRLA_SAMPR((uint32_t)sampleRate); + SERCOM1_REGS->USART_INT.SERCOM_CTRLB = (SERCOM1_REGS->USART_INT.SERCOM_CTRLB & ~(SERCOM_USART_INT_CTRLB_CHSIZE_Msk | SERCOM_USART_INT_CTRLB_SBMODE_Msk)) | ((uint32_t) serialSetup->dataWidth | (uint32_t) serialSetup->stopBits); + } + else + { + SERCOM1_REGS->USART_INT.SERCOM_CTRLA = (SERCOM1_REGS->USART_INT.SERCOM_CTRLA & ~(SERCOM_USART_INT_CTRLA_SAMPR_Msk | SERCOM_USART_INT_CTRLA_FORM_Msk)) | SERCOM_USART_INT_CTRLA_FORM(0x1UL) | SERCOM_USART_INT_CTRLA_SAMPR((uint32_t)sampleRate); + SERCOM1_REGS->USART_INT.SERCOM_CTRLB = (SERCOM1_REGS->USART_INT.SERCOM_CTRLB & ~(SERCOM_USART_INT_CTRLB_CHSIZE_Msk | SERCOM_USART_INT_CTRLB_SBMODE_Msk | SERCOM_USART_INT_CTRLB_PMODE_Msk)) | (uint32_t) serialSetup->dataWidth | (uint32_t) serialSetup->stopBits | (uint32_t) serialSetup->parity ; + } + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Enable the USART after the configurations */ + SERCOM1_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + setupStatus = true; + } + + return setupStatus; +} + +USART_ERROR SERCOM1_USART_ErrorGet( void ) +{ + USART_ERROR errorStatus = sercom1USARTObj.errorStatus; + + sercom1USARTObj.errorStatus = USART_ERROR_NONE; + + return errorStatus; +} + +void SERCOM1_USART_Enable( void ) +{ + if((SERCOM1_REGS->USART_INT.SERCOM_CTRLA & SERCOM_USART_INT_CTRLA_ENABLE_Msk) == 0U) + { + SERCOM1_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + } +} + +void SERCOM1_USART_Disable( void ) +{ + if((SERCOM1_REGS->USART_INT.SERCOM_CTRLA & SERCOM_USART_INT_CTRLA_ENABLE_Msk) != 0U) + { + SERCOM1_REGS->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + } +} + + +void SERCOM1_USART_TransmitterEnable( void ) +{ + SERCOM1_REGS->USART_INT.SERCOM_CTRLB |= SERCOM_USART_INT_CTRLB_TXEN_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +void SERCOM1_USART_TransmitterDisable( void ) +{ + SERCOM1_REGS->USART_INT.SERCOM_CTRLB &= ~SERCOM_USART_INT_CTRLB_TXEN_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +bool SERCOM1_USART_Write( void *buffer, const size_t size ) +{ + bool writeStatus = false; + uint32_t processedSize = 0U; + + if(buffer != NULL) + { + if(sercom1USARTObj.txBusyStatus == false) + { + sercom1USARTObj.txBuffer = buffer; + sercom1USARTObj.txSize = size; + sercom1USARTObj.txBusyStatus = true; + + size_t txSize = sercom1USARTObj.txSize; + + /* Initiate the transfer by sending first byte */ + while (((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk) && + (processedSize < txSize)) + { + if (((SERCOM1_REGS->USART_INT.SERCOM_CTRLB & SERCOM_USART_INT_CTRLB_CHSIZE_Msk) >> SERCOM_USART_INT_CTRLB_CHSIZE_Pos) != 0x01U) + { + /* 8-bit mode */ + SERCOM1_REGS->USART_INT.SERCOM_DATA = ((uint8_t*)(buffer))[processedSize]; + } + else + { + /* 9-bit mode */ + SERCOM1_REGS->USART_INT.SERCOM_DATA = ((uint16_t*)(buffer))[processedSize]; + } + processedSize += 1U; + } + sercom1USARTObj.txProcessedSize = processedSize; + SERCOM1_REGS->USART_INT.SERCOM_INTENSET = (uint8_t)SERCOM_USART_INT_INTFLAG_DRE_Msk; + + writeStatus = true; + } + } + + return writeStatus; +} + + +bool SERCOM1_USART_WriteIsBusy( void ) +{ + return sercom1USARTObj.txBusyStatus; +} + +size_t SERCOM1_USART_WriteCountGet( void ) +{ + return sercom1USARTObj.txProcessedSize; +} + +void SERCOM1_USART_WriteCallbackRegister( SERCOM_USART_CALLBACK callback, uintptr_t context ) +{ + sercom1USARTObj.txCallback = callback; + + sercom1USARTObj.txContext = context; +} + + +bool SERCOM1_USART_TransmitComplete( void ) +{ + bool transmitComplete = false; + + if ((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_TXC_Msk) == SERCOM_USART_INT_INTFLAG_TXC_Msk) + { + transmitComplete = true; + } + + return transmitComplete; +} + +void SERCOM1_USART_ReceiverEnable( void ) +{ + SERCOM1_REGS->USART_INT.SERCOM_CTRLB |= SERCOM_USART_INT_CTRLB_RXEN_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +void SERCOM1_USART_ReceiverDisable( void ) +{ + SERCOM1_REGS->USART_INT.SERCOM_CTRLB &= ~SERCOM_USART_INT_CTRLB_RXEN_Msk; + + /* Wait for sync */ + while((SERCOM1_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +bool SERCOM1_USART_Read( void *buffer, const size_t size ) +{ + bool readStatus = false; + + if(buffer != NULL) + { + if(sercom1USARTObj.rxBusyStatus == false) + { + /* Clear error flags and flush out error data that may have been received when no active request was pending */ + SERCOM1_USART_ErrorClear(); + + sercom1USARTObj.rxBuffer = buffer; + sercom1USARTObj.rxSize = size; + sercom1USARTObj.rxProcessedSize = 0U; + sercom1USARTObj.rxBusyStatus = true; + sercom1USARTObj.errorStatus = USART_ERROR_NONE; + + readStatus = true; + + /* Enable receive and error interrupt */ + SERCOM1_REGS->USART_INT.SERCOM_INTENSET = (uint8_t)(SERCOM_USART_INT_INTENSET_ERROR_Msk | SERCOM_USART_INT_INTENSET_RXC_Msk); + } + } + + return readStatus; +} + +bool SERCOM1_USART_ReadIsBusy( void ) +{ + return sercom1USARTObj.rxBusyStatus; +} + +size_t SERCOM1_USART_ReadCountGet( void ) +{ + return sercom1USARTObj.rxProcessedSize; +} + +bool SERCOM1_USART_ReadAbort(void) +{ + if (sercom1USARTObj.rxBusyStatus == true) + { + /* Disable receive and error interrupt */ + SERCOM1_REGS->USART_INT.SERCOM_INTENCLR = (uint8_t)(SERCOM_USART_INT_INTENCLR_ERROR_Msk | SERCOM_USART_INT_INTENCLR_RXC_Msk); + + sercom1USARTObj.rxBusyStatus = false; + + /* If required application should read the num bytes processed prior to calling the read abort API */ + sercom1USARTObj.rxSize = 0U; + sercom1USARTObj.rxProcessedSize = 0U; + } + + return true; +} + +void SERCOM1_USART_ReadCallbackRegister( SERCOM_USART_CALLBACK callback, uintptr_t context ) +{ + sercom1USARTObj.rxCallback = callback; + + sercom1USARTObj.rxContext = context; +} + + +static void __attribute__((used)) SERCOM1_USART_ISR_ERR_Handler( void ) +{ + USART_ERROR errorStatus; + + errorStatus = (USART_ERROR) (SERCOM1_REGS->USART_INT.SERCOM_STATUS & (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk)); + + if(errorStatus != USART_ERROR_NONE) + { + /* Save the error to be reported later */ + sercom1USARTObj.errorStatus = errorStatus; + + /* Clear the error flags and flush out the error bytes */ + SERCOM1_USART_ErrorClear(); + + /* Disable error and receive interrupt to abort on-going transfer */ + SERCOM1_REGS->USART_INT.SERCOM_INTENCLR = (uint8_t)(SERCOM_USART_INT_INTENCLR_ERROR_Msk | SERCOM_USART_INT_INTENCLR_RXC_Msk); + + /* Clear the RX busy flag */ + sercom1USARTObj.rxBusyStatus = false; + + if(sercom1USARTObj.rxCallback != NULL) + { + uintptr_t rxContext = sercom1USARTObj.rxContext; + + sercom1USARTObj.rxCallback(rxContext); + } + } +} + +static void __attribute__((used)) SERCOM1_USART_ISR_RX_Handler( void ) +{ + uint16_t temp; + + + if(sercom1USARTObj.rxBusyStatus == true) + { + size_t rxSize = sercom1USARTObj.rxSize; + + if(sercom1USARTObj.rxProcessedSize < rxSize) + { + uintptr_t rxContext = sercom1USARTObj.rxContext; + + temp = (uint16_t)SERCOM1_REGS->USART_INT.SERCOM_DATA; + size_t rxProcessedSize = sercom1USARTObj.rxProcessedSize; + + if (((SERCOM1_REGS->USART_INT.SERCOM_CTRLB & SERCOM_USART_INT_CTRLB_CHSIZE_Msk) >> SERCOM_USART_INT_CTRLB_CHSIZE_Pos) != 0x01U) + { + /* 8-bit mode */ + ((uint8_t*)sercom1USARTObj.rxBuffer)[rxProcessedSize] = (uint8_t) (temp); + } + else + { + /* 9-bit mode */ + ((uint16_t*)sercom1USARTObj.rxBuffer)[rxProcessedSize] = temp; + } + + /* Increment processed size */ + rxProcessedSize++; + sercom1USARTObj.rxProcessedSize = rxProcessedSize; + + if(rxProcessedSize == sercom1USARTObj.rxSize) + { + sercom1USARTObj.rxBusyStatus = false; + sercom1USARTObj.rxSize = 0U; + SERCOM1_REGS->USART_INT.SERCOM_INTENCLR = (uint8_t)(SERCOM_USART_INT_INTENCLR_RXC_Msk | SERCOM_USART_INT_INTENCLR_ERROR_Msk); + + if(sercom1USARTObj.rxCallback != NULL) + { + sercom1USARTObj.rxCallback(rxContext); + } + } + + } + } +} + +static void __attribute__((used)) SERCOM1_USART_ISR_TX_Handler( void ) +{ + bool dataRegisterEmpty; + bool dataAvailable; + if(sercom1USARTObj.txBusyStatus == true) + { + size_t txProcessedSize = sercom1USARTObj.txProcessedSize; + + dataAvailable = (txProcessedSize < sercom1USARTObj.txSize); + dataRegisterEmpty = ((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk); + + while(dataRegisterEmpty && dataAvailable) + { + if (((SERCOM1_REGS->USART_INT.SERCOM_CTRLB & SERCOM_USART_INT_CTRLB_CHSIZE_Msk) >> SERCOM_USART_INT_CTRLB_CHSIZE_Pos) != 0x01U) + { + /* 8-bit mode */ + SERCOM1_REGS->USART_INT.SERCOM_DATA = ((uint8_t*)sercom1USARTObj.txBuffer)[txProcessedSize]; + } + else + { + /* 9-bit mode */ + SERCOM1_REGS->USART_INT.SERCOM_DATA = ((uint16_t*)sercom1USARTObj.txBuffer)[txProcessedSize]; + } + /* Increment processed size */ + txProcessedSize++; + + dataAvailable = (txProcessedSize < sercom1USARTObj.txSize); + dataRegisterEmpty = ((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk); + } + + sercom1USARTObj.txProcessedSize = txProcessedSize; + + if(txProcessedSize >= sercom1USARTObj.txSize) + { + sercom1USARTObj.txBusyStatus = false; + sercom1USARTObj.txSize = 0U; + SERCOM1_REGS->USART_INT.SERCOM_INTENCLR = (uint8_t)SERCOM_USART_INT_INTENCLR_DRE_Msk; + + if(sercom1USARTObj.txCallback != NULL) + { + uintptr_t txContext = sercom1USARTObj.txContext; + sercom1USARTObj.txCallback(txContext); + } + } + } +} + +void __attribute__((used)) SERCOM1_USART_InterruptHandler( void ) +{ + bool testCondition; + if(SERCOM1_REGS->USART_INT.SERCOM_INTENSET != 0U) + { + /* Checks for error flag */ + testCondition = ((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_ERROR_Msk) == SERCOM_USART_INT_INTFLAG_ERROR_Msk); + testCondition = ((SERCOM1_REGS->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_ERROR_Msk) == SERCOM_USART_INT_INTENSET_ERROR_Msk) && testCondition; + if(testCondition) + { + SERCOM1_USART_ISR_ERR_Handler(); + } + + testCondition = ((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk); + testCondition = ((SERCOM1_REGS->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_DRE_Msk) == SERCOM_USART_INT_INTENSET_DRE_Msk) && testCondition; + /* Checks for data register empty flag */ + if(testCondition) + { + SERCOM1_USART_ISR_TX_Handler(); + } + + testCondition = ((SERCOM1_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == SERCOM_USART_INT_INTFLAG_RXC_Msk); + testCondition = ((SERCOM1_REGS->USART_INT.SERCOM_INTENSET & SERCOM_USART_INT_INTENSET_RXC_Msk) == SERCOM_USART_INT_INTENSET_RXC_Msk) && testCondition; + /* Checks for receive complete empty flag */ + if(testCondition) + { + SERCOM1_USART_ISR_RX_Handler(); + } + } +} + + + + diff --git a/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom1_usart.h b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom1_usart.h new file mode 100644 index 00000000..4c2665d6 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom1_usart.h @@ -0,0 +1,121 @@ +/******************************************************************************* + SERCOM Universal Synchronous/Asynchrnous Receiver/Transmitter PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom1_usart.h + + Summary + USART peripheral library interface. + + Description + This file defines the interface to the USART peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef PLIB_SERCOM1_USART_H // Guards against multiple inclusion +#define PLIB_SERCOM1_USART_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "plib_sercom_usart_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +void SERCOM1_USART_Initialize( void ); + +bool SERCOM1_USART_SerialSetup( USART_SERIAL_SETUP * serialSetup, uint32_t clkFrequency ); + +void SERCOM1_USART_Enable( void ); + +void SERCOM1_USART_Disable( void ); + +void SERCOM1_USART_TransmitterEnable( void ); + +void SERCOM1_USART_TransmitterDisable( void ); + +bool SERCOM1_USART_Write( void *buffer, const size_t size ); + +bool SERCOM1_USART_TransmitComplete( void ); + + +bool SERCOM1_USART_WriteIsBusy( void ); + +size_t SERCOM1_USART_WriteCountGet( void ); + +void SERCOM1_USART_WriteCallbackRegister( SERCOM_USART_CALLBACK callback, uintptr_t context ); + + +void SERCOM1_USART_ReceiverEnable( void ); + +void SERCOM1_USART_ReceiverDisable( void ); + +bool SERCOM1_USART_Read( void *buffer, const size_t size ); + +bool SERCOM1_USART_ReadIsBusy( void ); + +size_t SERCOM1_USART_ReadCountGet( void ); + +bool SERCOM1_USART_ReadAbort(void); + +void SERCOM1_USART_ReadCallbackRegister( SERCOM_USART_CALLBACK callback, uintptr_t context ); + +USART_ERROR SERCOM1_USART_ErrorGet( void ); + +uint32_t SERCOM1_USART_FrequencyGet( void ); + + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END + +#endif //PLIB_SERCOM1_USART_H diff --git a/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom2_usart.c b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom2_usart.c new file mode 100644 index 00000000..50275cad --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom2_usart.c @@ -0,0 +1,454 @@ +/******************************************************************************* + SERCOM Universal Synchronous/Asynchrnous Receiver/Transmitter PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom2_usart.c + + Summary + USART peripheral library interface. + + Description + This file defines the interface to the USART peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +#include "interrupts.h" +#include "plib_sercom2_usart.h" +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data +// ***************************************************************************** +// ***************************************************************************** +/* SERCOM2 USART baud value for 115200 Hz baud rate */ +#define SERCOM2_USART_INT_BAUD_VALUE (63019UL) + + + +// ***************************************************************************** +// ***************************************************************************** +// Section: SERCOM2 USART Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +static void SERCOM2_USART_ErrorClear( void ) +{ + uint8_t u8dummyData = 0U; + USART_ERROR errorStatus = (USART_ERROR) (SERCOM2_REGS->USART_INT.SERCOM_STATUS & (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk )); + + if(errorStatus != USART_ERROR_NONE) + { + /* Clear error flag */ + SERCOM2_REGS->USART_INT.SERCOM_INTFLAG = (uint8_t)SERCOM_USART_INT_INTFLAG_ERROR_Msk; + /* Clear all errors */ + SERCOM2_REGS->USART_INT.SERCOM_STATUS = (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk); + + /* Flush existing error bytes from the RX FIFO */ + while((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & (uint8_t)SERCOM_USART_INT_INTFLAG_RXC_Msk) == (uint8_t)SERCOM_USART_INT_INTFLAG_RXC_Msk) + { + u8dummyData = (uint8_t)SERCOM2_REGS->USART_INT.SERCOM_DATA; + } + } + + /* Ignore the warning */ + (void)u8dummyData; +} + +void SERCOM2_USART_Initialize( void ) +{ + /* + * Configures USART Clock Mode + * Configures TXPO and RXPO + * Configures Data Order + * Configures Standby Mode + * Configures Sampling rate + * Configures IBON + */ + + SERCOM2_REGS->USART_INT.SERCOM_CTRLA = SERCOM_USART_INT_CTRLA_MODE_USART_INT_CLK | SERCOM_USART_INT_CTRLA_RXPO(0x3UL) | SERCOM_USART_INT_CTRLA_TXPO(0x1UL) | SERCOM_USART_INT_CTRLA_DORD_Msk | SERCOM_USART_INT_CTRLA_IBON_Msk | SERCOM_USART_INT_CTRLA_FORM(0x0UL) | SERCOM_USART_INT_CTRLA_SAMPR(0UL) ; + + /* Configure Baud Rate */ + SERCOM2_REGS->USART_INT.SERCOM_BAUD = (uint16_t)SERCOM_USART_INT_BAUD_BAUD(SERCOM2_USART_INT_BAUD_VALUE); + + /* + * Configures RXEN + * Configures TXEN + * Configures CHSIZE + * Configures Parity + * Configures Stop bits + */ + SERCOM2_REGS->USART_INT.SERCOM_CTRLB = SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT | SERCOM_USART_INT_CTRLB_SBMODE_1_BIT | SERCOM_USART_INT_CTRLB_RXEN_Msk | SERCOM_USART_INT_CTRLB_TXEN_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + + /* Enable the UART after the configurations */ + SERCOM2_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + + + + + +uint32_t SERCOM2_USART_FrequencyGet( void ) +{ + return 48000000UL; +} + +bool SERCOM2_USART_SerialSetup( USART_SERIAL_SETUP * serialSetup, uint32_t clkFrequency ) +{ + bool setupStatus = false; + uint32_t baudValue = 0U; + uint32_t sampleRate = 0U; + uint32_t sampleCount = 0U; + + if((serialSetup != NULL) && (serialSetup->baudRate != 0U)) + { + if(clkFrequency == 0U) + { + clkFrequency = SERCOM2_USART_FrequencyGet(); + } + + if(clkFrequency >= (16U * serialSetup->baudRate)) + { + sampleRate = 0U; + sampleCount = 16U; + } + else if(clkFrequency >= (8U * serialSetup->baudRate)) + { + sampleRate = 2U; + sampleCount = 8U; + } + else if(clkFrequency >= (3U * serialSetup->baudRate)) + { + sampleRate = 4U; + sampleCount = 3U; + } + else + { + /* Do nothing */ + } + baudValue = 65536U - (uint32_t)(((uint64_t)65536U * sampleCount * serialSetup->baudRate) / clkFrequency); + /* Disable the USART before configurations */ + SERCOM2_REGS->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Configure Baud Rate */ + SERCOM2_REGS->USART_INT.SERCOM_BAUD = (uint16_t)SERCOM_USART_INT_BAUD_BAUD(baudValue); + + /* Configure Parity Options */ + if(serialSetup->parity == USART_PARITY_NONE) + { + SERCOM2_REGS->USART_INT.SERCOM_CTRLA = (SERCOM2_REGS->USART_INT.SERCOM_CTRLA & ~(SERCOM_USART_INT_CTRLA_SAMPR_Msk | SERCOM_USART_INT_CTRLA_FORM_Msk)) | SERCOM_USART_INT_CTRLA_FORM(0x0UL) | SERCOM_USART_INT_CTRLA_SAMPR((uint32_t)sampleRate); + SERCOM2_REGS->USART_INT.SERCOM_CTRLB = (SERCOM2_REGS->USART_INT.SERCOM_CTRLB & ~(SERCOM_USART_INT_CTRLB_CHSIZE_Msk | SERCOM_USART_INT_CTRLB_SBMODE_Msk)) | ((uint32_t) serialSetup->dataWidth | (uint32_t) serialSetup->stopBits); + } + else + { + SERCOM2_REGS->USART_INT.SERCOM_CTRLA = (SERCOM2_REGS->USART_INT.SERCOM_CTRLA & ~(SERCOM_USART_INT_CTRLA_SAMPR_Msk | SERCOM_USART_INT_CTRLA_FORM_Msk)) | SERCOM_USART_INT_CTRLA_FORM(0x1UL) | SERCOM_USART_INT_CTRLA_SAMPR((uint32_t)sampleRate); + SERCOM2_REGS->USART_INT.SERCOM_CTRLB = (SERCOM2_REGS->USART_INT.SERCOM_CTRLB & ~(SERCOM_USART_INT_CTRLB_CHSIZE_Msk | SERCOM_USART_INT_CTRLB_SBMODE_Msk | SERCOM_USART_INT_CTRLB_PMODE_Msk)) | (uint32_t) serialSetup->dataWidth | (uint32_t) serialSetup->stopBits | (uint32_t) serialSetup->parity ; + } + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + /* Enable the USART after the configurations */ + SERCOM2_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + + setupStatus = true; + } + + return setupStatus; +} + +USART_ERROR SERCOM2_USART_ErrorGet( void ) +{ + USART_ERROR errorStatus = (USART_ERROR) (SERCOM2_REGS->USART_INT.SERCOM_STATUS & (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk )); + + if(errorStatus != USART_ERROR_NONE) + { + SERCOM2_USART_ErrorClear(); + } + + return errorStatus; +} + +void SERCOM2_USART_Enable( void ) +{ + if((SERCOM2_REGS->USART_INT.SERCOM_CTRLA & SERCOM_USART_INT_CTRLA_ENABLE_Msk) == 0U) + { + SERCOM2_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + } +} + +void SERCOM2_USART_Disable( void ) +{ + if((SERCOM2_REGS->USART_INT.SERCOM_CTRLA & SERCOM_USART_INT_CTRLA_ENABLE_Msk) != 0U) + { + SERCOM2_REGS->USART_INT.SERCOM_CTRLA &= ~SERCOM_USART_INT_CTRLA_ENABLE_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } + } +} + + +void SERCOM2_USART_TransmitterEnable( void ) +{ + SERCOM2_REGS->USART_INT.SERCOM_CTRLB |= SERCOM_USART_INT_CTRLB_TXEN_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +void SERCOM2_USART_TransmitterDisable( void ) +{ + SERCOM2_REGS->USART_INT.SERCOM_CTRLB &= ~SERCOM_USART_INT_CTRLB_TXEN_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +bool SERCOM2_USART_Write( void *buffer, const size_t size ) +{ + bool writeStatus = false; + uint8_t *pu8Data = (uint8_t*)buffer; + uint16_t *pu16Data = (uint16_t*)buffer; + uint32_t u32Index = 0U; + + if(buffer != NULL) + { + /* Blocks while buffer is being transferred */ + while(u32Index < size) + { + /* Check if USART is ready for new data */ + while((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & (uint8_t)SERCOM_USART_INT_INTFLAG_DRE_Msk) == 0U) + { + /* Do nothing */ + } + + /* Write data to USART module */ + if (((SERCOM2_REGS->USART_INT.SERCOM_CTRLB & SERCOM_USART_INT_CTRLB_CHSIZE_Msk) >> SERCOM_USART_INT_CTRLB_CHSIZE_Pos) != 0x01U) + { + /* 8-bit mode */ + SERCOM2_REGS->USART_INT.SERCOM_DATA = pu8Data[u32Index]; + } + else + { + /* 9-bit mode */ + SERCOM2_REGS->USART_INT.SERCOM_DATA = pu16Data[u32Index]; + } + + /* Increment index */ + u32Index++; + } + writeStatus = true; + } + + return writeStatus; +} + + +bool SERCOM2_USART_TransmitterIsReady( void ) +{ + bool transmitterStatus = false; + + if ((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == SERCOM_USART_INT_INTFLAG_DRE_Msk) + { + transmitterStatus = true; + } + + return transmitterStatus; +} + +void SERCOM2_USART_WriteByte( int data ) +{ + /* Check if USART is ready for new data */ + while((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_DRE_Msk) == 0U) + { + /* Do nothing */ + } + + SERCOM2_REGS->USART_INT.SERCOM_DATA = (uint16_t)data; +} + +bool SERCOM2_USART_TransmitComplete( void ) +{ + bool transmitComplete = false; + + if ((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_TXC_Msk) == SERCOM_USART_INT_INTFLAG_TXC_Msk) + { + transmitComplete = true; + } + + return transmitComplete; +} + +void SERCOM2_USART_ReceiverEnable( void ) +{ + SERCOM2_REGS->USART_INT.SERCOM_CTRLB |= SERCOM_USART_INT_CTRLB_RXEN_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +void SERCOM2_USART_ReceiverDisable( void ) +{ + SERCOM2_REGS->USART_INT.SERCOM_CTRLB &= ~SERCOM_USART_INT_CTRLB_RXEN_Msk; + + /* Wait for sync */ + while((SERCOM2_REGS->USART_INT.SERCOM_SYNCBUSY) != 0U) + { + /* Do nothing */ + } +} + +bool SERCOM2_USART_Read( void *buffer, const size_t size ) +{ + bool readStatus = false; + uint8_t* pu8Data = (uint8_t*)buffer; + uint16_t *pu16Data = (uint16_t*)buffer; + uint32_t u32Index = 0U; + USART_ERROR errorStatus = USART_ERROR_NONE; + + if(buffer != NULL) + { + + /* Clear error flags and flush out error data that may have been received when no active request was pending */ + SERCOM2_USART_ErrorClear(); + + while(u32Index < size) + { + /* Check if USART has new data */ + while((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == 0U) + { + /* Do nothing */ + } + + errorStatus = (USART_ERROR) (SERCOM2_REGS->USART_INT.SERCOM_STATUS & (uint16_t)(SERCOM_USART_INT_STATUS_PERR_Msk | SERCOM_USART_INT_STATUS_FERR_Msk | SERCOM_USART_INT_STATUS_BUFOVF_Msk)); + + if(errorStatus != USART_ERROR_NONE) + { + break; + } + + if (((SERCOM2_REGS->USART_INT.SERCOM_CTRLB & SERCOM_USART_INT_CTRLB_CHSIZE_Msk) >> SERCOM_USART_INT_CTRLB_CHSIZE_Pos) != 0x01U) + { + /* 8-bit mode */ + pu8Data[u32Index] = (uint8_t)SERCOM2_REGS->USART_INT.SERCOM_DATA; + } + else + { + /* 9-bit mode */ + pu16Data[u32Index] = (uint16_t)SERCOM2_REGS->USART_INT.SERCOM_DATA; + } + + /* Increment index */ + u32Index++; + } + + if(size == u32Index) + { + readStatus = true; + } + } + + return readStatus; +} + +bool SERCOM2_USART_ReceiverIsReady( void ) +{ + bool receiverStatus = false; + + if ((SERCOM2_REGS->USART_INT.SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_RXC_Msk) == SERCOM_USART_INT_INTFLAG_RXC_Msk) + { + receiverStatus = true; + } + + return receiverStatus; +} + +int SERCOM2_USART_ReadByte( void ) +{ + return (int)SERCOM2_REGS->USART_INT.SERCOM_DATA; +} + + + + + diff --git a/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom2_usart.h b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom2_usart.h new file mode 100644 index 00000000..c42b8cc0 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom2_usart.h @@ -0,0 +1,115 @@ +/******************************************************************************* + SERCOM Universal Synchronous/Asynchrnous Receiver/Transmitter PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom2_usart.h + + Summary + USART peripheral library interface. + + Description + This file defines the interface to the USART peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef PLIB_SERCOM2_USART_H // Guards against multiple inclusion +#define PLIB_SERCOM2_USART_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include "plib_sercom_usart_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** + +void SERCOM2_USART_Initialize( void ); + +bool SERCOM2_USART_SerialSetup( USART_SERIAL_SETUP * serialSetup, uint32_t clkFrequency ); + +void SERCOM2_USART_Enable( void ); + +void SERCOM2_USART_Disable( void ); + +void SERCOM2_USART_TransmitterEnable( void ); + +void SERCOM2_USART_TransmitterDisable( void ); + +bool SERCOM2_USART_Write( void *buffer, const size_t size ); + +bool SERCOM2_USART_TransmitComplete( void ); + + +bool SERCOM2_USART_TransmitterIsReady( void ); + +void SERCOM2_USART_WriteByte( int data ); + + +void SERCOM2_USART_ReceiverEnable( void ); + +void SERCOM2_USART_ReceiverDisable( void ); + +bool SERCOM2_USART_Read( void *buffer, const size_t size ); + +bool SERCOM2_USART_ReceiverIsReady( void ); + +int SERCOM2_USART_ReadByte( void ); + +USART_ERROR SERCOM2_USART_ErrorGet( void ); + +uint32_t SERCOM2_USART_FrequencyGet( void ); + + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END + +#endif //PLIB_SERCOM2_USART_H diff --git a/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom_usart_common.h b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom_usart_common.h new file mode 100644 index 00000000..3ed0898f --- /dev/null +++ b/Telemetry/src/config/default/peripheral/sercom/usart/plib_sercom_usart_common.h @@ -0,0 +1,405 @@ +/******************************************************************************* + SERCOM Universal Synchronous/Asynchronous Receiver/Transmitter PLIB + + Company + Microchip Technology Inc. + + File Name + plib_sercom_usart_common.h + + Summary + Data Type definition of the USART Peripheral Interface Plib. + + Description + This file defines the Data Types for the USART Plib. + + Remarks: + None. +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_SERCOM_USART_COMMON_H // Guards against multiple inclusion +#define PLIB_SERCOM_USART_COMMON_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include +#include +#include +#include "device.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section:Preprocessor macros +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* USART Error convenience macros */ +// ***************************************************************************** +// ***************************************************************************** + /* Error status when no error has occurred */ +#define USART_ERROR_NONE 0U + + /* Error status when parity error has occurred */ +#define USART_ERROR_PARITY SERCOM_USART_INT_STATUS_PERR_Msk + + /* Error status when framing error has occurred */ +#define USART_ERROR_FRAMING SERCOM_USART_INT_STATUS_FERR_Msk + + /* Error status when overrun error has occurred */ +#define USART_ERROR_OVERRUN SERCOM_USART_INT_STATUS_BUFOVF_Msk + + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* USART Errors + + Summary: + Defines the data type for the USART peripheral errors. + + Description: + This may be used to check the type of error occurred with the USART + peripheral during error status. + + Remarks: + None. +*/ + +typedef uint16_t USART_ERROR; + +// ***************************************************************************** +/* USART DATA + + Summary: + Defines the data type for the USART peripheral data. + + Description: + This may be used to check the type of data with the USART + peripheral during serial setup. + + Remarks: + None. +*/ + +typedef enum +{ + USART_DATA_5_BIT = SERCOM_USART_INT_CTRLB_CHSIZE_5_BIT, + USART_DATA_6_BIT = SERCOM_USART_INT_CTRLB_CHSIZE_6_BIT, + USART_DATA_7_BIT = SERCOM_USART_INT_CTRLB_CHSIZE_7_BIT, + USART_DATA_8_BIT = SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT, + USART_DATA_9_BIT = SERCOM_USART_INT_CTRLB_CHSIZE_9_BIT, + + + /* Force the compiler to reserve 32-bit memory for each enum */ + USART_DATA_INVALID = 0xFFFFFFFFU + +} USART_DATA; + +// ***************************************************************************** +/* USART PARITY + + Summary: + Defines the data type for the USART peripheral parity. + + Description: + This may be used to check the type of parity with the USART + peripheral during serial setup. + + Remarks: + None. +*/ + +typedef enum +{ + USART_PARITY_EVEN = SERCOM_USART_INT_CTRLB_PMODE_EVEN, + + USART_PARITY_ODD = SERCOM_USART_INT_CTRLB_PMODE_ODD, + + /* This enum is defined to set frame format only + * This value won't be written to register + */ + USART_PARITY_NONE = 0x2, + + /* Force the compiler to reserve 32-bit memory for each enum */ + USART_PARITY_INVALID = 0xFFFFFFFFU + +} USART_PARITY; + +// ***************************************************************************** +/* USART STOP + + Summary: + Defines the data type for the USART peripheral stop bits. + + Description: + This may be used to check the type of stop bits with the USART + peripheral during serial setup. + + Remarks: + None. +*/ + +typedef enum +{ + USART_STOP_0_BIT = SERCOM_USART_INT_CTRLB_SBMODE_1_BIT, + USART_STOP_1_BIT = SERCOM_USART_INT_CTRLB_SBMODE_2_BIT, + + + /* Force the compiler to reserve 32-bit memory for each enum */ + USART_STOP_INVALID = 0xFFFFFFFFU + +} USART_STOP; + +// ***************************************************************************** +/* USART LIN Command + + Summary: + Defines the data type for the USART peripheral LIN Command. + + Description: + This may be used to set the USART LIN Master mode command. + + Remarks: + None. +*/ + +typedef enum +{ + USART_LIN_MASTER_CMD_NONE = SERCOM_USART_INT_CTRLB_LINCMD_NONE, + + USART_LIN_MASTER_CMD_SOFTWARE_CONTROLLED = SERCOM_USART_INT_CTRLB_LINCMD_SOFTWARE_CONTROL_TRANSMIT_CMD, + + USART_LIN_MASTER_CMD_AUTO_TRANSMIT = SERCOM_USART_INT_CTRLB_LINCMD_AUTO_TRANSMIT_CMD + +} USART_LIN_MASTER_CMD; + +// ***************************************************************************** +/* USART Serial Configuration + + Summary: + Defines the data type for the USART serial configurations. + + Description: + This may be used to set the serial configurations for USART. + + Remarks: + None. +*/ + +typedef struct +{ + uint32_t baudRate; + + USART_PARITY parity; + + USART_DATA dataWidth; + + USART_STOP stopBits; + +} USART_SERIAL_SETUP; + +// ***************************************************************************** +/* Callback Function Pointer + + Summary: + Defines the data type and function signature for the USART peripheral + callback function. + + Description: + This data type defines the function signature for the USART peripheral + callback function. The USART peripheral will call back the client's + function with this signature when the USART buffer event has occurred. + + Remarks: + None. +*/ + +typedef void (*SERCOM_USART_CALLBACK)( uintptr_t context ); + +// ***************************************************************************** +/* SERCOM USART Object + + Summary: + Defines the data type for the data structures used for + peripheral operations. + + Description: + This may be for used for peripheral operations. + + Remarks: + None. +*/ + +typedef struct +{ + void * txBuffer; + + size_t txSize; + + size_t txProcessedSize; + + SERCOM_USART_CALLBACK txCallback; + + uintptr_t txContext; + + bool txBusyStatus; + + void * rxBuffer; + + size_t rxSize; + + size_t rxProcessedSize; + + SERCOM_USART_CALLBACK rxCallback; + + uintptr_t rxContext; + + bool rxBusyStatus; + + USART_ERROR errorStatus; + +} SERCOM_USART_OBJECT; + + +typedef enum +{ + /* Threshold number of bytes are available in the receive ring buffer */ + SERCOM_USART_EVENT_READ_THRESHOLD_REACHED = 0, + + /* Receive ring buffer is full. Application must read the data out to avoid missing data on the next RX interrupt. */ + SERCOM_USART_EVENT_READ_BUFFER_FULL, + + /* USART error. Application must call the SERCOMx_USART_ErrorGet API to get the type of error and clear the error. */ + SERCOM_USART_EVENT_READ_ERROR, + + /* Threshold number of free space is available in the transmit ring buffer */ + SERCOM_USART_EVENT_WRITE_THRESHOLD_REACHED, + + /* Recevie break signal is detected */ + SERCOM_USART_EVENT_BREAK_SIGNAL_DETECTED, +}SERCOM_USART_EVENT; + +// ***************************************************************************** +/* Callback Function Pointer + + Summary: + Defines the data type and function signature for the USART peripheral + callback function. + + Description: + This data type defines the function signature for the USART peripheral + callback function. The USART peripheral will call back the client's + function with this signature when the USART buffer event has occurred. + + Remarks: + None. +*/ + +typedef void (*SERCOM_USART_RING_BUFFER_CALLBACK)(SERCOM_USART_EVENT event, uintptr_t context ); + +// ***************************************************************************** +/* SERCOM USART Ring Buffer Object + + Summary: + Defines the data type for the data structures used for + peripheral operations. + + Description: + This may be for used for peripheral operations. + + Remarks: + None. +*/ + +typedef struct +{ + SERCOM_USART_RING_BUFFER_CALLBACK wrCallback; + + uintptr_t wrContext; + + uint32_t wrInIndex; + + uint32_t wrOutIndex; + + uint32_t wrBufferSize; + + bool isWrNotificationEnabled; + + uint32_t wrThreshold; + + bool isWrNotifyPersistently; + + SERCOM_USART_RING_BUFFER_CALLBACK rdCallback; + + uintptr_t rdContext; + + uint32_t rdInIndex; + + uint32_t rdOutIndex; + + uint32_t rdBufferSize; + + bool isRdNotificationEnabled; + + uint32_t rdThreshold; + + bool isRdNotifyPersistently; + + USART_ERROR errorStatus; + +} SERCOM_USART_RING_BUFFER_OBJECT; + +// ***************************************************************************** +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END + +#endif //PLIB_SERCOM_USART_COMMON_H diff --git a/Telemetry/src/config/default/peripheral/tc/plib_tc2.c b/Telemetry/src/config/default/peripheral/tc/plib_tc2.c new file mode 100644 index 00000000..43112022 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/tc/plib_tc2.c @@ -0,0 +1,215 @@ +/******************************************************************************* + Timer/Counter(TC2) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_tc2.c + + Summary + TC2 PLIB Implementation File. + + Description + This file defines the interface to the TC peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "interrupts.h" +#include "plib_tc2.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data +// ***************************************************************************** +// ***************************************************************************** + +static volatile TC_TIMER_CALLBACK_OBJ TC2_CallbackObject; + +// ***************************************************************************** +// ***************************************************************************** +// Section: TC2 Implementation +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Initialize the TC module in Timer mode */ +void TC2_TimerInitialize( void ) +{ + /* Reset TC */ + TC2_REGS->COUNT16.TC_CTRLA = TC_CTRLA_SWRST_Msk; + + while((TC2_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_SWRST_Msk) == TC_SYNCBUSY_SWRST_Msk) + { + /* Wait for Write Synchronization */ + } + + /* Configure counter mode & prescaler */ + TC2_REGS->COUNT16.TC_CTRLA = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV256 | TC_CTRLA_PRESCSYNC_PRESC ; + + /* Configure in Match Frequency Mode */ + TC2_REGS->COUNT16.TC_WAVE = (uint8_t)TC_WAVE_WAVEGEN_MPWM; + + /* Configure timer period */ + TC2_REGS->COUNT16.TC_CC[0U] = 37499U; + + /* Clear all interrupt flags */ + TC2_REGS->COUNT16.TC_INTFLAG = (uint8_t)TC_INTFLAG_Msk; + + TC2_CallbackObject.callback = NULL; + /* Enable interrupt*/ + TC2_REGS->COUNT16.TC_INTENSET = (uint8_t)(TC_INTENSET_OVF_Msk); + + + while((TC2_REGS->COUNT16.TC_SYNCBUSY) != 0U) + { + /* Wait for Write Synchronization */ + } +} + +/* Enable the TC counter */ +void TC2_TimerStart( void ) +{ + TC2_REGS->COUNT16.TC_CTRLA |= TC_CTRLA_ENABLE_Msk; + while((TC2_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_ENABLE_Msk) == TC_SYNCBUSY_ENABLE_Msk) + { + /* Wait for Write Synchronization */ + } +} + +/* Disable the TC counter */ +void TC2_TimerStop( void ) +{ + TC2_REGS->COUNT16.TC_CTRLA &= ~TC_CTRLA_ENABLE_Msk; + while((TC2_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_ENABLE_Msk) == TC_SYNCBUSY_ENABLE_Msk) + { + /* Wait for Write Synchronization */ + } +} + +uint32_t TC2_TimerFrequencyGet( void ) +{ + return (uint32_t)(187500U); +} + +void TC2_TimerCommandSet(TC_COMMAND command) +{ + TC2_REGS->COUNT16.TC_CTRLBSET = (uint8_t)((uint32_t)command << TC_CTRLBSET_CMD_Pos); + while((TC2_REGS->COUNT16.TC_SYNCBUSY) != 0U) + { + /* Wait for Write Synchronization */ + } +} + +/* Get the current timer counter value */ +uint16_t TC2_Timer16bitCounterGet( void ) +{ + /* Write command to force COUNT register read synchronization */ + TC2_REGS->COUNT16.TC_CTRLBSET |= (uint8_t)TC_CTRLBSET_CMD_READSYNC; + + while((TC2_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_CTRLB_Msk) == TC_SYNCBUSY_CTRLB_Msk) + { + /* Wait for Write Synchronization */ + } + + while((TC2_REGS->COUNT16.TC_CTRLBSET & TC_CTRLBSET_CMD_Msk) != 0U) + { + /* Wait for CMD to become zero */ + } + + /* Read current count value */ + return (uint16_t)TC2_REGS->COUNT16.TC_COUNT; +} + +/* Configure timer counter value */ +void TC2_Timer16bitCounterSet( uint16_t count ) +{ + TC2_REGS->COUNT16.TC_COUNT = count; + + while((TC2_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_COUNT_Msk) == TC_SYNCBUSY_COUNT_Msk) + { + /* Wait for Write Synchronization */ + } +} + +/* Configure timer period */ +void TC2_Timer16bitPeriodSet( uint16_t period ) +{ + TC2_REGS->COUNT16.TC_CC[0] = period; + while((TC2_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_CC0_Msk) == TC_SYNCBUSY_CC0_Msk) + { + /* Wait for Write Synchronization */ + } +} + +/* Read the timer period value */ +uint16_t TC2_Timer16bitPeriodGet( void ) +{ + return (uint16_t)TC2_REGS->COUNT16.TC_CC[0]; +} + + + +/* Register callback function */ +void TC2_TimerCallbackRegister( TC_TIMER_CALLBACK callback, uintptr_t context ) +{ + TC2_CallbackObject.callback = callback; + + TC2_CallbackObject.context = context; +} + +/* Timer Interrupt handler */ +void __attribute__((used)) TC2_TimerInterruptHandler( void ) +{ + if (TC2_REGS->COUNT16.TC_INTENSET != 0U) + { + TC_TIMER_STATUS status; + status = (TC_TIMER_STATUS) TC2_REGS->COUNT16.TC_INTFLAG; + /* Clear interrupt flags */ + TC2_REGS->COUNT16.TC_INTFLAG = (uint8_t)TC_INTFLAG_Msk; + if((TC2_CallbackObject.callback != NULL) && (status != TC_TIMER_STATUS_NONE)) + { + uintptr_t context = TC2_CallbackObject.context; + TC2_CallbackObject.callback(status, context); + } + } +} + diff --git a/Telemetry/src/config/default/peripheral/tc/plib_tc2.h b/Telemetry/src/config/default/peripheral/tc/plib_tc2.h new file mode 100644 index 00000000..ef4a9e90 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/tc/plib_tc2.h @@ -0,0 +1,124 @@ +/******************************************************************************* + Timer/Counter(TC2) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_tc2.h + + Summary + TC2 PLIB Header File. + + Description + This file defines the interface to the TC peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_TC2_H // Guards against multiple inclusion +#define PLIB_TC2_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "device.h" +#include "plib_tc_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** +/* The following data type definitions are used by the functions in this + interface and should be considered part it. +*/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** +/* The following functions make up the methods (set of possible operations) of + this interface. +*/ + +// ***************************************************************************** + +void TC2_TimerInitialize( void ); + +void TC2_TimerStart( void ); + +void TC2_TimerStop( void ); + +uint32_t TC2_TimerFrequencyGet( void ); + + +void TC2_Timer16bitPeriodSet( uint16_t period ); + +uint16_t TC2_Timer16bitPeriodGet( void ); + +uint16_t TC2_Timer16bitCounterGet( void ); + +void TC2_Timer16bitCounterSet( uint16_t count ); + + + + +void TC2_TimerCallbackRegister( TC_TIMER_CALLBACK callback, uintptr_t context ); + + +void TC2_TimerCommandSet(TC_COMMAND command); + + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END + +#endif /* PLIB_TC2_H */ diff --git a/Telemetry/src/config/default/peripheral/tc/plib_tc3.c b/Telemetry/src/config/default/peripheral/tc/plib_tc3.c new file mode 100644 index 00000000..5925146d --- /dev/null +++ b/Telemetry/src/config/default/peripheral/tc/plib_tc3.c @@ -0,0 +1,215 @@ +/******************************************************************************* + Timer/Counter(TC3) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_tc3.c + + Summary + TC3 PLIB Implementation File. + + Description + This file defines the interface to the TC peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "interrupts.h" +#include "plib_tc3.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Global Data +// ***************************************************************************** +// ***************************************************************************** + +static volatile TC_TIMER_CALLBACK_OBJ TC3_CallbackObject; + +// ***************************************************************************** +// ***************************************************************************** +// Section: TC3 Implementation +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Initialize the TC module in Timer mode */ +void TC3_TimerInitialize( void ) +{ + /* Reset TC */ + TC3_REGS->COUNT16.TC_CTRLA = TC_CTRLA_SWRST_Msk; + + while((TC3_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_SWRST_Msk) == TC_SYNCBUSY_SWRST_Msk) + { + /* Wait for Write Synchronization */ + } + + /* Configure counter mode & prescaler */ + TC3_REGS->COUNT16.TC_CTRLA = TC_CTRLA_MODE_COUNT16 | TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_PRESCSYNC_PRESC ; + + /* Configure in Match Frequency Mode */ + TC3_REGS->COUNT16.TC_WAVE = (uint8_t)TC_WAVE_WAVEGEN_MPWM; + + /* Configure timer period */ + TC3_REGS->COUNT16.TC_CC[0U] = 47999U; + + /* Clear all interrupt flags */ + TC3_REGS->COUNT16.TC_INTFLAG = (uint8_t)TC_INTFLAG_Msk; + + TC3_CallbackObject.callback = NULL; + /* Enable interrupt*/ + TC3_REGS->COUNT16.TC_INTENSET = (uint8_t)(TC_INTENSET_OVF_Msk); + + + while((TC3_REGS->COUNT16.TC_SYNCBUSY) != 0U) + { + /* Wait for Write Synchronization */ + } +} + +/* Enable the TC counter */ +void TC3_TimerStart( void ) +{ + TC3_REGS->COUNT16.TC_CTRLA |= TC_CTRLA_ENABLE_Msk; + while((TC3_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_ENABLE_Msk) == TC_SYNCBUSY_ENABLE_Msk) + { + /* Wait for Write Synchronization */ + } +} + +/* Disable the TC counter */ +void TC3_TimerStop( void ) +{ + TC3_REGS->COUNT16.TC_CTRLA &= ~TC_CTRLA_ENABLE_Msk; + while((TC3_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_ENABLE_Msk) == TC_SYNCBUSY_ENABLE_Msk) + { + /* Wait for Write Synchronization */ + } +} + +uint32_t TC3_TimerFrequencyGet( void ) +{ + return (uint32_t)(48000000U); +} + +void TC3_TimerCommandSet(TC_COMMAND command) +{ + TC3_REGS->COUNT16.TC_CTRLBSET = (uint8_t)((uint32_t)command << TC_CTRLBSET_CMD_Pos); + while((TC3_REGS->COUNT16.TC_SYNCBUSY) != 0U) + { + /* Wait for Write Synchronization */ + } +} + +/* Get the current timer counter value */ +uint16_t TC3_Timer16bitCounterGet( void ) +{ + /* Write command to force COUNT register read synchronization */ + TC3_REGS->COUNT16.TC_CTRLBSET |= (uint8_t)TC_CTRLBSET_CMD_READSYNC; + + while((TC3_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_CTRLB_Msk) == TC_SYNCBUSY_CTRLB_Msk) + { + /* Wait for Write Synchronization */ + } + + while((TC3_REGS->COUNT16.TC_CTRLBSET & TC_CTRLBSET_CMD_Msk) != 0U) + { + /* Wait for CMD to become zero */ + } + + /* Read current count value */ + return (uint16_t)TC3_REGS->COUNT16.TC_COUNT; +} + +/* Configure timer counter value */ +void TC3_Timer16bitCounterSet( uint16_t count ) +{ + TC3_REGS->COUNT16.TC_COUNT = count; + + while((TC3_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_COUNT_Msk) == TC_SYNCBUSY_COUNT_Msk) + { + /* Wait for Write Synchronization */ + } +} + +/* Configure timer period */ +void TC3_Timer16bitPeriodSet( uint16_t period ) +{ + TC3_REGS->COUNT16.TC_CC[0] = period; + while((TC3_REGS->COUNT16.TC_SYNCBUSY & TC_SYNCBUSY_CC0_Msk) == TC_SYNCBUSY_CC0_Msk) + { + /* Wait for Write Synchronization */ + } +} + +/* Read the timer period value */ +uint16_t TC3_Timer16bitPeriodGet( void ) +{ + return (uint16_t)TC3_REGS->COUNT16.TC_CC[0]; +} + + + +/* Register callback function */ +void TC3_TimerCallbackRegister( TC_TIMER_CALLBACK callback, uintptr_t context ) +{ + TC3_CallbackObject.callback = callback; + + TC3_CallbackObject.context = context; +} + +/* Timer Interrupt handler */ +void __attribute__((used)) TC3_TimerInterruptHandler( void ) +{ + if (TC3_REGS->COUNT16.TC_INTENSET != 0U) + { + TC_TIMER_STATUS status; + status = (TC_TIMER_STATUS) TC3_REGS->COUNT16.TC_INTFLAG; + /* Clear interrupt flags */ + TC3_REGS->COUNT16.TC_INTFLAG = (uint8_t)TC_INTFLAG_Msk; + if((TC3_CallbackObject.callback != NULL) && (status != TC_TIMER_STATUS_NONE)) + { + uintptr_t context = TC3_CallbackObject.context; + TC3_CallbackObject.callback(status, context); + } + } +} + diff --git a/Telemetry/src/config/default/peripheral/tc/plib_tc3.h b/Telemetry/src/config/default/peripheral/tc/plib_tc3.h new file mode 100644 index 00000000..8a186fac --- /dev/null +++ b/Telemetry/src/config/default/peripheral/tc/plib_tc3.h @@ -0,0 +1,124 @@ +/******************************************************************************* + Timer/Counter(TC3) PLIB + + Company + Microchip Technology Inc. + + File Name + plib_tc3.h + + Summary + TC3 PLIB Header File. + + Description + This file defines the interface to the TC peripheral library. This + library provides access to and control of the associated peripheral + instance. + + Remarks: + None. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_TC3_H // Guards against multiple inclusion +#define PLIB_TC3_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include "device.h" +#include "plib_tc_common.h" + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** +/* The following data type definitions are used by the functions in this + interface and should be considered part it. +*/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Interface Routines +// ***************************************************************************** +// ***************************************************************************** +/* The following functions make up the methods (set of possible operations) of + this interface. +*/ + +// ***************************************************************************** + +void TC3_TimerInitialize( void ); + +void TC3_TimerStart( void ); + +void TC3_TimerStop( void ); + +uint32_t TC3_TimerFrequencyGet( void ); + + +void TC3_Timer16bitPeriodSet( uint16_t period ); + +uint16_t TC3_Timer16bitPeriodGet( void ); + +uint16_t TC3_Timer16bitCounterGet( void ); + +void TC3_Timer16bitCounterSet( uint16_t count ); + + + + +void TC3_TimerCallbackRegister( TC_TIMER_CALLBACK callback, uintptr_t context ); + + +void TC3_TimerCommandSet(TC_COMMAND command); + + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END + +#endif /* PLIB_TC3_H */ diff --git a/Telemetry/src/config/default/peripheral/tc/plib_tc_common.h b/Telemetry/src/config/default/peripheral/tc/plib_tc_common.h new file mode 100644 index 00000000..fb7784c1 --- /dev/null +++ b/Telemetry/src/config/default/peripheral/tc/plib_tc_common.h @@ -0,0 +1,193 @@ +/******************************************************************************* + Timer/Counter(TC) Peripheral Library Interface Header File + + Company + Microchip Technology Inc. + + File Name + plib_tc_common.h + + Summary + TC peripheral library interface. + + Description + This file defines the interface to the TC peripheral library. This + library provides access to and control of the associated peripheral + instance. + +*******************************************************************************/ + +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#ifndef PLIB_TC_COMMON_H // Guards against multiple inclusion +#define PLIB_TC_COMMON_H + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** +/* This section lists the other files that are included in this file. +*/ + +#include +#include + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + extern "C" { + +#endif +// DOM-IGNORE-END +// ***************************************************************************** +// ***************************************************************************** +// Section:Preprocessor macros +// ***************************************************************************** +// ***************************************************************************** +// ***************************************************************************** + +// ***************************************************************************** +/* Convenience macros for TC capture status */ +// ***************************************************************************** + +#define TC_CAPTURE_STATUS_NONE 0U + +/* Capture status overflow */ +#define TC_CAPTURE_STATUS_OVERFLOW TC_INTFLAG_OVF_Msk + +/* Capture status error */ +#define TC_CAPTURE_STATUS_ERROR TC_INTFLAG_ERR_Msk + +/* Capture status ready for channel 0 */ +#define TC_CAPTURE_STATUS_CAPTURE0_READY TC_INTFLAG_MC0_Msk + +/* Capture status ready for channel 1 */ +#define TC_CAPTURE_STATUS_CAPTURE1_READY TC_INTFLAG_MC1_Msk + +#define TC_CAPTURE_STATUS_MSK (TC_CAPTURE_STATUS_OVERFLOW | TC_CAPTURE_STATUS_ERROR | TC_CAPTURE_STATUS_CAPTURE0_READY | TC_CAPTURE_STATUS_CAPTURE1_READY) + +/* Invalid compare status */ +#define TC_CAPTURE_STATUS_INVALID 0xFFFFFFFFU + +// ***************************************************************************** +/* Convenience macros for TC compare status */ +// ***************************************************************************** + +#define TC_COMPARE_STATUS_NONE 0U +/* overflow */ +#define TC_COMPARE_STATUS_OVERFLOW TC_INTFLAG_OVF_Msk +/* match compare 0 */ +#define TC_COMPARE_STATUS_MATCH0 TC_INTFLAG_MC0_Msk +/* match compare 1 */ +#define TC_COMPARE_STATUS_MATCH1 TC_INTFLAG_MC1_Msk + +#define TC_COMPARE_STATUS_MSK (TC_COMPARE_STATUS_OVERFLOW | TC_COMPARE_STATUS_MATCH0 | TC_COMPARE_STATUS_MATCH1) + +/* Invalid capture status */ +#define TC_COMPARE_STATUS_INVALID 0xFFFFFFFFU + +// ***************************************************************************** +/* Convenience macros for TC timer status */ +// ***************************************************************************** + +#define TC_TIMER_STATUS_NONE 0U +/* overflow */ +#define TC_TIMER_STATUS_OVERFLOW TC_INTFLAG_OVF_Msk + +/* match compare 1 */ +#define TC_TIMER_STATUS_MATCH1 TC_INTFLAG_MC1_Msk + +#define TC_TIMER_STATUS_MSK (TC_TIMER_STATUS_OVERFLOW | TC_TIMER_STATUS_MATCH1) + +/* Invalid timer status */ +#define TC_TIMER_STATUS_INVALID 0xFFFFFFFFU + +// ***************************************************************************** +// ***************************************************************************** +// Section: Data Types +// ***************************************************************************** +// ***************************************************************************** +/* The following data type definitions are used by the functions in this + interface and should be considered part it. +*/ + +// ***************************************************************************** + +typedef uint32_t TC_CAPTURE_STATUS; + +typedef uint32_t TC_COMPARE_STATUS; + +typedef uint32_t TC_TIMER_STATUS; + +typedef enum +{ + TC_COMMAND_NONE, + TC_COMMAND_START_RETRIGGER, + TC_COMMAND_STOP, + TC_COMMAND_FORCE_UPDATE, + TC_COMMAND_READ_SYNC +}TC_COMMAND; + +// ***************************************************************************** + +typedef void (*TC_TIMER_CALLBACK) (TC_TIMER_STATUS status, uintptr_t context); + +typedef void (*TC_COMPARE_CALLBACK) (TC_COMPARE_STATUS status, uintptr_t context); + +typedef void (*TC_CAPTURE_CALLBACK) (TC_CAPTURE_STATUS status, uintptr_t context); + +// ***************************************************************************** +typedef struct +{ + TC_TIMER_CALLBACK callback; + + uintptr_t context; + +} TC_TIMER_CALLBACK_OBJ; + +typedef struct +{ + TC_COMPARE_CALLBACK callback; + uintptr_t context; +}TC_COMPARE_CALLBACK_OBJ; + +typedef struct +{ + TC_CAPTURE_CALLBACK callback; + uintptr_t context; +}TC_CAPTURE_CALLBACK_OBJ; + + +// DOM-IGNORE-BEGIN +#ifdef __cplusplus // Provide C++ Compatibility + + } + +#endif +// DOM-IGNORE-END + +#endif /* PLIB_TC_COMMON_H */ diff --git a/Telemetry/src/config/default/startup_xc32.c b/Telemetry/src/config/default/startup_xc32.c new file mode 100644 index 00000000..f6e98009 --- /dev/null +++ b/Telemetry/src/config/default/startup_xc32.c @@ -0,0 +1,145 @@ +// DOM-IGNORE-BEGIN +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +// DOM-IGNORE-END + +#include +#include +#include +#include "device.h" +#include "interrupts.h" + +/* + * The MPLAB X Simulator does not yet support simulation of programming the + * GPNVM bits yet. We can remove this once it supports the FRDY bit. + */ + /* MISRAC 2012 deviation block start */ +/* MISRA C-2012 Rule 21.1 deviated 1 time. Deviation record ID - H3_MISRAC_2012_R_21_1_DR_1 */ +#ifdef __MPLAB_DEBUGGER_SIMULATOR +#define __XC32_SKIP_STARTUP_GPNVM_WAIT +#endif +/* MISRAC 2012 deviation block end */ + +/* + * This startup code relies on features that are specific to the MPLAB XC32 + * toolchain. Do not use it with other toolchains. + */ +#ifndef __XC32 +#warning This startup code is intended for use with the MPLAB XC32 Compiler only. +#endif + +/* MISRAC 2012 deviation block start */ +/* MISRA C-2012 Rule 21.2 deviated 5 times. Deviation record ID - H3_MISRAC_2012_R_21_2_DR_1 */ +/* MISRA C-2012 Rule 8.6 deviated 6 times. Deviation record ID - H3_MISRAC_2012_R_8_6_DR_1 */ + +/* array initialization function */ +extern void __attribute__((long_call)) __libc_init_array(void); + +/* Optional application-provided functions */ +extern void __attribute__((weak,long_call, alias("Dummy_App_Func"))) _on_reset(void); +extern void __attribute__((weak,long_call, alias("Dummy_App_Func"))) _on_bootstrap(void); + +/* Reserved for use by the MPLAB XC32 Compiler */ +extern void __attribute__((weak,long_call, alias("Dummy_App_Func"))) __xc32_on_reset(void); +extern void __attribute__((weak,long_call, alias("Dummy_App_Func"))) __xc32_on_bootstrap(void); + +/* Linker defined variables */ +extern uint32_t __svectors; +#if defined (__REINIT_STACK_POINTER) +extern uint32_t _stack; +#endif + +/* MISRAC 2012 deviation block end */ + + +extern int main(void); + + + +/* Brief default application function used as a weak reference */ +extern void Dummy_App_Func(void); +void __attribute__((optimize("-O1"),long_call))Dummy_App_Func(void) +{ + /* Do nothing */ + return; +} + +/** + * \brief This is the code that gets called on processor reset. + * To initialize the device, and call the main() routine. + */ +void __attribute__((optimize("-O1"), section(".text.Reset_Handler"), long_call, noreturn)) Reset_Handler(void) +{ +#ifdef SCB_VTOR_TBLOFF_Msk + uint32_t *pSrc; +#endif + +#if defined (__REINIT_STACK_POINTER) + /* Initialize SP from linker-defined _stack symbol. */ + __set_MSP((uint32_t)&_stack); + +#ifdef SCB_VTOR_TBLOFF_Msk + /* Buy stack for locals */ + __asm__ volatile ("sub sp, sp, #8" : : : "sp"); +#endif + __asm__ volatile ("add r7, sp, #0" : : : "r7"); +#endif + + /* Call the optional application-provided _on_reset() function. */ + _on_reset(); + + /* Reserved for use by MPLAB XC32. */ + __xc32_on_reset(); + + /* Initialize data after TCM is enabled. + * Data initialization from the XC32 .dinit template */ + __pic32c_data_initialization(); + + +# ifdef SCB_VTOR_TBLOFF_Msk + /* Set the vector-table base address in FLASH */ + pSrc = (uint32_t *) & __svectors; + SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk); +# endif /* SCB_VTOR_TBLOFF_Msk */ + + /* Initialize the C library */ + __libc_init_array(); + + /* Call the optional application-provided _on_bootstrap() function. */ + _on_bootstrap(); + + /* Reserved for use by MPLAB XC32. */ + __xc32_on_bootstrap(); + + /* Branch to application's main function */ + (void)main(); + +#if (defined(__DEBUG) || defined(__DEBUG_D)) && defined(__XC32) + __builtin_software_breakpoint(); +#endif + + while (true) + { + /* Infinite loop */ + } +} diff --git a/Telemetry/src/config/default/stdio/xc32_monitor.c b/Telemetry/src/config/default/stdio/xc32_monitor.c new file mode 100644 index 00000000..52e6b73b --- /dev/null +++ b/Telemetry/src/config/default/stdio/xc32_monitor.c @@ -0,0 +1,73 @@ +/******************************************************************************* + Debug Console Source file + + Company: + Microchip Technology Inc. + + File Name: + xc32_monitor.c + + Summary: + debug console Source File + + Description: + None + +*******************************************************************************/ + +/******************************************************************************* +* Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ +#include +#include "definitions.h" + +extern int read(int handle, void *buffer, unsigned int len); +extern int write(int handle, void * buffer, size_t count); + + +int read(int handle, void *buffer, unsigned int len) +{ + int nChars = 0; + bool success = false; + if ((handle == 0) && (len > 0U)) + { + do + { + success = SERCOM2_USART_Read(buffer, 1); + }while( !success); + nChars = 1; + } + return nChars; +} + +int write(int handle, void * buffer, size_t count) +{ + bool success = false; + if (handle == 1) + { + do + { + success = SERCOM2_USART_Write(buffer, count); + }while( !success); + } + return (int)count; +} \ No newline at end of file diff --git a/Telemetry/src/config/default/toolchain_specifics.h b/Telemetry/src/config/default/toolchain_specifics.h new file mode 100644 index 00000000..dee28ff7 --- /dev/null +++ b/Telemetry/src/config/default/toolchain_specifics.h @@ -0,0 +1,61 @@ +/******************************************************************************* +* Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries. +* +* Subject to your compliance with these terms, you may use Microchip software +* and any derivatives exclusively with Microchip products. It is your +* responsibility to comply with third party license terms applicable to your +* use of third party software (including open source software) that may +* accompany Microchip software. +* +* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER +* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED +* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A +* PARTICULAR PURPOSE. +* +* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, +* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND +* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS +* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE +* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN +* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, +* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. +*******************************************************************************/ + +#ifndef TOOLCHAIN_SPECIFICS_H +#define TOOLCHAIN_SPECIFICS_H + +#ifdef __cplusplus // Provide C++ Compatibility +extern "C" { +#endif + +#pragma GCC diagnostic push +#ifndef __cplusplus + #pragma GCC diagnostic ignored "-Wnested-externs" +#endif +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wattributes" +#pragma GCC diagnostic ignored "-Wundef" +#include "cmsis_compiler.h" +#pragma GCC diagnostic pop + +#include + +#define NO_INIT __attribute__((section(".no_init"))) +#define SECTION(a) __attribute__((__section__(a))) + +#define CACHE_LINE_SIZE (4u) +#define CACHE_ALIGN + +#define CACHE_ALIGNED_SIZE_GET(size) ((size) + ((((size) % (CACHE_LINE_SIZE))!= 0U)? ((CACHE_LINE_SIZE) - ((size) % (CACHE_LINE_SIZE))) : (0U))) + +#ifndef FORMAT_ATTRIBUTE + #define FORMAT_ATTRIBUTE(archetype, string_index, first_to_check) __attribute__ ((format (archetype, string_index, first_to_check))) +#endif + + +#ifdef __cplusplus +} +#endif + +#endif // end of header + diff --git a/Telemetry/src/main.c b/Telemetry/src/main.c new file mode 100644 index 00000000..a1db78b4 --- /dev/null +++ b/Telemetry/src/main.c @@ -0,0 +1,111 @@ +/******************************************************************************* + Main Source File + + Company: + Microchip Technology Inc. + + File Name: + main.c + + Summary: + This file contains the "main" function for a project. + + Description: + This file contains the "main" function for a project. The + "main" function calls the "SYS_Initialize" function to initialize the state + machines of all modules in the system + *******************************************************************************/ + +// ***************************************************************************** +// ***************************************************************************** +// Section: Included Files +// ***************************************************************************** +// ***************************************************************************** + +#include // Defines true +#include // Defines NULL +#include // Defines EXIT_FAILURE +#include "definitions.h" // SYS function prototypes + +#include "leak_sensor_eic.h" +#include "led_facade.h" +#include "pressure_calc.h" +#include "wsen_pads_port_sercom3.h" + +// ***************************************************************************** +// ***************************************************************************** +// Section: Main Entry Point +// ***************************************************************************** +// ***************************************************************************** + +int main(void) { + // system init... + led_init(); // calls ws_led_sercom5_init_2p4mhz(), + // ws2812enc_init(), and bind() + + led_set(0, 0x00, 0x10, 0x00); + led_commit_async(); + + spi_init(); + wsen_init(); + drdy_init(); + leak_sensor_init(); + + struct leak_det leak_detector; + leakdet_init(&leak_detector, NULL); + + float pressure = 0.0f; // kPa + float temp = 0.0f; // °C + float pressure_sum = 0.0f; + float temp_sum = 0.0f; + uint32_t samples = 0; + + timing_tc2_init_5hz(); + + while (1) { + if (!led_busy()) { + // update again if needed + } + + wsen_cycle_tick(); + if (wsen_cycle_done_ok(&pressure, &temp)) { + wsen_reset(); + + pressure_sum += pressure; + temp_sum += temp; + samples++; + } else { + wsen_reset(); + } + if (leakdet_tick) { + leakdet_tick = false; + + float pressure_avg = pressure, temp_avg = temp; + if (samples > 0) { + pressure_avg = pressure_sum / samples; + temp_avg = temp_sum / samples; + } + pressure_sum = 0.0f; + temp_sum = 0.0f; + samples = 0; + + bool fast = false, slow = false; + leakdet_update(&leak_detector, pressure_avg, temp_avg, &fast, + &slow); + + if (fast) { + // TODO: handle fast leak + } + if (slow) { + // TODO: handle slow leak + } + } + /* Execution should not come here during normal operation */ + + return (EXIT_FAILURE); + } +} + +/******************************************************************************* + End of File +*/ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/ac.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/ac.h new file mode 100644 index 00000000..ef200497 --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/ac.h @@ -0,0 +1,490 @@ +/* + * Component description for AC + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_AC_COMPONENT_H_ +#define _SAMC21_AC_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR AC */ +/* ************************************************************************** */ + +/* -------- AC_CTRLA : (AC Offset: 0x00) (R/W 8) Control A -------- */ +#define AC_CTRLA_RESETVALUE _UINT8_(0x00) /* (AC_CTRLA) Control A Reset Value */ + +#define AC_CTRLA_SWRST_Pos _UINT8_(0) /* (AC_CTRLA) Software Reset Position */ +#define AC_CTRLA_SWRST_Msk (_UINT8_(0x1) << AC_CTRLA_SWRST_Pos) /* (AC_CTRLA) Software Reset Mask */ +#define AC_CTRLA_SWRST(value) (AC_CTRLA_SWRST_Msk & (_UINT8_(value) << AC_CTRLA_SWRST_Pos)) /* Assigment of value for SWRST in the AC_CTRLA register */ +#define AC_CTRLA_ENABLE_Pos _UINT8_(1) /* (AC_CTRLA) Enable Position */ +#define AC_CTRLA_ENABLE_Msk (_UINT8_(0x1) << AC_CTRLA_ENABLE_Pos) /* (AC_CTRLA) Enable Mask */ +#define AC_CTRLA_ENABLE(value) (AC_CTRLA_ENABLE_Msk & (_UINT8_(value) << AC_CTRLA_ENABLE_Pos)) /* Assigment of value for ENABLE in the AC_CTRLA register */ +#define AC_CTRLA_Msk _UINT8_(0x03) /* (AC_CTRLA) Register Mask */ + + +/* -------- AC_CTRLB : (AC Offset: 0x01) ( /W 8) Control B -------- */ +#define AC_CTRLB_RESETVALUE _UINT8_(0x00) /* (AC_CTRLB) Control B Reset Value */ + +#define AC_CTRLB_START0_Pos _UINT8_(0) /* (AC_CTRLB) Comparator 0 Start Comparison Position */ +#define AC_CTRLB_START0_Msk (_UINT8_(0x1) << AC_CTRLB_START0_Pos) /* (AC_CTRLB) Comparator 0 Start Comparison Mask */ +#define AC_CTRLB_START0(value) (AC_CTRLB_START0_Msk & (_UINT8_(value) << AC_CTRLB_START0_Pos)) /* Assigment of value for START0 in the AC_CTRLB register */ +#define AC_CTRLB_START1_Pos _UINT8_(1) /* (AC_CTRLB) Comparator 1 Start Comparison Position */ +#define AC_CTRLB_START1_Msk (_UINT8_(0x1) << AC_CTRLB_START1_Pos) /* (AC_CTRLB) Comparator 1 Start Comparison Mask */ +#define AC_CTRLB_START1(value) (AC_CTRLB_START1_Msk & (_UINT8_(value) << AC_CTRLB_START1_Pos)) /* Assigment of value for START1 in the AC_CTRLB register */ +#define AC_CTRLB_START2_Pos _UINT8_(2) /* (AC_CTRLB) Comparator 2 Start Comparison Position */ +#define AC_CTRLB_START2_Msk (_UINT8_(0x1) << AC_CTRLB_START2_Pos) /* (AC_CTRLB) Comparator 2 Start Comparison Mask */ +#define AC_CTRLB_START2(value) (AC_CTRLB_START2_Msk & (_UINT8_(value) << AC_CTRLB_START2_Pos)) /* Assigment of value for START2 in the AC_CTRLB register */ +#define AC_CTRLB_START3_Pos _UINT8_(3) /* (AC_CTRLB) Comparator 3 Start Comparison Position */ +#define AC_CTRLB_START3_Msk (_UINT8_(0x1) << AC_CTRLB_START3_Pos) /* (AC_CTRLB) Comparator 3 Start Comparison Mask */ +#define AC_CTRLB_START3(value) (AC_CTRLB_START3_Msk & (_UINT8_(value) << AC_CTRLB_START3_Pos)) /* Assigment of value for START3 in the AC_CTRLB register */ +#define AC_CTRLB_Msk _UINT8_(0x0F) /* (AC_CTRLB) Register Mask */ + +#define AC_CTRLB_START_Pos _UINT8_(0) /* (AC_CTRLB Position) Comparator 3 Start Comparison */ +#define AC_CTRLB_START_Msk (_UINT8_(0xF) << AC_CTRLB_START_Pos) /* (AC_CTRLB Mask) START */ +#define AC_CTRLB_START(value) (AC_CTRLB_START_Msk & (_UINT8_(value) << AC_CTRLB_START_Pos)) + +/* -------- AC_EVCTRL : (AC Offset: 0x02) (R/W 16) Event Control -------- */ +#define AC_EVCTRL_RESETVALUE _UINT16_(0x00) /* (AC_EVCTRL) Event Control Reset Value */ + +#define AC_EVCTRL_COMPEO0_Pos _UINT16_(0) /* (AC_EVCTRL) Comparator 0 Event Output Enable Position */ +#define AC_EVCTRL_COMPEO0_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEO0_Pos) /* (AC_EVCTRL) Comparator 0 Event Output Enable Mask */ +#define AC_EVCTRL_COMPEO0(value) (AC_EVCTRL_COMPEO0_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEO0_Pos)) /* Assigment of value for COMPEO0 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEO1_Pos _UINT16_(1) /* (AC_EVCTRL) Comparator 1 Event Output Enable Position */ +#define AC_EVCTRL_COMPEO1_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEO1_Pos) /* (AC_EVCTRL) Comparator 1 Event Output Enable Mask */ +#define AC_EVCTRL_COMPEO1(value) (AC_EVCTRL_COMPEO1_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEO1_Pos)) /* Assigment of value for COMPEO1 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEO2_Pos _UINT16_(2) /* (AC_EVCTRL) Comparator 2 Event Output Enable Position */ +#define AC_EVCTRL_COMPEO2_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEO2_Pos) /* (AC_EVCTRL) Comparator 2 Event Output Enable Mask */ +#define AC_EVCTRL_COMPEO2(value) (AC_EVCTRL_COMPEO2_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEO2_Pos)) /* Assigment of value for COMPEO2 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEO3_Pos _UINT16_(3) /* (AC_EVCTRL) Comparator 3 Event Output Enable Position */ +#define AC_EVCTRL_COMPEO3_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEO3_Pos) /* (AC_EVCTRL) Comparator 3 Event Output Enable Mask */ +#define AC_EVCTRL_COMPEO3(value) (AC_EVCTRL_COMPEO3_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEO3_Pos)) /* Assigment of value for COMPEO3 in the AC_EVCTRL register */ +#define AC_EVCTRL_WINEO0_Pos _UINT16_(4) /* (AC_EVCTRL) Window 0 Event Output Enable Position */ +#define AC_EVCTRL_WINEO0_Msk (_UINT16_(0x1) << AC_EVCTRL_WINEO0_Pos) /* (AC_EVCTRL) Window 0 Event Output Enable Mask */ +#define AC_EVCTRL_WINEO0(value) (AC_EVCTRL_WINEO0_Msk & (_UINT16_(value) << AC_EVCTRL_WINEO0_Pos)) /* Assigment of value for WINEO0 in the AC_EVCTRL register */ +#define AC_EVCTRL_WINEO1_Pos _UINT16_(5) /* (AC_EVCTRL) Window 1 Event Output Enable Position */ +#define AC_EVCTRL_WINEO1_Msk (_UINT16_(0x1) << AC_EVCTRL_WINEO1_Pos) /* (AC_EVCTRL) Window 1 Event Output Enable Mask */ +#define AC_EVCTRL_WINEO1(value) (AC_EVCTRL_WINEO1_Msk & (_UINT16_(value) << AC_EVCTRL_WINEO1_Pos)) /* Assigment of value for WINEO1 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEI0_Pos _UINT16_(8) /* (AC_EVCTRL) Comparator 0 Event Input Enable Position */ +#define AC_EVCTRL_COMPEI0_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEI0_Pos) /* (AC_EVCTRL) Comparator 0 Event Input Enable Mask */ +#define AC_EVCTRL_COMPEI0(value) (AC_EVCTRL_COMPEI0_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEI0_Pos)) /* Assigment of value for COMPEI0 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEI1_Pos _UINT16_(9) /* (AC_EVCTRL) Comparator 1 Event Input Enable Position */ +#define AC_EVCTRL_COMPEI1_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEI1_Pos) /* (AC_EVCTRL) Comparator 1 Event Input Enable Mask */ +#define AC_EVCTRL_COMPEI1(value) (AC_EVCTRL_COMPEI1_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEI1_Pos)) /* Assigment of value for COMPEI1 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEI2_Pos _UINT16_(10) /* (AC_EVCTRL) Comparator 2 Event Input Enable Position */ +#define AC_EVCTRL_COMPEI2_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEI2_Pos) /* (AC_EVCTRL) Comparator 2 Event Input Enable Mask */ +#define AC_EVCTRL_COMPEI2(value) (AC_EVCTRL_COMPEI2_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEI2_Pos)) /* Assigment of value for COMPEI2 in the AC_EVCTRL register */ +#define AC_EVCTRL_COMPEI3_Pos _UINT16_(11) /* (AC_EVCTRL) Comparator 3 Event Input Enable Position */ +#define AC_EVCTRL_COMPEI3_Msk (_UINT16_(0x1) << AC_EVCTRL_COMPEI3_Pos) /* (AC_EVCTRL) Comparator 3 Event Input Enable Mask */ +#define AC_EVCTRL_COMPEI3(value) (AC_EVCTRL_COMPEI3_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEI3_Pos)) /* Assigment of value for COMPEI3 in the AC_EVCTRL register */ +#define AC_EVCTRL_INVEI0_Pos _UINT16_(12) /* (AC_EVCTRL) Comparator 0 Input Event Invert Enable Position */ +#define AC_EVCTRL_INVEI0_Msk (_UINT16_(0x1) << AC_EVCTRL_INVEI0_Pos) /* (AC_EVCTRL) Comparator 0 Input Event Invert Enable Mask */ +#define AC_EVCTRL_INVEI0(value) (AC_EVCTRL_INVEI0_Msk & (_UINT16_(value) << AC_EVCTRL_INVEI0_Pos)) /* Assigment of value for INVEI0 in the AC_EVCTRL register */ +#define AC_EVCTRL_INVEI1_Pos _UINT16_(13) /* (AC_EVCTRL) Comparator 1 Input Event Invert Enable Position */ +#define AC_EVCTRL_INVEI1_Msk (_UINT16_(0x1) << AC_EVCTRL_INVEI1_Pos) /* (AC_EVCTRL) Comparator 1 Input Event Invert Enable Mask */ +#define AC_EVCTRL_INVEI1(value) (AC_EVCTRL_INVEI1_Msk & (_UINT16_(value) << AC_EVCTRL_INVEI1_Pos)) /* Assigment of value for INVEI1 in the AC_EVCTRL register */ +#define AC_EVCTRL_INVEI2_Pos _UINT16_(14) /* (AC_EVCTRL) Comparator 2 Input Event Invert Enable Position */ +#define AC_EVCTRL_INVEI2_Msk (_UINT16_(0x1) << AC_EVCTRL_INVEI2_Pos) /* (AC_EVCTRL) Comparator 2 Input Event Invert Enable Mask */ +#define AC_EVCTRL_INVEI2(value) (AC_EVCTRL_INVEI2_Msk & (_UINT16_(value) << AC_EVCTRL_INVEI2_Pos)) /* Assigment of value for INVEI2 in the AC_EVCTRL register */ +#define AC_EVCTRL_INVEI3_Pos _UINT16_(15) /* (AC_EVCTRL) Comparator 3 Input Event Invert Enable Position */ +#define AC_EVCTRL_INVEI3_Msk (_UINT16_(0x1) << AC_EVCTRL_INVEI3_Pos) /* (AC_EVCTRL) Comparator 3 Input Event Invert Enable Mask */ +#define AC_EVCTRL_INVEI3(value) (AC_EVCTRL_INVEI3_Msk & (_UINT16_(value) << AC_EVCTRL_INVEI3_Pos)) /* Assigment of value for INVEI3 in the AC_EVCTRL register */ +#define AC_EVCTRL_Msk _UINT16_(0xFF3F) /* (AC_EVCTRL) Register Mask */ + +#define AC_EVCTRL_COMPEO_Pos _UINT16_(0) /* (AC_EVCTRL Position) Comparator x Event Output Enable */ +#define AC_EVCTRL_COMPEO_Msk (_UINT16_(0xF) << AC_EVCTRL_COMPEO_Pos) /* (AC_EVCTRL Mask) COMPEO */ +#define AC_EVCTRL_COMPEO(value) (AC_EVCTRL_COMPEO_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEO_Pos)) +#define AC_EVCTRL_WINEO_Pos _UINT16_(4) /* (AC_EVCTRL Position) Window x Event Output Enable */ +#define AC_EVCTRL_WINEO_Msk (_UINT16_(0x3) << AC_EVCTRL_WINEO_Pos) /* (AC_EVCTRL Mask) WINEO */ +#define AC_EVCTRL_WINEO(value) (AC_EVCTRL_WINEO_Msk & (_UINT16_(value) << AC_EVCTRL_WINEO_Pos)) +#define AC_EVCTRL_COMPEI_Pos _UINT16_(8) /* (AC_EVCTRL Position) Comparator x Event Input Enable */ +#define AC_EVCTRL_COMPEI_Msk (_UINT16_(0xF) << AC_EVCTRL_COMPEI_Pos) /* (AC_EVCTRL Mask) COMPEI */ +#define AC_EVCTRL_COMPEI(value) (AC_EVCTRL_COMPEI_Msk & (_UINT16_(value) << AC_EVCTRL_COMPEI_Pos)) +#define AC_EVCTRL_INVEI_Pos _UINT16_(12) /* (AC_EVCTRL Position) Comparator 3 Input Event Invert Enable */ +#define AC_EVCTRL_INVEI_Msk (_UINT16_(0xF) << AC_EVCTRL_INVEI_Pos) /* (AC_EVCTRL Mask) INVEI */ +#define AC_EVCTRL_INVEI(value) (AC_EVCTRL_INVEI_Msk & (_UINT16_(value) << AC_EVCTRL_INVEI_Pos)) + +/* -------- AC_INTENCLR : (AC Offset: 0x04) (R/W 8) Interrupt Enable Clear -------- */ +#define AC_INTENCLR_RESETVALUE _UINT8_(0x00) /* (AC_INTENCLR) Interrupt Enable Clear Reset Value */ + +#define AC_INTENCLR_COMP0_Pos _UINT8_(0) /* (AC_INTENCLR) Comparator 0 Interrupt Enable Position */ +#define AC_INTENCLR_COMP0_Msk (_UINT8_(0x1) << AC_INTENCLR_COMP0_Pos) /* (AC_INTENCLR) Comparator 0 Interrupt Enable Mask */ +#define AC_INTENCLR_COMP0(value) (AC_INTENCLR_COMP0_Msk & (_UINT8_(value) << AC_INTENCLR_COMP0_Pos)) /* Assigment of value for COMP0 in the AC_INTENCLR register */ +#define AC_INTENCLR_COMP1_Pos _UINT8_(1) /* (AC_INTENCLR) Comparator 1 Interrupt Enable Position */ +#define AC_INTENCLR_COMP1_Msk (_UINT8_(0x1) << AC_INTENCLR_COMP1_Pos) /* (AC_INTENCLR) Comparator 1 Interrupt Enable Mask */ +#define AC_INTENCLR_COMP1(value) (AC_INTENCLR_COMP1_Msk & (_UINT8_(value) << AC_INTENCLR_COMP1_Pos)) /* Assigment of value for COMP1 in the AC_INTENCLR register */ +#define AC_INTENCLR_COMP2_Pos _UINT8_(2) /* (AC_INTENCLR) Comparator 2 Interrupt Enable Position */ +#define AC_INTENCLR_COMP2_Msk (_UINT8_(0x1) << AC_INTENCLR_COMP2_Pos) /* (AC_INTENCLR) Comparator 2 Interrupt Enable Mask */ +#define AC_INTENCLR_COMP2(value) (AC_INTENCLR_COMP2_Msk & (_UINT8_(value) << AC_INTENCLR_COMP2_Pos)) /* Assigment of value for COMP2 in the AC_INTENCLR register */ +#define AC_INTENCLR_COMP3_Pos _UINT8_(3) /* (AC_INTENCLR) Comparator 3 Interrupt Enable Position */ +#define AC_INTENCLR_COMP3_Msk (_UINT8_(0x1) << AC_INTENCLR_COMP3_Pos) /* (AC_INTENCLR) Comparator 3 Interrupt Enable Mask */ +#define AC_INTENCLR_COMP3(value) (AC_INTENCLR_COMP3_Msk & (_UINT8_(value) << AC_INTENCLR_COMP3_Pos)) /* Assigment of value for COMP3 in the AC_INTENCLR register */ +#define AC_INTENCLR_WIN0_Pos _UINT8_(4) /* (AC_INTENCLR) Window 0 Interrupt Enable Position */ +#define AC_INTENCLR_WIN0_Msk (_UINT8_(0x1) << AC_INTENCLR_WIN0_Pos) /* (AC_INTENCLR) Window 0 Interrupt Enable Mask */ +#define AC_INTENCLR_WIN0(value) (AC_INTENCLR_WIN0_Msk & (_UINT8_(value) << AC_INTENCLR_WIN0_Pos)) /* Assigment of value for WIN0 in the AC_INTENCLR register */ +#define AC_INTENCLR_WIN1_Pos _UINT8_(5) /* (AC_INTENCLR) Window 1 Interrupt Enable Position */ +#define AC_INTENCLR_WIN1_Msk (_UINT8_(0x1) << AC_INTENCLR_WIN1_Pos) /* (AC_INTENCLR) Window 1 Interrupt Enable Mask */ +#define AC_INTENCLR_WIN1(value) (AC_INTENCLR_WIN1_Msk & (_UINT8_(value) << AC_INTENCLR_WIN1_Pos)) /* Assigment of value for WIN1 in the AC_INTENCLR register */ +#define AC_INTENCLR_Msk _UINT8_(0x3F) /* (AC_INTENCLR) Register Mask */ + +#define AC_INTENCLR_COMP_Pos _UINT8_(0) /* (AC_INTENCLR Position) Comparator x Interrupt Enable */ +#define AC_INTENCLR_COMP_Msk (_UINT8_(0xF) << AC_INTENCLR_COMP_Pos) /* (AC_INTENCLR Mask) COMP */ +#define AC_INTENCLR_COMP(value) (AC_INTENCLR_COMP_Msk & (_UINT8_(value) << AC_INTENCLR_COMP_Pos)) +#define AC_INTENCLR_WIN_Pos _UINT8_(4) /* (AC_INTENCLR Position) Window x Interrupt Enable */ +#define AC_INTENCLR_WIN_Msk (_UINT8_(0x3) << AC_INTENCLR_WIN_Pos) /* (AC_INTENCLR Mask) WIN */ +#define AC_INTENCLR_WIN(value) (AC_INTENCLR_WIN_Msk & (_UINT8_(value) << AC_INTENCLR_WIN_Pos)) + +/* -------- AC_INTENSET : (AC Offset: 0x05) (R/W 8) Interrupt Enable Set -------- */ +#define AC_INTENSET_RESETVALUE _UINT8_(0x00) /* (AC_INTENSET) Interrupt Enable Set Reset Value */ + +#define AC_INTENSET_COMP0_Pos _UINT8_(0) /* (AC_INTENSET) Comparator 0 Interrupt Enable Position */ +#define AC_INTENSET_COMP0_Msk (_UINT8_(0x1) << AC_INTENSET_COMP0_Pos) /* (AC_INTENSET) Comparator 0 Interrupt Enable Mask */ +#define AC_INTENSET_COMP0(value) (AC_INTENSET_COMP0_Msk & (_UINT8_(value) << AC_INTENSET_COMP0_Pos)) /* Assigment of value for COMP0 in the AC_INTENSET register */ +#define AC_INTENSET_COMP1_Pos _UINT8_(1) /* (AC_INTENSET) Comparator 1 Interrupt Enable Position */ +#define AC_INTENSET_COMP1_Msk (_UINT8_(0x1) << AC_INTENSET_COMP1_Pos) /* (AC_INTENSET) Comparator 1 Interrupt Enable Mask */ +#define AC_INTENSET_COMP1(value) (AC_INTENSET_COMP1_Msk & (_UINT8_(value) << AC_INTENSET_COMP1_Pos)) /* Assigment of value for COMP1 in the AC_INTENSET register */ +#define AC_INTENSET_COMP2_Pos _UINT8_(2) /* (AC_INTENSET) Comparator 2 Interrupt Enable Position */ +#define AC_INTENSET_COMP2_Msk (_UINT8_(0x1) << AC_INTENSET_COMP2_Pos) /* (AC_INTENSET) Comparator 2 Interrupt Enable Mask */ +#define AC_INTENSET_COMP2(value) (AC_INTENSET_COMP2_Msk & (_UINT8_(value) << AC_INTENSET_COMP2_Pos)) /* Assigment of value for COMP2 in the AC_INTENSET register */ +#define AC_INTENSET_COMP3_Pos _UINT8_(3) /* (AC_INTENSET) Comparator 3 Interrupt Enable Position */ +#define AC_INTENSET_COMP3_Msk (_UINT8_(0x1) << AC_INTENSET_COMP3_Pos) /* (AC_INTENSET) Comparator 3 Interrupt Enable Mask */ +#define AC_INTENSET_COMP3(value) (AC_INTENSET_COMP3_Msk & (_UINT8_(value) << AC_INTENSET_COMP3_Pos)) /* Assigment of value for COMP3 in the AC_INTENSET register */ +#define AC_INTENSET_WIN0_Pos _UINT8_(4) /* (AC_INTENSET) Window 0 Interrupt Enable Position */ +#define AC_INTENSET_WIN0_Msk (_UINT8_(0x1) << AC_INTENSET_WIN0_Pos) /* (AC_INTENSET) Window 0 Interrupt Enable Mask */ +#define AC_INTENSET_WIN0(value) (AC_INTENSET_WIN0_Msk & (_UINT8_(value) << AC_INTENSET_WIN0_Pos)) /* Assigment of value for WIN0 in the AC_INTENSET register */ +#define AC_INTENSET_WIN1_Pos _UINT8_(5) /* (AC_INTENSET) Window 1 Interrupt Enable Position */ +#define AC_INTENSET_WIN1_Msk (_UINT8_(0x1) << AC_INTENSET_WIN1_Pos) /* (AC_INTENSET) Window 1 Interrupt Enable Mask */ +#define AC_INTENSET_WIN1(value) (AC_INTENSET_WIN1_Msk & (_UINT8_(value) << AC_INTENSET_WIN1_Pos)) /* Assigment of value for WIN1 in the AC_INTENSET register */ +#define AC_INTENSET_Msk _UINT8_(0x3F) /* (AC_INTENSET) Register Mask */ + +#define AC_INTENSET_COMP_Pos _UINT8_(0) /* (AC_INTENSET Position) Comparator x Interrupt Enable */ +#define AC_INTENSET_COMP_Msk (_UINT8_(0xF) << AC_INTENSET_COMP_Pos) /* (AC_INTENSET Mask) COMP */ +#define AC_INTENSET_COMP(value) (AC_INTENSET_COMP_Msk & (_UINT8_(value) << AC_INTENSET_COMP_Pos)) +#define AC_INTENSET_WIN_Pos _UINT8_(4) /* (AC_INTENSET Position) Window x Interrupt Enable */ +#define AC_INTENSET_WIN_Msk (_UINT8_(0x3) << AC_INTENSET_WIN_Pos) /* (AC_INTENSET Mask) WIN */ +#define AC_INTENSET_WIN(value) (AC_INTENSET_WIN_Msk & (_UINT8_(value) << AC_INTENSET_WIN_Pos)) + +/* -------- AC_INTFLAG : (AC Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear -------- */ +#define AC_INTFLAG_RESETVALUE _UINT8_(0x00) /* (AC_INTFLAG) Interrupt Flag Status and Clear Reset Value */ + +#define AC_INTFLAG_COMP0_Pos _UINT8_(0) /* (AC_INTFLAG) Comparator 0 Position */ +#define AC_INTFLAG_COMP0_Msk (_UINT8_(0x1) << AC_INTFLAG_COMP0_Pos) /* (AC_INTFLAG) Comparator 0 Mask */ +#define AC_INTFLAG_COMP0(value) (AC_INTFLAG_COMP0_Msk & (_UINT8_(value) << AC_INTFLAG_COMP0_Pos)) /* Assigment of value for COMP0 in the AC_INTFLAG register */ +#define AC_INTFLAG_COMP1_Pos _UINT8_(1) /* (AC_INTFLAG) Comparator 1 Position */ +#define AC_INTFLAG_COMP1_Msk (_UINT8_(0x1) << AC_INTFLAG_COMP1_Pos) /* (AC_INTFLAG) Comparator 1 Mask */ +#define AC_INTFLAG_COMP1(value) (AC_INTFLAG_COMP1_Msk & (_UINT8_(value) << AC_INTFLAG_COMP1_Pos)) /* Assigment of value for COMP1 in the AC_INTFLAG register */ +#define AC_INTFLAG_COMP2_Pos _UINT8_(2) /* (AC_INTFLAG) Comparator 2 Position */ +#define AC_INTFLAG_COMP2_Msk (_UINT8_(0x1) << AC_INTFLAG_COMP2_Pos) /* (AC_INTFLAG) Comparator 2 Mask */ +#define AC_INTFLAG_COMP2(value) (AC_INTFLAG_COMP2_Msk & (_UINT8_(value) << AC_INTFLAG_COMP2_Pos)) /* Assigment of value for COMP2 in the AC_INTFLAG register */ +#define AC_INTFLAG_COMP3_Pos _UINT8_(3) /* (AC_INTFLAG) Comparator 3 Position */ +#define AC_INTFLAG_COMP3_Msk (_UINT8_(0x1) << AC_INTFLAG_COMP3_Pos) /* (AC_INTFLAG) Comparator 3 Mask */ +#define AC_INTFLAG_COMP3(value) (AC_INTFLAG_COMP3_Msk & (_UINT8_(value) << AC_INTFLAG_COMP3_Pos)) /* Assigment of value for COMP3 in the AC_INTFLAG register */ +#define AC_INTFLAG_WIN0_Pos _UINT8_(4) /* (AC_INTFLAG) Window 0 Position */ +#define AC_INTFLAG_WIN0_Msk (_UINT8_(0x1) << AC_INTFLAG_WIN0_Pos) /* (AC_INTFLAG) Window 0 Mask */ +#define AC_INTFLAG_WIN0(value) (AC_INTFLAG_WIN0_Msk & (_UINT8_(value) << AC_INTFLAG_WIN0_Pos)) /* Assigment of value for WIN0 in the AC_INTFLAG register */ +#define AC_INTFLAG_WIN1_Pos _UINT8_(5) /* (AC_INTFLAG) Window 1 Position */ +#define AC_INTFLAG_WIN1_Msk (_UINT8_(0x1) << AC_INTFLAG_WIN1_Pos) /* (AC_INTFLAG) Window 1 Mask */ +#define AC_INTFLAG_WIN1(value) (AC_INTFLAG_WIN1_Msk & (_UINT8_(value) << AC_INTFLAG_WIN1_Pos)) /* Assigment of value for WIN1 in the AC_INTFLAG register */ +#define AC_INTFLAG_Msk _UINT8_(0x3F) /* (AC_INTFLAG) Register Mask */ + +#define AC_INTFLAG_COMP_Pos _UINT8_(0) /* (AC_INTFLAG Position) Comparator x */ +#define AC_INTFLAG_COMP_Msk (_UINT8_(0xF) << AC_INTFLAG_COMP_Pos) /* (AC_INTFLAG Mask) COMP */ +#define AC_INTFLAG_COMP(value) (AC_INTFLAG_COMP_Msk & (_UINT8_(value) << AC_INTFLAG_COMP_Pos)) +#define AC_INTFLAG_WIN_Pos _UINT8_(4) /* (AC_INTFLAG Position) Window x */ +#define AC_INTFLAG_WIN_Msk (_UINT8_(0x3) << AC_INTFLAG_WIN_Pos) /* (AC_INTFLAG Mask) WIN */ +#define AC_INTFLAG_WIN(value) (AC_INTFLAG_WIN_Msk & (_UINT8_(value) << AC_INTFLAG_WIN_Pos)) + +/* -------- AC_STATUSA : (AC Offset: 0x07) ( R/ 8) Status A -------- */ +#define AC_STATUSA_RESETVALUE _UINT8_(0x00) /* (AC_STATUSA) Status A Reset Value */ + +#define AC_STATUSA_STATE0_Pos _UINT8_(0) /* (AC_STATUSA) Comparator 0 Current State Position */ +#define AC_STATUSA_STATE0_Msk (_UINT8_(0x1) << AC_STATUSA_STATE0_Pos) /* (AC_STATUSA) Comparator 0 Current State Mask */ +#define AC_STATUSA_STATE0(value) (AC_STATUSA_STATE0_Msk & (_UINT8_(value) << AC_STATUSA_STATE0_Pos)) /* Assigment of value for STATE0 in the AC_STATUSA register */ +#define AC_STATUSA_STATE1_Pos _UINT8_(1) /* (AC_STATUSA) Comparator 1 Current State Position */ +#define AC_STATUSA_STATE1_Msk (_UINT8_(0x1) << AC_STATUSA_STATE1_Pos) /* (AC_STATUSA) Comparator 1 Current State Mask */ +#define AC_STATUSA_STATE1(value) (AC_STATUSA_STATE1_Msk & (_UINT8_(value) << AC_STATUSA_STATE1_Pos)) /* Assigment of value for STATE1 in the AC_STATUSA register */ +#define AC_STATUSA_STATE2_Pos _UINT8_(2) /* (AC_STATUSA) Comparator 2 Current State Position */ +#define AC_STATUSA_STATE2_Msk (_UINT8_(0x1) << AC_STATUSA_STATE2_Pos) /* (AC_STATUSA) Comparator 2 Current State Mask */ +#define AC_STATUSA_STATE2(value) (AC_STATUSA_STATE2_Msk & (_UINT8_(value) << AC_STATUSA_STATE2_Pos)) /* Assigment of value for STATE2 in the AC_STATUSA register */ +#define AC_STATUSA_STATE3_Pos _UINT8_(3) /* (AC_STATUSA) Comparator 3 Current State Position */ +#define AC_STATUSA_STATE3_Msk (_UINT8_(0x1) << AC_STATUSA_STATE3_Pos) /* (AC_STATUSA) Comparator 3 Current State Mask */ +#define AC_STATUSA_STATE3(value) (AC_STATUSA_STATE3_Msk & (_UINT8_(value) << AC_STATUSA_STATE3_Pos)) /* Assigment of value for STATE3 in the AC_STATUSA register */ +#define AC_STATUSA_WSTATE0_Pos _UINT8_(4) /* (AC_STATUSA) Window 0 Current State Position */ +#define AC_STATUSA_WSTATE0_Msk (_UINT8_(0x3) << AC_STATUSA_WSTATE0_Pos) /* (AC_STATUSA) Window 0 Current State Mask */ +#define AC_STATUSA_WSTATE0(value) (AC_STATUSA_WSTATE0_Msk & (_UINT8_(value) << AC_STATUSA_WSTATE0_Pos)) /* Assigment of value for WSTATE0 in the AC_STATUSA register */ +#define AC_STATUSA_WSTATE0_ABOVE_Val _UINT8_(0x0) /* (AC_STATUSA) Signal is above window */ +#define AC_STATUSA_WSTATE0_INSIDE_Val _UINT8_(0x1) /* (AC_STATUSA) Signal is inside window */ +#define AC_STATUSA_WSTATE0_BELOW_Val _UINT8_(0x2) /* (AC_STATUSA) Signal is below window */ +#define AC_STATUSA_WSTATE0_ABOVE (AC_STATUSA_WSTATE0_ABOVE_Val << AC_STATUSA_WSTATE0_Pos) /* (AC_STATUSA) Signal is above window Position */ +#define AC_STATUSA_WSTATE0_INSIDE (AC_STATUSA_WSTATE0_INSIDE_Val << AC_STATUSA_WSTATE0_Pos) /* (AC_STATUSA) Signal is inside window Position */ +#define AC_STATUSA_WSTATE0_BELOW (AC_STATUSA_WSTATE0_BELOW_Val << AC_STATUSA_WSTATE0_Pos) /* (AC_STATUSA) Signal is below window Position */ +#define AC_STATUSA_WSTATE1_Pos _UINT8_(6) /* (AC_STATUSA) Window 1 Current State Position */ +#define AC_STATUSA_WSTATE1_Msk (_UINT8_(0x3) << AC_STATUSA_WSTATE1_Pos) /* (AC_STATUSA) Window 1 Current State Mask */ +#define AC_STATUSA_WSTATE1(value) (AC_STATUSA_WSTATE1_Msk & (_UINT8_(value) << AC_STATUSA_WSTATE1_Pos)) /* Assigment of value for WSTATE1 in the AC_STATUSA register */ +#define AC_STATUSA_WSTATE1_ABOVE_Val _UINT8_(0x0) /* (AC_STATUSA) Signal is above window */ +#define AC_STATUSA_WSTATE1_INSIDE_Val _UINT8_(0x1) /* (AC_STATUSA) Signal is inside window */ +#define AC_STATUSA_WSTATE1_BELOW_Val _UINT8_(0x2) /* (AC_STATUSA) Signal is below window */ +#define AC_STATUSA_WSTATE1_ABOVE (AC_STATUSA_WSTATE1_ABOVE_Val << AC_STATUSA_WSTATE1_Pos) /* (AC_STATUSA) Signal is above window Position */ +#define AC_STATUSA_WSTATE1_INSIDE (AC_STATUSA_WSTATE1_INSIDE_Val << AC_STATUSA_WSTATE1_Pos) /* (AC_STATUSA) Signal is inside window Position */ +#define AC_STATUSA_WSTATE1_BELOW (AC_STATUSA_WSTATE1_BELOW_Val << AC_STATUSA_WSTATE1_Pos) /* (AC_STATUSA) Signal is below window Position */ +#define AC_STATUSA_Msk _UINT8_(0xFF) /* (AC_STATUSA) Register Mask */ + +#define AC_STATUSA_STATE_Pos _UINT8_(0) /* (AC_STATUSA Position) Comparator x Current State */ +#define AC_STATUSA_STATE_Msk (_UINT8_(0xF) << AC_STATUSA_STATE_Pos) /* (AC_STATUSA Mask) STATE */ +#define AC_STATUSA_STATE(value) (AC_STATUSA_STATE_Msk & (_UINT8_(value) << AC_STATUSA_STATE_Pos)) + +/* -------- AC_STATUSB : (AC Offset: 0x08) ( R/ 8) Status B -------- */ +#define AC_STATUSB_RESETVALUE _UINT8_(0x00) /* (AC_STATUSB) Status B Reset Value */ + +#define AC_STATUSB_READY0_Pos _UINT8_(0) /* (AC_STATUSB) Comparator 0 Ready Position */ +#define AC_STATUSB_READY0_Msk (_UINT8_(0x1) << AC_STATUSB_READY0_Pos) /* (AC_STATUSB) Comparator 0 Ready Mask */ +#define AC_STATUSB_READY0(value) (AC_STATUSB_READY0_Msk & (_UINT8_(value) << AC_STATUSB_READY0_Pos)) /* Assigment of value for READY0 in the AC_STATUSB register */ +#define AC_STATUSB_READY1_Pos _UINT8_(1) /* (AC_STATUSB) Comparator 1 Ready Position */ +#define AC_STATUSB_READY1_Msk (_UINT8_(0x1) << AC_STATUSB_READY1_Pos) /* (AC_STATUSB) Comparator 1 Ready Mask */ +#define AC_STATUSB_READY1(value) (AC_STATUSB_READY1_Msk & (_UINT8_(value) << AC_STATUSB_READY1_Pos)) /* Assigment of value for READY1 in the AC_STATUSB register */ +#define AC_STATUSB_READY2_Pos _UINT8_(2) /* (AC_STATUSB) Comparator 2 Ready Position */ +#define AC_STATUSB_READY2_Msk (_UINT8_(0x1) << AC_STATUSB_READY2_Pos) /* (AC_STATUSB) Comparator 2 Ready Mask */ +#define AC_STATUSB_READY2(value) (AC_STATUSB_READY2_Msk & (_UINT8_(value) << AC_STATUSB_READY2_Pos)) /* Assigment of value for READY2 in the AC_STATUSB register */ +#define AC_STATUSB_READY3_Pos _UINT8_(3) /* (AC_STATUSB) Comparator 3 Ready Position */ +#define AC_STATUSB_READY3_Msk (_UINT8_(0x1) << AC_STATUSB_READY3_Pos) /* (AC_STATUSB) Comparator 3 Ready Mask */ +#define AC_STATUSB_READY3(value) (AC_STATUSB_READY3_Msk & (_UINT8_(value) << AC_STATUSB_READY3_Pos)) /* Assigment of value for READY3 in the AC_STATUSB register */ +#define AC_STATUSB_Msk _UINT8_(0x0F) /* (AC_STATUSB) Register Mask */ + +#define AC_STATUSB_READY_Pos _UINT8_(0) /* (AC_STATUSB Position) Comparator 3 Ready */ +#define AC_STATUSB_READY_Msk (_UINT8_(0xF) << AC_STATUSB_READY_Pos) /* (AC_STATUSB Mask) READY */ +#define AC_STATUSB_READY(value) (AC_STATUSB_READY_Msk & (_UINT8_(value) << AC_STATUSB_READY_Pos)) + +/* -------- AC_DBGCTRL : (AC Offset: 0x09) (R/W 8) Debug Control -------- */ +#define AC_DBGCTRL_RESETVALUE _UINT8_(0x00) /* (AC_DBGCTRL) Debug Control Reset Value */ + +#define AC_DBGCTRL_DBGRUN_Pos _UINT8_(0) /* (AC_DBGCTRL) Debug Run Position */ +#define AC_DBGCTRL_DBGRUN_Msk (_UINT8_(0x1) << AC_DBGCTRL_DBGRUN_Pos) /* (AC_DBGCTRL) Debug Run Mask */ +#define AC_DBGCTRL_DBGRUN(value) (AC_DBGCTRL_DBGRUN_Msk & (_UINT8_(value) << AC_DBGCTRL_DBGRUN_Pos)) /* Assigment of value for DBGRUN in the AC_DBGCTRL register */ +#define AC_DBGCTRL_Msk _UINT8_(0x01) /* (AC_DBGCTRL) Register Mask */ + + +/* -------- AC_WINCTRL : (AC Offset: 0x0A) (R/W 8) Window Control -------- */ +#define AC_WINCTRL_RESETVALUE _UINT8_(0x00) /* (AC_WINCTRL) Window Control Reset Value */ + +#define AC_WINCTRL_WEN0_Pos _UINT8_(0) /* (AC_WINCTRL) Window 0 Mode Enable Position */ +#define AC_WINCTRL_WEN0_Msk (_UINT8_(0x1) << AC_WINCTRL_WEN0_Pos) /* (AC_WINCTRL) Window 0 Mode Enable Mask */ +#define AC_WINCTRL_WEN0(value) (AC_WINCTRL_WEN0_Msk & (_UINT8_(value) << AC_WINCTRL_WEN0_Pos)) /* Assigment of value for WEN0 in the AC_WINCTRL register */ +#define AC_WINCTRL_WINTSEL0_Pos _UINT8_(1) /* (AC_WINCTRL) Window 0 Interrupt Selection Position */ +#define AC_WINCTRL_WINTSEL0_Msk (_UINT8_(0x3) << AC_WINCTRL_WINTSEL0_Pos) /* (AC_WINCTRL) Window 0 Interrupt Selection Mask */ +#define AC_WINCTRL_WINTSEL0(value) (AC_WINCTRL_WINTSEL0_Msk & (_UINT8_(value) << AC_WINCTRL_WINTSEL0_Pos)) /* Assigment of value for WINTSEL0 in the AC_WINCTRL register */ +#define AC_WINCTRL_WINTSEL0_ABOVE_Val _UINT8_(0x0) /* (AC_WINCTRL) Interrupt on signal above window */ +#define AC_WINCTRL_WINTSEL0_INSIDE_Val _UINT8_(0x1) /* (AC_WINCTRL) Interrupt on signal inside window */ +#define AC_WINCTRL_WINTSEL0_BELOW_Val _UINT8_(0x2) /* (AC_WINCTRL) Interrupt on signal below window */ +#define AC_WINCTRL_WINTSEL0_OUTSIDE_Val _UINT8_(0x3) /* (AC_WINCTRL) Interrupt on signal outside window */ +#define AC_WINCTRL_WINTSEL0_ABOVE (AC_WINCTRL_WINTSEL0_ABOVE_Val << AC_WINCTRL_WINTSEL0_Pos) /* (AC_WINCTRL) Interrupt on signal above window Position */ +#define AC_WINCTRL_WINTSEL0_INSIDE (AC_WINCTRL_WINTSEL0_INSIDE_Val << AC_WINCTRL_WINTSEL0_Pos) /* (AC_WINCTRL) Interrupt on signal inside window Position */ +#define AC_WINCTRL_WINTSEL0_BELOW (AC_WINCTRL_WINTSEL0_BELOW_Val << AC_WINCTRL_WINTSEL0_Pos) /* (AC_WINCTRL) Interrupt on signal below window Position */ +#define AC_WINCTRL_WINTSEL0_OUTSIDE (AC_WINCTRL_WINTSEL0_OUTSIDE_Val << AC_WINCTRL_WINTSEL0_Pos) /* (AC_WINCTRL) Interrupt on signal outside window Position */ +#define AC_WINCTRL_WEN1_Pos _UINT8_(4) /* (AC_WINCTRL) Window 1 Mode Enable Position */ +#define AC_WINCTRL_WEN1_Msk (_UINT8_(0x1) << AC_WINCTRL_WEN1_Pos) /* (AC_WINCTRL) Window 1 Mode Enable Mask */ +#define AC_WINCTRL_WEN1(value) (AC_WINCTRL_WEN1_Msk & (_UINT8_(value) << AC_WINCTRL_WEN1_Pos)) /* Assigment of value for WEN1 in the AC_WINCTRL register */ +#define AC_WINCTRL_WINTSEL1_Pos _UINT8_(5) /* (AC_WINCTRL) Window 1 Interrupt Selection Position */ +#define AC_WINCTRL_WINTSEL1_Msk (_UINT8_(0x3) << AC_WINCTRL_WINTSEL1_Pos) /* (AC_WINCTRL) Window 1 Interrupt Selection Mask */ +#define AC_WINCTRL_WINTSEL1(value) (AC_WINCTRL_WINTSEL1_Msk & (_UINT8_(value) << AC_WINCTRL_WINTSEL1_Pos)) /* Assigment of value for WINTSEL1 in the AC_WINCTRL register */ +#define AC_WINCTRL_WINTSEL1_ABOVE_Val _UINT8_(0x0) /* (AC_WINCTRL) Interrupt on signal above window */ +#define AC_WINCTRL_WINTSEL1_INSIDE_Val _UINT8_(0x1) /* (AC_WINCTRL) Interrupt on signal inside window */ +#define AC_WINCTRL_WINTSEL1_BELOW_Val _UINT8_(0x2) /* (AC_WINCTRL) Interrupt on signal below window */ +#define AC_WINCTRL_WINTSEL1_OUTSIDE_Val _UINT8_(0x3) /* (AC_WINCTRL) Interrupt on signal outside window */ +#define AC_WINCTRL_WINTSEL1_ABOVE (AC_WINCTRL_WINTSEL1_ABOVE_Val << AC_WINCTRL_WINTSEL1_Pos) /* (AC_WINCTRL) Interrupt on signal above window Position */ +#define AC_WINCTRL_WINTSEL1_INSIDE (AC_WINCTRL_WINTSEL1_INSIDE_Val << AC_WINCTRL_WINTSEL1_Pos) /* (AC_WINCTRL) Interrupt on signal inside window Position */ +#define AC_WINCTRL_WINTSEL1_BELOW (AC_WINCTRL_WINTSEL1_BELOW_Val << AC_WINCTRL_WINTSEL1_Pos) /* (AC_WINCTRL) Interrupt on signal below window Position */ +#define AC_WINCTRL_WINTSEL1_OUTSIDE (AC_WINCTRL_WINTSEL1_OUTSIDE_Val << AC_WINCTRL_WINTSEL1_Pos) /* (AC_WINCTRL) Interrupt on signal outside window Position */ +#define AC_WINCTRL_Msk _UINT8_(0x77) /* (AC_WINCTRL) Register Mask */ + + +/* -------- AC_SCALER : (AC Offset: 0x0C) (R/W 8) Scaler n -------- */ +#define AC_SCALER_RESETVALUE _UINT8_(0x00) /* (AC_SCALER) Scaler n Reset Value */ + +#define AC_SCALER_VALUE_Pos _UINT8_(0) /* (AC_SCALER) Scaler Value Position */ +#define AC_SCALER_VALUE_Msk (_UINT8_(0x3F) << AC_SCALER_VALUE_Pos) /* (AC_SCALER) Scaler Value Mask */ +#define AC_SCALER_VALUE(value) (AC_SCALER_VALUE_Msk & (_UINT8_(value) << AC_SCALER_VALUE_Pos)) /* Assigment of value for VALUE in the AC_SCALER register */ +#define AC_SCALER_Msk _UINT8_(0x3F) /* (AC_SCALER) Register Mask */ + + +/* -------- AC_COMPCTRL : (AC Offset: 0x10) (R/W 32) Comparator Control n -------- */ +#define AC_COMPCTRL_RESETVALUE _UINT32_(0x00) /* (AC_COMPCTRL) Comparator Control n Reset Value */ + +#define AC_COMPCTRL_ENABLE_Pos _UINT32_(1) /* (AC_COMPCTRL) Enable Position */ +#define AC_COMPCTRL_ENABLE_Msk (_UINT32_(0x1) << AC_COMPCTRL_ENABLE_Pos) /* (AC_COMPCTRL) Enable Mask */ +#define AC_COMPCTRL_ENABLE(value) (AC_COMPCTRL_ENABLE_Msk & (_UINT32_(value) << AC_COMPCTRL_ENABLE_Pos)) /* Assigment of value for ENABLE in the AC_COMPCTRL register */ +#define AC_COMPCTRL_SINGLE_Pos _UINT32_(2) /* (AC_COMPCTRL) Single-Shot Mode Position */ +#define AC_COMPCTRL_SINGLE_Msk (_UINT32_(0x1) << AC_COMPCTRL_SINGLE_Pos) /* (AC_COMPCTRL) Single-Shot Mode Mask */ +#define AC_COMPCTRL_SINGLE(value) (AC_COMPCTRL_SINGLE_Msk & (_UINT32_(value) << AC_COMPCTRL_SINGLE_Pos)) /* Assigment of value for SINGLE in the AC_COMPCTRL register */ +#define AC_COMPCTRL_INTSEL_Pos _UINT32_(3) /* (AC_COMPCTRL) Interrupt Selection Position */ +#define AC_COMPCTRL_INTSEL_Msk (_UINT32_(0x3) << AC_COMPCTRL_INTSEL_Pos) /* (AC_COMPCTRL) Interrupt Selection Mask */ +#define AC_COMPCTRL_INTSEL(value) (AC_COMPCTRL_INTSEL_Msk & (_UINT32_(value) << AC_COMPCTRL_INTSEL_Pos)) /* Assigment of value for INTSEL in the AC_COMPCTRL register */ +#define AC_COMPCTRL_INTSEL_TOGGLE_Val _UINT32_(0x0) /* (AC_COMPCTRL) Interrupt on comparator output toggle */ +#define AC_COMPCTRL_INTSEL_RISING_Val _UINT32_(0x1) /* (AC_COMPCTRL) Interrupt on comparator output rising */ +#define AC_COMPCTRL_INTSEL_FALLING_Val _UINT32_(0x2) /* (AC_COMPCTRL) Interrupt on comparator output falling */ +#define AC_COMPCTRL_INTSEL_EOC_Val _UINT32_(0x3) /* (AC_COMPCTRL) Interrupt on end of comparison (single-shot mode only) */ +#define AC_COMPCTRL_INTSEL_TOGGLE (AC_COMPCTRL_INTSEL_TOGGLE_Val << AC_COMPCTRL_INTSEL_Pos) /* (AC_COMPCTRL) Interrupt on comparator output toggle Position */ +#define AC_COMPCTRL_INTSEL_RISING (AC_COMPCTRL_INTSEL_RISING_Val << AC_COMPCTRL_INTSEL_Pos) /* (AC_COMPCTRL) Interrupt on comparator output rising Position */ +#define AC_COMPCTRL_INTSEL_FALLING (AC_COMPCTRL_INTSEL_FALLING_Val << AC_COMPCTRL_INTSEL_Pos) /* (AC_COMPCTRL) Interrupt on comparator output falling Position */ +#define AC_COMPCTRL_INTSEL_EOC (AC_COMPCTRL_INTSEL_EOC_Val << AC_COMPCTRL_INTSEL_Pos) /* (AC_COMPCTRL) Interrupt on end of comparison (single-shot mode only) Position */ +#define AC_COMPCTRL_RUNSTDBY_Pos _UINT32_(6) /* (AC_COMPCTRL) Run in Standby Position */ +#define AC_COMPCTRL_RUNSTDBY_Msk (_UINT32_(0x1) << AC_COMPCTRL_RUNSTDBY_Pos) /* (AC_COMPCTRL) Run in Standby Mask */ +#define AC_COMPCTRL_RUNSTDBY(value) (AC_COMPCTRL_RUNSTDBY_Msk & (_UINT32_(value) << AC_COMPCTRL_RUNSTDBY_Pos)) /* Assigment of value for RUNSTDBY in the AC_COMPCTRL register */ +#define AC_COMPCTRL_MUXNEG_Pos _UINT32_(8) /* (AC_COMPCTRL) Negative Input Mux Selection Position */ +#define AC_COMPCTRL_MUXNEG_Msk (_UINT32_(0x7) << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) Negative Input Mux Selection Mask */ +#define AC_COMPCTRL_MUXNEG(value) (AC_COMPCTRL_MUXNEG_Msk & (_UINT32_(value) << AC_COMPCTRL_MUXNEG_Pos)) /* Assigment of value for MUXNEG in the AC_COMPCTRL register */ +#define AC_COMPCTRL_MUXNEG_PIN0_Val _UINT32_(0x0) /* (AC_COMPCTRL) I/O pin 0 */ +#define AC_COMPCTRL_MUXNEG_PIN1_Val _UINT32_(0x1) /* (AC_COMPCTRL) I/O pin 1 */ +#define AC_COMPCTRL_MUXNEG_PIN2_Val _UINT32_(0x2) /* (AC_COMPCTRL) I/O pin 2 */ +#define AC_COMPCTRL_MUXNEG_PIN3_Val _UINT32_(0x3) /* (AC_COMPCTRL) I/O pin 3 */ +#define AC_COMPCTRL_MUXNEG_GND_Val _UINT32_(0x4) /* (AC_COMPCTRL) Ground */ +#define AC_COMPCTRL_MUXNEG_VSCALE_Val _UINT32_(0x5) /* (AC_COMPCTRL) VDD scaler */ +#define AC_COMPCTRL_MUXNEG_BANDGAP_Val _UINT32_(0x6) /* (AC_COMPCTRL) Internal bandgap voltage */ +#define AC_COMPCTRL_MUXNEG_DAC_Val _UINT32_(0x7) /* (AC_COMPCTRL) DAC output */ +#define AC_COMPCTRL_MUXNEG_PIN0 (AC_COMPCTRL_MUXNEG_PIN0_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) I/O pin 0 Position */ +#define AC_COMPCTRL_MUXNEG_PIN1 (AC_COMPCTRL_MUXNEG_PIN1_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) I/O pin 1 Position */ +#define AC_COMPCTRL_MUXNEG_PIN2 (AC_COMPCTRL_MUXNEG_PIN2_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) I/O pin 2 Position */ +#define AC_COMPCTRL_MUXNEG_PIN3 (AC_COMPCTRL_MUXNEG_PIN3_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) I/O pin 3 Position */ +#define AC_COMPCTRL_MUXNEG_GND (AC_COMPCTRL_MUXNEG_GND_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) Ground Position */ +#define AC_COMPCTRL_MUXNEG_VSCALE (AC_COMPCTRL_MUXNEG_VSCALE_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) VDD scaler Position */ +#define AC_COMPCTRL_MUXNEG_BANDGAP (AC_COMPCTRL_MUXNEG_BANDGAP_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) Internal bandgap voltage Position */ +#define AC_COMPCTRL_MUXNEG_DAC (AC_COMPCTRL_MUXNEG_DAC_Val << AC_COMPCTRL_MUXNEG_Pos) /* (AC_COMPCTRL) DAC output Position */ +#define AC_COMPCTRL_MUXPOS_Pos _UINT32_(12) /* (AC_COMPCTRL) Positive Input Mux Selection Position */ +#define AC_COMPCTRL_MUXPOS_Msk (_UINT32_(0x7) << AC_COMPCTRL_MUXPOS_Pos) /* (AC_COMPCTRL) Positive Input Mux Selection Mask */ +#define AC_COMPCTRL_MUXPOS(value) (AC_COMPCTRL_MUXPOS_Msk & (_UINT32_(value) << AC_COMPCTRL_MUXPOS_Pos)) /* Assigment of value for MUXPOS in the AC_COMPCTRL register */ +#define AC_COMPCTRL_MUXPOS_PIN0_Val _UINT32_(0x0) /* (AC_COMPCTRL) I/O pin 0 */ +#define AC_COMPCTRL_MUXPOS_PIN1_Val _UINT32_(0x1) /* (AC_COMPCTRL) I/O pin 1 */ +#define AC_COMPCTRL_MUXPOS_PIN2_Val _UINT32_(0x2) /* (AC_COMPCTRL) I/O pin 2 */ +#define AC_COMPCTRL_MUXPOS_PIN3_Val _UINT32_(0x3) /* (AC_COMPCTRL) I/O pin 3 */ +#define AC_COMPCTRL_MUXPOS_VSCALE_Val _UINT32_(0x4) /* (AC_COMPCTRL) VDD Scaler */ +#define AC_COMPCTRL_MUXPOS_PIN0 (AC_COMPCTRL_MUXPOS_PIN0_Val << AC_COMPCTRL_MUXPOS_Pos) /* (AC_COMPCTRL) I/O pin 0 Position */ +#define AC_COMPCTRL_MUXPOS_PIN1 (AC_COMPCTRL_MUXPOS_PIN1_Val << AC_COMPCTRL_MUXPOS_Pos) /* (AC_COMPCTRL) I/O pin 1 Position */ +#define AC_COMPCTRL_MUXPOS_PIN2 (AC_COMPCTRL_MUXPOS_PIN2_Val << AC_COMPCTRL_MUXPOS_Pos) /* (AC_COMPCTRL) I/O pin 2 Position */ +#define AC_COMPCTRL_MUXPOS_PIN3 (AC_COMPCTRL_MUXPOS_PIN3_Val << AC_COMPCTRL_MUXPOS_Pos) /* (AC_COMPCTRL) I/O pin 3 Position */ +#define AC_COMPCTRL_MUXPOS_VSCALE (AC_COMPCTRL_MUXPOS_VSCALE_Val << AC_COMPCTRL_MUXPOS_Pos) /* (AC_COMPCTRL) VDD Scaler Position */ +#define AC_COMPCTRL_SWAP_Pos _UINT32_(15) /* (AC_COMPCTRL) Swap Inputs and Invert Position */ +#define AC_COMPCTRL_SWAP_Msk (_UINT32_(0x1) << AC_COMPCTRL_SWAP_Pos) /* (AC_COMPCTRL) Swap Inputs and Invert Mask */ +#define AC_COMPCTRL_SWAP(value) (AC_COMPCTRL_SWAP_Msk & (_UINT32_(value) << AC_COMPCTRL_SWAP_Pos)) /* Assigment of value for SWAP in the AC_COMPCTRL register */ +#define AC_COMPCTRL_SPEED_Pos _UINT32_(16) /* (AC_COMPCTRL) Speed Selection Position */ +#define AC_COMPCTRL_SPEED_Msk (_UINT32_(0x3) << AC_COMPCTRL_SPEED_Pos) /* (AC_COMPCTRL) Speed Selection Mask */ +#define AC_COMPCTRL_SPEED(value) (AC_COMPCTRL_SPEED_Msk & (_UINT32_(value) << AC_COMPCTRL_SPEED_Pos)) /* Assigment of value for SPEED in the AC_COMPCTRL register */ +#define AC_COMPCTRL_SPEED_LOW_Val _UINT32_(0x0) /* (AC_COMPCTRL) Low speed */ +#define AC_COMPCTRL_SPEED_HIGH_Val _UINT32_(0x3) /* (AC_COMPCTRL) High speed */ +#define AC_COMPCTRL_SPEED_LOW (AC_COMPCTRL_SPEED_LOW_Val << AC_COMPCTRL_SPEED_Pos) /* (AC_COMPCTRL) Low speed Position */ +#define AC_COMPCTRL_SPEED_HIGH (AC_COMPCTRL_SPEED_HIGH_Val << AC_COMPCTRL_SPEED_Pos) /* (AC_COMPCTRL) High speed Position */ +#define AC_COMPCTRL_HYSTEN_Pos _UINT32_(19) /* (AC_COMPCTRL) Hysteresis Enable Position */ +#define AC_COMPCTRL_HYSTEN_Msk (_UINT32_(0x1) << AC_COMPCTRL_HYSTEN_Pos) /* (AC_COMPCTRL) Hysteresis Enable Mask */ +#define AC_COMPCTRL_HYSTEN(value) (AC_COMPCTRL_HYSTEN_Msk & (_UINT32_(value) << AC_COMPCTRL_HYSTEN_Pos)) /* Assigment of value for HYSTEN in the AC_COMPCTRL register */ +#define AC_COMPCTRL_FLEN_Pos _UINT32_(24) /* (AC_COMPCTRL) Filter Length Position */ +#define AC_COMPCTRL_FLEN_Msk (_UINT32_(0x7) << AC_COMPCTRL_FLEN_Pos) /* (AC_COMPCTRL) Filter Length Mask */ +#define AC_COMPCTRL_FLEN(value) (AC_COMPCTRL_FLEN_Msk & (_UINT32_(value) << AC_COMPCTRL_FLEN_Pos)) /* Assigment of value for FLEN in the AC_COMPCTRL register */ +#define AC_COMPCTRL_FLEN_OFF_Val _UINT32_(0x0) /* (AC_COMPCTRL) No filtering */ +#define AC_COMPCTRL_FLEN_MAJ3_Val _UINT32_(0x1) /* (AC_COMPCTRL) 3-bit majority function (2 of 3) */ +#define AC_COMPCTRL_FLEN_MAJ5_Val _UINT32_(0x2) /* (AC_COMPCTRL) 5-bit majority function (3 of 5) */ +#define AC_COMPCTRL_FLEN_OFF (AC_COMPCTRL_FLEN_OFF_Val << AC_COMPCTRL_FLEN_Pos) /* (AC_COMPCTRL) No filtering Position */ +#define AC_COMPCTRL_FLEN_MAJ3 (AC_COMPCTRL_FLEN_MAJ3_Val << AC_COMPCTRL_FLEN_Pos) /* (AC_COMPCTRL) 3-bit majority function (2 of 3) Position */ +#define AC_COMPCTRL_FLEN_MAJ5 (AC_COMPCTRL_FLEN_MAJ5_Val << AC_COMPCTRL_FLEN_Pos) /* (AC_COMPCTRL) 5-bit majority function (3 of 5) Position */ +#define AC_COMPCTRL_OUT_Pos _UINT32_(28) /* (AC_COMPCTRL) Output Position */ +#define AC_COMPCTRL_OUT_Msk (_UINT32_(0x3) << AC_COMPCTRL_OUT_Pos) /* (AC_COMPCTRL) Output Mask */ +#define AC_COMPCTRL_OUT(value) (AC_COMPCTRL_OUT_Msk & (_UINT32_(value) << AC_COMPCTRL_OUT_Pos)) /* Assigment of value for OUT in the AC_COMPCTRL register */ +#define AC_COMPCTRL_OUT_OFF_Val _UINT32_(0x0) /* (AC_COMPCTRL) The output of COMPn is not routed to the COMPn I/O port */ +#define AC_COMPCTRL_OUT_ASYNC_Val _UINT32_(0x1) /* (AC_COMPCTRL) The asynchronous output of COMPn is routed to the COMPn I/O port */ +#define AC_COMPCTRL_OUT_SYNC_Val _UINT32_(0x2) /* (AC_COMPCTRL) The synchronous output (including filtering) of COMPn is routed to the COMPn I/O port */ +#define AC_COMPCTRL_OUT_OFF (AC_COMPCTRL_OUT_OFF_Val << AC_COMPCTRL_OUT_Pos) /* (AC_COMPCTRL) The output of COMPn is not routed to the COMPn I/O port Position */ +#define AC_COMPCTRL_OUT_ASYNC (AC_COMPCTRL_OUT_ASYNC_Val << AC_COMPCTRL_OUT_Pos) /* (AC_COMPCTRL) The asynchronous output of COMPn is routed to the COMPn I/O port Position */ +#define AC_COMPCTRL_OUT_SYNC (AC_COMPCTRL_OUT_SYNC_Val << AC_COMPCTRL_OUT_Pos) /* (AC_COMPCTRL) The synchronous output (including filtering) of COMPn is routed to the COMPn I/O port Position */ +#define AC_COMPCTRL_Msk _UINT32_(0x370BF75E) /* (AC_COMPCTRL) Register Mask */ + + +/* -------- AC_SYNCBUSY : (AC Offset: 0x20) ( R/ 32) Synchronization Busy -------- */ +#define AC_SYNCBUSY_RESETVALUE _UINT32_(0x00) /* (AC_SYNCBUSY) Synchronization Busy Reset Value */ + +#define AC_SYNCBUSY_SWRST_Pos _UINT32_(0) /* (AC_SYNCBUSY) Software Reset Synchronization Busy Position */ +#define AC_SYNCBUSY_SWRST_Msk (_UINT32_(0x1) << AC_SYNCBUSY_SWRST_Pos) /* (AC_SYNCBUSY) Software Reset Synchronization Busy Mask */ +#define AC_SYNCBUSY_SWRST(value) (AC_SYNCBUSY_SWRST_Msk & (_UINT32_(value) << AC_SYNCBUSY_SWRST_Pos)) /* Assigment of value for SWRST in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_ENABLE_Pos _UINT32_(1) /* (AC_SYNCBUSY) Enable Synchronization Busy Position */ +#define AC_SYNCBUSY_ENABLE_Msk (_UINT32_(0x1) << AC_SYNCBUSY_ENABLE_Pos) /* (AC_SYNCBUSY) Enable Synchronization Busy Mask */ +#define AC_SYNCBUSY_ENABLE(value) (AC_SYNCBUSY_ENABLE_Msk & (_UINT32_(value) << AC_SYNCBUSY_ENABLE_Pos)) /* Assigment of value for ENABLE in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_WINCTRL_Pos _UINT32_(2) /* (AC_SYNCBUSY) WINCTRL Synchronization Busy Position */ +#define AC_SYNCBUSY_WINCTRL_Msk (_UINT32_(0x1) << AC_SYNCBUSY_WINCTRL_Pos) /* (AC_SYNCBUSY) WINCTRL Synchronization Busy Mask */ +#define AC_SYNCBUSY_WINCTRL(value) (AC_SYNCBUSY_WINCTRL_Msk & (_UINT32_(value) << AC_SYNCBUSY_WINCTRL_Pos)) /* Assigment of value for WINCTRL in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_COMPCTRL0_Pos _UINT32_(3) /* (AC_SYNCBUSY) COMPCTRL 0 Synchronization Busy Position */ +#define AC_SYNCBUSY_COMPCTRL0_Msk (_UINT32_(0x1) << AC_SYNCBUSY_COMPCTRL0_Pos) /* (AC_SYNCBUSY) COMPCTRL 0 Synchronization Busy Mask */ +#define AC_SYNCBUSY_COMPCTRL0(value) (AC_SYNCBUSY_COMPCTRL0_Msk & (_UINT32_(value) << AC_SYNCBUSY_COMPCTRL0_Pos)) /* Assigment of value for COMPCTRL0 in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_COMPCTRL1_Pos _UINT32_(4) /* (AC_SYNCBUSY) COMPCTRL 1 Synchronization Busy Position */ +#define AC_SYNCBUSY_COMPCTRL1_Msk (_UINT32_(0x1) << AC_SYNCBUSY_COMPCTRL1_Pos) /* (AC_SYNCBUSY) COMPCTRL 1 Synchronization Busy Mask */ +#define AC_SYNCBUSY_COMPCTRL1(value) (AC_SYNCBUSY_COMPCTRL1_Msk & (_UINT32_(value) << AC_SYNCBUSY_COMPCTRL1_Pos)) /* Assigment of value for COMPCTRL1 in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_COMPCTRL2_Pos _UINT32_(5) /* (AC_SYNCBUSY) COMPCTRL 2 Synchronization Busy Position */ +#define AC_SYNCBUSY_COMPCTRL2_Msk (_UINT32_(0x1) << AC_SYNCBUSY_COMPCTRL2_Pos) /* (AC_SYNCBUSY) COMPCTRL 2 Synchronization Busy Mask */ +#define AC_SYNCBUSY_COMPCTRL2(value) (AC_SYNCBUSY_COMPCTRL2_Msk & (_UINT32_(value) << AC_SYNCBUSY_COMPCTRL2_Pos)) /* Assigment of value for COMPCTRL2 in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_COMPCTRL3_Pos _UINT32_(6) /* (AC_SYNCBUSY) COMPCTRL 3 Synchronization Busy Position */ +#define AC_SYNCBUSY_COMPCTRL3_Msk (_UINT32_(0x1) << AC_SYNCBUSY_COMPCTRL3_Pos) /* (AC_SYNCBUSY) COMPCTRL 3 Synchronization Busy Mask */ +#define AC_SYNCBUSY_COMPCTRL3(value) (AC_SYNCBUSY_COMPCTRL3_Msk & (_UINT32_(value) << AC_SYNCBUSY_COMPCTRL3_Pos)) /* Assigment of value for COMPCTRL3 in the AC_SYNCBUSY register */ +#define AC_SYNCBUSY_Msk _UINT32_(0x0000007F) /* (AC_SYNCBUSY) Register Mask */ + +#define AC_SYNCBUSY_COMPCTRL_Pos _UINT32_(3) /* (AC_SYNCBUSY Position) COMPCTRL 3 Synchronization Busy */ +#define AC_SYNCBUSY_COMPCTRL_Msk (_UINT32_(0xF) << AC_SYNCBUSY_COMPCTRL_Pos) /* (AC_SYNCBUSY Mask) COMPCTRL */ +#define AC_SYNCBUSY_COMPCTRL(value) (AC_SYNCBUSY_COMPCTRL_Msk & (_UINT32_(value) << AC_SYNCBUSY_COMPCTRL_Pos)) + +/** \brief AC register offsets definitions */ +#define AC_CTRLA_REG_OFST _UINT32_(0x00) /* (AC_CTRLA) Control A Offset */ +#define AC_CTRLB_REG_OFST _UINT32_(0x01) /* (AC_CTRLB) Control B Offset */ +#define AC_EVCTRL_REG_OFST _UINT32_(0x02) /* (AC_EVCTRL) Event Control Offset */ +#define AC_INTENCLR_REG_OFST _UINT32_(0x04) /* (AC_INTENCLR) Interrupt Enable Clear Offset */ +#define AC_INTENSET_REG_OFST _UINT32_(0x05) /* (AC_INTENSET) Interrupt Enable Set Offset */ +#define AC_INTFLAG_REG_OFST _UINT32_(0x06) /* (AC_INTFLAG) Interrupt Flag Status and Clear Offset */ +#define AC_STATUSA_REG_OFST _UINT32_(0x07) /* (AC_STATUSA) Status A Offset */ +#define AC_STATUSB_REG_OFST _UINT32_(0x08) /* (AC_STATUSB) Status B Offset */ +#define AC_DBGCTRL_REG_OFST _UINT32_(0x09) /* (AC_DBGCTRL) Debug Control Offset */ +#define AC_WINCTRL_REG_OFST _UINT32_(0x0A) /* (AC_WINCTRL) Window Control Offset */ +#define AC_SCALER_REG_OFST _UINT32_(0x0C) /* (AC_SCALER) Scaler n Offset */ +#define AC_SCALER0_REG_OFST _UINT32_(0x0C) /* (AC_SCALER0) Scaler n Offset */ +#define AC_SCALER1_REG_OFST _UINT32_(0x0D) /* (AC_SCALER1) Scaler n Offset */ +#define AC_SCALER2_REG_OFST _UINT32_(0x0E) /* (AC_SCALER2) Scaler n Offset */ +#define AC_SCALER3_REG_OFST _UINT32_(0x0F) /* (AC_SCALER3) Scaler n Offset */ +#define AC_COMPCTRL_REG_OFST _UINT32_(0x10) /* (AC_COMPCTRL) Comparator Control n Offset */ +#define AC_COMPCTRL0_REG_OFST _UINT32_(0x10) /* (AC_COMPCTRL0) Comparator Control n Offset */ +#define AC_COMPCTRL1_REG_OFST _UINT32_(0x14) /* (AC_COMPCTRL1) Comparator Control n Offset */ +#define AC_COMPCTRL2_REG_OFST _UINT32_(0x18) /* (AC_COMPCTRL2) Comparator Control n Offset */ +#define AC_COMPCTRL3_REG_OFST _UINT32_(0x1C) /* (AC_COMPCTRL3) Comparator Control n Offset */ +#define AC_SYNCBUSY_REG_OFST _UINT32_(0x20) /* (AC_SYNCBUSY) Synchronization Busy Offset */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief AC register API structure */ +typedef struct +{ /* Analog Comparators */ + __IO uint8_t AC_CTRLA; /**< Offset: 0x00 (R/W 8) Control A */ + __O uint8_t AC_CTRLB; /**< Offset: 0x01 ( /W 8) Control B */ + __IO uint16_t AC_EVCTRL; /**< Offset: 0x02 (R/W 16) Event Control */ + __IO uint8_t AC_INTENCLR; /**< Offset: 0x04 (R/W 8) Interrupt Enable Clear */ + __IO uint8_t AC_INTENSET; /**< Offset: 0x05 (R/W 8) Interrupt Enable Set */ + __IO uint8_t AC_INTFLAG; /**< Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear */ + __I uint8_t AC_STATUSA; /**< Offset: 0x07 (R/ 8) Status A */ + __I uint8_t AC_STATUSB; /**< Offset: 0x08 (R/ 8) Status B */ + __IO uint8_t AC_DBGCTRL; /**< Offset: 0x09 (R/W 8) Debug Control */ + __IO uint8_t AC_WINCTRL; /**< Offset: 0x0A (R/W 8) Window Control */ + __I uint8_t Reserved1[0x01]; + __IO uint8_t AC_SCALER[4]; /**< Offset: 0x0C (R/W 8) Scaler n */ + __IO uint32_t AC_COMPCTRL[4]; /**< Offset: 0x10 (R/W 32) Comparator Control n */ + __I uint32_t AC_SYNCBUSY; /**< Offset: 0x20 (R/ 32) Synchronization Busy */ +} ac_registers_t; + + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* _SAMC21_AC_COMPONENT_H_ */ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/adc.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/adc.h new file mode 100644 index 00000000..bb368e60 --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/adc.h @@ -0,0 +1,523 @@ +/* + * Component description for ADC + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_ADC_COMPONENT_H_ +#define _SAMC21_ADC_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR ADC */ +/* ************************************************************************** */ + +/* -------- ADC_CTRLA : (ADC Offset: 0x00) (R/W 8) Control A -------- */ +#define ADC_CTRLA_RESETVALUE _UINT8_(0x00) /* (ADC_CTRLA) Control A Reset Value */ + +#define ADC_CTRLA_SWRST_Pos _UINT8_(0) /* (ADC_CTRLA) Software Reset Position */ +#define ADC_CTRLA_SWRST_Msk (_UINT8_(0x1) << ADC_CTRLA_SWRST_Pos) /* (ADC_CTRLA) Software Reset Mask */ +#define ADC_CTRLA_SWRST(value) (ADC_CTRLA_SWRST_Msk & (_UINT8_(value) << ADC_CTRLA_SWRST_Pos)) /* Assigment of value for SWRST in the ADC_CTRLA register */ +#define ADC_CTRLA_ENABLE_Pos _UINT8_(1) /* (ADC_CTRLA) Enable Position */ +#define ADC_CTRLA_ENABLE_Msk (_UINT8_(0x1) << ADC_CTRLA_ENABLE_Pos) /* (ADC_CTRLA) Enable Mask */ +#define ADC_CTRLA_ENABLE(value) (ADC_CTRLA_ENABLE_Msk & (_UINT8_(value) << ADC_CTRLA_ENABLE_Pos)) /* Assigment of value for ENABLE in the ADC_CTRLA register */ +#define ADC_CTRLA_SLAVEEN_Pos _UINT8_(5) /* (ADC_CTRLA) Slave Enable Position */ +#define ADC_CTRLA_SLAVEEN_Msk (_UINT8_(0x1) << ADC_CTRLA_SLAVEEN_Pos) /* (ADC_CTRLA) Slave Enable Mask */ +#define ADC_CTRLA_SLAVEEN(value) (ADC_CTRLA_SLAVEEN_Msk & (_UINT8_(value) << ADC_CTRLA_SLAVEEN_Pos)) /* Assigment of value for SLAVEEN in the ADC_CTRLA register */ +#define ADC_CTRLA_RUNSTDBY_Pos _UINT8_(6) /* (ADC_CTRLA) Run During Standby Position */ +#define ADC_CTRLA_RUNSTDBY_Msk (_UINT8_(0x1) << ADC_CTRLA_RUNSTDBY_Pos) /* (ADC_CTRLA) Run During Standby Mask */ +#define ADC_CTRLA_RUNSTDBY(value) (ADC_CTRLA_RUNSTDBY_Msk & (_UINT8_(value) << ADC_CTRLA_RUNSTDBY_Pos)) /* Assigment of value for RUNSTDBY in the ADC_CTRLA register */ +#define ADC_CTRLA_ONDEMAND_Pos _UINT8_(7) /* (ADC_CTRLA) On Demand Control Position */ +#define ADC_CTRLA_ONDEMAND_Msk (_UINT8_(0x1) << ADC_CTRLA_ONDEMAND_Pos) /* (ADC_CTRLA) On Demand Control Mask */ +#define ADC_CTRLA_ONDEMAND(value) (ADC_CTRLA_ONDEMAND_Msk & (_UINT8_(value) << ADC_CTRLA_ONDEMAND_Pos)) /* Assigment of value for ONDEMAND in the ADC_CTRLA register */ +#define ADC_CTRLA_Msk _UINT8_(0xE3) /* (ADC_CTRLA) Register Mask */ + + +/* -------- ADC_CTRLB : (ADC Offset: 0x01) (R/W 8) Control B -------- */ +#define ADC_CTRLB_RESETVALUE _UINT8_(0x00) /* (ADC_CTRLB) Control B Reset Value */ + +#define ADC_CTRLB_PRESCALER_Pos _UINT8_(0) /* (ADC_CTRLB) Prescaler Configuration Position */ +#define ADC_CTRLB_PRESCALER_Msk (_UINT8_(0x7) << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Prescaler Configuration Mask */ +#define ADC_CTRLB_PRESCALER(value) (ADC_CTRLB_PRESCALER_Msk & (_UINT8_(value) << ADC_CTRLB_PRESCALER_Pos)) /* Assigment of value for PRESCALER in the ADC_CTRLB register */ +#define ADC_CTRLB_PRESCALER_DIV2_Val _UINT8_(0x0) /* (ADC_CTRLB) Peripheral clock / 2 */ +#define ADC_CTRLB_PRESCALER_DIV4_Val _UINT8_(0x1) /* (ADC_CTRLB) Peripheral clock / 4 */ +#define ADC_CTRLB_PRESCALER_DIV8_Val _UINT8_(0x2) /* (ADC_CTRLB) Peripheral clock / 8 */ +#define ADC_CTRLB_PRESCALER_DIV16_Val _UINT8_(0x3) /* (ADC_CTRLB) Peripheral clock / 16 */ +#define ADC_CTRLB_PRESCALER_DIV32_Val _UINT8_(0x4) /* (ADC_CTRLB) Peripheral clock / 32 */ +#define ADC_CTRLB_PRESCALER_DIV64_Val _UINT8_(0x5) /* (ADC_CTRLB) Peripheral clock / 64 */ +#define ADC_CTRLB_PRESCALER_DIV128_Val _UINT8_(0x6) /* (ADC_CTRLB) Peripheral clock / 128 */ +#define ADC_CTRLB_PRESCALER_DIV256_Val _UINT8_(0x7) /* (ADC_CTRLB) Peripheral clock / 256 */ +#define ADC_CTRLB_PRESCALER_DIV2 (ADC_CTRLB_PRESCALER_DIV2_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 2 Position */ +#define ADC_CTRLB_PRESCALER_DIV4 (ADC_CTRLB_PRESCALER_DIV4_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 4 Position */ +#define ADC_CTRLB_PRESCALER_DIV8 (ADC_CTRLB_PRESCALER_DIV8_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 8 Position */ +#define ADC_CTRLB_PRESCALER_DIV16 (ADC_CTRLB_PRESCALER_DIV16_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 16 Position */ +#define ADC_CTRLB_PRESCALER_DIV32 (ADC_CTRLB_PRESCALER_DIV32_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 32 Position */ +#define ADC_CTRLB_PRESCALER_DIV64 (ADC_CTRLB_PRESCALER_DIV64_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 64 Position */ +#define ADC_CTRLB_PRESCALER_DIV128 (ADC_CTRLB_PRESCALER_DIV128_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 128 Position */ +#define ADC_CTRLB_PRESCALER_DIV256 (ADC_CTRLB_PRESCALER_DIV256_Val << ADC_CTRLB_PRESCALER_Pos) /* (ADC_CTRLB) Peripheral clock / 256 Position */ +#define ADC_CTRLB_Msk _UINT8_(0x07) /* (ADC_CTRLB) Register Mask */ + + +/* -------- ADC_REFCTRL : (ADC Offset: 0x02) (R/W 8) Reference Control -------- */ +#define ADC_REFCTRL_RESETVALUE _UINT8_(0x00) /* (ADC_REFCTRL) Reference Control Reset Value */ + +#define ADC_REFCTRL_REFSEL_Pos _UINT8_(0) /* (ADC_REFCTRL) Reference Selection Position */ +#define ADC_REFCTRL_REFSEL_Msk (_UINT8_(0xF) << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) Reference Selection Mask */ +#define ADC_REFCTRL_REFSEL(value) (ADC_REFCTRL_REFSEL_Msk & (_UINT8_(value) << ADC_REFCTRL_REFSEL_Pos)) /* Assigment of value for REFSEL in the ADC_REFCTRL register */ +#define ADC_REFCTRL_REFSEL_INTREF_Val _UINT8_(0x0) /* (ADC_REFCTRL) Internal Bandgap Reference */ +#define ADC_REFCTRL_REFSEL_INTVCC0_Val _UINT8_(0x1) /* (ADC_REFCTRL) 1/1.6 VDDANA */ +#define ADC_REFCTRL_REFSEL_INTVCC1_Val _UINT8_(0x2) /* (ADC_REFCTRL) 1/2 VDDANA */ +#define ADC_REFCTRL_REFSEL_AREFA_Val _UINT8_(0x3) /* (ADC_REFCTRL) External Reference */ +#define ADC_REFCTRL_REFSEL_DAC_Val _UINT8_(0x4) /* (ADC_REFCTRL) DAC */ +#define ADC_REFCTRL_REFSEL_INTVCC2_Val _UINT8_(0x5) /* (ADC_REFCTRL) VDDANA */ +#define ADC_REFCTRL_REFSEL_INTREF (ADC_REFCTRL_REFSEL_INTREF_Val << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) Internal Bandgap Reference Position */ +#define ADC_REFCTRL_REFSEL_INTVCC0 (ADC_REFCTRL_REFSEL_INTVCC0_Val << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) 1/1.6 VDDANA Position */ +#define ADC_REFCTRL_REFSEL_INTVCC1 (ADC_REFCTRL_REFSEL_INTVCC1_Val << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) 1/2 VDDANA Position */ +#define ADC_REFCTRL_REFSEL_AREFA (ADC_REFCTRL_REFSEL_AREFA_Val << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) External Reference Position */ +#define ADC_REFCTRL_REFSEL_DAC (ADC_REFCTRL_REFSEL_DAC_Val << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) DAC Position */ +#define ADC_REFCTRL_REFSEL_INTVCC2 (ADC_REFCTRL_REFSEL_INTVCC2_Val << ADC_REFCTRL_REFSEL_Pos) /* (ADC_REFCTRL) VDDANA Position */ +#define ADC_REFCTRL_REFCOMP_Pos _UINT8_(7) /* (ADC_REFCTRL) Reference Buffer Offset Compensation Enable Position */ +#define ADC_REFCTRL_REFCOMP_Msk (_UINT8_(0x1) << ADC_REFCTRL_REFCOMP_Pos) /* (ADC_REFCTRL) Reference Buffer Offset Compensation Enable Mask */ +#define ADC_REFCTRL_REFCOMP(value) (ADC_REFCTRL_REFCOMP_Msk & (_UINT8_(value) << ADC_REFCTRL_REFCOMP_Pos)) /* Assigment of value for REFCOMP in the ADC_REFCTRL register */ +#define ADC_REFCTRL_Msk _UINT8_(0x8F) /* (ADC_REFCTRL) Register Mask */ + + +/* -------- ADC_EVCTRL : (ADC Offset: 0x03) (R/W 8) Event Control -------- */ +#define ADC_EVCTRL_RESETVALUE _UINT8_(0x00) /* (ADC_EVCTRL) Event Control Reset Value */ + +#define ADC_EVCTRL_FLUSHEI_Pos _UINT8_(0) /* (ADC_EVCTRL) Flush Event Input Enable Position */ +#define ADC_EVCTRL_FLUSHEI_Msk (_UINT8_(0x1) << ADC_EVCTRL_FLUSHEI_Pos) /* (ADC_EVCTRL) Flush Event Input Enable Mask */ +#define ADC_EVCTRL_FLUSHEI(value) (ADC_EVCTRL_FLUSHEI_Msk & (_UINT8_(value) << ADC_EVCTRL_FLUSHEI_Pos)) /* Assigment of value for FLUSHEI in the ADC_EVCTRL register */ +#define ADC_EVCTRL_STARTEI_Pos _UINT8_(1) /* (ADC_EVCTRL) Start Conversion Event Input Enable Position */ +#define ADC_EVCTRL_STARTEI_Msk (_UINT8_(0x1) << ADC_EVCTRL_STARTEI_Pos) /* (ADC_EVCTRL) Start Conversion Event Input Enable Mask */ +#define ADC_EVCTRL_STARTEI(value) (ADC_EVCTRL_STARTEI_Msk & (_UINT8_(value) << ADC_EVCTRL_STARTEI_Pos)) /* Assigment of value for STARTEI in the ADC_EVCTRL register */ +#define ADC_EVCTRL_FLUSHINV_Pos _UINT8_(2) /* (ADC_EVCTRL) Flush Event Invert Enable Position */ +#define ADC_EVCTRL_FLUSHINV_Msk (_UINT8_(0x1) << ADC_EVCTRL_FLUSHINV_Pos) /* (ADC_EVCTRL) Flush Event Invert Enable Mask */ +#define ADC_EVCTRL_FLUSHINV(value) (ADC_EVCTRL_FLUSHINV_Msk & (_UINT8_(value) << ADC_EVCTRL_FLUSHINV_Pos)) /* Assigment of value for FLUSHINV in the ADC_EVCTRL register */ +#define ADC_EVCTRL_STARTINV_Pos _UINT8_(3) /* (ADC_EVCTRL) Start Event Invert Enable Position */ +#define ADC_EVCTRL_STARTINV_Msk (_UINT8_(0x1) << ADC_EVCTRL_STARTINV_Pos) /* (ADC_EVCTRL) Start Event Invert Enable Mask */ +#define ADC_EVCTRL_STARTINV(value) (ADC_EVCTRL_STARTINV_Msk & (_UINT8_(value) << ADC_EVCTRL_STARTINV_Pos)) /* Assigment of value for STARTINV in the ADC_EVCTRL register */ +#define ADC_EVCTRL_RESRDYEO_Pos _UINT8_(4) /* (ADC_EVCTRL) Result Ready Event Out Position */ +#define ADC_EVCTRL_RESRDYEO_Msk (_UINT8_(0x1) << ADC_EVCTRL_RESRDYEO_Pos) /* (ADC_EVCTRL) Result Ready Event Out Mask */ +#define ADC_EVCTRL_RESRDYEO(value) (ADC_EVCTRL_RESRDYEO_Msk & (_UINT8_(value) << ADC_EVCTRL_RESRDYEO_Pos)) /* Assigment of value for RESRDYEO in the ADC_EVCTRL register */ +#define ADC_EVCTRL_WINMONEO_Pos _UINT8_(5) /* (ADC_EVCTRL) Window Monitor Event Out Position */ +#define ADC_EVCTRL_WINMONEO_Msk (_UINT8_(0x1) << ADC_EVCTRL_WINMONEO_Pos) /* (ADC_EVCTRL) Window Monitor Event Out Mask */ +#define ADC_EVCTRL_WINMONEO(value) (ADC_EVCTRL_WINMONEO_Msk & (_UINT8_(value) << ADC_EVCTRL_WINMONEO_Pos)) /* Assigment of value for WINMONEO in the ADC_EVCTRL register */ +#define ADC_EVCTRL_Msk _UINT8_(0x3F) /* (ADC_EVCTRL) Register Mask */ + + +/* -------- ADC_INTENCLR : (ADC Offset: 0x04) (R/W 8) Interrupt Enable Clear -------- */ +#define ADC_INTENCLR_RESETVALUE _UINT8_(0x00) /* (ADC_INTENCLR) Interrupt Enable Clear Reset Value */ + +#define ADC_INTENCLR_RESRDY_Pos _UINT8_(0) /* (ADC_INTENCLR) Result Ready Interrupt Disable Position */ +#define ADC_INTENCLR_RESRDY_Msk (_UINT8_(0x1) << ADC_INTENCLR_RESRDY_Pos) /* (ADC_INTENCLR) Result Ready Interrupt Disable Mask */ +#define ADC_INTENCLR_RESRDY(value) (ADC_INTENCLR_RESRDY_Msk & (_UINT8_(value) << ADC_INTENCLR_RESRDY_Pos)) /* Assigment of value for RESRDY in the ADC_INTENCLR register */ +#define ADC_INTENCLR_OVERRUN_Pos _UINT8_(1) /* (ADC_INTENCLR) Overrun Interrupt Disable Position */ +#define ADC_INTENCLR_OVERRUN_Msk (_UINT8_(0x1) << ADC_INTENCLR_OVERRUN_Pos) /* (ADC_INTENCLR) Overrun Interrupt Disable Mask */ +#define ADC_INTENCLR_OVERRUN(value) (ADC_INTENCLR_OVERRUN_Msk & (_UINT8_(value) << ADC_INTENCLR_OVERRUN_Pos)) /* Assigment of value for OVERRUN in the ADC_INTENCLR register */ +#define ADC_INTENCLR_WINMON_Pos _UINT8_(2) /* (ADC_INTENCLR) Window Monitor Interrupt Disable Position */ +#define ADC_INTENCLR_WINMON_Msk (_UINT8_(0x1) << ADC_INTENCLR_WINMON_Pos) /* (ADC_INTENCLR) Window Monitor Interrupt Disable Mask */ +#define ADC_INTENCLR_WINMON(value) (ADC_INTENCLR_WINMON_Msk & (_UINT8_(value) << ADC_INTENCLR_WINMON_Pos)) /* Assigment of value for WINMON in the ADC_INTENCLR register */ +#define ADC_INTENCLR_Msk _UINT8_(0x07) /* (ADC_INTENCLR) Register Mask */ + + +/* -------- ADC_INTENSET : (ADC Offset: 0x05) (R/W 8) Interrupt Enable Set -------- */ +#define ADC_INTENSET_RESETVALUE _UINT8_(0x00) /* (ADC_INTENSET) Interrupt Enable Set Reset Value */ + +#define ADC_INTENSET_RESRDY_Pos _UINT8_(0) /* (ADC_INTENSET) Result Ready Interrupt Enable Position */ +#define ADC_INTENSET_RESRDY_Msk (_UINT8_(0x1) << ADC_INTENSET_RESRDY_Pos) /* (ADC_INTENSET) Result Ready Interrupt Enable Mask */ +#define ADC_INTENSET_RESRDY(value) (ADC_INTENSET_RESRDY_Msk & (_UINT8_(value) << ADC_INTENSET_RESRDY_Pos)) /* Assigment of value for RESRDY in the ADC_INTENSET register */ +#define ADC_INTENSET_OVERRUN_Pos _UINT8_(1) /* (ADC_INTENSET) Overrun Interrupt Enable Position */ +#define ADC_INTENSET_OVERRUN_Msk (_UINT8_(0x1) << ADC_INTENSET_OVERRUN_Pos) /* (ADC_INTENSET) Overrun Interrupt Enable Mask */ +#define ADC_INTENSET_OVERRUN(value) (ADC_INTENSET_OVERRUN_Msk & (_UINT8_(value) << ADC_INTENSET_OVERRUN_Pos)) /* Assigment of value for OVERRUN in the ADC_INTENSET register */ +#define ADC_INTENSET_WINMON_Pos _UINT8_(2) /* (ADC_INTENSET) Window Monitor Interrupt Enable Position */ +#define ADC_INTENSET_WINMON_Msk (_UINT8_(0x1) << ADC_INTENSET_WINMON_Pos) /* (ADC_INTENSET) Window Monitor Interrupt Enable Mask */ +#define ADC_INTENSET_WINMON(value) (ADC_INTENSET_WINMON_Msk & (_UINT8_(value) << ADC_INTENSET_WINMON_Pos)) /* Assigment of value for WINMON in the ADC_INTENSET register */ +#define ADC_INTENSET_Msk _UINT8_(0x07) /* (ADC_INTENSET) Register Mask */ + + +/* -------- ADC_INTFLAG : (ADC Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear -------- */ +#define ADC_INTFLAG_RESETVALUE _UINT8_(0x00) /* (ADC_INTFLAG) Interrupt Flag Status and Clear Reset Value */ + +#define ADC_INTFLAG_RESRDY_Pos _UINT8_(0) /* (ADC_INTFLAG) Result Ready Interrupt Flag Position */ +#define ADC_INTFLAG_RESRDY_Msk (_UINT8_(0x1) << ADC_INTFLAG_RESRDY_Pos) /* (ADC_INTFLAG) Result Ready Interrupt Flag Mask */ +#define ADC_INTFLAG_RESRDY(value) (ADC_INTFLAG_RESRDY_Msk & (_UINT8_(value) << ADC_INTFLAG_RESRDY_Pos)) /* Assigment of value for RESRDY in the ADC_INTFLAG register */ +#define ADC_INTFLAG_OVERRUN_Pos _UINT8_(1) /* (ADC_INTFLAG) Overrun Interrupt Flag Position */ +#define ADC_INTFLAG_OVERRUN_Msk (_UINT8_(0x1) << ADC_INTFLAG_OVERRUN_Pos) /* (ADC_INTFLAG) Overrun Interrupt Flag Mask */ +#define ADC_INTFLAG_OVERRUN(value) (ADC_INTFLAG_OVERRUN_Msk & (_UINT8_(value) << ADC_INTFLAG_OVERRUN_Pos)) /* Assigment of value for OVERRUN in the ADC_INTFLAG register */ +#define ADC_INTFLAG_WINMON_Pos _UINT8_(2) /* (ADC_INTFLAG) Window Monitor Interrupt Flag Position */ +#define ADC_INTFLAG_WINMON_Msk (_UINT8_(0x1) << ADC_INTFLAG_WINMON_Pos) /* (ADC_INTFLAG) Window Monitor Interrupt Flag Mask */ +#define ADC_INTFLAG_WINMON(value) (ADC_INTFLAG_WINMON_Msk & (_UINT8_(value) << ADC_INTFLAG_WINMON_Pos)) /* Assigment of value for WINMON in the ADC_INTFLAG register */ +#define ADC_INTFLAG_Msk _UINT8_(0x07) /* (ADC_INTFLAG) Register Mask */ + + +/* -------- ADC_SEQSTATUS : (ADC Offset: 0x07) ( R/ 8) Sequence Status -------- */ +#define ADC_SEQSTATUS_RESETVALUE _UINT8_(0x00) /* (ADC_SEQSTATUS) Sequence Status Reset Value */ + +#define ADC_SEQSTATUS_SEQSTATE_Pos _UINT8_(0) /* (ADC_SEQSTATUS) Sequence State Position */ +#define ADC_SEQSTATUS_SEQSTATE_Msk (_UINT8_(0x1F) << ADC_SEQSTATUS_SEQSTATE_Pos) /* (ADC_SEQSTATUS) Sequence State Mask */ +#define ADC_SEQSTATUS_SEQSTATE(value) (ADC_SEQSTATUS_SEQSTATE_Msk & (_UINT8_(value) << ADC_SEQSTATUS_SEQSTATE_Pos)) /* Assigment of value for SEQSTATE in the ADC_SEQSTATUS register */ +#define ADC_SEQSTATUS_SEQBUSY_Pos _UINT8_(7) /* (ADC_SEQSTATUS) Sequence Busy Position */ +#define ADC_SEQSTATUS_SEQBUSY_Msk (_UINT8_(0x1) << ADC_SEQSTATUS_SEQBUSY_Pos) /* (ADC_SEQSTATUS) Sequence Busy Mask */ +#define ADC_SEQSTATUS_SEQBUSY(value) (ADC_SEQSTATUS_SEQBUSY_Msk & (_UINT8_(value) << ADC_SEQSTATUS_SEQBUSY_Pos)) /* Assigment of value for SEQBUSY in the ADC_SEQSTATUS register */ +#define ADC_SEQSTATUS_Msk _UINT8_(0x9F) /* (ADC_SEQSTATUS) Register Mask */ + + +/* -------- ADC_INPUTCTRL : (ADC Offset: 0x08) (R/W 16) Input Control -------- */ +#define ADC_INPUTCTRL_RESETVALUE _UINT16_(0x00) /* (ADC_INPUTCTRL) Input Control Reset Value */ + +#define ADC_INPUTCTRL_MUXPOS_Pos _UINT16_(0) /* (ADC_INPUTCTRL) Positive Mux Input Selection Position */ +#define ADC_INPUTCTRL_MUXPOS_Msk (_UINT16_(0x1F) << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) Positive Mux Input Selection Mask */ +#define ADC_INPUTCTRL_MUXPOS(value) (ADC_INPUTCTRL_MUXPOS_Msk & (_UINT16_(value) << ADC_INPUTCTRL_MUXPOS_Pos)) /* Assigment of value for MUXPOS in the ADC_INPUTCTRL register */ +#define ADC_INPUTCTRL_MUXPOS_AIN0_Val _UINT16_(0x0) /* (ADC_INPUTCTRL) ADC AIN0 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN1_Val _UINT16_(0x1) /* (ADC_INPUTCTRL) ADC AIN1 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN2_Val _UINT16_(0x2) /* (ADC_INPUTCTRL) ADC AIN2 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN3_Val _UINT16_(0x3) /* (ADC_INPUTCTRL) ADC AIN3 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN4_Val _UINT16_(0x4) /* (ADC_INPUTCTRL) ADC AIN4 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN5_Val _UINT16_(0x5) /* (ADC_INPUTCTRL) ADC AIN5 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN6_Val _UINT16_(0x6) /* (ADC_INPUTCTRL) ADC AIN6 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN7_Val _UINT16_(0x7) /* (ADC_INPUTCTRL) ADC AIN7 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN8_Val _UINT16_(0x8) /* (ADC_INPUTCTRL) ADC AIN8 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN9_Val _UINT16_(0x9) /* (ADC_INPUTCTRL) ADC AIN9 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN10_Val _UINT16_(0xA) /* (ADC_INPUTCTRL) ADC AIN10 Pin */ +#define ADC_INPUTCTRL_MUXPOS_AIN11_Val _UINT16_(0xB) /* (ADC_INPUTCTRL) ADC AIN11 Pin */ +#define ADC_INPUTCTRL_MUXPOS_BANDGAP_Val _UINT16_(0x19) /* (ADC_INPUTCTRL) Bandgap Voltage */ +#define ADC_INPUTCTRL_MUXPOS_SCALEDCOREVCC_Val _UINT16_(0x1A) /* (ADC_INPUTCTRL) 1/4 Scaled Core Supply */ +#define ADC_INPUTCTRL_MUXPOS_SCALEDIOVCC_Val _UINT16_(0x1B) /* (ADC_INPUTCTRL) 1/4 Scaled I/O Supply */ +#define ADC_INPUTCTRL_MUXPOS_DAC_Val _UINT16_(0x1C) /* (ADC_INPUTCTRL) DAC Output */ +#define ADC_INPUTCTRL_MUXPOS_AIN0 (ADC_INPUTCTRL_MUXPOS_AIN0_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN0 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN1 (ADC_INPUTCTRL_MUXPOS_AIN1_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN1 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN2 (ADC_INPUTCTRL_MUXPOS_AIN2_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN2 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN3 (ADC_INPUTCTRL_MUXPOS_AIN3_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN3 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN4 (ADC_INPUTCTRL_MUXPOS_AIN4_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN4 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN5 (ADC_INPUTCTRL_MUXPOS_AIN5_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN5 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN6 (ADC_INPUTCTRL_MUXPOS_AIN6_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN6 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN7 (ADC_INPUTCTRL_MUXPOS_AIN7_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN7 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN8 (ADC_INPUTCTRL_MUXPOS_AIN8_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN8 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN9 (ADC_INPUTCTRL_MUXPOS_AIN9_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN9 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN10 (ADC_INPUTCTRL_MUXPOS_AIN10_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN10 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_AIN11 (ADC_INPUTCTRL_MUXPOS_AIN11_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) ADC AIN11 Pin Position */ +#define ADC_INPUTCTRL_MUXPOS_BANDGAP (ADC_INPUTCTRL_MUXPOS_BANDGAP_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) Bandgap Voltage Position */ +#define ADC_INPUTCTRL_MUXPOS_SCALEDCOREVCC (ADC_INPUTCTRL_MUXPOS_SCALEDCOREVCC_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) 1/4 Scaled Core Supply Position */ +#define ADC_INPUTCTRL_MUXPOS_SCALEDIOVCC (ADC_INPUTCTRL_MUXPOS_SCALEDIOVCC_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) 1/4 Scaled I/O Supply Position */ +#define ADC_INPUTCTRL_MUXPOS_DAC (ADC_INPUTCTRL_MUXPOS_DAC_Val << ADC_INPUTCTRL_MUXPOS_Pos) /* (ADC_INPUTCTRL) DAC Output Position */ +#define ADC_INPUTCTRL_MUXNEG_Pos _UINT16_(8) /* (ADC_INPUTCTRL) Negative Mux Input Selection Position */ +#define ADC_INPUTCTRL_MUXNEG_Msk (_UINT16_(0x1F) << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) Negative Mux Input Selection Mask */ +#define ADC_INPUTCTRL_MUXNEG(value) (ADC_INPUTCTRL_MUXNEG_Msk & (_UINT16_(value) << ADC_INPUTCTRL_MUXNEG_Pos)) /* Assigment of value for MUXNEG in the ADC_INPUTCTRL register */ +#define ADC_INPUTCTRL_MUXNEG_AIN0_Val _UINT16_(0x0) /* (ADC_INPUTCTRL) ADC AIN0 Pin */ +#define ADC_INPUTCTRL_MUXNEG_AIN1_Val _UINT16_(0x1) /* (ADC_INPUTCTRL) ADC AIN1 Pin */ +#define ADC_INPUTCTRL_MUXNEG_AIN2_Val _UINT16_(0x2) /* (ADC_INPUTCTRL) ADC AIN2 Pin */ +#define ADC_INPUTCTRL_MUXNEG_AIN3_Val _UINT16_(0x3) /* (ADC_INPUTCTRL) ADC AIN3 Pin */ +#define ADC_INPUTCTRL_MUXNEG_AIN4_Val _UINT16_(0x4) /* (ADC_INPUTCTRL) ADC AIN4 Pin */ +#define ADC_INPUTCTRL_MUXNEG_AIN5_Val _UINT16_(0x5) /* (ADC_INPUTCTRL) ADC AIN5 Pin */ +#define ADC_INPUTCTRL_MUXNEG_GND_Val _UINT16_(0x18) /* (ADC_INPUTCTRL) Internal Ground */ +#define ADC_INPUTCTRL_MUXNEG_AIN0 (ADC_INPUTCTRL_MUXNEG_AIN0_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) ADC AIN0 Pin Position */ +#define ADC_INPUTCTRL_MUXNEG_AIN1 (ADC_INPUTCTRL_MUXNEG_AIN1_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) ADC AIN1 Pin Position */ +#define ADC_INPUTCTRL_MUXNEG_AIN2 (ADC_INPUTCTRL_MUXNEG_AIN2_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) ADC AIN2 Pin Position */ +#define ADC_INPUTCTRL_MUXNEG_AIN3 (ADC_INPUTCTRL_MUXNEG_AIN3_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) ADC AIN3 Pin Position */ +#define ADC_INPUTCTRL_MUXNEG_AIN4 (ADC_INPUTCTRL_MUXNEG_AIN4_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) ADC AIN4 Pin Position */ +#define ADC_INPUTCTRL_MUXNEG_AIN5 (ADC_INPUTCTRL_MUXNEG_AIN5_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) ADC AIN5 Pin Position */ +#define ADC_INPUTCTRL_MUXNEG_GND (ADC_INPUTCTRL_MUXNEG_GND_Val << ADC_INPUTCTRL_MUXNEG_Pos) /* (ADC_INPUTCTRL) Internal Ground Position */ +#define ADC_INPUTCTRL_Msk _UINT16_(0x1F1F) /* (ADC_INPUTCTRL) Register Mask */ + + +/* -------- ADC_CTRLC : (ADC Offset: 0x0A) (R/W 16) Control C -------- */ +#define ADC_CTRLC_RESETVALUE _UINT16_(0x00) /* (ADC_CTRLC) Control C Reset Value */ + +#define ADC_CTRLC_DIFFMODE_Pos _UINT16_(0) /* (ADC_CTRLC) Differential Mode Position */ +#define ADC_CTRLC_DIFFMODE_Msk (_UINT16_(0x1) << ADC_CTRLC_DIFFMODE_Pos) /* (ADC_CTRLC) Differential Mode Mask */ +#define ADC_CTRLC_DIFFMODE(value) (ADC_CTRLC_DIFFMODE_Msk & (_UINT16_(value) << ADC_CTRLC_DIFFMODE_Pos)) /* Assigment of value for DIFFMODE in the ADC_CTRLC register */ +#define ADC_CTRLC_LEFTADJ_Pos _UINT16_(1) /* (ADC_CTRLC) Left-Adjusted Result Position */ +#define ADC_CTRLC_LEFTADJ_Msk (_UINT16_(0x1) << ADC_CTRLC_LEFTADJ_Pos) /* (ADC_CTRLC) Left-Adjusted Result Mask */ +#define ADC_CTRLC_LEFTADJ(value) (ADC_CTRLC_LEFTADJ_Msk & (_UINT16_(value) << ADC_CTRLC_LEFTADJ_Pos)) /* Assigment of value for LEFTADJ in the ADC_CTRLC register */ +#define ADC_CTRLC_FREERUN_Pos _UINT16_(2) /* (ADC_CTRLC) Free Running Mode Position */ +#define ADC_CTRLC_FREERUN_Msk (_UINT16_(0x1) << ADC_CTRLC_FREERUN_Pos) /* (ADC_CTRLC) Free Running Mode Mask */ +#define ADC_CTRLC_FREERUN(value) (ADC_CTRLC_FREERUN_Msk & (_UINT16_(value) << ADC_CTRLC_FREERUN_Pos)) /* Assigment of value for FREERUN in the ADC_CTRLC register */ +#define ADC_CTRLC_CORREN_Pos _UINT16_(3) /* (ADC_CTRLC) Digital Correction Logic Enable Position */ +#define ADC_CTRLC_CORREN_Msk (_UINT16_(0x1) << ADC_CTRLC_CORREN_Pos) /* (ADC_CTRLC) Digital Correction Logic Enable Mask */ +#define ADC_CTRLC_CORREN(value) (ADC_CTRLC_CORREN_Msk & (_UINT16_(value) << ADC_CTRLC_CORREN_Pos)) /* Assigment of value for CORREN in the ADC_CTRLC register */ +#define ADC_CTRLC_RESSEL_Pos _UINT16_(4) /* (ADC_CTRLC) Conversion Result Resolution Position */ +#define ADC_CTRLC_RESSEL_Msk (_UINT16_(0x3) << ADC_CTRLC_RESSEL_Pos) /* (ADC_CTRLC) Conversion Result Resolution Mask */ +#define ADC_CTRLC_RESSEL(value) (ADC_CTRLC_RESSEL_Msk & (_UINT16_(value) << ADC_CTRLC_RESSEL_Pos)) /* Assigment of value for RESSEL in the ADC_CTRLC register */ +#define ADC_CTRLC_RESSEL_12BIT_Val _UINT16_(0x0) /* (ADC_CTRLC) 12-bit */ +#define ADC_CTRLC_RESSEL_16BIT_Val _UINT16_(0x1) /* (ADC_CTRLC) 16-bit averaging mode */ +#define ADC_CTRLC_RESSEL_10BIT_Val _UINT16_(0x2) /* (ADC_CTRLC) 10-bit */ +#define ADC_CTRLC_RESSEL_8BIT_Val _UINT16_(0x3) /* (ADC_CTRLC) 8-bit */ +#define ADC_CTRLC_RESSEL_12BIT (ADC_CTRLC_RESSEL_12BIT_Val << ADC_CTRLC_RESSEL_Pos) /* (ADC_CTRLC) 12-bit Position */ +#define ADC_CTRLC_RESSEL_16BIT (ADC_CTRLC_RESSEL_16BIT_Val << ADC_CTRLC_RESSEL_Pos) /* (ADC_CTRLC) 16-bit averaging mode Position */ +#define ADC_CTRLC_RESSEL_10BIT (ADC_CTRLC_RESSEL_10BIT_Val << ADC_CTRLC_RESSEL_Pos) /* (ADC_CTRLC) 10-bit Position */ +#define ADC_CTRLC_RESSEL_8BIT (ADC_CTRLC_RESSEL_8BIT_Val << ADC_CTRLC_RESSEL_Pos) /* (ADC_CTRLC) 8-bit Position */ +#define ADC_CTRLC_R2R_Pos _UINT16_(7) /* (ADC_CTRLC) Rail-to-Rail mode enable Position */ +#define ADC_CTRLC_R2R_Msk (_UINT16_(0x1) << ADC_CTRLC_R2R_Pos) /* (ADC_CTRLC) Rail-to-Rail mode enable Mask */ +#define ADC_CTRLC_R2R(value) (ADC_CTRLC_R2R_Msk & (_UINT16_(value) << ADC_CTRLC_R2R_Pos)) /* Assigment of value for R2R in the ADC_CTRLC register */ +#define ADC_CTRLC_WINMODE_Pos _UINT16_(8) /* (ADC_CTRLC) Window Monitor Mode Position */ +#define ADC_CTRLC_WINMODE_Msk (_UINT16_(0x7) << ADC_CTRLC_WINMODE_Pos) /* (ADC_CTRLC) Window Monitor Mode Mask */ +#define ADC_CTRLC_WINMODE(value) (ADC_CTRLC_WINMODE_Msk & (_UINT16_(value) << ADC_CTRLC_WINMODE_Pos)) /* Assigment of value for WINMODE in the ADC_CTRLC register */ +#define ADC_CTRLC_WINMODE_DISABLE_Val _UINT16_(0x0) /* (ADC_CTRLC) No window mode (default) */ +#define ADC_CTRLC_WINMODE_MODE1_Val _UINT16_(0x1) /* (ADC_CTRLC) RESULT > WINLT */ +#define ADC_CTRLC_WINMODE_MODE2_Val _UINT16_(0x2) /* (ADC_CTRLC) RESULT < WINUT */ +#define ADC_CTRLC_WINMODE_MODE3_Val _UINT16_(0x3) /* (ADC_CTRLC) WINLT < RESULT < WINUT */ +#define ADC_CTRLC_WINMODE_MODE4_Val _UINT16_(0x4) /* (ADC_CTRLC) !(WINLT < RESULT < WINUT) */ +#define ADC_CTRLC_WINMODE_DISABLE (ADC_CTRLC_WINMODE_DISABLE_Val << ADC_CTRLC_WINMODE_Pos) /* (ADC_CTRLC) No window mode (default) Position */ +#define ADC_CTRLC_WINMODE_MODE1 (ADC_CTRLC_WINMODE_MODE1_Val << ADC_CTRLC_WINMODE_Pos) /* (ADC_CTRLC) RESULT > WINLT Position */ +#define ADC_CTRLC_WINMODE_MODE2 (ADC_CTRLC_WINMODE_MODE2_Val << ADC_CTRLC_WINMODE_Pos) /* (ADC_CTRLC) RESULT < WINUT Position */ +#define ADC_CTRLC_WINMODE_MODE3 (ADC_CTRLC_WINMODE_MODE3_Val << ADC_CTRLC_WINMODE_Pos) /* (ADC_CTRLC) WINLT < RESULT < WINUT Position */ +#define ADC_CTRLC_WINMODE_MODE4 (ADC_CTRLC_WINMODE_MODE4_Val << ADC_CTRLC_WINMODE_Pos) /* (ADC_CTRLC) !(WINLT < RESULT < WINUT) Position */ +#define ADC_CTRLC_DUALSEL_Pos _UINT16_(12) /* (ADC_CTRLC) Dual Mode Trigger Selection Position */ +#define ADC_CTRLC_DUALSEL_Msk (_UINT16_(0x3) << ADC_CTRLC_DUALSEL_Pos) /* (ADC_CTRLC) Dual Mode Trigger Selection Mask */ +#define ADC_CTRLC_DUALSEL(value) (ADC_CTRLC_DUALSEL_Msk & (_UINT16_(value) << ADC_CTRLC_DUALSEL_Pos)) /* Assigment of value for DUALSEL in the ADC_CTRLC register */ +#define ADC_CTRLC_DUALSEL_BOTH_Val _UINT16_(0x0) /* (ADC_CTRLC) Start event or software trigger will start a conversion on both ADCs */ +#define ADC_CTRLC_DUALSEL_INTERLEAVE_Val _UINT16_(0x1) /* (ADC_CTRLC) START event or software trigger will alternately start a conversion on ADC0 and ADC1 */ +#define ADC_CTRLC_DUALSEL_BOTH (ADC_CTRLC_DUALSEL_BOTH_Val << ADC_CTRLC_DUALSEL_Pos) /* (ADC_CTRLC) Start event or software trigger will start a conversion on both ADCs Position */ +#define ADC_CTRLC_DUALSEL_INTERLEAVE (ADC_CTRLC_DUALSEL_INTERLEAVE_Val << ADC_CTRLC_DUALSEL_Pos) /* (ADC_CTRLC) START event or software trigger will alternately start a conversion on ADC0 and ADC1 Position */ +#define ADC_CTRLC_Msk _UINT16_(0x37BF) /* (ADC_CTRLC) Register Mask */ + + +/* -------- ADC_AVGCTRL : (ADC Offset: 0x0C) (R/W 8) Average Control -------- */ +#define ADC_AVGCTRL_RESETVALUE _UINT8_(0x00) /* (ADC_AVGCTRL) Average Control Reset Value */ + +#define ADC_AVGCTRL_SAMPLENUM_Pos _UINT8_(0) /* (ADC_AVGCTRL) Number of Samples to be Collected Position */ +#define ADC_AVGCTRL_SAMPLENUM_Msk (_UINT8_(0xF) << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) Number of Samples to be Collected Mask */ +#define ADC_AVGCTRL_SAMPLENUM(value) (ADC_AVGCTRL_SAMPLENUM_Msk & (_UINT8_(value) << ADC_AVGCTRL_SAMPLENUM_Pos)) /* Assigment of value for SAMPLENUM in the ADC_AVGCTRL register */ +#define ADC_AVGCTRL_SAMPLENUM_1_Val _UINT8_(0x0) /* (ADC_AVGCTRL) 1 sample */ +#define ADC_AVGCTRL_SAMPLENUM_2_Val _UINT8_(0x1) /* (ADC_AVGCTRL) 2 samples */ +#define ADC_AVGCTRL_SAMPLENUM_4_Val _UINT8_(0x2) /* (ADC_AVGCTRL) 4 samples */ +#define ADC_AVGCTRL_SAMPLENUM_8_Val _UINT8_(0x3) /* (ADC_AVGCTRL) 8 samples */ +#define ADC_AVGCTRL_SAMPLENUM_16_Val _UINT8_(0x4) /* (ADC_AVGCTRL) 16 samples */ +#define ADC_AVGCTRL_SAMPLENUM_32_Val _UINT8_(0x5) /* (ADC_AVGCTRL) 32 samples */ +#define ADC_AVGCTRL_SAMPLENUM_64_Val _UINT8_(0x6) /* (ADC_AVGCTRL) 64 samples */ +#define ADC_AVGCTRL_SAMPLENUM_128_Val _UINT8_(0x7) /* (ADC_AVGCTRL) 128 samples */ +#define ADC_AVGCTRL_SAMPLENUM_256_Val _UINT8_(0x8) /* (ADC_AVGCTRL) 256 samples */ +#define ADC_AVGCTRL_SAMPLENUM_512_Val _UINT8_(0x9) /* (ADC_AVGCTRL) 512 samples */ +#define ADC_AVGCTRL_SAMPLENUM_1024_Val _UINT8_(0xA) /* (ADC_AVGCTRL) 1024 samples */ +#define ADC_AVGCTRL_SAMPLENUM_1 (ADC_AVGCTRL_SAMPLENUM_1_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 1 sample Position */ +#define ADC_AVGCTRL_SAMPLENUM_2 (ADC_AVGCTRL_SAMPLENUM_2_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 2 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_4 (ADC_AVGCTRL_SAMPLENUM_4_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 4 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_8 (ADC_AVGCTRL_SAMPLENUM_8_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 8 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_16 (ADC_AVGCTRL_SAMPLENUM_16_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 16 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_32 (ADC_AVGCTRL_SAMPLENUM_32_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 32 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_64 (ADC_AVGCTRL_SAMPLENUM_64_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 64 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_128 (ADC_AVGCTRL_SAMPLENUM_128_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 128 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_256 (ADC_AVGCTRL_SAMPLENUM_256_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 256 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_512 (ADC_AVGCTRL_SAMPLENUM_512_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 512 samples Position */ +#define ADC_AVGCTRL_SAMPLENUM_1024 (ADC_AVGCTRL_SAMPLENUM_1024_Val << ADC_AVGCTRL_SAMPLENUM_Pos) /* (ADC_AVGCTRL) 1024 samples Position */ +#define ADC_AVGCTRL_ADJRES_Pos _UINT8_(4) /* (ADC_AVGCTRL) Adjusting Result / Division Coefficient Position */ +#define ADC_AVGCTRL_ADJRES_Msk (_UINT8_(0x7) << ADC_AVGCTRL_ADJRES_Pos) /* (ADC_AVGCTRL) Adjusting Result / Division Coefficient Mask */ +#define ADC_AVGCTRL_ADJRES(value) (ADC_AVGCTRL_ADJRES_Msk & (_UINT8_(value) << ADC_AVGCTRL_ADJRES_Pos)) /* Assigment of value for ADJRES in the ADC_AVGCTRL register */ +#define ADC_AVGCTRL_Msk _UINT8_(0x7F) /* (ADC_AVGCTRL) Register Mask */ + + +/* -------- ADC_SAMPCTRL : (ADC Offset: 0x0D) (R/W 8) Sample Time Control -------- */ +#define ADC_SAMPCTRL_RESETVALUE _UINT8_(0x00) /* (ADC_SAMPCTRL) Sample Time Control Reset Value */ + +#define ADC_SAMPCTRL_SAMPLEN_Pos _UINT8_(0) /* (ADC_SAMPCTRL) Sampling Time Length Position */ +#define ADC_SAMPCTRL_SAMPLEN_Msk (_UINT8_(0x3F) << ADC_SAMPCTRL_SAMPLEN_Pos) /* (ADC_SAMPCTRL) Sampling Time Length Mask */ +#define ADC_SAMPCTRL_SAMPLEN(value) (ADC_SAMPCTRL_SAMPLEN_Msk & (_UINT8_(value) << ADC_SAMPCTRL_SAMPLEN_Pos)) /* Assigment of value for SAMPLEN in the ADC_SAMPCTRL register */ +#define ADC_SAMPCTRL_OFFCOMP_Pos _UINT8_(7) /* (ADC_SAMPCTRL) Comparator Offset Compensation Enable Position */ +#define ADC_SAMPCTRL_OFFCOMP_Msk (_UINT8_(0x1) << ADC_SAMPCTRL_OFFCOMP_Pos) /* (ADC_SAMPCTRL) Comparator Offset Compensation Enable Mask */ +#define ADC_SAMPCTRL_OFFCOMP(value) (ADC_SAMPCTRL_OFFCOMP_Msk & (_UINT8_(value) << ADC_SAMPCTRL_OFFCOMP_Pos)) /* Assigment of value for OFFCOMP in the ADC_SAMPCTRL register */ +#define ADC_SAMPCTRL_Msk _UINT8_(0xBF) /* (ADC_SAMPCTRL) Register Mask */ + + +/* -------- ADC_WINLT : (ADC Offset: 0x0E) (R/W 16) Window Monitor Lower Threshold -------- */ +#define ADC_WINLT_RESETVALUE _UINT16_(0x00) /* (ADC_WINLT) Window Monitor Lower Threshold Reset Value */ + +#define ADC_WINLT_WINLT_Pos _UINT16_(0) /* (ADC_WINLT) Window Lower Threshold Position */ +#define ADC_WINLT_WINLT_Msk (_UINT16_(0xFFFF) << ADC_WINLT_WINLT_Pos) /* (ADC_WINLT) Window Lower Threshold Mask */ +#define ADC_WINLT_WINLT(value) (ADC_WINLT_WINLT_Msk & (_UINT16_(value) << ADC_WINLT_WINLT_Pos)) /* Assigment of value for WINLT in the ADC_WINLT register */ +#define ADC_WINLT_Msk _UINT16_(0xFFFF) /* (ADC_WINLT) Register Mask */ + + +/* -------- ADC_WINUT : (ADC Offset: 0x10) (R/W 16) Window Monitor Upper Threshold -------- */ +#define ADC_WINUT_RESETVALUE _UINT16_(0x00) /* (ADC_WINUT) Window Monitor Upper Threshold Reset Value */ + +#define ADC_WINUT_WINUT_Pos _UINT16_(0) /* (ADC_WINUT) Window Upper Threshold Position */ +#define ADC_WINUT_WINUT_Msk (_UINT16_(0xFFFF) << ADC_WINUT_WINUT_Pos) /* (ADC_WINUT) Window Upper Threshold Mask */ +#define ADC_WINUT_WINUT(value) (ADC_WINUT_WINUT_Msk & (_UINT16_(value) << ADC_WINUT_WINUT_Pos)) /* Assigment of value for WINUT in the ADC_WINUT register */ +#define ADC_WINUT_Msk _UINT16_(0xFFFF) /* (ADC_WINUT) Register Mask */ + + +/* -------- ADC_GAINCORR : (ADC Offset: 0x12) (R/W 16) Gain Correction -------- */ +#define ADC_GAINCORR_RESETVALUE _UINT16_(0x00) /* (ADC_GAINCORR) Gain Correction Reset Value */ + +#define ADC_GAINCORR_GAINCORR_Pos _UINT16_(0) /* (ADC_GAINCORR) Gain Correction Value Position */ +#define ADC_GAINCORR_GAINCORR_Msk (_UINT16_(0xFFF) << ADC_GAINCORR_GAINCORR_Pos) /* (ADC_GAINCORR) Gain Correction Value Mask */ +#define ADC_GAINCORR_GAINCORR(value) (ADC_GAINCORR_GAINCORR_Msk & (_UINT16_(value) << ADC_GAINCORR_GAINCORR_Pos)) /* Assigment of value for GAINCORR in the ADC_GAINCORR register */ +#define ADC_GAINCORR_Msk _UINT16_(0x0FFF) /* (ADC_GAINCORR) Register Mask */ + + +/* -------- ADC_OFFSETCORR : (ADC Offset: 0x14) (R/W 16) Offset Correction -------- */ +#define ADC_OFFSETCORR_RESETVALUE _UINT16_(0x00) /* (ADC_OFFSETCORR) Offset Correction Reset Value */ + +#define ADC_OFFSETCORR_OFFSETCORR_Pos _UINT16_(0) /* (ADC_OFFSETCORR) Offset Correction Value Position */ +#define ADC_OFFSETCORR_OFFSETCORR_Msk (_UINT16_(0xFFF) << ADC_OFFSETCORR_OFFSETCORR_Pos) /* (ADC_OFFSETCORR) Offset Correction Value Mask */ +#define ADC_OFFSETCORR_OFFSETCORR(value) (ADC_OFFSETCORR_OFFSETCORR_Msk & (_UINT16_(value) << ADC_OFFSETCORR_OFFSETCORR_Pos)) /* Assigment of value for OFFSETCORR in the ADC_OFFSETCORR register */ +#define ADC_OFFSETCORR_Msk _UINT16_(0x0FFF) /* (ADC_OFFSETCORR) Register Mask */ + + +/* -------- ADC_SWTRIG : (ADC Offset: 0x18) (R/W 8) Software Trigger -------- */ +#define ADC_SWTRIG_RESETVALUE _UINT8_(0x00) /* (ADC_SWTRIG) Software Trigger Reset Value */ + +#define ADC_SWTRIG_FLUSH_Pos _UINT8_(0) /* (ADC_SWTRIG) ADC Flush Position */ +#define ADC_SWTRIG_FLUSH_Msk (_UINT8_(0x1) << ADC_SWTRIG_FLUSH_Pos) /* (ADC_SWTRIG) ADC Flush Mask */ +#define ADC_SWTRIG_FLUSH(value) (ADC_SWTRIG_FLUSH_Msk & (_UINT8_(value) << ADC_SWTRIG_FLUSH_Pos)) /* Assigment of value for FLUSH in the ADC_SWTRIG register */ +#define ADC_SWTRIG_START_Pos _UINT8_(1) /* (ADC_SWTRIG) Start ADC Conversion Position */ +#define ADC_SWTRIG_START_Msk (_UINT8_(0x1) << ADC_SWTRIG_START_Pos) /* (ADC_SWTRIG) Start ADC Conversion Mask */ +#define ADC_SWTRIG_START(value) (ADC_SWTRIG_START_Msk & (_UINT8_(value) << ADC_SWTRIG_START_Pos)) /* Assigment of value for START in the ADC_SWTRIG register */ +#define ADC_SWTRIG_Msk _UINT8_(0x03) /* (ADC_SWTRIG) Register Mask */ + + +/* -------- ADC_DBGCTRL : (ADC Offset: 0x1C) (R/W 8) Debug Control -------- */ +#define ADC_DBGCTRL_RESETVALUE _UINT8_(0x00) /* (ADC_DBGCTRL) Debug Control Reset Value */ + +#define ADC_DBGCTRL_DBGRUN_Pos _UINT8_(0) /* (ADC_DBGCTRL) Debug Run Position */ +#define ADC_DBGCTRL_DBGRUN_Msk (_UINT8_(0x1) << ADC_DBGCTRL_DBGRUN_Pos) /* (ADC_DBGCTRL) Debug Run Mask */ +#define ADC_DBGCTRL_DBGRUN(value) (ADC_DBGCTRL_DBGRUN_Msk & (_UINT8_(value) << ADC_DBGCTRL_DBGRUN_Pos)) /* Assigment of value for DBGRUN in the ADC_DBGCTRL register */ +#define ADC_DBGCTRL_Msk _UINT8_(0x01) /* (ADC_DBGCTRL) Register Mask */ + + +/* -------- ADC_SYNCBUSY : (ADC Offset: 0x20) ( R/ 16) Synchronization Busy -------- */ +#define ADC_SYNCBUSY_RESETVALUE _UINT16_(0x00) /* (ADC_SYNCBUSY) Synchronization Busy Reset Value */ + +#define ADC_SYNCBUSY_SWRST_Pos _UINT16_(0) /* (ADC_SYNCBUSY) SWRST Synchronization Busy Position */ +#define ADC_SYNCBUSY_SWRST_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_SWRST_Pos) /* (ADC_SYNCBUSY) SWRST Synchronization Busy Mask */ +#define ADC_SYNCBUSY_SWRST(value) (ADC_SYNCBUSY_SWRST_Msk & (_UINT16_(value) << ADC_SYNCBUSY_SWRST_Pos)) /* Assigment of value for SWRST in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_ENABLE_Pos _UINT16_(1) /* (ADC_SYNCBUSY) ENABLE Synchronization Busy Position */ +#define ADC_SYNCBUSY_ENABLE_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_ENABLE_Pos) /* (ADC_SYNCBUSY) ENABLE Synchronization Busy Mask */ +#define ADC_SYNCBUSY_ENABLE(value) (ADC_SYNCBUSY_ENABLE_Msk & (_UINT16_(value) << ADC_SYNCBUSY_ENABLE_Pos)) /* Assigment of value for ENABLE in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_INPUTCTRL_Pos _UINT16_(2) /* (ADC_SYNCBUSY) INPUTCTRL Synchronization Busy Position */ +#define ADC_SYNCBUSY_INPUTCTRL_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_INPUTCTRL_Pos) /* (ADC_SYNCBUSY) INPUTCTRL Synchronization Busy Mask */ +#define ADC_SYNCBUSY_INPUTCTRL(value) (ADC_SYNCBUSY_INPUTCTRL_Msk & (_UINT16_(value) << ADC_SYNCBUSY_INPUTCTRL_Pos)) /* Assigment of value for INPUTCTRL in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_CTRLC_Pos _UINT16_(3) /* (ADC_SYNCBUSY) CTRLC Synchronization Busy Position */ +#define ADC_SYNCBUSY_CTRLC_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_CTRLC_Pos) /* (ADC_SYNCBUSY) CTRLC Synchronization Busy Mask */ +#define ADC_SYNCBUSY_CTRLC(value) (ADC_SYNCBUSY_CTRLC_Msk & (_UINT16_(value) << ADC_SYNCBUSY_CTRLC_Pos)) /* Assigment of value for CTRLC in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_AVGCTRL_Pos _UINT16_(4) /* (ADC_SYNCBUSY) AVGCTRL Synchronization Busy Position */ +#define ADC_SYNCBUSY_AVGCTRL_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_AVGCTRL_Pos) /* (ADC_SYNCBUSY) AVGCTRL Synchronization Busy Mask */ +#define ADC_SYNCBUSY_AVGCTRL(value) (ADC_SYNCBUSY_AVGCTRL_Msk & (_UINT16_(value) << ADC_SYNCBUSY_AVGCTRL_Pos)) /* Assigment of value for AVGCTRL in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_SAMPCTRL_Pos _UINT16_(5) /* (ADC_SYNCBUSY) SAMPCTRL Synchronization Busy Position */ +#define ADC_SYNCBUSY_SAMPCTRL_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_SAMPCTRL_Pos) /* (ADC_SYNCBUSY) SAMPCTRL Synchronization Busy Mask */ +#define ADC_SYNCBUSY_SAMPCTRL(value) (ADC_SYNCBUSY_SAMPCTRL_Msk & (_UINT16_(value) << ADC_SYNCBUSY_SAMPCTRL_Pos)) /* Assigment of value for SAMPCTRL in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_WINLT_Pos _UINT16_(6) /* (ADC_SYNCBUSY) WINLT Synchronization Busy Position */ +#define ADC_SYNCBUSY_WINLT_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_WINLT_Pos) /* (ADC_SYNCBUSY) WINLT Synchronization Busy Mask */ +#define ADC_SYNCBUSY_WINLT(value) (ADC_SYNCBUSY_WINLT_Msk & (_UINT16_(value) << ADC_SYNCBUSY_WINLT_Pos)) /* Assigment of value for WINLT in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_WINUT_Pos _UINT16_(7) /* (ADC_SYNCBUSY) WINUT Synchronization Busy Position */ +#define ADC_SYNCBUSY_WINUT_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_WINUT_Pos) /* (ADC_SYNCBUSY) WINUT Synchronization Busy Mask */ +#define ADC_SYNCBUSY_WINUT(value) (ADC_SYNCBUSY_WINUT_Msk & (_UINT16_(value) << ADC_SYNCBUSY_WINUT_Pos)) /* Assigment of value for WINUT in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_GAINCORR_Pos _UINT16_(8) /* (ADC_SYNCBUSY) GAINCORR Synchronization Busy Position */ +#define ADC_SYNCBUSY_GAINCORR_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_GAINCORR_Pos) /* (ADC_SYNCBUSY) GAINCORR Synchronization Busy Mask */ +#define ADC_SYNCBUSY_GAINCORR(value) (ADC_SYNCBUSY_GAINCORR_Msk & (_UINT16_(value) << ADC_SYNCBUSY_GAINCORR_Pos)) /* Assigment of value for GAINCORR in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_OFFSETCORR_Pos _UINT16_(9) /* (ADC_SYNCBUSY) OFFSETCTRL Synchronization Busy Position */ +#define ADC_SYNCBUSY_OFFSETCORR_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_OFFSETCORR_Pos) /* (ADC_SYNCBUSY) OFFSETCTRL Synchronization Busy Mask */ +#define ADC_SYNCBUSY_OFFSETCORR(value) (ADC_SYNCBUSY_OFFSETCORR_Msk & (_UINT16_(value) << ADC_SYNCBUSY_OFFSETCORR_Pos)) /* Assigment of value for OFFSETCORR in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_SWTRIG_Pos _UINT16_(10) /* (ADC_SYNCBUSY) SWTRG Synchronization Busy Position */ +#define ADC_SYNCBUSY_SWTRIG_Msk (_UINT16_(0x1) << ADC_SYNCBUSY_SWTRIG_Pos) /* (ADC_SYNCBUSY) SWTRG Synchronization Busy Mask */ +#define ADC_SYNCBUSY_SWTRIG(value) (ADC_SYNCBUSY_SWTRIG_Msk & (_UINT16_(value) << ADC_SYNCBUSY_SWTRIG_Pos)) /* Assigment of value for SWTRIG in the ADC_SYNCBUSY register */ +#define ADC_SYNCBUSY_Msk _UINT16_(0x07FF) /* (ADC_SYNCBUSY) Register Mask */ + + +/* -------- ADC_RESULT : (ADC Offset: 0x24) ( R/ 16) Result -------- */ +#define ADC_RESULT_RESETVALUE _UINT16_(0x00) /* (ADC_RESULT) Result Reset Value */ + +#define ADC_RESULT_RESULT_Pos _UINT16_(0) /* (ADC_RESULT) Result Value Position */ +#define ADC_RESULT_RESULT_Msk (_UINT16_(0xFFFF) << ADC_RESULT_RESULT_Pos) /* (ADC_RESULT) Result Value Mask */ +#define ADC_RESULT_RESULT(value) (ADC_RESULT_RESULT_Msk & (_UINT16_(value) << ADC_RESULT_RESULT_Pos)) /* Assigment of value for RESULT in the ADC_RESULT register */ +#define ADC_RESULT_Msk _UINT16_(0xFFFF) /* (ADC_RESULT) Register Mask */ + + +/* -------- ADC_SEQCTRL : (ADC Offset: 0x28) (R/W 32) Sequence Control -------- */ +#define ADC_SEQCTRL_RESETVALUE _UINT32_(0x00) /* (ADC_SEQCTRL) Sequence Control Reset Value */ + +#define ADC_SEQCTRL_SEQEN_Pos _UINT32_(0) /* (ADC_SEQCTRL) Enable Positive Input in the Sequence Position */ +#define ADC_SEQCTRL_SEQEN_Msk (_UINT32_(0xFFFFFFFF) << ADC_SEQCTRL_SEQEN_Pos) /* (ADC_SEQCTRL) Enable Positive Input in the Sequence Mask */ +#define ADC_SEQCTRL_SEQEN(value) (ADC_SEQCTRL_SEQEN_Msk & (_UINT32_(value) << ADC_SEQCTRL_SEQEN_Pos)) /* Assigment of value for SEQEN in the ADC_SEQCTRL register */ +#define ADC_SEQCTRL_Msk _UINT32_(0xFFFFFFFF) /* (ADC_SEQCTRL) Register Mask */ + + +/* -------- ADC_CALIB : (ADC Offset: 0x2C) (R/W 16) Calibration -------- */ +#define ADC_CALIB_RESETVALUE _UINT16_(0x00) /* (ADC_CALIB) Calibration Reset Value */ + +#define ADC_CALIB_BIASCOMP_Pos _UINT16_(0) /* (ADC_CALIB) Bias Comparator Scaling Position */ +#define ADC_CALIB_BIASCOMP_Msk (_UINT16_(0x7) << ADC_CALIB_BIASCOMP_Pos) /* (ADC_CALIB) Bias Comparator Scaling Mask */ +#define ADC_CALIB_BIASCOMP(value) (ADC_CALIB_BIASCOMP_Msk & (_UINT16_(value) << ADC_CALIB_BIASCOMP_Pos)) /* Assigment of value for BIASCOMP in the ADC_CALIB register */ +#define ADC_CALIB_BIASREFBUF_Pos _UINT16_(8) /* (ADC_CALIB) Bias Reference Buffer Scaling Position */ +#define ADC_CALIB_BIASREFBUF_Msk (_UINT16_(0x7) << ADC_CALIB_BIASREFBUF_Pos) /* (ADC_CALIB) Bias Reference Buffer Scaling Mask */ +#define ADC_CALIB_BIASREFBUF(value) (ADC_CALIB_BIASREFBUF_Msk & (_UINT16_(value) << ADC_CALIB_BIASREFBUF_Pos)) /* Assigment of value for BIASREFBUF in the ADC_CALIB register */ +#define ADC_CALIB_Msk _UINT16_(0x0707) /* (ADC_CALIB) Register Mask */ + + +/** \brief ADC register offsets definitions */ +#define ADC_CTRLA_REG_OFST _UINT32_(0x00) /* (ADC_CTRLA) Control A Offset */ +#define ADC_CTRLB_REG_OFST _UINT32_(0x01) /* (ADC_CTRLB) Control B Offset */ +#define ADC_REFCTRL_REG_OFST _UINT32_(0x02) /* (ADC_REFCTRL) Reference Control Offset */ +#define ADC_EVCTRL_REG_OFST _UINT32_(0x03) /* (ADC_EVCTRL) Event Control Offset */ +#define ADC_INTENCLR_REG_OFST _UINT32_(0x04) /* (ADC_INTENCLR) Interrupt Enable Clear Offset */ +#define ADC_INTENSET_REG_OFST _UINT32_(0x05) /* (ADC_INTENSET) Interrupt Enable Set Offset */ +#define ADC_INTFLAG_REG_OFST _UINT32_(0x06) /* (ADC_INTFLAG) Interrupt Flag Status and Clear Offset */ +#define ADC_SEQSTATUS_REG_OFST _UINT32_(0x07) /* (ADC_SEQSTATUS) Sequence Status Offset */ +#define ADC_INPUTCTRL_REG_OFST _UINT32_(0x08) /* (ADC_INPUTCTRL) Input Control Offset */ +#define ADC_CTRLC_REG_OFST _UINT32_(0x0A) /* (ADC_CTRLC) Control C Offset */ +#define ADC_AVGCTRL_REG_OFST _UINT32_(0x0C) /* (ADC_AVGCTRL) Average Control Offset */ +#define ADC_SAMPCTRL_REG_OFST _UINT32_(0x0D) /* (ADC_SAMPCTRL) Sample Time Control Offset */ +#define ADC_WINLT_REG_OFST _UINT32_(0x0E) /* (ADC_WINLT) Window Monitor Lower Threshold Offset */ +#define ADC_WINUT_REG_OFST _UINT32_(0x10) /* (ADC_WINUT) Window Monitor Upper Threshold Offset */ +#define ADC_GAINCORR_REG_OFST _UINT32_(0x12) /* (ADC_GAINCORR) Gain Correction Offset */ +#define ADC_OFFSETCORR_REG_OFST _UINT32_(0x14) /* (ADC_OFFSETCORR) Offset Correction Offset */ +#define ADC_SWTRIG_REG_OFST _UINT32_(0x18) /* (ADC_SWTRIG) Software Trigger Offset */ +#define ADC_DBGCTRL_REG_OFST _UINT32_(0x1C) /* (ADC_DBGCTRL) Debug Control Offset */ +#define ADC_SYNCBUSY_REG_OFST _UINT32_(0x20) /* (ADC_SYNCBUSY) Synchronization Busy Offset */ +#define ADC_RESULT_REG_OFST _UINT32_(0x24) /* (ADC_RESULT) Result Offset */ +#define ADC_SEQCTRL_REG_OFST _UINT32_(0x28) /* (ADC_SEQCTRL) Sequence Control Offset */ +#define ADC_CALIB_REG_OFST _UINT32_(0x2C) /* (ADC_CALIB) Calibration Offset */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief ADC register API structure */ +typedef struct +{ /* Analog Digital Converter */ + __IO uint8_t ADC_CTRLA; /**< Offset: 0x00 (R/W 8) Control A */ + __IO uint8_t ADC_CTRLB; /**< Offset: 0x01 (R/W 8) Control B */ + __IO uint8_t ADC_REFCTRL; /**< Offset: 0x02 (R/W 8) Reference Control */ + __IO uint8_t ADC_EVCTRL; /**< Offset: 0x03 (R/W 8) Event Control */ + __IO uint8_t ADC_INTENCLR; /**< Offset: 0x04 (R/W 8) Interrupt Enable Clear */ + __IO uint8_t ADC_INTENSET; /**< Offset: 0x05 (R/W 8) Interrupt Enable Set */ + __IO uint8_t ADC_INTFLAG; /**< Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear */ + __I uint8_t ADC_SEQSTATUS; /**< Offset: 0x07 (R/ 8) Sequence Status */ + __IO uint16_t ADC_INPUTCTRL; /**< Offset: 0x08 (R/W 16) Input Control */ + __IO uint16_t ADC_CTRLC; /**< Offset: 0x0A (R/W 16) Control C */ + __IO uint8_t ADC_AVGCTRL; /**< Offset: 0x0C (R/W 8) Average Control */ + __IO uint8_t ADC_SAMPCTRL; /**< Offset: 0x0D (R/W 8) Sample Time Control */ + __IO uint16_t ADC_WINLT; /**< Offset: 0x0E (R/W 16) Window Monitor Lower Threshold */ + __IO uint16_t ADC_WINUT; /**< Offset: 0x10 (R/W 16) Window Monitor Upper Threshold */ + __IO uint16_t ADC_GAINCORR; /**< Offset: 0x12 (R/W 16) Gain Correction */ + __IO uint16_t ADC_OFFSETCORR; /**< Offset: 0x14 (R/W 16) Offset Correction */ + __I uint8_t Reserved1[0x02]; + __IO uint8_t ADC_SWTRIG; /**< Offset: 0x18 (R/W 8) Software Trigger */ + __I uint8_t Reserved2[0x03]; + __IO uint8_t ADC_DBGCTRL; /**< Offset: 0x1C (R/W 8) Debug Control */ + __I uint8_t Reserved3[0x03]; + __I uint16_t ADC_SYNCBUSY; /**< Offset: 0x20 (R/ 16) Synchronization Busy */ + __I uint8_t Reserved4[0x02]; + __I uint16_t ADC_RESULT; /**< Offset: 0x24 (R/ 16) Result */ + __I uint8_t Reserved5[0x02]; + __IO uint32_t ADC_SEQCTRL; /**< Offset: 0x28 (R/W 32) Sequence Control */ + __IO uint16_t ADC_CALIB; /**< Offset: 0x2C (R/W 16) Calibration */ +} adc_registers_t; + + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* _SAMC21_ADC_COMPONENT_H_ */ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/can.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/can.h new file mode 100644 index 00000000..36906aef --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/can.h @@ -0,0 +1,2527 @@ +/* + * Component description for CAN + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_CAN_COMPONENT_H_ +#define _SAMC21_CAN_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR CAN */ +/* ************************************************************************** */ + +/* -------- CAN_RXBE_0 : (CAN Offset: 0x00) (R/W 32) Rx Buffer Element 0 -------- */ +#define CAN_RXBE_0_ID_Pos _UINT32_(0) /* (CAN_RXBE_0) Identifier Position */ +#define CAN_RXBE_0_ID_Msk (_UINT32_(0x1FFFFFFF) << CAN_RXBE_0_ID_Pos) /* (CAN_RXBE_0) Identifier Mask */ +#define CAN_RXBE_0_ID(value) (CAN_RXBE_0_ID_Msk & (_UINT32_(value) << CAN_RXBE_0_ID_Pos)) /* Assigment of value for ID in the CAN_RXBE_0 register */ +#define CAN_RXBE_0_RTR_Pos _UINT32_(29) /* (CAN_RXBE_0) Remote Transmission Request Position */ +#define CAN_RXBE_0_RTR_Msk (_UINT32_(0x1) << CAN_RXBE_0_RTR_Pos) /* (CAN_RXBE_0) Remote Transmission Request Mask */ +#define CAN_RXBE_0_RTR(value) (CAN_RXBE_0_RTR_Msk & (_UINT32_(value) << CAN_RXBE_0_RTR_Pos)) /* Assigment of value for RTR in the CAN_RXBE_0 register */ +#define CAN_RXBE_0_XTD_Pos _UINT32_(30) /* (CAN_RXBE_0) Extended Identifier Position */ +#define CAN_RXBE_0_XTD_Msk (_UINT32_(0x1) << CAN_RXBE_0_XTD_Pos) /* (CAN_RXBE_0) Extended Identifier Mask */ +#define CAN_RXBE_0_XTD(value) (CAN_RXBE_0_XTD_Msk & (_UINT32_(value) << CAN_RXBE_0_XTD_Pos)) /* Assigment of value for XTD in the CAN_RXBE_0 register */ +#define CAN_RXBE_0_ESI_Pos _UINT32_(31) /* (CAN_RXBE_0) Error State Indicator Position */ +#define CAN_RXBE_0_ESI_Msk (_UINT32_(0x1) << CAN_RXBE_0_ESI_Pos) /* (CAN_RXBE_0) Error State Indicator Mask */ +#define CAN_RXBE_0_ESI(value) (CAN_RXBE_0_ESI_Msk & (_UINT32_(value) << CAN_RXBE_0_ESI_Pos)) /* Assigment of value for ESI in the CAN_RXBE_0 register */ +#define CAN_RXBE_0_Msk _UINT32_(0xFFFFFFFF) /* (CAN_RXBE_0) Register Mask */ + + +/* -------- CAN_RXBE_1 : (CAN Offset: 0x04) (R/W 32) Rx Buffer Element 1 -------- */ +#define CAN_RXBE_1_RXTS_Pos _UINT32_(0) /* (CAN_RXBE_1) Rx Timestamp Position */ +#define CAN_RXBE_1_RXTS_Msk (_UINT32_(0xFFFF) << CAN_RXBE_1_RXTS_Pos) /* (CAN_RXBE_1) Rx Timestamp Mask */ +#define CAN_RXBE_1_RXTS(value) (CAN_RXBE_1_RXTS_Msk & (_UINT32_(value) << CAN_RXBE_1_RXTS_Pos)) /* Assigment of value for RXTS in the CAN_RXBE_1 register */ +#define CAN_RXBE_1_DLC_Pos _UINT32_(16) /* (CAN_RXBE_1) Data Length Code Position */ +#define CAN_RXBE_1_DLC_Msk (_UINT32_(0xF) << CAN_RXBE_1_DLC_Pos) /* (CAN_RXBE_1) Data Length Code Mask */ +#define CAN_RXBE_1_DLC(value) (CAN_RXBE_1_DLC_Msk & (_UINT32_(value) << CAN_RXBE_1_DLC_Pos)) /* Assigment of value for DLC in the CAN_RXBE_1 register */ +#define CAN_RXBE_1_BRS_Pos _UINT32_(20) /* (CAN_RXBE_1) Bit Rate Switch Position */ +#define CAN_RXBE_1_BRS_Msk (_UINT32_(0x1) << CAN_RXBE_1_BRS_Pos) /* (CAN_RXBE_1) Bit Rate Switch Mask */ +#define CAN_RXBE_1_BRS(value) (CAN_RXBE_1_BRS_Msk & (_UINT32_(value) << CAN_RXBE_1_BRS_Pos)) /* Assigment of value for BRS in the CAN_RXBE_1 register */ +#define CAN_RXBE_1_FDF_Pos _UINT32_(21) /* (CAN_RXBE_1) FD Format Position */ +#define CAN_RXBE_1_FDF_Msk (_UINT32_(0x1) << CAN_RXBE_1_FDF_Pos) /* (CAN_RXBE_1) FD Format Mask */ +#define CAN_RXBE_1_FDF(value) (CAN_RXBE_1_FDF_Msk & (_UINT32_(value) << CAN_RXBE_1_FDF_Pos)) /* Assigment of value for FDF in the CAN_RXBE_1 register */ +#define CAN_RXBE_1_FIDX_Pos _UINT32_(24) /* (CAN_RXBE_1) Filter Index Position */ +#define CAN_RXBE_1_FIDX_Msk (_UINT32_(0x7F) << CAN_RXBE_1_FIDX_Pos) /* (CAN_RXBE_1) Filter Index Mask */ +#define CAN_RXBE_1_FIDX(value) (CAN_RXBE_1_FIDX_Msk & (_UINT32_(value) << CAN_RXBE_1_FIDX_Pos)) /* Assigment of value for FIDX in the CAN_RXBE_1 register */ +#define CAN_RXBE_1_ANMF_Pos _UINT32_(31) /* (CAN_RXBE_1) Accepted Non-matching Frame Position */ +#define CAN_RXBE_1_ANMF_Msk (_UINT32_(0x1) << CAN_RXBE_1_ANMF_Pos) /* (CAN_RXBE_1) Accepted Non-matching Frame Mask */ +#define CAN_RXBE_1_ANMF(value) (CAN_RXBE_1_ANMF_Msk & (_UINT32_(value) << CAN_RXBE_1_ANMF_Pos)) /* Assigment of value for ANMF in the CAN_RXBE_1 register */ +#define CAN_RXBE_1_Msk _UINT32_(0xFF3FFFFF) /* (CAN_RXBE_1) Register Mask */ + + +/* -------- CAN_RXBE_DATA : (CAN Offset: 0x08) (R/W 32) Rx Buffer Element Data -------- */ +#define CAN_RXBE_DATA_DB0_Pos _UINT32_(0) /* (CAN_RXBE_DATA) Data Byte 0 Position */ +#define CAN_RXBE_DATA_DB0_Msk (_UINT32_(0xFF) << CAN_RXBE_DATA_DB0_Pos) /* (CAN_RXBE_DATA) Data Byte 0 Mask */ +#define CAN_RXBE_DATA_DB0(value) (CAN_RXBE_DATA_DB0_Msk & (_UINT32_(value) << CAN_RXBE_DATA_DB0_Pos)) /* Assigment of value for DB0 in the CAN_RXBE_DATA register */ +#define CAN_RXBE_DATA_DB1_Pos _UINT32_(8) /* (CAN_RXBE_DATA) Data Byte 1 Position */ +#define CAN_RXBE_DATA_DB1_Msk (_UINT32_(0xFF) << CAN_RXBE_DATA_DB1_Pos) /* (CAN_RXBE_DATA) Data Byte 1 Mask */ +#define CAN_RXBE_DATA_DB1(value) (CAN_RXBE_DATA_DB1_Msk & (_UINT32_(value) << CAN_RXBE_DATA_DB1_Pos)) /* Assigment of value for DB1 in the CAN_RXBE_DATA register */ +#define CAN_RXBE_DATA_DB2_Pos _UINT32_(16) /* (CAN_RXBE_DATA) Data Byte 2 Position */ +#define CAN_RXBE_DATA_DB2_Msk (_UINT32_(0xFF) << CAN_RXBE_DATA_DB2_Pos) /* (CAN_RXBE_DATA) Data Byte 2 Mask */ +#define CAN_RXBE_DATA_DB2(value) (CAN_RXBE_DATA_DB2_Msk & (_UINT32_(value) << CAN_RXBE_DATA_DB2_Pos)) /* Assigment of value for DB2 in the CAN_RXBE_DATA register */ +#define CAN_RXBE_DATA_DB3_Pos _UINT32_(24) /* (CAN_RXBE_DATA) Data Byte 3 Position */ +#define CAN_RXBE_DATA_DB3_Msk (_UINT32_(0xFF) << CAN_RXBE_DATA_DB3_Pos) /* (CAN_RXBE_DATA) Data Byte 3 Mask */ +#define CAN_RXBE_DATA_DB3(value) (CAN_RXBE_DATA_DB3_Msk & (_UINT32_(value) << CAN_RXBE_DATA_DB3_Pos)) /* Assigment of value for DB3 in the CAN_RXBE_DATA register */ +#define CAN_RXBE_DATA_Msk _UINT32_(0xFFFFFFFF) /* (CAN_RXBE_DATA) Register Mask */ + + +/* -------- CAN_RXF0E_0 : (CAN Offset: 0x00) (R/W 32) Rx FIFO 0 Element 0 -------- */ +#define CAN_RXF0E_0_ID_Pos _UINT32_(0) /* (CAN_RXF0E_0) Identifier Position */ +#define CAN_RXF0E_0_ID_Msk (_UINT32_(0x1FFFFFFF) << CAN_RXF0E_0_ID_Pos) /* (CAN_RXF0E_0) Identifier Mask */ +#define CAN_RXF0E_0_ID(value) (CAN_RXF0E_0_ID_Msk & (_UINT32_(value) << CAN_RXF0E_0_ID_Pos)) /* Assigment of value for ID in the CAN_RXF0E_0 register */ +#define CAN_RXF0E_0_RTR_Pos _UINT32_(29) /* (CAN_RXF0E_0) Remote Transmission Request Position */ +#define CAN_RXF0E_0_RTR_Msk (_UINT32_(0x1) << CAN_RXF0E_0_RTR_Pos) /* (CAN_RXF0E_0) Remote Transmission Request Mask */ +#define CAN_RXF0E_0_RTR(value) (CAN_RXF0E_0_RTR_Msk & (_UINT32_(value) << CAN_RXF0E_0_RTR_Pos)) /* Assigment of value for RTR in the CAN_RXF0E_0 register */ +#define CAN_RXF0E_0_XTD_Pos _UINT32_(30) /* (CAN_RXF0E_0) Extended Identifier Position */ +#define CAN_RXF0E_0_XTD_Msk (_UINT32_(0x1) << CAN_RXF0E_0_XTD_Pos) /* (CAN_RXF0E_0) Extended Identifier Mask */ +#define CAN_RXF0E_0_XTD(value) (CAN_RXF0E_0_XTD_Msk & (_UINT32_(value) << CAN_RXF0E_0_XTD_Pos)) /* Assigment of value for XTD in the CAN_RXF0E_0 register */ +#define CAN_RXF0E_0_ESI_Pos _UINT32_(31) /* (CAN_RXF0E_0) Error State Indicator Position */ +#define CAN_RXF0E_0_ESI_Msk (_UINT32_(0x1) << CAN_RXF0E_0_ESI_Pos) /* (CAN_RXF0E_0) Error State Indicator Mask */ +#define CAN_RXF0E_0_ESI(value) (CAN_RXF0E_0_ESI_Msk & (_UINT32_(value) << CAN_RXF0E_0_ESI_Pos)) /* Assigment of value for ESI in the CAN_RXF0E_0 register */ +#define CAN_RXF0E_0_Msk _UINT32_(0xFFFFFFFF) /* (CAN_RXF0E_0) Register Mask */ + + +/* -------- CAN_RXF0E_1 : (CAN Offset: 0x04) (R/W 32) Rx FIFO 0 Element 1 -------- */ +#define CAN_RXF0E_1_RXTS_Pos _UINT32_(0) /* (CAN_RXF0E_1) Rx Timestamp Position */ +#define CAN_RXF0E_1_RXTS_Msk (_UINT32_(0xFFFF) << CAN_RXF0E_1_RXTS_Pos) /* (CAN_RXF0E_1) Rx Timestamp Mask */ +#define CAN_RXF0E_1_RXTS(value) (CAN_RXF0E_1_RXTS_Msk & (_UINT32_(value) << CAN_RXF0E_1_RXTS_Pos)) /* Assigment of value for RXTS in the CAN_RXF0E_1 register */ +#define CAN_RXF0E_1_DLC_Pos _UINT32_(16) /* (CAN_RXF0E_1) Data Length Code Position */ +#define CAN_RXF0E_1_DLC_Msk (_UINT32_(0xF) << CAN_RXF0E_1_DLC_Pos) /* (CAN_RXF0E_1) Data Length Code Mask */ +#define CAN_RXF0E_1_DLC(value) (CAN_RXF0E_1_DLC_Msk & (_UINT32_(value) << CAN_RXF0E_1_DLC_Pos)) /* Assigment of value for DLC in the CAN_RXF0E_1 register */ +#define CAN_RXF0E_1_BRS_Pos _UINT32_(20) /* (CAN_RXF0E_1) Bit Rate Switch Position */ +#define CAN_RXF0E_1_BRS_Msk (_UINT32_(0x1) << CAN_RXF0E_1_BRS_Pos) /* (CAN_RXF0E_1) Bit Rate Switch Mask */ +#define CAN_RXF0E_1_BRS(value) (CAN_RXF0E_1_BRS_Msk & (_UINT32_(value) << CAN_RXF0E_1_BRS_Pos)) /* Assigment of value for BRS in the CAN_RXF0E_1 register */ +#define CAN_RXF0E_1_FDF_Pos _UINT32_(21) /* (CAN_RXF0E_1) FD Format Position */ +#define CAN_RXF0E_1_FDF_Msk (_UINT32_(0x1) << CAN_RXF0E_1_FDF_Pos) /* (CAN_RXF0E_1) FD Format Mask */ +#define CAN_RXF0E_1_FDF(value) (CAN_RXF0E_1_FDF_Msk & (_UINT32_(value) << CAN_RXF0E_1_FDF_Pos)) /* Assigment of value for FDF in the CAN_RXF0E_1 register */ +#define CAN_RXF0E_1_FIDX_Pos _UINT32_(24) /* (CAN_RXF0E_1) Filter Index Position */ +#define CAN_RXF0E_1_FIDX_Msk (_UINT32_(0x7F) << CAN_RXF0E_1_FIDX_Pos) /* (CAN_RXF0E_1) Filter Index Mask */ +#define CAN_RXF0E_1_FIDX(value) (CAN_RXF0E_1_FIDX_Msk & (_UINT32_(value) << CAN_RXF0E_1_FIDX_Pos)) /* Assigment of value for FIDX in the CAN_RXF0E_1 register */ +#define CAN_RXF0E_1_ANMF_Pos _UINT32_(31) /* (CAN_RXF0E_1) Accepted Non-matching Frame Position */ +#define CAN_RXF0E_1_ANMF_Msk (_UINT32_(0x1) << CAN_RXF0E_1_ANMF_Pos) /* (CAN_RXF0E_1) Accepted Non-matching Frame Mask */ +#define CAN_RXF0E_1_ANMF(value) (CAN_RXF0E_1_ANMF_Msk & (_UINT32_(value) << CAN_RXF0E_1_ANMF_Pos)) /* Assigment of value for ANMF in the CAN_RXF0E_1 register */ +#define CAN_RXF0E_1_Msk _UINT32_(0xFF3FFFFF) /* (CAN_RXF0E_1) Register Mask */ + + +/* -------- CAN_RXF0E_DATA : (CAN Offset: 0x08) (R/W 32) Rx FIFO 0 Element Data -------- */ +#define CAN_RXF0E_DATA_DB0_Pos _UINT32_(0) /* (CAN_RXF0E_DATA) Data Byte 0 Position */ +#define CAN_RXF0E_DATA_DB0_Msk (_UINT32_(0xFF) << CAN_RXF0E_DATA_DB0_Pos) /* (CAN_RXF0E_DATA) Data Byte 0 Mask */ +#define CAN_RXF0E_DATA_DB0(value) (CAN_RXF0E_DATA_DB0_Msk & (_UINT32_(value) << CAN_RXF0E_DATA_DB0_Pos)) /* Assigment of value for DB0 in the CAN_RXF0E_DATA register */ +#define CAN_RXF0E_DATA_DB1_Pos _UINT32_(8) /* (CAN_RXF0E_DATA) Data Byte 1 Position */ +#define CAN_RXF0E_DATA_DB1_Msk (_UINT32_(0xFF) << CAN_RXF0E_DATA_DB1_Pos) /* (CAN_RXF0E_DATA) Data Byte 1 Mask */ +#define CAN_RXF0E_DATA_DB1(value) (CAN_RXF0E_DATA_DB1_Msk & (_UINT32_(value) << CAN_RXF0E_DATA_DB1_Pos)) /* Assigment of value for DB1 in the CAN_RXF0E_DATA register */ +#define CAN_RXF0E_DATA_DB2_Pos _UINT32_(16) /* (CAN_RXF0E_DATA) Data Byte 2 Position */ +#define CAN_RXF0E_DATA_DB2_Msk (_UINT32_(0xFF) << CAN_RXF0E_DATA_DB2_Pos) /* (CAN_RXF0E_DATA) Data Byte 2 Mask */ +#define CAN_RXF0E_DATA_DB2(value) (CAN_RXF0E_DATA_DB2_Msk & (_UINT32_(value) << CAN_RXF0E_DATA_DB2_Pos)) /* Assigment of value for DB2 in the CAN_RXF0E_DATA register */ +#define CAN_RXF0E_DATA_DB3_Pos _UINT32_(24) /* (CAN_RXF0E_DATA) Data Byte 3 Position */ +#define CAN_RXF0E_DATA_DB3_Msk (_UINT32_(0xFF) << CAN_RXF0E_DATA_DB3_Pos) /* (CAN_RXF0E_DATA) Data Byte 3 Mask */ +#define CAN_RXF0E_DATA_DB3(value) (CAN_RXF0E_DATA_DB3_Msk & (_UINT32_(value) << CAN_RXF0E_DATA_DB3_Pos)) /* Assigment of value for DB3 in the CAN_RXF0E_DATA register */ +#define CAN_RXF0E_DATA_Msk _UINT32_(0xFFFFFFFF) /* (CAN_RXF0E_DATA) Register Mask */ + + +/* -------- CAN_RXF1E_0 : (CAN Offset: 0x00) (R/W 32) Rx FIFO 1 Element 0 -------- */ +#define CAN_RXF1E_0_ID_Pos _UINT32_(0) /* (CAN_RXF1E_0) Identifier Position */ +#define CAN_RXF1E_0_ID_Msk (_UINT32_(0x1FFFFFFF) << CAN_RXF1E_0_ID_Pos) /* (CAN_RXF1E_0) Identifier Mask */ +#define CAN_RXF1E_0_ID(value) (CAN_RXF1E_0_ID_Msk & (_UINT32_(value) << CAN_RXF1E_0_ID_Pos)) /* Assigment of value for ID in the CAN_RXF1E_0 register */ +#define CAN_RXF1E_0_RTR_Pos _UINT32_(29) /* (CAN_RXF1E_0) Remote Transmission Request Position */ +#define CAN_RXF1E_0_RTR_Msk (_UINT32_(0x1) << CAN_RXF1E_0_RTR_Pos) /* (CAN_RXF1E_0) Remote Transmission Request Mask */ +#define CAN_RXF1E_0_RTR(value) (CAN_RXF1E_0_RTR_Msk & (_UINT32_(value) << CAN_RXF1E_0_RTR_Pos)) /* Assigment of value for RTR in the CAN_RXF1E_0 register */ +#define CAN_RXF1E_0_XTD_Pos _UINT32_(30) /* (CAN_RXF1E_0) Extended Identifier Position */ +#define CAN_RXF1E_0_XTD_Msk (_UINT32_(0x1) << CAN_RXF1E_0_XTD_Pos) /* (CAN_RXF1E_0) Extended Identifier Mask */ +#define CAN_RXF1E_0_XTD(value) (CAN_RXF1E_0_XTD_Msk & (_UINT32_(value) << CAN_RXF1E_0_XTD_Pos)) /* Assigment of value for XTD in the CAN_RXF1E_0 register */ +#define CAN_RXF1E_0_ESI_Pos _UINT32_(31) /* (CAN_RXF1E_0) Error State Indicator Position */ +#define CAN_RXF1E_0_ESI_Msk (_UINT32_(0x1) << CAN_RXF1E_0_ESI_Pos) /* (CAN_RXF1E_0) Error State Indicator Mask */ +#define CAN_RXF1E_0_ESI(value) (CAN_RXF1E_0_ESI_Msk & (_UINT32_(value) << CAN_RXF1E_0_ESI_Pos)) /* Assigment of value for ESI in the CAN_RXF1E_0 register */ +#define CAN_RXF1E_0_Msk _UINT32_(0xFFFFFFFF) /* (CAN_RXF1E_0) Register Mask */ + + +/* -------- CAN_RXF1E_1 : (CAN Offset: 0x04) (R/W 32) Rx FIFO 1 Element 1 -------- */ +#define CAN_RXF1E_1_RXTS_Pos _UINT32_(0) /* (CAN_RXF1E_1) Rx Timestamp Position */ +#define CAN_RXF1E_1_RXTS_Msk (_UINT32_(0xFFFF) << CAN_RXF1E_1_RXTS_Pos) /* (CAN_RXF1E_1) Rx Timestamp Mask */ +#define CAN_RXF1E_1_RXTS(value) (CAN_RXF1E_1_RXTS_Msk & (_UINT32_(value) << CAN_RXF1E_1_RXTS_Pos)) /* Assigment of value for RXTS in the CAN_RXF1E_1 register */ +#define CAN_RXF1E_1_DLC_Pos _UINT32_(16) /* (CAN_RXF1E_1) Data Length Code Position */ +#define CAN_RXF1E_1_DLC_Msk (_UINT32_(0xF) << CAN_RXF1E_1_DLC_Pos) /* (CAN_RXF1E_1) Data Length Code Mask */ +#define CAN_RXF1E_1_DLC(value) (CAN_RXF1E_1_DLC_Msk & (_UINT32_(value) << CAN_RXF1E_1_DLC_Pos)) /* Assigment of value for DLC in the CAN_RXF1E_1 register */ +#define CAN_RXF1E_1_BRS_Pos _UINT32_(20) /* (CAN_RXF1E_1) Bit Rate Switch Position */ +#define CAN_RXF1E_1_BRS_Msk (_UINT32_(0x1) << CAN_RXF1E_1_BRS_Pos) /* (CAN_RXF1E_1) Bit Rate Switch Mask */ +#define CAN_RXF1E_1_BRS(value) (CAN_RXF1E_1_BRS_Msk & (_UINT32_(value) << CAN_RXF1E_1_BRS_Pos)) /* Assigment of value for BRS in the CAN_RXF1E_1 register */ +#define CAN_RXF1E_1_FDF_Pos _UINT32_(21) /* (CAN_RXF1E_1) FD Format Position */ +#define CAN_RXF1E_1_FDF_Msk (_UINT32_(0x1) << CAN_RXF1E_1_FDF_Pos) /* (CAN_RXF1E_1) FD Format Mask */ +#define CAN_RXF1E_1_FDF(value) (CAN_RXF1E_1_FDF_Msk & (_UINT32_(value) << CAN_RXF1E_1_FDF_Pos)) /* Assigment of value for FDF in the CAN_RXF1E_1 register */ +#define CAN_RXF1E_1_FIDX_Pos _UINT32_(24) /* (CAN_RXF1E_1) Filter Index Position */ +#define CAN_RXF1E_1_FIDX_Msk (_UINT32_(0x7F) << CAN_RXF1E_1_FIDX_Pos) /* (CAN_RXF1E_1) Filter Index Mask */ +#define CAN_RXF1E_1_FIDX(value) (CAN_RXF1E_1_FIDX_Msk & (_UINT32_(value) << CAN_RXF1E_1_FIDX_Pos)) /* Assigment of value for FIDX in the CAN_RXF1E_1 register */ +#define CAN_RXF1E_1_ANMF_Pos _UINT32_(31) /* (CAN_RXF1E_1) Accepted Non-matching Frame Position */ +#define CAN_RXF1E_1_ANMF_Msk (_UINT32_(0x1) << CAN_RXF1E_1_ANMF_Pos) /* (CAN_RXF1E_1) Accepted Non-matching Frame Mask */ +#define CAN_RXF1E_1_ANMF(value) (CAN_RXF1E_1_ANMF_Msk & (_UINT32_(value) << CAN_RXF1E_1_ANMF_Pos)) /* Assigment of value for ANMF in the CAN_RXF1E_1 register */ +#define CAN_RXF1E_1_Msk _UINT32_(0xFF3FFFFF) /* (CAN_RXF1E_1) Register Mask */ + + +/* -------- CAN_RXF1E_DATA : (CAN Offset: 0x08) (R/W 32) Rx FIFO 1 Element Data -------- */ +#define CAN_RXF1E_DATA_DB0_Pos _UINT32_(0) /* (CAN_RXF1E_DATA) Data Byte 0 Position */ +#define CAN_RXF1E_DATA_DB0_Msk (_UINT32_(0xFF) << CAN_RXF1E_DATA_DB0_Pos) /* (CAN_RXF1E_DATA) Data Byte 0 Mask */ +#define CAN_RXF1E_DATA_DB0(value) (CAN_RXF1E_DATA_DB0_Msk & (_UINT32_(value) << CAN_RXF1E_DATA_DB0_Pos)) /* Assigment of value for DB0 in the CAN_RXF1E_DATA register */ +#define CAN_RXF1E_DATA_DB1_Pos _UINT32_(8) /* (CAN_RXF1E_DATA) Data Byte 1 Position */ +#define CAN_RXF1E_DATA_DB1_Msk (_UINT32_(0xFF) << CAN_RXF1E_DATA_DB1_Pos) /* (CAN_RXF1E_DATA) Data Byte 1 Mask */ +#define CAN_RXF1E_DATA_DB1(value) (CAN_RXF1E_DATA_DB1_Msk & (_UINT32_(value) << CAN_RXF1E_DATA_DB1_Pos)) /* Assigment of value for DB1 in the CAN_RXF1E_DATA register */ +#define CAN_RXF1E_DATA_DB2_Pos _UINT32_(16) /* (CAN_RXF1E_DATA) Data Byte 2 Position */ +#define CAN_RXF1E_DATA_DB2_Msk (_UINT32_(0xFF) << CAN_RXF1E_DATA_DB2_Pos) /* (CAN_RXF1E_DATA) Data Byte 2 Mask */ +#define CAN_RXF1E_DATA_DB2(value) (CAN_RXF1E_DATA_DB2_Msk & (_UINT32_(value) << CAN_RXF1E_DATA_DB2_Pos)) /* Assigment of value for DB2 in the CAN_RXF1E_DATA register */ +#define CAN_RXF1E_DATA_DB3_Pos _UINT32_(24) /* (CAN_RXF1E_DATA) Data Byte 3 Position */ +#define CAN_RXF1E_DATA_DB3_Msk (_UINT32_(0xFF) << CAN_RXF1E_DATA_DB3_Pos) /* (CAN_RXF1E_DATA) Data Byte 3 Mask */ +#define CAN_RXF1E_DATA_DB3(value) (CAN_RXF1E_DATA_DB3_Msk & (_UINT32_(value) << CAN_RXF1E_DATA_DB3_Pos)) /* Assigment of value for DB3 in the CAN_RXF1E_DATA register */ +#define CAN_RXF1E_DATA_Msk _UINT32_(0xFFFFFFFF) /* (CAN_RXF1E_DATA) Register Mask */ + + +/* -------- CAN_TXBE_0 : (CAN Offset: 0x00) (R/W 32) Tx Buffer Element 0 -------- */ +#define CAN_TXBE_0_ID_Pos _UINT32_(0) /* (CAN_TXBE_0) Identifier Position */ +#define CAN_TXBE_0_ID_Msk (_UINT32_(0x1FFFFFFF) << CAN_TXBE_0_ID_Pos) /* (CAN_TXBE_0) Identifier Mask */ +#define CAN_TXBE_0_ID(value) (CAN_TXBE_0_ID_Msk & (_UINT32_(value) << CAN_TXBE_0_ID_Pos)) /* Assigment of value for ID in the CAN_TXBE_0 register */ +#define CAN_TXBE_0_RTR_Pos _UINT32_(29) /* (CAN_TXBE_0) Remote Transmission Request Position */ +#define CAN_TXBE_0_RTR_Msk (_UINT32_(0x1) << CAN_TXBE_0_RTR_Pos) /* (CAN_TXBE_0) Remote Transmission Request Mask */ +#define CAN_TXBE_0_RTR(value) (CAN_TXBE_0_RTR_Msk & (_UINT32_(value) << CAN_TXBE_0_RTR_Pos)) /* Assigment of value for RTR in the CAN_TXBE_0 register */ +#define CAN_TXBE_0_XTD_Pos _UINT32_(30) /* (CAN_TXBE_0) Extended Identifier Position */ +#define CAN_TXBE_0_XTD_Msk (_UINT32_(0x1) << CAN_TXBE_0_XTD_Pos) /* (CAN_TXBE_0) Extended Identifier Mask */ +#define CAN_TXBE_0_XTD(value) (CAN_TXBE_0_XTD_Msk & (_UINT32_(value) << CAN_TXBE_0_XTD_Pos)) /* Assigment of value for XTD in the CAN_TXBE_0 register */ +#define CAN_TXBE_0_ESI_Pos _UINT32_(31) /* (CAN_TXBE_0) Error State Indicator Position */ +#define CAN_TXBE_0_ESI_Msk (_UINT32_(0x1) << CAN_TXBE_0_ESI_Pos) /* (CAN_TXBE_0) Error State Indicator Mask */ +#define CAN_TXBE_0_ESI(value) (CAN_TXBE_0_ESI_Msk & (_UINT32_(value) << CAN_TXBE_0_ESI_Pos)) /* Assigment of value for ESI in the CAN_TXBE_0 register */ +#define CAN_TXBE_0_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBE_0) Register Mask */ + + +/* -------- CAN_TXBE_1 : (CAN Offset: 0x04) (R/W 32) Tx Buffer Element 1 -------- */ +#define CAN_TXBE_1_DLC_Pos _UINT32_(16) /* (CAN_TXBE_1) Data Length Code Position */ +#define CAN_TXBE_1_DLC_Msk (_UINT32_(0xF) << CAN_TXBE_1_DLC_Pos) /* (CAN_TXBE_1) Data Length Code Mask */ +#define CAN_TXBE_1_DLC(value) (CAN_TXBE_1_DLC_Msk & (_UINT32_(value) << CAN_TXBE_1_DLC_Pos)) /* Assigment of value for DLC in the CAN_TXBE_1 register */ +#define CAN_TXBE_1_BRS_Pos _UINT32_(20) /* (CAN_TXBE_1) Bit Rate Switch Position */ +#define CAN_TXBE_1_BRS_Msk (_UINT32_(0x1) << CAN_TXBE_1_BRS_Pos) /* (CAN_TXBE_1) Bit Rate Switch Mask */ +#define CAN_TXBE_1_BRS(value) (CAN_TXBE_1_BRS_Msk & (_UINT32_(value) << CAN_TXBE_1_BRS_Pos)) /* Assigment of value for BRS in the CAN_TXBE_1 register */ +#define CAN_TXBE_1_FDF_Pos _UINT32_(21) /* (CAN_TXBE_1) FD Format Position */ +#define CAN_TXBE_1_FDF_Msk (_UINT32_(0x1) << CAN_TXBE_1_FDF_Pos) /* (CAN_TXBE_1) FD Format Mask */ +#define CAN_TXBE_1_FDF(value) (CAN_TXBE_1_FDF_Msk & (_UINT32_(value) << CAN_TXBE_1_FDF_Pos)) /* Assigment of value for FDF in the CAN_TXBE_1 register */ +#define CAN_TXBE_1_EFC_Pos _UINT32_(23) /* (CAN_TXBE_1) Event FIFO Control Position */ +#define CAN_TXBE_1_EFC_Msk (_UINT32_(0x1) << CAN_TXBE_1_EFC_Pos) /* (CAN_TXBE_1) Event FIFO Control Mask */ +#define CAN_TXBE_1_EFC(value) (CAN_TXBE_1_EFC_Msk & (_UINT32_(value) << CAN_TXBE_1_EFC_Pos)) /* Assigment of value for EFC in the CAN_TXBE_1 register */ +#define CAN_TXBE_1_MM_Pos _UINT32_(24) /* (CAN_TXBE_1) Message Marker Position */ +#define CAN_TXBE_1_MM_Msk (_UINT32_(0xFF) << CAN_TXBE_1_MM_Pos) /* (CAN_TXBE_1) Message Marker Mask */ +#define CAN_TXBE_1_MM(value) (CAN_TXBE_1_MM_Msk & (_UINT32_(value) << CAN_TXBE_1_MM_Pos)) /* Assigment of value for MM in the CAN_TXBE_1 register */ +#define CAN_TXBE_1_Msk _UINT32_(0xFFBF0000) /* (CAN_TXBE_1) Register Mask */ + + +/* -------- CAN_TXBE_DATA : (CAN Offset: 0x08) (R/W 32) Tx Buffer Element Data -------- */ +#define CAN_TXBE_DATA_DB0_Pos _UINT32_(0) /* (CAN_TXBE_DATA) Data Byte 0 Position */ +#define CAN_TXBE_DATA_DB0_Msk (_UINT32_(0xFF) << CAN_TXBE_DATA_DB0_Pos) /* (CAN_TXBE_DATA) Data Byte 0 Mask */ +#define CAN_TXBE_DATA_DB0(value) (CAN_TXBE_DATA_DB0_Msk & (_UINT32_(value) << CAN_TXBE_DATA_DB0_Pos)) /* Assigment of value for DB0 in the CAN_TXBE_DATA register */ +#define CAN_TXBE_DATA_DB1_Pos _UINT32_(8) /* (CAN_TXBE_DATA) Data Byte 1 Position */ +#define CAN_TXBE_DATA_DB1_Msk (_UINT32_(0xFF) << CAN_TXBE_DATA_DB1_Pos) /* (CAN_TXBE_DATA) Data Byte 1 Mask */ +#define CAN_TXBE_DATA_DB1(value) (CAN_TXBE_DATA_DB1_Msk & (_UINT32_(value) << CAN_TXBE_DATA_DB1_Pos)) /* Assigment of value for DB1 in the CAN_TXBE_DATA register */ +#define CAN_TXBE_DATA_DB2_Pos _UINT32_(16) /* (CAN_TXBE_DATA) Data Byte 2 Position */ +#define CAN_TXBE_DATA_DB2_Msk (_UINT32_(0xFF) << CAN_TXBE_DATA_DB2_Pos) /* (CAN_TXBE_DATA) Data Byte 2 Mask */ +#define CAN_TXBE_DATA_DB2(value) (CAN_TXBE_DATA_DB2_Msk & (_UINT32_(value) << CAN_TXBE_DATA_DB2_Pos)) /* Assigment of value for DB2 in the CAN_TXBE_DATA register */ +#define CAN_TXBE_DATA_DB3_Pos _UINT32_(24) /* (CAN_TXBE_DATA) Data Byte 3 Position */ +#define CAN_TXBE_DATA_DB3_Msk (_UINT32_(0xFF) << CAN_TXBE_DATA_DB3_Pos) /* (CAN_TXBE_DATA) Data Byte 3 Mask */ +#define CAN_TXBE_DATA_DB3(value) (CAN_TXBE_DATA_DB3_Msk & (_UINT32_(value) << CAN_TXBE_DATA_DB3_Pos)) /* Assigment of value for DB3 in the CAN_TXBE_DATA register */ +#define CAN_TXBE_DATA_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBE_DATA) Register Mask */ + + +/* -------- CAN_TXEFE_0 : (CAN Offset: 0x00) (R/W 32) Tx Event FIFO Element 0 -------- */ +#define CAN_TXEFE_0_ID_Pos _UINT32_(0) /* (CAN_TXEFE_0) Identifier Position */ +#define CAN_TXEFE_0_ID_Msk (_UINT32_(0x1FFFFFFF) << CAN_TXEFE_0_ID_Pos) /* (CAN_TXEFE_0) Identifier Mask */ +#define CAN_TXEFE_0_ID(value) (CAN_TXEFE_0_ID_Msk & (_UINT32_(value) << CAN_TXEFE_0_ID_Pos)) /* Assigment of value for ID in the CAN_TXEFE_0 register */ +#define CAN_TXEFE_0_RTR_Pos _UINT32_(29) /* (CAN_TXEFE_0) Remote Transmission Request Position */ +#define CAN_TXEFE_0_RTR_Msk (_UINT32_(0x1) << CAN_TXEFE_0_RTR_Pos) /* (CAN_TXEFE_0) Remote Transmission Request Mask */ +#define CAN_TXEFE_0_RTR(value) (CAN_TXEFE_0_RTR_Msk & (_UINT32_(value) << CAN_TXEFE_0_RTR_Pos)) /* Assigment of value for RTR in the CAN_TXEFE_0 register */ +#define CAN_TXEFE_0_XTD_Pos _UINT32_(30) /* (CAN_TXEFE_0) Extended Identifier Position */ +#define CAN_TXEFE_0_XTD_Msk (_UINT32_(0x1) << CAN_TXEFE_0_XTD_Pos) /* (CAN_TXEFE_0) Extended Identifier Mask */ +#define CAN_TXEFE_0_XTD(value) (CAN_TXEFE_0_XTD_Msk & (_UINT32_(value) << CAN_TXEFE_0_XTD_Pos)) /* Assigment of value for XTD in the CAN_TXEFE_0 register */ +#define CAN_TXEFE_0_ESI_Pos _UINT32_(31) /* (CAN_TXEFE_0) Error State Indicator Position */ +#define CAN_TXEFE_0_ESI_Msk (_UINT32_(0x1) << CAN_TXEFE_0_ESI_Pos) /* (CAN_TXEFE_0) Error State Indicator Mask */ +#define CAN_TXEFE_0_ESI(value) (CAN_TXEFE_0_ESI_Msk & (_UINT32_(value) << CAN_TXEFE_0_ESI_Pos)) /* Assigment of value for ESI in the CAN_TXEFE_0 register */ +#define CAN_TXEFE_0_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXEFE_0) Register Mask */ + + +/* -------- CAN_TXEFE_1 : (CAN Offset: 0x04) (R/W 32) Tx Event FIFO Element 1 -------- */ +#define CAN_TXEFE_1_TXTS_Pos _UINT32_(0) /* (CAN_TXEFE_1) Tx Timestamp Position */ +#define CAN_TXEFE_1_TXTS_Msk (_UINT32_(0xFFFF) << CAN_TXEFE_1_TXTS_Pos) /* (CAN_TXEFE_1) Tx Timestamp Mask */ +#define CAN_TXEFE_1_TXTS(value) (CAN_TXEFE_1_TXTS_Msk & (_UINT32_(value) << CAN_TXEFE_1_TXTS_Pos)) /* Assigment of value for TXTS in the CAN_TXEFE_1 register */ +#define CAN_TXEFE_1_DLC_Pos _UINT32_(16) /* (CAN_TXEFE_1) Data Length Code Position */ +#define CAN_TXEFE_1_DLC_Msk (_UINT32_(0xF) << CAN_TXEFE_1_DLC_Pos) /* (CAN_TXEFE_1) Data Length Code Mask */ +#define CAN_TXEFE_1_DLC(value) (CAN_TXEFE_1_DLC_Msk & (_UINT32_(value) << CAN_TXEFE_1_DLC_Pos)) /* Assigment of value for DLC in the CAN_TXEFE_1 register */ +#define CAN_TXEFE_1_BRS_Pos _UINT32_(20) /* (CAN_TXEFE_1) Bit Rate Switch Position */ +#define CAN_TXEFE_1_BRS_Msk (_UINT32_(0x1) << CAN_TXEFE_1_BRS_Pos) /* (CAN_TXEFE_1) Bit Rate Switch Mask */ +#define CAN_TXEFE_1_BRS(value) (CAN_TXEFE_1_BRS_Msk & (_UINT32_(value) << CAN_TXEFE_1_BRS_Pos)) /* Assigment of value for BRS in the CAN_TXEFE_1 register */ +#define CAN_TXEFE_1_FDF_Pos _UINT32_(21) /* (CAN_TXEFE_1) FD Format Position */ +#define CAN_TXEFE_1_FDF_Msk (_UINT32_(0x1) << CAN_TXEFE_1_FDF_Pos) /* (CAN_TXEFE_1) FD Format Mask */ +#define CAN_TXEFE_1_FDF(value) (CAN_TXEFE_1_FDF_Msk & (_UINT32_(value) << CAN_TXEFE_1_FDF_Pos)) /* Assigment of value for FDF in the CAN_TXEFE_1 register */ +#define CAN_TXEFE_1_ET_Pos _UINT32_(22) /* (CAN_TXEFE_1) Event Type Position */ +#define CAN_TXEFE_1_ET_Msk (_UINT32_(0x3) << CAN_TXEFE_1_ET_Pos) /* (CAN_TXEFE_1) Event Type Mask */ +#define CAN_TXEFE_1_ET(value) (CAN_TXEFE_1_ET_Msk & (_UINT32_(value) << CAN_TXEFE_1_ET_Pos)) /* Assigment of value for ET in the CAN_TXEFE_1 register */ +#define CAN_TXEFE_1_ET_TXE_Val _UINT32_(0x1) /* (CAN_TXEFE_1) Tx event */ +#define CAN_TXEFE_1_ET_TXC_Val _UINT32_(0x2) /* (CAN_TXEFE_1) Transmission in spite of cancellation */ +#define CAN_TXEFE_1_ET_TXE (CAN_TXEFE_1_ET_TXE_Val << CAN_TXEFE_1_ET_Pos) /* (CAN_TXEFE_1) Tx event Position */ +#define CAN_TXEFE_1_ET_TXC (CAN_TXEFE_1_ET_TXC_Val << CAN_TXEFE_1_ET_Pos) /* (CAN_TXEFE_1) Transmission in spite of cancellation Position */ +#define CAN_TXEFE_1_MM_Pos _UINT32_(24) /* (CAN_TXEFE_1) Message Marker Position */ +#define CAN_TXEFE_1_MM_Msk (_UINT32_(0xFF) << CAN_TXEFE_1_MM_Pos) /* (CAN_TXEFE_1) Message Marker Mask */ +#define CAN_TXEFE_1_MM(value) (CAN_TXEFE_1_MM_Msk & (_UINT32_(value) << CAN_TXEFE_1_MM_Pos)) /* Assigment of value for MM in the CAN_TXEFE_1 register */ +#define CAN_TXEFE_1_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXEFE_1) Register Mask */ + + +/* -------- CAN_SIDFE_0 : (CAN Offset: 0x00) (R/W 32) Standard Message ID Filter Element 0 -------- */ +#define CAN_SIDFE_0_SFID2_Pos _UINT32_(0) /* (CAN_SIDFE_0) Standard Filter ID 2 Position */ +#define CAN_SIDFE_0_SFID2_Msk (_UINT32_(0x7FF) << CAN_SIDFE_0_SFID2_Pos) /* (CAN_SIDFE_0) Standard Filter ID 2 Mask */ +#define CAN_SIDFE_0_SFID2(value) (CAN_SIDFE_0_SFID2_Msk & (_UINT32_(value) << CAN_SIDFE_0_SFID2_Pos)) /* Assigment of value for SFID2 in the CAN_SIDFE_0 register */ +#define CAN_SIDFE_0_SFID1_Pos _UINT32_(16) /* (CAN_SIDFE_0) Standard Filter ID 1 Position */ +#define CAN_SIDFE_0_SFID1_Msk (_UINT32_(0x7FF) << CAN_SIDFE_0_SFID1_Pos) /* (CAN_SIDFE_0) Standard Filter ID 1 Mask */ +#define CAN_SIDFE_0_SFID1(value) (CAN_SIDFE_0_SFID1_Msk & (_UINT32_(value) << CAN_SIDFE_0_SFID1_Pos)) /* Assigment of value for SFID1 in the CAN_SIDFE_0 register */ +#define CAN_SIDFE_0_SFEC_Pos _UINT32_(27) /* (CAN_SIDFE_0) Standard Filter Element Configuration Position */ +#define CAN_SIDFE_0_SFEC_Msk (_UINT32_(0x7) << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Standard Filter Element Configuration Mask */ +#define CAN_SIDFE_0_SFEC(value) (CAN_SIDFE_0_SFEC_Msk & (_UINT32_(value) << CAN_SIDFE_0_SFEC_Pos)) /* Assigment of value for SFEC in the CAN_SIDFE_0 register */ +#define CAN_SIDFE_0_SFEC_DISABLE_Val _UINT32_(0x0) /* (CAN_SIDFE_0) Disable filter element */ +#define CAN_SIDFE_0_SFEC_STF0M_Val _UINT32_(0x1) /* (CAN_SIDFE_0) Store in Rx FIFO 0 if filter match */ +#define CAN_SIDFE_0_SFEC_STF1M_Val _UINT32_(0x2) /* (CAN_SIDFE_0) Store in Rx FIFO 1 if filter match */ +#define CAN_SIDFE_0_SFEC_REJECT_Val _UINT32_(0x3) /* (CAN_SIDFE_0) Reject ID if filter match */ +#define CAN_SIDFE_0_SFEC_PRIORITY_Val _UINT32_(0x4) /* (CAN_SIDFE_0) Set priority if filter match */ +#define CAN_SIDFE_0_SFEC_PRIF0M_Val _UINT32_(0x5) /* (CAN_SIDFE_0) Set priority and store in FIFO 0 if filter match */ +#define CAN_SIDFE_0_SFEC_PRIF1M_Val _UINT32_(0x6) /* (CAN_SIDFE_0) Set priority and store in FIFO 1 if filter match */ +#define CAN_SIDFE_0_SFEC_STRXBUF_Val _UINT32_(0x7) /* (CAN_SIDFE_0) Store into Rx Buffer */ +#define CAN_SIDFE_0_SFEC_DISABLE (CAN_SIDFE_0_SFEC_DISABLE_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Disable filter element Position */ +#define CAN_SIDFE_0_SFEC_STF0M (CAN_SIDFE_0_SFEC_STF0M_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Store in Rx FIFO 0 if filter match Position */ +#define CAN_SIDFE_0_SFEC_STF1M (CAN_SIDFE_0_SFEC_STF1M_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Store in Rx FIFO 1 if filter match Position */ +#define CAN_SIDFE_0_SFEC_REJECT (CAN_SIDFE_0_SFEC_REJECT_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Reject ID if filter match Position */ +#define CAN_SIDFE_0_SFEC_PRIORITY (CAN_SIDFE_0_SFEC_PRIORITY_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Set priority if filter match Position */ +#define CAN_SIDFE_0_SFEC_PRIF0M (CAN_SIDFE_0_SFEC_PRIF0M_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Set priority and store in FIFO 0 if filter match Position */ +#define CAN_SIDFE_0_SFEC_PRIF1M (CAN_SIDFE_0_SFEC_PRIF1M_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Set priority and store in FIFO 1 if filter match Position */ +#define CAN_SIDFE_0_SFEC_STRXBUF (CAN_SIDFE_0_SFEC_STRXBUF_Val << CAN_SIDFE_0_SFEC_Pos) /* (CAN_SIDFE_0) Store into Rx Buffer Position */ +#define CAN_SIDFE_0_SFT_Pos _UINT32_(30) /* (CAN_SIDFE_0) Standard Filter Type Position */ +#define CAN_SIDFE_0_SFT_Msk (_UINT32_(0x3) << CAN_SIDFE_0_SFT_Pos) /* (CAN_SIDFE_0) Standard Filter Type Mask */ +#define CAN_SIDFE_0_SFT(value) (CAN_SIDFE_0_SFT_Msk & (_UINT32_(value) << CAN_SIDFE_0_SFT_Pos)) /* Assigment of value for SFT in the CAN_SIDFE_0 register */ +#define CAN_SIDFE_0_SFT_RANGE_Val _UINT32_(0x0) /* (CAN_SIDFE_0) Range filter from SFID1 to SFID2 */ +#define CAN_SIDFE_0_SFT_DUAL_Val _UINT32_(0x1) /* (CAN_SIDFE_0) Dual ID filter for SFID1 or SFID2 */ +#define CAN_SIDFE_0_SFT_CLASSIC_Val _UINT32_(0x2) /* (CAN_SIDFE_0) Classic filter */ +#define CAN_SIDFE_0_SFT_RANGE (CAN_SIDFE_0_SFT_RANGE_Val << CAN_SIDFE_0_SFT_Pos) /* (CAN_SIDFE_0) Range filter from SFID1 to SFID2 Position */ +#define CAN_SIDFE_0_SFT_DUAL (CAN_SIDFE_0_SFT_DUAL_Val << CAN_SIDFE_0_SFT_Pos) /* (CAN_SIDFE_0) Dual ID filter for SFID1 or SFID2 Position */ +#define CAN_SIDFE_0_SFT_CLASSIC (CAN_SIDFE_0_SFT_CLASSIC_Val << CAN_SIDFE_0_SFT_Pos) /* (CAN_SIDFE_0) Classic filter Position */ +#define CAN_SIDFE_0_Msk _UINT32_(0xFFFF07FF) /* (CAN_SIDFE_0) Register Mask */ + + +/* -------- CAN_XIDFE_0 : (CAN Offset: 0x00) (R/W 32) Extended Message ID Filter Element 0 -------- */ +#define CAN_XIDFE_0_EFID1_Pos _UINT32_(0) /* (CAN_XIDFE_0) Extended Filter ID 1 Position */ +#define CAN_XIDFE_0_EFID1_Msk (_UINT32_(0x1FFFFFFF) << CAN_XIDFE_0_EFID1_Pos) /* (CAN_XIDFE_0) Extended Filter ID 1 Mask */ +#define CAN_XIDFE_0_EFID1(value) (CAN_XIDFE_0_EFID1_Msk & (_UINT32_(value) << CAN_XIDFE_0_EFID1_Pos)) /* Assigment of value for EFID1 in the CAN_XIDFE_0 register */ +#define CAN_XIDFE_0_EFEC_Pos _UINT32_(29) /* (CAN_XIDFE_0) Extended Filter Element Configuration Position */ +#define CAN_XIDFE_0_EFEC_Msk (_UINT32_(0x7) << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Extended Filter Element Configuration Mask */ +#define CAN_XIDFE_0_EFEC(value) (CAN_XIDFE_0_EFEC_Msk & (_UINT32_(value) << CAN_XIDFE_0_EFEC_Pos)) /* Assigment of value for EFEC in the CAN_XIDFE_0 register */ +#define CAN_XIDFE_0_EFEC_DISABLE_Val _UINT32_(0x0) /* (CAN_XIDFE_0) Disable filter element */ +#define CAN_XIDFE_0_EFEC_STF0M_Val _UINT32_(0x1) /* (CAN_XIDFE_0) Store in Rx FIFO 0 if filter match */ +#define CAN_XIDFE_0_EFEC_STF1M_Val _UINT32_(0x2) /* (CAN_XIDFE_0) Store in Rx FIFO 1 if filter match */ +#define CAN_XIDFE_0_EFEC_REJECT_Val _UINT32_(0x3) /* (CAN_XIDFE_0) Reject ID if filter match */ +#define CAN_XIDFE_0_EFEC_PRIORITY_Val _UINT32_(0x4) /* (CAN_XIDFE_0) Set priority if filter match */ +#define CAN_XIDFE_0_EFEC_PRIF0M_Val _UINT32_(0x5) /* (CAN_XIDFE_0) Set priority and store in FIFO 0 if filter match */ +#define CAN_XIDFE_0_EFEC_PRIF1M_Val _UINT32_(0x6) /* (CAN_XIDFE_0) Set priority and store in FIFO 1 if filter match */ +#define CAN_XIDFE_0_EFEC_STRXBUF_Val _UINT32_(0x7) /* (CAN_XIDFE_0) Store into Rx Buffer */ +#define CAN_XIDFE_0_EFEC_DISABLE (CAN_XIDFE_0_EFEC_DISABLE_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Disable filter element Position */ +#define CAN_XIDFE_0_EFEC_STF0M (CAN_XIDFE_0_EFEC_STF0M_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Store in Rx FIFO 0 if filter match Position */ +#define CAN_XIDFE_0_EFEC_STF1M (CAN_XIDFE_0_EFEC_STF1M_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Store in Rx FIFO 1 if filter match Position */ +#define CAN_XIDFE_0_EFEC_REJECT (CAN_XIDFE_0_EFEC_REJECT_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Reject ID if filter match Position */ +#define CAN_XIDFE_0_EFEC_PRIORITY (CAN_XIDFE_0_EFEC_PRIORITY_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Set priority if filter match Position */ +#define CAN_XIDFE_0_EFEC_PRIF0M (CAN_XIDFE_0_EFEC_PRIF0M_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Set priority and store in FIFO 0 if filter match Position */ +#define CAN_XIDFE_0_EFEC_PRIF1M (CAN_XIDFE_0_EFEC_PRIF1M_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Set priority and store in FIFO 1 if filter match Position */ +#define CAN_XIDFE_0_EFEC_STRXBUF (CAN_XIDFE_0_EFEC_STRXBUF_Val << CAN_XIDFE_0_EFEC_Pos) /* (CAN_XIDFE_0) Store into Rx Buffer Position */ +#define CAN_XIDFE_0_Msk _UINT32_(0xFFFFFFFF) /* (CAN_XIDFE_0) Register Mask */ + + +/* -------- CAN_XIDFE_1 : (CAN Offset: 0x04) (R/W 32) Extended Message ID Filter Element 1 -------- */ +#define CAN_XIDFE_1_EFID2_Pos _UINT32_(0) /* (CAN_XIDFE_1) Extended Filter ID 2 Position */ +#define CAN_XIDFE_1_EFID2_Msk (_UINT32_(0x1FFFFFFF) << CAN_XIDFE_1_EFID2_Pos) /* (CAN_XIDFE_1) Extended Filter ID 2 Mask */ +#define CAN_XIDFE_1_EFID2(value) (CAN_XIDFE_1_EFID2_Msk & (_UINT32_(value) << CAN_XIDFE_1_EFID2_Pos)) /* Assigment of value for EFID2 in the CAN_XIDFE_1 register */ +#define CAN_XIDFE_1_EFT_Pos _UINT32_(30) /* (CAN_XIDFE_1) Extended Filter Type Position */ +#define CAN_XIDFE_1_EFT_Msk (_UINT32_(0x3) << CAN_XIDFE_1_EFT_Pos) /* (CAN_XIDFE_1) Extended Filter Type Mask */ +#define CAN_XIDFE_1_EFT(value) (CAN_XIDFE_1_EFT_Msk & (_UINT32_(value) << CAN_XIDFE_1_EFT_Pos)) /* Assigment of value for EFT in the CAN_XIDFE_1 register */ +#define CAN_XIDFE_1_EFT_RANGEM_Val _UINT32_(0x0) /* (CAN_XIDFE_1) Range filter from EFID1 to EFID2 */ +#define CAN_XIDFE_1_EFT_DUAL_Val _UINT32_(0x1) /* (CAN_XIDFE_1) Dual ID filter for EFID1 or EFID2 */ +#define CAN_XIDFE_1_EFT_CLASSIC_Val _UINT32_(0x2) /* (CAN_XIDFE_1) Classic filter */ +#define CAN_XIDFE_1_EFT_RANGE_Val _UINT32_(0x3) /* (CAN_XIDFE_1) Range filter from EFID1 to EFID2 with no XIDAM mask */ +#define CAN_XIDFE_1_EFT_RANGEM (CAN_XIDFE_1_EFT_RANGEM_Val << CAN_XIDFE_1_EFT_Pos) /* (CAN_XIDFE_1) Range filter from EFID1 to EFID2 Position */ +#define CAN_XIDFE_1_EFT_DUAL (CAN_XIDFE_1_EFT_DUAL_Val << CAN_XIDFE_1_EFT_Pos) /* (CAN_XIDFE_1) Dual ID filter for EFID1 or EFID2 Position */ +#define CAN_XIDFE_1_EFT_CLASSIC (CAN_XIDFE_1_EFT_CLASSIC_Val << CAN_XIDFE_1_EFT_Pos) /* (CAN_XIDFE_1) Classic filter Position */ +#define CAN_XIDFE_1_EFT_RANGE (CAN_XIDFE_1_EFT_RANGE_Val << CAN_XIDFE_1_EFT_Pos) /* (CAN_XIDFE_1) Range filter from EFID1 to EFID2 with no XIDAM mask Position */ +#define CAN_XIDFE_1_Msk _UINT32_(0xDFFFFFFF) /* (CAN_XIDFE_1) Register Mask */ + + +/* -------- CAN_CREL : (CAN Offset: 0x00) ( R/ 32) Core Release -------- */ +#define CAN_CREL_RESETVALUE _UINT32_(0x32100000) /* (CAN_CREL) Core Release Reset Value */ + +#define CAN_CREL_SUBSTEP_Pos _UINT32_(20) /* (CAN_CREL) Sub-step of Core Release Position */ +#define CAN_CREL_SUBSTEP_Msk (_UINT32_(0xF) << CAN_CREL_SUBSTEP_Pos) /* (CAN_CREL) Sub-step of Core Release Mask */ +#define CAN_CREL_SUBSTEP(value) (CAN_CREL_SUBSTEP_Msk & (_UINT32_(value) << CAN_CREL_SUBSTEP_Pos)) /* Assigment of value for SUBSTEP in the CAN_CREL register */ +#define CAN_CREL_STEP_Pos _UINT32_(24) /* (CAN_CREL) Step of Core Release Position */ +#define CAN_CREL_STEP_Msk (_UINT32_(0xF) << CAN_CREL_STEP_Pos) /* (CAN_CREL) Step of Core Release Mask */ +#define CAN_CREL_STEP(value) (CAN_CREL_STEP_Msk & (_UINT32_(value) << CAN_CREL_STEP_Pos)) /* Assigment of value for STEP in the CAN_CREL register */ +#define CAN_CREL_REL_Pos _UINT32_(28) /* (CAN_CREL) Core Release Position */ +#define CAN_CREL_REL_Msk (_UINT32_(0xF) << CAN_CREL_REL_Pos) /* (CAN_CREL) Core Release Mask */ +#define CAN_CREL_REL(value) (CAN_CREL_REL_Msk & (_UINT32_(value) << CAN_CREL_REL_Pos)) /* Assigment of value for REL in the CAN_CREL register */ +#define CAN_CREL_Msk _UINT32_(0xFFF00000) /* (CAN_CREL) Register Mask */ + + +/* -------- CAN_ENDN : (CAN Offset: 0x04) ( R/ 32) Endian -------- */ +#define CAN_ENDN_RESETVALUE _UINT32_(0x87654321) /* (CAN_ENDN) Endian Reset Value */ + +#define CAN_ENDN_ETV_Pos _UINT32_(0) /* (CAN_ENDN) Endianness Test Value Position */ +#define CAN_ENDN_ETV_Msk (_UINT32_(0xFFFFFFFF) << CAN_ENDN_ETV_Pos) /* (CAN_ENDN) Endianness Test Value Mask */ +#define CAN_ENDN_ETV(value) (CAN_ENDN_ETV_Msk & (_UINT32_(value) << CAN_ENDN_ETV_Pos)) /* Assigment of value for ETV in the CAN_ENDN register */ +#define CAN_ENDN_Msk _UINT32_(0xFFFFFFFF) /* (CAN_ENDN) Register Mask */ + + +/* -------- CAN_MRCFG : (CAN Offset: 0x08) (R/W 32) Message RAM Configuration -------- */ +#define CAN_MRCFG_RESETVALUE _UINT32_(0x02) /* (CAN_MRCFG) Message RAM Configuration Reset Value */ + +#define CAN_MRCFG_QOS_Pos _UINT32_(0) /* (CAN_MRCFG) Quality of Service Position */ +#define CAN_MRCFG_QOS_Msk (_UINT32_(0x3) << CAN_MRCFG_QOS_Pos) /* (CAN_MRCFG) Quality of Service Mask */ +#define CAN_MRCFG_QOS(value) (CAN_MRCFG_QOS_Msk & (_UINT32_(value) << CAN_MRCFG_QOS_Pos)) /* Assigment of value for QOS in the CAN_MRCFG register */ +#define CAN_MRCFG_QOS_DISABLE_Val _UINT32_(0x0) /* (CAN_MRCFG) Background (no sensitive operation) */ +#define CAN_MRCFG_QOS_LOW_Val _UINT32_(0x1) /* (CAN_MRCFG) Sensitive Bandwidth */ +#define CAN_MRCFG_QOS_MEDIUM_Val _UINT32_(0x2) /* (CAN_MRCFG) Sensitive Latency */ +#define CAN_MRCFG_QOS_HIGH_Val _UINT32_(0x3) /* (CAN_MRCFG) Critical Latency */ +#define CAN_MRCFG_QOS_DISABLE (CAN_MRCFG_QOS_DISABLE_Val << CAN_MRCFG_QOS_Pos) /* (CAN_MRCFG) Background (no sensitive operation) Position */ +#define CAN_MRCFG_QOS_LOW (CAN_MRCFG_QOS_LOW_Val << CAN_MRCFG_QOS_Pos) /* (CAN_MRCFG) Sensitive Bandwidth Position */ +#define CAN_MRCFG_QOS_MEDIUM (CAN_MRCFG_QOS_MEDIUM_Val << CAN_MRCFG_QOS_Pos) /* (CAN_MRCFG) Sensitive Latency Position */ +#define CAN_MRCFG_QOS_HIGH (CAN_MRCFG_QOS_HIGH_Val << CAN_MRCFG_QOS_Pos) /* (CAN_MRCFG) Critical Latency Position */ +#define CAN_MRCFG_Msk _UINT32_(0x00000003) /* (CAN_MRCFG) Register Mask */ + + +/* -------- CAN_DBTP : (CAN Offset: 0x0C) (R/W 32) Fast Bit Timing and Prescaler -------- */ +#define CAN_DBTP_RESETVALUE _UINT32_(0xA33) /* (CAN_DBTP) Fast Bit Timing and Prescaler Reset Value */ + +#define CAN_DBTP_DSJW_Pos _UINT32_(0) /* (CAN_DBTP) Data (Re)Synchronization Jump Width Position */ +#define CAN_DBTP_DSJW_Msk (_UINT32_(0xF) << CAN_DBTP_DSJW_Pos) /* (CAN_DBTP) Data (Re)Synchronization Jump Width Mask */ +#define CAN_DBTP_DSJW(value) (CAN_DBTP_DSJW_Msk & (_UINT32_(value) << CAN_DBTP_DSJW_Pos)) /* Assigment of value for DSJW in the CAN_DBTP register */ +#define CAN_DBTP_DTSEG2_Pos _UINT32_(4) /* (CAN_DBTP) Data time segment after sample point Position */ +#define CAN_DBTP_DTSEG2_Msk (_UINT32_(0xF) << CAN_DBTP_DTSEG2_Pos) /* (CAN_DBTP) Data time segment after sample point Mask */ +#define CAN_DBTP_DTSEG2(value) (CAN_DBTP_DTSEG2_Msk & (_UINT32_(value) << CAN_DBTP_DTSEG2_Pos)) /* Assigment of value for DTSEG2 in the CAN_DBTP register */ +#define CAN_DBTP_DTSEG1_Pos _UINT32_(8) /* (CAN_DBTP) Data time segment before sample point Position */ +#define CAN_DBTP_DTSEG1_Msk (_UINT32_(0x1F) << CAN_DBTP_DTSEG1_Pos) /* (CAN_DBTP) Data time segment before sample point Mask */ +#define CAN_DBTP_DTSEG1(value) (CAN_DBTP_DTSEG1_Msk & (_UINT32_(value) << CAN_DBTP_DTSEG1_Pos)) /* Assigment of value for DTSEG1 in the CAN_DBTP register */ +#define CAN_DBTP_DBRP_Pos _UINT32_(16) /* (CAN_DBTP) Data Baud Rate Prescaler Position */ +#define CAN_DBTP_DBRP_Msk (_UINT32_(0x1F) << CAN_DBTP_DBRP_Pos) /* (CAN_DBTP) Data Baud Rate Prescaler Mask */ +#define CAN_DBTP_DBRP(value) (CAN_DBTP_DBRP_Msk & (_UINT32_(value) << CAN_DBTP_DBRP_Pos)) /* Assigment of value for DBRP in the CAN_DBTP register */ +#define CAN_DBTP_TDC_Pos _UINT32_(23) /* (CAN_DBTP) Tranceiver Delay Compensation Position */ +#define CAN_DBTP_TDC_Msk (_UINT32_(0x1) << CAN_DBTP_TDC_Pos) /* (CAN_DBTP) Tranceiver Delay Compensation Mask */ +#define CAN_DBTP_TDC(value) (CAN_DBTP_TDC_Msk & (_UINT32_(value) << CAN_DBTP_TDC_Pos)) /* Assigment of value for TDC in the CAN_DBTP register */ +#define CAN_DBTP_Msk _UINT32_(0x009F1FFF) /* (CAN_DBTP) Register Mask */ + + +/* -------- CAN_TEST : (CAN Offset: 0x10) (R/W 32) Test -------- */ +#define CAN_TEST_RESETVALUE _UINT32_(0x00) /* (CAN_TEST) Test Reset Value */ + +#define CAN_TEST_LBCK_Pos _UINT32_(4) /* (CAN_TEST) Loop Back Mode Position */ +#define CAN_TEST_LBCK_Msk (_UINT32_(0x1) << CAN_TEST_LBCK_Pos) /* (CAN_TEST) Loop Back Mode Mask */ +#define CAN_TEST_LBCK(value) (CAN_TEST_LBCK_Msk & (_UINT32_(value) << CAN_TEST_LBCK_Pos)) /* Assigment of value for LBCK in the CAN_TEST register */ +#define CAN_TEST_TX_Pos _UINT32_(5) /* (CAN_TEST) Control of Transmit Pin Position */ +#define CAN_TEST_TX_Msk (_UINT32_(0x3) << CAN_TEST_TX_Pos) /* (CAN_TEST) Control of Transmit Pin Mask */ +#define CAN_TEST_TX(value) (CAN_TEST_TX_Msk & (_UINT32_(value) << CAN_TEST_TX_Pos)) /* Assigment of value for TX in the CAN_TEST register */ +#define CAN_TEST_TX_CORE_Val _UINT32_(0x0) /* (CAN_TEST) TX controlled by CAN core */ +#define CAN_TEST_TX_SAMPLE_Val _UINT32_(0x1) /* (CAN_TEST) TX monitoring sample point */ +#define CAN_TEST_TX_DOMINANT_Val _UINT32_(0x2) /* (CAN_TEST) Dominant (0) level at pin CAN_TX */ +#define CAN_TEST_TX_RECESSIVE_Val _UINT32_(0x3) /* (CAN_TEST) Recessive (1) level at pin CAN_TX */ +#define CAN_TEST_TX_CORE (CAN_TEST_TX_CORE_Val << CAN_TEST_TX_Pos) /* (CAN_TEST) TX controlled by CAN core Position */ +#define CAN_TEST_TX_SAMPLE (CAN_TEST_TX_SAMPLE_Val << CAN_TEST_TX_Pos) /* (CAN_TEST) TX monitoring sample point Position */ +#define CAN_TEST_TX_DOMINANT (CAN_TEST_TX_DOMINANT_Val << CAN_TEST_TX_Pos) /* (CAN_TEST) Dominant (0) level at pin CAN_TX Position */ +#define CAN_TEST_TX_RECESSIVE (CAN_TEST_TX_RECESSIVE_Val << CAN_TEST_TX_Pos) /* (CAN_TEST) Recessive (1) level at pin CAN_TX Position */ +#define CAN_TEST_RX_Pos _UINT32_(7) /* (CAN_TEST) Receive Pin Position */ +#define CAN_TEST_RX_Msk (_UINT32_(0x1) << CAN_TEST_RX_Pos) /* (CAN_TEST) Receive Pin Mask */ +#define CAN_TEST_RX(value) (CAN_TEST_RX_Msk & (_UINT32_(value) << CAN_TEST_RX_Pos)) /* Assigment of value for RX in the CAN_TEST register */ +#define CAN_TEST_Msk _UINT32_(0x000000F0) /* (CAN_TEST) Register Mask */ + + +/* -------- CAN_RWD : (CAN Offset: 0x14) (R/W 32) RAM Watchdog -------- */ +#define CAN_RWD_RESETVALUE _UINT32_(0x00) /* (CAN_RWD) RAM Watchdog Reset Value */ + +#define CAN_RWD_WDC_Pos _UINT32_(0) /* (CAN_RWD) Watchdog Configuration Position */ +#define CAN_RWD_WDC_Msk (_UINT32_(0xFF) << CAN_RWD_WDC_Pos) /* (CAN_RWD) Watchdog Configuration Mask */ +#define CAN_RWD_WDC(value) (CAN_RWD_WDC_Msk & (_UINT32_(value) << CAN_RWD_WDC_Pos)) /* Assigment of value for WDC in the CAN_RWD register */ +#define CAN_RWD_WDV_Pos _UINT32_(8) /* (CAN_RWD) Watchdog Value Position */ +#define CAN_RWD_WDV_Msk (_UINT32_(0xFF) << CAN_RWD_WDV_Pos) /* (CAN_RWD) Watchdog Value Mask */ +#define CAN_RWD_WDV(value) (CAN_RWD_WDV_Msk & (_UINT32_(value) << CAN_RWD_WDV_Pos)) /* Assigment of value for WDV in the CAN_RWD register */ +#define CAN_RWD_Msk _UINT32_(0x0000FFFF) /* (CAN_RWD) Register Mask */ + + +/* -------- CAN_CCCR : (CAN Offset: 0x18) (R/W 32) CC Control -------- */ +#define CAN_CCCR_RESETVALUE _UINT32_(0x01) /* (CAN_CCCR) CC Control Reset Value */ + +#define CAN_CCCR_INIT_Pos _UINT32_(0) /* (CAN_CCCR) Initialization Position */ +#define CAN_CCCR_INIT_Msk (_UINT32_(0x1) << CAN_CCCR_INIT_Pos) /* (CAN_CCCR) Initialization Mask */ +#define CAN_CCCR_INIT(value) (CAN_CCCR_INIT_Msk & (_UINT32_(value) << CAN_CCCR_INIT_Pos)) /* Assigment of value for INIT in the CAN_CCCR register */ +#define CAN_CCCR_CCE_Pos _UINT32_(1) /* (CAN_CCCR) Configuration Change Enable Position */ +#define CAN_CCCR_CCE_Msk (_UINT32_(0x1) << CAN_CCCR_CCE_Pos) /* (CAN_CCCR) Configuration Change Enable Mask */ +#define CAN_CCCR_CCE(value) (CAN_CCCR_CCE_Msk & (_UINT32_(value) << CAN_CCCR_CCE_Pos)) /* Assigment of value for CCE in the CAN_CCCR register */ +#define CAN_CCCR_ASM_Pos _UINT32_(2) /* (CAN_CCCR) ASM Restricted Operation Mode Position */ +#define CAN_CCCR_ASM_Msk (_UINT32_(0x1) << CAN_CCCR_ASM_Pos) /* (CAN_CCCR) ASM Restricted Operation Mode Mask */ +#define CAN_CCCR_ASM(value) (CAN_CCCR_ASM_Msk & (_UINT32_(value) << CAN_CCCR_ASM_Pos)) /* Assigment of value for ASM in the CAN_CCCR register */ +#define CAN_CCCR_CSA_Pos _UINT32_(3) /* (CAN_CCCR) Clock Stop Acknowledge Position */ +#define CAN_CCCR_CSA_Msk (_UINT32_(0x1) << CAN_CCCR_CSA_Pos) /* (CAN_CCCR) Clock Stop Acknowledge Mask */ +#define CAN_CCCR_CSA(value) (CAN_CCCR_CSA_Msk & (_UINT32_(value) << CAN_CCCR_CSA_Pos)) /* Assigment of value for CSA in the CAN_CCCR register */ +#define CAN_CCCR_CSR_Pos _UINT32_(4) /* (CAN_CCCR) Clock Stop Request Position */ +#define CAN_CCCR_CSR_Msk (_UINT32_(0x1) << CAN_CCCR_CSR_Pos) /* (CAN_CCCR) Clock Stop Request Mask */ +#define CAN_CCCR_CSR(value) (CAN_CCCR_CSR_Msk & (_UINT32_(value) << CAN_CCCR_CSR_Pos)) /* Assigment of value for CSR in the CAN_CCCR register */ +#define CAN_CCCR_MON_Pos _UINT32_(5) /* (CAN_CCCR) Bus Monitoring Mode Position */ +#define CAN_CCCR_MON_Msk (_UINT32_(0x1) << CAN_CCCR_MON_Pos) /* (CAN_CCCR) Bus Monitoring Mode Mask */ +#define CAN_CCCR_MON(value) (CAN_CCCR_MON_Msk & (_UINT32_(value) << CAN_CCCR_MON_Pos)) /* Assigment of value for MON in the CAN_CCCR register */ +#define CAN_CCCR_DAR_Pos _UINT32_(6) /* (CAN_CCCR) Disable Automatic Retransmission Position */ +#define CAN_CCCR_DAR_Msk (_UINT32_(0x1) << CAN_CCCR_DAR_Pos) /* (CAN_CCCR) Disable Automatic Retransmission Mask */ +#define CAN_CCCR_DAR(value) (CAN_CCCR_DAR_Msk & (_UINT32_(value) << CAN_CCCR_DAR_Pos)) /* Assigment of value for DAR in the CAN_CCCR register */ +#define CAN_CCCR_TEST_Pos _UINT32_(7) /* (CAN_CCCR) Test Mode Enable Position */ +#define CAN_CCCR_TEST_Msk (_UINT32_(0x1) << CAN_CCCR_TEST_Pos) /* (CAN_CCCR) Test Mode Enable Mask */ +#define CAN_CCCR_TEST(value) (CAN_CCCR_TEST_Msk & (_UINT32_(value) << CAN_CCCR_TEST_Pos)) /* Assigment of value for TEST in the CAN_CCCR register */ +#define CAN_CCCR_FDOE_Pos _UINT32_(8) /* (CAN_CCCR) FD Operation Enable Position */ +#define CAN_CCCR_FDOE_Msk (_UINT32_(0x1) << CAN_CCCR_FDOE_Pos) /* (CAN_CCCR) FD Operation Enable Mask */ +#define CAN_CCCR_FDOE(value) (CAN_CCCR_FDOE_Msk & (_UINT32_(value) << CAN_CCCR_FDOE_Pos)) /* Assigment of value for FDOE in the CAN_CCCR register */ +#define CAN_CCCR_BRSE_Pos _UINT32_(9) /* (CAN_CCCR) Bit Rate Switch Enable Position */ +#define CAN_CCCR_BRSE_Msk (_UINT32_(0x1) << CAN_CCCR_BRSE_Pos) /* (CAN_CCCR) Bit Rate Switch Enable Mask */ +#define CAN_CCCR_BRSE(value) (CAN_CCCR_BRSE_Msk & (_UINT32_(value) << CAN_CCCR_BRSE_Pos)) /* Assigment of value for BRSE in the CAN_CCCR register */ +#define CAN_CCCR_PXHD_Pos _UINT32_(12) /* (CAN_CCCR) Protocol Exception Handling Disable Position */ +#define CAN_CCCR_PXHD_Msk (_UINT32_(0x1) << CAN_CCCR_PXHD_Pos) /* (CAN_CCCR) Protocol Exception Handling Disable Mask */ +#define CAN_CCCR_PXHD(value) (CAN_CCCR_PXHD_Msk & (_UINT32_(value) << CAN_CCCR_PXHD_Pos)) /* Assigment of value for PXHD in the CAN_CCCR register */ +#define CAN_CCCR_EFBI_Pos _UINT32_(13) /* (CAN_CCCR) Edge Filtering during Bus Integration Position */ +#define CAN_CCCR_EFBI_Msk (_UINT32_(0x1) << CAN_CCCR_EFBI_Pos) /* (CAN_CCCR) Edge Filtering during Bus Integration Mask */ +#define CAN_CCCR_EFBI(value) (CAN_CCCR_EFBI_Msk & (_UINT32_(value) << CAN_CCCR_EFBI_Pos)) /* Assigment of value for EFBI in the CAN_CCCR register */ +#define CAN_CCCR_TXP_Pos _UINT32_(14) /* (CAN_CCCR) Transmit Pause Position */ +#define CAN_CCCR_TXP_Msk (_UINT32_(0x1) << CAN_CCCR_TXP_Pos) /* (CAN_CCCR) Transmit Pause Mask */ +#define CAN_CCCR_TXP(value) (CAN_CCCR_TXP_Msk & (_UINT32_(value) << CAN_CCCR_TXP_Pos)) /* Assigment of value for TXP in the CAN_CCCR register */ +#define CAN_CCCR_NISO_Pos _UINT32_(15) /* (CAN_CCCR) Non ISO Operation Position */ +#define CAN_CCCR_NISO_Msk (_UINT32_(0x1) << CAN_CCCR_NISO_Pos) /* (CAN_CCCR) Non ISO Operation Mask */ +#define CAN_CCCR_NISO(value) (CAN_CCCR_NISO_Msk & (_UINT32_(value) << CAN_CCCR_NISO_Pos)) /* Assigment of value for NISO in the CAN_CCCR register */ +#define CAN_CCCR_Msk _UINT32_(0x0000F3FF) /* (CAN_CCCR) Register Mask */ + + +/* -------- CAN_NBTP : (CAN Offset: 0x1C) (R/W 32) Nominal Bit Timing and Prescaler -------- */ +#define CAN_NBTP_RESETVALUE _UINT32_(0x6000A03) /* (CAN_NBTP) Nominal Bit Timing and Prescaler Reset Value */ + +#define CAN_NBTP_NTSEG2_Pos _UINT32_(0) /* (CAN_NBTP) Nominal Time segment after sample point Position */ +#define CAN_NBTP_NTSEG2_Msk (_UINT32_(0x7F) << CAN_NBTP_NTSEG2_Pos) /* (CAN_NBTP) Nominal Time segment after sample point Mask */ +#define CAN_NBTP_NTSEG2(value) (CAN_NBTP_NTSEG2_Msk & (_UINT32_(value) << CAN_NBTP_NTSEG2_Pos)) /* Assigment of value for NTSEG2 in the CAN_NBTP register */ +#define CAN_NBTP_NTSEG1_Pos _UINT32_(8) /* (CAN_NBTP) Nominal Time segment before sample point Position */ +#define CAN_NBTP_NTSEG1_Msk (_UINT32_(0xFF) << CAN_NBTP_NTSEG1_Pos) /* (CAN_NBTP) Nominal Time segment before sample point Mask */ +#define CAN_NBTP_NTSEG1(value) (CAN_NBTP_NTSEG1_Msk & (_UINT32_(value) << CAN_NBTP_NTSEG1_Pos)) /* Assigment of value for NTSEG1 in the CAN_NBTP register */ +#define CAN_NBTP_NBRP_Pos _UINT32_(16) /* (CAN_NBTP) Nominal Baud Rate Prescaler Position */ +#define CAN_NBTP_NBRP_Msk (_UINT32_(0x1FF) << CAN_NBTP_NBRP_Pos) /* (CAN_NBTP) Nominal Baud Rate Prescaler Mask */ +#define CAN_NBTP_NBRP(value) (CAN_NBTP_NBRP_Msk & (_UINT32_(value) << CAN_NBTP_NBRP_Pos)) /* Assigment of value for NBRP in the CAN_NBTP register */ +#define CAN_NBTP_NSJW_Pos _UINT32_(25) /* (CAN_NBTP) Nominal (Re)Synchronization Jump Width Position */ +#define CAN_NBTP_NSJW_Msk (_UINT32_(0x7F) << CAN_NBTP_NSJW_Pos) /* (CAN_NBTP) Nominal (Re)Synchronization Jump Width Mask */ +#define CAN_NBTP_NSJW(value) (CAN_NBTP_NSJW_Msk & (_UINT32_(value) << CAN_NBTP_NSJW_Pos)) /* Assigment of value for NSJW in the CAN_NBTP register */ +#define CAN_NBTP_Msk _UINT32_(0xFFFFFF7F) /* (CAN_NBTP) Register Mask */ + + +/* -------- CAN_TSCC : (CAN Offset: 0x20) (R/W 32) Timestamp Counter Configuration -------- */ +#define CAN_TSCC_RESETVALUE _UINT32_(0x00) /* (CAN_TSCC) Timestamp Counter Configuration Reset Value */ + +#define CAN_TSCC_TSS_Pos _UINT32_(0) /* (CAN_TSCC) Timestamp Select Position */ +#define CAN_TSCC_TSS_Msk (_UINT32_(0x3) << CAN_TSCC_TSS_Pos) /* (CAN_TSCC) Timestamp Select Mask */ +#define CAN_TSCC_TSS(value) (CAN_TSCC_TSS_Msk & (_UINT32_(value) << CAN_TSCC_TSS_Pos)) /* Assigment of value for TSS in the CAN_TSCC register */ +#define CAN_TSCC_TSS_ZERO_Val _UINT32_(0x0) /* (CAN_TSCC) Timestamp counter value always 0x0000 */ +#define CAN_TSCC_TSS_INC_Val _UINT32_(0x1) /* (CAN_TSCC) Timestamp counter value incremented by TCP */ +#define CAN_TSCC_TSS_EXT_Val _UINT32_(0x2) /* (CAN_TSCC) External timestamp counter value used */ +#define CAN_TSCC_TSS_ZERO (CAN_TSCC_TSS_ZERO_Val << CAN_TSCC_TSS_Pos) /* (CAN_TSCC) Timestamp counter value always 0x0000 Position */ +#define CAN_TSCC_TSS_INC (CAN_TSCC_TSS_INC_Val << CAN_TSCC_TSS_Pos) /* (CAN_TSCC) Timestamp counter value incremented by TCP Position */ +#define CAN_TSCC_TSS_EXT (CAN_TSCC_TSS_EXT_Val << CAN_TSCC_TSS_Pos) /* (CAN_TSCC) External timestamp counter value used Position */ +#define CAN_TSCC_TCP_Pos _UINT32_(16) /* (CAN_TSCC) Timestamp Counter Prescaler Position */ +#define CAN_TSCC_TCP_Msk (_UINT32_(0xF) << CAN_TSCC_TCP_Pos) /* (CAN_TSCC) Timestamp Counter Prescaler Mask */ +#define CAN_TSCC_TCP(value) (CAN_TSCC_TCP_Msk & (_UINT32_(value) << CAN_TSCC_TCP_Pos)) /* Assigment of value for TCP in the CAN_TSCC register */ +#define CAN_TSCC_Msk _UINT32_(0x000F0003) /* (CAN_TSCC) Register Mask */ + + +/* -------- CAN_TSCV : (CAN Offset: 0x24) ( R/ 32) Timestamp Counter Value -------- */ +#define CAN_TSCV_RESETVALUE _UINT32_(0x00) /* (CAN_TSCV) Timestamp Counter Value Reset Value */ + +#define CAN_TSCV_TSC_Pos _UINT32_(0) /* (CAN_TSCV) Timestamp Counter Position */ +#define CAN_TSCV_TSC_Msk (_UINT32_(0xFFFF) << CAN_TSCV_TSC_Pos) /* (CAN_TSCV) Timestamp Counter Mask */ +#define CAN_TSCV_TSC(value) (CAN_TSCV_TSC_Msk & (_UINT32_(value) << CAN_TSCV_TSC_Pos)) /* Assigment of value for TSC in the CAN_TSCV register */ +#define CAN_TSCV_Msk _UINT32_(0x0000FFFF) /* (CAN_TSCV) Register Mask */ + + +/* -------- CAN_TOCC : (CAN Offset: 0x28) (R/W 32) Timeout Counter Configuration -------- */ +#define CAN_TOCC_RESETVALUE _UINT32_(0xFFFF0000) /* (CAN_TOCC) Timeout Counter Configuration Reset Value */ + +#define CAN_TOCC_ETOC_Pos _UINT32_(0) /* (CAN_TOCC) Enable Timeout Counter Position */ +#define CAN_TOCC_ETOC_Msk (_UINT32_(0x1) << CAN_TOCC_ETOC_Pos) /* (CAN_TOCC) Enable Timeout Counter Mask */ +#define CAN_TOCC_ETOC(value) (CAN_TOCC_ETOC_Msk & (_UINT32_(value) << CAN_TOCC_ETOC_Pos)) /* Assigment of value for ETOC in the CAN_TOCC register */ +#define CAN_TOCC_TOS_Pos _UINT32_(1) /* (CAN_TOCC) Timeout Select Position */ +#define CAN_TOCC_TOS_Msk (_UINT32_(0x3) << CAN_TOCC_TOS_Pos) /* (CAN_TOCC) Timeout Select Mask */ +#define CAN_TOCC_TOS(value) (CAN_TOCC_TOS_Msk & (_UINT32_(value) << CAN_TOCC_TOS_Pos)) /* Assigment of value for TOS in the CAN_TOCC register */ +#define CAN_TOCC_TOS_CONT_Val _UINT32_(0x0) /* (CAN_TOCC) Continuout operation */ +#define CAN_TOCC_TOS_TXEF_Val _UINT32_(0x1) /* (CAN_TOCC) Timeout controlled by TX Event FIFO */ +#define CAN_TOCC_TOS_RXF0_Val _UINT32_(0x2) /* (CAN_TOCC) Timeout controlled by Rx FIFO 0 */ +#define CAN_TOCC_TOS_RXF1_Val _UINT32_(0x3) /* (CAN_TOCC) Timeout controlled by Rx FIFO 1 */ +#define CAN_TOCC_TOS_CONT (CAN_TOCC_TOS_CONT_Val << CAN_TOCC_TOS_Pos) /* (CAN_TOCC) Continuout operation Position */ +#define CAN_TOCC_TOS_TXEF (CAN_TOCC_TOS_TXEF_Val << CAN_TOCC_TOS_Pos) /* (CAN_TOCC) Timeout controlled by TX Event FIFO Position */ +#define CAN_TOCC_TOS_RXF0 (CAN_TOCC_TOS_RXF0_Val << CAN_TOCC_TOS_Pos) /* (CAN_TOCC) Timeout controlled by Rx FIFO 0 Position */ +#define CAN_TOCC_TOS_RXF1 (CAN_TOCC_TOS_RXF1_Val << CAN_TOCC_TOS_Pos) /* (CAN_TOCC) Timeout controlled by Rx FIFO 1 Position */ +#define CAN_TOCC_TOP_Pos _UINT32_(16) /* (CAN_TOCC) Timeout Period Position */ +#define CAN_TOCC_TOP_Msk (_UINT32_(0xFFFF) << CAN_TOCC_TOP_Pos) /* (CAN_TOCC) Timeout Period Mask */ +#define CAN_TOCC_TOP(value) (CAN_TOCC_TOP_Msk & (_UINT32_(value) << CAN_TOCC_TOP_Pos)) /* Assigment of value for TOP in the CAN_TOCC register */ +#define CAN_TOCC_Msk _UINT32_(0xFFFF0007) /* (CAN_TOCC) Register Mask */ + + +/* -------- CAN_TOCV : (CAN Offset: 0x2C) (R/W 32) Timeout Counter Value -------- */ +#define CAN_TOCV_RESETVALUE _UINT32_(0xFFFF) /* (CAN_TOCV) Timeout Counter Value Reset Value */ + +#define CAN_TOCV_TOC_Pos _UINT32_(0) /* (CAN_TOCV) Timeout Counter Position */ +#define CAN_TOCV_TOC_Msk (_UINT32_(0xFFFF) << CAN_TOCV_TOC_Pos) /* (CAN_TOCV) Timeout Counter Mask */ +#define CAN_TOCV_TOC(value) (CAN_TOCV_TOC_Msk & (_UINT32_(value) << CAN_TOCV_TOC_Pos)) /* Assigment of value for TOC in the CAN_TOCV register */ +#define CAN_TOCV_Msk _UINT32_(0x0000FFFF) /* (CAN_TOCV) Register Mask */ + + +/* -------- CAN_ECR : (CAN Offset: 0x40) ( R/ 32) Error Counter -------- */ +#define CAN_ECR_RESETVALUE _UINT32_(0x00) /* (CAN_ECR) Error Counter Reset Value */ + +#define CAN_ECR_TEC_Pos _UINT32_(0) /* (CAN_ECR) Transmit Error Counter Position */ +#define CAN_ECR_TEC_Msk (_UINT32_(0xFF) << CAN_ECR_TEC_Pos) /* (CAN_ECR) Transmit Error Counter Mask */ +#define CAN_ECR_TEC(value) (CAN_ECR_TEC_Msk & (_UINT32_(value) << CAN_ECR_TEC_Pos)) /* Assigment of value for TEC in the CAN_ECR register */ +#define CAN_ECR_REC_Pos _UINT32_(8) /* (CAN_ECR) Receive Error Counter Position */ +#define CAN_ECR_REC_Msk (_UINT32_(0x7F) << CAN_ECR_REC_Pos) /* (CAN_ECR) Receive Error Counter Mask */ +#define CAN_ECR_REC(value) (CAN_ECR_REC_Msk & (_UINT32_(value) << CAN_ECR_REC_Pos)) /* Assigment of value for REC in the CAN_ECR register */ +#define CAN_ECR_RP_Pos _UINT32_(15) /* (CAN_ECR) Receive Error Passive Position */ +#define CAN_ECR_RP_Msk (_UINT32_(0x1) << CAN_ECR_RP_Pos) /* (CAN_ECR) Receive Error Passive Mask */ +#define CAN_ECR_RP(value) (CAN_ECR_RP_Msk & (_UINT32_(value) << CAN_ECR_RP_Pos)) /* Assigment of value for RP in the CAN_ECR register */ +#define CAN_ECR_CEL_Pos _UINT32_(16) /* (CAN_ECR) CAN Error Logging Position */ +#define CAN_ECR_CEL_Msk (_UINT32_(0xFF) << CAN_ECR_CEL_Pos) /* (CAN_ECR) CAN Error Logging Mask */ +#define CAN_ECR_CEL(value) (CAN_ECR_CEL_Msk & (_UINT32_(value) << CAN_ECR_CEL_Pos)) /* Assigment of value for CEL in the CAN_ECR register */ +#define CAN_ECR_Msk _UINT32_(0x00FFFFFF) /* (CAN_ECR) Register Mask */ + + +/* -------- CAN_PSR : (CAN Offset: 0x44) ( R/ 32) Protocol Status -------- */ +#define CAN_PSR_RESETVALUE _UINT32_(0x707) /* (CAN_PSR) Protocol Status Reset Value */ + +#define CAN_PSR_LEC_Pos _UINT32_(0) /* (CAN_PSR) Last Error Code Position */ +#define CAN_PSR_LEC_Msk (_UINT32_(0x7) << CAN_PSR_LEC_Pos) /* (CAN_PSR) Last Error Code Mask */ +#define CAN_PSR_LEC(value) (CAN_PSR_LEC_Msk & (_UINT32_(value) << CAN_PSR_LEC_Pos)) /* Assigment of value for LEC in the CAN_PSR register */ +#define CAN_PSR_LEC_NONE_Val _UINT32_(0x0) /* (CAN_PSR) No Error */ +#define CAN_PSR_LEC_STUFF_Val _UINT32_(0x1) /* (CAN_PSR) Stuff Error */ +#define CAN_PSR_LEC_FORM_Val _UINT32_(0x2) /* (CAN_PSR) Form Error */ +#define CAN_PSR_LEC_ACK_Val _UINT32_(0x3) /* (CAN_PSR) Ack Error */ +#define CAN_PSR_LEC_BIT1_Val _UINT32_(0x4) /* (CAN_PSR) Bit1 Error */ +#define CAN_PSR_LEC_BIT0_Val _UINT32_(0x5) /* (CAN_PSR) Bit0 Error */ +#define CAN_PSR_LEC_CRC_Val _UINT32_(0x6) /* (CAN_PSR) CRC Error */ +#define CAN_PSR_LEC_NC_Val _UINT32_(0x7) /* (CAN_PSR) No Change */ +#define CAN_PSR_LEC_NONE (CAN_PSR_LEC_NONE_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) No Error Position */ +#define CAN_PSR_LEC_STUFF (CAN_PSR_LEC_STUFF_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) Stuff Error Position */ +#define CAN_PSR_LEC_FORM (CAN_PSR_LEC_FORM_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) Form Error Position */ +#define CAN_PSR_LEC_ACK (CAN_PSR_LEC_ACK_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) Ack Error Position */ +#define CAN_PSR_LEC_BIT1 (CAN_PSR_LEC_BIT1_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) Bit1 Error Position */ +#define CAN_PSR_LEC_BIT0 (CAN_PSR_LEC_BIT0_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) Bit0 Error Position */ +#define CAN_PSR_LEC_CRC (CAN_PSR_LEC_CRC_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) CRC Error Position */ +#define CAN_PSR_LEC_NC (CAN_PSR_LEC_NC_Val << CAN_PSR_LEC_Pos) /* (CAN_PSR) No Change Position */ +#define CAN_PSR_ACT_Pos _UINT32_(3) /* (CAN_PSR) Activity Position */ +#define CAN_PSR_ACT_Msk (_UINT32_(0x3) << CAN_PSR_ACT_Pos) /* (CAN_PSR) Activity Mask */ +#define CAN_PSR_ACT(value) (CAN_PSR_ACT_Msk & (_UINT32_(value) << CAN_PSR_ACT_Pos)) /* Assigment of value for ACT in the CAN_PSR register */ +#define CAN_PSR_ACT_SYNC_Val _UINT32_(0x0) /* (CAN_PSR) Node is synchronizing on CAN communication */ +#define CAN_PSR_ACT_IDLE_Val _UINT32_(0x1) /* (CAN_PSR) Node is neither receiver nor transmitter */ +#define CAN_PSR_ACT_RX_Val _UINT32_(0x2) /* (CAN_PSR) Node is operating as receiver */ +#define CAN_PSR_ACT_TX_Val _UINT32_(0x3) /* (CAN_PSR) Node is operating as transmitter */ +#define CAN_PSR_ACT_SYNC (CAN_PSR_ACT_SYNC_Val << CAN_PSR_ACT_Pos) /* (CAN_PSR) Node is synchronizing on CAN communication Position */ +#define CAN_PSR_ACT_IDLE (CAN_PSR_ACT_IDLE_Val << CAN_PSR_ACT_Pos) /* (CAN_PSR) Node is neither receiver nor transmitter Position */ +#define CAN_PSR_ACT_RX (CAN_PSR_ACT_RX_Val << CAN_PSR_ACT_Pos) /* (CAN_PSR) Node is operating as receiver Position */ +#define CAN_PSR_ACT_TX (CAN_PSR_ACT_TX_Val << CAN_PSR_ACT_Pos) /* (CAN_PSR) Node is operating as transmitter Position */ +#define CAN_PSR_EP_Pos _UINT32_(5) /* (CAN_PSR) Error Passive Position */ +#define CAN_PSR_EP_Msk (_UINT32_(0x1) << CAN_PSR_EP_Pos) /* (CAN_PSR) Error Passive Mask */ +#define CAN_PSR_EP(value) (CAN_PSR_EP_Msk & (_UINT32_(value) << CAN_PSR_EP_Pos)) /* Assigment of value for EP in the CAN_PSR register */ +#define CAN_PSR_EW_Pos _UINT32_(6) /* (CAN_PSR) Warning Status Position */ +#define CAN_PSR_EW_Msk (_UINT32_(0x1) << CAN_PSR_EW_Pos) /* (CAN_PSR) Warning Status Mask */ +#define CAN_PSR_EW(value) (CAN_PSR_EW_Msk & (_UINT32_(value) << CAN_PSR_EW_Pos)) /* Assigment of value for EW in the CAN_PSR register */ +#define CAN_PSR_BO_Pos _UINT32_(7) /* (CAN_PSR) Bus_Off Status Position */ +#define CAN_PSR_BO_Msk (_UINT32_(0x1) << CAN_PSR_BO_Pos) /* (CAN_PSR) Bus_Off Status Mask */ +#define CAN_PSR_BO(value) (CAN_PSR_BO_Msk & (_UINT32_(value) << CAN_PSR_BO_Pos)) /* Assigment of value for BO in the CAN_PSR register */ +#define CAN_PSR_DLEC_Pos _UINT32_(8) /* (CAN_PSR) Data Phase Last Error Code Position */ +#define CAN_PSR_DLEC_Msk (_UINT32_(0x7) << CAN_PSR_DLEC_Pos) /* (CAN_PSR) Data Phase Last Error Code Mask */ +#define CAN_PSR_DLEC(value) (CAN_PSR_DLEC_Msk & (_UINT32_(value) << CAN_PSR_DLEC_Pos)) /* Assigment of value for DLEC in the CAN_PSR register */ +#define CAN_PSR_DLEC_NONE_Val _UINT32_(0x0) /* (CAN_PSR) No Error */ +#define CAN_PSR_DLEC_STUFF_Val _UINT32_(0x1) /* (CAN_PSR) Stuff Error */ +#define CAN_PSR_DLEC_FORM_Val _UINT32_(0x2) /* (CAN_PSR) Form Error */ +#define CAN_PSR_DLEC_ACK_Val _UINT32_(0x3) /* (CAN_PSR) Ack Error */ +#define CAN_PSR_DLEC_BIT1_Val _UINT32_(0x4) /* (CAN_PSR) Bit1 Error */ +#define CAN_PSR_DLEC_BIT0_Val _UINT32_(0x5) /* (CAN_PSR) Bit0 Error */ +#define CAN_PSR_DLEC_CRC_Val _UINT32_(0x6) /* (CAN_PSR) CRC Error */ +#define CAN_PSR_DLEC_NC_Val _UINT32_(0x7) /* (CAN_PSR) No Change */ +#define CAN_PSR_DLEC_NONE (CAN_PSR_DLEC_NONE_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) No Error Position */ +#define CAN_PSR_DLEC_STUFF (CAN_PSR_DLEC_STUFF_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) Stuff Error Position */ +#define CAN_PSR_DLEC_FORM (CAN_PSR_DLEC_FORM_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) Form Error Position */ +#define CAN_PSR_DLEC_ACK (CAN_PSR_DLEC_ACK_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) Ack Error Position */ +#define CAN_PSR_DLEC_BIT1 (CAN_PSR_DLEC_BIT1_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) Bit1 Error Position */ +#define CAN_PSR_DLEC_BIT0 (CAN_PSR_DLEC_BIT0_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) Bit0 Error Position */ +#define CAN_PSR_DLEC_CRC (CAN_PSR_DLEC_CRC_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) CRC Error Position */ +#define CAN_PSR_DLEC_NC (CAN_PSR_DLEC_NC_Val << CAN_PSR_DLEC_Pos) /* (CAN_PSR) No Change Position */ +#define CAN_PSR_RESI_Pos _UINT32_(11) /* (CAN_PSR) ESI flag of last received CAN FD Message Position */ +#define CAN_PSR_RESI_Msk (_UINT32_(0x1) << CAN_PSR_RESI_Pos) /* (CAN_PSR) ESI flag of last received CAN FD Message Mask */ +#define CAN_PSR_RESI(value) (CAN_PSR_RESI_Msk & (_UINT32_(value) << CAN_PSR_RESI_Pos)) /* Assigment of value for RESI in the CAN_PSR register */ +#define CAN_PSR_RBRS_Pos _UINT32_(12) /* (CAN_PSR) BRS flag of last received CAN FD Message Position */ +#define CAN_PSR_RBRS_Msk (_UINT32_(0x1) << CAN_PSR_RBRS_Pos) /* (CAN_PSR) BRS flag of last received CAN FD Message Mask */ +#define CAN_PSR_RBRS(value) (CAN_PSR_RBRS_Msk & (_UINT32_(value) << CAN_PSR_RBRS_Pos)) /* Assigment of value for RBRS in the CAN_PSR register */ +#define CAN_PSR_RFDF_Pos _UINT32_(13) /* (CAN_PSR) Received a CAN FD Message Position */ +#define CAN_PSR_RFDF_Msk (_UINT32_(0x1) << CAN_PSR_RFDF_Pos) /* (CAN_PSR) Received a CAN FD Message Mask */ +#define CAN_PSR_RFDF(value) (CAN_PSR_RFDF_Msk & (_UINT32_(value) << CAN_PSR_RFDF_Pos)) /* Assigment of value for RFDF in the CAN_PSR register */ +#define CAN_PSR_PXE_Pos _UINT32_(14) /* (CAN_PSR) Protocol Exception Event Position */ +#define CAN_PSR_PXE_Msk (_UINT32_(0x1) << CAN_PSR_PXE_Pos) /* (CAN_PSR) Protocol Exception Event Mask */ +#define CAN_PSR_PXE(value) (CAN_PSR_PXE_Msk & (_UINT32_(value) << CAN_PSR_PXE_Pos)) /* Assigment of value for PXE in the CAN_PSR register */ +#define CAN_PSR_TDCV_Pos _UINT32_(16) /* (CAN_PSR) Transmitter Delay Compensation Value Position */ +#define CAN_PSR_TDCV_Msk (_UINT32_(0x7F) << CAN_PSR_TDCV_Pos) /* (CAN_PSR) Transmitter Delay Compensation Value Mask */ +#define CAN_PSR_TDCV(value) (CAN_PSR_TDCV_Msk & (_UINT32_(value) << CAN_PSR_TDCV_Pos)) /* Assigment of value for TDCV in the CAN_PSR register */ +#define CAN_PSR_Msk _UINT32_(0x007F7FFF) /* (CAN_PSR) Register Mask */ + + +/* -------- CAN_TDCR : (CAN Offset: 0x48) (R/W 32) Extended ID Filter Configuration -------- */ +#define CAN_TDCR_RESETVALUE _UINT32_(0x00) /* (CAN_TDCR) Extended ID Filter Configuration Reset Value */ + +#define CAN_TDCR_TDCF_Pos _UINT32_(0) /* (CAN_TDCR) Transmitter Delay Compensation Filter Length Position */ +#define CAN_TDCR_TDCF_Msk (_UINT32_(0x7F) << CAN_TDCR_TDCF_Pos) /* (CAN_TDCR) Transmitter Delay Compensation Filter Length Mask */ +#define CAN_TDCR_TDCF(value) (CAN_TDCR_TDCF_Msk & (_UINT32_(value) << CAN_TDCR_TDCF_Pos)) /* Assigment of value for TDCF in the CAN_TDCR register */ +#define CAN_TDCR_TDCO_Pos _UINT32_(8) /* (CAN_TDCR) Transmitter Delay Compensation Offset Position */ +#define CAN_TDCR_TDCO_Msk (_UINT32_(0x7F) << CAN_TDCR_TDCO_Pos) /* (CAN_TDCR) Transmitter Delay Compensation Offset Mask */ +#define CAN_TDCR_TDCO(value) (CAN_TDCR_TDCO_Msk & (_UINT32_(value) << CAN_TDCR_TDCO_Pos)) /* Assigment of value for TDCO in the CAN_TDCR register */ +#define CAN_TDCR_Msk _UINT32_(0x00007F7F) /* (CAN_TDCR) Register Mask */ + + +/* -------- CAN_IR : (CAN Offset: 0x50) (R/W 32) Interrupt -------- */ +#define CAN_IR_RESETVALUE _UINT32_(0x00) /* (CAN_IR) Interrupt Reset Value */ + +#define CAN_IR_RF0N_Pos _UINT32_(0) /* (CAN_IR) Rx FIFO 0 New Message Position */ +#define CAN_IR_RF0N_Msk (_UINT32_(0x1) << CAN_IR_RF0N_Pos) /* (CAN_IR) Rx FIFO 0 New Message Mask */ +#define CAN_IR_RF0N(value) (CAN_IR_RF0N_Msk & (_UINT32_(value) << CAN_IR_RF0N_Pos)) /* Assigment of value for RF0N in the CAN_IR register */ +#define CAN_IR_RF0W_Pos _UINT32_(1) /* (CAN_IR) Rx FIFO 0 Watermark Reached Position */ +#define CAN_IR_RF0W_Msk (_UINT32_(0x1) << CAN_IR_RF0W_Pos) /* (CAN_IR) Rx FIFO 0 Watermark Reached Mask */ +#define CAN_IR_RF0W(value) (CAN_IR_RF0W_Msk & (_UINT32_(value) << CAN_IR_RF0W_Pos)) /* Assigment of value for RF0W in the CAN_IR register */ +#define CAN_IR_RF0F_Pos _UINT32_(2) /* (CAN_IR) Rx FIFO 0 Full Position */ +#define CAN_IR_RF0F_Msk (_UINT32_(0x1) << CAN_IR_RF0F_Pos) /* (CAN_IR) Rx FIFO 0 Full Mask */ +#define CAN_IR_RF0F(value) (CAN_IR_RF0F_Msk & (_UINT32_(value) << CAN_IR_RF0F_Pos)) /* Assigment of value for RF0F in the CAN_IR register */ +#define CAN_IR_RF0L_Pos _UINT32_(3) /* (CAN_IR) Rx FIFO 0 Message Lost Position */ +#define CAN_IR_RF0L_Msk (_UINT32_(0x1) << CAN_IR_RF0L_Pos) /* (CAN_IR) Rx FIFO 0 Message Lost Mask */ +#define CAN_IR_RF0L(value) (CAN_IR_RF0L_Msk & (_UINT32_(value) << CAN_IR_RF0L_Pos)) /* Assigment of value for RF0L in the CAN_IR register */ +#define CAN_IR_RF1N_Pos _UINT32_(4) /* (CAN_IR) Rx FIFO 1 New Message Position */ +#define CAN_IR_RF1N_Msk (_UINT32_(0x1) << CAN_IR_RF1N_Pos) /* (CAN_IR) Rx FIFO 1 New Message Mask */ +#define CAN_IR_RF1N(value) (CAN_IR_RF1N_Msk & (_UINT32_(value) << CAN_IR_RF1N_Pos)) /* Assigment of value for RF1N in the CAN_IR register */ +#define CAN_IR_RF1W_Pos _UINT32_(5) /* (CAN_IR) Rx FIFO 1 Watermark Reached Position */ +#define CAN_IR_RF1W_Msk (_UINT32_(0x1) << CAN_IR_RF1W_Pos) /* (CAN_IR) Rx FIFO 1 Watermark Reached Mask */ +#define CAN_IR_RF1W(value) (CAN_IR_RF1W_Msk & (_UINT32_(value) << CAN_IR_RF1W_Pos)) /* Assigment of value for RF1W in the CAN_IR register */ +#define CAN_IR_RF1F_Pos _UINT32_(6) /* (CAN_IR) Rx FIFO 1 FIFO Full Position */ +#define CAN_IR_RF1F_Msk (_UINT32_(0x1) << CAN_IR_RF1F_Pos) /* (CAN_IR) Rx FIFO 1 FIFO Full Mask */ +#define CAN_IR_RF1F(value) (CAN_IR_RF1F_Msk & (_UINT32_(value) << CAN_IR_RF1F_Pos)) /* Assigment of value for RF1F in the CAN_IR register */ +#define CAN_IR_RF1L_Pos _UINT32_(7) /* (CAN_IR) Rx FIFO 1 Message Lost Position */ +#define CAN_IR_RF1L_Msk (_UINT32_(0x1) << CAN_IR_RF1L_Pos) /* (CAN_IR) Rx FIFO 1 Message Lost Mask */ +#define CAN_IR_RF1L(value) (CAN_IR_RF1L_Msk & (_UINT32_(value) << CAN_IR_RF1L_Pos)) /* Assigment of value for RF1L in the CAN_IR register */ +#define CAN_IR_HPM_Pos _UINT32_(8) /* (CAN_IR) High Priority Message Position */ +#define CAN_IR_HPM_Msk (_UINT32_(0x1) << CAN_IR_HPM_Pos) /* (CAN_IR) High Priority Message Mask */ +#define CAN_IR_HPM(value) (CAN_IR_HPM_Msk & (_UINT32_(value) << CAN_IR_HPM_Pos)) /* Assigment of value for HPM in the CAN_IR register */ +#define CAN_IR_TC_Pos _UINT32_(9) /* (CAN_IR) Timestamp Completed Position */ +#define CAN_IR_TC_Msk (_UINT32_(0x1) << CAN_IR_TC_Pos) /* (CAN_IR) Timestamp Completed Mask */ +#define CAN_IR_TC(value) (CAN_IR_TC_Msk & (_UINT32_(value) << CAN_IR_TC_Pos)) /* Assigment of value for TC in the CAN_IR register */ +#define CAN_IR_TCF_Pos _UINT32_(10) /* (CAN_IR) Transmission Cancellation Finished Position */ +#define CAN_IR_TCF_Msk (_UINT32_(0x1) << CAN_IR_TCF_Pos) /* (CAN_IR) Transmission Cancellation Finished Mask */ +#define CAN_IR_TCF(value) (CAN_IR_TCF_Msk & (_UINT32_(value) << CAN_IR_TCF_Pos)) /* Assigment of value for TCF in the CAN_IR register */ +#define CAN_IR_TFE_Pos _UINT32_(11) /* (CAN_IR) Tx FIFO Empty Position */ +#define CAN_IR_TFE_Msk (_UINT32_(0x1) << CAN_IR_TFE_Pos) /* (CAN_IR) Tx FIFO Empty Mask */ +#define CAN_IR_TFE(value) (CAN_IR_TFE_Msk & (_UINT32_(value) << CAN_IR_TFE_Pos)) /* Assigment of value for TFE in the CAN_IR register */ +#define CAN_IR_TEFN_Pos _UINT32_(12) /* (CAN_IR) Tx Event FIFO New Entry Position */ +#define CAN_IR_TEFN_Msk (_UINT32_(0x1) << CAN_IR_TEFN_Pos) /* (CAN_IR) Tx Event FIFO New Entry Mask */ +#define CAN_IR_TEFN(value) (CAN_IR_TEFN_Msk & (_UINT32_(value) << CAN_IR_TEFN_Pos)) /* Assigment of value for TEFN in the CAN_IR register */ +#define CAN_IR_TEFW_Pos _UINT32_(13) /* (CAN_IR) Tx Event FIFO Watermark Reached Position */ +#define CAN_IR_TEFW_Msk (_UINT32_(0x1) << CAN_IR_TEFW_Pos) /* (CAN_IR) Tx Event FIFO Watermark Reached Mask */ +#define CAN_IR_TEFW(value) (CAN_IR_TEFW_Msk & (_UINT32_(value) << CAN_IR_TEFW_Pos)) /* Assigment of value for TEFW in the CAN_IR register */ +#define CAN_IR_TEFF_Pos _UINT32_(14) /* (CAN_IR) Tx Event FIFO Full Position */ +#define CAN_IR_TEFF_Msk (_UINT32_(0x1) << CAN_IR_TEFF_Pos) /* (CAN_IR) Tx Event FIFO Full Mask */ +#define CAN_IR_TEFF(value) (CAN_IR_TEFF_Msk & (_UINT32_(value) << CAN_IR_TEFF_Pos)) /* Assigment of value for TEFF in the CAN_IR register */ +#define CAN_IR_TEFL_Pos _UINT32_(15) /* (CAN_IR) Tx Event FIFO Element Lost Position */ +#define CAN_IR_TEFL_Msk (_UINT32_(0x1) << CAN_IR_TEFL_Pos) /* (CAN_IR) Tx Event FIFO Element Lost Mask */ +#define CAN_IR_TEFL(value) (CAN_IR_TEFL_Msk & (_UINT32_(value) << CAN_IR_TEFL_Pos)) /* Assigment of value for TEFL in the CAN_IR register */ +#define CAN_IR_TSW_Pos _UINT32_(16) /* (CAN_IR) Timestamp Wraparound Position */ +#define CAN_IR_TSW_Msk (_UINT32_(0x1) << CAN_IR_TSW_Pos) /* (CAN_IR) Timestamp Wraparound Mask */ +#define CAN_IR_TSW(value) (CAN_IR_TSW_Msk & (_UINT32_(value) << CAN_IR_TSW_Pos)) /* Assigment of value for TSW in the CAN_IR register */ +#define CAN_IR_MRAF_Pos _UINT32_(17) /* (CAN_IR) Message RAM Access Failure Position */ +#define CAN_IR_MRAF_Msk (_UINT32_(0x1) << CAN_IR_MRAF_Pos) /* (CAN_IR) Message RAM Access Failure Mask */ +#define CAN_IR_MRAF(value) (CAN_IR_MRAF_Msk & (_UINT32_(value) << CAN_IR_MRAF_Pos)) /* Assigment of value for MRAF in the CAN_IR register */ +#define CAN_IR_TOO_Pos _UINT32_(18) /* (CAN_IR) Timeout Occurred Position */ +#define CAN_IR_TOO_Msk (_UINT32_(0x1) << CAN_IR_TOO_Pos) /* (CAN_IR) Timeout Occurred Mask */ +#define CAN_IR_TOO(value) (CAN_IR_TOO_Msk & (_UINT32_(value) << CAN_IR_TOO_Pos)) /* Assigment of value for TOO in the CAN_IR register */ +#define CAN_IR_DRX_Pos _UINT32_(19) /* (CAN_IR) Message stored to Dedicated Rx Buffer Position */ +#define CAN_IR_DRX_Msk (_UINT32_(0x1) << CAN_IR_DRX_Pos) /* (CAN_IR) Message stored to Dedicated Rx Buffer Mask */ +#define CAN_IR_DRX(value) (CAN_IR_DRX_Msk & (_UINT32_(value) << CAN_IR_DRX_Pos)) /* Assigment of value for DRX in the CAN_IR register */ +#define CAN_IR_BEC_Pos _UINT32_(20) /* (CAN_IR) Bit Error Corrected Position */ +#define CAN_IR_BEC_Msk (_UINT32_(0x1) << CAN_IR_BEC_Pos) /* (CAN_IR) Bit Error Corrected Mask */ +#define CAN_IR_BEC(value) (CAN_IR_BEC_Msk & (_UINT32_(value) << CAN_IR_BEC_Pos)) /* Assigment of value for BEC in the CAN_IR register */ +#define CAN_IR_BEU_Pos _UINT32_(21) /* (CAN_IR) Bit Error Uncorrected Position */ +#define CAN_IR_BEU_Msk (_UINT32_(0x1) << CAN_IR_BEU_Pos) /* (CAN_IR) Bit Error Uncorrected Mask */ +#define CAN_IR_BEU(value) (CAN_IR_BEU_Msk & (_UINT32_(value) << CAN_IR_BEU_Pos)) /* Assigment of value for BEU in the CAN_IR register */ +#define CAN_IR_ELO_Pos _UINT32_(22) /* (CAN_IR) Error Logging Overflow Position */ +#define CAN_IR_ELO_Msk (_UINT32_(0x1) << CAN_IR_ELO_Pos) /* (CAN_IR) Error Logging Overflow Mask */ +#define CAN_IR_ELO(value) (CAN_IR_ELO_Msk & (_UINT32_(value) << CAN_IR_ELO_Pos)) /* Assigment of value for ELO in the CAN_IR register */ +#define CAN_IR_EP_Pos _UINT32_(23) /* (CAN_IR) Error Passive Position */ +#define CAN_IR_EP_Msk (_UINT32_(0x1) << CAN_IR_EP_Pos) /* (CAN_IR) Error Passive Mask */ +#define CAN_IR_EP(value) (CAN_IR_EP_Msk & (_UINT32_(value) << CAN_IR_EP_Pos)) /* Assigment of value for EP in the CAN_IR register */ +#define CAN_IR_EW_Pos _UINT32_(24) /* (CAN_IR) Warning Status Position */ +#define CAN_IR_EW_Msk (_UINT32_(0x1) << CAN_IR_EW_Pos) /* (CAN_IR) Warning Status Mask */ +#define CAN_IR_EW(value) (CAN_IR_EW_Msk & (_UINT32_(value) << CAN_IR_EW_Pos)) /* Assigment of value for EW in the CAN_IR register */ +#define CAN_IR_BO_Pos _UINT32_(25) /* (CAN_IR) Bus_Off Status Position */ +#define CAN_IR_BO_Msk (_UINT32_(0x1) << CAN_IR_BO_Pos) /* (CAN_IR) Bus_Off Status Mask */ +#define CAN_IR_BO(value) (CAN_IR_BO_Msk & (_UINT32_(value) << CAN_IR_BO_Pos)) /* Assigment of value for BO in the CAN_IR register */ +#define CAN_IR_WDI_Pos _UINT32_(26) /* (CAN_IR) Watchdog Interrupt Position */ +#define CAN_IR_WDI_Msk (_UINT32_(0x1) << CAN_IR_WDI_Pos) /* (CAN_IR) Watchdog Interrupt Mask */ +#define CAN_IR_WDI(value) (CAN_IR_WDI_Msk & (_UINT32_(value) << CAN_IR_WDI_Pos)) /* Assigment of value for WDI in the CAN_IR register */ +#define CAN_IR_PEA_Pos _UINT32_(27) /* (CAN_IR) Protocol Error in Arbitration Phase Position */ +#define CAN_IR_PEA_Msk (_UINT32_(0x1) << CAN_IR_PEA_Pos) /* (CAN_IR) Protocol Error in Arbitration Phase Mask */ +#define CAN_IR_PEA(value) (CAN_IR_PEA_Msk & (_UINT32_(value) << CAN_IR_PEA_Pos)) /* Assigment of value for PEA in the CAN_IR register */ +#define CAN_IR_PED_Pos _UINT32_(28) /* (CAN_IR) Protocol Error in Data Phase Position */ +#define CAN_IR_PED_Msk (_UINT32_(0x1) << CAN_IR_PED_Pos) /* (CAN_IR) Protocol Error in Data Phase Mask */ +#define CAN_IR_PED(value) (CAN_IR_PED_Msk & (_UINT32_(value) << CAN_IR_PED_Pos)) /* Assigment of value for PED in the CAN_IR register */ +#define CAN_IR_ARA_Pos _UINT32_(29) /* (CAN_IR) Access to Reserved Address Position */ +#define CAN_IR_ARA_Msk (_UINT32_(0x1) << CAN_IR_ARA_Pos) /* (CAN_IR) Access to Reserved Address Mask */ +#define CAN_IR_ARA(value) (CAN_IR_ARA_Msk & (_UINT32_(value) << CAN_IR_ARA_Pos)) /* Assigment of value for ARA in the CAN_IR register */ +#define CAN_IR_Msk _UINT32_(0x3FFFFFFF) /* (CAN_IR) Register Mask */ + + +/* -------- CAN_IE : (CAN Offset: 0x54) (R/W 32) Interrupt Enable -------- */ +#define CAN_IE_RESETVALUE _UINT32_(0x00) /* (CAN_IE) Interrupt Enable Reset Value */ + +#define CAN_IE_RF0NE_Pos _UINT32_(0) /* (CAN_IE) Rx FIFO 0 New Message Interrupt Enable Position */ +#define CAN_IE_RF0NE_Msk (_UINT32_(0x1) << CAN_IE_RF0NE_Pos) /* (CAN_IE) Rx FIFO 0 New Message Interrupt Enable Mask */ +#define CAN_IE_RF0NE(value) (CAN_IE_RF0NE_Msk & (_UINT32_(value) << CAN_IE_RF0NE_Pos)) /* Assigment of value for RF0NE in the CAN_IE register */ +#define CAN_IE_RF0WE_Pos _UINT32_(1) /* (CAN_IE) Rx FIFO 0 Watermark Reached Interrupt Enable Position */ +#define CAN_IE_RF0WE_Msk (_UINT32_(0x1) << CAN_IE_RF0WE_Pos) /* (CAN_IE) Rx FIFO 0 Watermark Reached Interrupt Enable Mask */ +#define CAN_IE_RF0WE(value) (CAN_IE_RF0WE_Msk & (_UINT32_(value) << CAN_IE_RF0WE_Pos)) /* Assigment of value for RF0WE in the CAN_IE register */ +#define CAN_IE_RF0FE_Pos _UINT32_(2) /* (CAN_IE) Rx FIFO 0 Full Interrupt Enable Position */ +#define CAN_IE_RF0FE_Msk (_UINT32_(0x1) << CAN_IE_RF0FE_Pos) /* (CAN_IE) Rx FIFO 0 Full Interrupt Enable Mask */ +#define CAN_IE_RF0FE(value) (CAN_IE_RF0FE_Msk & (_UINT32_(value) << CAN_IE_RF0FE_Pos)) /* Assigment of value for RF0FE in the CAN_IE register */ +#define CAN_IE_RF0LE_Pos _UINT32_(3) /* (CAN_IE) Rx FIFO 0 Message Lost Interrupt Enable Position */ +#define CAN_IE_RF0LE_Msk (_UINT32_(0x1) << CAN_IE_RF0LE_Pos) /* (CAN_IE) Rx FIFO 0 Message Lost Interrupt Enable Mask */ +#define CAN_IE_RF0LE(value) (CAN_IE_RF0LE_Msk & (_UINT32_(value) << CAN_IE_RF0LE_Pos)) /* Assigment of value for RF0LE in the CAN_IE register */ +#define CAN_IE_RF1NE_Pos _UINT32_(4) /* (CAN_IE) Rx FIFO 1 New Message Interrupt Enable Position */ +#define CAN_IE_RF1NE_Msk (_UINT32_(0x1) << CAN_IE_RF1NE_Pos) /* (CAN_IE) Rx FIFO 1 New Message Interrupt Enable Mask */ +#define CAN_IE_RF1NE(value) (CAN_IE_RF1NE_Msk & (_UINT32_(value) << CAN_IE_RF1NE_Pos)) /* Assigment of value for RF1NE in the CAN_IE register */ +#define CAN_IE_RF1WE_Pos _UINT32_(5) /* (CAN_IE) Rx FIFO 1 Watermark Reached Interrupt Enable Position */ +#define CAN_IE_RF1WE_Msk (_UINT32_(0x1) << CAN_IE_RF1WE_Pos) /* (CAN_IE) Rx FIFO 1 Watermark Reached Interrupt Enable Mask */ +#define CAN_IE_RF1WE(value) (CAN_IE_RF1WE_Msk & (_UINT32_(value) << CAN_IE_RF1WE_Pos)) /* Assigment of value for RF1WE in the CAN_IE register */ +#define CAN_IE_RF1FE_Pos _UINT32_(6) /* (CAN_IE) Rx FIFO 1 FIFO Full Interrupt Enable Position */ +#define CAN_IE_RF1FE_Msk (_UINT32_(0x1) << CAN_IE_RF1FE_Pos) /* (CAN_IE) Rx FIFO 1 FIFO Full Interrupt Enable Mask */ +#define CAN_IE_RF1FE(value) (CAN_IE_RF1FE_Msk & (_UINT32_(value) << CAN_IE_RF1FE_Pos)) /* Assigment of value for RF1FE in the CAN_IE register */ +#define CAN_IE_RF1LE_Pos _UINT32_(7) /* (CAN_IE) Rx FIFO 1 Message Lost Interrupt Enable Position */ +#define CAN_IE_RF1LE_Msk (_UINT32_(0x1) << CAN_IE_RF1LE_Pos) /* (CAN_IE) Rx FIFO 1 Message Lost Interrupt Enable Mask */ +#define CAN_IE_RF1LE(value) (CAN_IE_RF1LE_Msk & (_UINT32_(value) << CAN_IE_RF1LE_Pos)) /* Assigment of value for RF1LE in the CAN_IE register */ +#define CAN_IE_HPME_Pos _UINT32_(8) /* (CAN_IE) High Priority Message Interrupt Enable Position */ +#define CAN_IE_HPME_Msk (_UINT32_(0x1) << CAN_IE_HPME_Pos) /* (CAN_IE) High Priority Message Interrupt Enable Mask */ +#define CAN_IE_HPME(value) (CAN_IE_HPME_Msk & (_UINT32_(value) << CAN_IE_HPME_Pos)) /* Assigment of value for HPME in the CAN_IE register */ +#define CAN_IE_TCE_Pos _UINT32_(9) /* (CAN_IE) Timestamp Completed Interrupt Enable Position */ +#define CAN_IE_TCE_Msk (_UINT32_(0x1) << CAN_IE_TCE_Pos) /* (CAN_IE) Timestamp Completed Interrupt Enable Mask */ +#define CAN_IE_TCE(value) (CAN_IE_TCE_Msk & (_UINT32_(value) << CAN_IE_TCE_Pos)) /* Assigment of value for TCE in the CAN_IE register */ +#define CAN_IE_TCFE_Pos _UINT32_(10) /* (CAN_IE) Transmission Cancellation Finished Interrupt Enable Position */ +#define CAN_IE_TCFE_Msk (_UINT32_(0x1) << CAN_IE_TCFE_Pos) /* (CAN_IE) Transmission Cancellation Finished Interrupt Enable Mask */ +#define CAN_IE_TCFE(value) (CAN_IE_TCFE_Msk & (_UINT32_(value) << CAN_IE_TCFE_Pos)) /* Assigment of value for TCFE in the CAN_IE register */ +#define CAN_IE_TFEE_Pos _UINT32_(11) /* (CAN_IE) Tx FIFO Empty Interrupt Enable Position */ +#define CAN_IE_TFEE_Msk (_UINT32_(0x1) << CAN_IE_TFEE_Pos) /* (CAN_IE) Tx FIFO Empty Interrupt Enable Mask */ +#define CAN_IE_TFEE(value) (CAN_IE_TFEE_Msk & (_UINT32_(value) << CAN_IE_TFEE_Pos)) /* Assigment of value for TFEE in the CAN_IE register */ +#define CAN_IE_TEFNE_Pos _UINT32_(12) /* (CAN_IE) Tx Event FIFO New Entry Interrupt Enable Position */ +#define CAN_IE_TEFNE_Msk (_UINT32_(0x1) << CAN_IE_TEFNE_Pos) /* (CAN_IE) Tx Event FIFO New Entry Interrupt Enable Mask */ +#define CAN_IE_TEFNE(value) (CAN_IE_TEFNE_Msk & (_UINT32_(value) << CAN_IE_TEFNE_Pos)) /* Assigment of value for TEFNE in the CAN_IE register */ +#define CAN_IE_TEFWE_Pos _UINT32_(13) /* (CAN_IE) Tx Event FIFO Watermark Reached Interrupt Enable Position */ +#define CAN_IE_TEFWE_Msk (_UINT32_(0x1) << CAN_IE_TEFWE_Pos) /* (CAN_IE) Tx Event FIFO Watermark Reached Interrupt Enable Mask */ +#define CAN_IE_TEFWE(value) (CAN_IE_TEFWE_Msk & (_UINT32_(value) << CAN_IE_TEFWE_Pos)) /* Assigment of value for TEFWE in the CAN_IE register */ +#define CAN_IE_TEFFE_Pos _UINT32_(14) /* (CAN_IE) Tx Event FIFO Full Interrupt Enable Position */ +#define CAN_IE_TEFFE_Msk (_UINT32_(0x1) << CAN_IE_TEFFE_Pos) /* (CAN_IE) Tx Event FIFO Full Interrupt Enable Mask */ +#define CAN_IE_TEFFE(value) (CAN_IE_TEFFE_Msk & (_UINT32_(value) << CAN_IE_TEFFE_Pos)) /* Assigment of value for TEFFE in the CAN_IE register */ +#define CAN_IE_TEFLE_Pos _UINT32_(15) /* (CAN_IE) Tx Event FIFO Element Lost Interrupt Enable Position */ +#define CAN_IE_TEFLE_Msk (_UINT32_(0x1) << CAN_IE_TEFLE_Pos) /* (CAN_IE) Tx Event FIFO Element Lost Interrupt Enable Mask */ +#define CAN_IE_TEFLE(value) (CAN_IE_TEFLE_Msk & (_UINT32_(value) << CAN_IE_TEFLE_Pos)) /* Assigment of value for TEFLE in the CAN_IE register */ +#define CAN_IE_TSWE_Pos _UINT32_(16) /* (CAN_IE) Timestamp Wraparound Interrupt Enable Position */ +#define CAN_IE_TSWE_Msk (_UINT32_(0x1) << CAN_IE_TSWE_Pos) /* (CAN_IE) Timestamp Wraparound Interrupt Enable Mask */ +#define CAN_IE_TSWE(value) (CAN_IE_TSWE_Msk & (_UINT32_(value) << CAN_IE_TSWE_Pos)) /* Assigment of value for TSWE in the CAN_IE register */ +#define CAN_IE_MRAFE_Pos _UINT32_(17) /* (CAN_IE) Message RAM Access Failure Interrupt Enable Position */ +#define CAN_IE_MRAFE_Msk (_UINT32_(0x1) << CAN_IE_MRAFE_Pos) /* (CAN_IE) Message RAM Access Failure Interrupt Enable Mask */ +#define CAN_IE_MRAFE(value) (CAN_IE_MRAFE_Msk & (_UINT32_(value) << CAN_IE_MRAFE_Pos)) /* Assigment of value for MRAFE in the CAN_IE register */ +#define CAN_IE_TOOE_Pos _UINT32_(18) /* (CAN_IE) Timeout Occurred Interrupt Enable Position */ +#define CAN_IE_TOOE_Msk (_UINT32_(0x1) << CAN_IE_TOOE_Pos) /* (CAN_IE) Timeout Occurred Interrupt Enable Mask */ +#define CAN_IE_TOOE(value) (CAN_IE_TOOE_Msk & (_UINT32_(value) << CAN_IE_TOOE_Pos)) /* Assigment of value for TOOE in the CAN_IE register */ +#define CAN_IE_DRXE_Pos _UINT32_(19) /* (CAN_IE) Message stored to Dedicated Rx Buffer Interrupt Enable Position */ +#define CAN_IE_DRXE_Msk (_UINT32_(0x1) << CAN_IE_DRXE_Pos) /* (CAN_IE) Message stored to Dedicated Rx Buffer Interrupt Enable Mask */ +#define CAN_IE_DRXE(value) (CAN_IE_DRXE_Msk & (_UINT32_(value) << CAN_IE_DRXE_Pos)) /* Assigment of value for DRXE in the CAN_IE register */ +#define CAN_IE_BECE_Pos _UINT32_(20) /* (CAN_IE) Bit Error Corrected Interrupt Enable Position */ +#define CAN_IE_BECE_Msk (_UINT32_(0x1) << CAN_IE_BECE_Pos) /* (CAN_IE) Bit Error Corrected Interrupt Enable Mask */ +#define CAN_IE_BECE(value) (CAN_IE_BECE_Msk & (_UINT32_(value) << CAN_IE_BECE_Pos)) /* Assigment of value for BECE in the CAN_IE register */ +#define CAN_IE_BEUE_Pos _UINT32_(21) /* (CAN_IE) Bit Error Uncorrected Interrupt Enable Position */ +#define CAN_IE_BEUE_Msk (_UINT32_(0x1) << CAN_IE_BEUE_Pos) /* (CAN_IE) Bit Error Uncorrected Interrupt Enable Mask */ +#define CAN_IE_BEUE(value) (CAN_IE_BEUE_Msk & (_UINT32_(value) << CAN_IE_BEUE_Pos)) /* Assigment of value for BEUE in the CAN_IE register */ +#define CAN_IE_ELOE_Pos _UINT32_(22) /* (CAN_IE) Error Logging Overflow Interrupt Enable Position */ +#define CAN_IE_ELOE_Msk (_UINT32_(0x1) << CAN_IE_ELOE_Pos) /* (CAN_IE) Error Logging Overflow Interrupt Enable Mask */ +#define CAN_IE_ELOE(value) (CAN_IE_ELOE_Msk & (_UINT32_(value) << CAN_IE_ELOE_Pos)) /* Assigment of value for ELOE in the CAN_IE register */ +#define CAN_IE_EPE_Pos _UINT32_(23) /* (CAN_IE) Error Passive Interrupt Enable Position */ +#define CAN_IE_EPE_Msk (_UINT32_(0x1) << CAN_IE_EPE_Pos) /* (CAN_IE) Error Passive Interrupt Enable Mask */ +#define CAN_IE_EPE(value) (CAN_IE_EPE_Msk & (_UINT32_(value) << CAN_IE_EPE_Pos)) /* Assigment of value for EPE in the CAN_IE register */ +#define CAN_IE_EWE_Pos _UINT32_(24) /* (CAN_IE) Warning Status Interrupt Enable Position */ +#define CAN_IE_EWE_Msk (_UINT32_(0x1) << CAN_IE_EWE_Pos) /* (CAN_IE) Warning Status Interrupt Enable Mask */ +#define CAN_IE_EWE(value) (CAN_IE_EWE_Msk & (_UINT32_(value) << CAN_IE_EWE_Pos)) /* Assigment of value for EWE in the CAN_IE register */ +#define CAN_IE_BOE_Pos _UINT32_(25) /* (CAN_IE) Bus_Off Status Interrupt Enable Position */ +#define CAN_IE_BOE_Msk (_UINT32_(0x1) << CAN_IE_BOE_Pos) /* (CAN_IE) Bus_Off Status Interrupt Enable Mask */ +#define CAN_IE_BOE(value) (CAN_IE_BOE_Msk & (_UINT32_(value) << CAN_IE_BOE_Pos)) /* Assigment of value for BOE in the CAN_IE register */ +#define CAN_IE_WDIE_Pos _UINT32_(26) /* (CAN_IE) Watchdog Interrupt Interrupt Enable Position */ +#define CAN_IE_WDIE_Msk (_UINT32_(0x1) << CAN_IE_WDIE_Pos) /* (CAN_IE) Watchdog Interrupt Interrupt Enable Mask */ +#define CAN_IE_WDIE(value) (CAN_IE_WDIE_Msk & (_UINT32_(value) << CAN_IE_WDIE_Pos)) /* Assigment of value for WDIE in the CAN_IE register */ +#define CAN_IE_PEAE_Pos _UINT32_(27) /* (CAN_IE) Protocol Error in Arbitration Phase Enable Position */ +#define CAN_IE_PEAE_Msk (_UINT32_(0x1) << CAN_IE_PEAE_Pos) /* (CAN_IE) Protocol Error in Arbitration Phase Enable Mask */ +#define CAN_IE_PEAE(value) (CAN_IE_PEAE_Msk & (_UINT32_(value) << CAN_IE_PEAE_Pos)) /* Assigment of value for PEAE in the CAN_IE register */ +#define CAN_IE_PEDE_Pos _UINT32_(28) /* (CAN_IE) Protocol Error in Data Phase Enable Position */ +#define CAN_IE_PEDE_Msk (_UINT32_(0x1) << CAN_IE_PEDE_Pos) /* (CAN_IE) Protocol Error in Data Phase Enable Mask */ +#define CAN_IE_PEDE(value) (CAN_IE_PEDE_Msk & (_UINT32_(value) << CAN_IE_PEDE_Pos)) /* Assigment of value for PEDE in the CAN_IE register */ +#define CAN_IE_ARAE_Pos _UINT32_(29) /* (CAN_IE) Access to Reserved Address Enable Position */ +#define CAN_IE_ARAE_Msk (_UINT32_(0x1) << CAN_IE_ARAE_Pos) /* (CAN_IE) Access to Reserved Address Enable Mask */ +#define CAN_IE_ARAE(value) (CAN_IE_ARAE_Msk & (_UINT32_(value) << CAN_IE_ARAE_Pos)) /* Assigment of value for ARAE in the CAN_IE register */ +#define CAN_IE_Msk _UINT32_(0x3FFFFFFF) /* (CAN_IE) Register Mask */ + + +/* -------- CAN_ILS : (CAN Offset: 0x58) (R/W 32) Interrupt Line Select -------- */ +#define CAN_ILS_RESETVALUE _UINT32_(0x00) /* (CAN_ILS) Interrupt Line Select Reset Value */ + +#define CAN_ILS_RF0NL_Pos _UINT32_(0) /* (CAN_ILS) Rx FIFO 0 New Message Interrupt Line Position */ +#define CAN_ILS_RF0NL_Msk (_UINT32_(0x1) << CAN_ILS_RF0NL_Pos) /* (CAN_ILS) Rx FIFO 0 New Message Interrupt Line Mask */ +#define CAN_ILS_RF0NL(value) (CAN_ILS_RF0NL_Msk & (_UINT32_(value) << CAN_ILS_RF0NL_Pos)) /* Assigment of value for RF0NL in the CAN_ILS register */ +#define CAN_ILS_RF0WL_Pos _UINT32_(1) /* (CAN_ILS) Rx FIFO 0 Watermark Reached Interrupt Line Position */ +#define CAN_ILS_RF0WL_Msk (_UINT32_(0x1) << CAN_ILS_RF0WL_Pos) /* (CAN_ILS) Rx FIFO 0 Watermark Reached Interrupt Line Mask */ +#define CAN_ILS_RF0WL(value) (CAN_ILS_RF0WL_Msk & (_UINT32_(value) << CAN_ILS_RF0WL_Pos)) /* Assigment of value for RF0WL in the CAN_ILS register */ +#define CAN_ILS_RF0FL_Pos _UINT32_(2) /* (CAN_ILS) Rx FIFO 0 Full Interrupt Line Position */ +#define CAN_ILS_RF0FL_Msk (_UINT32_(0x1) << CAN_ILS_RF0FL_Pos) /* (CAN_ILS) Rx FIFO 0 Full Interrupt Line Mask */ +#define CAN_ILS_RF0FL(value) (CAN_ILS_RF0FL_Msk & (_UINT32_(value) << CAN_ILS_RF0FL_Pos)) /* Assigment of value for RF0FL in the CAN_ILS register */ +#define CAN_ILS_RF0LL_Pos _UINT32_(3) /* (CAN_ILS) Rx FIFO 0 Message Lost Interrupt Line Position */ +#define CAN_ILS_RF0LL_Msk (_UINT32_(0x1) << CAN_ILS_RF0LL_Pos) /* (CAN_ILS) Rx FIFO 0 Message Lost Interrupt Line Mask */ +#define CAN_ILS_RF0LL(value) (CAN_ILS_RF0LL_Msk & (_UINT32_(value) << CAN_ILS_RF0LL_Pos)) /* Assigment of value for RF0LL in the CAN_ILS register */ +#define CAN_ILS_RF1NL_Pos _UINT32_(4) /* (CAN_ILS) Rx FIFO 1 New Message Interrupt Line Position */ +#define CAN_ILS_RF1NL_Msk (_UINT32_(0x1) << CAN_ILS_RF1NL_Pos) /* (CAN_ILS) Rx FIFO 1 New Message Interrupt Line Mask */ +#define CAN_ILS_RF1NL(value) (CAN_ILS_RF1NL_Msk & (_UINT32_(value) << CAN_ILS_RF1NL_Pos)) /* Assigment of value for RF1NL in the CAN_ILS register */ +#define CAN_ILS_RF1WL_Pos _UINT32_(5) /* (CAN_ILS) Rx FIFO 1 Watermark Reached Interrupt Line Position */ +#define CAN_ILS_RF1WL_Msk (_UINT32_(0x1) << CAN_ILS_RF1WL_Pos) /* (CAN_ILS) Rx FIFO 1 Watermark Reached Interrupt Line Mask */ +#define CAN_ILS_RF1WL(value) (CAN_ILS_RF1WL_Msk & (_UINT32_(value) << CAN_ILS_RF1WL_Pos)) /* Assigment of value for RF1WL in the CAN_ILS register */ +#define CAN_ILS_RF1FL_Pos _UINT32_(6) /* (CAN_ILS) Rx FIFO 1 FIFO Full Interrupt Line Position */ +#define CAN_ILS_RF1FL_Msk (_UINT32_(0x1) << CAN_ILS_RF1FL_Pos) /* (CAN_ILS) Rx FIFO 1 FIFO Full Interrupt Line Mask */ +#define CAN_ILS_RF1FL(value) (CAN_ILS_RF1FL_Msk & (_UINT32_(value) << CAN_ILS_RF1FL_Pos)) /* Assigment of value for RF1FL in the CAN_ILS register */ +#define CAN_ILS_RF1LL_Pos _UINT32_(7) /* (CAN_ILS) Rx FIFO 1 Message Lost Interrupt Line Position */ +#define CAN_ILS_RF1LL_Msk (_UINT32_(0x1) << CAN_ILS_RF1LL_Pos) /* (CAN_ILS) Rx FIFO 1 Message Lost Interrupt Line Mask */ +#define CAN_ILS_RF1LL(value) (CAN_ILS_RF1LL_Msk & (_UINT32_(value) << CAN_ILS_RF1LL_Pos)) /* Assigment of value for RF1LL in the CAN_ILS register */ +#define CAN_ILS_HPML_Pos _UINT32_(8) /* (CAN_ILS) High Priority Message Interrupt Line Position */ +#define CAN_ILS_HPML_Msk (_UINT32_(0x1) << CAN_ILS_HPML_Pos) /* (CAN_ILS) High Priority Message Interrupt Line Mask */ +#define CAN_ILS_HPML(value) (CAN_ILS_HPML_Msk & (_UINT32_(value) << CAN_ILS_HPML_Pos)) /* Assigment of value for HPML in the CAN_ILS register */ +#define CAN_ILS_TCL_Pos _UINT32_(9) /* (CAN_ILS) Timestamp Completed Interrupt Line Position */ +#define CAN_ILS_TCL_Msk (_UINT32_(0x1) << CAN_ILS_TCL_Pos) /* (CAN_ILS) Timestamp Completed Interrupt Line Mask */ +#define CAN_ILS_TCL(value) (CAN_ILS_TCL_Msk & (_UINT32_(value) << CAN_ILS_TCL_Pos)) /* Assigment of value for TCL in the CAN_ILS register */ +#define CAN_ILS_TCFL_Pos _UINT32_(10) /* (CAN_ILS) Transmission Cancellation Finished Interrupt Line Position */ +#define CAN_ILS_TCFL_Msk (_UINT32_(0x1) << CAN_ILS_TCFL_Pos) /* (CAN_ILS) Transmission Cancellation Finished Interrupt Line Mask */ +#define CAN_ILS_TCFL(value) (CAN_ILS_TCFL_Msk & (_UINT32_(value) << CAN_ILS_TCFL_Pos)) /* Assigment of value for TCFL in the CAN_ILS register */ +#define CAN_ILS_TFEL_Pos _UINT32_(11) /* (CAN_ILS) Tx FIFO Empty Interrupt Line Position */ +#define CAN_ILS_TFEL_Msk (_UINT32_(0x1) << CAN_ILS_TFEL_Pos) /* (CAN_ILS) Tx FIFO Empty Interrupt Line Mask */ +#define CAN_ILS_TFEL(value) (CAN_ILS_TFEL_Msk & (_UINT32_(value) << CAN_ILS_TFEL_Pos)) /* Assigment of value for TFEL in the CAN_ILS register */ +#define CAN_ILS_TEFNL_Pos _UINT32_(12) /* (CAN_ILS) Tx Event FIFO New Entry Interrupt Line Position */ +#define CAN_ILS_TEFNL_Msk (_UINT32_(0x1) << CAN_ILS_TEFNL_Pos) /* (CAN_ILS) Tx Event FIFO New Entry Interrupt Line Mask */ +#define CAN_ILS_TEFNL(value) (CAN_ILS_TEFNL_Msk & (_UINT32_(value) << CAN_ILS_TEFNL_Pos)) /* Assigment of value for TEFNL in the CAN_ILS register */ +#define CAN_ILS_TEFWL_Pos _UINT32_(13) /* (CAN_ILS) Tx Event FIFO Watermark Reached Interrupt Line Position */ +#define CAN_ILS_TEFWL_Msk (_UINT32_(0x1) << CAN_ILS_TEFWL_Pos) /* (CAN_ILS) Tx Event FIFO Watermark Reached Interrupt Line Mask */ +#define CAN_ILS_TEFWL(value) (CAN_ILS_TEFWL_Msk & (_UINT32_(value) << CAN_ILS_TEFWL_Pos)) /* Assigment of value for TEFWL in the CAN_ILS register */ +#define CAN_ILS_TEFFL_Pos _UINT32_(14) /* (CAN_ILS) Tx Event FIFO Full Interrupt Line Position */ +#define CAN_ILS_TEFFL_Msk (_UINT32_(0x1) << CAN_ILS_TEFFL_Pos) /* (CAN_ILS) Tx Event FIFO Full Interrupt Line Mask */ +#define CAN_ILS_TEFFL(value) (CAN_ILS_TEFFL_Msk & (_UINT32_(value) << CAN_ILS_TEFFL_Pos)) /* Assigment of value for TEFFL in the CAN_ILS register */ +#define CAN_ILS_TEFLL_Pos _UINT32_(15) /* (CAN_ILS) Tx Event FIFO Element Lost Interrupt Line Position */ +#define CAN_ILS_TEFLL_Msk (_UINT32_(0x1) << CAN_ILS_TEFLL_Pos) /* (CAN_ILS) Tx Event FIFO Element Lost Interrupt Line Mask */ +#define CAN_ILS_TEFLL(value) (CAN_ILS_TEFLL_Msk & (_UINT32_(value) << CAN_ILS_TEFLL_Pos)) /* Assigment of value for TEFLL in the CAN_ILS register */ +#define CAN_ILS_TSWL_Pos _UINT32_(16) /* (CAN_ILS) Timestamp Wraparound Interrupt Line Position */ +#define CAN_ILS_TSWL_Msk (_UINT32_(0x1) << CAN_ILS_TSWL_Pos) /* (CAN_ILS) Timestamp Wraparound Interrupt Line Mask */ +#define CAN_ILS_TSWL(value) (CAN_ILS_TSWL_Msk & (_UINT32_(value) << CAN_ILS_TSWL_Pos)) /* Assigment of value for TSWL in the CAN_ILS register */ +#define CAN_ILS_MRAFL_Pos _UINT32_(17) /* (CAN_ILS) Message RAM Access Failure Interrupt Line Position */ +#define CAN_ILS_MRAFL_Msk (_UINT32_(0x1) << CAN_ILS_MRAFL_Pos) /* (CAN_ILS) Message RAM Access Failure Interrupt Line Mask */ +#define CAN_ILS_MRAFL(value) (CAN_ILS_MRAFL_Msk & (_UINT32_(value) << CAN_ILS_MRAFL_Pos)) /* Assigment of value for MRAFL in the CAN_ILS register */ +#define CAN_ILS_TOOL_Pos _UINT32_(18) /* (CAN_ILS) Timeout Occurred Interrupt Line Position */ +#define CAN_ILS_TOOL_Msk (_UINT32_(0x1) << CAN_ILS_TOOL_Pos) /* (CAN_ILS) Timeout Occurred Interrupt Line Mask */ +#define CAN_ILS_TOOL(value) (CAN_ILS_TOOL_Msk & (_UINT32_(value) << CAN_ILS_TOOL_Pos)) /* Assigment of value for TOOL in the CAN_ILS register */ +#define CAN_ILS_DRXL_Pos _UINT32_(19) /* (CAN_ILS) Message stored to Dedicated Rx Buffer Interrupt Line Position */ +#define CAN_ILS_DRXL_Msk (_UINT32_(0x1) << CAN_ILS_DRXL_Pos) /* (CAN_ILS) Message stored to Dedicated Rx Buffer Interrupt Line Mask */ +#define CAN_ILS_DRXL(value) (CAN_ILS_DRXL_Msk & (_UINT32_(value) << CAN_ILS_DRXL_Pos)) /* Assigment of value for DRXL in the CAN_ILS register */ +#define CAN_ILS_BECL_Pos _UINT32_(20) /* (CAN_ILS) Bit Error Corrected Interrupt Line Position */ +#define CAN_ILS_BECL_Msk (_UINT32_(0x1) << CAN_ILS_BECL_Pos) /* (CAN_ILS) Bit Error Corrected Interrupt Line Mask */ +#define CAN_ILS_BECL(value) (CAN_ILS_BECL_Msk & (_UINT32_(value) << CAN_ILS_BECL_Pos)) /* Assigment of value for BECL in the CAN_ILS register */ +#define CAN_ILS_BEUL_Pos _UINT32_(21) /* (CAN_ILS) Bit Error Uncorrected Interrupt Line Position */ +#define CAN_ILS_BEUL_Msk (_UINT32_(0x1) << CAN_ILS_BEUL_Pos) /* (CAN_ILS) Bit Error Uncorrected Interrupt Line Mask */ +#define CAN_ILS_BEUL(value) (CAN_ILS_BEUL_Msk & (_UINT32_(value) << CAN_ILS_BEUL_Pos)) /* Assigment of value for BEUL in the CAN_ILS register */ +#define CAN_ILS_ELOL_Pos _UINT32_(22) /* (CAN_ILS) Error Logging Overflow Interrupt Line Position */ +#define CAN_ILS_ELOL_Msk (_UINT32_(0x1) << CAN_ILS_ELOL_Pos) /* (CAN_ILS) Error Logging Overflow Interrupt Line Mask */ +#define CAN_ILS_ELOL(value) (CAN_ILS_ELOL_Msk & (_UINT32_(value) << CAN_ILS_ELOL_Pos)) /* Assigment of value for ELOL in the CAN_ILS register */ +#define CAN_ILS_EPL_Pos _UINT32_(23) /* (CAN_ILS) Error Passive Interrupt Line Position */ +#define CAN_ILS_EPL_Msk (_UINT32_(0x1) << CAN_ILS_EPL_Pos) /* (CAN_ILS) Error Passive Interrupt Line Mask */ +#define CAN_ILS_EPL(value) (CAN_ILS_EPL_Msk & (_UINT32_(value) << CAN_ILS_EPL_Pos)) /* Assigment of value for EPL in the CAN_ILS register */ +#define CAN_ILS_EWL_Pos _UINT32_(24) /* (CAN_ILS) Warning Status Interrupt Line Position */ +#define CAN_ILS_EWL_Msk (_UINT32_(0x1) << CAN_ILS_EWL_Pos) /* (CAN_ILS) Warning Status Interrupt Line Mask */ +#define CAN_ILS_EWL(value) (CAN_ILS_EWL_Msk & (_UINT32_(value) << CAN_ILS_EWL_Pos)) /* Assigment of value for EWL in the CAN_ILS register */ +#define CAN_ILS_BOL_Pos _UINT32_(25) /* (CAN_ILS) Bus_Off Status Interrupt Line Position */ +#define CAN_ILS_BOL_Msk (_UINT32_(0x1) << CAN_ILS_BOL_Pos) /* (CAN_ILS) Bus_Off Status Interrupt Line Mask */ +#define CAN_ILS_BOL(value) (CAN_ILS_BOL_Msk & (_UINT32_(value) << CAN_ILS_BOL_Pos)) /* Assigment of value for BOL in the CAN_ILS register */ +#define CAN_ILS_WDIL_Pos _UINT32_(26) /* (CAN_ILS) Watchdog Interrupt Interrupt Line Position */ +#define CAN_ILS_WDIL_Msk (_UINT32_(0x1) << CAN_ILS_WDIL_Pos) /* (CAN_ILS) Watchdog Interrupt Interrupt Line Mask */ +#define CAN_ILS_WDIL(value) (CAN_ILS_WDIL_Msk & (_UINT32_(value) << CAN_ILS_WDIL_Pos)) /* Assigment of value for WDIL in the CAN_ILS register */ +#define CAN_ILS_PEAL_Pos _UINT32_(27) /* (CAN_ILS) Protocol Error in Arbitration Phase Line Position */ +#define CAN_ILS_PEAL_Msk (_UINT32_(0x1) << CAN_ILS_PEAL_Pos) /* (CAN_ILS) Protocol Error in Arbitration Phase Line Mask */ +#define CAN_ILS_PEAL(value) (CAN_ILS_PEAL_Msk & (_UINT32_(value) << CAN_ILS_PEAL_Pos)) /* Assigment of value for PEAL in the CAN_ILS register */ +#define CAN_ILS_PEDL_Pos _UINT32_(28) /* (CAN_ILS) Protocol Error in Data Phase Line Position */ +#define CAN_ILS_PEDL_Msk (_UINT32_(0x1) << CAN_ILS_PEDL_Pos) /* (CAN_ILS) Protocol Error in Data Phase Line Mask */ +#define CAN_ILS_PEDL(value) (CAN_ILS_PEDL_Msk & (_UINT32_(value) << CAN_ILS_PEDL_Pos)) /* Assigment of value for PEDL in the CAN_ILS register */ +#define CAN_ILS_ARAL_Pos _UINT32_(29) /* (CAN_ILS) Access to Reserved Address Line Position */ +#define CAN_ILS_ARAL_Msk (_UINT32_(0x1) << CAN_ILS_ARAL_Pos) /* (CAN_ILS) Access to Reserved Address Line Mask */ +#define CAN_ILS_ARAL(value) (CAN_ILS_ARAL_Msk & (_UINT32_(value) << CAN_ILS_ARAL_Pos)) /* Assigment of value for ARAL in the CAN_ILS register */ +#define CAN_ILS_Msk _UINT32_(0x3FFFFFFF) /* (CAN_ILS) Register Mask */ + + +/* -------- CAN_ILE : (CAN Offset: 0x5C) (R/W 32) Interrupt Line Enable -------- */ +#define CAN_ILE_RESETVALUE _UINT32_(0x00) /* (CAN_ILE) Interrupt Line Enable Reset Value */ + +#define CAN_ILE_EINT0_Pos _UINT32_(0) /* (CAN_ILE) Enable Interrupt Line 0 Position */ +#define CAN_ILE_EINT0_Msk (_UINT32_(0x1) << CAN_ILE_EINT0_Pos) /* (CAN_ILE) Enable Interrupt Line 0 Mask */ +#define CAN_ILE_EINT0(value) (CAN_ILE_EINT0_Msk & (_UINT32_(value) << CAN_ILE_EINT0_Pos)) /* Assigment of value for EINT0 in the CAN_ILE register */ +#define CAN_ILE_EINT1_Pos _UINT32_(1) /* (CAN_ILE) Enable Interrupt Line 1 Position */ +#define CAN_ILE_EINT1_Msk (_UINT32_(0x1) << CAN_ILE_EINT1_Pos) /* (CAN_ILE) Enable Interrupt Line 1 Mask */ +#define CAN_ILE_EINT1(value) (CAN_ILE_EINT1_Msk & (_UINT32_(value) << CAN_ILE_EINT1_Pos)) /* Assigment of value for EINT1 in the CAN_ILE register */ +#define CAN_ILE_Msk _UINT32_(0x00000003) /* (CAN_ILE) Register Mask */ + +#define CAN_ILE_EINT_Pos _UINT32_(0) /* (CAN_ILE Position) Enable Interrupt Line x */ +#define CAN_ILE_EINT_Msk (_UINT32_(0x3) << CAN_ILE_EINT_Pos) /* (CAN_ILE Mask) EINT */ +#define CAN_ILE_EINT(value) (CAN_ILE_EINT_Msk & (_UINT32_(value) << CAN_ILE_EINT_Pos)) + +/* -------- CAN_GFC : (CAN Offset: 0x80) (R/W 32) Global Filter Configuration -------- */ +#define CAN_GFC_RESETVALUE _UINT32_(0x00) /* (CAN_GFC) Global Filter Configuration Reset Value */ + +#define CAN_GFC_RRFE_Pos _UINT32_(0) /* (CAN_GFC) Reject Remote Frames Extended Position */ +#define CAN_GFC_RRFE_Msk (_UINT32_(0x1) << CAN_GFC_RRFE_Pos) /* (CAN_GFC) Reject Remote Frames Extended Mask */ +#define CAN_GFC_RRFE(value) (CAN_GFC_RRFE_Msk & (_UINT32_(value) << CAN_GFC_RRFE_Pos)) /* Assigment of value for RRFE in the CAN_GFC register */ +#define CAN_GFC_RRFS_Pos _UINT32_(1) /* (CAN_GFC) Reject Remote Frames Standard Position */ +#define CAN_GFC_RRFS_Msk (_UINT32_(0x1) << CAN_GFC_RRFS_Pos) /* (CAN_GFC) Reject Remote Frames Standard Mask */ +#define CAN_GFC_RRFS(value) (CAN_GFC_RRFS_Msk & (_UINT32_(value) << CAN_GFC_RRFS_Pos)) /* Assigment of value for RRFS in the CAN_GFC register */ +#define CAN_GFC_ANFE_Pos _UINT32_(2) /* (CAN_GFC) Accept Non-matching Frames Extended Position */ +#define CAN_GFC_ANFE_Msk (_UINT32_(0x3) << CAN_GFC_ANFE_Pos) /* (CAN_GFC) Accept Non-matching Frames Extended Mask */ +#define CAN_GFC_ANFE(value) (CAN_GFC_ANFE_Msk & (_UINT32_(value) << CAN_GFC_ANFE_Pos)) /* Assigment of value for ANFE in the CAN_GFC register */ +#define CAN_GFC_ANFE_RXF0_Val _UINT32_(0x0) /* (CAN_GFC) Accept in Rx FIFO 0 */ +#define CAN_GFC_ANFE_RXF1_Val _UINT32_(0x1) /* (CAN_GFC) Accept in Rx FIFO 1 */ +#define CAN_GFC_ANFE_REJECT_Val _UINT32_(0x2) /* (CAN_GFC) Reject */ +#define CAN_GFC_ANFE_RXF0 (CAN_GFC_ANFE_RXF0_Val << CAN_GFC_ANFE_Pos) /* (CAN_GFC) Accept in Rx FIFO 0 Position */ +#define CAN_GFC_ANFE_RXF1 (CAN_GFC_ANFE_RXF1_Val << CAN_GFC_ANFE_Pos) /* (CAN_GFC) Accept in Rx FIFO 1 Position */ +#define CAN_GFC_ANFE_REJECT (CAN_GFC_ANFE_REJECT_Val << CAN_GFC_ANFE_Pos) /* (CAN_GFC) Reject Position */ +#define CAN_GFC_ANFS_Pos _UINT32_(4) /* (CAN_GFC) Accept Non-matching Frames Standard Position */ +#define CAN_GFC_ANFS_Msk (_UINT32_(0x3) << CAN_GFC_ANFS_Pos) /* (CAN_GFC) Accept Non-matching Frames Standard Mask */ +#define CAN_GFC_ANFS(value) (CAN_GFC_ANFS_Msk & (_UINT32_(value) << CAN_GFC_ANFS_Pos)) /* Assigment of value for ANFS in the CAN_GFC register */ +#define CAN_GFC_ANFS_RXF0_Val _UINT32_(0x0) /* (CAN_GFC) Accept in Rx FIFO 0 */ +#define CAN_GFC_ANFS_RXF1_Val _UINT32_(0x1) /* (CAN_GFC) Accept in Rx FIFO 1 */ +#define CAN_GFC_ANFS_REJECT_Val _UINT32_(0x2) /* (CAN_GFC) Reject */ +#define CAN_GFC_ANFS_RXF0 (CAN_GFC_ANFS_RXF0_Val << CAN_GFC_ANFS_Pos) /* (CAN_GFC) Accept in Rx FIFO 0 Position */ +#define CAN_GFC_ANFS_RXF1 (CAN_GFC_ANFS_RXF1_Val << CAN_GFC_ANFS_Pos) /* (CAN_GFC) Accept in Rx FIFO 1 Position */ +#define CAN_GFC_ANFS_REJECT (CAN_GFC_ANFS_REJECT_Val << CAN_GFC_ANFS_Pos) /* (CAN_GFC) Reject Position */ +#define CAN_GFC_Msk _UINT32_(0x0000003F) /* (CAN_GFC) Register Mask */ + + +/* -------- CAN_SIDFC : (CAN Offset: 0x84) (R/W 32) Standard ID Filter Configuration -------- */ +#define CAN_SIDFC_RESETVALUE _UINT32_(0x00) /* (CAN_SIDFC) Standard ID Filter Configuration Reset Value */ + +#define CAN_SIDFC_FLSSA_Pos _UINT32_(0) /* (CAN_SIDFC) Filter List Standard Start Address Position */ +#define CAN_SIDFC_FLSSA_Msk (_UINT32_(0xFFFF) << CAN_SIDFC_FLSSA_Pos) /* (CAN_SIDFC) Filter List Standard Start Address Mask */ +#define CAN_SIDFC_FLSSA(value) (CAN_SIDFC_FLSSA_Msk & (_UINT32_(value) << CAN_SIDFC_FLSSA_Pos)) /* Assigment of value for FLSSA in the CAN_SIDFC register */ +#define CAN_SIDFC_LSS_Pos _UINT32_(16) /* (CAN_SIDFC) List Size Standard Position */ +#define CAN_SIDFC_LSS_Msk (_UINT32_(0xFF) << CAN_SIDFC_LSS_Pos) /* (CAN_SIDFC) List Size Standard Mask */ +#define CAN_SIDFC_LSS(value) (CAN_SIDFC_LSS_Msk & (_UINT32_(value) << CAN_SIDFC_LSS_Pos)) /* Assigment of value for LSS in the CAN_SIDFC register */ +#define CAN_SIDFC_Msk _UINT32_(0x00FFFFFF) /* (CAN_SIDFC) Register Mask */ + + +/* -------- CAN_XIDFC : (CAN Offset: 0x88) (R/W 32) Extended ID Filter Configuration -------- */ +#define CAN_XIDFC_RESETVALUE _UINT32_(0x00) /* (CAN_XIDFC) Extended ID Filter Configuration Reset Value */ + +#define CAN_XIDFC_FLESA_Pos _UINT32_(0) /* (CAN_XIDFC) Filter List Extended Start Address Position */ +#define CAN_XIDFC_FLESA_Msk (_UINT32_(0xFFFF) << CAN_XIDFC_FLESA_Pos) /* (CAN_XIDFC) Filter List Extended Start Address Mask */ +#define CAN_XIDFC_FLESA(value) (CAN_XIDFC_FLESA_Msk & (_UINT32_(value) << CAN_XIDFC_FLESA_Pos)) /* Assigment of value for FLESA in the CAN_XIDFC register */ +#define CAN_XIDFC_LSE_Pos _UINT32_(16) /* (CAN_XIDFC) List Size Extended Position */ +#define CAN_XIDFC_LSE_Msk (_UINT32_(0x7F) << CAN_XIDFC_LSE_Pos) /* (CAN_XIDFC) List Size Extended Mask */ +#define CAN_XIDFC_LSE(value) (CAN_XIDFC_LSE_Msk & (_UINT32_(value) << CAN_XIDFC_LSE_Pos)) /* Assigment of value for LSE in the CAN_XIDFC register */ +#define CAN_XIDFC_Msk _UINT32_(0x007FFFFF) /* (CAN_XIDFC) Register Mask */ + + +/* -------- CAN_XIDAM : (CAN Offset: 0x90) (R/W 32) Extended ID AND Mask -------- */ +#define CAN_XIDAM_RESETVALUE _UINT32_(0x1FFFFFFF) /* (CAN_XIDAM) Extended ID AND Mask Reset Value */ + +#define CAN_XIDAM_EIDM_Pos _UINT32_(0) /* (CAN_XIDAM) Extended ID Mask Position */ +#define CAN_XIDAM_EIDM_Msk (_UINT32_(0x1FFFFFFF) << CAN_XIDAM_EIDM_Pos) /* (CAN_XIDAM) Extended ID Mask Mask */ +#define CAN_XIDAM_EIDM(value) (CAN_XIDAM_EIDM_Msk & (_UINT32_(value) << CAN_XIDAM_EIDM_Pos)) /* Assigment of value for EIDM in the CAN_XIDAM register */ +#define CAN_XIDAM_Msk _UINT32_(0x1FFFFFFF) /* (CAN_XIDAM) Register Mask */ + + +/* -------- CAN_HPMS : (CAN Offset: 0x94) ( R/ 32) High Priority Message Status -------- */ +#define CAN_HPMS_RESETVALUE _UINT32_(0x00) /* (CAN_HPMS) High Priority Message Status Reset Value */ + +#define CAN_HPMS_BIDX_Pos _UINT32_(0) /* (CAN_HPMS) Buffer Index Position */ +#define CAN_HPMS_BIDX_Msk (_UINT32_(0x3F) << CAN_HPMS_BIDX_Pos) /* (CAN_HPMS) Buffer Index Mask */ +#define CAN_HPMS_BIDX(value) (CAN_HPMS_BIDX_Msk & (_UINT32_(value) << CAN_HPMS_BIDX_Pos)) /* Assigment of value for BIDX in the CAN_HPMS register */ +#define CAN_HPMS_MSI_Pos _UINT32_(6) /* (CAN_HPMS) Message Storage Indicator Position */ +#define CAN_HPMS_MSI_Msk (_UINT32_(0x3) << CAN_HPMS_MSI_Pos) /* (CAN_HPMS) Message Storage Indicator Mask */ +#define CAN_HPMS_MSI(value) (CAN_HPMS_MSI_Msk & (_UINT32_(value) << CAN_HPMS_MSI_Pos)) /* Assigment of value for MSI in the CAN_HPMS register */ +#define CAN_HPMS_MSI_NONE_Val _UINT32_(0x0) /* (CAN_HPMS) No FIFO selected */ +#define CAN_HPMS_MSI_LOST_Val _UINT32_(0x1) /* (CAN_HPMS) FIFO message lost */ +#define CAN_HPMS_MSI_FIFO0_Val _UINT32_(0x2) /* (CAN_HPMS) Message stored in FIFO 0 */ +#define CAN_HPMS_MSI_FIFO1_Val _UINT32_(0x3) /* (CAN_HPMS) Message stored in FIFO 1 */ +#define CAN_HPMS_MSI_NONE (CAN_HPMS_MSI_NONE_Val << CAN_HPMS_MSI_Pos) /* (CAN_HPMS) No FIFO selected Position */ +#define CAN_HPMS_MSI_LOST (CAN_HPMS_MSI_LOST_Val << CAN_HPMS_MSI_Pos) /* (CAN_HPMS) FIFO message lost Position */ +#define CAN_HPMS_MSI_FIFO0 (CAN_HPMS_MSI_FIFO0_Val << CAN_HPMS_MSI_Pos) /* (CAN_HPMS) Message stored in FIFO 0 Position */ +#define CAN_HPMS_MSI_FIFO1 (CAN_HPMS_MSI_FIFO1_Val << CAN_HPMS_MSI_Pos) /* (CAN_HPMS) Message stored in FIFO 1 Position */ +#define CAN_HPMS_FIDX_Pos _UINT32_(8) /* (CAN_HPMS) Filter Index Position */ +#define CAN_HPMS_FIDX_Msk (_UINT32_(0x7F) << CAN_HPMS_FIDX_Pos) /* (CAN_HPMS) Filter Index Mask */ +#define CAN_HPMS_FIDX(value) (CAN_HPMS_FIDX_Msk & (_UINT32_(value) << CAN_HPMS_FIDX_Pos)) /* Assigment of value for FIDX in the CAN_HPMS register */ +#define CAN_HPMS_FLST_Pos _UINT32_(15) /* (CAN_HPMS) Filter List Position */ +#define CAN_HPMS_FLST_Msk (_UINT32_(0x1) << CAN_HPMS_FLST_Pos) /* (CAN_HPMS) Filter List Mask */ +#define CAN_HPMS_FLST(value) (CAN_HPMS_FLST_Msk & (_UINT32_(value) << CAN_HPMS_FLST_Pos)) /* Assigment of value for FLST in the CAN_HPMS register */ +#define CAN_HPMS_Msk _UINT32_(0x0000FFFF) /* (CAN_HPMS) Register Mask */ + + +/* -------- CAN_NDAT1 : (CAN Offset: 0x98) (R/W 32) New Data 1 -------- */ +#define CAN_NDAT1_RESETVALUE _UINT32_(0x00) /* (CAN_NDAT1) New Data 1 Reset Value */ + +#define CAN_NDAT1_ND0_Pos _UINT32_(0) /* (CAN_NDAT1) New Data 0 Position */ +#define CAN_NDAT1_ND0_Msk (_UINT32_(0x1) << CAN_NDAT1_ND0_Pos) /* (CAN_NDAT1) New Data 0 Mask */ +#define CAN_NDAT1_ND0(value) (CAN_NDAT1_ND0_Msk & (_UINT32_(value) << CAN_NDAT1_ND0_Pos)) /* Assigment of value for ND0 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND1_Pos _UINT32_(1) /* (CAN_NDAT1) New Data 1 Position */ +#define CAN_NDAT1_ND1_Msk (_UINT32_(0x1) << CAN_NDAT1_ND1_Pos) /* (CAN_NDAT1) New Data 1 Mask */ +#define CAN_NDAT1_ND1(value) (CAN_NDAT1_ND1_Msk & (_UINT32_(value) << CAN_NDAT1_ND1_Pos)) /* Assigment of value for ND1 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND2_Pos _UINT32_(2) /* (CAN_NDAT1) New Data 2 Position */ +#define CAN_NDAT1_ND2_Msk (_UINT32_(0x1) << CAN_NDAT1_ND2_Pos) /* (CAN_NDAT1) New Data 2 Mask */ +#define CAN_NDAT1_ND2(value) (CAN_NDAT1_ND2_Msk & (_UINT32_(value) << CAN_NDAT1_ND2_Pos)) /* Assigment of value for ND2 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND3_Pos _UINT32_(3) /* (CAN_NDAT1) New Data 3 Position */ +#define CAN_NDAT1_ND3_Msk (_UINT32_(0x1) << CAN_NDAT1_ND3_Pos) /* (CAN_NDAT1) New Data 3 Mask */ +#define CAN_NDAT1_ND3(value) (CAN_NDAT1_ND3_Msk & (_UINT32_(value) << CAN_NDAT1_ND3_Pos)) /* Assigment of value for ND3 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND4_Pos _UINT32_(4) /* (CAN_NDAT1) New Data 4 Position */ +#define CAN_NDAT1_ND4_Msk (_UINT32_(0x1) << CAN_NDAT1_ND4_Pos) /* (CAN_NDAT1) New Data 4 Mask */ +#define CAN_NDAT1_ND4(value) (CAN_NDAT1_ND4_Msk & (_UINT32_(value) << CAN_NDAT1_ND4_Pos)) /* Assigment of value for ND4 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND5_Pos _UINT32_(5) /* (CAN_NDAT1) New Data 5 Position */ +#define CAN_NDAT1_ND5_Msk (_UINT32_(0x1) << CAN_NDAT1_ND5_Pos) /* (CAN_NDAT1) New Data 5 Mask */ +#define CAN_NDAT1_ND5(value) (CAN_NDAT1_ND5_Msk & (_UINT32_(value) << CAN_NDAT1_ND5_Pos)) /* Assigment of value for ND5 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND6_Pos _UINT32_(6) /* (CAN_NDAT1) New Data 6 Position */ +#define CAN_NDAT1_ND6_Msk (_UINT32_(0x1) << CAN_NDAT1_ND6_Pos) /* (CAN_NDAT1) New Data 6 Mask */ +#define CAN_NDAT1_ND6(value) (CAN_NDAT1_ND6_Msk & (_UINT32_(value) << CAN_NDAT1_ND6_Pos)) /* Assigment of value for ND6 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND7_Pos _UINT32_(7) /* (CAN_NDAT1) New Data 7 Position */ +#define CAN_NDAT1_ND7_Msk (_UINT32_(0x1) << CAN_NDAT1_ND7_Pos) /* (CAN_NDAT1) New Data 7 Mask */ +#define CAN_NDAT1_ND7(value) (CAN_NDAT1_ND7_Msk & (_UINT32_(value) << CAN_NDAT1_ND7_Pos)) /* Assigment of value for ND7 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND8_Pos _UINT32_(8) /* (CAN_NDAT1) New Data 8 Position */ +#define CAN_NDAT1_ND8_Msk (_UINT32_(0x1) << CAN_NDAT1_ND8_Pos) /* (CAN_NDAT1) New Data 8 Mask */ +#define CAN_NDAT1_ND8(value) (CAN_NDAT1_ND8_Msk & (_UINT32_(value) << CAN_NDAT1_ND8_Pos)) /* Assigment of value for ND8 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND9_Pos _UINT32_(9) /* (CAN_NDAT1) New Data 9 Position */ +#define CAN_NDAT1_ND9_Msk (_UINT32_(0x1) << CAN_NDAT1_ND9_Pos) /* (CAN_NDAT1) New Data 9 Mask */ +#define CAN_NDAT1_ND9(value) (CAN_NDAT1_ND9_Msk & (_UINT32_(value) << CAN_NDAT1_ND9_Pos)) /* Assigment of value for ND9 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND10_Pos _UINT32_(10) /* (CAN_NDAT1) New Data 10 Position */ +#define CAN_NDAT1_ND10_Msk (_UINT32_(0x1) << CAN_NDAT1_ND10_Pos) /* (CAN_NDAT1) New Data 10 Mask */ +#define CAN_NDAT1_ND10(value) (CAN_NDAT1_ND10_Msk & (_UINT32_(value) << CAN_NDAT1_ND10_Pos)) /* Assigment of value for ND10 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND11_Pos _UINT32_(11) /* (CAN_NDAT1) New Data 11 Position */ +#define CAN_NDAT1_ND11_Msk (_UINT32_(0x1) << CAN_NDAT1_ND11_Pos) /* (CAN_NDAT1) New Data 11 Mask */ +#define CAN_NDAT1_ND11(value) (CAN_NDAT1_ND11_Msk & (_UINT32_(value) << CAN_NDAT1_ND11_Pos)) /* Assigment of value for ND11 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND12_Pos _UINT32_(12) /* (CAN_NDAT1) New Data 12 Position */ +#define CAN_NDAT1_ND12_Msk (_UINT32_(0x1) << CAN_NDAT1_ND12_Pos) /* (CAN_NDAT1) New Data 12 Mask */ +#define CAN_NDAT1_ND12(value) (CAN_NDAT1_ND12_Msk & (_UINT32_(value) << CAN_NDAT1_ND12_Pos)) /* Assigment of value for ND12 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND13_Pos _UINT32_(13) /* (CAN_NDAT1) New Data 13 Position */ +#define CAN_NDAT1_ND13_Msk (_UINT32_(0x1) << CAN_NDAT1_ND13_Pos) /* (CAN_NDAT1) New Data 13 Mask */ +#define CAN_NDAT1_ND13(value) (CAN_NDAT1_ND13_Msk & (_UINT32_(value) << CAN_NDAT1_ND13_Pos)) /* Assigment of value for ND13 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND14_Pos _UINT32_(14) /* (CAN_NDAT1) New Data 14 Position */ +#define CAN_NDAT1_ND14_Msk (_UINT32_(0x1) << CAN_NDAT1_ND14_Pos) /* (CAN_NDAT1) New Data 14 Mask */ +#define CAN_NDAT1_ND14(value) (CAN_NDAT1_ND14_Msk & (_UINT32_(value) << CAN_NDAT1_ND14_Pos)) /* Assigment of value for ND14 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND15_Pos _UINT32_(15) /* (CAN_NDAT1) New Data 15 Position */ +#define CAN_NDAT1_ND15_Msk (_UINT32_(0x1) << CAN_NDAT1_ND15_Pos) /* (CAN_NDAT1) New Data 15 Mask */ +#define CAN_NDAT1_ND15(value) (CAN_NDAT1_ND15_Msk & (_UINT32_(value) << CAN_NDAT1_ND15_Pos)) /* Assigment of value for ND15 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND16_Pos _UINT32_(16) /* (CAN_NDAT1) New Data 16 Position */ +#define CAN_NDAT1_ND16_Msk (_UINT32_(0x1) << CAN_NDAT1_ND16_Pos) /* (CAN_NDAT1) New Data 16 Mask */ +#define CAN_NDAT1_ND16(value) (CAN_NDAT1_ND16_Msk & (_UINT32_(value) << CAN_NDAT1_ND16_Pos)) /* Assigment of value for ND16 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND17_Pos _UINT32_(17) /* (CAN_NDAT1) New Data 17 Position */ +#define CAN_NDAT1_ND17_Msk (_UINT32_(0x1) << CAN_NDAT1_ND17_Pos) /* (CAN_NDAT1) New Data 17 Mask */ +#define CAN_NDAT1_ND17(value) (CAN_NDAT1_ND17_Msk & (_UINT32_(value) << CAN_NDAT1_ND17_Pos)) /* Assigment of value for ND17 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND18_Pos _UINT32_(18) /* (CAN_NDAT1) New Data 18 Position */ +#define CAN_NDAT1_ND18_Msk (_UINT32_(0x1) << CAN_NDAT1_ND18_Pos) /* (CAN_NDAT1) New Data 18 Mask */ +#define CAN_NDAT1_ND18(value) (CAN_NDAT1_ND18_Msk & (_UINT32_(value) << CAN_NDAT1_ND18_Pos)) /* Assigment of value for ND18 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND19_Pos _UINT32_(19) /* (CAN_NDAT1) New Data 19 Position */ +#define CAN_NDAT1_ND19_Msk (_UINT32_(0x1) << CAN_NDAT1_ND19_Pos) /* (CAN_NDAT1) New Data 19 Mask */ +#define CAN_NDAT1_ND19(value) (CAN_NDAT1_ND19_Msk & (_UINT32_(value) << CAN_NDAT1_ND19_Pos)) /* Assigment of value for ND19 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND20_Pos _UINT32_(20) /* (CAN_NDAT1) New Data 20 Position */ +#define CAN_NDAT1_ND20_Msk (_UINT32_(0x1) << CAN_NDAT1_ND20_Pos) /* (CAN_NDAT1) New Data 20 Mask */ +#define CAN_NDAT1_ND20(value) (CAN_NDAT1_ND20_Msk & (_UINT32_(value) << CAN_NDAT1_ND20_Pos)) /* Assigment of value for ND20 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND21_Pos _UINT32_(21) /* (CAN_NDAT1) New Data 21 Position */ +#define CAN_NDAT1_ND21_Msk (_UINT32_(0x1) << CAN_NDAT1_ND21_Pos) /* (CAN_NDAT1) New Data 21 Mask */ +#define CAN_NDAT1_ND21(value) (CAN_NDAT1_ND21_Msk & (_UINT32_(value) << CAN_NDAT1_ND21_Pos)) /* Assigment of value for ND21 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND22_Pos _UINT32_(22) /* (CAN_NDAT1) New Data 22 Position */ +#define CAN_NDAT1_ND22_Msk (_UINT32_(0x1) << CAN_NDAT1_ND22_Pos) /* (CAN_NDAT1) New Data 22 Mask */ +#define CAN_NDAT1_ND22(value) (CAN_NDAT1_ND22_Msk & (_UINT32_(value) << CAN_NDAT1_ND22_Pos)) /* Assigment of value for ND22 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND23_Pos _UINT32_(23) /* (CAN_NDAT1) New Data 23 Position */ +#define CAN_NDAT1_ND23_Msk (_UINT32_(0x1) << CAN_NDAT1_ND23_Pos) /* (CAN_NDAT1) New Data 23 Mask */ +#define CAN_NDAT1_ND23(value) (CAN_NDAT1_ND23_Msk & (_UINT32_(value) << CAN_NDAT1_ND23_Pos)) /* Assigment of value for ND23 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND24_Pos _UINT32_(24) /* (CAN_NDAT1) New Data 24 Position */ +#define CAN_NDAT1_ND24_Msk (_UINT32_(0x1) << CAN_NDAT1_ND24_Pos) /* (CAN_NDAT1) New Data 24 Mask */ +#define CAN_NDAT1_ND24(value) (CAN_NDAT1_ND24_Msk & (_UINT32_(value) << CAN_NDAT1_ND24_Pos)) /* Assigment of value for ND24 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND25_Pos _UINT32_(25) /* (CAN_NDAT1) New Data 25 Position */ +#define CAN_NDAT1_ND25_Msk (_UINT32_(0x1) << CAN_NDAT1_ND25_Pos) /* (CAN_NDAT1) New Data 25 Mask */ +#define CAN_NDAT1_ND25(value) (CAN_NDAT1_ND25_Msk & (_UINT32_(value) << CAN_NDAT1_ND25_Pos)) /* Assigment of value for ND25 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND26_Pos _UINT32_(26) /* (CAN_NDAT1) New Data 26 Position */ +#define CAN_NDAT1_ND26_Msk (_UINT32_(0x1) << CAN_NDAT1_ND26_Pos) /* (CAN_NDAT1) New Data 26 Mask */ +#define CAN_NDAT1_ND26(value) (CAN_NDAT1_ND26_Msk & (_UINT32_(value) << CAN_NDAT1_ND26_Pos)) /* Assigment of value for ND26 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND27_Pos _UINT32_(27) /* (CAN_NDAT1) New Data 27 Position */ +#define CAN_NDAT1_ND27_Msk (_UINT32_(0x1) << CAN_NDAT1_ND27_Pos) /* (CAN_NDAT1) New Data 27 Mask */ +#define CAN_NDAT1_ND27(value) (CAN_NDAT1_ND27_Msk & (_UINT32_(value) << CAN_NDAT1_ND27_Pos)) /* Assigment of value for ND27 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND28_Pos _UINT32_(28) /* (CAN_NDAT1) New Data 28 Position */ +#define CAN_NDAT1_ND28_Msk (_UINT32_(0x1) << CAN_NDAT1_ND28_Pos) /* (CAN_NDAT1) New Data 28 Mask */ +#define CAN_NDAT1_ND28(value) (CAN_NDAT1_ND28_Msk & (_UINT32_(value) << CAN_NDAT1_ND28_Pos)) /* Assigment of value for ND28 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND29_Pos _UINT32_(29) /* (CAN_NDAT1) New Data 29 Position */ +#define CAN_NDAT1_ND29_Msk (_UINT32_(0x1) << CAN_NDAT1_ND29_Pos) /* (CAN_NDAT1) New Data 29 Mask */ +#define CAN_NDAT1_ND29(value) (CAN_NDAT1_ND29_Msk & (_UINT32_(value) << CAN_NDAT1_ND29_Pos)) /* Assigment of value for ND29 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND30_Pos _UINT32_(30) /* (CAN_NDAT1) New Data 30 Position */ +#define CAN_NDAT1_ND30_Msk (_UINT32_(0x1) << CAN_NDAT1_ND30_Pos) /* (CAN_NDAT1) New Data 30 Mask */ +#define CAN_NDAT1_ND30(value) (CAN_NDAT1_ND30_Msk & (_UINT32_(value) << CAN_NDAT1_ND30_Pos)) /* Assigment of value for ND30 in the CAN_NDAT1 register */ +#define CAN_NDAT1_ND31_Pos _UINT32_(31) /* (CAN_NDAT1) New Data 31 Position */ +#define CAN_NDAT1_ND31_Msk (_UINT32_(0x1) << CAN_NDAT1_ND31_Pos) /* (CAN_NDAT1) New Data 31 Mask */ +#define CAN_NDAT1_ND31(value) (CAN_NDAT1_ND31_Msk & (_UINT32_(value) << CAN_NDAT1_ND31_Pos)) /* Assigment of value for ND31 in the CAN_NDAT1 register */ +#define CAN_NDAT1_Msk _UINT32_(0xFFFFFFFF) /* (CAN_NDAT1) Register Mask */ + +#define CAN_NDAT1_ND_Pos _UINT32_(0) /* (CAN_NDAT1 Position) New Data 3x */ +#define CAN_NDAT1_ND_Msk (_UINT32_(0xFFFFFFFF) << CAN_NDAT1_ND_Pos) /* (CAN_NDAT1 Mask) ND */ +#define CAN_NDAT1_ND(value) (CAN_NDAT1_ND_Msk & (_UINT32_(value) << CAN_NDAT1_ND_Pos)) + +/* -------- CAN_NDAT2 : (CAN Offset: 0x9C) (R/W 32) New Data 2 -------- */ +#define CAN_NDAT2_RESETVALUE _UINT32_(0x00) /* (CAN_NDAT2) New Data 2 Reset Value */ + +#define CAN_NDAT2_ND32_Pos _UINT32_(0) /* (CAN_NDAT2) New Data 32 Position */ +#define CAN_NDAT2_ND32_Msk (_UINT32_(0x1) << CAN_NDAT2_ND32_Pos) /* (CAN_NDAT2) New Data 32 Mask */ +#define CAN_NDAT2_ND32(value) (CAN_NDAT2_ND32_Msk & (_UINT32_(value) << CAN_NDAT2_ND32_Pos)) /* Assigment of value for ND32 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND33_Pos _UINT32_(1) /* (CAN_NDAT2) New Data 33 Position */ +#define CAN_NDAT2_ND33_Msk (_UINT32_(0x1) << CAN_NDAT2_ND33_Pos) /* (CAN_NDAT2) New Data 33 Mask */ +#define CAN_NDAT2_ND33(value) (CAN_NDAT2_ND33_Msk & (_UINT32_(value) << CAN_NDAT2_ND33_Pos)) /* Assigment of value for ND33 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND34_Pos _UINT32_(2) /* (CAN_NDAT2) New Data 34 Position */ +#define CAN_NDAT2_ND34_Msk (_UINT32_(0x1) << CAN_NDAT2_ND34_Pos) /* (CAN_NDAT2) New Data 34 Mask */ +#define CAN_NDAT2_ND34(value) (CAN_NDAT2_ND34_Msk & (_UINT32_(value) << CAN_NDAT2_ND34_Pos)) /* Assigment of value for ND34 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND35_Pos _UINT32_(3) /* (CAN_NDAT2) New Data 35 Position */ +#define CAN_NDAT2_ND35_Msk (_UINT32_(0x1) << CAN_NDAT2_ND35_Pos) /* (CAN_NDAT2) New Data 35 Mask */ +#define CAN_NDAT2_ND35(value) (CAN_NDAT2_ND35_Msk & (_UINT32_(value) << CAN_NDAT2_ND35_Pos)) /* Assigment of value for ND35 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND36_Pos _UINT32_(4) /* (CAN_NDAT2) New Data 36 Position */ +#define CAN_NDAT2_ND36_Msk (_UINT32_(0x1) << CAN_NDAT2_ND36_Pos) /* (CAN_NDAT2) New Data 36 Mask */ +#define CAN_NDAT2_ND36(value) (CAN_NDAT2_ND36_Msk & (_UINT32_(value) << CAN_NDAT2_ND36_Pos)) /* Assigment of value for ND36 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND37_Pos _UINT32_(5) /* (CAN_NDAT2) New Data 37 Position */ +#define CAN_NDAT2_ND37_Msk (_UINT32_(0x1) << CAN_NDAT2_ND37_Pos) /* (CAN_NDAT2) New Data 37 Mask */ +#define CAN_NDAT2_ND37(value) (CAN_NDAT2_ND37_Msk & (_UINT32_(value) << CAN_NDAT2_ND37_Pos)) /* Assigment of value for ND37 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND38_Pos _UINT32_(6) /* (CAN_NDAT2) New Data 38 Position */ +#define CAN_NDAT2_ND38_Msk (_UINT32_(0x1) << CAN_NDAT2_ND38_Pos) /* (CAN_NDAT2) New Data 38 Mask */ +#define CAN_NDAT2_ND38(value) (CAN_NDAT2_ND38_Msk & (_UINT32_(value) << CAN_NDAT2_ND38_Pos)) /* Assigment of value for ND38 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND39_Pos _UINT32_(7) /* (CAN_NDAT2) New Data 39 Position */ +#define CAN_NDAT2_ND39_Msk (_UINT32_(0x1) << CAN_NDAT2_ND39_Pos) /* (CAN_NDAT2) New Data 39 Mask */ +#define CAN_NDAT2_ND39(value) (CAN_NDAT2_ND39_Msk & (_UINT32_(value) << CAN_NDAT2_ND39_Pos)) /* Assigment of value for ND39 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND40_Pos _UINT32_(8) /* (CAN_NDAT2) New Data 40 Position */ +#define CAN_NDAT2_ND40_Msk (_UINT32_(0x1) << CAN_NDAT2_ND40_Pos) /* (CAN_NDAT2) New Data 40 Mask */ +#define CAN_NDAT2_ND40(value) (CAN_NDAT2_ND40_Msk & (_UINT32_(value) << CAN_NDAT2_ND40_Pos)) /* Assigment of value for ND40 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND41_Pos _UINT32_(9) /* (CAN_NDAT2) New Data 41 Position */ +#define CAN_NDAT2_ND41_Msk (_UINT32_(0x1) << CAN_NDAT2_ND41_Pos) /* (CAN_NDAT2) New Data 41 Mask */ +#define CAN_NDAT2_ND41(value) (CAN_NDAT2_ND41_Msk & (_UINT32_(value) << CAN_NDAT2_ND41_Pos)) /* Assigment of value for ND41 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND42_Pos _UINT32_(10) /* (CAN_NDAT2) New Data 42 Position */ +#define CAN_NDAT2_ND42_Msk (_UINT32_(0x1) << CAN_NDAT2_ND42_Pos) /* (CAN_NDAT2) New Data 42 Mask */ +#define CAN_NDAT2_ND42(value) (CAN_NDAT2_ND42_Msk & (_UINT32_(value) << CAN_NDAT2_ND42_Pos)) /* Assigment of value for ND42 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND43_Pos _UINT32_(11) /* (CAN_NDAT2) New Data 43 Position */ +#define CAN_NDAT2_ND43_Msk (_UINT32_(0x1) << CAN_NDAT2_ND43_Pos) /* (CAN_NDAT2) New Data 43 Mask */ +#define CAN_NDAT2_ND43(value) (CAN_NDAT2_ND43_Msk & (_UINT32_(value) << CAN_NDAT2_ND43_Pos)) /* Assigment of value for ND43 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND44_Pos _UINT32_(12) /* (CAN_NDAT2) New Data 44 Position */ +#define CAN_NDAT2_ND44_Msk (_UINT32_(0x1) << CAN_NDAT2_ND44_Pos) /* (CAN_NDAT2) New Data 44 Mask */ +#define CAN_NDAT2_ND44(value) (CAN_NDAT2_ND44_Msk & (_UINT32_(value) << CAN_NDAT2_ND44_Pos)) /* Assigment of value for ND44 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND45_Pos _UINT32_(13) /* (CAN_NDAT2) New Data 45 Position */ +#define CAN_NDAT2_ND45_Msk (_UINT32_(0x1) << CAN_NDAT2_ND45_Pos) /* (CAN_NDAT2) New Data 45 Mask */ +#define CAN_NDAT2_ND45(value) (CAN_NDAT2_ND45_Msk & (_UINT32_(value) << CAN_NDAT2_ND45_Pos)) /* Assigment of value for ND45 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND46_Pos _UINT32_(14) /* (CAN_NDAT2) New Data 46 Position */ +#define CAN_NDAT2_ND46_Msk (_UINT32_(0x1) << CAN_NDAT2_ND46_Pos) /* (CAN_NDAT2) New Data 46 Mask */ +#define CAN_NDAT2_ND46(value) (CAN_NDAT2_ND46_Msk & (_UINT32_(value) << CAN_NDAT2_ND46_Pos)) /* Assigment of value for ND46 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND47_Pos _UINT32_(15) /* (CAN_NDAT2) New Data 47 Position */ +#define CAN_NDAT2_ND47_Msk (_UINT32_(0x1) << CAN_NDAT2_ND47_Pos) /* (CAN_NDAT2) New Data 47 Mask */ +#define CAN_NDAT2_ND47(value) (CAN_NDAT2_ND47_Msk & (_UINT32_(value) << CAN_NDAT2_ND47_Pos)) /* Assigment of value for ND47 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND48_Pos _UINT32_(16) /* (CAN_NDAT2) New Data 48 Position */ +#define CAN_NDAT2_ND48_Msk (_UINT32_(0x1) << CAN_NDAT2_ND48_Pos) /* (CAN_NDAT2) New Data 48 Mask */ +#define CAN_NDAT2_ND48(value) (CAN_NDAT2_ND48_Msk & (_UINT32_(value) << CAN_NDAT2_ND48_Pos)) /* Assigment of value for ND48 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND49_Pos _UINT32_(17) /* (CAN_NDAT2) New Data 49 Position */ +#define CAN_NDAT2_ND49_Msk (_UINT32_(0x1) << CAN_NDAT2_ND49_Pos) /* (CAN_NDAT2) New Data 49 Mask */ +#define CAN_NDAT2_ND49(value) (CAN_NDAT2_ND49_Msk & (_UINT32_(value) << CAN_NDAT2_ND49_Pos)) /* Assigment of value for ND49 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND50_Pos _UINT32_(18) /* (CAN_NDAT2) New Data 50 Position */ +#define CAN_NDAT2_ND50_Msk (_UINT32_(0x1) << CAN_NDAT2_ND50_Pos) /* (CAN_NDAT2) New Data 50 Mask */ +#define CAN_NDAT2_ND50(value) (CAN_NDAT2_ND50_Msk & (_UINT32_(value) << CAN_NDAT2_ND50_Pos)) /* Assigment of value for ND50 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND51_Pos _UINT32_(19) /* (CAN_NDAT2) New Data 51 Position */ +#define CAN_NDAT2_ND51_Msk (_UINT32_(0x1) << CAN_NDAT2_ND51_Pos) /* (CAN_NDAT2) New Data 51 Mask */ +#define CAN_NDAT2_ND51(value) (CAN_NDAT2_ND51_Msk & (_UINT32_(value) << CAN_NDAT2_ND51_Pos)) /* Assigment of value for ND51 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND52_Pos _UINT32_(20) /* (CAN_NDAT2) New Data 52 Position */ +#define CAN_NDAT2_ND52_Msk (_UINT32_(0x1) << CAN_NDAT2_ND52_Pos) /* (CAN_NDAT2) New Data 52 Mask */ +#define CAN_NDAT2_ND52(value) (CAN_NDAT2_ND52_Msk & (_UINT32_(value) << CAN_NDAT2_ND52_Pos)) /* Assigment of value for ND52 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND53_Pos _UINT32_(21) /* (CAN_NDAT2) New Data 53 Position */ +#define CAN_NDAT2_ND53_Msk (_UINT32_(0x1) << CAN_NDAT2_ND53_Pos) /* (CAN_NDAT2) New Data 53 Mask */ +#define CAN_NDAT2_ND53(value) (CAN_NDAT2_ND53_Msk & (_UINT32_(value) << CAN_NDAT2_ND53_Pos)) /* Assigment of value for ND53 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND54_Pos _UINT32_(22) /* (CAN_NDAT2) New Data 54 Position */ +#define CAN_NDAT2_ND54_Msk (_UINT32_(0x1) << CAN_NDAT2_ND54_Pos) /* (CAN_NDAT2) New Data 54 Mask */ +#define CAN_NDAT2_ND54(value) (CAN_NDAT2_ND54_Msk & (_UINT32_(value) << CAN_NDAT2_ND54_Pos)) /* Assigment of value for ND54 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND55_Pos _UINT32_(23) /* (CAN_NDAT2) New Data 55 Position */ +#define CAN_NDAT2_ND55_Msk (_UINT32_(0x1) << CAN_NDAT2_ND55_Pos) /* (CAN_NDAT2) New Data 55 Mask */ +#define CAN_NDAT2_ND55(value) (CAN_NDAT2_ND55_Msk & (_UINT32_(value) << CAN_NDAT2_ND55_Pos)) /* Assigment of value for ND55 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND56_Pos _UINT32_(24) /* (CAN_NDAT2) New Data 56 Position */ +#define CAN_NDAT2_ND56_Msk (_UINT32_(0x1) << CAN_NDAT2_ND56_Pos) /* (CAN_NDAT2) New Data 56 Mask */ +#define CAN_NDAT2_ND56(value) (CAN_NDAT2_ND56_Msk & (_UINT32_(value) << CAN_NDAT2_ND56_Pos)) /* Assigment of value for ND56 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND57_Pos _UINT32_(25) /* (CAN_NDAT2) New Data 57 Position */ +#define CAN_NDAT2_ND57_Msk (_UINT32_(0x1) << CAN_NDAT2_ND57_Pos) /* (CAN_NDAT2) New Data 57 Mask */ +#define CAN_NDAT2_ND57(value) (CAN_NDAT2_ND57_Msk & (_UINT32_(value) << CAN_NDAT2_ND57_Pos)) /* Assigment of value for ND57 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND58_Pos _UINT32_(26) /* (CAN_NDAT2) New Data 58 Position */ +#define CAN_NDAT2_ND58_Msk (_UINT32_(0x1) << CAN_NDAT2_ND58_Pos) /* (CAN_NDAT2) New Data 58 Mask */ +#define CAN_NDAT2_ND58(value) (CAN_NDAT2_ND58_Msk & (_UINT32_(value) << CAN_NDAT2_ND58_Pos)) /* Assigment of value for ND58 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND59_Pos _UINT32_(27) /* (CAN_NDAT2) New Data 59 Position */ +#define CAN_NDAT2_ND59_Msk (_UINT32_(0x1) << CAN_NDAT2_ND59_Pos) /* (CAN_NDAT2) New Data 59 Mask */ +#define CAN_NDAT2_ND59(value) (CAN_NDAT2_ND59_Msk & (_UINT32_(value) << CAN_NDAT2_ND59_Pos)) /* Assigment of value for ND59 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND60_Pos _UINT32_(28) /* (CAN_NDAT2) New Data 60 Position */ +#define CAN_NDAT2_ND60_Msk (_UINT32_(0x1) << CAN_NDAT2_ND60_Pos) /* (CAN_NDAT2) New Data 60 Mask */ +#define CAN_NDAT2_ND60(value) (CAN_NDAT2_ND60_Msk & (_UINT32_(value) << CAN_NDAT2_ND60_Pos)) /* Assigment of value for ND60 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND61_Pos _UINT32_(29) /* (CAN_NDAT2) New Data 61 Position */ +#define CAN_NDAT2_ND61_Msk (_UINT32_(0x1) << CAN_NDAT2_ND61_Pos) /* (CAN_NDAT2) New Data 61 Mask */ +#define CAN_NDAT2_ND61(value) (CAN_NDAT2_ND61_Msk & (_UINT32_(value) << CAN_NDAT2_ND61_Pos)) /* Assigment of value for ND61 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND62_Pos _UINT32_(30) /* (CAN_NDAT2) New Data 62 Position */ +#define CAN_NDAT2_ND62_Msk (_UINT32_(0x1) << CAN_NDAT2_ND62_Pos) /* (CAN_NDAT2) New Data 62 Mask */ +#define CAN_NDAT2_ND62(value) (CAN_NDAT2_ND62_Msk & (_UINT32_(value) << CAN_NDAT2_ND62_Pos)) /* Assigment of value for ND62 in the CAN_NDAT2 register */ +#define CAN_NDAT2_ND63_Pos _UINT32_(31) /* (CAN_NDAT2) New Data 63 Position */ +#define CAN_NDAT2_ND63_Msk (_UINT32_(0x1) << CAN_NDAT2_ND63_Pos) /* (CAN_NDAT2) New Data 63 Mask */ +#define CAN_NDAT2_ND63(value) (CAN_NDAT2_ND63_Msk & (_UINT32_(value) << CAN_NDAT2_ND63_Pos)) /* Assigment of value for ND63 in the CAN_NDAT2 register */ +#define CAN_NDAT2_Msk _UINT32_(0xFFFFFFFF) /* (CAN_NDAT2) Register Mask */ + +#define CAN_NDAT2_ND_Pos _UINT32_(0) /* (CAN_NDAT2 Position) New Data 63 */ +#define CAN_NDAT2_ND_Msk (_UINT32_(0xFFFFFFFF) << CAN_NDAT2_ND_Pos) /* (CAN_NDAT2 Mask) ND */ +#define CAN_NDAT2_ND(value) (CAN_NDAT2_ND_Msk & (_UINT32_(value) << CAN_NDAT2_ND_Pos)) + +/* -------- CAN_RXF0C : (CAN Offset: 0xA0) (R/W 32) Rx FIFO 0 Configuration -------- */ +#define CAN_RXF0C_RESETVALUE _UINT32_(0x00) /* (CAN_RXF0C) Rx FIFO 0 Configuration Reset Value */ + +#define CAN_RXF0C_F0SA_Pos _UINT32_(0) /* (CAN_RXF0C) Rx FIFO 0 Start Address Position */ +#define CAN_RXF0C_F0SA_Msk (_UINT32_(0xFFFF) << CAN_RXF0C_F0SA_Pos) /* (CAN_RXF0C) Rx FIFO 0 Start Address Mask */ +#define CAN_RXF0C_F0SA(value) (CAN_RXF0C_F0SA_Msk & (_UINT32_(value) << CAN_RXF0C_F0SA_Pos)) /* Assigment of value for F0SA in the CAN_RXF0C register */ +#define CAN_RXF0C_F0S_Pos _UINT32_(16) /* (CAN_RXF0C) Rx FIFO 0 Size Position */ +#define CAN_RXF0C_F0S_Msk (_UINT32_(0x7F) << CAN_RXF0C_F0S_Pos) /* (CAN_RXF0C) Rx FIFO 0 Size Mask */ +#define CAN_RXF0C_F0S(value) (CAN_RXF0C_F0S_Msk & (_UINT32_(value) << CAN_RXF0C_F0S_Pos)) /* Assigment of value for F0S in the CAN_RXF0C register */ +#define CAN_RXF0C_F0WM_Pos _UINT32_(24) /* (CAN_RXF0C) Rx FIFO 0 Watermark Position */ +#define CAN_RXF0C_F0WM_Msk (_UINT32_(0x7F) << CAN_RXF0C_F0WM_Pos) /* (CAN_RXF0C) Rx FIFO 0 Watermark Mask */ +#define CAN_RXF0C_F0WM(value) (CAN_RXF0C_F0WM_Msk & (_UINT32_(value) << CAN_RXF0C_F0WM_Pos)) /* Assigment of value for F0WM in the CAN_RXF0C register */ +#define CAN_RXF0C_F0OM_Pos _UINT32_(31) /* (CAN_RXF0C) FIFO 0 Operation Mode Position */ +#define CAN_RXF0C_F0OM_Msk (_UINT32_(0x1) << CAN_RXF0C_F0OM_Pos) /* (CAN_RXF0C) FIFO 0 Operation Mode Mask */ +#define CAN_RXF0C_F0OM(value) (CAN_RXF0C_F0OM_Msk & (_UINT32_(value) << CAN_RXF0C_F0OM_Pos)) /* Assigment of value for F0OM in the CAN_RXF0C register */ +#define CAN_RXF0C_Msk _UINT32_(0xFF7FFFFF) /* (CAN_RXF0C) Register Mask */ + + +/* -------- CAN_RXF0S : (CAN Offset: 0xA4) ( R/ 32) Rx FIFO 0 Status -------- */ +#define CAN_RXF0S_RESETVALUE _UINT32_(0x00) /* (CAN_RXF0S) Rx FIFO 0 Status Reset Value */ + +#define CAN_RXF0S_F0FL_Pos _UINT32_(0) /* (CAN_RXF0S) Rx FIFO 0 Fill Level Position */ +#define CAN_RXF0S_F0FL_Msk (_UINT32_(0x7F) << CAN_RXF0S_F0FL_Pos) /* (CAN_RXF0S) Rx FIFO 0 Fill Level Mask */ +#define CAN_RXF0S_F0FL(value) (CAN_RXF0S_F0FL_Msk & (_UINT32_(value) << CAN_RXF0S_F0FL_Pos)) /* Assigment of value for F0FL in the CAN_RXF0S register */ +#define CAN_RXF0S_F0GI_Pos _UINT32_(8) /* (CAN_RXF0S) Rx FIFO 0 Get Index Position */ +#define CAN_RXF0S_F0GI_Msk (_UINT32_(0x3F) << CAN_RXF0S_F0GI_Pos) /* (CAN_RXF0S) Rx FIFO 0 Get Index Mask */ +#define CAN_RXF0S_F0GI(value) (CAN_RXF0S_F0GI_Msk & (_UINT32_(value) << CAN_RXF0S_F0GI_Pos)) /* Assigment of value for F0GI in the CAN_RXF0S register */ +#define CAN_RXF0S_F0PI_Pos _UINT32_(16) /* (CAN_RXF0S) Rx FIFO 0 Put Index Position */ +#define CAN_RXF0S_F0PI_Msk (_UINT32_(0x3F) << CAN_RXF0S_F0PI_Pos) /* (CAN_RXF0S) Rx FIFO 0 Put Index Mask */ +#define CAN_RXF0S_F0PI(value) (CAN_RXF0S_F0PI_Msk & (_UINT32_(value) << CAN_RXF0S_F0PI_Pos)) /* Assigment of value for F0PI in the CAN_RXF0S register */ +#define CAN_RXF0S_F0F_Pos _UINT32_(24) /* (CAN_RXF0S) Rx FIFO 0 Full Position */ +#define CAN_RXF0S_F0F_Msk (_UINT32_(0x1) << CAN_RXF0S_F0F_Pos) /* (CAN_RXF0S) Rx FIFO 0 Full Mask */ +#define CAN_RXF0S_F0F(value) (CAN_RXF0S_F0F_Msk & (_UINT32_(value) << CAN_RXF0S_F0F_Pos)) /* Assigment of value for F0F in the CAN_RXF0S register */ +#define CAN_RXF0S_RF0L_Pos _UINT32_(25) /* (CAN_RXF0S) Rx FIFO 0 Message Lost Position */ +#define CAN_RXF0S_RF0L_Msk (_UINT32_(0x1) << CAN_RXF0S_RF0L_Pos) /* (CAN_RXF0S) Rx FIFO 0 Message Lost Mask */ +#define CAN_RXF0S_RF0L(value) (CAN_RXF0S_RF0L_Msk & (_UINT32_(value) << CAN_RXF0S_RF0L_Pos)) /* Assigment of value for RF0L in the CAN_RXF0S register */ +#define CAN_RXF0S_Msk _UINT32_(0x033F3F7F) /* (CAN_RXF0S) Register Mask */ + + +/* -------- CAN_RXF0A : (CAN Offset: 0xA8) (R/W 32) Rx FIFO 0 Acknowledge -------- */ +#define CAN_RXF0A_RESETVALUE _UINT32_(0x00) /* (CAN_RXF0A) Rx FIFO 0 Acknowledge Reset Value */ + +#define CAN_RXF0A_F0AI_Pos _UINT32_(0) /* (CAN_RXF0A) Rx FIFO 0 Acknowledge Index Position */ +#define CAN_RXF0A_F0AI_Msk (_UINT32_(0x3F) << CAN_RXF0A_F0AI_Pos) /* (CAN_RXF0A) Rx FIFO 0 Acknowledge Index Mask */ +#define CAN_RXF0A_F0AI(value) (CAN_RXF0A_F0AI_Msk & (_UINT32_(value) << CAN_RXF0A_F0AI_Pos)) /* Assigment of value for F0AI in the CAN_RXF0A register */ +#define CAN_RXF0A_Msk _UINT32_(0x0000003F) /* (CAN_RXF0A) Register Mask */ + + +/* -------- CAN_RXBC : (CAN Offset: 0xAC) (R/W 32) Rx Buffer Configuration -------- */ +#define CAN_RXBC_RESETVALUE _UINT32_(0x00) /* (CAN_RXBC) Rx Buffer Configuration Reset Value */ + +#define CAN_RXBC_RBSA_Pos _UINT32_(0) /* (CAN_RXBC) Rx Buffer Start Address Position */ +#define CAN_RXBC_RBSA_Msk (_UINT32_(0xFFFF) << CAN_RXBC_RBSA_Pos) /* (CAN_RXBC) Rx Buffer Start Address Mask */ +#define CAN_RXBC_RBSA(value) (CAN_RXBC_RBSA_Msk & (_UINT32_(value) << CAN_RXBC_RBSA_Pos)) /* Assigment of value for RBSA in the CAN_RXBC register */ +#define CAN_RXBC_Msk _UINT32_(0x0000FFFF) /* (CAN_RXBC) Register Mask */ + + +/* -------- CAN_RXF1C : (CAN Offset: 0xB0) (R/W 32) Rx FIFO 1 Configuration -------- */ +#define CAN_RXF1C_RESETVALUE _UINT32_(0x00) /* (CAN_RXF1C) Rx FIFO 1 Configuration Reset Value */ + +#define CAN_RXF1C_F1SA_Pos _UINT32_(0) /* (CAN_RXF1C) Rx FIFO 1 Start Address Position */ +#define CAN_RXF1C_F1SA_Msk (_UINT32_(0xFFFF) << CAN_RXF1C_F1SA_Pos) /* (CAN_RXF1C) Rx FIFO 1 Start Address Mask */ +#define CAN_RXF1C_F1SA(value) (CAN_RXF1C_F1SA_Msk & (_UINT32_(value) << CAN_RXF1C_F1SA_Pos)) /* Assigment of value for F1SA in the CAN_RXF1C register */ +#define CAN_RXF1C_F1S_Pos _UINT32_(16) /* (CAN_RXF1C) Rx FIFO 1 Size Position */ +#define CAN_RXF1C_F1S_Msk (_UINT32_(0x7F) << CAN_RXF1C_F1S_Pos) /* (CAN_RXF1C) Rx FIFO 1 Size Mask */ +#define CAN_RXF1C_F1S(value) (CAN_RXF1C_F1S_Msk & (_UINT32_(value) << CAN_RXF1C_F1S_Pos)) /* Assigment of value for F1S in the CAN_RXF1C register */ +#define CAN_RXF1C_F1WM_Pos _UINT32_(24) /* (CAN_RXF1C) Rx FIFO 1 Watermark Position */ +#define CAN_RXF1C_F1WM_Msk (_UINT32_(0x7F) << CAN_RXF1C_F1WM_Pos) /* (CAN_RXF1C) Rx FIFO 1 Watermark Mask */ +#define CAN_RXF1C_F1WM(value) (CAN_RXF1C_F1WM_Msk & (_UINT32_(value) << CAN_RXF1C_F1WM_Pos)) /* Assigment of value for F1WM in the CAN_RXF1C register */ +#define CAN_RXF1C_F1OM_Pos _UINT32_(31) /* (CAN_RXF1C) FIFO 1 Operation Mode Position */ +#define CAN_RXF1C_F1OM_Msk (_UINT32_(0x1) << CAN_RXF1C_F1OM_Pos) /* (CAN_RXF1C) FIFO 1 Operation Mode Mask */ +#define CAN_RXF1C_F1OM(value) (CAN_RXF1C_F1OM_Msk & (_UINT32_(value) << CAN_RXF1C_F1OM_Pos)) /* Assigment of value for F1OM in the CAN_RXF1C register */ +#define CAN_RXF1C_Msk _UINT32_(0xFF7FFFFF) /* (CAN_RXF1C) Register Mask */ + + +/* -------- CAN_RXF1S : (CAN Offset: 0xB4) ( R/ 32) Rx FIFO 1 Status -------- */ +#define CAN_RXF1S_RESETVALUE _UINT32_(0x00) /* (CAN_RXF1S) Rx FIFO 1 Status Reset Value */ + +#define CAN_RXF1S_F1FL_Pos _UINT32_(0) /* (CAN_RXF1S) Rx FIFO 1 Fill Level Position */ +#define CAN_RXF1S_F1FL_Msk (_UINT32_(0x7F) << CAN_RXF1S_F1FL_Pos) /* (CAN_RXF1S) Rx FIFO 1 Fill Level Mask */ +#define CAN_RXF1S_F1FL(value) (CAN_RXF1S_F1FL_Msk & (_UINT32_(value) << CAN_RXF1S_F1FL_Pos)) /* Assigment of value for F1FL in the CAN_RXF1S register */ +#define CAN_RXF1S_F1GI_Pos _UINT32_(8) /* (CAN_RXF1S) Rx FIFO 1 Get Index Position */ +#define CAN_RXF1S_F1GI_Msk (_UINT32_(0x3F) << CAN_RXF1S_F1GI_Pos) /* (CAN_RXF1S) Rx FIFO 1 Get Index Mask */ +#define CAN_RXF1S_F1GI(value) (CAN_RXF1S_F1GI_Msk & (_UINT32_(value) << CAN_RXF1S_F1GI_Pos)) /* Assigment of value for F1GI in the CAN_RXF1S register */ +#define CAN_RXF1S_F1PI_Pos _UINT32_(16) /* (CAN_RXF1S) Rx FIFO 1 Put Index Position */ +#define CAN_RXF1S_F1PI_Msk (_UINT32_(0x3F) << CAN_RXF1S_F1PI_Pos) /* (CAN_RXF1S) Rx FIFO 1 Put Index Mask */ +#define CAN_RXF1S_F1PI(value) (CAN_RXF1S_F1PI_Msk & (_UINT32_(value) << CAN_RXF1S_F1PI_Pos)) /* Assigment of value for F1PI in the CAN_RXF1S register */ +#define CAN_RXF1S_F1F_Pos _UINT32_(24) /* (CAN_RXF1S) Rx FIFO 1 Full Position */ +#define CAN_RXF1S_F1F_Msk (_UINT32_(0x1) << CAN_RXF1S_F1F_Pos) /* (CAN_RXF1S) Rx FIFO 1 Full Mask */ +#define CAN_RXF1S_F1F(value) (CAN_RXF1S_F1F_Msk & (_UINT32_(value) << CAN_RXF1S_F1F_Pos)) /* Assigment of value for F1F in the CAN_RXF1S register */ +#define CAN_RXF1S_RF1L_Pos _UINT32_(25) /* (CAN_RXF1S) Rx FIFO 1 Message Lost Position */ +#define CAN_RXF1S_RF1L_Msk (_UINT32_(0x1) << CAN_RXF1S_RF1L_Pos) /* (CAN_RXF1S) Rx FIFO 1 Message Lost Mask */ +#define CAN_RXF1S_RF1L(value) (CAN_RXF1S_RF1L_Msk & (_UINT32_(value) << CAN_RXF1S_RF1L_Pos)) /* Assigment of value for RF1L in the CAN_RXF1S register */ +#define CAN_RXF1S_DMS_Pos _UINT32_(30) /* (CAN_RXF1S) Debug Message Status Position */ +#define CAN_RXF1S_DMS_Msk (_UINT32_(0x3) << CAN_RXF1S_DMS_Pos) /* (CAN_RXF1S) Debug Message Status Mask */ +#define CAN_RXF1S_DMS(value) (CAN_RXF1S_DMS_Msk & (_UINT32_(value) << CAN_RXF1S_DMS_Pos)) /* Assigment of value for DMS in the CAN_RXF1S register */ +#define CAN_RXF1S_DMS_IDLE_Val _UINT32_(0x0) /* (CAN_RXF1S) Idle state */ +#define CAN_RXF1S_DMS_DBGA_Val _UINT32_(0x1) /* (CAN_RXF1S) Debug message A received */ +#define CAN_RXF1S_DMS_DBGB_Val _UINT32_(0x2) /* (CAN_RXF1S) Debug message A/B received */ +#define CAN_RXF1S_DMS_DBGC_Val _UINT32_(0x3) /* (CAN_RXF1S) Debug message A/B/C received, DMA request set */ +#define CAN_RXF1S_DMS_IDLE (CAN_RXF1S_DMS_IDLE_Val << CAN_RXF1S_DMS_Pos) /* (CAN_RXF1S) Idle state Position */ +#define CAN_RXF1S_DMS_DBGA (CAN_RXF1S_DMS_DBGA_Val << CAN_RXF1S_DMS_Pos) /* (CAN_RXF1S) Debug message A received Position */ +#define CAN_RXF1S_DMS_DBGB (CAN_RXF1S_DMS_DBGB_Val << CAN_RXF1S_DMS_Pos) /* (CAN_RXF1S) Debug message A/B received Position */ +#define CAN_RXF1S_DMS_DBGC (CAN_RXF1S_DMS_DBGC_Val << CAN_RXF1S_DMS_Pos) /* (CAN_RXF1S) Debug message A/B/C received, DMA request set Position */ +#define CAN_RXF1S_Msk _UINT32_(0xC33F3F7F) /* (CAN_RXF1S) Register Mask */ + + +/* -------- CAN_RXF1A : (CAN Offset: 0xB8) (R/W 32) Rx FIFO 1 Acknowledge -------- */ +#define CAN_RXF1A_RESETVALUE _UINT32_(0x00) /* (CAN_RXF1A) Rx FIFO 1 Acknowledge Reset Value */ + +#define CAN_RXF1A_F1AI_Pos _UINT32_(0) /* (CAN_RXF1A) Rx FIFO 1 Acknowledge Index Position */ +#define CAN_RXF1A_F1AI_Msk (_UINT32_(0x3F) << CAN_RXF1A_F1AI_Pos) /* (CAN_RXF1A) Rx FIFO 1 Acknowledge Index Mask */ +#define CAN_RXF1A_F1AI(value) (CAN_RXF1A_F1AI_Msk & (_UINT32_(value) << CAN_RXF1A_F1AI_Pos)) /* Assigment of value for F1AI in the CAN_RXF1A register */ +#define CAN_RXF1A_Msk _UINT32_(0x0000003F) /* (CAN_RXF1A) Register Mask */ + + +/* -------- CAN_RXESC : (CAN Offset: 0xBC) (R/W 32) Rx Buffer / FIFO Element Size Configuration -------- */ +#define CAN_RXESC_RESETVALUE _UINT32_(0x00) /* (CAN_RXESC) Rx Buffer / FIFO Element Size Configuration Reset Value */ + +#define CAN_RXESC_F0DS_Pos _UINT32_(0) /* (CAN_RXESC) Rx FIFO 0 Data Field Size Position */ +#define CAN_RXESC_F0DS_Msk (_UINT32_(0x7) << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) Rx FIFO 0 Data Field Size Mask */ +#define CAN_RXESC_F0DS(value) (CAN_RXESC_F0DS_Msk & (_UINT32_(value) << CAN_RXESC_F0DS_Pos)) /* Assigment of value for F0DS in the CAN_RXESC register */ +#define CAN_RXESC_F0DS_DATA8_Val _UINT32_(0x0) /* (CAN_RXESC) 8 byte data field */ +#define CAN_RXESC_F0DS_DATA12_Val _UINT32_(0x1) /* (CAN_RXESC) 12 byte data field */ +#define CAN_RXESC_F0DS_DATA16_Val _UINT32_(0x2) /* (CAN_RXESC) 16 byte data field */ +#define CAN_RXESC_F0DS_DATA20_Val _UINT32_(0x3) /* (CAN_RXESC) 20 byte data field */ +#define CAN_RXESC_F0DS_DATA24_Val _UINT32_(0x4) /* (CAN_RXESC) 24 byte data field */ +#define CAN_RXESC_F0DS_DATA32_Val _UINT32_(0x5) /* (CAN_RXESC) 32 byte data field */ +#define CAN_RXESC_F0DS_DATA48_Val _UINT32_(0x6) /* (CAN_RXESC) 48 byte data field */ +#define CAN_RXESC_F0DS_DATA64_Val _UINT32_(0x7) /* (CAN_RXESC) 64 byte data field */ +#define CAN_RXESC_F0DS_DATA8 (CAN_RXESC_F0DS_DATA8_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 8 byte data field Position */ +#define CAN_RXESC_F0DS_DATA12 (CAN_RXESC_F0DS_DATA12_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 12 byte data field Position */ +#define CAN_RXESC_F0DS_DATA16 (CAN_RXESC_F0DS_DATA16_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 16 byte data field Position */ +#define CAN_RXESC_F0DS_DATA20 (CAN_RXESC_F0DS_DATA20_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 20 byte data field Position */ +#define CAN_RXESC_F0DS_DATA24 (CAN_RXESC_F0DS_DATA24_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 24 byte data field Position */ +#define CAN_RXESC_F0DS_DATA32 (CAN_RXESC_F0DS_DATA32_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 32 byte data field Position */ +#define CAN_RXESC_F0DS_DATA48 (CAN_RXESC_F0DS_DATA48_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 48 byte data field Position */ +#define CAN_RXESC_F0DS_DATA64 (CAN_RXESC_F0DS_DATA64_Val << CAN_RXESC_F0DS_Pos) /* (CAN_RXESC) 64 byte data field Position */ +#define CAN_RXESC_F1DS_Pos _UINT32_(4) /* (CAN_RXESC) Rx FIFO 1 Data Field Size Position */ +#define CAN_RXESC_F1DS_Msk (_UINT32_(0x7) << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) Rx FIFO 1 Data Field Size Mask */ +#define CAN_RXESC_F1DS(value) (CAN_RXESC_F1DS_Msk & (_UINT32_(value) << CAN_RXESC_F1DS_Pos)) /* Assigment of value for F1DS in the CAN_RXESC register */ +#define CAN_RXESC_F1DS_DATA8_Val _UINT32_(0x0) /* (CAN_RXESC) 8 byte data field */ +#define CAN_RXESC_F1DS_DATA12_Val _UINT32_(0x1) /* (CAN_RXESC) 12 byte data field */ +#define CAN_RXESC_F1DS_DATA16_Val _UINT32_(0x2) /* (CAN_RXESC) 16 byte data field */ +#define CAN_RXESC_F1DS_DATA20_Val _UINT32_(0x3) /* (CAN_RXESC) 20 byte data field */ +#define CAN_RXESC_F1DS_DATA24_Val _UINT32_(0x4) /* (CAN_RXESC) 24 byte data field */ +#define CAN_RXESC_F1DS_DATA32_Val _UINT32_(0x5) /* (CAN_RXESC) 32 byte data field */ +#define CAN_RXESC_F1DS_DATA48_Val _UINT32_(0x6) /* (CAN_RXESC) 48 byte data field */ +#define CAN_RXESC_F1DS_DATA64_Val _UINT32_(0x7) /* (CAN_RXESC) 64 byte data field */ +#define CAN_RXESC_F1DS_DATA8 (CAN_RXESC_F1DS_DATA8_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 8 byte data field Position */ +#define CAN_RXESC_F1DS_DATA12 (CAN_RXESC_F1DS_DATA12_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 12 byte data field Position */ +#define CAN_RXESC_F1DS_DATA16 (CAN_RXESC_F1DS_DATA16_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 16 byte data field Position */ +#define CAN_RXESC_F1DS_DATA20 (CAN_RXESC_F1DS_DATA20_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 20 byte data field Position */ +#define CAN_RXESC_F1DS_DATA24 (CAN_RXESC_F1DS_DATA24_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 24 byte data field Position */ +#define CAN_RXESC_F1DS_DATA32 (CAN_RXESC_F1DS_DATA32_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 32 byte data field Position */ +#define CAN_RXESC_F1DS_DATA48 (CAN_RXESC_F1DS_DATA48_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 48 byte data field Position */ +#define CAN_RXESC_F1DS_DATA64 (CAN_RXESC_F1DS_DATA64_Val << CAN_RXESC_F1DS_Pos) /* (CAN_RXESC) 64 byte data field Position */ +#define CAN_RXESC_RBDS_Pos _UINT32_(8) /* (CAN_RXESC) Rx Buffer Data Field Size Position */ +#define CAN_RXESC_RBDS_Msk (_UINT32_(0x7) << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) Rx Buffer Data Field Size Mask */ +#define CAN_RXESC_RBDS(value) (CAN_RXESC_RBDS_Msk & (_UINT32_(value) << CAN_RXESC_RBDS_Pos)) /* Assigment of value for RBDS in the CAN_RXESC register */ +#define CAN_RXESC_RBDS_DATA8_Val _UINT32_(0x0) /* (CAN_RXESC) 8 byte data field */ +#define CAN_RXESC_RBDS_DATA12_Val _UINT32_(0x1) /* (CAN_RXESC) 12 byte data field */ +#define CAN_RXESC_RBDS_DATA16_Val _UINT32_(0x2) /* (CAN_RXESC) 16 byte data field */ +#define CAN_RXESC_RBDS_DATA20_Val _UINT32_(0x3) /* (CAN_RXESC) 20 byte data field */ +#define CAN_RXESC_RBDS_DATA24_Val _UINT32_(0x4) /* (CAN_RXESC) 24 byte data field */ +#define CAN_RXESC_RBDS_DATA32_Val _UINT32_(0x5) /* (CAN_RXESC) 32 byte data field */ +#define CAN_RXESC_RBDS_DATA48_Val _UINT32_(0x6) /* (CAN_RXESC) 48 byte data field */ +#define CAN_RXESC_RBDS_DATA64_Val _UINT32_(0x7) /* (CAN_RXESC) 64 byte data field */ +#define CAN_RXESC_RBDS_DATA8 (CAN_RXESC_RBDS_DATA8_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 8 byte data field Position */ +#define CAN_RXESC_RBDS_DATA12 (CAN_RXESC_RBDS_DATA12_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 12 byte data field Position */ +#define CAN_RXESC_RBDS_DATA16 (CAN_RXESC_RBDS_DATA16_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 16 byte data field Position */ +#define CAN_RXESC_RBDS_DATA20 (CAN_RXESC_RBDS_DATA20_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 20 byte data field Position */ +#define CAN_RXESC_RBDS_DATA24 (CAN_RXESC_RBDS_DATA24_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 24 byte data field Position */ +#define CAN_RXESC_RBDS_DATA32 (CAN_RXESC_RBDS_DATA32_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 32 byte data field Position */ +#define CAN_RXESC_RBDS_DATA48 (CAN_RXESC_RBDS_DATA48_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 48 byte data field Position */ +#define CAN_RXESC_RBDS_DATA64 (CAN_RXESC_RBDS_DATA64_Val << CAN_RXESC_RBDS_Pos) /* (CAN_RXESC) 64 byte data field Position */ +#define CAN_RXESC_Msk _UINT32_(0x00000777) /* (CAN_RXESC) Register Mask */ + + +/* -------- CAN_TXBC : (CAN Offset: 0xC0) (R/W 32) Tx Buffer Configuration -------- */ +#define CAN_TXBC_RESETVALUE _UINT32_(0x00) /* (CAN_TXBC) Tx Buffer Configuration Reset Value */ + +#define CAN_TXBC_TBSA_Pos _UINT32_(0) /* (CAN_TXBC) Tx Buffers Start Address Position */ +#define CAN_TXBC_TBSA_Msk (_UINT32_(0xFFFF) << CAN_TXBC_TBSA_Pos) /* (CAN_TXBC) Tx Buffers Start Address Mask */ +#define CAN_TXBC_TBSA(value) (CAN_TXBC_TBSA_Msk & (_UINT32_(value) << CAN_TXBC_TBSA_Pos)) /* Assigment of value for TBSA in the CAN_TXBC register */ +#define CAN_TXBC_NDTB_Pos _UINT32_(16) /* (CAN_TXBC) Number of Dedicated Transmit Buffers Position */ +#define CAN_TXBC_NDTB_Msk (_UINT32_(0x3F) << CAN_TXBC_NDTB_Pos) /* (CAN_TXBC) Number of Dedicated Transmit Buffers Mask */ +#define CAN_TXBC_NDTB(value) (CAN_TXBC_NDTB_Msk & (_UINT32_(value) << CAN_TXBC_NDTB_Pos)) /* Assigment of value for NDTB in the CAN_TXBC register */ +#define CAN_TXBC_TFQS_Pos _UINT32_(24) /* (CAN_TXBC) Transmit FIFO/Queue Size Position */ +#define CAN_TXBC_TFQS_Msk (_UINT32_(0x3F) << CAN_TXBC_TFQS_Pos) /* (CAN_TXBC) Transmit FIFO/Queue Size Mask */ +#define CAN_TXBC_TFQS(value) (CAN_TXBC_TFQS_Msk & (_UINT32_(value) << CAN_TXBC_TFQS_Pos)) /* Assigment of value for TFQS in the CAN_TXBC register */ +#define CAN_TXBC_TFQM_Pos _UINT32_(30) /* (CAN_TXBC) Tx FIFO/Queue Mode Position */ +#define CAN_TXBC_TFQM_Msk (_UINT32_(0x1) << CAN_TXBC_TFQM_Pos) /* (CAN_TXBC) Tx FIFO/Queue Mode Mask */ +#define CAN_TXBC_TFQM(value) (CAN_TXBC_TFQM_Msk & (_UINT32_(value) << CAN_TXBC_TFQM_Pos)) /* Assigment of value for TFQM in the CAN_TXBC register */ +#define CAN_TXBC_Msk _UINT32_(0x7F3FFFFF) /* (CAN_TXBC) Register Mask */ + + +/* -------- CAN_TXFQS : (CAN Offset: 0xC4) ( R/ 32) Tx FIFO / Queue Status -------- */ +#define CAN_TXFQS_RESETVALUE _UINT32_(0x00) /* (CAN_TXFQS) Tx FIFO / Queue Status Reset Value */ + +#define CAN_TXFQS_TFFL_Pos _UINT32_(0) /* (CAN_TXFQS) Tx FIFO Free Level Position */ +#define CAN_TXFQS_TFFL_Msk (_UINT32_(0x3F) << CAN_TXFQS_TFFL_Pos) /* (CAN_TXFQS) Tx FIFO Free Level Mask */ +#define CAN_TXFQS_TFFL(value) (CAN_TXFQS_TFFL_Msk & (_UINT32_(value) << CAN_TXFQS_TFFL_Pos)) /* Assigment of value for TFFL in the CAN_TXFQS register */ +#define CAN_TXFQS_TFGI_Pos _UINT32_(8) /* (CAN_TXFQS) Tx FIFO Get Index Position */ +#define CAN_TXFQS_TFGI_Msk (_UINT32_(0x1F) << CAN_TXFQS_TFGI_Pos) /* (CAN_TXFQS) Tx FIFO Get Index Mask */ +#define CAN_TXFQS_TFGI(value) (CAN_TXFQS_TFGI_Msk & (_UINT32_(value) << CAN_TXFQS_TFGI_Pos)) /* Assigment of value for TFGI in the CAN_TXFQS register */ +#define CAN_TXFQS_TFQPI_Pos _UINT32_(16) /* (CAN_TXFQS) Tx FIFO/Queue Put Index Position */ +#define CAN_TXFQS_TFQPI_Msk (_UINT32_(0x1F) << CAN_TXFQS_TFQPI_Pos) /* (CAN_TXFQS) Tx FIFO/Queue Put Index Mask */ +#define CAN_TXFQS_TFQPI(value) (CAN_TXFQS_TFQPI_Msk & (_UINT32_(value) << CAN_TXFQS_TFQPI_Pos)) /* Assigment of value for TFQPI in the CAN_TXFQS register */ +#define CAN_TXFQS_TFQF_Pos _UINT32_(21) /* (CAN_TXFQS) Tx FIFO/Queue Full Position */ +#define CAN_TXFQS_TFQF_Msk (_UINT32_(0x1) << CAN_TXFQS_TFQF_Pos) /* (CAN_TXFQS) Tx FIFO/Queue Full Mask */ +#define CAN_TXFQS_TFQF(value) (CAN_TXFQS_TFQF_Msk & (_UINT32_(value) << CAN_TXFQS_TFQF_Pos)) /* Assigment of value for TFQF in the CAN_TXFQS register */ +#define CAN_TXFQS_Msk _UINT32_(0x003F1F3F) /* (CAN_TXFQS) Register Mask */ + + +/* -------- CAN_TXESC : (CAN Offset: 0xC8) (R/W 32) Tx Buffer Element Size Configuration -------- */ +#define CAN_TXESC_RESETVALUE _UINT32_(0x00) /* (CAN_TXESC) Tx Buffer Element Size Configuration Reset Value */ + +#define CAN_TXESC_TBDS_Pos _UINT32_(0) /* (CAN_TXESC) Tx Buffer Data Field Size Position */ +#define CAN_TXESC_TBDS_Msk (_UINT32_(0x7) << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) Tx Buffer Data Field Size Mask */ +#define CAN_TXESC_TBDS(value) (CAN_TXESC_TBDS_Msk & (_UINT32_(value) << CAN_TXESC_TBDS_Pos)) /* Assigment of value for TBDS in the CAN_TXESC register */ +#define CAN_TXESC_TBDS_DATA8_Val _UINT32_(0x0) /* (CAN_TXESC) 8 byte data field */ +#define CAN_TXESC_TBDS_DATA12_Val _UINT32_(0x1) /* (CAN_TXESC) 12 byte data field */ +#define CAN_TXESC_TBDS_DATA16_Val _UINT32_(0x2) /* (CAN_TXESC) 16 byte data field */ +#define CAN_TXESC_TBDS_DATA20_Val _UINT32_(0x3) /* (CAN_TXESC) 20 byte data field */ +#define CAN_TXESC_TBDS_DATA24_Val _UINT32_(0x4) /* (CAN_TXESC) 24 byte data field */ +#define CAN_TXESC_TBDS_DATA32_Val _UINT32_(0x5) /* (CAN_TXESC) 32 byte data field */ +#define CAN_TXESC_TBDS_DATA48_Val _UINT32_(0x6) /* (CAN_TXESC) 48 byte data field */ +#define CAN_TXESC_TBDS_DATA64_Val _UINT32_(0x7) /* (CAN_TXESC) 64 byte data field */ +#define CAN_TXESC_TBDS_DATA8 (CAN_TXESC_TBDS_DATA8_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 8 byte data field Position */ +#define CAN_TXESC_TBDS_DATA12 (CAN_TXESC_TBDS_DATA12_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 12 byte data field Position */ +#define CAN_TXESC_TBDS_DATA16 (CAN_TXESC_TBDS_DATA16_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 16 byte data field Position */ +#define CAN_TXESC_TBDS_DATA20 (CAN_TXESC_TBDS_DATA20_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 20 byte data field Position */ +#define CAN_TXESC_TBDS_DATA24 (CAN_TXESC_TBDS_DATA24_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 24 byte data field Position */ +#define CAN_TXESC_TBDS_DATA32 (CAN_TXESC_TBDS_DATA32_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 32 byte data field Position */ +#define CAN_TXESC_TBDS_DATA48 (CAN_TXESC_TBDS_DATA48_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 48 byte data field Position */ +#define CAN_TXESC_TBDS_DATA64 (CAN_TXESC_TBDS_DATA64_Val << CAN_TXESC_TBDS_Pos) /* (CAN_TXESC) 64 byte data field Position */ +#define CAN_TXESC_Msk _UINT32_(0x00000007) /* (CAN_TXESC) Register Mask */ + + +/* -------- CAN_TXBRP : (CAN Offset: 0xCC) ( R/ 32) Tx Buffer Request Pending -------- */ +#define CAN_TXBRP_RESETVALUE _UINT32_(0x00) /* (CAN_TXBRP) Tx Buffer Request Pending Reset Value */ + +#define CAN_TXBRP_TRP0_Pos _UINT32_(0) /* (CAN_TXBRP) Transmission Request Pending 0 Position */ +#define CAN_TXBRP_TRP0_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP0_Pos) /* (CAN_TXBRP) Transmission Request Pending 0 Mask */ +#define CAN_TXBRP_TRP0(value) (CAN_TXBRP_TRP0_Msk & (_UINT32_(value) << CAN_TXBRP_TRP0_Pos)) /* Assigment of value for TRP0 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP1_Pos _UINT32_(1) /* (CAN_TXBRP) Transmission Request Pending 1 Position */ +#define CAN_TXBRP_TRP1_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP1_Pos) /* (CAN_TXBRP) Transmission Request Pending 1 Mask */ +#define CAN_TXBRP_TRP1(value) (CAN_TXBRP_TRP1_Msk & (_UINT32_(value) << CAN_TXBRP_TRP1_Pos)) /* Assigment of value for TRP1 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP2_Pos _UINT32_(2) /* (CAN_TXBRP) Transmission Request Pending 2 Position */ +#define CAN_TXBRP_TRP2_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP2_Pos) /* (CAN_TXBRP) Transmission Request Pending 2 Mask */ +#define CAN_TXBRP_TRP2(value) (CAN_TXBRP_TRP2_Msk & (_UINT32_(value) << CAN_TXBRP_TRP2_Pos)) /* Assigment of value for TRP2 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP3_Pos _UINT32_(3) /* (CAN_TXBRP) Transmission Request Pending 3 Position */ +#define CAN_TXBRP_TRP3_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP3_Pos) /* (CAN_TXBRP) Transmission Request Pending 3 Mask */ +#define CAN_TXBRP_TRP3(value) (CAN_TXBRP_TRP3_Msk & (_UINT32_(value) << CAN_TXBRP_TRP3_Pos)) /* Assigment of value for TRP3 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP4_Pos _UINT32_(4) /* (CAN_TXBRP) Transmission Request Pending 4 Position */ +#define CAN_TXBRP_TRP4_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP4_Pos) /* (CAN_TXBRP) Transmission Request Pending 4 Mask */ +#define CAN_TXBRP_TRP4(value) (CAN_TXBRP_TRP4_Msk & (_UINT32_(value) << CAN_TXBRP_TRP4_Pos)) /* Assigment of value for TRP4 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP5_Pos _UINT32_(5) /* (CAN_TXBRP) Transmission Request Pending 5 Position */ +#define CAN_TXBRP_TRP5_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP5_Pos) /* (CAN_TXBRP) Transmission Request Pending 5 Mask */ +#define CAN_TXBRP_TRP5(value) (CAN_TXBRP_TRP5_Msk & (_UINT32_(value) << CAN_TXBRP_TRP5_Pos)) /* Assigment of value for TRP5 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP6_Pos _UINT32_(6) /* (CAN_TXBRP) Transmission Request Pending 6 Position */ +#define CAN_TXBRP_TRP6_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP6_Pos) /* (CAN_TXBRP) Transmission Request Pending 6 Mask */ +#define CAN_TXBRP_TRP6(value) (CAN_TXBRP_TRP6_Msk & (_UINT32_(value) << CAN_TXBRP_TRP6_Pos)) /* Assigment of value for TRP6 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP7_Pos _UINT32_(7) /* (CAN_TXBRP) Transmission Request Pending 7 Position */ +#define CAN_TXBRP_TRP7_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP7_Pos) /* (CAN_TXBRP) Transmission Request Pending 7 Mask */ +#define CAN_TXBRP_TRP7(value) (CAN_TXBRP_TRP7_Msk & (_UINT32_(value) << CAN_TXBRP_TRP7_Pos)) /* Assigment of value for TRP7 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP8_Pos _UINT32_(8) /* (CAN_TXBRP) Transmission Request Pending 8 Position */ +#define CAN_TXBRP_TRP8_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP8_Pos) /* (CAN_TXBRP) Transmission Request Pending 8 Mask */ +#define CAN_TXBRP_TRP8(value) (CAN_TXBRP_TRP8_Msk & (_UINT32_(value) << CAN_TXBRP_TRP8_Pos)) /* Assigment of value for TRP8 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP9_Pos _UINT32_(9) /* (CAN_TXBRP) Transmission Request Pending 9 Position */ +#define CAN_TXBRP_TRP9_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP9_Pos) /* (CAN_TXBRP) Transmission Request Pending 9 Mask */ +#define CAN_TXBRP_TRP9(value) (CAN_TXBRP_TRP9_Msk & (_UINT32_(value) << CAN_TXBRP_TRP9_Pos)) /* Assigment of value for TRP9 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP10_Pos _UINT32_(10) /* (CAN_TXBRP) Transmission Request Pending 10 Position */ +#define CAN_TXBRP_TRP10_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP10_Pos) /* (CAN_TXBRP) Transmission Request Pending 10 Mask */ +#define CAN_TXBRP_TRP10(value) (CAN_TXBRP_TRP10_Msk & (_UINT32_(value) << CAN_TXBRP_TRP10_Pos)) /* Assigment of value for TRP10 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP11_Pos _UINT32_(11) /* (CAN_TXBRP) Transmission Request Pending 11 Position */ +#define CAN_TXBRP_TRP11_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP11_Pos) /* (CAN_TXBRP) Transmission Request Pending 11 Mask */ +#define CAN_TXBRP_TRP11(value) (CAN_TXBRP_TRP11_Msk & (_UINT32_(value) << CAN_TXBRP_TRP11_Pos)) /* Assigment of value for TRP11 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP12_Pos _UINT32_(12) /* (CAN_TXBRP) Transmission Request Pending 12 Position */ +#define CAN_TXBRP_TRP12_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP12_Pos) /* (CAN_TXBRP) Transmission Request Pending 12 Mask */ +#define CAN_TXBRP_TRP12(value) (CAN_TXBRP_TRP12_Msk & (_UINT32_(value) << CAN_TXBRP_TRP12_Pos)) /* Assigment of value for TRP12 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP13_Pos _UINT32_(13) /* (CAN_TXBRP) Transmission Request Pending 13 Position */ +#define CAN_TXBRP_TRP13_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP13_Pos) /* (CAN_TXBRP) Transmission Request Pending 13 Mask */ +#define CAN_TXBRP_TRP13(value) (CAN_TXBRP_TRP13_Msk & (_UINT32_(value) << CAN_TXBRP_TRP13_Pos)) /* Assigment of value for TRP13 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP14_Pos _UINT32_(14) /* (CAN_TXBRP) Transmission Request Pending 14 Position */ +#define CAN_TXBRP_TRP14_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP14_Pos) /* (CAN_TXBRP) Transmission Request Pending 14 Mask */ +#define CAN_TXBRP_TRP14(value) (CAN_TXBRP_TRP14_Msk & (_UINT32_(value) << CAN_TXBRP_TRP14_Pos)) /* Assigment of value for TRP14 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP15_Pos _UINT32_(15) /* (CAN_TXBRP) Transmission Request Pending 15 Position */ +#define CAN_TXBRP_TRP15_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP15_Pos) /* (CAN_TXBRP) Transmission Request Pending 15 Mask */ +#define CAN_TXBRP_TRP15(value) (CAN_TXBRP_TRP15_Msk & (_UINT32_(value) << CAN_TXBRP_TRP15_Pos)) /* Assigment of value for TRP15 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP16_Pos _UINT32_(16) /* (CAN_TXBRP) Transmission Request Pending 16 Position */ +#define CAN_TXBRP_TRP16_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP16_Pos) /* (CAN_TXBRP) Transmission Request Pending 16 Mask */ +#define CAN_TXBRP_TRP16(value) (CAN_TXBRP_TRP16_Msk & (_UINT32_(value) << CAN_TXBRP_TRP16_Pos)) /* Assigment of value for TRP16 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP17_Pos _UINT32_(17) /* (CAN_TXBRP) Transmission Request Pending 17 Position */ +#define CAN_TXBRP_TRP17_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP17_Pos) /* (CAN_TXBRP) Transmission Request Pending 17 Mask */ +#define CAN_TXBRP_TRP17(value) (CAN_TXBRP_TRP17_Msk & (_UINT32_(value) << CAN_TXBRP_TRP17_Pos)) /* Assigment of value for TRP17 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP18_Pos _UINT32_(18) /* (CAN_TXBRP) Transmission Request Pending 18 Position */ +#define CAN_TXBRP_TRP18_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP18_Pos) /* (CAN_TXBRP) Transmission Request Pending 18 Mask */ +#define CAN_TXBRP_TRP18(value) (CAN_TXBRP_TRP18_Msk & (_UINT32_(value) << CAN_TXBRP_TRP18_Pos)) /* Assigment of value for TRP18 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP19_Pos _UINT32_(19) /* (CAN_TXBRP) Transmission Request Pending 19 Position */ +#define CAN_TXBRP_TRP19_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP19_Pos) /* (CAN_TXBRP) Transmission Request Pending 19 Mask */ +#define CAN_TXBRP_TRP19(value) (CAN_TXBRP_TRP19_Msk & (_UINT32_(value) << CAN_TXBRP_TRP19_Pos)) /* Assigment of value for TRP19 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP20_Pos _UINT32_(20) /* (CAN_TXBRP) Transmission Request Pending 20 Position */ +#define CAN_TXBRP_TRP20_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP20_Pos) /* (CAN_TXBRP) Transmission Request Pending 20 Mask */ +#define CAN_TXBRP_TRP20(value) (CAN_TXBRP_TRP20_Msk & (_UINT32_(value) << CAN_TXBRP_TRP20_Pos)) /* Assigment of value for TRP20 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP21_Pos _UINT32_(21) /* (CAN_TXBRP) Transmission Request Pending 21 Position */ +#define CAN_TXBRP_TRP21_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP21_Pos) /* (CAN_TXBRP) Transmission Request Pending 21 Mask */ +#define CAN_TXBRP_TRP21(value) (CAN_TXBRP_TRP21_Msk & (_UINT32_(value) << CAN_TXBRP_TRP21_Pos)) /* Assigment of value for TRP21 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP22_Pos _UINT32_(22) /* (CAN_TXBRP) Transmission Request Pending 22 Position */ +#define CAN_TXBRP_TRP22_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP22_Pos) /* (CAN_TXBRP) Transmission Request Pending 22 Mask */ +#define CAN_TXBRP_TRP22(value) (CAN_TXBRP_TRP22_Msk & (_UINT32_(value) << CAN_TXBRP_TRP22_Pos)) /* Assigment of value for TRP22 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP23_Pos _UINT32_(23) /* (CAN_TXBRP) Transmission Request Pending 23 Position */ +#define CAN_TXBRP_TRP23_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP23_Pos) /* (CAN_TXBRP) Transmission Request Pending 23 Mask */ +#define CAN_TXBRP_TRP23(value) (CAN_TXBRP_TRP23_Msk & (_UINT32_(value) << CAN_TXBRP_TRP23_Pos)) /* Assigment of value for TRP23 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP24_Pos _UINT32_(24) /* (CAN_TXBRP) Transmission Request Pending 24 Position */ +#define CAN_TXBRP_TRP24_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP24_Pos) /* (CAN_TXBRP) Transmission Request Pending 24 Mask */ +#define CAN_TXBRP_TRP24(value) (CAN_TXBRP_TRP24_Msk & (_UINT32_(value) << CAN_TXBRP_TRP24_Pos)) /* Assigment of value for TRP24 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP25_Pos _UINT32_(25) /* (CAN_TXBRP) Transmission Request Pending 25 Position */ +#define CAN_TXBRP_TRP25_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP25_Pos) /* (CAN_TXBRP) Transmission Request Pending 25 Mask */ +#define CAN_TXBRP_TRP25(value) (CAN_TXBRP_TRP25_Msk & (_UINT32_(value) << CAN_TXBRP_TRP25_Pos)) /* Assigment of value for TRP25 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP26_Pos _UINT32_(26) /* (CAN_TXBRP) Transmission Request Pending 26 Position */ +#define CAN_TXBRP_TRP26_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP26_Pos) /* (CAN_TXBRP) Transmission Request Pending 26 Mask */ +#define CAN_TXBRP_TRP26(value) (CAN_TXBRP_TRP26_Msk & (_UINT32_(value) << CAN_TXBRP_TRP26_Pos)) /* Assigment of value for TRP26 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP27_Pos _UINT32_(27) /* (CAN_TXBRP) Transmission Request Pending 27 Position */ +#define CAN_TXBRP_TRP27_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP27_Pos) /* (CAN_TXBRP) Transmission Request Pending 27 Mask */ +#define CAN_TXBRP_TRP27(value) (CAN_TXBRP_TRP27_Msk & (_UINT32_(value) << CAN_TXBRP_TRP27_Pos)) /* Assigment of value for TRP27 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP28_Pos _UINT32_(28) /* (CAN_TXBRP) Transmission Request Pending 28 Position */ +#define CAN_TXBRP_TRP28_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP28_Pos) /* (CAN_TXBRP) Transmission Request Pending 28 Mask */ +#define CAN_TXBRP_TRP28(value) (CAN_TXBRP_TRP28_Msk & (_UINT32_(value) << CAN_TXBRP_TRP28_Pos)) /* Assigment of value for TRP28 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP29_Pos _UINT32_(29) /* (CAN_TXBRP) Transmission Request Pending 29 Position */ +#define CAN_TXBRP_TRP29_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP29_Pos) /* (CAN_TXBRP) Transmission Request Pending 29 Mask */ +#define CAN_TXBRP_TRP29(value) (CAN_TXBRP_TRP29_Msk & (_UINT32_(value) << CAN_TXBRP_TRP29_Pos)) /* Assigment of value for TRP29 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP30_Pos _UINT32_(30) /* (CAN_TXBRP) Transmission Request Pending 30 Position */ +#define CAN_TXBRP_TRP30_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP30_Pos) /* (CAN_TXBRP) Transmission Request Pending 30 Mask */ +#define CAN_TXBRP_TRP30(value) (CAN_TXBRP_TRP30_Msk & (_UINT32_(value) << CAN_TXBRP_TRP30_Pos)) /* Assigment of value for TRP30 in the CAN_TXBRP register */ +#define CAN_TXBRP_TRP31_Pos _UINT32_(31) /* (CAN_TXBRP) Transmission Request Pending 31 Position */ +#define CAN_TXBRP_TRP31_Msk (_UINT32_(0x1) << CAN_TXBRP_TRP31_Pos) /* (CAN_TXBRP) Transmission Request Pending 31 Mask */ +#define CAN_TXBRP_TRP31(value) (CAN_TXBRP_TRP31_Msk & (_UINT32_(value) << CAN_TXBRP_TRP31_Pos)) /* Assigment of value for TRP31 in the CAN_TXBRP register */ +#define CAN_TXBRP_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBRP) Register Mask */ + +#define CAN_TXBRP_TRP_Pos _UINT32_(0) /* (CAN_TXBRP Position) Transmission Request Pending 3x */ +#define CAN_TXBRP_TRP_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBRP_TRP_Pos) /* (CAN_TXBRP Mask) TRP */ +#define CAN_TXBRP_TRP(value) (CAN_TXBRP_TRP_Msk & (_UINT32_(value) << CAN_TXBRP_TRP_Pos)) + +/* -------- CAN_TXBAR : (CAN Offset: 0xD0) (R/W 32) Tx Buffer Add Request -------- */ +#define CAN_TXBAR_RESETVALUE _UINT32_(0x00) /* (CAN_TXBAR) Tx Buffer Add Request Reset Value */ + +#define CAN_TXBAR_AR0_Pos _UINT32_(0) /* (CAN_TXBAR) Add Request 0 Position */ +#define CAN_TXBAR_AR0_Msk (_UINT32_(0x1) << CAN_TXBAR_AR0_Pos) /* (CAN_TXBAR) Add Request 0 Mask */ +#define CAN_TXBAR_AR0(value) (CAN_TXBAR_AR0_Msk & (_UINT32_(value) << CAN_TXBAR_AR0_Pos)) /* Assigment of value for AR0 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR1_Pos _UINT32_(1) /* (CAN_TXBAR) Add Request 1 Position */ +#define CAN_TXBAR_AR1_Msk (_UINT32_(0x1) << CAN_TXBAR_AR1_Pos) /* (CAN_TXBAR) Add Request 1 Mask */ +#define CAN_TXBAR_AR1(value) (CAN_TXBAR_AR1_Msk & (_UINT32_(value) << CAN_TXBAR_AR1_Pos)) /* Assigment of value for AR1 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR2_Pos _UINT32_(2) /* (CAN_TXBAR) Add Request 2 Position */ +#define CAN_TXBAR_AR2_Msk (_UINT32_(0x1) << CAN_TXBAR_AR2_Pos) /* (CAN_TXBAR) Add Request 2 Mask */ +#define CAN_TXBAR_AR2(value) (CAN_TXBAR_AR2_Msk & (_UINT32_(value) << CAN_TXBAR_AR2_Pos)) /* Assigment of value for AR2 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR3_Pos _UINT32_(3) /* (CAN_TXBAR) Add Request 3 Position */ +#define CAN_TXBAR_AR3_Msk (_UINT32_(0x1) << CAN_TXBAR_AR3_Pos) /* (CAN_TXBAR) Add Request 3 Mask */ +#define CAN_TXBAR_AR3(value) (CAN_TXBAR_AR3_Msk & (_UINT32_(value) << CAN_TXBAR_AR3_Pos)) /* Assigment of value for AR3 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR4_Pos _UINT32_(4) /* (CAN_TXBAR) Add Request 4 Position */ +#define CAN_TXBAR_AR4_Msk (_UINT32_(0x1) << CAN_TXBAR_AR4_Pos) /* (CAN_TXBAR) Add Request 4 Mask */ +#define CAN_TXBAR_AR4(value) (CAN_TXBAR_AR4_Msk & (_UINT32_(value) << CAN_TXBAR_AR4_Pos)) /* Assigment of value for AR4 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR5_Pos _UINT32_(5) /* (CAN_TXBAR) Add Request 5 Position */ +#define CAN_TXBAR_AR5_Msk (_UINT32_(0x1) << CAN_TXBAR_AR5_Pos) /* (CAN_TXBAR) Add Request 5 Mask */ +#define CAN_TXBAR_AR5(value) (CAN_TXBAR_AR5_Msk & (_UINT32_(value) << CAN_TXBAR_AR5_Pos)) /* Assigment of value for AR5 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR6_Pos _UINT32_(6) /* (CAN_TXBAR) Add Request 6 Position */ +#define CAN_TXBAR_AR6_Msk (_UINT32_(0x1) << CAN_TXBAR_AR6_Pos) /* (CAN_TXBAR) Add Request 6 Mask */ +#define CAN_TXBAR_AR6(value) (CAN_TXBAR_AR6_Msk & (_UINT32_(value) << CAN_TXBAR_AR6_Pos)) /* Assigment of value for AR6 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR7_Pos _UINT32_(7) /* (CAN_TXBAR) Add Request 7 Position */ +#define CAN_TXBAR_AR7_Msk (_UINT32_(0x1) << CAN_TXBAR_AR7_Pos) /* (CAN_TXBAR) Add Request 7 Mask */ +#define CAN_TXBAR_AR7(value) (CAN_TXBAR_AR7_Msk & (_UINT32_(value) << CAN_TXBAR_AR7_Pos)) /* Assigment of value for AR7 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR8_Pos _UINT32_(8) /* (CAN_TXBAR) Add Request 8 Position */ +#define CAN_TXBAR_AR8_Msk (_UINT32_(0x1) << CAN_TXBAR_AR8_Pos) /* (CAN_TXBAR) Add Request 8 Mask */ +#define CAN_TXBAR_AR8(value) (CAN_TXBAR_AR8_Msk & (_UINT32_(value) << CAN_TXBAR_AR8_Pos)) /* Assigment of value for AR8 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR9_Pos _UINT32_(9) /* (CAN_TXBAR) Add Request 9 Position */ +#define CAN_TXBAR_AR9_Msk (_UINT32_(0x1) << CAN_TXBAR_AR9_Pos) /* (CAN_TXBAR) Add Request 9 Mask */ +#define CAN_TXBAR_AR9(value) (CAN_TXBAR_AR9_Msk & (_UINT32_(value) << CAN_TXBAR_AR9_Pos)) /* Assigment of value for AR9 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR10_Pos _UINT32_(10) /* (CAN_TXBAR) Add Request 10 Position */ +#define CAN_TXBAR_AR10_Msk (_UINT32_(0x1) << CAN_TXBAR_AR10_Pos) /* (CAN_TXBAR) Add Request 10 Mask */ +#define CAN_TXBAR_AR10(value) (CAN_TXBAR_AR10_Msk & (_UINT32_(value) << CAN_TXBAR_AR10_Pos)) /* Assigment of value for AR10 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR11_Pos _UINT32_(11) /* (CAN_TXBAR) Add Request 11 Position */ +#define CAN_TXBAR_AR11_Msk (_UINT32_(0x1) << CAN_TXBAR_AR11_Pos) /* (CAN_TXBAR) Add Request 11 Mask */ +#define CAN_TXBAR_AR11(value) (CAN_TXBAR_AR11_Msk & (_UINT32_(value) << CAN_TXBAR_AR11_Pos)) /* Assigment of value for AR11 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR12_Pos _UINT32_(12) /* (CAN_TXBAR) Add Request 12 Position */ +#define CAN_TXBAR_AR12_Msk (_UINT32_(0x1) << CAN_TXBAR_AR12_Pos) /* (CAN_TXBAR) Add Request 12 Mask */ +#define CAN_TXBAR_AR12(value) (CAN_TXBAR_AR12_Msk & (_UINT32_(value) << CAN_TXBAR_AR12_Pos)) /* Assigment of value for AR12 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR13_Pos _UINT32_(13) /* (CAN_TXBAR) Add Request 13 Position */ +#define CAN_TXBAR_AR13_Msk (_UINT32_(0x1) << CAN_TXBAR_AR13_Pos) /* (CAN_TXBAR) Add Request 13 Mask */ +#define CAN_TXBAR_AR13(value) (CAN_TXBAR_AR13_Msk & (_UINT32_(value) << CAN_TXBAR_AR13_Pos)) /* Assigment of value for AR13 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR14_Pos _UINT32_(14) /* (CAN_TXBAR) Add Request 14 Position */ +#define CAN_TXBAR_AR14_Msk (_UINT32_(0x1) << CAN_TXBAR_AR14_Pos) /* (CAN_TXBAR) Add Request 14 Mask */ +#define CAN_TXBAR_AR14(value) (CAN_TXBAR_AR14_Msk & (_UINT32_(value) << CAN_TXBAR_AR14_Pos)) /* Assigment of value for AR14 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR15_Pos _UINT32_(15) /* (CAN_TXBAR) Add Request 15 Position */ +#define CAN_TXBAR_AR15_Msk (_UINT32_(0x1) << CAN_TXBAR_AR15_Pos) /* (CAN_TXBAR) Add Request 15 Mask */ +#define CAN_TXBAR_AR15(value) (CAN_TXBAR_AR15_Msk & (_UINT32_(value) << CAN_TXBAR_AR15_Pos)) /* Assigment of value for AR15 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR16_Pos _UINT32_(16) /* (CAN_TXBAR) Add Request 16 Position */ +#define CAN_TXBAR_AR16_Msk (_UINT32_(0x1) << CAN_TXBAR_AR16_Pos) /* (CAN_TXBAR) Add Request 16 Mask */ +#define CAN_TXBAR_AR16(value) (CAN_TXBAR_AR16_Msk & (_UINT32_(value) << CAN_TXBAR_AR16_Pos)) /* Assigment of value for AR16 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR17_Pos _UINT32_(17) /* (CAN_TXBAR) Add Request 17 Position */ +#define CAN_TXBAR_AR17_Msk (_UINT32_(0x1) << CAN_TXBAR_AR17_Pos) /* (CAN_TXBAR) Add Request 17 Mask */ +#define CAN_TXBAR_AR17(value) (CAN_TXBAR_AR17_Msk & (_UINT32_(value) << CAN_TXBAR_AR17_Pos)) /* Assigment of value for AR17 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR18_Pos _UINT32_(18) /* (CAN_TXBAR) Add Request 18 Position */ +#define CAN_TXBAR_AR18_Msk (_UINT32_(0x1) << CAN_TXBAR_AR18_Pos) /* (CAN_TXBAR) Add Request 18 Mask */ +#define CAN_TXBAR_AR18(value) (CAN_TXBAR_AR18_Msk & (_UINT32_(value) << CAN_TXBAR_AR18_Pos)) /* Assigment of value for AR18 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR19_Pos _UINT32_(19) /* (CAN_TXBAR) Add Request 19 Position */ +#define CAN_TXBAR_AR19_Msk (_UINT32_(0x1) << CAN_TXBAR_AR19_Pos) /* (CAN_TXBAR) Add Request 19 Mask */ +#define CAN_TXBAR_AR19(value) (CAN_TXBAR_AR19_Msk & (_UINT32_(value) << CAN_TXBAR_AR19_Pos)) /* Assigment of value for AR19 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR20_Pos _UINT32_(20) /* (CAN_TXBAR) Add Request 20 Position */ +#define CAN_TXBAR_AR20_Msk (_UINT32_(0x1) << CAN_TXBAR_AR20_Pos) /* (CAN_TXBAR) Add Request 20 Mask */ +#define CAN_TXBAR_AR20(value) (CAN_TXBAR_AR20_Msk & (_UINT32_(value) << CAN_TXBAR_AR20_Pos)) /* Assigment of value for AR20 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR21_Pos _UINT32_(21) /* (CAN_TXBAR) Add Request 21 Position */ +#define CAN_TXBAR_AR21_Msk (_UINT32_(0x1) << CAN_TXBAR_AR21_Pos) /* (CAN_TXBAR) Add Request 21 Mask */ +#define CAN_TXBAR_AR21(value) (CAN_TXBAR_AR21_Msk & (_UINT32_(value) << CAN_TXBAR_AR21_Pos)) /* Assigment of value for AR21 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR22_Pos _UINT32_(22) /* (CAN_TXBAR) Add Request 22 Position */ +#define CAN_TXBAR_AR22_Msk (_UINT32_(0x1) << CAN_TXBAR_AR22_Pos) /* (CAN_TXBAR) Add Request 22 Mask */ +#define CAN_TXBAR_AR22(value) (CAN_TXBAR_AR22_Msk & (_UINT32_(value) << CAN_TXBAR_AR22_Pos)) /* Assigment of value for AR22 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR23_Pos _UINT32_(23) /* (CAN_TXBAR) Add Request 23 Position */ +#define CAN_TXBAR_AR23_Msk (_UINT32_(0x1) << CAN_TXBAR_AR23_Pos) /* (CAN_TXBAR) Add Request 23 Mask */ +#define CAN_TXBAR_AR23(value) (CAN_TXBAR_AR23_Msk & (_UINT32_(value) << CAN_TXBAR_AR23_Pos)) /* Assigment of value for AR23 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR24_Pos _UINT32_(24) /* (CAN_TXBAR) Add Request 24 Position */ +#define CAN_TXBAR_AR24_Msk (_UINT32_(0x1) << CAN_TXBAR_AR24_Pos) /* (CAN_TXBAR) Add Request 24 Mask */ +#define CAN_TXBAR_AR24(value) (CAN_TXBAR_AR24_Msk & (_UINT32_(value) << CAN_TXBAR_AR24_Pos)) /* Assigment of value for AR24 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR25_Pos _UINT32_(25) /* (CAN_TXBAR) Add Request 25 Position */ +#define CAN_TXBAR_AR25_Msk (_UINT32_(0x1) << CAN_TXBAR_AR25_Pos) /* (CAN_TXBAR) Add Request 25 Mask */ +#define CAN_TXBAR_AR25(value) (CAN_TXBAR_AR25_Msk & (_UINT32_(value) << CAN_TXBAR_AR25_Pos)) /* Assigment of value for AR25 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR26_Pos _UINT32_(26) /* (CAN_TXBAR) Add Request 26 Position */ +#define CAN_TXBAR_AR26_Msk (_UINT32_(0x1) << CAN_TXBAR_AR26_Pos) /* (CAN_TXBAR) Add Request 26 Mask */ +#define CAN_TXBAR_AR26(value) (CAN_TXBAR_AR26_Msk & (_UINT32_(value) << CAN_TXBAR_AR26_Pos)) /* Assigment of value for AR26 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR27_Pos _UINT32_(27) /* (CAN_TXBAR) Add Request 27 Position */ +#define CAN_TXBAR_AR27_Msk (_UINT32_(0x1) << CAN_TXBAR_AR27_Pos) /* (CAN_TXBAR) Add Request 27 Mask */ +#define CAN_TXBAR_AR27(value) (CAN_TXBAR_AR27_Msk & (_UINT32_(value) << CAN_TXBAR_AR27_Pos)) /* Assigment of value for AR27 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR28_Pos _UINT32_(28) /* (CAN_TXBAR) Add Request 28 Position */ +#define CAN_TXBAR_AR28_Msk (_UINT32_(0x1) << CAN_TXBAR_AR28_Pos) /* (CAN_TXBAR) Add Request 28 Mask */ +#define CAN_TXBAR_AR28(value) (CAN_TXBAR_AR28_Msk & (_UINT32_(value) << CAN_TXBAR_AR28_Pos)) /* Assigment of value for AR28 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR29_Pos _UINT32_(29) /* (CAN_TXBAR) Add Request 29 Position */ +#define CAN_TXBAR_AR29_Msk (_UINT32_(0x1) << CAN_TXBAR_AR29_Pos) /* (CAN_TXBAR) Add Request 29 Mask */ +#define CAN_TXBAR_AR29(value) (CAN_TXBAR_AR29_Msk & (_UINT32_(value) << CAN_TXBAR_AR29_Pos)) /* Assigment of value for AR29 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR30_Pos _UINT32_(30) /* (CAN_TXBAR) Add Request 30 Position */ +#define CAN_TXBAR_AR30_Msk (_UINT32_(0x1) << CAN_TXBAR_AR30_Pos) /* (CAN_TXBAR) Add Request 30 Mask */ +#define CAN_TXBAR_AR30(value) (CAN_TXBAR_AR30_Msk & (_UINT32_(value) << CAN_TXBAR_AR30_Pos)) /* Assigment of value for AR30 in the CAN_TXBAR register */ +#define CAN_TXBAR_AR31_Pos _UINT32_(31) /* (CAN_TXBAR) Add Request 31 Position */ +#define CAN_TXBAR_AR31_Msk (_UINT32_(0x1) << CAN_TXBAR_AR31_Pos) /* (CAN_TXBAR) Add Request 31 Mask */ +#define CAN_TXBAR_AR31(value) (CAN_TXBAR_AR31_Msk & (_UINT32_(value) << CAN_TXBAR_AR31_Pos)) /* Assigment of value for AR31 in the CAN_TXBAR register */ +#define CAN_TXBAR_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBAR) Register Mask */ + +#define CAN_TXBAR_AR_Pos _UINT32_(0) /* (CAN_TXBAR Position) Add Request 3x */ +#define CAN_TXBAR_AR_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBAR_AR_Pos) /* (CAN_TXBAR Mask) AR */ +#define CAN_TXBAR_AR(value) (CAN_TXBAR_AR_Msk & (_UINT32_(value) << CAN_TXBAR_AR_Pos)) + +/* -------- CAN_TXBCR : (CAN Offset: 0xD4) (R/W 32) Tx Buffer Cancellation Request -------- */ +#define CAN_TXBCR_RESETVALUE _UINT32_(0x00) /* (CAN_TXBCR) Tx Buffer Cancellation Request Reset Value */ + +#define CAN_TXBCR_CR0_Pos _UINT32_(0) /* (CAN_TXBCR) Cancellation Request 0 Position */ +#define CAN_TXBCR_CR0_Msk (_UINT32_(0x1) << CAN_TXBCR_CR0_Pos) /* (CAN_TXBCR) Cancellation Request 0 Mask */ +#define CAN_TXBCR_CR0(value) (CAN_TXBCR_CR0_Msk & (_UINT32_(value) << CAN_TXBCR_CR0_Pos)) /* Assigment of value for CR0 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR1_Pos _UINT32_(1) /* (CAN_TXBCR) Cancellation Request 1 Position */ +#define CAN_TXBCR_CR1_Msk (_UINT32_(0x1) << CAN_TXBCR_CR1_Pos) /* (CAN_TXBCR) Cancellation Request 1 Mask */ +#define CAN_TXBCR_CR1(value) (CAN_TXBCR_CR1_Msk & (_UINT32_(value) << CAN_TXBCR_CR1_Pos)) /* Assigment of value for CR1 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR2_Pos _UINT32_(2) /* (CAN_TXBCR) Cancellation Request 2 Position */ +#define CAN_TXBCR_CR2_Msk (_UINT32_(0x1) << CAN_TXBCR_CR2_Pos) /* (CAN_TXBCR) Cancellation Request 2 Mask */ +#define CAN_TXBCR_CR2(value) (CAN_TXBCR_CR2_Msk & (_UINT32_(value) << CAN_TXBCR_CR2_Pos)) /* Assigment of value for CR2 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR3_Pos _UINT32_(3) /* (CAN_TXBCR) Cancellation Request 3 Position */ +#define CAN_TXBCR_CR3_Msk (_UINT32_(0x1) << CAN_TXBCR_CR3_Pos) /* (CAN_TXBCR) Cancellation Request 3 Mask */ +#define CAN_TXBCR_CR3(value) (CAN_TXBCR_CR3_Msk & (_UINT32_(value) << CAN_TXBCR_CR3_Pos)) /* Assigment of value for CR3 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR4_Pos _UINT32_(4) /* (CAN_TXBCR) Cancellation Request 4 Position */ +#define CAN_TXBCR_CR4_Msk (_UINT32_(0x1) << CAN_TXBCR_CR4_Pos) /* (CAN_TXBCR) Cancellation Request 4 Mask */ +#define CAN_TXBCR_CR4(value) (CAN_TXBCR_CR4_Msk & (_UINT32_(value) << CAN_TXBCR_CR4_Pos)) /* Assigment of value for CR4 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR5_Pos _UINT32_(5) /* (CAN_TXBCR) Cancellation Request 5 Position */ +#define CAN_TXBCR_CR5_Msk (_UINT32_(0x1) << CAN_TXBCR_CR5_Pos) /* (CAN_TXBCR) Cancellation Request 5 Mask */ +#define CAN_TXBCR_CR5(value) (CAN_TXBCR_CR5_Msk & (_UINT32_(value) << CAN_TXBCR_CR5_Pos)) /* Assigment of value for CR5 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR6_Pos _UINT32_(6) /* (CAN_TXBCR) Cancellation Request 6 Position */ +#define CAN_TXBCR_CR6_Msk (_UINT32_(0x1) << CAN_TXBCR_CR6_Pos) /* (CAN_TXBCR) Cancellation Request 6 Mask */ +#define CAN_TXBCR_CR6(value) (CAN_TXBCR_CR6_Msk & (_UINT32_(value) << CAN_TXBCR_CR6_Pos)) /* Assigment of value for CR6 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR7_Pos _UINT32_(7) /* (CAN_TXBCR) Cancellation Request 7 Position */ +#define CAN_TXBCR_CR7_Msk (_UINT32_(0x1) << CAN_TXBCR_CR7_Pos) /* (CAN_TXBCR) Cancellation Request 7 Mask */ +#define CAN_TXBCR_CR7(value) (CAN_TXBCR_CR7_Msk & (_UINT32_(value) << CAN_TXBCR_CR7_Pos)) /* Assigment of value for CR7 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR8_Pos _UINT32_(8) /* (CAN_TXBCR) Cancellation Request 8 Position */ +#define CAN_TXBCR_CR8_Msk (_UINT32_(0x1) << CAN_TXBCR_CR8_Pos) /* (CAN_TXBCR) Cancellation Request 8 Mask */ +#define CAN_TXBCR_CR8(value) (CAN_TXBCR_CR8_Msk & (_UINT32_(value) << CAN_TXBCR_CR8_Pos)) /* Assigment of value for CR8 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR9_Pos _UINT32_(9) /* (CAN_TXBCR) Cancellation Request 9 Position */ +#define CAN_TXBCR_CR9_Msk (_UINT32_(0x1) << CAN_TXBCR_CR9_Pos) /* (CAN_TXBCR) Cancellation Request 9 Mask */ +#define CAN_TXBCR_CR9(value) (CAN_TXBCR_CR9_Msk & (_UINT32_(value) << CAN_TXBCR_CR9_Pos)) /* Assigment of value for CR9 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR10_Pos _UINT32_(10) /* (CAN_TXBCR) Cancellation Request 10 Position */ +#define CAN_TXBCR_CR10_Msk (_UINT32_(0x1) << CAN_TXBCR_CR10_Pos) /* (CAN_TXBCR) Cancellation Request 10 Mask */ +#define CAN_TXBCR_CR10(value) (CAN_TXBCR_CR10_Msk & (_UINT32_(value) << CAN_TXBCR_CR10_Pos)) /* Assigment of value for CR10 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR11_Pos _UINT32_(11) /* (CAN_TXBCR) Cancellation Request 11 Position */ +#define CAN_TXBCR_CR11_Msk (_UINT32_(0x1) << CAN_TXBCR_CR11_Pos) /* (CAN_TXBCR) Cancellation Request 11 Mask */ +#define CAN_TXBCR_CR11(value) (CAN_TXBCR_CR11_Msk & (_UINT32_(value) << CAN_TXBCR_CR11_Pos)) /* Assigment of value for CR11 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR12_Pos _UINT32_(12) /* (CAN_TXBCR) Cancellation Request 12 Position */ +#define CAN_TXBCR_CR12_Msk (_UINT32_(0x1) << CAN_TXBCR_CR12_Pos) /* (CAN_TXBCR) Cancellation Request 12 Mask */ +#define CAN_TXBCR_CR12(value) (CAN_TXBCR_CR12_Msk & (_UINT32_(value) << CAN_TXBCR_CR12_Pos)) /* Assigment of value for CR12 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR13_Pos _UINT32_(13) /* (CAN_TXBCR) Cancellation Request 13 Position */ +#define CAN_TXBCR_CR13_Msk (_UINT32_(0x1) << CAN_TXBCR_CR13_Pos) /* (CAN_TXBCR) Cancellation Request 13 Mask */ +#define CAN_TXBCR_CR13(value) (CAN_TXBCR_CR13_Msk & (_UINT32_(value) << CAN_TXBCR_CR13_Pos)) /* Assigment of value for CR13 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR14_Pos _UINT32_(14) /* (CAN_TXBCR) Cancellation Request 14 Position */ +#define CAN_TXBCR_CR14_Msk (_UINT32_(0x1) << CAN_TXBCR_CR14_Pos) /* (CAN_TXBCR) Cancellation Request 14 Mask */ +#define CAN_TXBCR_CR14(value) (CAN_TXBCR_CR14_Msk & (_UINT32_(value) << CAN_TXBCR_CR14_Pos)) /* Assigment of value for CR14 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR15_Pos _UINT32_(15) /* (CAN_TXBCR) Cancellation Request 15 Position */ +#define CAN_TXBCR_CR15_Msk (_UINT32_(0x1) << CAN_TXBCR_CR15_Pos) /* (CAN_TXBCR) Cancellation Request 15 Mask */ +#define CAN_TXBCR_CR15(value) (CAN_TXBCR_CR15_Msk & (_UINT32_(value) << CAN_TXBCR_CR15_Pos)) /* Assigment of value for CR15 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR16_Pos _UINT32_(16) /* (CAN_TXBCR) Cancellation Request 16 Position */ +#define CAN_TXBCR_CR16_Msk (_UINT32_(0x1) << CAN_TXBCR_CR16_Pos) /* (CAN_TXBCR) Cancellation Request 16 Mask */ +#define CAN_TXBCR_CR16(value) (CAN_TXBCR_CR16_Msk & (_UINT32_(value) << CAN_TXBCR_CR16_Pos)) /* Assigment of value for CR16 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR17_Pos _UINT32_(17) /* (CAN_TXBCR) Cancellation Request 17 Position */ +#define CAN_TXBCR_CR17_Msk (_UINT32_(0x1) << CAN_TXBCR_CR17_Pos) /* (CAN_TXBCR) Cancellation Request 17 Mask */ +#define CAN_TXBCR_CR17(value) (CAN_TXBCR_CR17_Msk & (_UINT32_(value) << CAN_TXBCR_CR17_Pos)) /* Assigment of value for CR17 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR18_Pos _UINT32_(18) /* (CAN_TXBCR) Cancellation Request 18 Position */ +#define CAN_TXBCR_CR18_Msk (_UINT32_(0x1) << CAN_TXBCR_CR18_Pos) /* (CAN_TXBCR) Cancellation Request 18 Mask */ +#define CAN_TXBCR_CR18(value) (CAN_TXBCR_CR18_Msk & (_UINT32_(value) << CAN_TXBCR_CR18_Pos)) /* Assigment of value for CR18 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR19_Pos _UINT32_(19) /* (CAN_TXBCR) Cancellation Request 19 Position */ +#define CAN_TXBCR_CR19_Msk (_UINT32_(0x1) << CAN_TXBCR_CR19_Pos) /* (CAN_TXBCR) Cancellation Request 19 Mask */ +#define CAN_TXBCR_CR19(value) (CAN_TXBCR_CR19_Msk & (_UINT32_(value) << CAN_TXBCR_CR19_Pos)) /* Assigment of value for CR19 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR20_Pos _UINT32_(20) /* (CAN_TXBCR) Cancellation Request 20 Position */ +#define CAN_TXBCR_CR20_Msk (_UINT32_(0x1) << CAN_TXBCR_CR20_Pos) /* (CAN_TXBCR) Cancellation Request 20 Mask */ +#define CAN_TXBCR_CR20(value) (CAN_TXBCR_CR20_Msk & (_UINT32_(value) << CAN_TXBCR_CR20_Pos)) /* Assigment of value for CR20 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR21_Pos _UINT32_(21) /* (CAN_TXBCR) Cancellation Request 21 Position */ +#define CAN_TXBCR_CR21_Msk (_UINT32_(0x1) << CAN_TXBCR_CR21_Pos) /* (CAN_TXBCR) Cancellation Request 21 Mask */ +#define CAN_TXBCR_CR21(value) (CAN_TXBCR_CR21_Msk & (_UINT32_(value) << CAN_TXBCR_CR21_Pos)) /* Assigment of value for CR21 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR22_Pos _UINT32_(22) /* (CAN_TXBCR) Cancellation Request 22 Position */ +#define CAN_TXBCR_CR22_Msk (_UINT32_(0x1) << CAN_TXBCR_CR22_Pos) /* (CAN_TXBCR) Cancellation Request 22 Mask */ +#define CAN_TXBCR_CR22(value) (CAN_TXBCR_CR22_Msk & (_UINT32_(value) << CAN_TXBCR_CR22_Pos)) /* Assigment of value for CR22 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR23_Pos _UINT32_(23) /* (CAN_TXBCR) Cancellation Request 23 Position */ +#define CAN_TXBCR_CR23_Msk (_UINT32_(0x1) << CAN_TXBCR_CR23_Pos) /* (CAN_TXBCR) Cancellation Request 23 Mask */ +#define CAN_TXBCR_CR23(value) (CAN_TXBCR_CR23_Msk & (_UINT32_(value) << CAN_TXBCR_CR23_Pos)) /* Assigment of value for CR23 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR24_Pos _UINT32_(24) /* (CAN_TXBCR) Cancellation Request 24 Position */ +#define CAN_TXBCR_CR24_Msk (_UINT32_(0x1) << CAN_TXBCR_CR24_Pos) /* (CAN_TXBCR) Cancellation Request 24 Mask */ +#define CAN_TXBCR_CR24(value) (CAN_TXBCR_CR24_Msk & (_UINT32_(value) << CAN_TXBCR_CR24_Pos)) /* Assigment of value for CR24 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR25_Pos _UINT32_(25) /* (CAN_TXBCR) Cancellation Request 25 Position */ +#define CAN_TXBCR_CR25_Msk (_UINT32_(0x1) << CAN_TXBCR_CR25_Pos) /* (CAN_TXBCR) Cancellation Request 25 Mask */ +#define CAN_TXBCR_CR25(value) (CAN_TXBCR_CR25_Msk & (_UINT32_(value) << CAN_TXBCR_CR25_Pos)) /* Assigment of value for CR25 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR26_Pos _UINT32_(26) /* (CAN_TXBCR) Cancellation Request 26 Position */ +#define CAN_TXBCR_CR26_Msk (_UINT32_(0x1) << CAN_TXBCR_CR26_Pos) /* (CAN_TXBCR) Cancellation Request 26 Mask */ +#define CAN_TXBCR_CR26(value) (CAN_TXBCR_CR26_Msk & (_UINT32_(value) << CAN_TXBCR_CR26_Pos)) /* Assigment of value for CR26 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR27_Pos _UINT32_(27) /* (CAN_TXBCR) Cancellation Request 27 Position */ +#define CAN_TXBCR_CR27_Msk (_UINT32_(0x1) << CAN_TXBCR_CR27_Pos) /* (CAN_TXBCR) Cancellation Request 27 Mask */ +#define CAN_TXBCR_CR27(value) (CAN_TXBCR_CR27_Msk & (_UINT32_(value) << CAN_TXBCR_CR27_Pos)) /* Assigment of value for CR27 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR28_Pos _UINT32_(28) /* (CAN_TXBCR) Cancellation Request 28 Position */ +#define CAN_TXBCR_CR28_Msk (_UINT32_(0x1) << CAN_TXBCR_CR28_Pos) /* (CAN_TXBCR) Cancellation Request 28 Mask */ +#define CAN_TXBCR_CR28(value) (CAN_TXBCR_CR28_Msk & (_UINT32_(value) << CAN_TXBCR_CR28_Pos)) /* Assigment of value for CR28 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR29_Pos _UINT32_(29) /* (CAN_TXBCR) Cancellation Request 29 Position */ +#define CAN_TXBCR_CR29_Msk (_UINT32_(0x1) << CAN_TXBCR_CR29_Pos) /* (CAN_TXBCR) Cancellation Request 29 Mask */ +#define CAN_TXBCR_CR29(value) (CAN_TXBCR_CR29_Msk & (_UINT32_(value) << CAN_TXBCR_CR29_Pos)) /* Assigment of value for CR29 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR30_Pos _UINT32_(30) /* (CAN_TXBCR) Cancellation Request 30 Position */ +#define CAN_TXBCR_CR30_Msk (_UINT32_(0x1) << CAN_TXBCR_CR30_Pos) /* (CAN_TXBCR) Cancellation Request 30 Mask */ +#define CAN_TXBCR_CR30(value) (CAN_TXBCR_CR30_Msk & (_UINT32_(value) << CAN_TXBCR_CR30_Pos)) /* Assigment of value for CR30 in the CAN_TXBCR register */ +#define CAN_TXBCR_CR31_Pos _UINT32_(31) /* (CAN_TXBCR) Cancellation Request 31 Position */ +#define CAN_TXBCR_CR31_Msk (_UINT32_(0x1) << CAN_TXBCR_CR31_Pos) /* (CAN_TXBCR) Cancellation Request 31 Mask */ +#define CAN_TXBCR_CR31(value) (CAN_TXBCR_CR31_Msk & (_UINT32_(value) << CAN_TXBCR_CR31_Pos)) /* Assigment of value for CR31 in the CAN_TXBCR register */ +#define CAN_TXBCR_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBCR) Register Mask */ + +#define CAN_TXBCR_CR_Pos _UINT32_(0) /* (CAN_TXBCR Position) Cancellation Request 3x */ +#define CAN_TXBCR_CR_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBCR_CR_Pos) /* (CAN_TXBCR Mask) CR */ +#define CAN_TXBCR_CR(value) (CAN_TXBCR_CR_Msk & (_UINT32_(value) << CAN_TXBCR_CR_Pos)) + +/* -------- CAN_TXBTO : (CAN Offset: 0xD8) ( R/ 32) Tx Buffer Transmission Occurred -------- */ +#define CAN_TXBTO_RESETVALUE _UINT32_(0x00) /* (CAN_TXBTO) Tx Buffer Transmission Occurred Reset Value */ + +#define CAN_TXBTO_TO0_Pos _UINT32_(0) /* (CAN_TXBTO) Transmission Occurred 0 Position */ +#define CAN_TXBTO_TO0_Msk (_UINT32_(0x1) << CAN_TXBTO_TO0_Pos) /* (CAN_TXBTO) Transmission Occurred 0 Mask */ +#define CAN_TXBTO_TO0(value) (CAN_TXBTO_TO0_Msk & (_UINT32_(value) << CAN_TXBTO_TO0_Pos)) /* Assigment of value for TO0 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO1_Pos _UINT32_(1) /* (CAN_TXBTO) Transmission Occurred 1 Position */ +#define CAN_TXBTO_TO1_Msk (_UINT32_(0x1) << CAN_TXBTO_TO1_Pos) /* (CAN_TXBTO) Transmission Occurred 1 Mask */ +#define CAN_TXBTO_TO1(value) (CAN_TXBTO_TO1_Msk & (_UINT32_(value) << CAN_TXBTO_TO1_Pos)) /* Assigment of value for TO1 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO2_Pos _UINT32_(2) /* (CAN_TXBTO) Transmission Occurred 2 Position */ +#define CAN_TXBTO_TO2_Msk (_UINT32_(0x1) << CAN_TXBTO_TO2_Pos) /* (CAN_TXBTO) Transmission Occurred 2 Mask */ +#define CAN_TXBTO_TO2(value) (CAN_TXBTO_TO2_Msk & (_UINT32_(value) << CAN_TXBTO_TO2_Pos)) /* Assigment of value for TO2 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO3_Pos _UINT32_(3) /* (CAN_TXBTO) Transmission Occurred 3 Position */ +#define CAN_TXBTO_TO3_Msk (_UINT32_(0x1) << CAN_TXBTO_TO3_Pos) /* (CAN_TXBTO) Transmission Occurred 3 Mask */ +#define CAN_TXBTO_TO3(value) (CAN_TXBTO_TO3_Msk & (_UINT32_(value) << CAN_TXBTO_TO3_Pos)) /* Assigment of value for TO3 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO4_Pos _UINT32_(4) /* (CAN_TXBTO) Transmission Occurred 4 Position */ +#define CAN_TXBTO_TO4_Msk (_UINT32_(0x1) << CAN_TXBTO_TO4_Pos) /* (CAN_TXBTO) Transmission Occurred 4 Mask */ +#define CAN_TXBTO_TO4(value) (CAN_TXBTO_TO4_Msk & (_UINT32_(value) << CAN_TXBTO_TO4_Pos)) /* Assigment of value for TO4 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO5_Pos _UINT32_(5) /* (CAN_TXBTO) Transmission Occurred 5 Position */ +#define CAN_TXBTO_TO5_Msk (_UINT32_(0x1) << CAN_TXBTO_TO5_Pos) /* (CAN_TXBTO) Transmission Occurred 5 Mask */ +#define CAN_TXBTO_TO5(value) (CAN_TXBTO_TO5_Msk & (_UINT32_(value) << CAN_TXBTO_TO5_Pos)) /* Assigment of value for TO5 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO6_Pos _UINT32_(6) /* (CAN_TXBTO) Transmission Occurred 6 Position */ +#define CAN_TXBTO_TO6_Msk (_UINT32_(0x1) << CAN_TXBTO_TO6_Pos) /* (CAN_TXBTO) Transmission Occurred 6 Mask */ +#define CAN_TXBTO_TO6(value) (CAN_TXBTO_TO6_Msk & (_UINT32_(value) << CAN_TXBTO_TO6_Pos)) /* Assigment of value for TO6 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO7_Pos _UINT32_(7) /* (CAN_TXBTO) Transmission Occurred 7 Position */ +#define CAN_TXBTO_TO7_Msk (_UINT32_(0x1) << CAN_TXBTO_TO7_Pos) /* (CAN_TXBTO) Transmission Occurred 7 Mask */ +#define CAN_TXBTO_TO7(value) (CAN_TXBTO_TO7_Msk & (_UINT32_(value) << CAN_TXBTO_TO7_Pos)) /* Assigment of value for TO7 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO8_Pos _UINT32_(8) /* (CAN_TXBTO) Transmission Occurred 8 Position */ +#define CAN_TXBTO_TO8_Msk (_UINT32_(0x1) << CAN_TXBTO_TO8_Pos) /* (CAN_TXBTO) Transmission Occurred 8 Mask */ +#define CAN_TXBTO_TO8(value) (CAN_TXBTO_TO8_Msk & (_UINT32_(value) << CAN_TXBTO_TO8_Pos)) /* Assigment of value for TO8 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO9_Pos _UINT32_(9) /* (CAN_TXBTO) Transmission Occurred 9 Position */ +#define CAN_TXBTO_TO9_Msk (_UINT32_(0x1) << CAN_TXBTO_TO9_Pos) /* (CAN_TXBTO) Transmission Occurred 9 Mask */ +#define CAN_TXBTO_TO9(value) (CAN_TXBTO_TO9_Msk & (_UINT32_(value) << CAN_TXBTO_TO9_Pos)) /* Assigment of value for TO9 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO10_Pos _UINT32_(10) /* (CAN_TXBTO) Transmission Occurred 10 Position */ +#define CAN_TXBTO_TO10_Msk (_UINT32_(0x1) << CAN_TXBTO_TO10_Pos) /* (CAN_TXBTO) Transmission Occurred 10 Mask */ +#define CAN_TXBTO_TO10(value) (CAN_TXBTO_TO10_Msk & (_UINT32_(value) << CAN_TXBTO_TO10_Pos)) /* Assigment of value for TO10 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO11_Pos _UINT32_(11) /* (CAN_TXBTO) Transmission Occurred 11 Position */ +#define CAN_TXBTO_TO11_Msk (_UINT32_(0x1) << CAN_TXBTO_TO11_Pos) /* (CAN_TXBTO) Transmission Occurred 11 Mask */ +#define CAN_TXBTO_TO11(value) (CAN_TXBTO_TO11_Msk & (_UINT32_(value) << CAN_TXBTO_TO11_Pos)) /* Assigment of value for TO11 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO12_Pos _UINT32_(12) /* (CAN_TXBTO) Transmission Occurred 12 Position */ +#define CAN_TXBTO_TO12_Msk (_UINT32_(0x1) << CAN_TXBTO_TO12_Pos) /* (CAN_TXBTO) Transmission Occurred 12 Mask */ +#define CAN_TXBTO_TO12(value) (CAN_TXBTO_TO12_Msk & (_UINT32_(value) << CAN_TXBTO_TO12_Pos)) /* Assigment of value for TO12 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO13_Pos _UINT32_(13) /* (CAN_TXBTO) Transmission Occurred 13 Position */ +#define CAN_TXBTO_TO13_Msk (_UINT32_(0x1) << CAN_TXBTO_TO13_Pos) /* (CAN_TXBTO) Transmission Occurred 13 Mask */ +#define CAN_TXBTO_TO13(value) (CAN_TXBTO_TO13_Msk & (_UINT32_(value) << CAN_TXBTO_TO13_Pos)) /* Assigment of value for TO13 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO14_Pos _UINT32_(14) /* (CAN_TXBTO) Transmission Occurred 14 Position */ +#define CAN_TXBTO_TO14_Msk (_UINT32_(0x1) << CAN_TXBTO_TO14_Pos) /* (CAN_TXBTO) Transmission Occurred 14 Mask */ +#define CAN_TXBTO_TO14(value) (CAN_TXBTO_TO14_Msk & (_UINT32_(value) << CAN_TXBTO_TO14_Pos)) /* Assigment of value for TO14 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO15_Pos _UINT32_(15) /* (CAN_TXBTO) Transmission Occurred 15 Position */ +#define CAN_TXBTO_TO15_Msk (_UINT32_(0x1) << CAN_TXBTO_TO15_Pos) /* (CAN_TXBTO) Transmission Occurred 15 Mask */ +#define CAN_TXBTO_TO15(value) (CAN_TXBTO_TO15_Msk & (_UINT32_(value) << CAN_TXBTO_TO15_Pos)) /* Assigment of value for TO15 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO16_Pos _UINT32_(16) /* (CAN_TXBTO) Transmission Occurred 16 Position */ +#define CAN_TXBTO_TO16_Msk (_UINT32_(0x1) << CAN_TXBTO_TO16_Pos) /* (CAN_TXBTO) Transmission Occurred 16 Mask */ +#define CAN_TXBTO_TO16(value) (CAN_TXBTO_TO16_Msk & (_UINT32_(value) << CAN_TXBTO_TO16_Pos)) /* Assigment of value for TO16 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO17_Pos _UINT32_(17) /* (CAN_TXBTO) Transmission Occurred 17 Position */ +#define CAN_TXBTO_TO17_Msk (_UINT32_(0x1) << CAN_TXBTO_TO17_Pos) /* (CAN_TXBTO) Transmission Occurred 17 Mask */ +#define CAN_TXBTO_TO17(value) (CAN_TXBTO_TO17_Msk & (_UINT32_(value) << CAN_TXBTO_TO17_Pos)) /* Assigment of value for TO17 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO18_Pos _UINT32_(18) /* (CAN_TXBTO) Transmission Occurred 18 Position */ +#define CAN_TXBTO_TO18_Msk (_UINT32_(0x1) << CAN_TXBTO_TO18_Pos) /* (CAN_TXBTO) Transmission Occurred 18 Mask */ +#define CAN_TXBTO_TO18(value) (CAN_TXBTO_TO18_Msk & (_UINT32_(value) << CAN_TXBTO_TO18_Pos)) /* Assigment of value for TO18 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO19_Pos _UINT32_(19) /* (CAN_TXBTO) Transmission Occurred 19 Position */ +#define CAN_TXBTO_TO19_Msk (_UINT32_(0x1) << CAN_TXBTO_TO19_Pos) /* (CAN_TXBTO) Transmission Occurred 19 Mask */ +#define CAN_TXBTO_TO19(value) (CAN_TXBTO_TO19_Msk & (_UINT32_(value) << CAN_TXBTO_TO19_Pos)) /* Assigment of value for TO19 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO20_Pos _UINT32_(20) /* (CAN_TXBTO) Transmission Occurred 20 Position */ +#define CAN_TXBTO_TO20_Msk (_UINT32_(0x1) << CAN_TXBTO_TO20_Pos) /* (CAN_TXBTO) Transmission Occurred 20 Mask */ +#define CAN_TXBTO_TO20(value) (CAN_TXBTO_TO20_Msk & (_UINT32_(value) << CAN_TXBTO_TO20_Pos)) /* Assigment of value for TO20 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO21_Pos _UINT32_(21) /* (CAN_TXBTO) Transmission Occurred 21 Position */ +#define CAN_TXBTO_TO21_Msk (_UINT32_(0x1) << CAN_TXBTO_TO21_Pos) /* (CAN_TXBTO) Transmission Occurred 21 Mask */ +#define CAN_TXBTO_TO21(value) (CAN_TXBTO_TO21_Msk & (_UINT32_(value) << CAN_TXBTO_TO21_Pos)) /* Assigment of value for TO21 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO22_Pos _UINT32_(22) /* (CAN_TXBTO) Transmission Occurred 22 Position */ +#define CAN_TXBTO_TO22_Msk (_UINT32_(0x1) << CAN_TXBTO_TO22_Pos) /* (CAN_TXBTO) Transmission Occurred 22 Mask */ +#define CAN_TXBTO_TO22(value) (CAN_TXBTO_TO22_Msk & (_UINT32_(value) << CAN_TXBTO_TO22_Pos)) /* Assigment of value for TO22 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO23_Pos _UINT32_(23) /* (CAN_TXBTO) Transmission Occurred 23 Position */ +#define CAN_TXBTO_TO23_Msk (_UINT32_(0x1) << CAN_TXBTO_TO23_Pos) /* (CAN_TXBTO) Transmission Occurred 23 Mask */ +#define CAN_TXBTO_TO23(value) (CAN_TXBTO_TO23_Msk & (_UINT32_(value) << CAN_TXBTO_TO23_Pos)) /* Assigment of value for TO23 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO24_Pos _UINT32_(24) /* (CAN_TXBTO) Transmission Occurred 24 Position */ +#define CAN_TXBTO_TO24_Msk (_UINT32_(0x1) << CAN_TXBTO_TO24_Pos) /* (CAN_TXBTO) Transmission Occurred 24 Mask */ +#define CAN_TXBTO_TO24(value) (CAN_TXBTO_TO24_Msk & (_UINT32_(value) << CAN_TXBTO_TO24_Pos)) /* Assigment of value for TO24 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO25_Pos _UINT32_(25) /* (CAN_TXBTO) Transmission Occurred 25 Position */ +#define CAN_TXBTO_TO25_Msk (_UINT32_(0x1) << CAN_TXBTO_TO25_Pos) /* (CAN_TXBTO) Transmission Occurred 25 Mask */ +#define CAN_TXBTO_TO25(value) (CAN_TXBTO_TO25_Msk & (_UINT32_(value) << CAN_TXBTO_TO25_Pos)) /* Assigment of value for TO25 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO26_Pos _UINT32_(26) /* (CAN_TXBTO) Transmission Occurred 26 Position */ +#define CAN_TXBTO_TO26_Msk (_UINT32_(0x1) << CAN_TXBTO_TO26_Pos) /* (CAN_TXBTO) Transmission Occurred 26 Mask */ +#define CAN_TXBTO_TO26(value) (CAN_TXBTO_TO26_Msk & (_UINT32_(value) << CAN_TXBTO_TO26_Pos)) /* Assigment of value for TO26 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO27_Pos _UINT32_(27) /* (CAN_TXBTO) Transmission Occurred 27 Position */ +#define CAN_TXBTO_TO27_Msk (_UINT32_(0x1) << CAN_TXBTO_TO27_Pos) /* (CAN_TXBTO) Transmission Occurred 27 Mask */ +#define CAN_TXBTO_TO27(value) (CAN_TXBTO_TO27_Msk & (_UINT32_(value) << CAN_TXBTO_TO27_Pos)) /* Assigment of value for TO27 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO28_Pos _UINT32_(28) /* (CAN_TXBTO) Transmission Occurred 28 Position */ +#define CAN_TXBTO_TO28_Msk (_UINT32_(0x1) << CAN_TXBTO_TO28_Pos) /* (CAN_TXBTO) Transmission Occurred 28 Mask */ +#define CAN_TXBTO_TO28(value) (CAN_TXBTO_TO28_Msk & (_UINT32_(value) << CAN_TXBTO_TO28_Pos)) /* Assigment of value for TO28 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO29_Pos _UINT32_(29) /* (CAN_TXBTO) Transmission Occurred 29 Position */ +#define CAN_TXBTO_TO29_Msk (_UINT32_(0x1) << CAN_TXBTO_TO29_Pos) /* (CAN_TXBTO) Transmission Occurred 29 Mask */ +#define CAN_TXBTO_TO29(value) (CAN_TXBTO_TO29_Msk & (_UINT32_(value) << CAN_TXBTO_TO29_Pos)) /* Assigment of value for TO29 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO30_Pos _UINT32_(30) /* (CAN_TXBTO) Transmission Occurred 30 Position */ +#define CAN_TXBTO_TO30_Msk (_UINT32_(0x1) << CAN_TXBTO_TO30_Pos) /* (CAN_TXBTO) Transmission Occurred 30 Mask */ +#define CAN_TXBTO_TO30(value) (CAN_TXBTO_TO30_Msk & (_UINT32_(value) << CAN_TXBTO_TO30_Pos)) /* Assigment of value for TO30 in the CAN_TXBTO register */ +#define CAN_TXBTO_TO31_Pos _UINT32_(31) /* (CAN_TXBTO) Transmission Occurred 31 Position */ +#define CAN_TXBTO_TO31_Msk (_UINT32_(0x1) << CAN_TXBTO_TO31_Pos) /* (CAN_TXBTO) Transmission Occurred 31 Mask */ +#define CAN_TXBTO_TO31(value) (CAN_TXBTO_TO31_Msk & (_UINT32_(value) << CAN_TXBTO_TO31_Pos)) /* Assigment of value for TO31 in the CAN_TXBTO register */ +#define CAN_TXBTO_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBTO) Register Mask */ + +#define CAN_TXBTO_TO_Pos _UINT32_(0) /* (CAN_TXBTO Position) Transmission Occurred 3x */ +#define CAN_TXBTO_TO_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBTO_TO_Pos) /* (CAN_TXBTO Mask) TO */ +#define CAN_TXBTO_TO(value) (CAN_TXBTO_TO_Msk & (_UINT32_(value) << CAN_TXBTO_TO_Pos)) + +/* -------- CAN_TXBCF : (CAN Offset: 0xDC) ( R/ 32) Tx Buffer Cancellation Finished -------- */ +#define CAN_TXBCF_RESETVALUE _UINT32_(0x00) /* (CAN_TXBCF) Tx Buffer Cancellation Finished Reset Value */ + +#define CAN_TXBCF_CF0_Pos _UINT32_(0) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 0 Position */ +#define CAN_TXBCF_CF0_Msk (_UINT32_(0x1) << CAN_TXBCF_CF0_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 0 Mask */ +#define CAN_TXBCF_CF0(value) (CAN_TXBCF_CF0_Msk & (_UINT32_(value) << CAN_TXBCF_CF0_Pos)) /* Assigment of value for CF0 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF1_Pos _UINT32_(1) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 1 Position */ +#define CAN_TXBCF_CF1_Msk (_UINT32_(0x1) << CAN_TXBCF_CF1_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 1 Mask */ +#define CAN_TXBCF_CF1(value) (CAN_TXBCF_CF1_Msk & (_UINT32_(value) << CAN_TXBCF_CF1_Pos)) /* Assigment of value for CF1 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF2_Pos _UINT32_(2) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 2 Position */ +#define CAN_TXBCF_CF2_Msk (_UINT32_(0x1) << CAN_TXBCF_CF2_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 2 Mask */ +#define CAN_TXBCF_CF2(value) (CAN_TXBCF_CF2_Msk & (_UINT32_(value) << CAN_TXBCF_CF2_Pos)) /* Assigment of value for CF2 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF3_Pos _UINT32_(3) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 3 Position */ +#define CAN_TXBCF_CF3_Msk (_UINT32_(0x1) << CAN_TXBCF_CF3_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 3 Mask */ +#define CAN_TXBCF_CF3(value) (CAN_TXBCF_CF3_Msk & (_UINT32_(value) << CAN_TXBCF_CF3_Pos)) /* Assigment of value for CF3 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF4_Pos _UINT32_(4) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 4 Position */ +#define CAN_TXBCF_CF4_Msk (_UINT32_(0x1) << CAN_TXBCF_CF4_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 4 Mask */ +#define CAN_TXBCF_CF4(value) (CAN_TXBCF_CF4_Msk & (_UINT32_(value) << CAN_TXBCF_CF4_Pos)) /* Assigment of value for CF4 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF5_Pos _UINT32_(5) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 5 Position */ +#define CAN_TXBCF_CF5_Msk (_UINT32_(0x1) << CAN_TXBCF_CF5_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 5 Mask */ +#define CAN_TXBCF_CF5(value) (CAN_TXBCF_CF5_Msk & (_UINT32_(value) << CAN_TXBCF_CF5_Pos)) /* Assigment of value for CF5 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF6_Pos _UINT32_(6) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 6 Position */ +#define CAN_TXBCF_CF6_Msk (_UINT32_(0x1) << CAN_TXBCF_CF6_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 6 Mask */ +#define CAN_TXBCF_CF6(value) (CAN_TXBCF_CF6_Msk & (_UINT32_(value) << CAN_TXBCF_CF6_Pos)) /* Assigment of value for CF6 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF7_Pos _UINT32_(7) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 7 Position */ +#define CAN_TXBCF_CF7_Msk (_UINT32_(0x1) << CAN_TXBCF_CF7_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 7 Mask */ +#define CAN_TXBCF_CF7(value) (CAN_TXBCF_CF7_Msk & (_UINT32_(value) << CAN_TXBCF_CF7_Pos)) /* Assigment of value for CF7 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF8_Pos _UINT32_(8) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 8 Position */ +#define CAN_TXBCF_CF8_Msk (_UINT32_(0x1) << CAN_TXBCF_CF8_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 8 Mask */ +#define CAN_TXBCF_CF8(value) (CAN_TXBCF_CF8_Msk & (_UINT32_(value) << CAN_TXBCF_CF8_Pos)) /* Assigment of value for CF8 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF9_Pos _UINT32_(9) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 9 Position */ +#define CAN_TXBCF_CF9_Msk (_UINT32_(0x1) << CAN_TXBCF_CF9_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 9 Mask */ +#define CAN_TXBCF_CF9(value) (CAN_TXBCF_CF9_Msk & (_UINT32_(value) << CAN_TXBCF_CF9_Pos)) /* Assigment of value for CF9 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF10_Pos _UINT32_(10) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 10 Position */ +#define CAN_TXBCF_CF10_Msk (_UINT32_(0x1) << CAN_TXBCF_CF10_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 10 Mask */ +#define CAN_TXBCF_CF10(value) (CAN_TXBCF_CF10_Msk & (_UINT32_(value) << CAN_TXBCF_CF10_Pos)) /* Assigment of value for CF10 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF11_Pos _UINT32_(11) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 11 Position */ +#define CAN_TXBCF_CF11_Msk (_UINT32_(0x1) << CAN_TXBCF_CF11_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 11 Mask */ +#define CAN_TXBCF_CF11(value) (CAN_TXBCF_CF11_Msk & (_UINT32_(value) << CAN_TXBCF_CF11_Pos)) /* Assigment of value for CF11 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF12_Pos _UINT32_(12) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 12 Position */ +#define CAN_TXBCF_CF12_Msk (_UINT32_(0x1) << CAN_TXBCF_CF12_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 12 Mask */ +#define CAN_TXBCF_CF12(value) (CAN_TXBCF_CF12_Msk & (_UINT32_(value) << CAN_TXBCF_CF12_Pos)) /* Assigment of value for CF12 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF13_Pos _UINT32_(13) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 13 Position */ +#define CAN_TXBCF_CF13_Msk (_UINT32_(0x1) << CAN_TXBCF_CF13_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 13 Mask */ +#define CAN_TXBCF_CF13(value) (CAN_TXBCF_CF13_Msk & (_UINT32_(value) << CAN_TXBCF_CF13_Pos)) /* Assigment of value for CF13 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF14_Pos _UINT32_(14) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 14 Position */ +#define CAN_TXBCF_CF14_Msk (_UINT32_(0x1) << CAN_TXBCF_CF14_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 14 Mask */ +#define CAN_TXBCF_CF14(value) (CAN_TXBCF_CF14_Msk & (_UINT32_(value) << CAN_TXBCF_CF14_Pos)) /* Assigment of value for CF14 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF15_Pos _UINT32_(15) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 15 Position */ +#define CAN_TXBCF_CF15_Msk (_UINT32_(0x1) << CAN_TXBCF_CF15_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 15 Mask */ +#define CAN_TXBCF_CF15(value) (CAN_TXBCF_CF15_Msk & (_UINT32_(value) << CAN_TXBCF_CF15_Pos)) /* Assigment of value for CF15 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF16_Pos _UINT32_(16) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 16 Position */ +#define CAN_TXBCF_CF16_Msk (_UINT32_(0x1) << CAN_TXBCF_CF16_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 16 Mask */ +#define CAN_TXBCF_CF16(value) (CAN_TXBCF_CF16_Msk & (_UINT32_(value) << CAN_TXBCF_CF16_Pos)) /* Assigment of value for CF16 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF17_Pos _UINT32_(17) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 17 Position */ +#define CAN_TXBCF_CF17_Msk (_UINT32_(0x1) << CAN_TXBCF_CF17_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 17 Mask */ +#define CAN_TXBCF_CF17(value) (CAN_TXBCF_CF17_Msk & (_UINT32_(value) << CAN_TXBCF_CF17_Pos)) /* Assigment of value for CF17 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF18_Pos _UINT32_(18) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 18 Position */ +#define CAN_TXBCF_CF18_Msk (_UINT32_(0x1) << CAN_TXBCF_CF18_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 18 Mask */ +#define CAN_TXBCF_CF18(value) (CAN_TXBCF_CF18_Msk & (_UINT32_(value) << CAN_TXBCF_CF18_Pos)) /* Assigment of value for CF18 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF19_Pos _UINT32_(19) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 19 Position */ +#define CAN_TXBCF_CF19_Msk (_UINT32_(0x1) << CAN_TXBCF_CF19_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 19 Mask */ +#define CAN_TXBCF_CF19(value) (CAN_TXBCF_CF19_Msk & (_UINT32_(value) << CAN_TXBCF_CF19_Pos)) /* Assigment of value for CF19 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF20_Pos _UINT32_(20) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 20 Position */ +#define CAN_TXBCF_CF20_Msk (_UINT32_(0x1) << CAN_TXBCF_CF20_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 20 Mask */ +#define CAN_TXBCF_CF20(value) (CAN_TXBCF_CF20_Msk & (_UINT32_(value) << CAN_TXBCF_CF20_Pos)) /* Assigment of value for CF20 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF21_Pos _UINT32_(21) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 21 Position */ +#define CAN_TXBCF_CF21_Msk (_UINT32_(0x1) << CAN_TXBCF_CF21_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 21 Mask */ +#define CAN_TXBCF_CF21(value) (CAN_TXBCF_CF21_Msk & (_UINT32_(value) << CAN_TXBCF_CF21_Pos)) /* Assigment of value for CF21 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF22_Pos _UINT32_(22) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 22 Position */ +#define CAN_TXBCF_CF22_Msk (_UINT32_(0x1) << CAN_TXBCF_CF22_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 22 Mask */ +#define CAN_TXBCF_CF22(value) (CAN_TXBCF_CF22_Msk & (_UINT32_(value) << CAN_TXBCF_CF22_Pos)) /* Assigment of value for CF22 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF23_Pos _UINT32_(23) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 23 Position */ +#define CAN_TXBCF_CF23_Msk (_UINT32_(0x1) << CAN_TXBCF_CF23_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 23 Mask */ +#define CAN_TXBCF_CF23(value) (CAN_TXBCF_CF23_Msk & (_UINT32_(value) << CAN_TXBCF_CF23_Pos)) /* Assigment of value for CF23 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF24_Pos _UINT32_(24) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 24 Position */ +#define CAN_TXBCF_CF24_Msk (_UINT32_(0x1) << CAN_TXBCF_CF24_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 24 Mask */ +#define CAN_TXBCF_CF24(value) (CAN_TXBCF_CF24_Msk & (_UINT32_(value) << CAN_TXBCF_CF24_Pos)) /* Assigment of value for CF24 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF25_Pos _UINT32_(25) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 25 Position */ +#define CAN_TXBCF_CF25_Msk (_UINT32_(0x1) << CAN_TXBCF_CF25_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 25 Mask */ +#define CAN_TXBCF_CF25(value) (CAN_TXBCF_CF25_Msk & (_UINT32_(value) << CAN_TXBCF_CF25_Pos)) /* Assigment of value for CF25 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF26_Pos _UINT32_(26) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 26 Position */ +#define CAN_TXBCF_CF26_Msk (_UINT32_(0x1) << CAN_TXBCF_CF26_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 26 Mask */ +#define CAN_TXBCF_CF26(value) (CAN_TXBCF_CF26_Msk & (_UINT32_(value) << CAN_TXBCF_CF26_Pos)) /* Assigment of value for CF26 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF27_Pos _UINT32_(27) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 27 Position */ +#define CAN_TXBCF_CF27_Msk (_UINT32_(0x1) << CAN_TXBCF_CF27_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 27 Mask */ +#define CAN_TXBCF_CF27(value) (CAN_TXBCF_CF27_Msk & (_UINT32_(value) << CAN_TXBCF_CF27_Pos)) /* Assigment of value for CF27 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF28_Pos _UINT32_(28) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 28 Position */ +#define CAN_TXBCF_CF28_Msk (_UINT32_(0x1) << CAN_TXBCF_CF28_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 28 Mask */ +#define CAN_TXBCF_CF28(value) (CAN_TXBCF_CF28_Msk & (_UINT32_(value) << CAN_TXBCF_CF28_Pos)) /* Assigment of value for CF28 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF29_Pos _UINT32_(29) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 29 Position */ +#define CAN_TXBCF_CF29_Msk (_UINT32_(0x1) << CAN_TXBCF_CF29_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 29 Mask */ +#define CAN_TXBCF_CF29(value) (CAN_TXBCF_CF29_Msk & (_UINT32_(value) << CAN_TXBCF_CF29_Pos)) /* Assigment of value for CF29 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF30_Pos _UINT32_(30) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 30 Position */ +#define CAN_TXBCF_CF30_Msk (_UINT32_(0x1) << CAN_TXBCF_CF30_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 30 Mask */ +#define CAN_TXBCF_CF30(value) (CAN_TXBCF_CF30_Msk & (_UINT32_(value) << CAN_TXBCF_CF30_Pos)) /* Assigment of value for CF30 in the CAN_TXBCF register */ +#define CAN_TXBCF_CF31_Pos _UINT32_(31) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 31 Position */ +#define CAN_TXBCF_CF31_Msk (_UINT32_(0x1) << CAN_TXBCF_CF31_Pos) /* (CAN_TXBCF) Tx Buffer Cancellation Finished 31 Mask */ +#define CAN_TXBCF_CF31(value) (CAN_TXBCF_CF31_Msk & (_UINT32_(value) << CAN_TXBCF_CF31_Pos)) /* Assigment of value for CF31 in the CAN_TXBCF register */ +#define CAN_TXBCF_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBCF) Register Mask */ + +#define CAN_TXBCF_CF_Pos _UINT32_(0) /* (CAN_TXBCF Position) Tx Buffer Cancellation Finished 3x */ +#define CAN_TXBCF_CF_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBCF_CF_Pos) /* (CAN_TXBCF Mask) CF */ +#define CAN_TXBCF_CF(value) (CAN_TXBCF_CF_Msk & (_UINT32_(value) << CAN_TXBCF_CF_Pos)) + +/* -------- CAN_TXBTIE : (CAN Offset: 0xE0) (R/W 32) Tx Buffer Transmission Interrupt Enable -------- */ +#define CAN_TXBTIE_RESETVALUE _UINT32_(0x00) /* (CAN_TXBTIE) Tx Buffer Transmission Interrupt Enable Reset Value */ + +#define CAN_TXBTIE_TIE0_Pos _UINT32_(0) /* (CAN_TXBTIE) Transmission Interrupt Enable 0 Position */ +#define CAN_TXBTIE_TIE0_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE0_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 0 Mask */ +#define CAN_TXBTIE_TIE0(value) (CAN_TXBTIE_TIE0_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE0_Pos)) /* Assigment of value for TIE0 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE1_Pos _UINT32_(1) /* (CAN_TXBTIE) Transmission Interrupt Enable 1 Position */ +#define CAN_TXBTIE_TIE1_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE1_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 1 Mask */ +#define CAN_TXBTIE_TIE1(value) (CAN_TXBTIE_TIE1_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE1_Pos)) /* Assigment of value for TIE1 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE2_Pos _UINT32_(2) /* (CAN_TXBTIE) Transmission Interrupt Enable 2 Position */ +#define CAN_TXBTIE_TIE2_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE2_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 2 Mask */ +#define CAN_TXBTIE_TIE2(value) (CAN_TXBTIE_TIE2_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE2_Pos)) /* Assigment of value for TIE2 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE3_Pos _UINT32_(3) /* (CAN_TXBTIE) Transmission Interrupt Enable 3 Position */ +#define CAN_TXBTIE_TIE3_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE3_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 3 Mask */ +#define CAN_TXBTIE_TIE3(value) (CAN_TXBTIE_TIE3_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE3_Pos)) /* Assigment of value for TIE3 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE4_Pos _UINT32_(4) /* (CAN_TXBTIE) Transmission Interrupt Enable 4 Position */ +#define CAN_TXBTIE_TIE4_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE4_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 4 Mask */ +#define CAN_TXBTIE_TIE4(value) (CAN_TXBTIE_TIE4_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE4_Pos)) /* Assigment of value for TIE4 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE5_Pos _UINT32_(5) /* (CAN_TXBTIE) Transmission Interrupt Enable 5 Position */ +#define CAN_TXBTIE_TIE5_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE5_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 5 Mask */ +#define CAN_TXBTIE_TIE5(value) (CAN_TXBTIE_TIE5_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE5_Pos)) /* Assigment of value for TIE5 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE6_Pos _UINT32_(6) /* (CAN_TXBTIE) Transmission Interrupt Enable 6 Position */ +#define CAN_TXBTIE_TIE6_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE6_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 6 Mask */ +#define CAN_TXBTIE_TIE6(value) (CAN_TXBTIE_TIE6_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE6_Pos)) /* Assigment of value for TIE6 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE7_Pos _UINT32_(7) /* (CAN_TXBTIE) Transmission Interrupt Enable 7 Position */ +#define CAN_TXBTIE_TIE7_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE7_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 7 Mask */ +#define CAN_TXBTIE_TIE7(value) (CAN_TXBTIE_TIE7_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE7_Pos)) /* Assigment of value for TIE7 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE8_Pos _UINT32_(8) /* (CAN_TXBTIE) Transmission Interrupt Enable 8 Position */ +#define CAN_TXBTIE_TIE8_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE8_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 8 Mask */ +#define CAN_TXBTIE_TIE8(value) (CAN_TXBTIE_TIE8_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE8_Pos)) /* Assigment of value for TIE8 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE9_Pos _UINT32_(9) /* (CAN_TXBTIE) Transmission Interrupt Enable 9 Position */ +#define CAN_TXBTIE_TIE9_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE9_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 9 Mask */ +#define CAN_TXBTIE_TIE9(value) (CAN_TXBTIE_TIE9_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE9_Pos)) /* Assigment of value for TIE9 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE10_Pos _UINT32_(10) /* (CAN_TXBTIE) Transmission Interrupt Enable 10 Position */ +#define CAN_TXBTIE_TIE10_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE10_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 10 Mask */ +#define CAN_TXBTIE_TIE10(value) (CAN_TXBTIE_TIE10_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE10_Pos)) /* Assigment of value for TIE10 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE11_Pos _UINT32_(11) /* (CAN_TXBTIE) Transmission Interrupt Enable 11 Position */ +#define CAN_TXBTIE_TIE11_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE11_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 11 Mask */ +#define CAN_TXBTIE_TIE11(value) (CAN_TXBTIE_TIE11_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE11_Pos)) /* Assigment of value for TIE11 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE12_Pos _UINT32_(12) /* (CAN_TXBTIE) Transmission Interrupt Enable 12 Position */ +#define CAN_TXBTIE_TIE12_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE12_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 12 Mask */ +#define CAN_TXBTIE_TIE12(value) (CAN_TXBTIE_TIE12_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE12_Pos)) /* Assigment of value for TIE12 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE13_Pos _UINT32_(13) /* (CAN_TXBTIE) Transmission Interrupt Enable 13 Position */ +#define CAN_TXBTIE_TIE13_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE13_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 13 Mask */ +#define CAN_TXBTIE_TIE13(value) (CAN_TXBTIE_TIE13_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE13_Pos)) /* Assigment of value for TIE13 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE14_Pos _UINT32_(14) /* (CAN_TXBTIE) Transmission Interrupt Enable 14 Position */ +#define CAN_TXBTIE_TIE14_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE14_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 14 Mask */ +#define CAN_TXBTIE_TIE14(value) (CAN_TXBTIE_TIE14_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE14_Pos)) /* Assigment of value for TIE14 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE15_Pos _UINT32_(15) /* (CAN_TXBTIE) Transmission Interrupt Enable 15 Position */ +#define CAN_TXBTIE_TIE15_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE15_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 15 Mask */ +#define CAN_TXBTIE_TIE15(value) (CAN_TXBTIE_TIE15_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE15_Pos)) /* Assigment of value for TIE15 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE16_Pos _UINT32_(16) /* (CAN_TXBTIE) Transmission Interrupt Enable 16 Position */ +#define CAN_TXBTIE_TIE16_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE16_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 16 Mask */ +#define CAN_TXBTIE_TIE16(value) (CAN_TXBTIE_TIE16_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE16_Pos)) /* Assigment of value for TIE16 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE17_Pos _UINT32_(17) /* (CAN_TXBTIE) Transmission Interrupt Enable 17 Position */ +#define CAN_TXBTIE_TIE17_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE17_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 17 Mask */ +#define CAN_TXBTIE_TIE17(value) (CAN_TXBTIE_TIE17_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE17_Pos)) /* Assigment of value for TIE17 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE18_Pos _UINT32_(18) /* (CAN_TXBTIE) Transmission Interrupt Enable 18 Position */ +#define CAN_TXBTIE_TIE18_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE18_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 18 Mask */ +#define CAN_TXBTIE_TIE18(value) (CAN_TXBTIE_TIE18_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE18_Pos)) /* Assigment of value for TIE18 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE19_Pos _UINT32_(19) /* (CAN_TXBTIE) Transmission Interrupt Enable 19 Position */ +#define CAN_TXBTIE_TIE19_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE19_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 19 Mask */ +#define CAN_TXBTIE_TIE19(value) (CAN_TXBTIE_TIE19_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE19_Pos)) /* Assigment of value for TIE19 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE20_Pos _UINT32_(20) /* (CAN_TXBTIE) Transmission Interrupt Enable 20 Position */ +#define CAN_TXBTIE_TIE20_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE20_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 20 Mask */ +#define CAN_TXBTIE_TIE20(value) (CAN_TXBTIE_TIE20_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE20_Pos)) /* Assigment of value for TIE20 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE21_Pos _UINT32_(21) /* (CAN_TXBTIE) Transmission Interrupt Enable 21 Position */ +#define CAN_TXBTIE_TIE21_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE21_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 21 Mask */ +#define CAN_TXBTIE_TIE21(value) (CAN_TXBTIE_TIE21_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE21_Pos)) /* Assigment of value for TIE21 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE22_Pos _UINT32_(22) /* (CAN_TXBTIE) Transmission Interrupt Enable 22 Position */ +#define CAN_TXBTIE_TIE22_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE22_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 22 Mask */ +#define CAN_TXBTIE_TIE22(value) (CAN_TXBTIE_TIE22_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE22_Pos)) /* Assigment of value for TIE22 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE23_Pos _UINT32_(23) /* (CAN_TXBTIE) Transmission Interrupt Enable 23 Position */ +#define CAN_TXBTIE_TIE23_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE23_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 23 Mask */ +#define CAN_TXBTIE_TIE23(value) (CAN_TXBTIE_TIE23_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE23_Pos)) /* Assigment of value for TIE23 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE24_Pos _UINT32_(24) /* (CAN_TXBTIE) Transmission Interrupt Enable 24 Position */ +#define CAN_TXBTIE_TIE24_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE24_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 24 Mask */ +#define CAN_TXBTIE_TIE24(value) (CAN_TXBTIE_TIE24_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE24_Pos)) /* Assigment of value for TIE24 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE25_Pos _UINT32_(25) /* (CAN_TXBTIE) Transmission Interrupt Enable 25 Position */ +#define CAN_TXBTIE_TIE25_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE25_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 25 Mask */ +#define CAN_TXBTIE_TIE25(value) (CAN_TXBTIE_TIE25_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE25_Pos)) /* Assigment of value for TIE25 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE26_Pos _UINT32_(26) /* (CAN_TXBTIE) Transmission Interrupt Enable 26 Position */ +#define CAN_TXBTIE_TIE26_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE26_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 26 Mask */ +#define CAN_TXBTIE_TIE26(value) (CAN_TXBTIE_TIE26_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE26_Pos)) /* Assigment of value for TIE26 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE27_Pos _UINT32_(27) /* (CAN_TXBTIE) Transmission Interrupt Enable 27 Position */ +#define CAN_TXBTIE_TIE27_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE27_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 27 Mask */ +#define CAN_TXBTIE_TIE27(value) (CAN_TXBTIE_TIE27_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE27_Pos)) /* Assigment of value for TIE27 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE28_Pos _UINT32_(28) /* (CAN_TXBTIE) Transmission Interrupt Enable 28 Position */ +#define CAN_TXBTIE_TIE28_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE28_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 28 Mask */ +#define CAN_TXBTIE_TIE28(value) (CAN_TXBTIE_TIE28_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE28_Pos)) /* Assigment of value for TIE28 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE29_Pos _UINT32_(29) /* (CAN_TXBTIE) Transmission Interrupt Enable 29 Position */ +#define CAN_TXBTIE_TIE29_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE29_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 29 Mask */ +#define CAN_TXBTIE_TIE29(value) (CAN_TXBTIE_TIE29_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE29_Pos)) /* Assigment of value for TIE29 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE30_Pos _UINT32_(30) /* (CAN_TXBTIE) Transmission Interrupt Enable 30 Position */ +#define CAN_TXBTIE_TIE30_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE30_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 30 Mask */ +#define CAN_TXBTIE_TIE30(value) (CAN_TXBTIE_TIE30_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE30_Pos)) /* Assigment of value for TIE30 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_TIE31_Pos _UINT32_(31) /* (CAN_TXBTIE) Transmission Interrupt Enable 31 Position */ +#define CAN_TXBTIE_TIE31_Msk (_UINT32_(0x1) << CAN_TXBTIE_TIE31_Pos) /* (CAN_TXBTIE) Transmission Interrupt Enable 31 Mask */ +#define CAN_TXBTIE_TIE31(value) (CAN_TXBTIE_TIE31_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE31_Pos)) /* Assigment of value for TIE31 in the CAN_TXBTIE register */ +#define CAN_TXBTIE_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBTIE) Register Mask */ + +#define CAN_TXBTIE_TIE_Pos _UINT32_(0) /* (CAN_TXBTIE Position) Transmission Interrupt Enable 3x */ +#define CAN_TXBTIE_TIE_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBTIE_TIE_Pos) /* (CAN_TXBTIE Mask) TIE */ +#define CAN_TXBTIE_TIE(value) (CAN_TXBTIE_TIE_Msk & (_UINT32_(value) << CAN_TXBTIE_TIE_Pos)) + +/* -------- CAN_TXBCIE : (CAN Offset: 0xE4) (R/W 32) Tx Buffer Cancellation Finished Interrupt Enable -------- */ +#define CAN_TXBCIE_RESETVALUE _UINT32_(0x00) /* (CAN_TXBCIE) Tx Buffer Cancellation Finished Interrupt Enable Reset Value */ + +#define CAN_TXBCIE_CFIE0_Pos _UINT32_(0) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 0 Position */ +#define CAN_TXBCIE_CFIE0_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE0_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 0 Mask */ +#define CAN_TXBCIE_CFIE0(value) (CAN_TXBCIE_CFIE0_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE0_Pos)) /* Assigment of value for CFIE0 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE1_Pos _UINT32_(1) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 1 Position */ +#define CAN_TXBCIE_CFIE1_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE1_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 1 Mask */ +#define CAN_TXBCIE_CFIE1(value) (CAN_TXBCIE_CFIE1_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE1_Pos)) /* Assigment of value for CFIE1 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE2_Pos _UINT32_(2) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 2 Position */ +#define CAN_TXBCIE_CFIE2_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE2_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 2 Mask */ +#define CAN_TXBCIE_CFIE2(value) (CAN_TXBCIE_CFIE2_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE2_Pos)) /* Assigment of value for CFIE2 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE3_Pos _UINT32_(3) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 3 Position */ +#define CAN_TXBCIE_CFIE3_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE3_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 3 Mask */ +#define CAN_TXBCIE_CFIE3(value) (CAN_TXBCIE_CFIE3_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE3_Pos)) /* Assigment of value for CFIE3 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE4_Pos _UINT32_(4) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 4 Position */ +#define CAN_TXBCIE_CFIE4_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE4_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 4 Mask */ +#define CAN_TXBCIE_CFIE4(value) (CAN_TXBCIE_CFIE4_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE4_Pos)) /* Assigment of value for CFIE4 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE5_Pos _UINT32_(5) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 5 Position */ +#define CAN_TXBCIE_CFIE5_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE5_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 5 Mask */ +#define CAN_TXBCIE_CFIE5(value) (CAN_TXBCIE_CFIE5_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE5_Pos)) /* Assigment of value for CFIE5 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE6_Pos _UINT32_(6) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 6 Position */ +#define CAN_TXBCIE_CFIE6_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE6_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 6 Mask */ +#define CAN_TXBCIE_CFIE6(value) (CAN_TXBCIE_CFIE6_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE6_Pos)) /* Assigment of value for CFIE6 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE7_Pos _UINT32_(7) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 7 Position */ +#define CAN_TXBCIE_CFIE7_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE7_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 7 Mask */ +#define CAN_TXBCIE_CFIE7(value) (CAN_TXBCIE_CFIE7_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE7_Pos)) /* Assigment of value for CFIE7 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE8_Pos _UINT32_(8) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 8 Position */ +#define CAN_TXBCIE_CFIE8_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE8_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 8 Mask */ +#define CAN_TXBCIE_CFIE8(value) (CAN_TXBCIE_CFIE8_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE8_Pos)) /* Assigment of value for CFIE8 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE9_Pos _UINT32_(9) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 9 Position */ +#define CAN_TXBCIE_CFIE9_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE9_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 9 Mask */ +#define CAN_TXBCIE_CFIE9(value) (CAN_TXBCIE_CFIE9_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE9_Pos)) /* Assigment of value for CFIE9 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE10_Pos _UINT32_(10) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 10 Position */ +#define CAN_TXBCIE_CFIE10_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE10_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 10 Mask */ +#define CAN_TXBCIE_CFIE10(value) (CAN_TXBCIE_CFIE10_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE10_Pos)) /* Assigment of value for CFIE10 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE11_Pos _UINT32_(11) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 11 Position */ +#define CAN_TXBCIE_CFIE11_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE11_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 11 Mask */ +#define CAN_TXBCIE_CFIE11(value) (CAN_TXBCIE_CFIE11_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE11_Pos)) /* Assigment of value for CFIE11 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE12_Pos _UINT32_(12) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 12 Position */ +#define CAN_TXBCIE_CFIE12_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE12_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 12 Mask */ +#define CAN_TXBCIE_CFIE12(value) (CAN_TXBCIE_CFIE12_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE12_Pos)) /* Assigment of value for CFIE12 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE13_Pos _UINT32_(13) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 13 Position */ +#define CAN_TXBCIE_CFIE13_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE13_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 13 Mask */ +#define CAN_TXBCIE_CFIE13(value) (CAN_TXBCIE_CFIE13_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE13_Pos)) /* Assigment of value for CFIE13 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE14_Pos _UINT32_(14) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 14 Position */ +#define CAN_TXBCIE_CFIE14_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE14_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 14 Mask */ +#define CAN_TXBCIE_CFIE14(value) (CAN_TXBCIE_CFIE14_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE14_Pos)) /* Assigment of value for CFIE14 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE15_Pos _UINT32_(15) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 15 Position */ +#define CAN_TXBCIE_CFIE15_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE15_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 15 Mask */ +#define CAN_TXBCIE_CFIE15(value) (CAN_TXBCIE_CFIE15_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE15_Pos)) /* Assigment of value for CFIE15 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE16_Pos _UINT32_(16) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 16 Position */ +#define CAN_TXBCIE_CFIE16_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE16_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 16 Mask */ +#define CAN_TXBCIE_CFIE16(value) (CAN_TXBCIE_CFIE16_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE16_Pos)) /* Assigment of value for CFIE16 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE17_Pos _UINT32_(17) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 17 Position */ +#define CAN_TXBCIE_CFIE17_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE17_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 17 Mask */ +#define CAN_TXBCIE_CFIE17(value) (CAN_TXBCIE_CFIE17_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE17_Pos)) /* Assigment of value for CFIE17 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE18_Pos _UINT32_(18) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 18 Position */ +#define CAN_TXBCIE_CFIE18_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE18_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 18 Mask */ +#define CAN_TXBCIE_CFIE18(value) (CAN_TXBCIE_CFIE18_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE18_Pos)) /* Assigment of value for CFIE18 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE19_Pos _UINT32_(19) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 19 Position */ +#define CAN_TXBCIE_CFIE19_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE19_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 19 Mask */ +#define CAN_TXBCIE_CFIE19(value) (CAN_TXBCIE_CFIE19_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE19_Pos)) /* Assigment of value for CFIE19 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE20_Pos _UINT32_(20) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 20 Position */ +#define CAN_TXBCIE_CFIE20_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE20_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 20 Mask */ +#define CAN_TXBCIE_CFIE20(value) (CAN_TXBCIE_CFIE20_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE20_Pos)) /* Assigment of value for CFIE20 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE21_Pos _UINT32_(21) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 21 Position */ +#define CAN_TXBCIE_CFIE21_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE21_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 21 Mask */ +#define CAN_TXBCIE_CFIE21(value) (CAN_TXBCIE_CFIE21_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE21_Pos)) /* Assigment of value for CFIE21 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE22_Pos _UINT32_(22) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 22 Position */ +#define CAN_TXBCIE_CFIE22_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE22_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 22 Mask */ +#define CAN_TXBCIE_CFIE22(value) (CAN_TXBCIE_CFIE22_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE22_Pos)) /* Assigment of value for CFIE22 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE23_Pos _UINT32_(23) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 23 Position */ +#define CAN_TXBCIE_CFIE23_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE23_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 23 Mask */ +#define CAN_TXBCIE_CFIE23(value) (CAN_TXBCIE_CFIE23_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE23_Pos)) /* Assigment of value for CFIE23 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE24_Pos _UINT32_(24) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 24 Position */ +#define CAN_TXBCIE_CFIE24_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE24_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 24 Mask */ +#define CAN_TXBCIE_CFIE24(value) (CAN_TXBCIE_CFIE24_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE24_Pos)) /* Assigment of value for CFIE24 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE25_Pos _UINT32_(25) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 25 Position */ +#define CAN_TXBCIE_CFIE25_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE25_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 25 Mask */ +#define CAN_TXBCIE_CFIE25(value) (CAN_TXBCIE_CFIE25_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE25_Pos)) /* Assigment of value for CFIE25 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE26_Pos _UINT32_(26) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 26 Position */ +#define CAN_TXBCIE_CFIE26_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE26_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 26 Mask */ +#define CAN_TXBCIE_CFIE26(value) (CAN_TXBCIE_CFIE26_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE26_Pos)) /* Assigment of value for CFIE26 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE27_Pos _UINT32_(27) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 27 Position */ +#define CAN_TXBCIE_CFIE27_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE27_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 27 Mask */ +#define CAN_TXBCIE_CFIE27(value) (CAN_TXBCIE_CFIE27_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE27_Pos)) /* Assigment of value for CFIE27 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE28_Pos _UINT32_(28) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 28 Position */ +#define CAN_TXBCIE_CFIE28_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE28_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 28 Mask */ +#define CAN_TXBCIE_CFIE28(value) (CAN_TXBCIE_CFIE28_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE28_Pos)) /* Assigment of value for CFIE28 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE29_Pos _UINT32_(29) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 29 Position */ +#define CAN_TXBCIE_CFIE29_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE29_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 29 Mask */ +#define CAN_TXBCIE_CFIE29(value) (CAN_TXBCIE_CFIE29_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE29_Pos)) /* Assigment of value for CFIE29 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE30_Pos _UINT32_(30) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 30 Position */ +#define CAN_TXBCIE_CFIE30_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE30_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 30 Mask */ +#define CAN_TXBCIE_CFIE30(value) (CAN_TXBCIE_CFIE30_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE30_Pos)) /* Assigment of value for CFIE30 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_CFIE31_Pos _UINT32_(31) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 31 Position */ +#define CAN_TXBCIE_CFIE31_Msk (_UINT32_(0x1) << CAN_TXBCIE_CFIE31_Pos) /* (CAN_TXBCIE) Cancellation Finished Interrupt Enable 31 Mask */ +#define CAN_TXBCIE_CFIE31(value) (CAN_TXBCIE_CFIE31_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE31_Pos)) /* Assigment of value for CFIE31 in the CAN_TXBCIE register */ +#define CAN_TXBCIE_Msk _UINT32_(0xFFFFFFFF) /* (CAN_TXBCIE) Register Mask */ + +#define CAN_TXBCIE_CFIE_Pos _UINT32_(0) /* (CAN_TXBCIE Position) Cancellation Finished Interrupt Enable 3x */ +#define CAN_TXBCIE_CFIE_Msk (_UINT32_(0xFFFFFFFF) << CAN_TXBCIE_CFIE_Pos) /* (CAN_TXBCIE Mask) CFIE */ +#define CAN_TXBCIE_CFIE(value) (CAN_TXBCIE_CFIE_Msk & (_UINT32_(value) << CAN_TXBCIE_CFIE_Pos)) + +/* -------- CAN_TXEFC : (CAN Offset: 0xF0) (R/W 32) Tx Event FIFO Configuration -------- */ +#define CAN_TXEFC_RESETVALUE _UINT32_(0x00) /* (CAN_TXEFC) Tx Event FIFO Configuration Reset Value */ + +#define CAN_TXEFC_EFSA_Pos _UINT32_(0) /* (CAN_TXEFC) Event FIFO Start Address Position */ +#define CAN_TXEFC_EFSA_Msk (_UINT32_(0xFFFF) << CAN_TXEFC_EFSA_Pos) /* (CAN_TXEFC) Event FIFO Start Address Mask */ +#define CAN_TXEFC_EFSA(value) (CAN_TXEFC_EFSA_Msk & (_UINT32_(value) << CAN_TXEFC_EFSA_Pos)) /* Assigment of value for EFSA in the CAN_TXEFC register */ +#define CAN_TXEFC_EFS_Pos _UINT32_(16) /* (CAN_TXEFC) Event FIFO Size Position */ +#define CAN_TXEFC_EFS_Msk (_UINT32_(0x3F) << CAN_TXEFC_EFS_Pos) /* (CAN_TXEFC) Event FIFO Size Mask */ +#define CAN_TXEFC_EFS(value) (CAN_TXEFC_EFS_Msk & (_UINT32_(value) << CAN_TXEFC_EFS_Pos)) /* Assigment of value for EFS in the CAN_TXEFC register */ +#define CAN_TXEFC_EFWM_Pos _UINT32_(24) /* (CAN_TXEFC) Event FIFO Watermark Position */ +#define CAN_TXEFC_EFWM_Msk (_UINT32_(0x3F) << CAN_TXEFC_EFWM_Pos) /* (CAN_TXEFC) Event FIFO Watermark Mask */ +#define CAN_TXEFC_EFWM(value) (CAN_TXEFC_EFWM_Msk & (_UINT32_(value) << CAN_TXEFC_EFWM_Pos)) /* Assigment of value for EFWM in the CAN_TXEFC register */ +#define CAN_TXEFC_Msk _UINT32_(0x3F3FFFFF) /* (CAN_TXEFC) Register Mask */ + + +/* -------- CAN_TXEFS : (CAN Offset: 0xF4) ( R/ 32) Tx Event FIFO Status -------- */ +#define CAN_TXEFS_RESETVALUE _UINT32_(0x00) /* (CAN_TXEFS) Tx Event FIFO Status Reset Value */ + +#define CAN_TXEFS_EFFL_Pos _UINT32_(0) /* (CAN_TXEFS) Event FIFO Fill Level Position */ +#define CAN_TXEFS_EFFL_Msk (_UINT32_(0x3F) << CAN_TXEFS_EFFL_Pos) /* (CAN_TXEFS) Event FIFO Fill Level Mask */ +#define CAN_TXEFS_EFFL(value) (CAN_TXEFS_EFFL_Msk & (_UINT32_(value) << CAN_TXEFS_EFFL_Pos)) /* Assigment of value for EFFL in the CAN_TXEFS register */ +#define CAN_TXEFS_EFGI_Pos _UINT32_(8) /* (CAN_TXEFS) Event FIFO Get Index Position */ +#define CAN_TXEFS_EFGI_Msk (_UINT32_(0x1F) << CAN_TXEFS_EFGI_Pos) /* (CAN_TXEFS) Event FIFO Get Index Mask */ +#define CAN_TXEFS_EFGI(value) (CAN_TXEFS_EFGI_Msk & (_UINT32_(value) << CAN_TXEFS_EFGI_Pos)) /* Assigment of value for EFGI in the CAN_TXEFS register */ +#define CAN_TXEFS_EFPI_Pos _UINT32_(16) /* (CAN_TXEFS) Event FIFO Put Index Position */ +#define CAN_TXEFS_EFPI_Msk (_UINT32_(0x1F) << CAN_TXEFS_EFPI_Pos) /* (CAN_TXEFS) Event FIFO Put Index Mask */ +#define CAN_TXEFS_EFPI(value) (CAN_TXEFS_EFPI_Msk & (_UINT32_(value) << CAN_TXEFS_EFPI_Pos)) /* Assigment of value for EFPI in the CAN_TXEFS register */ +#define CAN_TXEFS_EFF_Pos _UINT32_(24) /* (CAN_TXEFS) Event FIFO Full Position */ +#define CAN_TXEFS_EFF_Msk (_UINT32_(0x1) << CAN_TXEFS_EFF_Pos) /* (CAN_TXEFS) Event FIFO Full Mask */ +#define CAN_TXEFS_EFF(value) (CAN_TXEFS_EFF_Msk & (_UINT32_(value) << CAN_TXEFS_EFF_Pos)) /* Assigment of value for EFF in the CAN_TXEFS register */ +#define CAN_TXEFS_TEFL_Pos _UINT32_(25) /* (CAN_TXEFS) Tx Event FIFO Element Lost Position */ +#define CAN_TXEFS_TEFL_Msk (_UINT32_(0x1) << CAN_TXEFS_TEFL_Pos) /* (CAN_TXEFS) Tx Event FIFO Element Lost Mask */ +#define CAN_TXEFS_TEFL(value) (CAN_TXEFS_TEFL_Msk & (_UINT32_(value) << CAN_TXEFS_TEFL_Pos)) /* Assigment of value for TEFL in the CAN_TXEFS register */ +#define CAN_TXEFS_Msk _UINT32_(0x031F1F3F) /* (CAN_TXEFS) Register Mask */ + + +/* -------- CAN_TXEFA : (CAN Offset: 0xF8) (R/W 32) Tx Event FIFO Acknowledge -------- */ +#define CAN_TXEFA_RESETVALUE _UINT32_(0x00) /* (CAN_TXEFA) Tx Event FIFO Acknowledge Reset Value */ + +#define CAN_TXEFA_EFAI_Pos _UINT32_(0) /* (CAN_TXEFA) Event FIFO Acknowledge Index Position */ +#define CAN_TXEFA_EFAI_Msk (_UINT32_(0x1F) << CAN_TXEFA_EFAI_Pos) /* (CAN_TXEFA) Event FIFO Acknowledge Index Mask */ +#define CAN_TXEFA_EFAI(value) (CAN_TXEFA_EFAI_Msk & (_UINT32_(value) << CAN_TXEFA_EFAI_Pos)) /* Assigment of value for EFAI in the CAN_TXEFA register */ +#define CAN_TXEFA_Msk _UINT32_(0x0000001F) /* (CAN_TXEFA) Register Mask */ + + +/** \brief CAN register offsets definitions */ +#define CAN_RXBE_0_REG_OFST _UINT32_(0x00) /* (CAN_RXBE_0) Rx Buffer Element 0 Offset */ +#define CAN_RXBE_1_REG_OFST _UINT32_(0x04) /* (CAN_RXBE_1) Rx Buffer Element 1 Offset */ +#define CAN_RXBE_DATA_REG_OFST _UINT32_(0x08) /* (CAN_RXBE_DATA) Rx Buffer Element Data Offset */ +#define CAN_RXF0E_0_REG_OFST _UINT32_(0x00) /* (CAN_RXF0E_0) Rx FIFO 0 Element 0 Offset */ +#define CAN_RXF0E_1_REG_OFST _UINT32_(0x04) /* (CAN_RXF0E_1) Rx FIFO 0 Element 1 Offset */ +#define CAN_RXF0E_DATA_REG_OFST _UINT32_(0x08) /* (CAN_RXF0E_DATA) Rx FIFO 0 Element Data Offset */ +#define CAN_RXF1E_0_REG_OFST _UINT32_(0x00) /* (CAN_RXF1E_0) Rx FIFO 1 Element 0 Offset */ +#define CAN_RXF1E_1_REG_OFST _UINT32_(0x04) /* (CAN_RXF1E_1) Rx FIFO 1 Element 1 Offset */ +#define CAN_RXF1E_DATA_REG_OFST _UINT32_(0x08) /* (CAN_RXF1E_DATA) Rx FIFO 1 Element Data Offset */ +#define CAN_TXBE_0_REG_OFST _UINT32_(0x00) /* (CAN_TXBE_0) Tx Buffer Element 0 Offset */ +#define CAN_TXBE_1_REG_OFST _UINT32_(0x04) /* (CAN_TXBE_1) Tx Buffer Element 1 Offset */ +#define CAN_TXBE_DATA_REG_OFST _UINT32_(0x08) /* (CAN_TXBE_DATA) Tx Buffer Element Data Offset */ +#define CAN_TXEFE_0_REG_OFST _UINT32_(0x00) /* (CAN_TXEFE_0) Tx Event FIFO Element 0 Offset */ +#define CAN_TXEFE_1_REG_OFST _UINT32_(0x04) /* (CAN_TXEFE_1) Tx Event FIFO Element 1 Offset */ +#define CAN_SIDFE_0_REG_OFST _UINT32_(0x00) /* (CAN_SIDFE_0) Standard Message ID Filter Element 0 Offset */ +#define CAN_XIDFE_0_REG_OFST _UINT32_(0x00) /* (CAN_XIDFE_0) Extended Message ID Filter Element 0 Offset */ +#define CAN_XIDFE_1_REG_OFST _UINT32_(0x04) /* (CAN_XIDFE_1) Extended Message ID Filter Element 1 Offset */ +#define CAN_CREL_REG_OFST _UINT32_(0x00) /* (CAN_CREL) Core Release Offset */ +#define CAN_ENDN_REG_OFST _UINT32_(0x04) /* (CAN_ENDN) Endian Offset */ +#define CAN_MRCFG_REG_OFST _UINT32_(0x08) /* (CAN_MRCFG) Message RAM Configuration Offset */ +#define CAN_DBTP_REG_OFST _UINT32_(0x0C) /* (CAN_DBTP) Fast Bit Timing and Prescaler Offset */ +#define CAN_TEST_REG_OFST _UINT32_(0x10) /* (CAN_TEST) Test Offset */ +#define CAN_RWD_REG_OFST _UINT32_(0x14) /* (CAN_RWD) RAM Watchdog Offset */ +#define CAN_CCCR_REG_OFST _UINT32_(0x18) /* (CAN_CCCR) CC Control Offset */ +#define CAN_NBTP_REG_OFST _UINT32_(0x1C) /* (CAN_NBTP) Nominal Bit Timing and Prescaler Offset */ +#define CAN_TSCC_REG_OFST _UINT32_(0x20) /* (CAN_TSCC) Timestamp Counter Configuration Offset */ +#define CAN_TSCV_REG_OFST _UINT32_(0x24) /* (CAN_TSCV) Timestamp Counter Value Offset */ +#define CAN_TOCC_REG_OFST _UINT32_(0x28) /* (CAN_TOCC) Timeout Counter Configuration Offset */ +#define CAN_TOCV_REG_OFST _UINT32_(0x2C) /* (CAN_TOCV) Timeout Counter Value Offset */ +#define CAN_ECR_REG_OFST _UINT32_(0x40) /* (CAN_ECR) Error Counter Offset */ +#define CAN_PSR_REG_OFST _UINT32_(0x44) /* (CAN_PSR) Protocol Status Offset */ +#define CAN_TDCR_REG_OFST _UINT32_(0x48) /* (CAN_TDCR) Extended ID Filter Configuration Offset */ +#define CAN_IR_REG_OFST _UINT32_(0x50) /* (CAN_IR) Interrupt Offset */ +#define CAN_IE_REG_OFST _UINT32_(0x54) /* (CAN_IE) Interrupt Enable Offset */ +#define CAN_ILS_REG_OFST _UINT32_(0x58) /* (CAN_ILS) Interrupt Line Select Offset */ +#define CAN_ILE_REG_OFST _UINT32_(0x5C) /* (CAN_ILE) Interrupt Line Enable Offset */ +#define CAN_GFC_REG_OFST _UINT32_(0x80) /* (CAN_GFC) Global Filter Configuration Offset */ +#define CAN_SIDFC_REG_OFST _UINT32_(0x84) /* (CAN_SIDFC) Standard ID Filter Configuration Offset */ +#define CAN_XIDFC_REG_OFST _UINT32_(0x88) /* (CAN_XIDFC) Extended ID Filter Configuration Offset */ +#define CAN_XIDAM_REG_OFST _UINT32_(0x90) /* (CAN_XIDAM) Extended ID AND Mask Offset */ +#define CAN_HPMS_REG_OFST _UINT32_(0x94) /* (CAN_HPMS) High Priority Message Status Offset */ +#define CAN_NDAT1_REG_OFST _UINT32_(0x98) /* (CAN_NDAT1) New Data 1 Offset */ +#define CAN_NDAT2_REG_OFST _UINT32_(0x9C) /* (CAN_NDAT2) New Data 2 Offset */ +#define CAN_RXF0C_REG_OFST _UINT32_(0xA0) /* (CAN_RXF0C) Rx FIFO 0 Configuration Offset */ +#define CAN_RXF0S_REG_OFST _UINT32_(0xA4) /* (CAN_RXF0S) Rx FIFO 0 Status Offset */ +#define CAN_RXF0A_REG_OFST _UINT32_(0xA8) /* (CAN_RXF0A) Rx FIFO 0 Acknowledge Offset */ +#define CAN_RXBC_REG_OFST _UINT32_(0xAC) /* (CAN_RXBC) Rx Buffer Configuration Offset */ +#define CAN_RXF1C_REG_OFST _UINT32_(0xB0) /* (CAN_RXF1C) Rx FIFO 1 Configuration Offset */ +#define CAN_RXF1S_REG_OFST _UINT32_(0xB4) /* (CAN_RXF1S) Rx FIFO 1 Status Offset */ +#define CAN_RXF1A_REG_OFST _UINT32_(0xB8) /* (CAN_RXF1A) Rx FIFO 1 Acknowledge Offset */ +#define CAN_RXESC_REG_OFST _UINT32_(0xBC) /* (CAN_RXESC) Rx Buffer / FIFO Element Size Configuration Offset */ +#define CAN_TXBC_REG_OFST _UINT32_(0xC0) /* (CAN_TXBC) Tx Buffer Configuration Offset */ +#define CAN_TXFQS_REG_OFST _UINT32_(0xC4) /* (CAN_TXFQS) Tx FIFO / Queue Status Offset */ +#define CAN_TXESC_REG_OFST _UINT32_(0xC8) /* (CAN_TXESC) Tx Buffer Element Size Configuration Offset */ +#define CAN_TXBRP_REG_OFST _UINT32_(0xCC) /* (CAN_TXBRP) Tx Buffer Request Pending Offset */ +#define CAN_TXBAR_REG_OFST _UINT32_(0xD0) /* (CAN_TXBAR) Tx Buffer Add Request Offset */ +#define CAN_TXBCR_REG_OFST _UINT32_(0xD4) /* (CAN_TXBCR) Tx Buffer Cancellation Request Offset */ +#define CAN_TXBTO_REG_OFST _UINT32_(0xD8) /* (CAN_TXBTO) Tx Buffer Transmission Occurred Offset */ +#define CAN_TXBCF_REG_OFST _UINT32_(0xDC) /* (CAN_TXBCF) Tx Buffer Cancellation Finished Offset */ +#define CAN_TXBTIE_REG_OFST _UINT32_(0xE0) /* (CAN_TXBTIE) Tx Buffer Transmission Interrupt Enable Offset */ +#define CAN_TXBCIE_REG_OFST _UINT32_(0xE4) /* (CAN_TXBCIE) Tx Buffer Cancellation Finished Interrupt Enable Offset */ +#define CAN_TXEFC_REG_OFST _UINT32_(0xF0) /* (CAN_TXEFC) Tx Event FIFO Configuration Offset */ +#define CAN_TXEFS_REG_OFST _UINT32_(0xF4) /* (CAN_TXEFS) Tx Event FIFO Status Offset */ +#define CAN_TXEFA_REG_OFST _UINT32_(0xF8) /* (CAN_TXEFA) Tx Event FIFO Acknowledge Offset */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief CAN_RXBE register API structure */ +typedef struct +{ /* Rx Buffer Element */ + __IO uint32_t CAN_RXBE_0; /**< Offset: 0x00 (R/W 32) Rx Buffer Element 0 */ + __IO uint32_t CAN_RXBE_1; /**< Offset: 0x04 (R/W 32) Rx Buffer Element 1 */ + __IO uint32_t CAN_RXBE_DATA; /**< Offset: 0x08 (R/W 32) Rx Buffer Element Data */ +} can_rxbe_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN_RXF0E register API structure */ +typedef struct +{ /* Rx FIFO 0 Element */ + __IO uint32_t CAN_RXF0E_0; /**< Offset: 0x00 (R/W 32) Rx FIFO 0 Element 0 */ + __IO uint32_t CAN_RXF0E_1; /**< Offset: 0x04 (R/W 32) Rx FIFO 0 Element 1 */ + __IO uint32_t CAN_RXF0E_DATA; /**< Offset: 0x08 (R/W 32) Rx FIFO 0 Element Data */ +} can_rxf0e_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN_RXF1E register API structure */ +typedef struct +{ /* Rx FIFO 1 Element */ + __IO uint32_t CAN_RXF1E_0; /**< Offset: 0x00 (R/W 32) Rx FIFO 1 Element 0 */ + __IO uint32_t CAN_RXF1E_1; /**< Offset: 0x04 (R/W 32) Rx FIFO 1 Element 1 */ + __IO uint32_t CAN_RXF1E_DATA; /**< Offset: 0x08 (R/W 32) Rx FIFO 1 Element Data */ +} can_rxf1e_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN_TXBE register API structure */ +typedef struct +{ /* Tx Buffer Element */ + __IO uint32_t CAN_TXBE_0; /**< Offset: 0x00 (R/W 32) Tx Buffer Element 0 */ + __IO uint32_t CAN_TXBE_1; /**< Offset: 0x04 (R/W 32) Tx Buffer Element 1 */ + __IO uint32_t CAN_TXBE_DATA; /**< Offset: 0x08 (R/W 32) Tx Buffer Element Data */ +} can_txbe_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN_TXEFE register API structure */ +typedef struct +{ /* Tx Event FIFO Element */ + __IO uint32_t CAN_TXEFE_0; /**< Offset: 0x00 (R/W 32) Tx Event FIFO Element 0 */ + __IO uint32_t CAN_TXEFE_1; /**< Offset: 0x04 (R/W 32) Tx Event FIFO Element 1 */ +} can_txefe_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN_SIDFE register API structure */ +typedef struct +{ /* Standard Message ID Filter Element */ + __IO uint32_t CAN_SIDFE_0; /**< Offset: 0x00 (R/W 32) Standard Message ID Filter Element 0 */ +} can_sidfe_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN_XIDFE register API structure */ +typedef struct +{ /* Extended Message ID Filter Element */ + __IO uint32_t CAN_XIDFE_0; /**< Offset: 0x00 (R/W 32) Extended Message ID Filter Element 0 */ + __IO uint32_t CAN_XIDFE_1; /**< Offset: 0x04 (R/W 32) Extended Message ID Filter Element 1 */ +} can_xidfe_registers_t +#ifdef __GNUC__ + __attribute__ ((aligned (4))) +#endif +; + +/** \brief CAN register API structure */ +typedef struct +{ /* Control Area Network */ + __I uint32_t CAN_CREL; /**< Offset: 0x00 (R/ 32) Core Release */ + __I uint32_t CAN_ENDN; /**< Offset: 0x04 (R/ 32) Endian */ + __IO uint32_t CAN_MRCFG; /**< Offset: 0x08 (R/W 32) Message RAM Configuration */ + __IO uint32_t CAN_DBTP; /**< Offset: 0x0C (R/W 32) Fast Bit Timing and Prescaler */ + __IO uint32_t CAN_TEST; /**< Offset: 0x10 (R/W 32) Test */ + __IO uint32_t CAN_RWD; /**< Offset: 0x14 (R/W 32) RAM Watchdog */ + __IO uint32_t CAN_CCCR; /**< Offset: 0x18 (R/W 32) CC Control */ + __IO uint32_t CAN_NBTP; /**< Offset: 0x1C (R/W 32) Nominal Bit Timing and Prescaler */ + __IO uint32_t CAN_TSCC; /**< Offset: 0x20 (R/W 32) Timestamp Counter Configuration */ + __I uint32_t CAN_TSCV; /**< Offset: 0x24 (R/ 32) Timestamp Counter Value */ + __IO uint32_t CAN_TOCC; /**< Offset: 0x28 (R/W 32) Timeout Counter Configuration */ + __IO uint32_t CAN_TOCV; /**< Offset: 0x2C (R/W 32) Timeout Counter Value */ + __I uint8_t Reserved1[0x10]; + __I uint32_t CAN_ECR; /**< Offset: 0x40 (R/ 32) Error Counter */ + __I uint32_t CAN_PSR; /**< Offset: 0x44 (R/ 32) Protocol Status */ + __IO uint32_t CAN_TDCR; /**< Offset: 0x48 (R/W 32) Extended ID Filter Configuration */ + __I uint8_t Reserved2[0x04]; + __IO uint32_t CAN_IR; /**< Offset: 0x50 (R/W 32) Interrupt */ + __IO uint32_t CAN_IE; /**< Offset: 0x54 (R/W 32) Interrupt Enable */ + __IO uint32_t CAN_ILS; /**< Offset: 0x58 (R/W 32) Interrupt Line Select */ + __IO uint32_t CAN_ILE; /**< Offset: 0x5C (R/W 32) Interrupt Line Enable */ + __I uint8_t Reserved3[0x20]; + __IO uint32_t CAN_GFC; /**< Offset: 0x80 (R/W 32) Global Filter Configuration */ + __IO uint32_t CAN_SIDFC; /**< Offset: 0x84 (R/W 32) Standard ID Filter Configuration */ + __IO uint32_t CAN_XIDFC; /**< Offset: 0x88 (R/W 32) Extended ID Filter Configuration */ + __I uint8_t Reserved4[0x04]; + __IO uint32_t CAN_XIDAM; /**< Offset: 0x90 (R/W 32) Extended ID AND Mask */ + __I uint32_t CAN_HPMS; /**< Offset: 0x94 (R/ 32) High Priority Message Status */ + __IO uint32_t CAN_NDAT1; /**< Offset: 0x98 (R/W 32) New Data 1 */ + __IO uint32_t CAN_NDAT2; /**< Offset: 0x9C (R/W 32) New Data 2 */ + __IO uint32_t CAN_RXF0C; /**< Offset: 0xA0 (R/W 32) Rx FIFO 0 Configuration */ + __I uint32_t CAN_RXF0S; /**< Offset: 0xA4 (R/ 32) Rx FIFO 0 Status */ + __IO uint32_t CAN_RXF0A; /**< Offset: 0xA8 (R/W 32) Rx FIFO 0 Acknowledge */ + __IO uint32_t CAN_RXBC; /**< Offset: 0xAC (R/W 32) Rx Buffer Configuration */ + __IO uint32_t CAN_RXF1C; /**< Offset: 0xB0 (R/W 32) Rx FIFO 1 Configuration */ + __I uint32_t CAN_RXF1S; /**< Offset: 0xB4 (R/ 32) Rx FIFO 1 Status */ + __IO uint32_t CAN_RXF1A; /**< Offset: 0xB8 (R/W 32) Rx FIFO 1 Acknowledge */ + __IO uint32_t CAN_RXESC; /**< Offset: 0xBC (R/W 32) Rx Buffer / FIFO Element Size Configuration */ + __IO uint32_t CAN_TXBC; /**< Offset: 0xC0 (R/W 32) Tx Buffer Configuration */ + __I uint32_t CAN_TXFQS; /**< Offset: 0xC4 (R/ 32) Tx FIFO / Queue Status */ + __IO uint32_t CAN_TXESC; /**< Offset: 0xC8 (R/W 32) Tx Buffer Element Size Configuration */ + __I uint32_t CAN_TXBRP; /**< Offset: 0xCC (R/ 32) Tx Buffer Request Pending */ + __IO uint32_t CAN_TXBAR; /**< Offset: 0xD0 (R/W 32) Tx Buffer Add Request */ + __IO uint32_t CAN_TXBCR; /**< Offset: 0xD4 (R/W 32) Tx Buffer Cancellation Request */ + __I uint32_t CAN_TXBTO; /**< Offset: 0xD8 (R/ 32) Tx Buffer Transmission Occurred */ + __I uint32_t CAN_TXBCF; /**< Offset: 0xDC (R/ 32) Tx Buffer Cancellation Finished */ + __IO uint32_t CAN_TXBTIE; /**< Offset: 0xE0 (R/W 32) Tx Buffer Transmission Interrupt Enable */ + __IO uint32_t CAN_TXBCIE; /**< Offset: 0xE4 (R/W 32) Tx Buffer Cancellation Finished Interrupt Enable */ + __I uint8_t Reserved5[0x08]; + __IO uint32_t CAN_TXEFC; /**< Offset: 0xF0 (R/W 32) Tx Event FIFO Configuration */ + __I uint32_t CAN_TXEFS; /**< Offset: 0xF4 (R/ 32) Tx Event FIFO Status */ + __IO uint32_t CAN_TXEFA; /**< Offset: 0xF8 (R/W 32) Tx Event FIFO Acknowledge */ +} can_registers_t; + + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* _SAMC21_CAN_COMPONENT_H_ */ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/ccl.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/ccl.h new file mode 100644 index 00000000..54ce9b39 --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/ccl.h @@ -0,0 +1,217 @@ +/* + * Component description for CCL + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_CCL_COMPONENT_H_ +#define _SAMC21_CCL_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR CCL */ +/* ************************************************************************** */ + +/* -------- CCL_CTRL : (CCL Offset: 0x00) (R/W 8) Control -------- */ +#define CCL_CTRL_RESETVALUE _UINT8_(0x00) /* (CCL_CTRL) Control Reset Value */ + +#define CCL_CTRL_SWRST_Pos _UINT8_(0) /* (CCL_CTRL) Software Reset Position */ +#define CCL_CTRL_SWRST_Msk (_UINT8_(0x1) << CCL_CTRL_SWRST_Pos) /* (CCL_CTRL) Software Reset Mask */ +#define CCL_CTRL_SWRST(value) (CCL_CTRL_SWRST_Msk & (_UINT8_(value) << CCL_CTRL_SWRST_Pos)) /* Assigment of value for SWRST in the CCL_CTRL register */ +#define CCL_CTRL_SWRST_DISABLE_Val _UINT8_(0x0) /* (CCL_CTRL) The peripheral is not reset */ +#define CCL_CTRL_SWRST_ENABLE_Val _UINT8_(0x1) /* (CCL_CTRL) The peripheral is reset */ +#define CCL_CTRL_SWRST_DISABLE (CCL_CTRL_SWRST_DISABLE_Val << CCL_CTRL_SWRST_Pos) /* (CCL_CTRL) The peripheral is not reset Position */ +#define CCL_CTRL_SWRST_ENABLE (CCL_CTRL_SWRST_ENABLE_Val << CCL_CTRL_SWRST_Pos) /* (CCL_CTRL) The peripheral is reset Position */ +#define CCL_CTRL_ENABLE_Pos _UINT8_(1) /* (CCL_CTRL) Enable Position */ +#define CCL_CTRL_ENABLE_Msk (_UINT8_(0x1) << CCL_CTRL_ENABLE_Pos) /* (CCL_CTRL) Enable Mask */ +#define CCL_CTRL_ENABLE(value) (CCL_CTRL_ENABLE_Msk & (_UINT8_(value) << CCL_CTRL_ENABLE_Pos)) /* Assigment of value for ENABLE in the CCL_CTRL register */ +#define CCL_CTRL_ENABLE_DISABLE_Val _UINT8_(0x0) /* (CCL_CTRL) The peripheral is disabled */ +#define CCL_CTRL_ENABLE_ENABLE_Val _UINT8_(0x1) /* (CCL_CTRL) The peripheral is enabled */ +#define CCL_CTRL_ENABLE_DISABLE (CCL_CTRL_ENABLE_DISABLE_Val << CCL_CTRL_ENABLE_Pos) /* (CCL_CTRL) The peripheral is disabled Position */ +#define CCL_CTRL_ENABLE_ENABLE (CCL_CTRL_ENABLE_ENABLE_Val << CCL_CTRL_ENABLE_Pos) /* (CCL_CTRL) The peripheral is enabled Position */ +#define CCL_CTRL_RUNSTDBY_Pos _UINT8_(6) /* (CCL_CTRL) Run in Standby Position */ +#define CCL_CTRL_RUNSTDBY_Msk (_UINT8_(0x1) << CCL_CTRL_RUNSTDBY_Pos) /* (CCL_CTRL) Run in Standby Mask */ +#define CCL_CTRL_RUNSTDBY(value) (CCL_CTRL_RUNSTDBY_Msk & (_UINT8_(value) << CCL_CTRL_RUNSTDBY_Pos)) /* Assigment of value for RUNSTDBY in the CCL_CTRL register */ +#define CCL_CTRL_RUNSTDBY_DISABLE_Val _UINT8_(0x0) /* (CCL_CTRL) Generic clock is not required in standby sleep mode */ +#define CCL_CTRL_RUNSTDBY_ENABLE_Val _UINT8_(0x1) /* (CCL_CTRL) Generic clock is required in standby sleep mode */ +#define CCL_CTRL_RUNSTDBY_DISABLE (CCL_CTRL_RUNSTDBY_DISABLE_Val << CCL_CTRL_RUNSTDBY_Pos) /* (CCL_CTRL) Generic clock is not required in standby sleep mode Position */ +#define CCL_CTRL_RUNSTDBY_ENABLE (CCL_CTRL_RUNSTDBY_ENABLE_Val << CCL_CTRL_RUNSTDBY_Pos) /* (CCL_CTRL) Generic clock is required in standby sleep mode Position */ +#define CCL_CTRL_Msk _UINT8_(0x43) /* (CCL_CTRL) Register Mask */ + + +/* -------- CCL_SEQCTRL : (CCL Offset: 0x04) (R/W 8) SEQ Control x -------- */ +#define CCL_SEQCTRL_RESETVALUE _UINT8_(0x00) /* (CCL_SEQCTRL) SEQ Control x Reset Value */ + +#define CCL_SEQCTRL_SEQSEL_Pos _UINT8_(0) /* (CCL_SEQCTRL) Sequential Selection Position */ +#define CCL_SEQCTRL_SEQSEL_Msk (_UINT8_(0xF) << CCL_SEQCTRL_SEQSEL_Pos) /* (CCL_SEQCTRL) Sequential Selection Mask */ +#define CCL_SEQCTRL_SEQSEL(value) (CCL_SEQCTRL_SEQSEL_Msk & (_UINT8_(value) << CCL_SEQCTRL_SEQSEL_Pos)) /* Assigment of value for SEQSEL in the CCL_SEQCTRL register */ +#define CCL_SEQCTRL_SEQSEL_DISABLE_Val _UINT8_(0x0) /* (CCL_SEQCTRL) Sequential logic is disabled */ +#define CCL_SEQCTRL_SEQSEL_DFF_Val _UINT8_(0x1) /* (CCL_SEQCTRL) D flip flop */ +#define CCL_SEQCTRL_SEQSEL_JK_Val _UINT8_(0x2) /* (CCL_SEQCTRL) JK flip flop */ +#define CCL_SEQCTRL_SEQSEL_LATCH_Val _UINT8_(0x3) /* (CCL_SEQCTRL) D latch */ +#define CCL_SEQCTRL_SEQSEL_RS_Val _UINT8_(0x4) /* (CCL_SEQCTRL) RS latch */ +#define CCL_SEQCTRL_SEQSEL_DISABLE (CCL_SEQCTRL_SEQSEL_DISABLE_Val << CCL_SEQCTRL_SEQSEL_Pos) /* (CCL_SEQCTRL) Sequential logic is disabled Position */ +#define CCL_SEQCTRL_SEQSEL_DFF (CCL_SEQCTRL_SEQSEL_DFF_Val << CCL_SEQCTRL_SEQSEL_Pos) /* (CCL_SEQCTRL) D flip flop Position */ +#define CCL_SEQCTRL_SEQSEL_JK (CCL_SEQCTRL_SEQSEL_JK_Val << CCL_SEQCTRL_SEQSEL_Pos) /* (CCL_SEQCTRL) JK flip flop Position */ +#define CCL_SEQCTRL_SEQSEL_LATCH (CCL_SEQCTRL_SEQSEL_LATCH_Val << CCL_SEQCTRL_SEQSEL_Pos) /* (CCL_SEQCTRL) D latch Position */ +#define CCL_SEQCTRL_SEQSEL_RS (CCL_SEQCTRL_SEQSEL_RS_Val << CCL_SEQCTRL_SEQSEL_Pos) /* (CCL_SEQCTRL) RS latch Position */ +#define CCL_SEQCTRL_Msk _UINT8_(0x0F) /* (CCL_SEQCTRL) Register Mask */ + + +/* -------- CCL_LUTCTRL : (CCL Offset: 0x08) (R/W 32) LUT Control x -------- */ +#define CCL_LUTCTRL_RESETVALUE _UINT32_(0x00) /* (CCL_LUTCTRL) LUT Control x Reset Value */ + +#define CCL_LUTCTRL_ENABLE_Pos _UINT32_(1) /* (CCL_LUTCTRL) LUT Enable Position */ +#define CCL_LUTCTRL_ENABLE_Msk (_UINT32_(0x1) << CCL_LUTCTRL_ENABLE_Pos) /* (CCL_LUTCTRL) LUT Enable Mask */ +#define CCL_LUTCTRL_ENABLE(value) (CCL_LUTCTRL_ENABLE_Msk & (_UINT32_(value) << CCL_LUTCTRL_ENABLE_Pos)) /* Assigment of value for ENABLE in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_ENABLE_DISABLE_Val _UINT32_(0x0) /* (CCL_LUTCTRL) LUT block is disabled */ +#define CCL_LUTCTRL_ENABLE_ENABLE_Val _UINT32_(0x1) /* (CCL_LUTCTRL) LUT block is enabled */ +#define CCL_LUTCTRL_ENABLE_DISABLE (CCL_LUTCTRL_ENABLE_DISABLE_Val << CCL_LUTCTRL_ENABLE_Pos) /* (CCL_LUTCTRL) LUT block is disabled Position */ +#define CCL_LUTCTRL_ENABLE_ENABLE (CCL_LUTCTRL_ENABLE_ENABLE_Val << CCL_LUTCTRL_ENABLE_Pos) /* (CCL_LUTCTRL) LUT block is enabled Position */ +#define CCL_LUTCTRL_FILTSEL_Pos _UINT32_(4) /* (CCL_LUTCTRL) Filter Selection Position */ +#define CCL_LUTCTRL_FILTSEL_Msk (_UINT32_(0x3) << CCL_LUTCTRL_FILTSEL_Pos) /* (CCL_LUTCTRL) Filter Selection Mask */ +#define CCL_LUTCTRL_FILTSEL(value) (CCL_LUTCTRL_FILTSEL_Msk & (_UINT32_(value) << CCL_LUTCTRL_FILTSEL_Pos)) /* Assigment of value for FILTSEL in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_FILTSEL_DISABLE_Val _UINT32_(0x0) /* (CCL_LUTCTRL) Filter disabled */ +#define CCL_LUTCTRL_FILTSEL_SYNCH_Val _UINT32_(0x1) /* (CCL_LUTCTRL) Synchronizer enabled */ +#define CCL_LUTCTRL_FILTSEL_FILTER_Val _UINT32_(0x2) /* (CCL_LUTCTRL) Filter enabled */ +#define CCL_LUTCTRL_FILTSEL_DISABLE (CCL_LUTCTRL_FILTSEL_DISABLE_Val << CCL_LUTCTRL_FILTSEL_Pos) /* (CCL_LUTCTRL) Filter disabled Position */ +#define CCL_LUTCTRL_FILTSEL_SYNCH (CCL_LUTCTRL_FILTSEL_SYNCH_Val << CCL_LUTCTRL_FILTSEL_Pos) /* (CCL_LUTCTRL) Synchronizer enabled Position */ +#define CCL_LUTCTRL_FILTSEL_FILTER (CCL_LUTCTRL_FILTSEL_FILTER_Val << CCL_LUTCTRL_FILTSEL_Pos) /* (CCL_LUTCTRL) Filter enabled Position */ +#define CCL_LUTCTRL_EDGESEL_Pos _UINT32_(7) /* (CCL_LUTCTRL) Edge Selection Position */ +#define CCL_LUTCTRL_EDGESEL_Msk (_UINT32_(0x1) << CCL_LUTCTRL_EDGESEL_Pos) /* (CCL_LUTCTRL) Edge Selection Mask */ +#define CCL_LUTCTRL_EDGESEL(value) (CCL_LUTCTRL_EDGESEL_Msk & (_UINT32_(value) << CCL_LUTCTRL_EDGESEL_Pos)) /* Assigment of value for EDGESEL in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_EDGESEL_DISABLE_Val _UINT32_(0x0) /* (CCL_LUTCTRL) Edge detector is disabled */ +#define CCL_LUTCTRL_EDGESEL_ENABLE_Val _UINT32_(0x1) /* (CCL_LUTCTRL) Edge detector is enabled */ +#define CCL_LUTCTRL_EDGESEL_DISABLE (CCL_LUTCTRL_EDGESEL_DISABLE_Val << CCL_LUTCTRL_EDGESEL_Pos) /* (CCL_LUTCTRL) Edge detector is disabled Position */ +#define CCL_LUTCTRL_EDGESEL_ENABLE (CCL_LUTCTRL_EDGESEL_ENABLE_Val << CCL_LUTCTRL_EDGESEL_Pos) /* (CCL_LUTCTRL) Edge detector is enabled Position */ +#define CCL_LUTCTRL_INSEL0_Pos _UINT32_(8) /* (CCL_LUTCTRL) Input Selection 0 Position */ +#define CCL_LUTCTRL_INSEL0_Msk (_UINT32_(0xF) << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) Input Selection 0 Mask */ +#define CCL_LUTCTRL_INSEL0(value) (CCL_LUTCTRL_INSEL0_Msk & (_UINT32_(value) << CCL_LUTCTRL_INSEL0_Pos)) /* Assigment of value for INSEL0 in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_INSEL0_MASK_Val _UINT32_(0x0) /* (CCL_LUTCTRL) Masked input */ +#define CCL_LUTCTRL_INSEL0_FEEDBACK_Val _UINT32_(0x1) /* (CCL_LUTCTRL) Feedback input source */ +#define CCL_LUTCTRL_INSEL0_LINK_Val _UINT32_(0x2) /* (CCL_LUTCTRL) Linked LUT input source */ +#define CCL_LUTCTRL_INSEL0_EVENT_Val _UINT32_(0x3) /* (CCL_LUTCTRL) Event input source */ +#define CCL_LUTCTRL_INSEL0_IO_Val _UINT32_(0x4) /* (CCL_LUTCTRL) I/O pin input source */ +#define CCL_LUTCTRL_INSEL0_AC_Val _UINT32_(0x5) /* (CCL_LUTCTRL) AC input source */ +#define CCL_LUTCTRL_INSEL0_TC_Val _UINT32_(0x6) /* (CCL_LUTCTRL) TC input source */ +#define CCL_LUTCTRL_INSEL0_ALTTC_Val _UINT32_(0x7) /* (CCL_LUTCTRL) Alternate TC input source */ +#define CCL_LUTCTRL_INSEL0_SERCOM_Val _UINT32_(0x9) /* (CCL_LUTCTRL) SERCOM input source */ +#define CCL_LUTCTRL_INSEL0_MASK (CCL_LUTCTRL_INSEL0_MASK_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) Masked input Position */ +#define CCL_LUTCTRL_INSEL0_FEEDBACK (CCL_LUTCTRL_INSEL0_FEEDBACK_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) Feedback input source Position */ +#define CCL_LUTCTRL_INSEL0_LINK (CCL_LUTCTRL_INSEL0_LINK_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) Linked LUT input source Position */ +#define CCL_LUTCTRL_INSEL0_EVENT (CCL_LUTCTRL_INSEL0_EVENT_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) Event input source Position */ +#define CCL_LUTCTRL_INSEL0_IO (CCL_LUTCTRL_INSEL0_IO_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) I/O pin input source Position */ +#define CCL_LUTCTRL_INSEL0_AC (CCL_LUTCTRL_INSEL0_AC_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) AC input source Position */ +#define CCL_LUTCTRL_INSEL0_TC (CCL_LUTCTRL_INSEL0_TC_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) TC input source Position */ +#define CCL_LUTCTRL_INSEL0_ALTTC (CCL_LUTCTRL_INSEL0_ALTTC_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) Alternate TC input source Position */ +#define CCL_LUTCTRL_INSEL0_SERCOM (CCL_LUTCTRL_INSEL0_SERCOM_Val << CCL_LUTCTRL_INSEL0_Pos) /* (CCL_LUTCTRL) SERCOM input source Position */ +#define CCL_LUTCTRL_INSEL1_Pos _UINT32_(12) /* (CCL_LUTCTRL) Input Selection 1 Position */ +#define CCL_LUTCTRL_INSEL1_Msk (_UINT32_(0xF) << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) Input Selection 1 Mask */ +#define CCL_LUTCTRL_INSEL1(value) (CCL_LUTCTRL_INSEL1_Msk & (_UINT32_(value) << CCL_LUTCTRL_INSEL1_Pos)) /* Assigment of value for INSEL1 in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_INSEL1_MASK_Val _UINT32_(0x0) /* (CCL_LUTCTRL) Masked input */ +#define CCL_LUTCTRL_INSEL1_FEEDBACK_Val _UINT32_(0x1) /* (CCL_LUTCTRL) Feedback input source */ +#define CCL_LUTCTRL_INSEL1_LINK_Val _UINT32_(0x2) /* (CCL_LUTCTRL) Linked LUT input source */ +#define CCL_LUTCTRL_INSEL1_EVENT_Val _UINT32_(0x3) /* (CCL_LUTCTRL) Event input source */ +#define CCL_LUTCTRL_INSEL1_IO_Val _UINT32_(0x4) /* (CCL_LUTCTRL) I/O pin input source */ +#define CCL_LUTCTRL_INSEL1_AC_Val _UINT32_(0x5) /* (CCL_LUTCTRL) AC input source */ +#define CCL_LUTCTRL_INSEL1_TC_Val _UINT32_(0x6) /* (CCL_LUTCTRL) TC input source */ +#define CCL_LUTCTRL_INSEL1_ALTTC_Val _UINT32_(0x7) /* (CCL_LUTCTRL) Alternate TC input source */ +#define CCL_LUTCTRL_INSEL1_SERCOM_Val _UINT32_(0x9) /* (CCL_LUTCTRL) SERCOM input source */ +#define CCL_LUTCTRL_INSEL1_MASK (CCL_LUTCTRL_INSEL1_MASK_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) Masked input Position */ +#define CCL_LUTCTRL_INSEL1_FEEDBACK (CCL_LUTCTRL_INSEL1_FEEDBACK_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) Feedback input source Position */ +#define CCL_LUTCTRL_INSEL1_LINK (CCL_LUTCTRL_INSEL1_LINK_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) Linked LUT input source Position */ +#define CCL_LUTCTRL_INSEL1_EVENT (CCL_LUTCTRL_INSEL1_EVENT_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) Event input source Position */ +#define CCL_LUTCTRL_INSEL1_IO (CCL_LUTCTRL_INSEL1_IO_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) I/O pin input source Position */ +#define CCL_LUTCTRL_INSEL1_AC (CCL_LUTCTRL_INSEL1_AC_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) AC input source Position */ +#define CCL_LUTCTRL_INSEL1_TC (CCL_LUTCTRL_INSEL1_TC_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) TC input source Position */ +#define CCL_LUTCTRL_INSEL1_ALTTC (CCL_LUTCTRL_INSEL1_ALTTC_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) Alternate TC input source Position */ +#define CCL_LUTCTRL_INSEL1_SERCOM (CCL_LUTCTRL_INSEL1_SERCOM_Val << CCL_LUTCTRL_INSEL1_Pos) /* (CCL_LUTCTRL) SERCOM input source Position */ +#define CCL_LUTCTRL_INSEL2_Pos _UINT32_(16) /* (CCL_LUTCTRL) Input Selection 2 Position */ +#define CCL_LUTCTRL_INSEL2_Msk (_UINT32_(0xF) << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) Input Selection 2 Mask */ +#define CCL_LUTCTRL_INSEL2(value) (CCL_LUTCTRL_INSEL2_Msk & (_UINT32_(value) << CCL_LUTCTRL_INSEL2_Pos)) /* Assigment of value for INSEL2 in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_INSEL2_MASK_Val _UINT32_(0x0) /* (CCL_LUTCTRL) Masked input */ +#define CCL_LUTCTRL_INSEL2_FEEDBACK_Val _UINT32_(0x1) /* (CCL_LUTCTRL) Feedback input source */ +#define CCL_LUTCTRL_INSEL2_LINK_Val _UINT32_(0x2) /* (CCL_LUTCTRL) Linked LUT input source */ +#define CCL_LUTCTRL_INSEL2_EVENT_Val _UINT32_(0x3) /* (CCL_LUTCTRL) Event input source */ +#define CCL_LUTCTRL_INSEL2_IO_Val _UINT32_(0x4) /* (CCL_LUTCTRL) I/O pin input source */ +#define CCL_LUTCTRL_INSEL2_AC_Val _UINT32_(0x5) /* (CCL_LUTCTRL) AC input source */ +#define CCL_LUTCTRL_INSEL2_TC_Val _UINT32_(0x6) /* (CCL_LUTCTRL) TC input source */ +#define CCL_LUTCTRL_INSEL2_ALTTC_Val _UINT32_(0x7) /* (CCL_LUTCTRL) Alternate TC input source */ +#define CCL_LUTCTRL_INSEL2_SERCOM_Val _UINT32_(0x9) /* (CCL_LUTCTRL) SERCOM input source */ +#define CCL_LUTCTRL_INSEL2_MASK (CCL_LUTCTRL_INSEL2_MASK_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) Masked input Position */ +#define CCL_LUTCTRL_INSEL2_FEEDBACK (CCL_LUTCTRL_INSEL2_FEEDBACK_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) Feedback input source Position */ +#define CCL_LUTCTRL_INSEL2_LINK (CCL_LUTCTRL_INSEL2_LINK_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) Linked LUT input source Position */ +#define CCL_LUTCTRL_INSEL2_EVENT (CCL_LUTCTRL_INSEL2_EVENT_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) Event input source Position */ +#define CCL_LUTCTRL_INSEL2_IO (CCL_LUTCTRL_INSEL2_IO_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) I/O pin input source Position */ +#define CCL_LUTCTRL_INSEL2_AC (CCL_LUTCTRL_INSEL2_AC_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) AC input source Position */ +#define CCL_LUTCTRL_INSEL2_TC (CCL_LUTCTRL_INSEL2_TC_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) TC input source Position */ +#define CCL_LUTCTRL_INSEL2_ALTTC (CCL_LUTCTRL_INSEL2_ALTTC_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) Alternate TC input source Position */ +#define CCL_LUTCTRL_INSEL2_SERCOM (CCL_LUTCTRL_INSEL2_SERCOM_Val << CCL_LUTCTRL_INSEL2_Pos) /* (CCL_LUTCTRL) SERCOM input source Position */ +#define CCL_LUTCTRL_INVEI_Pos _UINT32_(20) /* (CCL_LUTCTRL) Inverted Event Input Enable Position */ +#define CCL_LUTCTRL_INVEI_Msk (_UINT32_(0x1) << CCL_LUTCTRL_INVEI_Pos) /* (CCL_LUTCTRL) Inverted Event Input Enable Mask */ +#define CCL_LUTCTRL_INVEI(value) (CCL_LUTCTRL_INVEI_Msk & (_UINT32_(value) << CCL_LUTCTRL_INVEI_Pos)) /* Assigment of value for INVEI in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_INVEI_DISABLE_Val _UINT32_(0x0) /* (CCL_LUTCTRL) Incoming event is not inverted */ +#define CCL_LUTCTRL_INVEI_ENABLE_Val _UINT32_(0x1) /* (CCL_LUTCTRL) Incoming event is inverted */ +#define CCL_LUTCTRL_INVEI_DISABLE (CCL_LUTCTRL_INVEI_DISABLE_Val << CCL_LUTCTRL_INVEI_Pos) /* (CCL_LUTCTRL) Incoming event is not inverted Position */ +#define CCL_LUTCTRL_INVEI_ENABLE (CCL_LUTCTRL_INVEI_ENABLE_Val << CCL_LUTCTRL_INVEI_Pos) /* (CCL_LUTCTRL) Incoming event is inverted Position */ +#define CCL_LUTCTRL_LUTEI_Pos _UINT32_(21) /* (CCL_LUTCTRL) LUT Event Input Enable Position */ +#define CCL_LUTCTRL_LUTEI_Msk (_UINT32_(0x1) << CCL_LUTCTRL_LUTEI_Pos) /* (CCL_LUTCTRL) LUT Event Input Enable Mask */ +#define CCL_LUTCTRL_LUTEI(value) (CCL_LUTCTRL_LUTEI_Msk & (_UINT32_(value) << CCL_LUTCTRL_LUTEI_Pos)) /* Assigment of value for LUTEI in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_LUTEI_DISABLE_Val _UINT32_(0x0) /* (CCL_LUTCTRL) LUT incoming event is disabled */ +#define CCL_LUTCTRL_LUTEI_ENABLE_Val _UINT32_(0x1) /* (CCL_LUTCTRL) LUT incoming event is enabled */ +#define CCL_LUTCTRL_LUTEI_DISABLE (CCL_LUTCTRL_LUTEI_DISABLE_Val << CCL_LUTCTRL_LUTEI_Pos) /* (CCL_LUTCTRL) LUT incoming event is disabled Position */ +#define CCL_LUTCTRL_LUTEI_ENABLE (CCL_LUTCTRL_LUTEI_ENABLE_Val << CCL_LUTCTRL_LUTEI_Pos) /* (CCL_LUTCTRL) LUT incoming event is enabled Position */ +#define CCL_LUTCTRL_LUTEO_Pos _UINT32_(22) /* (CCL_LUTCTRL) LUT Event Output Enable Position */ +#define CCL_LUTCTRL_LUTEO_Msk (_UINT32_(0x1) << CCL_LUTCTRL_LUTEO_Pos) /* (CCL_LUTCTRL) LUT Event Output Enable Mask */ +#define CCL_LUTCTRL_LUTEO(value) (CCL_LUTCTRL_LUTEO_Msk & (_UINT32_(value) << CCL_LUTCTRL_LUTEO_Pos)) /* Assigment of value for LUTEO in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_LUTEO_DISABLE_Val _UINT32_(0x0) /* (CCL_LUTCTRL) LUT event output is disabled */ +#define CCL_LUTCTRL_LUTEO_ENABLE_Val _UINT32_(0x1) /* (CCL_LUTCTRL) LUT event output is enabled */ +#define CCL_LUTCTRL_LUTEO_DISABLE (CCL_LUTCTRL_LUTEO_DISABLE_Val << CCL_LUTCTRL_LUTEO_Pos) /* (CCL_LUTCTRL) LUT event output is disabled Position */ +#define CCL_LUTCTRL_LUTEO_ENABLE (CCL_LUTCTRL_LUTEO_ENABLE_Val << CCL_LUTCTRL_LUTEO_Pos) /* (CCL_LUTCTRL) LUT event output is enabled Position */ +#define CCL_LUTCTRL_TRUTH_Pos _UINT32_(24) /* (CCL_LUTCTRL) Truth Value Position */ +#define CCL_LUTCTRL_TRUTH_Msk (_UINT32_(0xFF) << CCL_LUTCTRL_TRUTH_Pos) /* (CCL_LUTCTRL) Truth Value Mask */ +#define CCL_LUTCTRL_TRUTH(value) (CCL_LUTCTRL_TRUTH_Msk & (_UINT32_(value) << CCL_LUTCTRL_TRUTH_Pos)) /* Assigment of value for TRUTH in the CCL_LUTCTRL register */ +#define CCL_LUTCTRL_Msk _UINT32_(0xFF7FFFB2) /* (CCL_LUTCTRL) Register Mask */ + + +/** \brief CCL register offsets definitions */ +#define CCL_CTRL_REG_OFST _UINT32_(0x00) /* (CCL_CTRL) Control Offset */ +#define CCL_SEQCTRL_REG_OFST _UINT32_(0x04) /* (CCL_SEQCTRL) SEQ Control x Offset */ +#define CCL_SEQCTRL0_REG_OFST _UINT32_(0x04) /* (CCL_SEQCTRL0) SEQ Control x Offset */ +#define CCL_SEQCTRL1_REG_OFST _UINT32_(0x05) /* (CCL_SEQCTRL1) SEQ Control x Offset */ +#define CCL_LUTCTRL_REG_OFST _UINT32_(0x08) /* (CCL_LUTCTRL) LUT Control x Offset */ +#define CCL_LUTCTRL0_REG_OFST _UINT32_(0x08) /* (CCL_LUTCTRL0) LUT Control x Offset */ +#define CCL_LUTCTRL1_REG_OFST _UINT32_(0x0C) /* (CCL_LUTCTRL1) LUT Control x Offset */ +#define CCL_LUTCTRL2_REG_OFST _UINT32_(0x10) /* (CCL_LUTCTRL2) LUT Control x Offset */ +#define CCL_LUTCTRL3_REG_OFST _UINT32_(0x14) /* (CCL_LUTCTRL3) LUT Control x Offset */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief CCL register API structure */ +typedef struct +{ /* Configurable Custom Logic */ + __IO uint8_t CCL_CTRL; /**< Offset: 0x00 (R/W 8) Control */ + __I uint8_t Reserved1[0x03]; + __IO uint8_t CCL_SEQCTRL[2]; /**< Offset: 0x04 (R/W 8) SEQ Control x */ + __I uint8_t Reserved2[0x02]; + __IO uint32_t CCL_LUTCTRL[4]; /**< Offset: 0x08 (R/W 32) LUT Control x */ +} ccl_registers_t; + + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* _SAMC21_CCL_COMPONENT_H_ */ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/dac.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/dac.h new file mode 100644 index 00000000..19ff1e65 --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/dac.h @@ -0,0 +1,216 @@ +/* + * Component description for DAC + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_DAC_COMPONENT_H_ +#define _SAMC21_DAC_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR DAC */ +/* ************************************************************************** */ + +/* -------- DAC_CTRLA : (DAC Offset: 0x00) (R/W 8) Control A -------- */ +#define DAC_CTRLA_RESETVALUE _UINT8_(0x00) /* (DAC_CTRLA) Control A Reset Value */ + +#define DAC_CTRLA_SWRST_Pos _UINT8_(0) /* (DAC_CTRLA) Software Reset Position */ +#define DAC_CTRLA_SWRST_Msk (_UINT8_(0x1) << DAC_CTRLA_SWRST_Pos) /* (DAC_CTRLA) Software Reset Mask */ +#define DAC_CTRLA_SWRST(value) (DAC_CTRLA_SWRST_Msk & (_UINT8_(value) << DAC_CTRLA_SWRST_Pos)) /* Assigment of value for SWRST in the DAC_CTRLA register */ +#define DAC_CTRLA_ENABLE_Pos _UINT8_(1) /* (DAC_CTRLA) Enable Position */ +#define DAC_CTRLA_ENABLE_Msk (_UINT8_(0x1) << DAC_CTRLA_ENABLE_Pos) /* (DAC_CTRLA) Enable Mask */ +#define DAC_CTRLA_ENABLE(value) (DAC_CTRLA_ENABLE_Msk & (_UINT8_(value) << DAC_CTRLA_ENABLE_Pos)) /* Assigment of value for ENABLE in the DAC_CTRLA register */ +#define DAC_CTRLA_RUNSTDBY_Pos _UINT8_(6) /* (DAC_CTRLA) Run in Standby Position */ +#define DAC_CTRLA_RUNSTDBY_Msk (_UINT8_(0x1) << DAC_CTRLA_RUNSTDBY_Pos) /* (DAC_CTRLA) Run in Standby Mask */ +#define DAC_CTRLA_RUNSTDBY(value) (DAC_CTRLA_RUNSTDBY_Msk & (_UINT8_(value) << DAC_CTRLA_RUNSTDBY_Pos)) /* Assigment of value for RUNSTDBY in the DAC_CTRLA register */ +#define DAC_CTRLA_Msk _UINT8_(0x43) /* (DAC_CTRLA) Register Mask */ + + +/* -------- DAC_CTRLB : (DAC Offset: 0x01) (R/W 8) Control B -------- */ +#define DAC_CTRLB_RESETVALUE _UINT8_(0x00) /* (DAC_CTRLB) Control B Reset Value */ + +#define DAC_CTRLB_EOEN_Pos _UINT8_(0) /* (DAC_CTRLB) External Output Enable Position */ +#define DAC_CTRLB_EOEN_Msk (_UINT8_(0x1) << DAC_CTRLB_EOEN_Pos) /* (DAC_CTRLB) External Output Enable Mask */ +#define DAC_CTRLB_EOEN(value) (DAC_CTRLB_EOEN_Msk & (_UINT8_(value) << DAC_CTRLB_EOEN_Pos)) /* Assigment of value for EOEN in the DAC_CTRLB register */ +#define DAC_CTRLB_IOEN_Pos _UINT8_(1) /* (DAC_CTRLB) Internal Output Enable Position */ +#define DAC_CTRLB_IOEN_Msk (_UINT8_(0x1) << DAC_CTRLB_IOEN_Pos) /* (DAC_CTRLB) Internal Output Enable Mask */ +#define DAC_CTRLB_IOEN(value) (DAC_CTRLB_IOEN_Msk & (_UINT8_(value) << DAC_CTRLB_IOEN_Pos)) /* Assigment of value for IOEN in the DAC_CTRLB register */ +#define DAC_CTRLB_LEFTADJ_Pos _UINT8_(2) /* (DAC_CTRLB) Left Adjusted Data Position */ +#define DAC_CTRLB_LEFTADJ_Msk (_UINT8_(0x1) << DAC_CTRLB_LEFTADJ_Pos) /* (DAC_CTRLB) Left Adjusted Data Mask */ +#define DAC_CTRLB_LEFTADJ(value) (DAC_CTRLB_LEFTADJ_Msk & (_UINT8_(value) << DAC_CTRLB_LEFTADJ_Pos)) /* Assigment of value for LEFTADJ in the DAC_CTRLB register */ +#define DAC_CTRLB_VPD_Pos _UINT8_(3) /* (DAC_CTRLB) Voltage Pump Disable Position */ +#define DAC_CTRLB_VPD_Msk (_UINT8_(0x1) << DAC_CTRLB_VPD_Pos) /* (DAC_CTRLB) Voltage Pump Disable Mask */ +#define DAC_CTRLB_VPD(value) (DAC_CTRLB_VPD_Msk & (_UINT8_(value) << DAC_CTRLB_VPD_Pos)) /* Assigment of value for VPD in the DAC_CTRLB register */ +#define DAC_CTRLB_DITHER_Pos _UINT8_(5) /* (DAC_CTRLB) Dither Enable Position */ +#define DAC_CTRLB_DITHER_Msk (_UINT8_(0x1) << DAC_CTRLB_DITHER_Pos) /* (DAC_CTRLB) Dither Enable Mask */ +#define DAC_CTRLB_DITHER(value) (DAC_CTRLB_DITHER_Msk & (_UINT8_(value) << DAC_CTRLB_DITHER_Pos)) /* Assigment of value for DITHER in the DAC_CTRLB register */ +#define DAC_CTRLB_REFSEL_Pos _UINT8_(6) /* (DAC_CTRLB) Reference Selection Position */ +#define DAC_CTRLB_REFSEL_Msk (_UINT8_(0x3) << DAC_CTRLB_REFSEL_Pos) /* (DAC_CTRLB) Reference Selection Mask */ +#define DAC_CTRLB_REFSEL(value) (DAC_CTRLB_REFSEL_Msk & (_UINT8_(value) << DAC_CTRLB_REFSEL_Pos)) /* Assigment of value for REFSEL in the DAC_CTRLB register */ +#define DAC_CTRLB_REFSEL_INT1V_Val _UINT8_(0x0) /* (DAC_CTRLB) Internal 1.0V reference */ +#define DAC_CTRLB_REFSEL_AVCC_Val _UINT8_(0x1) /* (DAC_CTRLB) AVCC */ +#define DAC_CTRLB_REFSEL_VREFP_Val _UINT8_(0x2) /* (DAC_CTRLB) External reference */ +#define DAC_CTRLB_REFSEL_INT1V (DAC_CTRLB_REFSEL_INT1V_Val << DAC_CTRLB_REFSEL_Pos) /* (DAC_CTRLB) Internal 1.0V reference Position */ +#define DAC_CTRLB_REFSEL_AVCC (DAC_CTRLB_REFSEL_AVCC_Val << DAC_CTRLB_REFSEL_Pos) /* (DAC_CTRLB) AVCC Position */ +#define DAC_CTRLB_REFSEL_VREFP (DAC_CTRLB_REFSEL_VREFP_Val << DAC_CTRLB_REFSEL_Pos) /* (DAC_CTRLB) External reference Position */ +#define DAC_CTRLB_Msk _UINT8_(0xEF) /* (DAC_CTRLB) Register Mask */ + + +/* -------- DAC_EVCTRL : (DAC Offset: 0x02) (R/W 8) Event Control -------- */ +#define DAC_EVCTRL_RESETVALUE _UINT8_(0x00) /* (DAC_EVCTRL) Event Control Reset Value */ + +#define DAC_EVCTRL_STARTEI_Pos _UINT8_(0) /* (DAC_EVCTRL) Start Conversion Event Input Position */ +#define DAC_EVCTRL_STARTEI_Msk (_UINT8_(0x1) << DAC_EVCTRL_STARTEI_Pos) /* (DAC_EVCTRL) Start Conversion Event Input Mask */ +#define DAC_EVCTRL_STARTEI(value) (DAC_EVCTRL_STARTEI_Msk & (_UINT8_(value) << DAC_EVCTRL_STARTEI_Pos)) /* Assigment of value for STARTEI in the DAC_EVCTRL register */ +#define DAC_EVCTRL_EMPTYEO_Pos _UINT8_(1) /* (DAC_EVCTRL) Data Buffer Empty Event Output Position */ +#define DAC_EVCTRL_EMPTYEO_Msk (_UINT8_(0x1) << DAC_EVCTRL_EMPTYEO_Pos) /* (DAC_EVCTRL) Data Buffer Empty Event Output Mask */ +#define DAC_EVCTRL_EMPTYEO(value) (DAC_EVCTRL_EMPTYEO_Msk & (_UINT8_(value) << DAC_EVCTRL_EMPTYEO_Pos)) /* Assigment of value for EMPTYEO in the DAC_EVCTRL register */ +#define DAC_EVCTRL_INVEI_Pos _UINT8_(2) /* (DAC_EVCTRL) Invert Event Input Position */ +#define DAC_EVCTRL_INVEI_Msk (_UINT8_(0x1) << DAC_EVCTRL_INVEI_Pos) /* (DAC_EVCTRL) Invert Event Input Mask */ +#define DAC_EVCTRL_INVEI(value) (DAC_EVCTRL_INVEI_Msk & (_UINT8_(value) << DAC_EVCTRL_INVEI_Pos)) /* Assigment of value for INVEI in the DAC_EVCTRL register */ +#define DAC_EVCTRL_Msk _UINT8_(0x07) /* (DAC_EVCTRL) Register Mask */ + + +/* -------- DAC_INTENCLR : (DAC Offset: 0x04) (R/W 8) Interrupt Enable Clear -------- */ +#define DAC_INTENCLR_RESETVALUE _UINT8_(0x00) /* (DAC_INTENCLR) Interrupt Enable Clear Reset Value */ + +#define DAC_INTENCLR_UNDERRUN_Pos _UINT8_(0) /* (DAC_INTENCLR) Underrun Interrupt Enable Position */ +#define DAC_INTENCLR_UNDERRUN_Msk (_UINT8_(0x1) << DAC_INTENCLR_UNDERRUN_Pos) /* (DAC_INTENCLR) Underrun Interrupt Enable Mask */ +#define DAC_INTENCLR_UNDERRUN(value) (DAC_INTENCLR_UNDERRUN_Msk & (_UINT8_(value) << DAC_INTENCLR_UNDERRUN_Pos)) /* Assigment of value for UNDERRUN in the DAC_INTENCLR register */ +#define DAC_INTENCLR_EMPTY_Pos _UINT8_(1) /* (DAC_INTENCLR) Data Buffer Empty Interrupt Enable Position */ +#define DAC_INTENCLR_EMPTY_Msk (_UINT8_(0x1) << DAC_INTENCLR_EMPTY_Pos) /* (DAC_INTENCLR) Data Buffer Empty Interrupt Enable Mask */ +#define DAC_INTENCLR_EMPTY(value) (DAC_INTENCLR_EMPTY_Msk & (_UINT8_(value) << DAC_INTENCLR_EMPTY_Pos)) /* Assigment of value for EMPTY in the DAC_INTENCLR register */ +#define DAC_INTENCLR_Msk _UINT8_(0x03) /* (DAC_INTENCLR) Register Mask */ + + +/* -------- DAC_INTENSET : (DAC Offset: 0x05) (R/W 8) Interrupt Enable Set -------- */ +#define DAC_INTENSET_RESETVALUE _UINT8_(0x00) /* (DAC_INTENSET) Interrupt Enable Set Reset Value */ + +#define DAC_INTENSET_UNDERRUN_Pos _UINT8_(0) /* (DAC_INTENSET) Underrun Interrupt Enable Position */ +#define DAC_INTENSET_UNDERRUN_Msk (_UINT8_(0x1) << DAC_INTENSET_UNDERRUN_Pos) /* (DAC_INTENSET) Underrun Interrupt Enable Mask */ +#define DAC_INTENSET_UNDERRUN(value) (DAC_INTENSET_UNDERRUN_Msk & (_UINT8_(value) << DAC_INTENSET_UNDERRUN_Pos)) /* Assigment of value for UNDERRUN in the DAC_INTENSET register */ +#define DAC_INTENSET_EMPTY_Pos _UINT8_(1) /* (DAC_INTENSET) Data Buffer Empty Interrupt Enable Position */ +#define DAC_INTENSET_EMPTY_Msk (_UINT8_(0x1) << DAC_INTENSET_EMPTY_Pos) /* (DAC_INTENSET) Data Buffer Empty Interrupt Enable Mask */ +#define DAC_INTENSET_EMPTY(value) (DAC_INTENSET_EMPTY_Msk & (_UINT8_(value) << DAC_INTENSET_EMPTY_Pos)) /* Assigment of value for EMPTY in the DAC_INTENSET register */ +#define DAC_INTENSET_Msk _UINT8_(0x03) /* (DAC_INTENSET) Register Mask */ + + +/* -------- DAC_INTFLAG : (DAC Offset: 0x06) (R/W 8) Interrupt Flag Status and Clear -------- */ +#define DAC_INTFLAG_RESETVALUE _UINT8_(0x00) /* (DAC_INTFLAG) Interrupt Flag Status and Clear Reset Value */ + +#define DAC_INTFLAG_UNDERRUN_Pos _UINT8_(0) /* (DAC_INTFLAG) Underrun Position */ +#define DAC_INTFLAG_UNDERRUN_Msk (_UINT8_(0x1) << DAC_INTFLAG_UNDERRUN_Pos) /* (DAC_INTFLAG) Underrun Mask */ +#define DAC_INTFLAG_UNDERRUN(value) (DAC_INTFLAG_UNDERRUN_Msk & (_UINT8_(value) << DAC_INTFLAG_UNDERRUN_Pos)) /* Assigment of value for UNDERRUN in the DAC_INTFLAG register */ +#define DAC_INTFLAG_EMPTY_Pos _UINT8_(1) /* (DAC_INTFLAG) Data Buffer Empty Position */ +#define DAC_INTFLAG_EMPTY_Msk (_UINT8_(0x1) << DAC_INTFLAG_EMPTY_Pos) /* (DAC_INTFLAG) Data Buffer Empty Mask */ +#define DAC_INTFLAG_EMPTY(value) (DAC_INTFLAG_EMPTY_Msk & (_UINT8_(value) << DAC_INTFLAG_EMPTY_Pos)) /* Assigment of value for EMPTY in the DAC_INTFLAG register */ +#define DAC_INTFLAG_Msk _UINT8_(0x03) /* (DAC_INTFLAG) Register Mask */ + + +/* -------- DAC_STATUS : (DAC Offset: 0x07) ( R/ 8) Status -------- */ +#define DAC_STATUS_RESETVALUE _UINT8_(0x00) /* (DAC_STATUS) Status Reset Value */ + +#define DAC_STATUS_READY_Pos _UINT8_(0) /* (DAC_STATUS) Ready Position */ +#define DAC_STATUS_READY_Msk (_UINT8_(0x1) << DAC_STATUS_READY_Pos) /* (DAC_STATUS) Ready Mask */ +#define DAC_STATUS_READY(value) (DAC_STATUS_READY_Msk & (_UINT8_(value) << DAC_STATUS_READY_Pos)) /* Assigment of value for READY in the DAC_STATUS register */ +#define DAC_STATUS_Msk _UINT8_(0x01) /* (DAC_STATUS) Register Mask */ + + +/* -------- DAC_DATA : (DAC Offset: 0x08) ( /W 16) Data -------- */ +#define DAC_DATA_RESETVALUE _UINT16_(0x00) /* (DAC_DATA) Data Reset Value */ + +#define DAC_DATA_DATA_Pos _UINT16_(0) /* (DAC_DATA) Data value to be converted Position */ +#define DAC_DATA_DATA_Msk (_UINT16_(0xFFFF) << DAC_DATA_DATA_Pos) /* (DAC_DATA) Data value to be converted Mask */ +#define DAC_DATA_DATA(value) (DAC_DATA_DATA_Msk & (_UINT16_(value) << DAC_DATA_DATA_Pos)) /* Assigment of value for DATA in the DAC_DATA register */ +#define DAC_DATA_Msk _UINT16_(0xFFFF) /* (DAC_DATA) Register Mask */ + + +/* -------- DAC_DATABUF : (DAC Offset: 0x0C) ( /W 16) Data Buffer -------- */ +#define DAC_DATABUF_RESETVALUE _UINT16_(0x00) /* (DAC_DATABUF) Data Buffer Reset Value */ + +#define DAC_DATABUF_DATABUF_Pos _UINT16_(0) /* (DAC_DATABUF) Data Buffer Position */ +#define DAC_DATABUF_DATABUF_Msk (_UINT16_(0xFFFF) << DAC_DATABUF_DATABUF_Pos) /* (DAC_DATABUF) Data Buffer Mask */ +#define DAC_DATABUF_DATABUF(value) (DAC_DATABUF_DATABUF_Msk & (_UINT16_(value) << DAC_DATABUF_DATABUF_Pos)) /* Assigment of value for DATABUF in the DAC_DATABUF register */ +#define DAC_DATABUF_Msk _UINT16_(0xFFFF) /* (DAC_DATABUF) Register Mask */ + + +/* -------- DAC_SYNCBUSY : (DAC Offset: 0x10) ( R/ 32) Synchronization Busy -------- */ +#define DAC_SYNCBUSY_RESETVALUE _UINT32_(0x00) /* (DAC_SYNCBUSY) Synchronization Busy Reset Value */ + +#define DAC_SYNCBUSY_SWRST_Pos _UINT32_(0) /* (DAC_SYNCBUSY) Software Reset Position */ +#define DAC_SYNCBUSY_SWRST_Msk (_UINT32_(0x1) << DAC_SYNCBUSY_SWRST_Pos) /* (DAC_SYNCBUSY) Software Reset Mask */ +#define DAC_SYNCBUSY_SWRST(value) (DAC_SYNCBUSY_SWRST_Msk & (_UINT32_(value) << DAC_SYNCBUSY_SWRST_Pos)) /* Assigment of value for SWRST in the DAC_SYNCBUSY register */ +#define DAC_SYNCBUSY_ENABLE_Pos _UINT32_(1) /* (DAC_SYNCBUSY) Enable Position */ +#define DAC_SYNCBUSY_ENABLE_Msk (_UINT32_(0x1) << DAC_SYNCBUSY_ENABLE_Pos) /* (DAC_SYNCBUSY) Enable Mask */ +#define DAC_SYNCBUSY_ENABLE(value) (DAC_SYNCBUSY_ENABLE_Msk & (_UINT32_(value) << DAC_SYNCBUSY_ENABLE_Pos)) /* Assigment of value for ENABLE in the DAC_SYNCBUSY register */ +#define DAC_SYNCBUSY_DATA_Pos _UINT32_(2) /* (DAC_SYNCBUSY) Data Position */ +#define DAC_SYNCBUSY_DATA_Msk (_UINT32_(0x1) << DAC_SYNCBUSY_DATA_Pos) /* (DAC_SYNCBUSY) Data Mask */ +#define DAC_SYNCBUSY_DATA(value) (DAC_SYNCBUSY_DATA_Msk & (_UINT32_(value) << DAC_SYNCBUSY_DATA_Pos)) /* Assigment of value for DATA in the DAC_SYNCBUSY register */ +#define DAC_SYNCBUSY_DATABUF_Pos _UINT32_(3) /* (DAC_SYNCBUSY) Data Buffer Position */ +#define DAC_SYNCBUSY_DATABUF_Msk (_UINT32_(0x1) << DAC_SYNCBUSY_DATABUF_Pos) /* (DAC_SYNCBUSY) Data Buffer Mask */ +#define DAC_SYNCBUSY_DATABUF(value) (DAC_SYNCBUSY_DATABUF_Msk & (_UINT32_(value) << DAC_SYNCBUSY_DATABUF_Pos)) /* Assigment of value for DATABUF in the DAC_SYNCBUSY register */ +#define DAC_SYNCBUSY_Msk _UINT32_(0x0000000F) /* (DAC_SYNCBUSY) Register Mask */ + + +/* -------- DAC_DBGCTRL : (DAC Offset: 0x14) (R/W 8) Debug Control -------- */ +#define DAC_DBGCTRL_RESETVALUE _UINT8_(0x00) /* (DAC_DBGCTRL) Debug Control Reset Value */ + +#define DAC_DBGCTRL_DBGRUN_Pos _UINT8_(0) /* (DAC_DBGCTRL) Debug Run Position */ +#define DAC_DBGCTRL_DBGRUN_Msk (_UINT8_(0x1) << DAC_DBGCTRL_DBGRUN_Pos) /* (DAC_DBGCTRL) Debug Run Mask */ +#define DAC_DBGCTRL_DBGRUN(value) (DAC_DBGCTRL_DBGRUN_Msk & (_UINT8_(value) << DAC_DBGCTRL_DBGRUN_Pos)) /* Assigment of value for DBGRUN in the DAC_DBGCTRL register */ +#define DAC_DBGCTRL_Msk _UINT8_(0x01) /* (DAC_DBGCTRL) Register Mask */ + + +/** \brief DAC register offsets definitions */ +#define DAC_CTRLA_REG_OFST _UINT32_(0x00) /* (DAC_CTRLA) Control A Offset */ +#define DAC_CTRLB_REG_OFST _UINT32_(0x01) /* (DAC_CTRLB) Control B Offset */ +#define DAC_EVCTRL_REG_OFST _UINT32_(0x02) /* (DAC_EVCTRL) Event Control Offset */ +#define DAC_INTENCLR_REG_OFST _UINT32_(0x04) /* (DAC_INTENCLR) Interrupt Enable Clear Offset */ +#define DAC_INTENSET_REG_OFST _UINT32_(0x05) /* (DAC_INTENSET) Interrupt Enable Set Offset */ +#define DAC_INTFLAG_REG_OFST _UINT32_(0x06) /* (DAC_INTFLAG) Interrupt Flag Status and Clear Offset */ +#define DAC_STATUS_REG_OFST _UINT32_(0x07) /* (DAC_STATUS) Status Offset */ +#define DAC_DATA_REG_OFST _UINT32_(0x08) /* (DAC_DATA) Data Offset */ +#define DAC_DATABUF_REG_OFST _UINT32_(0x0C) /* (DAC_DATABUF) Data Buffer Offset */ +#define DAC_SYNCBUSY_REG_OFST _UINT32_(0x10) /* (DAC_SYNCBUSY) Synchronization Busy Offset */ +#define DAC_DBGCTRL_REG_OFST _UINT32_(0x14) /* (DAC_DBGCTRL) Debug Control Offset */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief DAC register API structure */ +typedef struct +{ /* Digital Analog Converter */ + __IO uint8_t DAC_CTRLA; /**< Offset: 0x00 (R/W 8) Control A */ + __IO uint8_t DAC_CTRLB; /**< Offset: 0x01 (R/W 8) Control B */ + __IO uint8_t DAC_EVCTRL; /**< Offset: 0x02 (R/W 8) Event Control */ + __I uint8_t Reserved1[0x01]; + __IO uint8_t DAC_INTENCLR; /**< Offset: 0x04 (R/W 8) Interrupt Enable Clear */ + __IO uint8_t DAC_INTENSET; /**< Offset: 0x05 (R/W 8) Interrupt Enable Set */ + __IO uint8_t DAC_INTFLAG; /**< Offset: 0x06 (R/W 8) Interrupt Flag Status and Clear */ + __I uint8_t DAC_STATUS; /**< Offset: 0x07 (R/ 8) Status */ + __O uint16_t DAC_DATA; /**< Offset: 0x08 ( /W 16) Data */ + __I uint8_t Reserved2[0x02]; + __O uint16_t DAC_DATABUF; /**< Offset: 0x0C ( /W 16) Data Buffer */ + __I uint8_t Reserved3[0x02]; + __I uint32_t DAC_SYNCBUSY; /**< Offset: 0x10 (R/ 32) Synchronization Busy */ + __IO uint8_t DAC_DBGCTRL; /**< Offset: 0x14 (R/W 8) Debug Control */ +} dac_registers_t; + + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* _SAMC21_DAC_COMPONENT_H_ */ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/divas.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/divas.h new file mode 100644 index 00000000..5a0b46d4 --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/divas.h @@ -0,0 +1,126 @@ +/* + * Component description for DIVAS + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_DIVAS_COMPONENT_H_ +#define _SAMC21_DIVAS_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR DIVAS */ +/* ************************************************************************** */ + +/* -------- DIVAS_CTRLA : (DIVAS Offset: 0x00) (R/W 8) Control -------- */ +#define DIVAS_CTRLA_RESETVALUE _UINT8_(0x00) /* (DIVAS_CTRLA) Control Reset Value */ + +#define DIVAS_CTRLA_SIGNED_Pos _UINT8_(0) /* (DIVAS_CTRLA) Signed Position */ +#define DIVAS_CTRLA_SIGNED_Msk (_UINT8_(0x1) << DIVAS_CTRLA_SIGNED_Pos) /* (DIVAS_CTRLA) Signed Mask */ +#define DIVAS_CTRLA_SIGNED(value) (DIVAS_CTRLA_SIGNED_Msk & (_UINT8_(value) << DIVAS_CTRLA_SIGNED_Pos)) /* Assigment of value for SIGNED in the DIVAS_CTRLA register */ +#define DIVAS_CTRLA_DLZ_Pos _UINT8_(1) /* (DIVAS_CTRLA) Disable Leading Zero Optimization Position */ +#define DIVAS_CTRLA_DLZ_Msk (_UINT8_(0x1) << DIVAS_CTRLA_DLZ_Pos) /* (DIVAS_CTRLA) Disable Leading Zero Optimization Mask */ +#define DIVAS_CTRLA_DLZ(value) (DIVAS_CTRLA_DLZ_Msk & (_UINT8_(value) << DIVAS_CTRLA_DLZ_Pos)) /* Assigment of value for DLZ in the DIVAS_CTRLA register */ +#define DIVAS_CTRLA_Msk _UINT8_(0x03) /* (DIVAS_CTRLA) Register Mask */ + + +/* -------- DIVAS_STATUS : (DIVAS Offset: 0x04) (R/W 8) Status -------- */ +#define DIVAS_STATUS_RESETVALUE _UINT8_(0x00) /* (DIVAS_STATUS) Status Reset Value */ + +#define DIVAS_STATUS_BUSY_Pos _UINT8_(0) /* (DIVAS_STATUS) DIVAS Accelerator Busy Position */ +#define DIVAS_STATUS_BUSY_Msk (_UINT8_(0x1) << DIVAS_STATUS_BUSY_Pos) /* (DIVAS_STATUS) DIVAS Accelerator Busy Mask */ +#define DIVAS_STATUS_BUSY(value) (DIVAS_STATUS_BUSY_Msk & (_UINT8_(value) << DIVAS_STATUS_BUSY_Pos)) /* Assigment of value for BUSY in the DIVAS_STATUS register */ +#define DIVAS_STATUS_DBZ_Pos _UINT8_(1) /* (DIVAS_STATUS) Writing a one to this bit clears DBZ to zero Position */ +#define DIVAS_STATUS_DBZ_Msk (_UINT8_(0x1) << DIVAS_STATUS_DBZ_Pos) /* (DIVAS_STATUS) Writing a one to this bit clears DBZ to zero Mask */ +#define DIVAS_STATUS_DBZ(value) (DIVAS_STATUS_DBZ_Msk & (_UINT8_(value) << DIVAS_STATUS_DBZ_Pos)) /* Assigment of value for DBZ in the DIVAS_STATUS register */ +#define DIVAS_STATUS_Msk _UINT8_(0x03) /* (DIVAS_STATUS) Register Mask */ + + +/* -------- DIVAS_DIVIDEND : (DIVAS Offset: 0x08) (R/W 32) Dividend -------- */ +#define DIVAS_DIVIDEND_RESETVALUE _UINT32_(0x00) /* (DIVAS_DIVIDEND) Dividend Reset Value */ + +#define DIVAS_DIVIDEND_DIVIDEND_Pos _UINT32_(0) /* (DIVAS_DIVIDEND) DIVIDEND Position */ +#define DIVAS_DIVIDEND_DIVIDEND_Msk (_UINT32_(0xFFFFFFFF) << DIVAS_DIVIDEND_DIVIDEND_Pos) /* (DIVAS_DIVIDEND) DIVIDEND Mask */ +#define DIVAS_DIVIDEND_DIVIDEND(value) (DIVAS_DIVIDEND_DIVIDEND_Msk & (_UINT32_(value) << DIVAS_DIVIDEND_DIVIDEND_Pos)) /* Assigment of value for DIVIDEND in the DIVAS_DIVIDEND register */ +#define DIVAS_DIVIDEND_Msk _UINT32_(0xFFFFFFFF) /* (DIVAS_DIVIDEND) Register Mask */ + + +/* -------- DIVAS_DIVISOR : (DIVAS Offset: 0x0C) (R/W 32) Divisor -------- */ +#define DIVAS_DIVISOR_RESETVALUE _UINT32_(0x00) /* (DIVAS_DIVISOR) Divisor Reset Value */ + +#define DIVAS_DIVISOR_DIVISOR_Pos _UINT32_(0) /* (DIVAS_DIVISOR) DIVISOR Position */ +#define DIVAS_DIVISOR_DIVISOR_Msk (_UINT32_(0xFFFFFFFF) << DIVAS_DIVISOR_DIVISOR_Pos) /* (DIVAS_DIVISOR) DIVISOR Mask */ +#define DIVAS_DIVISOR_DIVISOR(value) (DIVAS_DIVISOR_DIVISOR_Msk & (_UINT32_(value) << DIVAS_DIVISOR_DIVISOR_Pos)) /* Assigment of value for DIVISOR in the DIVAS_DIVISOR register */ +#define DIVAS_DIVISOR_Msk _UINT32_(0xFFFFFFFF) /* (DIVAS_DIVISOR) Register Mask */ + + +/* -------- DIVAS_RESULT : (DIVAS Offset: 0x10) ( R/ 32) Result -------- */ +#define DIVAS_RESULT_RESETVALUE _UINT32_(0x00) /* (DIVAS_RESULT) Result Reset Value */ + +#define DIVAS_RESULT_RESULT_Pos _UINT32_(0) /* (DIVAS_RESULT) RESULT Position */ +#define DIVAS_RESULT_RESULT_Msk (_UINT32_(0xFFFFFFFF) << DIVAS_RESULT_RESULT_Pos) /* (DIVAS_RESULT) RESULT Mask */ +#define DIVAS_RESULT_RESULT(value) (DIVAS_RESULT_RESULT_Msk & (_UINT32_(value) << DIVAS_RESULT_RESULT_Pos)) /* Assigment of value for RESULT in the DIVAS_RESULT register */ +#define DIVAS_RESULT_Msk _UINT32_(0xFFFFFFFF) /* (DIVAS_RESULT) Register Mask */ + + +/* -------- DIVAS_REM : (DIVAS Offset: 0x14) ( R/ 32) Remainder -------- */ +#define DIVAS_REM_RESETVALUE _UINT32_(0x00) /* (DIVAS_REM) Remainder Reset Value */ + +#define DIVAS_REM_REM_Pos _UINT32_(0) /* (DIVAS_REM) REM Position */ +#define DIVAS_REM_REM_Msk (_UINT32_(0xFFFFFFFF) << DIVAS_REM_REM_Pos) /* (DIVAS_REM) REM Mask */ +#define DIVAS_REM_REM(value) (DIVAS_REM_REM_Msk & (_UINT32_(value) << DIVAS_REM_REM_Pos)) /* Assigment of value for REM in the DIVAS_REM register */ +#define DIVAS_REM_Msk _UINT32_(0xFFFFFFFF) /* (DIVAS_REM) Register Mask */ + + +/* -------- DIVAS_SQRNUM : (DIVAS Offset: 0x18) (R/W 32) Square Root Input -------- */ +#define DIVAS_SQRNUM_RESETVALUE _UINT32_(0x00) /* (DIVAS_SQRNUM) Square Root Input Reset Value */ + +#define DIVAS_SQRNUM_SQRNUM_Pos _UINT32_(0) /* (DIVAS_SQRNUM) Square Root Input Position */ +#define DIVAS_SQRNUM_SQRNUM_Msk (_UINT32_(0xFFFFFFFF) << DIVAS_SQRNUM_SQRNUM_Pos) /* (DIVAS_SQRNUM) Square Root Input Mask */ +#define DIVAS_SQRNUM_SQRNUM(value) (DIVAS_SQRNUM_SQRNUM_Msk & (_UINT32_(value) << DIVAS_SQRNUM_SQRNUM_Pos)) /* Assigment of value for SQRNUM in the DIVAS_SQRNUM register */ +#define DIVAS_SQRNUM_Msk _UINT32_(0xFFFFFFFF) /* (DIVAS_SQRNUM) Register Mask */ + + +/** \brief DIVAS register offsets definitions */ +#define DIVAS_CTRLA_REG_OFST _UINT32_(0x00) /* (DIVAS_CTRLA) Control Offset */ +#define DIVAS_STATUS_REG_OFST _UINT32_(0x04) /* (DIVAS_STATUS) Status Offset */ +#define DIVAS_DIVIDEND_REG_OFST _UINT32_(0x08) /* (DIVAS_DIVIDEND) Dividend Offset */ +#define DIVAS_DIVISOR_REG_OFST _UINT32_(0x0C) /* (DIVAS_DIVISOR) Divisor Offset */ +#define DIVAS_RESULT_REG_OFST _UINT32_(0x10) /* (DIVAS_RESULT) Result Offset */ +#define DIVAS_REM_REG_OFST _UINT32_(0x14) /* (DIVAS_REM) Remainder Offset */ +#define DIVAS_SQRNUM_REG_OFST _UINT32_(0x18) /* (DIVAS_SQRNUM) Square Root Input Offset */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/** \brief DIVAS register API structure */ +typedef struct +{ /* Divide and Square Root Accelerator */ + __IO uint8_t DIVAS_CTRLA; /**< Offset: 0x00 (R/W 8) Control */ + __I uint8_t Reserved1[0x03]; + __IO uint8_t DIVAS_STATUS; /**< Offset: 0x04 (R/W 8) Status */ + __I uint8_t Reserved2[0x03]; + __IO uint32_t DIVAS_DIVIDEND; /**< Offset: 0x08 (R/W 32) Dividend */ + __IO uint32_t DIVAS_DIVISOR; /**< Offset: 0x0C (R/W 32) Divisor */ + __I uint32_t DIVAS_RESULT; /**< Offset: 0x10 (R/ 32) Result */ + __I uint32_t DIVAS_REM; /**< Offset: 0x14 (R/ 32) Remainder */ + __IO uint32_t DIVAS_SQRNUM; /**< Offset: 0x18 (R/W 32) Square Root Input */ +} divas_registers_t; + + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* _SAMC21_DIVAS_COMPONENT_H_ */ diff --git a/Telemetry/src/packs/ATSAMC21J18A_DFP/component/dmac.h b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/dmac.h new file mode 100644 index 00000000..905e8d57 --- /dev/null +++ b/Telemetry/src/packs/ATSAMC21J18A_DFP/component/dmac.h @@ -0,0 +1,882 @@ +/* + * Component description for DMAC + * + * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. + * + * Subject to your compliance with these terms, you may use Microchip software and any derivatives + * exclusively with Microchip products. It is your responsibility to comply with third party license + * terms applicable to your use of third party software (including open source software) that may + * accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, + * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND + * FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF + * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT + * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + */ + +/* file generated from device description version 2022-03-14T06:33:44Z */ +#ifndef _SAMC21_DMAC_COMPONENT_H_ +#define _SAMC21_DMAC_COMPONENT_H_ + +/* ************************************************************************** */ +/* SOFTWARE API DEFINITION FOR DMAC */ +/* ************************************************************************** */ + +/* -------- DMAC_BTCTRL : (DMAC Offset: 0x00) (R/W 16) Block Transfer Control -------- */ +#define DMAC_BTCTRL_RESETVALUE _UINT16_(0x00) /* (DMAC_BTCTRL) Block Transfer Control Reset Value */ + +#define DMAC_BTCTRL_VALID_Pos _UINT16_(0) /* (DMAC_BTCTRL) Descriptor Valid Position */ +#define DMAC_BTCTRL_VALID_Msk (_UINT16_(0x1) << DMAC_BTCTRL_VALID_Pos) /* (DMAC_BTCTRL) Descriptor Valid Mask */ +#define DMAC_BTCTRL_VALID(value) (DMAC_BTCTRL_VALID_Msk & (_UINT16_(value) << DMAC_BTCTRL_VALID_Pos)) /* Assigment of value for VALID in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_EVOSEL_Pos _UINT16_(1) /* (DMAC_BTCTRL) Event Output Selection Position */ +#define DMAC_BTCTRL_EVOSEL_Msk (_UINT16_(0x3) << DMAC_BTCTRL_EVOSEL_Pos) /* (DMAC_BTCTRL) Event Output Selection Mask */ +#define DMAC_BTCTRL_EVOSEL(value) (DMAC_BTCTRL_EVOSEL_Msk & (_UINT16_(value) << DMAC_BTCTRL_EVOSEL_Pos)) /* Assigment of value for EVOSEL in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_EVOSEL_DISABLE_Val _UINT16_(0x0) /* (DMAC_BTCTRL) Event generation disabled */ +#define DMAC_BTCTRL_EVOSEL_BLOCK_Val _UINT16_(0x1) /* (DMAC_BTCTRL) Event strobe when block transfer complete */ +#define DMAC_BTCTRL_EVOSEL_BEAT_Val _UINT16_(0x3) /* (DMAC_BTCTRL) Event strobe when beat transfer complete */ +#define DMAC_BTCTRL_EVOSEL_DISABLE (DMAC_BTCTRL_EVOSEL_DISABLE_Val << DMAC_BTCTRL_EVOSEL_Pos) /* (DMAC_BTCTRL) Event generation disabled Position */ +#define DMAC_BTCTRL_EVOSEL_BLOCK (DMAC_BTCTRL_EVOSEL_BLOCK_Val << DMAC_BTCTRL_EVOSEL_Pos) /* (DMAC_BTCTRL) Event strobe when block transfer complete Position */ +#define DMAC_BTCTRL_EVOSEL_BEAT (DMAC_BTCTRL_EVOSEL_BEAT_Val << DMAC_BTCTRL_EVOSEL_Pos) /* (DMAC_BTCTRL) Event strobe when beat transfer complete Position */ +#define DMAC_BTCTRL_BLOCKACT_Pos _UINT16_(3) /* (DMAC_BTCTRL) Block Action Position */ +#define DMAC_BTCTRL_BLOCKACT_Msk (_UINT16_(0x3) << DMAC_BTCTRL_BLOCKACT_Pos) /* (DMAC_BTCTRL) Block Action Mask */ +#define DMAC_BTCTRL_BLOCKACT(value) (DMAC_BTCTRL_BLOCKACT_Msk & (_UINT16_(value) << DMAC_BTCTRL_BLOCKACT_Pos)) /* Assigment of value for BLOCKACT in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_BLOCKACT_NOACT_Val _UINT16_(0x0) /* (DMAC_BTCTRL) Channel will be disabled if it is the last block transfer in the transaction */ +#define DMAC_BTCTRL_BLOCKACT_INT_Val _UINT16_(0x1) /* (DMAC_BTCTRL) Channel will be disabled if it is the last block transfer in the transaction and block interrupt */ +#define DMAC_BTCTRL_BLOCKACT_SUSPEND_Val _UINT16_(0x2) /* (DMAC_BTCTRL) Channel suspend operation is completed */ +#define DMAC_BTCTRL_BLOCKACT_BOTH_Val _UINT16_(0x3) /* (DMAC_BTCTRL) Both channel suspend operation and block interrupt */ +#define DMAC_BTCTRL_BLOCKACT_NOACT (DMAC_BTCTRL_BLOCKACT_NOACT_Val << DMAC_BTCTRL_BLOCKACT_Pos) /* (DMAC_BTCTRL) Channel will be disabled if it is the last block transfer in the transaction Position */ +#define DMAC_BTCTRL_BLOCKACT_INT (DMAC_BTCTRL_BLOCKACT_INT_Val << DMAC_BTCTRL_BLOCKACT_Pos) /* (DMAC_BTCTRL) Channel will be disabled if it is the last block transfer in the transaction and block interrupt Position */ +#define DMAC_BTCTRL_BLOCKACT_SUSPEND (DMAC_BTCTRL_BLOCKACT_SUSPEND_Val << DMAC_BTCTRL_BLOCKACT_Pos) /* (DMAC_BTCTRL) Channel suspend operation is completed Position */ +#define DMAC_BTCTRL_BLOCKACT_BOTH (DMAC_BTCTRL_BLOCKACT_BOTH_Val << DMAC_BTCTRL_BLOCKACT_Pos) /* (DMAC_BTCTRL) Both channel suspend operation and block interrupt Position */ +#define DMAC_BTCTRL_BEATSIZE_Pos _UINT16_(8) /* (DMAC_BTCTRL) Beat Size Position */ +#define DMAC_BTCTRL_BEATSIZE_Msk (_UINT16_(0x3) << DMAC_BTCTRL_BEATSIZE_Pos) /* (DMAC_BTCTRL) Beat Size Mask */ +#define DMAC_BTCTRL_BEATSIZE(value) (DMAC_BTCTRL_BEATSIZE_Msk & (_UINT16_(value) << DMAC_BTCTRL_BEATSIZE_Pos)) /* Assigment of value for BEATSIZE in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_BEATSIZE_BYTE_Val _UINT16_(0x0) /* (DMAC_BTCTRL) 8-bit bus transfer */ +#define DMAC_BTCTRL_BEATSIZE_HWORD_Val _UINT16_(0x1) /* (DMAC_BTCTRL) 16-bit bus transfer */ +#define DMAC_BTCTRL_BEATSIZE_WORD_Val _UINT16_(0x2) /* (DMAC_BTCTRL) 32-bit bus transfer */ +#define DMAC_BTCTRL_BEATSIZE_BYTE (DMAC_BTCTRL_BEATSIZE_BYTE_Val << DMAC_BTCTRL_BEATSIZE_Pos) /* (DMAC_BTCTRL) 8-bit bus transfer Position */ +#define DMAC_BTCTRL_BEATSIZE_HWORD (DMAC_BTCTRL_BEATSIZE_HWORD_Val << DMAC_BTCTRL_BEATSIZE_Pos) /* (DMAC_BTCTRL) 16-bit bus transfer Position */ +#define DMAC_BTCTRL_BEATSIZE_WORD (DMAC_BTCTRL_BEATSIZE_WORD_Val << DMAC_BTCTRL_BEATSIZE_Pos) /* (DMAC_BTCTRL) 32-bit bus transfer Position */ +#define DMAC_BTCTRL_SRCINC_Pos _UINT16_(10) /* (DMAC_BTCTRL) Source Address Increment Enable Position */ +#define DMAC_BTCTRL_SRCINC_Msk (_UINT16_(0x1) << DMAC_BTCTRL_SRCINC_Pos) /* (DMAC_BTCTRL) Source Address Increment Enable Mask */ +#define DMAC_BTCTRL_SRCINC(value) (DMAC_BTCTRL_SRCINC_Msk & (_UINT16_(value) << DMAC_BTCTRL_SRCINC_Pos)) /* Assigment of value for SRCINC in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_DSTINC_Pos _UINT16_(11) /* (DMAC_BTCTRL) Destination Address Increment Enable Position */ +#define DMAC_BTCTRL_DSTINC_Msk (_UINT16_(0x1) << DMAC_BTCTRL_DSTINC_Pos) /* (DMAC_BTCTRL) Destination Address Increment Enable Mask */ +#define DMAC_BTCTRL_DSTINC(value) (DMAC_BTCTRL_DSTINC_Msk & (_UINT16_(value) << DMAC_BTCTRL_DSTINC_Pos)) /* Assigment of value for DSTINC in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_STEPSEL_Pos _UINT16_(12) /* (DMAC_BTCTRL) Step Selection Position */ +#define DMAC_BTCTRL_STEPSEL_Msk (_UINT16_(0x1) << DMAC_BTCTRL_STEPSEL_Pos) /* (DMAC_BTCTRL) Step Selection Mask */ +#define DMAC_BTCTRL_STEPSEL(value) (DMAC_BTCTRL_STEPSEL_Msk & (_UINT16_(value) << DMAC_BTCTRL_STEPSEL_Pos)) /* Assigment of value for STEPSEL in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_STEPSEL_DST_Val _UINT16_(0x0) /* (DMAC_BTCTRL) Step size settings apply to the destination address */ +#define DMAC_BTCTRL_STEPSEL_SRC_Val _UINT16_(0x1) /* (DMAC_BTCTRL) Step size settings apply to the source address */ +#define DMAC_BTCTRL_STEPSEL_DST (DMAC_BTCTRL_STEPSEL_DST_Val << DMAC_BTCTRL_STEPSEL_Pos) /* (DMAC_BTCTRL) Step size settings apply to the destination address Position */ +#define DMAC_BTCTRL_STEPSEL_SRC (DMAC_BTCTRL_STEPSEL_SRC_Val << DMAC_BTCTRL_STEPSEL_Pos) /* (DMAC_BTCTRL) Step size settings apply to the source address Position */ +#define DMAC_BTCTRL_STEPSIZE_Pos _UINT16_(13) /* (DMAC_BTCTRL) Address Increment Step Size Position */ +#define DMAC_BTCTRL_STEPSIZE_Msk (_UINT16_(0x7) << DMAC_BTCTRL_STEPSIZE_Pos) /* (DMAC_BTCTRL) Address Increment Step Size Mask */ +#define DMAC_BTCTRL_STEPSIZE(value) (DMAC_BTCTRL_STEPSIZE_Msk & (_UINT16_(value) << DMAC_BTCTRL_STEPSIZE_Pos)) /* Assigment of value for STEPSIZE in the DMAC_BTCTRL register */ +#define DMAC_BTCTRL_STEPSIZE_X1_Val _UINT16_(0x0) /* (DMAC_BTCTRL) Next ADDR = ADDR + (1< +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ + +#if !defined(SKIP_INTEGER_LITERALS) +# if defined(_UINT8_) || defined(_UINT16_) || defined(_UINT32_) +# error "Integer constant value macros already defined elsewhere" +# endif + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/* Macros that deal with sizes of integer constants for C/C++ */ +# define _UINT8_(x) ((uint8_t)(x)) /* C code: 8-bits unsigned integer constant value */ +# define _UINT16_(x) ((uint16_t)(x)) /* C code: 16-bits unsigned integer constant value */ +# define _UINT32_(x) ((uint32_t)(x)) /* C code: 32-bits unsigned integer constant value */ + +#else /* Assembler */ + +# define _UINT8_(x) x /* Assembler: 8-bits unsigned integer constant value */ +# define _UINT16_(x) x /* Assembler: 16-bits unsigned integer constant value */ +# define _UINT32_(x) x /* Assembler: 32-bits unsigned integer constant value */ +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ +#endif /* SKIP_INTEGER_LITERALS */ + +/* ************************************************************************** */ +/* CMSIS DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +/* Interrupt Number Definition */ +typedef enum IRQn +{ +/****** CORTEX-M0PLUS Processor Exceptions Numbers ******************************/ + Reset_IRQn = -15, /* -15 Reset Vector, invoked on Power up and warm reset */ + NonMaskableInt_IRQn = -14, /* -14 Non maskable Interrupt, cannot be stopped or preempted */ + HardFault_IRQn = -13, /* -13 Hard Fault, all classes of Fault */ + SVCall_IRQn = -5, /* -5 System Service Call via SVC instruction */ + PendSV_IRQn = -2, /* -2 Pendable request for system service */ + SysTick_IRQn = -1, /* -1 System Tick Timer */ + +/****** SAMC21J18A specific Interrupt Numbers ***********************************/ + MCLK_IRQn = 0, /* 0 Shared between MCLK OSCCTRL OSC32KCTRL PAC SUPC (MCLK) */ + OSCCTRL_IRQn = 0, /* 0 Shared between MCLK OSCCTRL OSC32KCTRL PAC SUPC (OSCCTRL) */ + OSC32KCTRL_IRQn = 0, /* 0 Shared between MCLK OSCCTRL OSC32KCTRL PAC SUPC (OSC32KCTRL) */ + PAC_IRQn = 0, /* 0 Shared between MCLK OSCCTRL OSC32KCTRL PAC SUPC (PAC) */ + SUPC_IRQn = 0, /* 0 Shared between MCLK OSCCTRL OSC32KCTRL PAC SUPC (SUPC) */ + WDT_IRQn = 1, /* 1 Watchdog Timer (WDT) */ + RTC_IRQn = 2, /* 2 Real-Time Counter (RTC) */ + EIC_IRQn = 3, /* 3 External Interrupt Controller (EIC) */ + FREQM_IRQn = 4, /* 4 Frequency Meter (FREQM) */ + TSENS_IRQn = 5, /* 5 Temperature Sensor (TSENS) */ + NVMCTRL_IRQn = 6, /* 6 Non-Volatile Memory Controller (NVMCTRL) */ + DMAC_IRQn = 7, /* 7 Direct Memory Access Controller (DMAC) */ + EVSYS_IRQn = 8, /* 8 Event System Interface (EVSYS) */ + SERCOM0_IRQn = 9, /* 9 Serial Communication Interface (SERCOM0) */ + SERCOM1_IRQn = 10, /* 10 Serial Communication Interface (SERCOM1) */ + SERCOM2_IRQn = 11, /* 11 Serial Communication Interface (SERCOM2) */ + SERCOM3_IRQn = 12, /* 12 Serial Communication Interface (SERCOM3) */ + SERCOM4_IRQn = 13, /* 13 Serial Communication Interface (SERCOM4) */ + SERCOM5_IRQn = 14, /* 14 Serial Communication Interface (SERCOM5) */ + CAN0_IRQn = 15, /* 15 Control Area Network (CAN0) */ + CAN1_IRQn = 16, /* 16 Control Area Network (CAN1) */ + TCC0_IRQn = 17, /* 17 Timer Counter Control (TCC0) */ + TCC1_IRQn = 18, /* 18 Timer Counter Control (TCC1) */ + TCC2_IRQn = 19, /* 19 Timer Counter Control (TCC2) */ + TC0_IRQn = 20, /* 20 Basic Timer Counter (TC0) */ + TC1_IRQn = 21, /* 21 Basic Timer Counter (TC1) */ + TC2_IRQn = 22, /* 22 Basic Timer Counter (TC2) */ + TC3_IRQn = 23, /* 23 Basic Timer Counter (TC3) */ + TC4_IRQn = 24, /* 24 Basic Timer Counter (TC4) */ + ADC0_IRQn = 25, /* 25 Analog Digital Converter (ADC0) */ + ADC1_IRQn = 26, /* 26 Analog Digital Converter (ADC1) */ + AC_IRQn = 27, /* 27 Analog Comparators (AC) */ + DAC_IRQn = 28, /* 28 Digital Analog Converter (DAC) */ + SDADC_IRQn = 29, /* 29 Sigma-Delta Analog Digital Converter (SDADC) */ + PTC_IRQn = 30, /* 30 Peripheral Touch Controller (PTC) */ + + PERIPH_MAX_IRQn = 30 /* Max peripheral ID */ +} IRQn_Type; +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +typedef struct _DeviceVectors +{ + /* Stack pointer */ + void* pvStack; + /* CORTEX-M0PLUS handlers */ + void* pfnReset_Handler; /* -15 Reset Vector, invoked on Power up and warm reset */ + void* pfnNonMaskableInt_Handler; /* -14 Non maskable Interrupt, cannot be stopped or preempted */ + void* pfnHardFault_Handler; /* -13 Hard Fault, all classes of Fault */ + void* pvReservedC12; + void* pvReservedC11; + void* pvReservedC10; + void* pvReservedC9; + void* pvReservedC8; + void* pvReservedC7; + void* pvReservedC6; + void* pfnSVCall_Handler; /* -5 System Service Call via SVC instruction */ + void* pvReservedC4; + void* pvReservedC3; + void* pfnPendSV_Handler; /* -2 Pendable request for system service */ + void* pfnSysTick_Handler; /* -1 System Tick Timer */ + + /* Peripheral handlers */ + void* pfnSYSTEM_Handler; /* 0 System peripherals shared interrupt (MCLK OSCCTRL OSC32KCTRL PAC SUPC) */ + void* pfnWDT_Handler; /* 1 Watchdog Timer (WDT) */ + void* pfnRTC_Handler; /* 2 Real-Time Counter (RTC) */ + void* pfnEIC_Handler; /* 3 External Interrupt Controller (EIC) */ + void* pfnFREQM_Handler; /* 4 Frequency Meter (FREQM) */ + void* pfnTSENS_Handler; /* 5 Temperature Sensor (TSENS) */ + void* pfnNVMCTRL_Handler; /* 6 Non-Volatile Memory Controller (NVMCTRL) */ + void* pfnDMAC_Handler; /* 7 Direct Memory Access Controller (DMAC) */ + void* pfnEVSYS_Handler; /* 8 Event System Interface (EVSYS) */ + void* pfnSERCOM0_Handler; /* 9 Serial Communication Interface (SERCOM0) */ + void* pfnSERCOM1_Handler; /* 10 Serial Communication Interface (SERCOM1) */ + void* pfnSERCOM2_Handler; /* 11 Serial Communication Interface (SERCOM2) */ + void* pfnSERCOM3_Handler; /* 12 Serial Communication Interface (SERCOM3) */ + void* pfnSERCOM4_Handler; /* 13 Serial Communication Interface (SERCOM4) */ + void* pfnSERCOM5_Handler; /* 14 Serial Communication Interface (SERCOM5) */ + void* pfnCAN0_Handler; /* 15 Control Area Network (CAN0) */ + void* pfnCAN1_Handler; /* 16 Control Area Network (CAN1) */ + void* pfnTCC0_Handler; /* 17 Timer Counter Control (TCC0) */ + void* pfnTCC1_Handler; /* 18 Timer Counter Control (TCC1) */ + void* pfnTCC2_Handler; /* 19 Timer Counter Control (TCC2) */ + void* pfnTC0_Handler; /* 20 Basic Timer Counter (TC0) */ + void* pfnTC1_Handler; /* 21 Basic Timer Counter (TC1) */ + void* pfnTC2_Handler; /* 22 Basic Timer Counter (TC2) */ + void* pfnTC3_Handler; /* 23 Basic Timer Counter (TC3) */ + void* pfnTC4_Handler; /* 24 Basic Timer Counter (TC4) */ + void* pfnADC0_Handler; /* 25 Analog Digital Converter (ADC0) */ + void* pfnADC1_Handler; /* 26 Analog Digital Converter (ADC1) */ + void* pfnAC_Handler; /* 27 Analog Comparators (AC) */ + void* pfnDAC_Handler; /* 28 Digital Analog Converter (DAC) */ + void* pfnSDADC_Handler; /* 29 Sigma-Delta Analog Digital Converter (SDADC) */ + void* pfnPTC_Handler; /* 30 Peripheral Touch Controller (PTC) */ +} DeviceVectors; + +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ + +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +#if !defined DONT_USE_PREDEFINED_CORE_HANDLERS +/* CORTEX-M0PLUS exception handlers */ +void Reset_Handler ( void ); +void NonMaskableInt_Handler ( void ); +void HardFault_Handler ( void ); +void SVCall_Handler ( void ); +void PendSV_Handler ( void ); +void SysTick_Handler ( void ); +#endif /* DONT_USE_PREDEFINED_CORE_HANDLERS */ + +#if !defined DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS +/* Peripherals interrupt handlers */ +void SYSTEM_Handler ( void ); +void WDT_Handler ( void ); +void RTC_Handler ( void ); +void EIC_Handler ( void ); +void FREQM_Handler ( void ); +void TSENS_Handler ( void ); +void NVMCTRL_Handler ( void ); +void DMAC_Handler ( void ); +void EVSYS_Handler ( void ); +void SERCOM0_Handler ( void ); +void SERCOM1_Handler ( void ); +void SERCOM2_Handler ( void ); +void SERCOM3_Handler ( void ); +void SERCOM4_Handler ( void ); +void SERCOM5_Handler ( void ); +void CAN0_Handler ( void ); +void CAN1_Handler ( void ); +void TCC0_Handler ( void ); +void TCC1_Handler ( void ); +void TCC2_Handler ( void ); +void TC0_Handler ( void ); +void TC1_Handler ( void ); +void TC2_Handler ( void ); +void TC3_Handler ( void ); +void TC4_Handler ( void ); +void ADC0_Handler ( void ); +void ADC1_Handler ( void ); +void AC_Handler ( void ); +void DAC_Handler ( void ); +void SDADC_Handler ( void ); +void PTC_Handler ( void ); +#endif /* DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS */ +#endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ + +/* Configuration of the CORTEX-M0PLUS Processor and Core Peripherals */ +#define __CM0PLUS_REV 0x0001 /* Cortex-M0+ Core Revision */ +#define __MPU_PRESENT 1 /* MPU present or not */ +#define __NVIC_PRIO_BITS 2 /* Number of Bits used for Priority Levels */ +#define __VTOR_PRESENT 1 /* Vector Table Offset Register present or not */ +#define __Vendor_SysTickConfig 0 /* Set to 1 if different SysTick Config is used */ +#define __ARCH_ARM 1 +#define __ARCH_ARM_CORTEX_M 1 + +/* CMSIS includes */ +#include "core_cm0plus.h" +#if defined USE_CMSIS_INIT +#include "system_samc21.h" +#endif /* USE_CMSIS_INIT */ + +/* ************************************************************************** */ +/* SOFTWARE PERIPHERAL API DEFINITION FOR SAMC21J18A */ +/* ************************************************************************** */ +#include "component/ac.h" +#include "component/adc.h" +#include "component/can.h" +#include "component/ccl.h" +#include "component/dac.h" +#include "component/divas.h" +#include "component/dmac.h" +#include "component/dsu.h" +#include "component/eic.h" +#include "component/evsys.h" +#include "component/freqm.h" +#include "component/fuses.h" +#include "component/gclk.h" +#include "component/hmatrixb.h" +#include "component/mclk.h" +#include "component/mtb.h" +#include "component/nvmctrl.h" +#include "component/osc32kctrl.h" +#include "component/oscctrl.h" +#include "component/pac.h" +#include "component/pm.h" +#include "component/port.h" +#include "component/ptc.h" +#include "component/rstc.h" +#include "component/rtc.h" +#include "component/sdadc.h" +#include "component/sercom.h" +#include "component/supc.h" +#include "component/tc.h" +#include "component/tcc.h" +#include "component/tsens.h" +#include "component/wdt.h" + +/* ************************************************************************** */ +/* INSTANCE DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#include "instance/ac.h" +#include "instance/adc0.h" +#include "instance/adc1.h" +#include "instance/can0.h" +#include "instance/can1.h" +#include "instance/ccl.h" +#include "instance/dac.h" +#include "instance/divas.h" +#include "instance/dmac.h" +#include "instance/dsu.h" +#include "instance/eic.h" +#include "instance/evsys.h" +#include "instance/freqm.h" +#include "instance/fuses.h" +#include "instance/gclk.h" +#include "instance/hmatrixhs.h" +#include "instance/mclk.h" +#include "instance/mtb.h" +#include "instance/nvmctrl.h" +#include "instance/osc32kctrl.h" +#include "instance/oscctrl.h" +#include "instance/pac.h" +#include "instance/pm.h" +#include "instance/port.h" +#include "instance/ptc.h" +#include "instance/rstc.h" +#include "instance/rtc.h" +#include "instance/sdadc.h" +#include "instance/sercom0.h" +#include "instance/sercom1.h" +#include "instance/sercom2.h" +#include "instance/sercom3.h" +#include "instance/sercom4.h" +#include "instance/sercom5.h" +#include "instance/supc.h" +#include "instance/tc0.h" +#include "instance/tc1.h" +#include "instance/tc2.h" +#include "instance/tc3.h" +#include "instance/tc4.h" +#include "instance/tcc0.h" +#include "instance/tcc1.h" +#include "instance/tcc2.h" +#include "instance/tsens.h" +#include "instance/wdt.h" + +/* ************************************************************************** */ +/* PERIPHERAL ID DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#define ID_PAC ( 0) /* Peripheral Access Controller (PAC) */ +#define ID_PM ( 1) /* Power Manager (PM) */ +#define ID_MCLK ( 2) /* Main Clock (MCLK) */ +#define ID_RSTC ( 3) /* Reset Controller (RSTC) */ +#define ID_OSCCTRL ( 4) /* Oscillators Control (OSCCTRL) */ +#define ID_OSC32KCTRL ( 5) /* 32k Oscillators Control (OSC32KCTRL) */ +#define ID_SUPC ( 6) /* Supply Controller (SUPC) */ +#define ID_GCLK ( 7) /* Generic Clock Generator (GCLK) */ +#define ID_WDT ( 8) /* Watchdog Timer (WDT) */ +#define ID_RTC ( 9) /* Real-Time Counter (RTC) */ +#define ID_EIC ( 10) /* External Interrupt Controller (EIC) */ +#define ID_FREQM ( 11) /* Frequency Meter (FREQM) */ +#define ID_TSENS ( 12) /* Temperature Sensor (TSENS) */ +#define ID_PORT ( 32) /* Port Module (PORT) */ +#define ID_DSU ( 33) /* Device Service Unit (DSU) */ +#define ID_NVMCTRL ( 34) /* Non-Volatile Memory Controller (NVMCTRL) */ +#define ID_DMAC ( 35) /* Direct Memory Access Controller (DMAC) */ +#define ID_MTB ( 36) /* Cortex-M0+ Micro-Trace Buffer (MTB) */ +#define ID_HMATRIXHS ( 37) /* HSB Matrix (HMATRIXHS) */ +#define ID_EVSYS ( 64) /* Event System Interface (EVSYS) */ +#define ID_SERCOM0 ( 65) /* Serial Communication Interface (SERCOM0) */ +#define ID_SERCOM1 ( 66) /* Serial Communication Interface (SERCOM1) */ +#define ID_SERCOM2 ( 67) /* Serial Communication Interface (SERCOM2) */ +#define ID_SERCOM3 ( 68) /* Serial Communication Interface (SERCOM3) */ +#define ID_SERCOM4 ( 69) /* Serial Communication Interface (SERCOM4) */ +#define ID_SERCOM5 ( 70) /* Serial Communication Interface (SERCOM5) */ +#define ID_CAN0 ( 71) /* Control Area Network (CAN0) */ +#define ID_CAN1 ( 72) /* Control Area Network (CAN1) */ +#define ID_TCC0 ( 73) /* Timer Counter Control (TCC0) */ +#define ID_TCC1 ( 74) /* Timer Counter Control (TCC1) */ +#define ID_TCC2 ( 75) /* Timer Counter Control (TCC2) */ +#define ID_TC0 ( 76) /* Basic Timer Counter (TC0) */ +#define ID_TC1 ( 77) /* Basic Timer Counter (TC1) */ +#define ID_TC2 ( 78) /* Basic Timer Counter (TC2) */ +#define ID_TC3 ( 79) /* Basic Timer Counter (TC3) */ +#define ID_TC4 ( 80) /* Basic Timer Counter (TC4) */ +#define ID_ADC0 ( 81) /* Analog Digital Converter (ADC0) */ +#define ID_ADC1 ( 82) /* Analog Digital Converter (ADC1) */ +#define ID_SDADC ( 83) /* Sigma-Delta Analog Digital Converter (SDADC) */ +#define ID_AC ( 84) /* Analog Comparators (AC) */ +#define ID_DAC ( 85) /* Digital Analog Converter (DAC) */ +#define ID_PTC ( 86) /* Peripheral Touch Controller (PTC) */ +#define ID_CCL ( 87) /* Configurable Custom Logic (CCL) */ + +#define ID_PERIPH_MAX ( 87) /* Number of peripheral IDs */ + +/* ************************************************************************** */ +/* REGISTER STRUCTURE ADDRESS DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) +#define AC_REGS ((ac_registers_t*)0x42005000) /* AC Registers Address */ +#define ADC0_REGS ((adc_registers_t*)0x42004400) /* ADC0 Registers Address */ +#define ADC1_REGS ((adc_registers_t*)0x42004800) /* ADC1 Registers Address */ +#define CAN0_REGS ((can_registers_t*)0x42001c00) /* CAN0 Registers Address */ +#define CAN1_REGS ((can_registers_t*)0x42002000) /* CAN1 Registers Address */ +#define CCL_REGS ((ccl_registers_t*)0x42005c00) /* CCL Registers Address */ +#define DAC_REGS ((dac_registers_t*)0x42005400) /* DAC Registers Address */ +#define DIVAS_REGS ((divas_registers_t*)0x48000000) /* DIVAS Registers Address */ +#define DMAC_REGS ((dmac_registers_t*)0x41006000) /* DMAC Registers Address */ +#define DSU_REGS ((dsu_registers_t*)0x41002000) /* DSU Registers Address */ +#define EIC_REGS ((eic_registers_t*)0x40002800) /* EIC Registers Address */ +#define EVSYS_REGS ((evsys_registers_t*)0x42000000) /* EVSYS Registers Address */ +#define FREQM_REGS ((freqm_registers_t*)0x40002c00) /* FREQM Registers Address */ +#define GCLK_REGS ((gclk_registers_t*)0x40001c00) /* GCLK Registers Address */ +#define HMATRIXHS_REGS ((hmatrixb_registers_t*)0x4100a000) /* HMATRIXHS Registers Address */ +#define MCLK_REGS ((mclk_registers_t*)0x40000800) /* MCLK Registers Address */ +#define MTB_REGS ((mtb_registers_t*)0x41008000) /* MTB Registers Address */ +#define NVMCTRL_REGS ((nvmctrl_registers_t*)0x41004000) /* NVMCTRL Registers Address */ +#define OTP5_FUSES_REGS ((fuses_otp5_fuses_registers_t*)0x00806020) /* FUSES Registers Address */ +#define TEMP_LOG_FUSES_REGS ((fuses_temp_log_fuses_registers_t*)0x00806030) /* FUSES Registers Address */ +#define USER_FUSES_REGS ((fuses_user_fuses_registers_t*)0x00804000) /* FUSES Registers Address */ +#define OSCCTRL_REGS ((oscctrl_registers_t*)0x40001000) /* OSCCTRL Registers Address */ +#define OSC32KCTRL_REGS ((osc32kctrl_registers_t*)0x40001400) /* OSC32KCTRL Registers Address */ +#define PAC_REGS ((pac_registers_t*)0x40000000) /* PAC Registers Address */ +#define PM_REGS ((pm_registers_t*)0x40000400) /* PM Registers Address */ +#define PORT_REGS ((port_registers_t*)0x41000000) /* PORT Registers Address */ +#define PORT_IOBUS_REGS ((port_registers_t*)0x60000000) /* PORT Registers Address */ +#define PTC_REGS ((ptc_registers_t*)0x42005800) /* PTC Registers Address */ +#define RSTC_REGS ((rstc_registers_t*)0x40000c00) /* RSTC Registers Address */ +#define RTC_REGS ((rtc_registers_t*)0x40002400) /* RTC Registers Address */ +#define SDADC_REGS ((sdadc_registers_t*)0x42004c00) /* SDADC Registers Address */ +#define SERCOM0_REGS ((sercom_registers_t*)0x42000400) /* SERCOM0 Registers Address */ +#define SERCOM1_REGS ((sercom_registers_t*)0x42000800) /* SERCOM1 Registers Address */ +#define SERCOM2_REGS ((sercom_registers_t*)0x42000c00) /* SERCOM2 Registers Address */ +#define SERCOM3_REGS ((sercom_registers_t*)0x42001000) /* SERCOM3 Registers Address */ +#define SERCOM4_REGS ((sercom_registers_t*)0x42001400) /* SERCOM4 Registers Address */ +#define SERCOM5_REGS ((sercom_registers_t*)0x42001800) /* SERCOM5 Registers Address */ +#define SUPC_REGS ((supc_registers_t*)0x40001800) /* SUPC Registers Address */ +#define TC0_REGS ((tc_registers_t*)0x42003000) /* TC0 Registers Address */ +#define TC1_REGS ((tc_registers_t*)0x42003400) /* TC1 Registers Address */ +#define TC2_REGS ((tc_registers_t*)0x42003800) /* TC2 Registers Address */ +#define TC3_REGS ((tc_registers_t*)0x42003c00) /* TC3 Registers Address */ +#define TC4_REGS ((tc_registers_t*)0x42004000) /* TC4 Registers Address */ +#define TCC0_REGS ((tcc_registers_t*)0x42002400) /* TCC0 Registers Address */ +#define TCC1_REGS ((tcc_registers_t*)0x42002800) /* TCC1 Registers Address */ +#define TCC2_REGS ((tcc_registers_t*)0x42002c00) /* TCC2 Registers Address */ +#define TSENS_REGS ((tsens_registers_t*)0x40003000) /* TSENS Registers Address */ +#define WDT_REGS ((wdt_registers_t*)0x40002000) /* WDT Registers Address */ +#endif /* (defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ + +/* ************************************************************************** */ +/* BASE ADDRESS DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#define AC_BASE_ADDRESS _UINT32_(0x42005000) /* AC Base Address */ +#define ADC0_BASE_ADDRESS _UINT32_(0x42004400) /* ADC0 Base Address */ +#define ADC1_BASE_ADDRESS _UINT32_(0x42004800) /* ADC1 Base Address */ +#define CAN0_BASE_ADDRESS _UINT32_(0x42001c00) /* CAN0 Base Address */ +#define CAN1_BASE_ADDRESS _UINT32_(0x42002000) /* CAN1 Base Address */ +#define CCL_BASE_ADDRESS _UINT32_(0x42005c00) /* CCL Base Address */ +#define DAC_BASE_ADDRESS _UINT32_(0x42005400) /* DAC Base Address */ +#define DIVAS_BASE_ADDRESS _UINT32_(0x48000000) /* DIVAS Base Address */ +#define DMAC_BASE_ADDRESS _UINT32_(0x41006000) /* DMAC Base Address */ +#define DSU_BASE_ADDRESS _UINT32_(0x41002000) /* DSU Base Address */ +#define EIC_BASE_ADDRESS _UINT32_(0x40002800) /* EIC Base Address */ +#define EVSYS_BASE_ADDRESS _UINT32_(0x42000000) /* EVSYS Base Address */ +#define FREQM_BASE_ADDRESS _UINT32_(0x40002c00) /* FREQM Base Address */ +#define GCLK_BASE_ADDRESS _UINT32_(0x40001c00) /* GCLK Base Address */ +#define HMATRIXHS_BASE_ADDRESS _UINT32_(0x4100a000) /* HMATRIXHS Base Address */ +#define MCLK_BASE_ADDRESS _UINT32_(0x40000800) /* MCLK Base Address */ +#define MTB_BASE_ADDRESS _UINT32_(0x41008000) /* MTB Base Address */ +#define NVMCTRL_BASE_ADDRESS _UINT32_(0x41004000) /* NVMCTRL Base Address */ +#define OTP5_FUSES_BASE_ADDRESS _UINT32_(0x00806020) /* FUSES Base Address */ +#define TEMP_LOG_FUSES_BASE_ADDRESS _UINT32_(0x00806030) /* FUSES Base Address */ +#define USER_FUSES_BASE_ADDRESS _UINT32_(0x00804000) /* FUSES Base Address */ +#define OSCCTRL_BASE_ADDRESS _UINT32_(0x40001000) /* OSCCTRL Base Address */ +#define OSC32KCTRL_BASE_ADDRESS _UINT32_(0x40001400) /* OSC32KCTRL Base Address */ +#define PAC_BASE_ADDRESS _UINT32_(0x40000000) /* PAC Base Address */ +#define PM_BASE_ADDRESS _UINT32_(0x40000400) /* PM Base Address */ +#define PORT_BASE_ADDRESS _UINT32_(0x41000000) /* PORT Base Address */ +#define PORT_IOBUS_BASE_ADDRESS _UINT32_(0x60000000) /* PORT Base Address */ +#define PTC_BASE_ADDRESS _UINT32_(0x42005800) /* PTC Base Address */ +#define RSTC_BASE_ADDRESS _UINT32_(0x40000c00) /* RSTC Base Address */ +#define RTC_BASE_ADDRESS _UINT32_(0x40002400) /* RTC Base Address */ +#define SDADC_BASE_ADDRESS _UINT32_(0x42004c00) /* SDADC Base Address */ +#define SERCOM0_BASE_ADDRESS _UINT32_(0x42000400) /* SERCOM0 Base Address */ +#define SERCOM1_BASE_ADDRESS _UINT32_(0x42000800) /* SERCOM1 Base Address */ +#define SERCOM2_BASE_ADDRESS _UINT32_(0x42000c00) /* SERCOM2 Base Address */ +#define SERCOM3_BASE_ADDRESS _UINT32_(0x42001000) /* SERCOM3 Base Address */ +#define SERCOM4_BASE_ADDRESS _UINT32_(0x42001400) /* SERCOM4 Base Address */ +#define SERCOM5_BASE_ADDRESS _UINT32_(0x42001800) /* SERCOM5 Base Address */ +#define SUPC_BASE_ADDRESS _UINT32_(0x40001800) /* SUPC Base Address */ +#define TC0_BASE_ADDRESS _UINT32_(0x42003000) /* TC0 Base Address */ +#define TC1_BASE_ADDRESS _UINT32_(0x42003400) /* TC1 Base Address */ +#define TC2_BASE_ADDRESS _UINT32_(0x42003800) /* TC2 Base Address */ +#define TC3_BASE_ADDRESS _UINT32_(0x42003c00) /* TC3 Base Address */ +#define TC4_BASE_ADDRESS _UINT32_(0x42004000) /* TC4 Base Address */ +#define TCC0_BASE_ADDRESS _UINT32_(0x42002400) /* TCC0 Base Address */ +#define TCC1_BASE_ADDRESS _UINT32_(0x42002800) /* TCC1 Base Address */ +#define TCC2_BASE_ADDRESS _UINT32_(0x42002c00) /* TCC2 Base Address */ +#define TSENS_BASE_ADDRESS _UINT32_(0x40003000) /* TSENS Base Address */ +#define WDT_BASE_ADDRESS _UINT32_(0x40002000) /* WDT Base Address */ + +/* ************************************************************************** */ +/* PIO DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#include "pio/samc21j18a.h" + +/* ************************************************************************** */ +/* MEMORY MAPPING DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ +#define FLASH_SIZE _UINT32_(0x00040000) /* 256kB Memory segment type: flash */ +#define FLASH_PAGE_SIZE _UINT32_( 64) +#define FLASH_NB_OF_PAGES _UINT32_( 4096) + +#define OTP5_SIZE _UINT32_(0x00000008) /* 0kB Memory segment type: fuses */ +#define TEMP_LOG_SIZE _UINT32_(0x00000008) /* 0kB Memory segment type: fuses */ +#define USER_PAGE_SIZE _UINT32_(0x00000100) /* 0kB Memory segment type: user_page */ +#define USER_PAGE_PAGE_SIZE _UINT32_( 64) +#define USER_PAGE_NB_OF_PAGES _UINT32_( 4) + +#define RWW_SIZE _UINT32_(0x00002000) /* 8kB Memory segment type: flash */ +#define RWW_PAGE_SIZE _UINT32_( 64) +#define RWW_NB_OF_PAGES _UINT32_( 128) + +#define HSRAM_SIZE _UINT32_(0x00008000) /* 32kB Memory segment type: ram */ +#define HPB0_SIZE _UINT32_(0x00004000) /* 16kB Memory segment type: io */ +#define HPB1_SIZE _UINT32_(0x00010000) /* 64kB Memory segment type: io */ +#define HPB2_SIZE _UINT32_(0x00008000) /* 32kB Memory segment type: io */ +#define DIVAS_SIZE _UINT32_(0x00000020) /* 0kB Memory segment type: io */ +#define PPB_SIZE _UINT32_(0x00100000) /* 1024kB Memory segment type: io */ +#define SCS_SIZE _UINT32_(0x00001000) /* 4kB Memory segment type: io */ +#define PERIPHERALS_SIZE _UINT32_(0x20000000) /* 524288kB Memory segment type: io */ + +#define FLASH_ADDR _UINT32_(0x00000000) /* FLASH base address (type: flash)*/ +#define OTP5_ADDR _UINT32_(0x00806020) /* OTP5 base address (type: fuses)*/ +#define TEMP_LOG_ADDR _UINT32_(0x00806030) /* TEMP_LOG base address (type: fuses)*/ +#define USER_PAGE_ADDR _UINT32_(0x00804000) /* USER_PAGE base address (type: user_page)*/ +#define RWW_ADDR _UINT32_(0x00400000) /* RWW base address (type: flash)*/ +#define HSRAM_ADDR _UINT32_(0x20000000) /* HSRAM base address (type: ram)*/ +#define HPB0_ADDR _UINT32_(0x40000000) /* HPB0 base address (type: io)*/ +#define HPB1_ADDR _UINT32_(0x41000000) /* HPB1 base address (type: io)*/ +#define HPB2_ADDR _UINT32_(0x42000000) /* HPB2 base address (type: io)*/ +#define DIVAS_ADDR _UINT32_(0x48000000) /* DIVAS base address (type: io)*/ +#define PPB_ADDR _UINT32_(0xe0000000) /* PPB base address (type: io)*/ +#define SCS_ADDR _UINT32_(0xe000e000) /* SCS base address (type: io)*/ +#define PERIPHERALS_ADDR _UINT32_(0x40000000) /* PERIPHERALS base address (type: io)*/ + +/* ************************************************************************** */ +/* DEVICE SIGNATURES FOR SAMC21J18A */ +/* ************************************************************************** */ +#define CHIP_DSU_DID _UINT32_(0X11010500) + +/* ************************************************************************** */ +/* ELECTRICAL DEFINITIONS FOR SAMC21J18A */ +/* ************************************************************************** */ + +/* ************************************************************************** */ +/* Event Generator IDs for SAMC21J18A */ +/* ************************************************************************** */ +#define EVENT_ID_GEN_OSCCTRL_XOSC_FAIL 1 /* ID for OSCCTRL event generator XOSC_FAIL */ +#define EVENT_ID_GEN_OSC32KCTRL_XOSC32K_FAIL 2 /* ID for OSC32KCTRL event generator XOSC32K_FAIL */ +#define EVENT_ID_GEN_RTC_CMP_0 3 /* ID for RTC event generator CMP_0 */ +#define EVENT_ID_GEN_RTC_CMP_1 4 /* ID for RTC event generator CMP_1 */ +#define EVENT_ID_GEN_RTC_OVF 5 /* ID for RTC event generator OVF */ +#define EVENT_ID_GEN_RTC_PER_0 6 /* ID for RTC event generator PER_0 */ +#define EVENT_ID_GEN_RTC_PER_1 7 /* ID for RTC event generator PER_1 */ +#define EVENT_ID_GEN_RTC_PER_2 8 /* ID for RTC event generator PER_2 */ +#define EVENT_ID_GEN_RTC_PER_3 9 /* ID for RTC event generator PER_3 */ +#define EVENT_ID_GEN_RTC_PER_4 10 /* ID for RTC event generator PER_4 */ +#define EVENT_ID_GEN_RTC_PER_5 11 /* ID for RTC event generator PER_5 */ +#define EVENT_ID_GEN_RTC_PER_6 12 /* ID for RTC event generator PER_6 */ +#define EVENT_ID_GEN_RTC_PER_7 13 /* ID for RTC event generator PER_7 */ +#define EVENT_ID_GEN_EIC_EXTINT_0 14 /* ID for EIC event generator EXTINT_0 */ +#define EVENT_ID_GEN_EIC_EXTINT_1 15 /* ID for EIC event generator EXTINT_1 */ +#define EVENT_ID_GEN_EIC_EXTINT_2 16 /* ID for EIC event generator EXTINT_2 */ +#define EVENT_ID_GEN_EIC_EXTINT_3 17 /* ID for EIC event generator EXTINT_3 */ +#define EVENT_ID_GEN_EIC_EXTINT_4 18 /* ID for EIC event generator EXTINT_4 */ +#define EVENT_ID_GEN_EIC_EXTINT_5 19 /* ID for EIC event generator EXTINT_5 */ +#define EVENT_ID_GEN_EIC_EXTINT_6 20 /* ID for EIC event generator EXTINT_6 */ +#define EVENT_ID_GEN_EIC_EXTINT_7 21 /* ID for EIC event generator EXTINT_7 */ +#define EVENT_ID_GEN_EIC_EXTINT_8 22 /* ID for EIC event generator EXTINT_8 */ +#define EVENT_ID_GEN_EIC_EXTINT_9 23 /* ID for EIC event generator EXTINT_9 */ +#define EVENT_ID_GEN_EIC_EXTINT_10 24 /* ID for EIC event generator EXTINT_10 */ +#define EVENT_ID_GEN_EIC_EXTINT_11 25 /* ID for EIC event generator EXTINT_11 */ +#define EVENT_ID_GEN_EIC_EXTINT_12 26 /* ID for EIC event generator EXTINT_12 */ +#define EVENT_ID_GEN_EIC_EXTINT_13 27 /* ID for EIC event generator EXTINT_13 */ +#define EVENT_ID_GEN_EIC_EXTINT_14 28 /* ID for EIC event generator EXTINT_14 */ +#define EVENT_ID_GEN_EIC_EXTINT_15 29 /* ID for EIC event generator EXTINT_15 */ +#define EVENT_ID_GEN_TSENS_WINMON 30 /* ID for TSENS event generator WINMON */ +#define EVENT_ID_GEN_DMAC_CH_0 31 /* ID for DMAC event generator CH_0 */ +#define EVENT_ID_GEN_DMAC_CH_1 32 /* ID for DMAC event generator CH_1 */ +#define EVENT_ID_GEN_DMAC_CH_2 33 /* ID for DMAC event generator CH_2 */ +#define EVENT_ID_GEN_DMAC_CH_3 34 /* ID for DMAC event generator CH_3 */ +#define EVENT_ID_GEN_TCC0_OVF 35 /* ID for TCC0 event generator OVF */ +#define EVENT_ID_GEN_TCC0_TRG 36 /* ID for TCC0 event generator TRG */ +#define EVENT_ID_GEN_TCC0_CNT 37 /* ID for TCC0 event generator CNT */ +#define EVENT_ID_GEN_TCC0_MC_0 38 /* ID for TCC0 event generator MC_0 */ +#define EVENT_ID_GEN_TCC0_MC_1 39 /* ID for TCC0 event generator MC_1 */ +#define EVENT_ID_GEN_TCC0_MC_2 40 /* ID for TCC0 event generator MC_2 */ +#define EVENT_ID_GEN_TCC0_MC_3 41 /* ID for TCC0 event generator MC_3 */ +#define EVENT_ID_GEN_TCC1_OVF 42 /* ID for TCC1 event generator OVF */ +#define EVENT_ID_GEN_TCC1_TRG 43 /* ID for TCC1 event generator TRG */ +#define EVENT_ID_GEN_TCC1_CNT 44 /* ID for TCC1 event generator CNT */ +#define EVENT_ID_GEN_TCC1_MC_0 45 /* ID for TCC1 event generator MC_0 */ +#define EVENT_ID_GEN_TCC1_MC_1 46 /* ID for TCC1 event generator MC_1 */ +#define EVENT_ID_GEN_TCC2_OVF 47 /* ID for TCC2 event generator OVF */ +#define EVENT_ID_GEN_TCC2_TRG 48 /* ID for TCC2 event generator TRG */ +#define EVENT_ID_GEN_TCC2_CNT 49 /* ID for TCC2 event generator CNT */ +#define EVENT_ID_GEN_TCC2_MC_0 50 /* ID for TCC2 event generator MC_0 */ +#define EVENT_ID_GEN_TCC2_MC_1 51 /* ID for TCC2 event generator MC_1 */ +#define EVENT_ID_GEN_TC0_OVF 52 /* ID for TC0 event generator OVF */ +#define EVENT_ID_GEN_TC0_MC_0 53 /* ID for TC0 event generator MC_0 */ +#define EVENT_ID_GEN_TC0_MC_1 54 /* ID for TC0 event generator MC_1 */ +#define EVENT_ID_GEN_TC1_OVF 55 /* ID for TC1 event generator OVF */ +#define EVENT_ID_GEN_TC1_MC_0 56 /* ID for TC1 event generator MC_0 */ +#define EVENT_ID_GEN_TC1_MC_1 57 /* ID for TC1 event generator MC_1 */ +#define EVENT_ID_GEN_TC2_OVF 58 /* ID for TC2 event generator OVF */ +#define EVENT_ID_GEN_TC2_MC_0 59 /* ID for TC2 event generator MC_0 */ +#define EVENT_ID_GEN_TC2_MC_1 60 /* ID for TC2 event generator MC_1 */ +#define EVENT_ID_GEN_TC3_OVF 61 /* ID for TC3 event generator OVF */ +#define EVENT_ID_GEN_TC3_MC_0 62 /* ID for TC3 event generator MC_0 */ +#define EVENT_ID_GEN_TC3_MC_1 63 /* ID for TC3 event generator MC_1 */ +#define EVENT_ID_GEN_TC4_OVF 64 /* ID for TC4 event generator OVF */ +#define EVENT_ID_GEN_TC4_MC_0 65 /* ID for TC4 event generator MC_0 */ +#define EVENT_ID_GEN_TC4_MC_1 66 /* ID for TC4 event generator MC_1 */ +#define EVENT_ID_GEN_ADC0_RESRDY 67 /* ID for ADC0 event generator RESRDY */ +#define EVENT_ID_GEN_ADC0_WINMON 68 /* ID for ADC0 event generator WINMON */ +#define EVENT_ID_GEN_ADC1_RESRDY 69 /* ID for ADC1 event generator RESRDY */ +#define EVENT_ID_GEN_ADC1_WINMON 70 /* ID for ADC1 event generator WINMON */ +#define EVENT_ID_GEN_SDADC_RESRDY 71 /* ID for SDADC event generator RESRDY */ +#define EVENT_ID_GEN_SDADC_WINMON 72 /* ID for SDADC event generator WINMON */ +#define EVENT_ID_GEN_AC_COMP_0 73 /* ID for AC event generator COMP_0 */ +#define EVENT_ID_GEN_AC_COMP_1 74 /* ID for AC event generator COMP_1 */ +#define EVENT_ID_GEN_AC_COMP_2 75 /* ID for AC event generator COMP_2 */ +#define EVENT_ID_GEN_AC_COMP_3 76 /* ID for AC event generator COMP_3 */ +#define EVENT_ID_GEN_AC_WIN_0 77 /* ID for AC event generator WIN_0 */ +#define EVENT_ID_GEN_AC_WIN_1 78 /* ID for AC event generator WIN_1 */ +#define EVENT_ID_GEN_DAC_EMPTY 79 /* ID for DAC event generator EMPTY */ +#define EVENT_ID_GEN_PTC_EOC 80 /* ID for PTC event generator EOC */ +#define EVENT_ID_GEN_PTC_WIN_COMP 81 /* ID for PTC event generator WIN_COMP */ +#define EVENT_ID_GEN_CCL_LUTOUT_0 82 /* ID for CCL event generator LUTOUT_0 */ +#define EVENT_ID_GEN_CCL_LUTOUT_1 83 /* ID for CCL event generator LUTOUT_1 */ +#define EVENT_ID_GEN_CCL_LUTOUT_2 84 /* ID for CCL event generator LUTOUT_2 */ +#define EVENT_ID_GEN_CCL_LUTOUT_3 85 /* ID for CCL event generator LUTOUT_3 */ +#define EVENT_ID_GEN_PAC_ACCERR 86 /* ID for PAC event generator ACCERR */ + +/* ************************************************************************** */ +/* Event User IDs for SAMC21J18A */ +/* ************************************************************************** */ +#define EVENT_ID_USER_TSENS_START 0 /* ID for TSENS event user START */ +#define EVENT_ID_USER_PORT_EV_0 1 /* ID for PORT event user EV_0 */ +#define EVENT_ID_USER_PORT_EV_1 2 /* ID for PORT event user EV_1 */ +#define EVENT_ID_USER_PORT_EV_2 3 /* ID for PORT event user EV_2 */ +#define EVENT_ID_USER_PORT_EV_3 4 /* ID for PORT event user EV_3 */ +#define EVENT_ID_USER_DMAC_CH_0 5 /* ID for DMAC event user CH_0 */ +#define EVENT_ID_USER_DMAC_CH_1 6 /* ID for DMAC event user CH_1 */ +#define EVENT_ID_USER_DMAC_CH_2 7 /* ID for DMAC event user CH_2 */ +#define EVENT_ID_USER_DMAC_CH_3 8 /* ID for DMAC event user CH_3 */ +#define EVENT_ID_USER_TCC0_EV_0 9 /* ID for TCC0 event user EV_0 */ +#define EVENT_ID_USER_TCC0_EV_1 10 /* ID for TCC0 event user EV_1 */ +#define EVENT_ID_USER_TCC0_MC_0 11 /* ID for TCC0 event user MC_0 */ +#define EVENT_ID_USER_TCC0_MC_1 12 /* ID for TCC0 event user MC_1 */ +#define EVENT_ID_USER_TCC0_MC_2 13 /* ID for TCC0 event user MC_2 */ +#define EVENT_ID_USER_TCC0_MC_3 14 /* ID for TCC0 event user MC_3 */ +#define EVENT_ID_USER_TCC1_EV_0 15 /* ID for TCC1 event user EV_0 */ +#define EVENT_ID_USER_TCC1_EV_1 16 /* ID for TCC1 event user EV_1 */ +#define EVENT_ID_USER_TCC1_MC_0 17 /* ID for TCC1 event user MC_0 */ +#define EVENT_ID_USER_TCC1_MC_1 18 /* ID for TCC1 event user MC_1 */ +#define EVENT_ID_USER_TCC2_EV_0 19 /* ID for TCC2 event user EV_0 */ +#define EVENT_ID_USER_TCC2_EV_1 20 /* ID for TCC2 event user EV_1 */ +#define EVENT_ID_USER_TCC2_MC_0 21 /* ID for TCC2 event user MC_0 */ +#define EVENT_ID_USER_TCC2_MC_1 22 /* ID for TCC2 event user MC_1 */ +#define EVENT_ID_USER_TC0_EVU 23 /* ID for TC0 event user EVU */ +#define EVENT_ID_USER_TC1_EVU 24 /* ID for TC1 event user EVU */ +#define EVENT_ID_USER_TC2_EVU 25 /* ID for TC2 event user EVU */ +#define EVENT_ID_USER_TC3_EVU 26 /* ID for TC3 event user EVU */ +#define EVENT_ID_USER_TC4_EVU 27 /* ID for TC4 event user EVU */ +#define EVENT_ID_USER_ADC0_START 28 /* ID for ADC0 event user START */ +#define EVENT_ID_USER_ADC0_SYNC 29 /* ID for ADC0 event user SYNC */ +#define EVENT_ID_USER_ADC1_START 30 /* ID for ADC1 event user START */ +#define EVENT_ID_USER_ADC1_SYNC 31 /* ID for ADC1 event user SYNC */ +#define EVENT_ID_USER_SDADC_START 32 /* ID for SDADC event user START */ +#define EVENT_ID_USER_SDADC_FLUSH 33 /* ID for SDADC event user FLUSH */ +#define EVENT_ID_USER_AC_SOC_0 34 /* ID for AC event user SOC_0 */ +#define EVENT_ID_USER_AC_SOC_1 35 /* ID for AC event user SOC_1 */ +#define EVENT_ID_USER_AC_SOC_2 36 /* ID for AC event user SOC_2 */ +#define EVENT_ID_USER_AC_SOC_3 37 /* ID for AC event user SOC_3 */ +#define EVENT_ID_USER_DAC_START 38 /* ID for DAC event user START */ +#define EVENT_ID_USER_CCL_LUTIN_0 40 /* ID for CCL event user LUTIN_0 */ +#define EVENT_ID_USER_CCL_LUTIN_1 41 /* ID for CCL event user LUTIN_1 */ +#define EVENT_ID_USER_CCL_LUTIN_2 42 /* ID for CCL event user LUTIN_2 */ +#define EVENT_ID_USER_CCL_LUTIN_3 43 /* ID for CCL event user LUTIN_3 */ +#define EVENT_ID_USER_MTB_START 45 /* ID for MTB event user START */ +#define EVENT_ID_USER_MTB_STOP 46 /* ID for MTB event user STOP */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SAMC21J18A_H_ */ + diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cachel1_armv7.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cachel1_armv7.h new file mode 100644 index 00000000..abebc95f --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cachel1_armv7.h @@ -0,0 +1,411 @@ +/****************************************************************************** + * @file cachel1_armv7.h + * @brief CMSIS Level 1 Cache API for Armv7-M and later + * @version V1.0.1 + * @date 19. April 2021 + ******************************************************************************/ +/* + * Copyright (c) 2020-2021 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef ARM_CACHEL1_ARMV7_H +#define ARM_CACHEL1_ARMV7_H + +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_CacheFunctions Cache Functions + \brief Functions that configure Instruction and Data cache. + @{ + */ + +/* Cache Size ID Register Macros */ +#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos) +#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos ) + +#ifndef __SCB_DCACHE_LINE_SIZE +#define __SCB_DCACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */ +#endif + +#ifndef __SCB_ICACHE_LINE_SIZE +#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */ +#endif + +/** + \brief Enable I-Cache + \details Turns on I-Cache + */ +__STATIC_FORCEINLINE void SCB_EnableICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ + + __DSB(); + __ISB(); + SCB->ICIALLU = 0UL; /* invalidate I-Cache */ + __DSB(); + __ISB(); + SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Disable I-Cache + \details Turns off I-Cache + */ +__STATIC_FORCEINLINE void SCB_DisableICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */ + SCB->ICIALLU = 0UL; /* invalidate I-Cache */ + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Invalidate I-Cache + \details Invalidates I-Cache + */ +__STATIC_FORCEINLINE void SCB_InvalidateICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->ICIALLU = 0UL; + __DSB(); + __ISB(); + #endif +} + + +/** + \brief I-Cache Invalidate by address + \details Invalidates I-Cache for the given address. + I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity. + I-Cache memory blocks which are part of given address + given size are invalidated. + \param[in] addr address + \param[in] isize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (volatile void *addr, int32_t isize) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + if ( isize > 0 ) { + int32_t op_size = isize + (((uint32_t)addr) & (__SCB_ICACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_ICACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->ICIMVAU = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_ICACHE_LINE_SIZE; + op_size -= __SCB_ICACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + + +/** + \brief Enable D-Cache + \details Turns on D-Cache + */ +__STATIC_FORCEINLINE void SCB_EnableDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | + ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + __DSB(); + + SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Disable D-Cache + \details Turns off D-Cache + */ +__STATIC_FORCEINLINE void SCB_DisableDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean & invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | + ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Invalidate D-Cache + \details Invalidates D-Cache + */ +__STATIC_FORCEINLINE void SCB_InvalidateDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | + ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Clean D-Cache + \details Cleans D-Cache + */ +__STATIC_FORCEINLINE void SCB_CleanDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) | + ((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Clean & Invalidate D-Cache + \details Cleans and Invalidates D-Cache + */ +__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean & invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | + ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief D-Cache Invalidate by address + \details Invalidates D-Cache for the given address. + D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity. + D-Cache memory blocks which are part of given address + given size are invalidated. + \param[in] addr address + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + if ( dsize > 0 ) { + int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_DCACHE_LINE_SIZE; + op_size -= __SCB_DCACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + + +/** + \brief D-Cache Clean by address + \details Cleans D-Cache for the given address + D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity. + D-Cache memory blocks which are part of given address + given size are cleaned. + \param[in] addr address + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + if ( dsize > 0 ) { + int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_DCACHE_LINE_SIZE; + op_size -= __SCB_DCACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + + +/** + \brief D-Cache Clean and Invalidate by address + \details Cleans and invalidates D_Cache for the given address + D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity. + D-Cache memory blocks which are part of given address + given size are cleaned and invalidated. + \param[in] addr address (aligned to 32-byte boundary) + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (volatile void *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + if ( dsize > 0 ) { + int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_DCACHE_LINE_SIZE; + op_size -= __SCB_DCACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + +/*@} end of CMSIS_Core_CacheFunctions */ + +#endif /* ARM_CACHEL1_ARMV7_H */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armcc.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armcc.h new file mode 100644 index 00000000..a955d471 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armcc.h @@ -0,0 +1,888 @@ +/**************************************************************************//** + * @file cmsis_armcc.h + * @brief CMSIS compiler ARMCC (Arm Compiler 5) header file + * @version V5.3.2 + * @date 27. May 2021 + ******************************************************************************/ +/* + * Copyright (c) 2009-2021 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_ARMCC_H +#define __CMSIS_ARMCC_H + + +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677) + #error "Please use Arm Compiler Toolchain V4.0.677 or later!" +#endif + +/* CMSIS compiler control architecture macros */ +#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \ + (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) ) + #define __ARM_ARCH_6M__ 1 +#endif + +#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1)) + #define __ARM_ARCH_7M__ 1 +#endif + +#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1)) + #define __ARM_ARCH_7EM__ 1 +#endif + + /* __ARM_ARCH_8M_BASE__ not applicable */ + /* __ARM_ARCH_8M_MAIN__ not applicable */ + /* __ARM_ARCH_8_1M_MAIN__ not applicable */ + +/* CMSIS compiler control DSP macros */ +#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + #define __ARM_FEATURE_DSP 1 +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE static __forceinline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __declspec(noreturn) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed)) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT __packed struct +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION __packed union +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x))) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr))) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr))) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __memory_changed() +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START +#define __PROGRAM_START __main +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section("RESET"))) +#endif + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __nop + + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() __isb(0xF) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() __dsb(0xF) + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() __dmb(0xF) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV __rev + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value) +{ + rev16 r0, r0 + bx lr +} +#endif + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int16_t __REVSH(int16_t value) +{ + revsh r0, r0 + bx lr +} +#endif + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +#define __ROR __ror + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __breakpoint(value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + #define __RBIT __rbit +#else +__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value) +{ + uint32_t result; + uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ + + result = value; /* r will be reversed bits of v; first get LSB of v */ + for (value >>= 1U; value != 0U; value >>= 1U) + { + result <<= 1U; + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ + return result; +} +#endif + + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +#define __CLZ __clz + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr)) +#else + #define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXH(ptr) ((uint16_t) __ldrex(ptr)) +#else + #define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr)) +#else + #define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXB(value, ptr) __strex(value, ptr) +#else + #define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXH(value, ptr) __strex(value, ptr) +#else + #define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXW(value, ptr) __strex(value, ptr) +#else + #define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __clrex + + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value) +{ + rrx r0, r0 + bx lr +} +#endif + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr)) + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDRHT(ptr) ((uint16_t) __ldrt(ptr)) + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDRT(ptr) ((uint32_t ) __ldrt(ptr)) + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRBT(value, ptr) __strt(value, ptr) + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRHT(value, ptr) __strt(value, ptr) + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRT(value, ptr) __strt(value, ptr) + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__attribute__((always_inline)) __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +/* intrinsic void __enable_irq(); */ + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +/* intrinsic void __disable_irq(); */ + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_INLINE uint32_t __get_CONTROL(void) +{ + register uint32_t __regControl __ASM("control"); + return(__regControl); +} + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_INLINE void __set_CONTROL(uint32_t control) +{ + register uint32_t __regControl __ASM("control"); + __regControl = control; + __ISB(); +} + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_INLINE uint32_t __get_IPSR(void) +{ + register uint32_t __regIPSR __ASM("ipsr"); + return(__regIPSR); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_INLINE uint32_t __get_APSR(void) +{ + register uint32_t __regAPSR __ASM("apsr"); + return(__regAPSR); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_INLINE uint32_t __get_xPSR(void) +{ + register uint32_t __regXPSR __ASM("xpsr"); + return(__regXPSR); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_INLINE uint32_t __get_PSP(void) +{ + register uint32_t __regProcessStackPointer __ASM("psp"); + return(__regProcessStackPointer); +} + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) +{ + register uint32_t __regProcessStackPointer __ASM("psp"); + __regProcessStackPointer = topOfProcStack; +} + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_INLINE uint32_t __get_MSP(void) +{ + register uint32_t __regMainStackPointer __ASM("msp"); + return(__regMainStackPointer); +} + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) +{ + register uint32_t __regMainStackPointer __ASM("msp"); + __regMainStackPointer = topOfMainStack; +} + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_INLINE uint32_t __get_PRIMASK(void) +{ + register uint32_t __regPriMask __ASM("primask"); + return(__regPriMask); +} + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_INLINE void __set_PRIMASK(uint32_t priMask) +{ + register uint32_t __regPriMask __ASM("primask"); + __regPriMask = (priMask); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +#define __enable_fault_irq __enable_fiq + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +#define __disable_fault_irq __disable_fiq + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_INLINE uint32_t __get_BASEPRI(void) +{ + register uint32_t __regBasePri __ASM("basepri"); + return(__regBasePri); +} + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_INLINE void __set_BASEPRI(uint32_t basePri) +{ + register uint32_t __regBasePri __ASM("basepri"); + __regBasePri = (basePri & 0xFFU); +} + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + register uint32_t __regBasePriMax __ASM("basepri_max"); + __regBasePriMax = (basePri & 0xFFU); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_INLINE uint32_t __get_FAULTMASK(void) +{ + register uint32_t __regFaultMask __ASM("faultmask"); + return(__regFaultMask); +} + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask) +{ + register uint32_t __regFaultMask __ASM("faultmask"); + __regFaultMask = (faultMask & (uint32_t)1U); +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +__STATIC_INLINE uint32_t __get_FPSCR(void) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + register uint32_t __regfpscr __ASM("fpscr"); + return(__regfpscr); +#else + return(0U); +#endif +} + + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +__STATIC_INLINE void __set_FPSCR(uint32_t fpscr) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + register uint32_t __regfpscr __ASM("fpscr"); + __regfpscr = (fpscr); +#else + (void)fpscr; +#endif +} + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +#define __SADD8 __sadd8 +#define __QADD8 __qadd8 +#define __SHADD8 __shadd8 +#define __UADD8 __uadd8 +#define __UQADD8 __uqadd8 +#define __UHADD8 __uhadd8 +#define __SSUB8 __ssub8 +#define __QSUB8 __qsub8 +#define __SHSUB8 __shsub8 +#define __USUB8 __usub8 +#define __UQSUB8 __uqsub8 +#define __UHSUB8 __uhsub8 +#define __SADD16 __sadd16 +#define __QADD16 __qadd16 +#define __SHADD16 __shadd16 +#define __UADD16 __uadd16 +#define __UQADD16 __uqadd16 +#define __UHADD16 __uhadd16 +#define __SSUB16 __ssub16 +#define __QSUB16 __qsub16 +#define __SHSUB16 __shsub16 +#define __USUB16 __usub16 +#define __UQSUB16 __uqsub16 +#define __UHSUB16 __uhsub16 +#define __SASX __sasx +#define __QASX __qasx +#define __SHASX __shasx +#define __UASX __uasx +#define __UQASX __uqasx +#define __UHASX __uhasx +#define __SSAX __ssax +#define __QSAX __qsax +#define __SHSAX __shsax +#define __USAX __usax +#define __UQSAX __uqsax +#define __UHSAX __uhsax +#define __USAD8 __usad8 +#define __USADA8 __usada8 +#define __SSAT16 __ssat16 +#define __USAT16 __usat16 +#define __UXTB16 __uxtb16 +#define __UXTAB16 __uxtab16 +#define __SXTB16 __sxtb16 +#define __SXTAB16 __sxtab16 +#define __SMUAD __smuad +#define __SMUADX __smuadx +#define __SMLAD __smlad +#define __SMLADX __smladx +#define __SMLALD __smlald +#define __SMLALDX __smlaldx +#define __SMUSD __smusd +#define __SMUSDX __smusdx +#define __SMLSD __smlsd +#define __SMLSDX __smlsdx +#define __SMLSLD __smlsld +#define __SMLSLDX __smlsldx +#define __SEL __sel +#define __QADD __qadd +#define __QSUB __qsub + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \ + ((int64_t)(ARG3) << 32U) ) >> 32U)) + +#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2)) + +#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3)) + +#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCC_H */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang.h new file mode 100644 index 00000000..69114177 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang.h @@ -0,0 +1,1503 @@ +/**************************************************************************//** + * @file cmsis_armclang.h + * @brief CMSIS compiler armclang (Arm Compiler 6) header file + * @version V5.4.3 + * @date 27. May 2021 + ******************************************************************************/ +/* + * Copyright (c) 2009-2021 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*lint -esym(9058, IRQn)*/ /* disable MISRA 2012 Rule 2.4 for IRQn */ + +#ifndef __CMSIS_ARMCLANG_H +#define __CMSIS_ARMCLANG_H + +#pragma clang system_header /* treat file as system include file */ + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32 */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */ + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */ + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_READ */ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START +#define __PROGRAM_START __main +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section("RESET"))) +#endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +#ifndef __STACK_SEAL +#define __STACK_SEAL Image$$STACKSEAL$$ZI$$Base +#endif + +#ifndef __TZ_STACK_SEAL_SIZE +#define __TZ_STACK_SEAL_SIZE 8U +#endif + +#ifndef __TZ_STACK_SEAL_VALUE +#define __TZ_STACK_SEAL_VALUE 0xFEF5EDA5FEF5EDA5ULL +#endif + + +__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) { + *((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE; +} +#endif + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_RW_REG(r) "+l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_RW_REG(r) "+r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __builtin_arm_nop + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __builtin_arm_wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __builtin_arm_wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __builtin_arm_sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() __builtin_arm_isb(0xF) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() __builtin_arm_dsb(0xF) + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() __builtin_arm_dmb(0xF) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV(value) __builtin_bswap32(value) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV16(value) __ROR(__REV(value), 16) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REVSH(value) (int16_t)__builtin_bswap16(value) + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#define __RBIT __builtin_arm_rbit + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value) +{ + /* Even though __builtin_clz produces a CLZ instruction on ARM, formally + __builtin_clz(0) is undefined behaviour, so handle this case specially. + This guarantees ARM-compatible results if happening to compile on a non-ARM + target, and ensures the compiler doesn't decide to activate any + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM Compiler 6.10 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + { + return 32U; + } + return __builtin_clz(value); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) + +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDREXB (uint8_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDREXH (uint16_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDREXW (uint32_t)__builtin_arm_ldrex + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXB (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXH (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXW (uint32_t)__builtin_arm_strex + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __builtin_arm_clrex + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __builtin_arm_ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __builtin_arm_usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) + +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDAEXB (uint8_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDAEXH (uint16_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDAEX (uint32_t)__builtin_arm_ldaex + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXB (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXH (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEX (uint32_t)__builtin_arm_stlex + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +#ifndef __ARM_COMPAT_H +__STATIC_FORCEINLINE void __enable_irq(void) +{ + __ASM volatile ("cpsie i" : : : "memory"); +} +#endif + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +#ifndef __ARM_COMPAT_H +__STATIC_FORCEINLINE void __disable_irq(void) +{ + __ASM volatile ("cpsid i" : : : "memory"); +} +#endif + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); + __ISB(); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); + __ISB(); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_fault_irq(void) +{ + __ASM volatile ("cpsie f" : : : "memory"); +} + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __disable_fault_irq(void) +{ + __ASM volatile ("cpsid f" : : : "memory"); +} + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) ) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) ) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) ) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__ ) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) ) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) || \ + (defined (__ARM_ARCH_8_1M_MAIN__) && (__ARM_ARCH_8_1M_MAIN__ == 1)) ) */ + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __get_FPSCR (uint32_t)__builtin_arm_get_fpscr +#else +#define __get_FPSCR() ((uint32_t)0U) +#endif + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __set_FPSCR __builtin_arm_set_fpscr +#else +#define __set_FPSCR(x) ((void)(x)) +#endif + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +#define __SADD8 __builtin_arm_sadd8 +#define __QADD8 __builtin_arm_qadd8 +#define __SHADD8 __builtin_arm_shadd8 +#define __UADD8 __builtin_arm_uadd8 +#define __UQADD8 __builtin_arm_uqadd8 +#define __UHADD8 __builtin_arm_uhadd8 +#define __SSUB8 __builtin_arm_ssub8 +#define __QSUB8 __builtin_arm_qsub8 +#define __SHSUB8 __builtin_arm_shsub8 +#define __USUB8 __builtin_arm_usub8 +#define __UQSUB8 __builtin_arm_uqsub8 +#define __UHSUB8 __builtin_arm_uhsub8 +#define __SADD16 __builtin_arm_sadd16 +#define __QADD16 __builtin_arm_qadd16 +#define __SHADD16 __builtin_arm_shadd16 +#define __UADD16 __builtin_arm_uadd16 +#define __UQADD16 __builtin_arm_uqadd16 +#define __UHADD16 __builtin_arm_uhadd16 +#define __SSUB16 __builtin_arm_ssub16 +#define __QSUB16 __builtin_arm_qsub16 +#define __SHSUB16 __builtin_arm_shsub16 +#define __USUB16 __builtin_arm_usub16 +#define __UQSUB16 __builtin_arm_uqsub16 +#define __UHSUB16 __builtin_arm_uhsub16 +#define __SASX __builtin_arm_sasx +#define __QASX __builtin_arm_qasx +#define __SHASX __builtin_arm_shasx +#define __UASX __builtin_arm_uasx +#define __UQASX __builtin_arm_uqasx +#define __UHASX __builtin_arm_uhasx +#define __SSAX __builtin_arm_ssax +#define __QSAX __builtin_arm_qsax +#define __SHSAX __builtin_arm_shsax +#define __USAX __builtin_arm_usax +#define __UQSAX __builtin_arm_uqsax +#define __UHSAX __builtin_arm_uhsax +#define __USAD8 __builtin_arm_usad8 +#define __USADA8 __builtin_arm_usada8 +#define __SSAT16 __builtin_arm_ssat16 +#define __USAT16 __builtin_arm_usat16 +#define __UXTB16 __builtin_arm_uxtb16 +#define __UXTAB16 __builtin_arm_uxtab16 +#define __SXTB16 __builtin_arm_sxtb16 +#define __SXTAB16 __builtin_arm_sxtab16 +#define __SMUAD __builtin_arm_smuad +#define __SMUADX __builtin_arm_smuadx +#define __SMLAD __builtin_arm_smlad +#define __SMLADX __builtin_arm_smladx +#define __SMLALD __builtin_arm_smlald +#define __SMLALDX __builtin_arm_smlaldx +#define __SMUSD __builtin_arm_smusd +#define __SMUSDX __builtin_arm_smusdx +#define __SMLSD __builtin_arm_smlsd +#define __SMLSDX __builtin_arm_smlsdx +#define __SMLSLD __builtin_arm_smlsld +#define __SMLSLDX __builtin_arm_smlsldx +#define __SEL __builtin_arm_sel +#define __QADD __builtin_arm_qadd +#define __QSUB __builtin_arm_qsub + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2)) + +#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3)) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCLANG_H */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang_ltm.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang_ltm.h new file mode 100644 index 00000000..1e255d59 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_armclang_ltm.h @@ -0,0 +1,1928 @@ +/**************************************************************************//** + * @file cmsis_armclang_ltm.h + * @brief CMSIS compiler armclang (Arm Compiler 6) header file + * @version V1.5.3 + * @date 27. May 2021 + ******************************************************************************/ +/* + * Copyright (c) 2018-2021 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*lint -esym(9058, IRQn)*/ /* disable MISRA 2012 Rule 2.4 for IRQn */ + +#ifndef __CMSIS_ARMCLANG_H +#define __CMSIS_ARMCLANG_H + +#pragma clang system_header /* treat file as system include file */ + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32 */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */ + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */ + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_READ */ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START +#define __PROGRAM_START __main +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section("RESET"))) +#endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +#ifndef __STACK_SEAL +#define __STACK_SEAL Image$$STACKSEAL$$ZI$$Base +#endif + +#ifndef __TZ_STACK_SEAL_SIZE +#define __TZ_STACK_SEAL_SIZE 8U +#endif + +#ifndef __TZ_STACK_SEAL_VALUE +#define __TZ_STACK_SEAL_VALUE 0xFEF5EDA5FEF5EDA5ULL +#endif + + +__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) { + *((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE; +} +#endif + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __builtin_arm_nop + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __builtin_arm_wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __builtin_arm_wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __builtin_arm_sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() __builtin_arm_isb(0xF) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() __builtin_arm_dsb(0xF) + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() __builtin_arm_dmb(0xF) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV(value) __builtin_bswap32(value) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV16(value) __ROR(__REV(value), 16) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REVSH(value) (int16_t)__builtin_bswap16(value) + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#define __RBIT __builtin_arm_rbit + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value) +{ + /* Even though __builtin_clz produces a CLZ instruction on ARM, formally + __builtin_clz(0) is undefined behaviour, so handle this case specially. + This guarantees ARM-compatible results if happening to compile on a non-ARM + target, and ensures the compiler doesn't decide to activate any + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM Compiler 6.10 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + { + return 32U; + } + return __builtin_clz(value); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDREXB (uint8_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDREXH (uint16_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDREXW (uint32_t)__builtin_arm_ldrex + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXB (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXH (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXW (uint32_t)__builtin_arm_strex + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __builtin_arm_clrex + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __builtin_arm_ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __builtin_arm_usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDAEXB (uint8_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDAEXH (uint16_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDAEX (uint32_t)__builtin_arm_ldaex + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXB (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXH (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEX (uint32_t)__builtin_arm_stlex + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +#ifndef __ARM_COMPAT_H +__STATIC_FORCEINLINE void __enable_irq(void) +{ + __ASM volatile ("cpsie i" : : : "memory"); +} +#endif + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +#ifndef __ARM_COMPAT_H +__STATIC_FORCEINLINE void __disable_irq(void) +{ + __ASM volatile ("cpsid i" : : : "memory"); +} +#endif + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); + __ISB(); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); + __ISB(); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_fault_irq(void) +{ + __ASM volatile ("cpsie f" : : : "memory"); +} + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __disable_fault_irq(void) +{ + __ASM volatile ("cpsid f" : : : "memory"); +} + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __get_FPSCR (uint32_t)__builtin_arm_get_fpscr +#else +#define __get_FPSCR() ((uint32_t)0U) +#endif + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __set_FPSCR __builtin_arm_set_fpscr +#else +#define __set_FPSCR(x) ((void)(x)) +#endif + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#define __SSAT16(ARG1,ARG2) \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +#define __USAT16(ARG1,ARG2) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2)) + +#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3)) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCLANG_H */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h new file mode 100644 index 00000000..adbf296f --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_compiler.h @@ -0,0 +1,283 @@ +/**************************************************************************//** + * @file cmsis_compiler.h + * @brief CMSIS compiler generic header file + * @version V5.1.0 + * @date 09. October 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_COMPILER_H +#define __CMSIS_COMPILER_H + +#include + +/* + * Arm Compiler 4/5 + */ +#if defined ( __CC_ARM ) + #include "cmsis_armcc.h" + + +/* + * Arm Compiler 6.6 LTM (armclang) + */ +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) && (__ARMCC_VERSION < 6100100) + #include "cmsis_armclang_ltm.h" + + /* + * Arm Compiler above 6.10.1 (armclang) + */ +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100) + #include "cmsis_armclang.h" + + +/* + * GNU Compiler + */ +#elif defined ( __GNUC__ ) + #include "cmsis_gcc.h" + + +/* + * IAR Compiler + */ +#elif defined ( __ICCARM__ ) + #include + + +/* + * TI Arm Compiler + */ +#elif defined ( __TI_ARM__ ) + #include + + #ifndef __ASM + #define __ASM __asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + #define __NO_RETURN __attribute__((noreturn)) + #endif + #ifndef __USED + #define __USED __attribute__((used)) + #endif + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + #ifndef __PACKED + #define __PACKED __attribute__((packed)) + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed)) + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed)) + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) + #endif + #ifndef __RESTRICT + #define __RESTRICT __restrict + #endif + #ifndef __COMPILER_BARRIER + #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored. + #define __COMPILER_BARRIER() (void)0 + #endif + + +/* + * TASKING Compiler + */ +#elif defined ( __TASKING__ ) + /* + * The CMSIS functions have been implemented as intrinsics in the compiler. + * Please use "carm -?i" to get an up to date list of all intrinsics, + * Including the CMSIS ones. + */ + + #ifndef __ASM + #define __ASM __asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + #define __NO_RETURN __attribute__((noreturn)) + #endif + #ifndef __USED + #define __USED __attribute__((used)) + #endif + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + #ifndef __PACKED + #define __PACKED __packed__ + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __packed__ + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION union __packed__ + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + struct __packed__ T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #define __ALIGNED(x) __align(x) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + #ifndef __COMPILER_BARRIER + #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored. + #define __COMPILER_BARRIER() (void)0 + #endif + + +/* + * COSMIC Compiler + */ +#elif defined ( __CSMC__ ) + #include + + #ifndef __ASM + #define __ASM _asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + // NO RETURN is automatically detected hence no warning here + #define __NO_RETURN + #endif + #ifndef __USED + #warning No compiler specific solution for __USED. __USED is ignored. + #define __USED + #endif + #ifndef __WEAK + #define __WEAK __weak + #endif + #ifndef __PACKED + #define __PACKED @packed + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT @packed struct + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION @packed union + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + @packed struct T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored. + #define __ALIGNED(x) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + #ifndef __COMPILER_BARRIER + #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored. + #define __COMPILER_BARRIER() (void)0 + #endif + + +#else + #error Unknown compiler. +#endif + + +#endif /* __CMSIS_COMPILER_H */ + diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h new file mode 100644 index 00000000..67bda4ef --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_gcc.h @@ -0,0 +1,2211 @@ +/**************************************************************************//** + * @file cmsis_gcc.h + * @brief CMSIS compiler GCC header file + * @version V5.4.1 + * @date 27. May 2021 + ******************************************************************************/ +/* + * Copyright (c) 2009-2021 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_GCC_H +#define __CMSIS_GCC_H + +/* ignore some GCC warnings */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wunused-parameter" + +/* Fallback for __has_builtin */ +#ifndef __has_builtin + #define __has_builtin(x) (0) +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START + +/** + \brief Initializes data and bss sections + \details This default implementations initialized all data and additional bss + sections relying on .copy.table and .zero.table specified properly + in the used linker script. + + */ +__STATIC_FORCEINLINE __NO_RETURN void __cmsis_start(void) +{ + extern void _start(void) __NO_RETURN; + + typedef struct { + uint32_t const* src; + uint32_t* dest; + uint32_t wlen; + } __copy_table_t; + + typedef struct { + uint32_t* dest; + uint32_t wlen; + } __zero_table_t; + + extern const __copy_table_t __copy_table_start__; + extern const __copy_table_t __copy_table_end__; + extern const __zero_table_t __zero_table_start__; + extern const __zero_table_t __zero_table_end__; + + for (__copy_table_t const* pTable = &__copy_table_start__; pTable < &__copy_table_end__; ++pTable) { + for(uint32_t i=0u; iwlen; ++i) { + pTable->dest[i] = pTable->src[i]; + } + } + + for (__zero_table_t const* pTable = &__zero_table_start__; pTable < &__zero_table_end__; ++pTable) { + for(uint32_t i=0u; iwlen; ++i) { + pTable->dest[i] = 0u; + } + } + + _start(); +} + +#define __PROGRAM_START __cmsis_start +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP __StackTop +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT __StackLimit +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute__((used, section(".vectors"))) +#endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +#ifndef __STACK_SEAL +#define __STACK_SEAL __StackSeal +#endif + +#ifndef __TZ_STACK_SEAL_SIZE +#define __TZ_STACK_SEAL_SIZE 8U +#endif + +#ifndef __TZ_STACK_SEAL_VALUE +#define __TZ_STACK_SEAL_VALUE 0xFEF5EDA5FEF5EDA5ULL +#endif + + +__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) { + *((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE; +} +#endif + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_RW_REG(r) "+l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_RW_REG(r) "+r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP() __ASM volatile ("nop") + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI() __ASM volatile ("wfi":::"memory") + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE() __ASM volatile ("wfe":::"memory") + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV() __ASM volatile ("sev") + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +__STATIC_FORCEINLINE void __ISB(void) +{ + __ASM volatile ("isb 0xF":::"memory"); +} + + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +__STATIC_FORCEINLINE void __DSB(void) +{ + __ASM volatile ("dsb 0xF":::"memory"); +} + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +__STATIC_FORCEINLINE void __DMB(void) +{ + __ASM volatile ("dmb 0xF":::"memory"); +} + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __REV(uint32_t value) +{ +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) + return __builtin_bswap32(value); +#else + uint32_t result; + + __ASM ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +#endif +} + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __REV16(uint32_t value) +{ + uint32_t result; + + __ASM ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +} + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE int16_t __REVSH(int16_t value) +{ +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + return (int16_t)__builtin_bswap16(value); +#else + int16_t result; + + __ASM ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +#endif +} + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __RBIT(uint32_t value) +{ + uint32_t result; + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + __ASM ("rbit %0, %1" : "=r" (result) : "r" (value) ); +#else + uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ + + result = value; /* r will be reversed bits of v; first get LSB of v */ + for (value >>= 1U; value != 0U; value >>= 1U) + { + result <<= 1U; + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ +#endif + return result; +} + + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value) +{ + /* Even though __builtin_clz produces a CLZ instruction on ARM, formally + __builtin_clz(0) is undefined behaviour, so handle this case specially. + This guarantees ARM-compatible results if happening to compile on a non-ARM + target, and ensures the compiler doesn't decide to activate any + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM GCC 7.3 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + { + return 32U; + } + return __builtin_clz(value); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDREXB(volatile uint8_t *addr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); +#endif + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDREXH(volatile uint16_t *addr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); +#endif + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr) +{ + uint32_t result; + + __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); + return(result); +} + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr) +{ + uint32_t result; + + __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr) +{ + uint32_t result; + + __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr) +{ + uint32_t result; + + __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); + return(result); +} + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +__STATIC_FORCEINLINE void __CLREX(void) +{ + __ASM volatile ("clrex" ::: "memory"); +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] ARG1 Value to be saturated + \param [in] ARG2 Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT(ARG1, ARG2) \ +__extension__ \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM volatile ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) : "cc" ); \ + __RES; \ + }) + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] ARG1 Value to be saturated + \param [in] ARG2 Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT(ARG1, ARG2) \ +__extension__ \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM volatile ("usat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) : "cc" ); \ + __RES; \ + }) + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrbt %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); +#endif + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrht %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); +#endif + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAEXB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaexb %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAEXH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaexh %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDAEX(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaex %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" ); + return(result); +} + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlexb %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); + return(result); +} + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlexh %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); + return(result); +} + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlex %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" ); + return(result); +} + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_irq(void) +{ + __ASM volatile ("cpsie i" : : : "memory"); +} + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting special-purpose register PRIMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __disable_irq(void) +{ + __ASM volatile ("cpsid i" : : : "memory"); +} + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); + __ISB(); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); + __ISB(); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_fault_irq(void) +{ + __ASM volatile ("cpsie f" : : : "memory"); +} + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting special-purpose register FAULTMASK. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __disable_fault_irq(void) +{ + __ASM volatile ("cpsid f" : : : "memory"); +} + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +__STATIC_FORCEINLINE uint32_t __get_FPSCR(void) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#if __has_builtin(__builtin_arm_get_fpscr) +// Re-enable using built-in when GCC has been fixed +// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) + /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ + return __builtin_arm_get_fpscr(); +#else + uint32_t result; + + __ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); + return(result); +#endif +#else + return(0U); +#endif +} + + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +__STATIC_FORCEINLINE void __set_FPSCR(uint32_t fpscr) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#if __has_builtin(__builtin_arm_set_fpscr) +// Re-enable using built-in when GCC has been fixed +// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) + /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ + __builtin_arm_set_fpscr(fpscr); +#else + __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory"); +#endif +#else + (void)fpscr; +#endif +} + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#define __SSAT16(ARG1, ARG2) \ +__extension__ \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM volatile ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) : "cc" ); \ + __RES; \ + }) + +#define __USAT16(ARG1, ARG2) \ +__extension__ \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM volatile ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) : "cc" ); \ + __RES; \ + }) + +__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16_RORn(uint32_t op1, uint32_t rotate) +{ + uint32_t result; + if (__builtin_constant_p(rotate) && ((rotate == 8U) || (rotate == 16U) || (rotate == 24U))) { + __ASM volatile ("sxtb16 %0, %1, ROR %2" : "=r" (result) : "r" (op1), "i" (rotate) ); + } else { + result = __SXTB16(__ROR(op1, rotate)) ; + } + return result; +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16_RORn(uint32_t op1, uint32_t op2, uint32_t rotate) +{ + uint32_t result; + if (__builtin_constant_p(rotate) && ((rotate == 8U) || (rotate == 16U) || (rotate == 24U))) { + __ASM volatile ("sxtab16 %0, %1, %2, ROR %3" : "=r" (result) : "r" (op1) , "r" (op2) , "i" (rotate)); + } else { + result = __SXTAB16(op1, __ROR(op2, rotate)); + } + return result; +} + + +__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +#define __PKHBT(ARG1,ARG2,ARG3) \ +__extension__ \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) + +#define __PKHTB(ARG1,ARG2,ARG3) \ +__extension__ \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + if (ARG3 == 0) \ + __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \ + else \ + __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) + + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#pragma GCC diagnostic pop + +#endif /* __CMSIS_GCC_H */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_iccarm.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_iccarm.h new file mode 100644 index 00000000..65b824b0 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_iccarm.h @@ -0,0 +1,1002 @@ +/**************************************************************************//** + * @file cmsis_iccarm.h + * @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file + * @version V5.3.0 + * @date 14. April 2021 + ******************************************************************************/ + +//------------------------------------------------------------------------------ +// +// Copyright (c) 2017-2021 IAR Systems +// Copyright (c) 2017-2021 Arm Limited. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License") +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//------------------------------------------------------------------------------ + + +#ifndef __CMSIS_ICCARM_H__ +#define __CMSIS_ICCARM_H__ + +#ifndef __ICCARM__ + #error This file should only be compiled by ICCARM +#endif + +#pragma system_include + +#define __IAR_FT _Pragma("inline=forced") __intrinsic + +#if (__VER__ >= 8000000) + #define __ICCARM_V8 1 +#else + #define __ICCARM_V8 0 +#endif + +#ifndef __ALIGNED + #if __ICCARM_V8 + #define __ALIGNED(x) __attribute__((aligned(x))) + #elif (__VER__ >= 7080000) + /* Needs IAR language extensions */ + #define __ALIGNED(x) __attribute__((aligned(x))) + #else + #warning No compiler specific solution for __ALIGNED.__ALIGNED is ignored. + #define __ALIGNED(x) + #endif +#endif + + +/* Define compiler macros for CPU architecture, used in CMSIS 5. + */ +#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ || __ARM_ARCH_8M_BASE__ || __ARM_ARCH_8M_MAIN__ +/* Macros already defined */ +#else + #if defined(__ARM8M_MAINLINE__) || defined(__ARM8EM_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #elif defined(__ARM8M_BASELINE__) + #define __ARM_ARCH_8M_BASE__ 1 + #elif defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M' + #if __ARM_ARCH == 6 + #define __ARM_ARCH_6M__ 1 + #elif __ARM_ARCH == 7 + #if __ARM_FEATURE_DSP + #define __ARM_ARCH_7EM__ 1 + #else + #define __ARM_ARCH_7M__ 1 + #endif + #endif /* __ARM_ARCH */ + #endif /* __ARM_ARCH_PROFILE == 'M' */ +#endif + +/* Alternativ core deduction for older ICCARM's */ +#if !defined(__ARM_ARCH_6M__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) && \ + !defined(__ARM_ARCH_8M_BASE__) && !defined(__ARM_ARCH_8M_MAIN__) + #if defined(__ARM6M__) && (__CORE__ == __ARM6M__) + #define __ARM_ARCH_6M__ 1 + #elif defined(__ARM7M__) && (__CORE__ == __ARM7M__) + #define __ARM_ARCH_7M__ 1 + #elif defined(__ARM7EM__) && (__CORE__ == __ARM7EM__) + #define __ARM_ARCH_7EM__ 1 + #elif defined(__ARM8M_BASELINE__) && (__CORE == __ARM8M_BASELINE__) + #define __ARM_ARCH_8M_BASE__ 1 + #elif defined(__ARM8M_MAINLINE__) && (__CORE == __ARM8M_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #elif defined(__ARM8EM_MAINLINE__) && (__CORE == __ARM8EM_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #else + #error "Unknown target." + #endif +#endif + + + +#if defined(__ARM_ARCH_6M__) && __ARM_ARCH_6M__==1 + #define __IAR_M0_FAMILY 1 +#elif defined(__ARM_ARCH_8M_BASE__) && __ARM_ARCH_8M_BASE__==1 + #define __IAR_M0_FAMILY 1 +#else + #define __IAR_M0_FAMILY 0 +#endif + + +#ifndef __ASM + #define __ASM __asm +#endif + +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +#ifndef __INLINE + #define __INLINE inline +#endif + +#ifndef __NO_RETURN + #if __ICCARM_V8 + #define __NO_RETURN __attribute__((__noreturn__)) + #else + #define __NO_RETURN _Pragma("object_attribute=__noreturn") + #endif +#endif + +#ifndef __PACKED + #if __ICCARM_V8 + #define __PACKED __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED __packed + #endif +#endif + +#ifndef __PACKED_STRUCT + #if __ICCARM_V8 + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED_STRUCT __packed struct + #endif +#endif + +#ifndef __PACKED_UNION + #if __ICCARM_V8 + #define __PACKED_UNION union __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED_UNION __packed union + #endif +#endif + +#ifndef __RESTRICT + #if __ICCARM_V8 + #define __RESTRICT __restrict + #else + /* Needs IAR language extensions */ + #define __RESTRICT restrict + #endif +#endif + +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline +#endif + +#ifndef __FORCEINLINE + #define __FORCEINLINE _Pragma("inline=forced") +#endif + +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __FORCEINLINE __STATIC_INLINE +#endif + +#ifndef __UNALIGNED_UINT16_READ +#pragma language=save +#pragma language=extended +__IAR_FT uint16_t __iar_uint16_read(void const *ptr) +{ + return *(__packed uint16_t*)(ptr); +} +#pragma language=restore +#define __UNALIGNED_UINT16_READ(PTR) __iar_uint16_read(PTR) +#endif + + +#ifndef __UNALIGNED_UINT16_WRITE +#pragma language=save +#pragma language=extended +__IAR_FT void __iar_uint16_write(void const *ptr, uint16_t val) +{ + *(__packed uint16_t*)(ptr) = val;; +} +#pragma language=restore +#define __UNALIGNED_UINT16_WRITE(PTR,VAL) __iar_uint16_write(PTR,VAL) +#endif + +#ifndef __UNALIGNED_UINT32_READ +#pragma language=save +#pragma language=extended +__IAR_FT uint32_t __iar_uint32_read(void const *ptr) +{ + return *(__packed uint32_t*)(ptr); +} +#pragma language=restore +#define __UNALIGNED_UINT32_READ(PTR) __iar_uint32_read(PTR) +#endif + +#ifndef __UNALIGNED_UINT32_WRITE +#pragma language=save +#pragma language=extended +__IAR_FT void __iar_uint32_write(void const *ptr, uint32_t val) +{ + *(__packed uint32_t*)(ptr) = val;; +} +#pragma language=restore +#define __UNALIGNED_UINT32_WRITE(PTR,VAL) __iar_uint32_write(PTR,VAL) +#endif + +#ifndef __UNALIGNED_UINT32 /* deprecated */ +#pragma language=save +#pragma language=extended +__packed struct __iar_u32 { uint32_t v; }; +#pragma language=restore +#define __UNALIGNED_UINT32(PTR) (((struct __iar_u32 *)(PTR))->v) +#endif + +#ifndef __USED + #if __ICCARM_V8 + #define __USED __attribute__((used)) + #else + #define __USED _Pragma("__root") + #endif +#endif + +#undef __WEAK /* undo the definition from DLib_Defaults.h */ +#ifndef __WEAK + #if __ICCARM_V8 + #define __WEAK __attribute__((weak)) + #else + #define __WEAK _Pragma("__weak") + #endif +#endif + +#ifndef __PROGRAM_START +#define __PROGRAM_START __iar_program_start +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP CSTACK$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT CSTACK$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __vector_table +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE @".intvec" +#endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +#ifndef __STACK_SEAL +#define __STACK_SEAL STACKSEAL$$Base +#endif + +#ifndef __TZ_STACK_SEAL_SIZE +#define __TZ_STACK_SEAL_SIZE 8U +#endif + +#ifndef __TZ_STACK_SEAL_VALUE +#define __TZ_STACK_SEAL_VALUE 0xFEF5EDA5FEF5EDA5ULL +#endif + +__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) { + *((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE; +} +#endif + +#ifndef __ICCARM_INTRINSICS_VERSION__ + #define __ICCARM_INTRINSICS_VERSION__ 0 +#endif + +#if __ICCARM_INTRINSICS_VERSION__ == 2 + + #if defined(__CLZ) + #undef __CLZ + #endif + #if defined(__REVSH) + #undef __REVSH + #endif + #if defined(__RBIT) + #undef __RBIT + #endif + #if defined(__SSAT) + #undef __SSAT + #endif + #if defined(__USAT) + #undef __USAT + #endif + + #include "iccarm_builtin.h" + + #define __disable_fault_irq __iar_builtin_disable_fiq + #define __disable_irq __iar_builtin_disable_interrupt + #define __enable_fault_irq __iar_builtin_enable_fiq + #define __enable_irq __iar_builtin_enable_interrupt + #define __arm_rsr __iar_builtin_rsr + #define __arm_wsr __iar_builtin_wsr + + + #define __get_APSR() (__arm_rsr("APSR")) + #define __get_BASEPRI() (__arm_rsr("BASEPRI")) + #define __get_CONTROL() (__arm_rsr("CONTROL")) + #define __get_FAULTMASK() (__arm_rsr("FAULTMASK")) + + #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + #define __get_FPSCR() (__arm_rsr("FPSCR")) + #define __set_FPSCR(VALUE) (__arm_wsr("FPSCR", (VALUE))) + #else + #define __get_FPSCR() ( 0 ) + #define __set_FPSCR(VALUE) ((void)VALUE) + #endif + + #define __get_IPSR() (__arm_rsr("IPSR")) + #define __get_MSP() (__arm_rsr("MSP")) + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + #define __get_MSPLIM() (0U) + #else + #define __get_MSPLIM() (__arm_rsr("MSPLIM")) + #endif + #define __get_PRIMASK() (__arm_rsr("PRIMASK")) + #define __get_PSP() (__arm_rsr("PSP")) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __get_PSPLIM() (0U) + #else + #define __get_PSPLIM() (__arm_rsr("PSPLIM")) + #endif + + #define __get_xPSR() (__arm_rsr("xPSR")) + + #define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE))) + #define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE))) + +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __arm_wsr("CONTROL", control); + __iar_builtin_ISB(); +} + + #define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE))) + #define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE))) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + #define __set_MSPLIM(VALUE) ((void)(VALUE)) + #else + #define __set_MSPLIM(VALUE) (__arm_wsr("MSPLIM", (VALUE))) + #endif + #define __set_PRIMASK(VALUE) (__arm_wsr("PRIMASK", (VALUE))) + #define __set_PSP(VALUE) (__arm_wsr("PSP", (VALUE))) + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __set_PSPLIM(VALUE) ((void)(VALUE)) + #else + #define __set_PSPLIM(VALUE) (__arm_wsr("PSPLIM", (VALUE))) + #endif + + #define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS")) + +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __arm_wsr("CONTROL_NS", control); + __iar_builtin_ISB(); +} + + #define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS")) + #define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE))) + #define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS")) + #define __TZ_set_MSP_NS(VALUE) (__arm_wsr("MSP_NS", (VALUE))) + #define __TZ_get_SP_NS() (__arm_rsr("SP_NS")) + #define __TZ_set_SP_NS(VALUE) (__arm_wsr("SP_NS", (VALUE))) + #define __TZ_get_PRIMASK_NS() (__arm_rsr("PRIMASK_NS")) + #define __TZ_set_PRIMASK_NS(VALUE) (__arm_wsr("PRIMASK_NS", (VALUE))) + #define __TZ_get_BASEPRI_NS() (__arm_rsr("BASEPRI_NS")) + #define __TZ_set_BASEPRI_NS(VALUE) (__arm_wsr("BASEPRI_NS", (VALUE))) + #define __TZ_get_FAULTMASK_NS() (__arm_rsr("FAULTMASK_NS")) + #define __TZ_set_FAULTMASK_NS(VALUE)(__arm_wsr("FAULTMASK_NS", (VALUE))) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __TZ_get_PSPLIM_NS() (0U) + #define __TZ_set_PSPLIM_NS(VALUE) ((void)(VALUE)) + #else + #define __TZ_get_PSPLIM_NS() (__arm_rsr("PSPLIM_NS")) + #define __TZ_set_PSPLIM_NS(VALUE) (__arm_wsr("PSPLIM_NS", (VALUE))) + #endif + + #define __TZ_get_MSPLIM_NS() (__arm_rsr("MSPLIM_NS")) + #define __TZ_set_MSPLIM_NS(VALUE) (__arm_wsr("MSPLIM_NS", (VALUE))) + + #define __NOP __iar_builtin_no_operation + + #define __CLZ __iar_builtin_CLZ + #define __CLREX __iar_builtin_CLREX + + #define __DMB __iar_builtin_DMB + #define __DSB __iar_builtin_DSB + #define __ISB __iar_builtin_ISB + + #define __LDREXB __iar_builtin_LDREXB + #define __LDREXH __iar_builtin_LDREXH + #define __LDREXW __iar_builtin_LDREX + + #define __RBIT __iar_builtin_RBIT + #define __REV __iar_builtin_REV + #define __REV16 __iar_builtin_REV16 + + __IAR_FT int16_t __REVSH(int16_t val) + { + return (int16_t) __iar_builtin_REVSH(val); + } + + #define __ROR __iar_builtin_ROR + #define __RRX __iar_builtin_RRX + + #define __SEV __iar_builtin_SEV + + #if !__IAR_M0_FAMILY + #define __SSAT __iar_builtin_SSAT + #endif + + #define __STREXB __iar_builtin_STREXB + #define __STREXH __iar_builtin_STREXH + #define __STREXW __iar_builtin_STREX + + #if !__IAR_M0_FAMILY + #define __USAT __iar_builtin_USAT + #endif + + #define __WFE __iar_builtin_WFE + #define __WFI __iar_builtin_WFI + + #if __ARM_MEDIA__ + #define __SADD8 __iar_builtin_SADD8 + #define __QADD8 __iar_builtin_QADD8 + #define __SHADD8 __iar_builtin_SHADD8 + #define __UADD8 __iar_builtin_UADD8 + #define __UQADD8 __iar_builtin_UQADD8 + #define __UHADD8 __iar_builtin_UHADD8 + #define __SSUB8 __iar_builtin_SSUB8 + #define __QSUB8 __iar_builtin_QSUB8 + #define __SHSUB8 __iar_builtin_SHSUB8 + #define __USUB8 __iar_builtin_USUB8 + #define __UQSUB8 __iar_builtin_UQSUB8 + #define __UHSUB8 __iar_builtin_UHSUB8 + #define __SADD16 __iar_builtin_SADD16 + #define __QADD16 __iar_builtin_QADD16 + #define __SHADD16 __iar_builtin_SHADD16 + #define __UADD16 __iar_builtin_UADD16 + #define __UQADD16 __iar_builtin_UQADD16 + #define __UHADD16 __iar_builtin_UHADD16 + #define __SSUB16 __iar_builtin_SSUB16 + #define __QSUB16 __iar_builtin_QSUB16 + #define __SHSUB16 __iar_builtin_SHSUB16 + #define __USUB16 __iar_builtin_USUB16 + #define __UQSUB16 __iar_builtin_UQSUB16 + #define __UHSUB16 __iar_builtin_UHSUB16 + #define __SASX __iar_builtin_SASX + #define __QASX __iar_builtin_QASX + #define __SHASX __iar_builtin_SHASX + #define __UASX __iar_builtin_UASX + #define __UQASX __iar_builtin_UQASX + #define __UHASX __iar_builtin_UHASX + #define __SSAX __iar_builtin_SSAX + #define __QSAX __iar_builtin_QSAX + #define __SHSAX __iar_builtin_SHSAX + #define __USAX __iar_builtin_USAX + #define __UQSAX __iar_builtin_UQSAX + #define __UHSAX __iar_builtin_UHSAX + #define __USAD8 __iar_builtin_USAD8 + #define __USADA8 __iar_builtin_USADA8 + #define __SSAT16 __iar_builtin_SSAT16 + #define __USAT16 __iar_builtin_USAT16 + #define __UXTB16 __iar_builtin_UXTB16 + #define __UXTAB16 __iar_builtin_UXTAB16 + #define __SXTB16 __iar_builtin_SXTB16 + #define __SXTAB16 __iar_builtin_SXTAB16 + #define __SMUAD __iar_builtin_SMUAD + #define __SMUADX __iar_builtin_SMUADX + #define __SMMLA __iar_builtin_SMMLA + #define __SMLAD __iar_builtin_SMLAD + #define __SMLADX __iar_builtin_SMLADX + #define __SMLALD __iar_builtin_SMLALD + #define __SMLALDX __iar_builtin_SMLALDX + #define __SMUSD __iar_builtin_SMUSD + #define __SMUSDX __iar_builtin_SMUSDX + #define __SMLSD __iar_builtin_SMLSD + #define __SMLSDX __iar_builtin_SMLSDX + #define __SMLSLD __iar_builtin_SMLSLD + #define __SMLSLDX __iar_builtin_SMLSLDX + #define __SEL __iar_builtin_SEL + #define __QADD __iar_builtin_QADD + #define __QSUB __iar_builtin_QSUB + #define __PKHBT __iar_builtin_PKHBT + #define __PKHTB __iar_builtin_PKHTB + #endif + +#else /* __ICCARM_INTRINSICS_VERSION__ == 2 */ + + #if __IAR_M0_FAMILY + /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ + #define __CLZ __cmsis_iar_clz_not_active + #define __SSAT __cmsis_iar_ssat_not_active + #define __USAT __cmsis_iar_usat_not_active + #define __RBIT __cmsis_iar_rbit_not_active + #define __get_APSR __cmsis_iar_get_APSR_not_active + #endif + + + #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) + #define __get_FPSCR __cmsis_iar_get_FPSR_not_active + #define __set_FPSCR __cmsis_iar_set_FPSR_not_active + #endif + + #ifdef __INTRINSICS_INCLUDED + #error intrinsics.h is already included previously! + #endif + + #include + + #if __IAR_M0_FAMILY + /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ + #undef __CLZ + #undef __SSAT + #undef __USAT + #undef __RBIT + #undef __get_APSR + + __STATIC_INLINE uint8_t __CLZ(uint32_t data) + { + if (data == 0U) { return 32U; } + + uint32_t count = 0U; + uint32_t mask = 0x80000000U; + + while ((data & mask) == 0U) + { + count += 1U; + mask = mask >> 1U; + } + return count; + } + + __STATIC_INLINE uint32_t __RBIT(uint32_t v) + { + uint8_t sc = 31U; + uint32_t r = v; + for (v >>= 1U; v; v >>= 1U) + { + r <<= 1U; + r |= v & 1U; + sc--; + } + return (r << sc); + } + + __STATIC_INLINE uint32_t __get_APSR(void) + { + uint32_t res; + __asm("MRS %0,APSR" : "=r" (res)); + return res; + } + + #endif + + #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) + #undef __get_FPSCR + #undef __set_FPSCR + #define __get_FPSCR() (0) + #define __set_FPSCR(VALUE) ((void)VALUE) + #endif + + #pragma diag_suppress=Pe940 + #pragma diag_suppress=Pe177 + + #define __enable_irq __enable_interrupt + #define __disable_irq __disable_interrupt + #define __NOP __no_operation + + #define __get_xPSR __get_PSR + + #if (!defined(__ARM_ARCH_6M__) || __ARM_ARCH_6M__==0) + + __IAR_FT uint32_t __LDREXW(uint32_t volatile *ptr) + { + return __LDREX((unsigned long *)ptr); + } + + __IAR_FT uint32_t __STREXW(uint32_t value, uint32_t volatile *ptr) + { + return __STREX(value, (unsigned long *)ptr); + } + #endif + + + /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ + #if (__CORTEX_M >= 0x03) + + __IAR_FT uint32_t __RRX(uint32_t value) + { + uint32_t result; + __ASM volatile("RRX %0, %1" : "=r"(result) : "r" (value)); + return(result); + } + + __IAR_FT void __set_BASEPRI_MAX(uint32_t value) + { + __asm volatile("MSR BASEPRI_MAX,%0"::"r" (value)); + } + + + #define __enable_fault_irq __enable_fiq + #define __disable_fault_irq __disable_fiq + + + #endif /* (__CORTEX_M >= 0x03) */ + + __IAR_FT uint32_t __ROR(uint32_t op1, uint32_t op2) + { + return (op1 >> op2) | (op1 << ((sizeof(op1)*8)-op2)); + } + + #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + + __IAR_FT uint32_t __get_MSPLIM(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,MSPLIM" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __set_MSPLIM(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR MSPLIM,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __get_PSPLIM(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,PSPLIM" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __set_PSPLIM(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR PSPLIM,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __TZ_get_CONTROL_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,CONTROL_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_CONTROL_NS(uint32_t value) + { + __asm volatile("MSR CONTROL_NS,%0" :: "r" (value)); + __iar_builtin_ISB(); + } + + __IAR_FT uint32_t __TZ_get_PSP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,PSP_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_PSP_NS(uint32_t value) + { + __asm volatile("MSR PSP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_MSP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,MSP_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_MSP_NS(uint32_t value) + { + __asm volatile("MSR MSP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_SP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,SP_NS" : "=r" (res)); + return res; + } + __IAR_FT void __TZ_set_SP_NS(uint32_t value) + { + __asm volatile("MSR SP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PRIMASK_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,PRIMASK_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_PRIMASK_NS(uint32_t value) + { + __asm volatile("MSR PRIMASK_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_BASEPRI_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,BASEPRI_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_BASEPRI_NS(uint32_t value) + { + __asm volatile("MSR BASEPRI_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_FAULTMASK_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,FAULTMASK_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_FAULTMASK_NS(uint32_t value) + { + __asm volatile("MSR FAULTMASK_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PSPLIM_NS(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,PSPLIM_NS" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __TZ_set_PSPLIM_NS(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR PSPLIM_NS,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __TZ_get_MSPLIM_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,MSPLIM_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_MSPLIM_NS(uint32_t value) + { + __asm volatile("MSR MSPLIM_NS,%0" :: "r" (value)); + } + + #endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ + +#endif /* __ICCARM_INTRINSICS_VERSION__ == 2 */ + +#define __BKPT(value) __asm volatile ("BKPT %0" : : "i"(value)) + +#if __IAR_M0_FAMILY + __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) + { + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; + } + + __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) + { + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; + } +#endif + +#if (__CORTEX_M >= 0x03) /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ + + __IAR_FT uint8_t __LDRBT(volatile uint8_t *addr) + { + uint32_t res; + __ASM volatile ("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDRHT(volatile uint16_t *addr) + { + uint32_t res; + __ASM volatile ("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDRT(volatile uint32_t *addr) + { + uint32_t res; + __ASM volatile ("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return res; + } + + __IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr) + { + __ASM volatile ("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); + } + + __IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr) + { + __ASM volatile ("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); + } + + __IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr) + { + __ASM volatile ("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory"); + } + +#endif /* (__CORTEX_M >= 0x03) */ + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + + + __IAR_FT uint8_t __LDAB(volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDAH(volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDA(volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("LDA %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return res; + } + + __IAR_FT void __STLB(uint8_t value, volatile uint8_t *ptr) + { + __ASM volatile ("STLB %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT void __STLH(uint16_t value, volatile uint16_t *ptr) + { + __ASM volatile ("STLH %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT void __STL(uint32_t value, volatile uint32_t *ptr) + { + __ASM volatile ("STL %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT uint8_t __LDAEXB(volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEXB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDAEXH(volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEXH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDAEX(volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEX %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEXB %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEXH %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEX %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + +#endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ + +#undef __IAR_FT +#undef __IAR_M0_FAMILY +#undef __ICCARM_V8 + +#pragma diag_default=Pe940 +#pragma diag_default=Pe177 + +#define __SXTB16_RORn(ARG1, ARG2) __SXTB16(__ROR(ARG1, ARG2)) + +#define __SXTAB16_RORn(ARG1, ARG2, ARG3) __SXTAB16(ARG1, __ROR(ARG2, ARG3)) + +#endif /* __CMSIS_ICCARM_H__ */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h new file mode 100644 index 00000000..8b4765f1 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/cmsis_version.h @@ -0,0 +1,39 @@ +/**************************************************************************//** + * @file cmsis_version.h + * @brief CMSIS Core(M) Version definitions + * @version V5.0.5 + * @date 02. February 2022 + ******************************************************************************/ +/* + * Copyright (c) 2009-2022 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CMSIS_VERSION_H +#define __CMSIS_VERSION_H + +/* CMSIS Version definitions */ +#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ +#define __CM_CMSIS_VERSION_SUB ( 6U) /*!< [15:0] CMSIS Core(M) sub version */ +#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ + __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ +#endif diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h new file mode 100644 index 00000000..4e7179a6 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/core_cm0plus.h @@ -0,0 +1,1087 @@ +/**************************************************************************//** + * @file core_cm0plus.h + * @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File + * @version V5.0.9 + * @date 21. August 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM0PLUS_H_GENERIC +#define __CORE_CM0PLUS_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex-M0+ + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM0+ definitions */ +#define __CM0PLUS_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM0PLUS_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM0PLUS_CMSIS_VERSION ((__CM0PLUS_CMSIS_VERSION_MAIN << 16U) | \ + __CM0PLUS_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (0U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0PLUS_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM0PLUS_H_DEPENDANT +#define __CORE_CM0PLUS_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM0PLUS_REV + #define __CM0PLUS_REV 0x0000U + #warning "__CM0PLUS_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex-M0+ */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Interrupt Control State Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 8U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0xFFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M0+ Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M0+ header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0+ */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +#else + uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */ + *(vectors + (int32_t)IRQn) = vector; /* use pointer arithmetic to access vector */ +#endif + /* ARM Application Note 321 states that the M0+ does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +#else + uint32_t *vectors = (uint32_t *)(NVIC_USER_IRQ_OFFSET << 2); /* point to 1st user interrupt */ + return *(vectors + (int32_t)IRQn); /* use pointer arithmetic to access vector */ +#endif +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0PLUS_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/mpu_armv7.h b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/mpu_armv7.h new file mode 100644 index 00000000..d9eedf81 --- /dev/null +++ b/Telemetry/src/packs/CMSIS/CMSIS/Core/Include/mpu_armv7.h @@ -0,0 +1,275 @@ +/****************************************************************************** + * @file mpu_armv7.h + * @brief CMSIS MPU API for Armv7-M MPU + * @version V5.1.2 + * @date 25. May 2020 + ******************************************************************************/ +/* + * Copyright (c) 2017-2020 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef ARM_MPU_ARMV7_H +#define ARM_MPU_ARMV7_H + +#define ARM_MPU_REGION_SIZE_32B ((uint8_t)0x04U) ///!< MPU Region Size 32 Bytes +#define ARM_MPU_REGION_SIZE_64B ((uint8_t)0x05U) ///!< MPU Region Size 64 Bytes +#define ARM_MPU_REGION_SIZE_128B ((uint8_t)0x06U) ///!< MPU Region Size 128 Bytes +#define ARM_MPU_REGION_SIZE_256B ((uint8_t)0x07U) ///!< MPU Region Size 256 Bytes +#define ARM_MPU_REGION_SIZE_512B ((uint8_t)0x08U) ///!< MPU Region Size 512 Bytes +#define ARM_MPU_REGION_SIZE_1KB ((uint8_t)0x09U) ///!< MPU Region Size 1 KByte +#define ARM_MPU_REGION_SIZE_2KB ((uint8_t)0x0AU) ///!< MPU Region Size 2 KBytes +#define ARM_MPU_REGION_SIZE_4KB ((uint8_t)0x0BU) ///!< MPU Region Size 4 KBytes +#define ARM_MPU_REGION_SIZE_8KB ((uint8_t)0x0CU) ///!< MPU Region Size 8 KBytes +#define ARM_MPU_REGION_SIZE_16KB ((uint8_t)0x0DU) ///!< MPU Region Size 16 KBytes +#define ARM_MPU_REGION_SIZE_32KB ((uint8_t)0x0EU) ///!< MPU Region Size 32 KBytes +#define ARM_MPU_REGION_SIZE_64KB ((uint8_t)0x0FU) ///!< MPU Region Size 64 KBytes +#define ARM_MPU_REGION_SIZE_128KB ((uint8_t)0x10U) ///!< MPU Region Size 128 KBytes +#define ARM_MPU_REGION_SIZE_256KB ((uint8_t)0x11U) ///!< MPU Region Size 256 KBytes +#define ARM_MPU_REGION_SIZE_512KB ((uint8_t)0x12U) ///!< MPU Region Size 512 KBytes +#define ARM_MPU_REGION_SIZE_1MB ((uint8_t)0x13U) ///!< MPU Region Size 1 MByte +#define ARM_MPU_REGION_SIZE_2MB ((uint8_t)0x14U) ///!< MPU Region Size 2 MBytes +#define ARM_MPU_REGION_SIZE_4MB ((uint8_t)0x15U) ///!< MPU Region Size 4 MBytes +#define ARM_MPU_REGION_SIZE_8MB ((uint8_t)0x16U) ///!< MPU Region Size 8 MBytes +#define ARM_MPU_REGION_SIZE_16MB ((uint8_t)0x17U) ///!< MPU Region Size 16 MBytes +#define ARM_MPU_REGION_SIZE_32MB ((uint8_t)0x18U) ///!< MPU Region Size 32 MBytes +#define ARM_MPU_REGION_SIZE_64MB ((uint8_t)0x19U) ///!< MPU Region Size 64 MBytes +#define ARM_MPU_REGION_SIZE_128MB ((uint8_t)0x1AU) ///!< MPU Region Size 128 MBytes +#define ARM_MPU_REGION_SIZE_256MB ((uint8_t)0x1BU) ///!< MPU Region Size 256 MBytes +#define ARM_MPU_REGION_SIZE_512MB ((uint8_t)0x1CU) ///!< MPU Region Size 512 MBytes +#define ARM_MPU_REGION_SIZE_1GB ((uint8_t)0x1DU) ///!< MPU Region Size 1 GByte +#define ARM_MPU_REGION_SIZE_2GB ((uint8_t)0x1EU) ///!< MPU Region Size 2 GBytes +#define ARM_MPU_REGION_SIZE_4GB ((uint8_t)0x1FU) ///!< MPU Region Size 4 GBytes + +#define ARM_MPU_AP_NONE 0U ///!< MPU Access Permission no access +#define ARM_MPU_AP_PRIV 1U ///!< MPU Access Permission privileged access only +#define ARM_MPU_AP_URO 2U ///!< MPU Access Permission unprivileged access read-only +#define ARM_MPU_AP_FULL 3U ///!< MPU Access Permission full access +#define ARM_MPU_AP_PRO 5U ///!< MPU Access Permission privileged access read-only +#define ARM_MPU_AP_RO 6U ///!< MPU Access Permission read-only access + +/** MPU Region Base Address Register Value +* +* \param Region The region to be configured, number 0 to 15. +* \param BaseAddress The base address for the region. +*/ +#define ARM_MPU_RBAR(Region, BaseAddress) \ + (((BaseAddress) & MPU_RBAR_ADDR_Msk) | \ + ((Region) & MPU_RBAR_REGION_Msk) | \ + (MPU_RBAR_VALID_Msk)) + +/** +* MPU Memory Access Attributes +* +* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. +* \param IsShareable Region is shareable between multiple bus masters. +* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. +* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. +*/ +#define ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable) \ + ((((TypeExtField) << MPU_RASR_TEX_Pos) & MPU_RASR_TEX_Msk) | \ + (((IsShareable) << MPU_RASR_S_Pos) & MPU_RASR_S_Msk) | \ + (((IsCacheable) << MPU_RASR_C_Pos) & MPU_RASR_C_Msk) | \ + (((IsBufferable) << MPU_RASR_B_Pos) & MPU_RASR_B_Msk)) + +/** +* MPU Region Attribute and Size Register Value +* +* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. +* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. +* \param AccessAttributes Memory access attribution, see \ref ARM_MPU_ACCESS_. +* \param SubRegionDisable Sub-region disable field. +* \param Size Region size of the region to be configured, for example 4K, 8K. +*/ +#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size) \ + ((((DisableExec) << MPU_RASR_XN_Pos) & MPU_RASR_XN_Msk) | \ + (((AccessPermission) << MPU_RASR_AP_Pos) & MPU_RASR_AP_Msk) | \ + (((AccessAttributes) & (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk))) | \ + (((SubRegionDisable) << MPU_RASR_SRD_Pos) & MPU_RASR_SRD_Msk) | \ + (((Size) << MPU_RASR_SIZE_Pos) & MPU_RASR_SIZE_Msk) | \ + (((MPU_RASR_ENABLE_Msk)))) + +/** +* MPU Region Attribute and Size Register Value +* +* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. +* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. +* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. +* \param IsShareable Region is shareable between multiple bus masters. +* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. +* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. +* \param SubRegionDisable Sub-region disable field. +* \param Size Region size of the region to be configured, for example 4K, 8K. +*/ +#define ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, SubRegionDisable, Size) \ + ARM_MPU_RASR_EX(DisableExec, AccessPermission, ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable), SubRegionDisable, Size) + +/** +* MPU Memory Access Attribute for strongly ordered memory. +* - TEX: 000b +* - Shareable +* - Non-cacheable +* - Non-bufferable +*/ +#define ARM_MPU_ACCESS_ORDERED ARM_MPU_ACCESS_(0U, 1U, 0U, 0U) + +/** +* MPU Memory Access Attribute for device memory. +* - TEX: 000b (if shareable) or 010b (if non-shareable) +* - Shareable or non-shareable +* - Non-cacheable +* - Bufferable (if shareable) or non-bufferable (if non-shareable) +* +* \param IsShareable Configures the device memory as shareable or non-shareable. +*/ +#define ARM_MPU_ACCESS_DEVICE(IsShareable) ((IsShareable) ? ARM_MPU_ACCESS_(0U, 1U, 0U, 1U) : ARM_MPU_ACCESS_(2U, 0U, 0U, 0U)) + +/** +* MPU Memory Access Attribute for normal memory. +* - TEX: 1BBb (reflecting outer cacheability rules) +* - Shareable or non-shareable +* - Cacheable or non-cacheable (reflecting inner cacheability rules) +* - Bufferable or non-bufferable (reflecting inner cacheability rules) +* +* \param OuterCp Configures the outer cache policy. +* \param InnerCp Configures the inner cache policy. +* \param IsShareable Configures the memory as shareable or non-shareable. +*/ +#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) >> 1U), ((InnerCp) & 1U)) + +/** +* MPU Memory Access Attribute non-cacheable policy. +*/ +#define ARM_MPU_CACHEP_NOCACHE 0U + +/** +* MPU Memory Access Attribute write-back, write and read allocate policy. +*/ +#define ARM_MPU_CACHEP_WB_WRA 1U + +/** +* MPU Memory Access Attribute write-through, no write allocate policy. +*/ +#define ARM_MPU_CACHEP_WT_NWA 2U + +/** +* MPU Memory Access Attribute write-back, no write allocate policy. +*/ +#define ARM_MPU_CACHEP_WB_NWA 3U + + +/** +* Struct for a single MPU Region +*/ +typedef struct { + uint32_t RBAR; //!< The region base address register value (RBAR) + uint32_t RASR; //!< The region attribute and size register value (RASR) \ref MPU_RASR +} ARM_MPU_Region_t; + +/** Enable the MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) +{ + __DMB(); + MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif + __DSB(); + __ISB(); +} + +/** Disable the MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable(void) +{ + __DMB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; + __DSB(); + __ISB(); +} + +/** Clear and disable the given MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) +{ + MPU->RNR = rnr; + MPU->RASR = 0U; +} + +/** Configure an MPU region. +* \param rbar Value for RBAR register. +* \param rasr Value for RASR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr) +{ + MPU->RBAR = rbar; + MPU->RASR = rasr; +} + +/** Configure the given MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rasr Value for RASR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr) +{ + MPU->RNR = rnr; + MPU->RBAR = rbar; + MPU->RASR = rasr; +} + +/** Memcpy with strictly ordered memory access, e.g. used by code in ARM_MPU_Load(). +* \param dst Destination data is copied to. +* \param src Source data is copied from. +* \param len Amount of data words to be copied. +*/ +__STATIC_INLINE void ARM_MPU_OrderedMemcpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) +{ + uint32_t i; + for (i = 0U; i < len; ++i) + { + dst[i] = src[i]; + } +} + +/** Load the given number of MPU regions from a table. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load(ARM_MPU_Region_t const* table, uint32_t cnt) +{ + const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; + while (cnt > MPU_TYPE_RALIASES) { + ARM_MPU_OrderedMemcpy(&(MPU->RBAR), &(table->RBAR), MPU_TYPE_RALIASES*rowWordSize); + table += MPU_TYPE_RALIASES; + cnt -= MPU_TYPE_RALIASES; + } + ARM_MPU_OrderedMemcpy(&(MPU->RBAR), &(table->RBAR), cnt*rowWordSize); +} + +#endif diff --git a/Telemetry/utils/include/util_test.h b/Telemetry/utils/include/util_test.h new file mode 100644 index 00000000..e69de29b diff --git a/Telemetry/utils/src/util_test.c b/Telemetry/utils/src/util_test.c new file mode 100644 index 00000000..e69de29b