From 6d36d384c243012918e97eb7e9529b2de4b50357 Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Thu, 28 Jan 2021 19:59:31 +0800 Subject: [PATCH] add raspberry-pico bsp --- bsp/raspberry-pico/.config | 534 + bsp/raspberry-pico/Kconfig | 26 + bsp/raspberry-pico/README.md | 31 + bsp/raspberry-pico/SConscript | 12 + bsp/raspberry-pico/SConstruct | 37 + bsp/raspberry-pico/applications/SConscript | 11 + bsp/raspberry-pico/applications/main.c | 25 + bsp/raspberry-pico/drivers/SConscript | 9 + bsp/raspberry-pico/drivers/board.c | 59 + bsp/raspberry-pico/drivers/board.h | 30 + bsp/raspberry-pico/drivers/drv_uart.c | 150 + bsp/raspberry-pico/drivers/drv_uart.h | 19 + bsp/raspberry-pico/libraries/SConscript | 139 + .../bs2_default_padded_checksummed.S | 20 + .../libraries/generated/elf2uf2 | Bin 0 -> 94040 bytes .../generated/pico_base/pico/config_autogen.h | 9 + .../generated/pico_base/pico/version.h | 19 + .../libraries/pico-sdk/.gitignore | 5 + .../libraries/pico-sdk/.gitmodules | 4 + .../libraries/pico-sdk/CMakeLists.txt | 47 + .../libraries/pico-sdk/LICENSE.TXT | 21 + .../libraries/pico-sdk/README.md | 160 + .../pico-sdk/cmake/Platform/PICO.cmake | 4 + .../cmake/pico_pre_load_platform.cmake | 29 + .../cmake/pico_pre_load_toolchain.cmake | 44 + .../libraries/pico-sdk/cmake/pico_utils.cmake | 28 + .../cmake/preload/platforms/host.cmake | 0 .../cmake/preload/platforms/pico/pico.cmake | 7 + .../cmake/preload/platforms/rp2040.cmake | 1 + .../preload/toolchains/find_compiler.cmake | 31 + .../preload/toolchains/pico_arm_clang.cmake | 53 + .../toolchains/pico_arm_clang_arm.cmake | 52 + .../preload/toolchains/pico_arm_gcc.cmake | 66 + .../libraries/pico-sdk/docs/CMakeLists.txt | 59 + .../libraries/pico-sdk/docs/Doxyfile.in | 64 + .../libraries/pico-sdk/docs/DoxygenLayout.xml | 246 + .../libraries/pico-sdk/docs/examples.md | 21 + .../libraries/pico-sdk/docs/footer.html | 5 + .../libraries/pico-sdk/docs/header.html | 61 + .../libraries/pico-sdk/docs/index.h | 86 + .../libraries/pico-sdk/docs/logo-mobile.svg | 17 + .../libraries/pico-sdk/docs/logo.svg | 213 + .../libraries/pico-sdk/docs/main.css | 101 + .../libraries/pico-sdk/docs/main.js | 17 + .../libraries/pico-sdk/docs/mainpage.md | 31 + .../libraries/pico-sdk/docs/normalise.css | 447 + .../libraries/pico-sdk/docs/pico.jpg | Bin 0 -> 26372 bytes .../libraries/pico-sdk/docs/rp2040.png | Bin 0 -> 81684 bytes .../libraries/pico-sdk/docs/search.svg | 1 + .../libraries/pico-sdk/docs/styles.css | 703 + .../libraries/pico-sdk/docs/weblinks_page.md | 30 + .../pico-sdk/external/pico_sdk_import.cmake | 62 + .../libraries/pico-sdk/pico_sdk_init.cmake | 54 + .../libraries/pico-sdk/pico_sdk_version.cmake | 12 + .../libraries/pico-sdk/src/CMakeLists.txt | 89 + .../libraries/pico-sdk/src/board_setup.cmake | 31 + .../pico-sdk/src/boards/generic_board.cmake | 23 + .../pico-sdk/src/boards/include/boards/none.h | 15 + .../pico-sdk/src/boards/include/boards/pico.h | 52 + .../src/boards/include/boards/vgaboard.h | 104 + .../pico-sdk/src/common/CMakeLists.txt | 16 + .../libraries/pico-sdk/src/common/README.md | 3 + .../src/common/boot_picoboot/CMakeLists.txt | 2 + .../boot_picoboot/include/boot/picoboot.h | 124 + .../src/common/boot_uf2/CMakeLists.txt | 2 + .../src/common/boot_uf2/include/boot/uf2.h | 46 + .../src/common/pico_base/CMakeLists.txt | 40 + .../src/common/pico_base/include/pico.h | 23 + .../common/pico_base/include/pico/assert.h | 51 + .../common/pico_base/include/pico/config.h | 21 + .../src/common/pico_base/include/pico/error.h | 21 + .../src/common/pico_base/include/pico/types.h | 79 + .../pico_base/include/pico/version.h.in | 19 + .../common/pico_binary_info/CMakeLists.txt | 30 + .../include/pico/binary_info.h | 28 + .../include/pico/binary_info/code.h | 139 + .../include/pico/binary_info/defs.h | 43 + .../include/pico/binary_info/structure.h | 150 + .../src/common/pico_bit_ops/CMakeLists.txt | 5 + .../pico_bit_ops/include/pico/bit_ops.h | 44 + .../src/common/pico_divider/CMakeLists.txt | 5 + .../pico_divider/include/pico/divider.h | 322 + .../src/common/pico_stdlib/CMakeLists.txt | 11 + .../common/pico_stdlib/include/pico/stdlib.h | 130 + .../src/common/pico_sync/CMakeLists.txt | 44 + .../src/common/pico_sync/critical_section.c | 24 + .../pico_sync/include/pico/critical_section.h | 75 + .../common/pico_sync/include/pico/lock_core.h | 28 + .../src/common/pico_sync/include/pico/mutex.h | 136 + .../src/common/pico_sync/include/pico/sem.h | 101 + .../src/common/pico_sync/include/pico/sync.h | 19 + .../pico-sdk/src/common/pico_sync/lock_core.c | 13 + .../pico-sdk/src/common/pico_sync/mutex.c | 84 + .../pico-sdk/src/common/pico_sync/sem.c | 82 + .../src/common/pico_time/CMakeLists.txt | 16 + .../src/common/pico_time/include/pico/time.h | 692 + .../pico_time/include/pico/timeout_helper.h | 30 + .../pico-sdk/src/common/pico_time/time.c | 361 + .../src/common/pico_time/timeout_helper.c | 30 + .../src/common/pico_util/CMakeLists.txt | 15 + .../pico-sdk/src/common/pico_util/datetime.c | 41 + .../pico-sdk/src/common/pico_util/doc.h | 4 + .../pico_util/include/pico/util/datetime.h | 27 + .../pico_util/include/pico/util/pheap.h | 155 + .../pico_util/include/pico/util/queue.h | 184 + .../pico-sdk/src/common/pico_util/pheap.c | 130 + .../pico-sdk/src/common/pico_util/queue.c | 98 + .../libraries/pico-sdk/src/host.cmake | 10 + .../pico-sdk/src/host/CMakeLists.txt | 28 + .../libraries/pico-sdk/src/host/README.md | 14 + .../libraries/pico-sdk/src/host/boot_stage2.c | 1 + .../src/host/hardware_divider/CMakeLists.txt | 1 + .../src/host/hardware_divider/divider.c | 9 + .../include/hardware/divider.h | 122 + .../src/host/hardware_gpio/CMakeLists.txt | 1 + .../pico-sdk/src/host/hardware_gpio/gpio.c | 118 + .../hardware_gpio/include/hardware/gpio.h | 147 + .../src/host/hardware_sync/CMakeLists.txt | 12 + .../hardware_sync/include/hardware/sync.h | 106 + .../src/host/hardware_sync/sync_core0_only.c | 140 + .../src/host/hardware_timer/CMakeLists.txt | 16 + .../hardware_timer/include/hardware/timer.h | 42 + .../pico-sdk/src/host/hardware_timer/timer.c | 104 + .../src/host/hardware_uart/CMakeLists.txt | 1 + .../hardware_uart/include/hardware/uart.h | 91 + .../pico-sdk/src/host/hardware_uart/uart.c | 118 + .../src/host/pico_bit_ops/CMakeLists.txt | 9 + .../pico-sdk/src/host/pico_bit_ops/bit_ops.c | 22 + .../src/host/pico_divider/CMakeLists.txt | 9 + .../pico-sdk/src/host/pico_divider/divider.c | 114 + .../src/host/pico_multicore/CMakeLists.txt | 8 + .../pico_multicore/include/pico/multicore.h | 44 + .../src/host/pico_platform/CMakeLists.txt | 25 + .../include/hardware/platform_defs.h | 24 + .../pico_platform/include/pico/platform.h | 137 + .../src/host/pico_platform/platform_base.c | 46 + .../src/host/pico_printf/CMakeLists.txt | 6 + .../src/host/pico_stdio/CMakeLists.txt | 20 + .../src/host/pico_stdio/include/pico/stdio.h | 21 + .../pico-sdk/src/host/pico_stdio/stdio.c | 23 + .../src/host/pico_stdlib/CMakeLists.txt | 19 + .../pico-sdk/src/host/pico_stdlib/stdlib.c | 27 + .../libraries/pico-sdk/src/rp2040.cmake | 6 + .../pico-sdk/src/rp2040/CMakeLists.txt | 6 + .../libraries/pico-sdk/src/rp2040/README.md | 7 + .../src/rp2040/hardware_regs/CMakeLists.txt | 3 + .../include/hardware/platform_defs.h | 48 + .../hardware_regs/include/hardware/regs/adc.h | 314 + .../include/hardware/regs/addressmap.h | 72 + .../include/hardware/regs/busctrl.h | 160 + .../include/hardware/regs/clocks.h | 2359 + .../hardware_regs/include/hardware/regs/dma.h | 5257 ++ .../include/hardware/regs/dreq.h | 50 + .../hardware_regs/include/hardware/regs/i2c.h | 2685 + .../include/hardware/regs/intctrl.h | 63 + .../include/hardware/regs/io_bank0.h | 14937 ++++++ .../include/hardware/regs/io_qspi.h | 2931 ++ .../include/hardware/regs/m0plus.h | 1149 + .../include/hardware/regs/pads_bank0.h | 2300 + .../include/hardware/regs/pads_qspi.h | 454 + .../hardware_regs/include/hardware/regs/pio.h | 2591 + .../hardware_regs/include/hardware/regs/pll.h | 135 + .../hardware_regs/include/hardware/regs/psm.h | 584 + .../hardware_regs/include/hardware/regs/pwm.h | 1505 + .../include/hardware/regs/resets.h | 637 + .../include/hardware/regs/rosc.h | 312 + .../hardware_regs/include/hardware/regs/rtc.h | 398 + .../hardware_regs/include/hardware/regs/sio.h | 1656 + .../hardware_regs/include/hardware/regs/spi.h | 521 + .../hardware_regs/include/hardware/regs/ssi.h | 809 + .../include/hardware/regs/syscfg.h | 257 + .../include/hardware/regs/sysinfo.h | 77 + .../include/hardware/regs/tbman.h | 38 + .../include/hardware/regs/timer.h | 332 + .../include/hardware/regs/uart.h | 1148 + .../hardware_regs/include/hardware/regs/usb.h | 3603 ++ .../hardware/regs/vreg_and_chip_reset.h | 151 + .../include/hardware/regs/watchdog.h | 226 + .../hardware_regs/include/hardware/regs/xip.h | 187 + .../include/hardware/regs/xosc.h | 159 + .../src/rp2040/hardware_regs/rp2040.svd | 40366 ++++++++++++++++ .../rp2040/hardware_structs/CMakeLists.txt | 3 + .../include/hardware/structs/adc.h | 28 + .../include/hardware/structs/bus_ctrl.h | 48 + .../include/hardware/structs/clocks.h | 72 + .../include/hardware/structs/dma.h | 85 + .../include/hardware/structs/i2c.h | 141 + .../include/hardware/structs/interp.h | 28 + .../include/hardware/structs/iobank0.h | 35 + .../include/hardware/structs/ioqspi.h | 23 + .../include/hardware/structs/mpu.h | 23 + .../include/hardware/structs/pads_qspi.h | 21 + .../include/hardware/structs/padsbank0.h | 21 + .../include/hardware/structs/pio.h | 48 + .../include/hardware/structs/pll.h | 25 + .../include/hardware/structs/psm.h | 23 + .../include/hardware/structs/pwm.h | 33 + .../include/hardware/structs/resets.h | 22 + .../include/hardware/structs/rosc.h | 29 + .../include/hardware/structs/rtc.h | 31 + .../include/hardware/structs/scb.h | 24 + .../include/hardware/structs/sio.h | 61 + .../include/hardware/structs/spi.h | 29 + .../include/hardware/structs/ssi.h | 47 + .../include/hardware/structs/syscfg.h | 26 + .../include/hardware/structs/systick.h | 22 + .../include/hardware/structs/timer.h | 35 + .../include/hardware/structs/uart.h | 35 + .../include/hardware/structs/usb.h | 147 + .../hardware/structs/vreg_and_chip_reset.h | 22 + .../include/hardware/structs/watchdog.h | 24 + .../include/hardware/structs/xip_ctrl.h | 29 + .../include/hardware/structs/xosc.h | 27 + .../libraries/pico-sdk/src/rp2_common.cmake | 59 + .../pico-sdk/src/rp2_common/CMakeLists.txt | 70 + .../pico-sdk/src/rp2_common/README.md | 8 + .../src/rp2_common/boot_stage2/CMakeLists.txt | 67 + .../boot_stage2/boot2_generic_03h.S | 152 + .../rp2_common/boot_stage2/boot2_is25lp080.S | 299 + .../rp2_common/boot_stage2/boot2_usb_blinky.S | 47 + .../rp2_common/boot_stage2/boot2_w25q080.S | 330 + .../rp2_common/boot_stage2/boot2_w25x10cl.S | 219 + .../src/rp2_common/boot_stage2/boot_stage2.ld | 13 + .../pico-sdk/src/rp2_common/boot_stage2/doc.h | 4 + .../src/rp2_common/boot_stage2/pad_checksum | 53 + .../rp2_common/hardware_adc/CMakeLists.txt | 4 + .../src/rp2_common/hardware_adc/adc.c | 23 + .../hardware_adc/include/hardware/adc.h | 248 + .../rp2_common/hardware_base/CMakeLists.txt | 3 + .../include/hardware/address_mapped.h | 123 + .../rp2_common/hardware_claim/CMakeLists.txt | 6 + .../src/rp2_common/hardware_claim/claim.c | 65 + .../hardware_claim/include/hardware/claim.h | 101 + .../rp2_common/hardware_clocks/CMakeLists.txt | 11 + .../src/rp2_common/hardware_clocks/clocks.c | 389 + .../hardware_clocks/include/hardware/clocks.h | 194 + .../hardware_clocks/scripts/vcocalc.py | 37 + .../hardware_divider/CMakeLists.txt | 4 + .../src/rp2_common/hardware_divider/divider.S | 76 + .../include/hardware/divider.h | 395 + .../rp2_common/hardware_dma/CMakeLists.txt | 2 + .../src/rp2_common/hardware_dma/dma.c | 68 + .../hardware_dma/include/hardware/dma.h | 591 + .../rp2_common/hardware_flash/CMakeLists.txt | 8 + .../src/rp2_common/hardware_flash/flash.c | 101 + .../hardware_flash/include/hardware/flash.h | 59 + .../rp2_common/hardware_gpio/CMakeLists.txt | 1 + .../src/rp2_common/hardware_gpio/gpio.c | 168 + .../hardware_gpio/include/hardware/gpio.h | 531 + .../rp2_common/hardware_i2c/CMakeLists.txt | 1 + .../src/rp2_common/hardware_i2c/i2c.c | 277 + .../hardware_i2c/include/hardware/i2c.h | 304 + .../rp2_common/hardware_interp/CMakeLists.txt | 1 + .../hardware_interp/include/hardware/interp.h | 435 + .../src/rp2_common/hardware_interp/interp.c | 55 + .../rp2_common/hardware_irq/CMakeLists.txt | 6 + .../hardware_irq/include/hardware/irq.h | 264 + .../src/rp2_common/hardware_irq/irq.c | 401 + .../hardware_irq/irq_handler_chain.S | 70 + .../rp2_common/hardware_pio/CMakeLists.txt | 4 + .../hardware_pio/include/hardware/pio.h | 1022 + .../include/hardware/pio_instructions.h | 178 + .../src/rp2_common/hardware_pio/pio.c | 240 + .../rp2_common/hardware_pll/CMakeLists.txt | 1 + .../hardware_pll/include/hardware/pll.h | 59 + .../src/rp2_common/hardware_pll/pll.c | 66 + .../rp2_common/hardware_pwm/CMakeLists.txt | 1 + .../hardware_pwm/include/hardware/pwm.h | 491 + .../rp2_common/hardware_resets/CMakeLists.txt | 2 + .../hardware_resets/include/hardware/resets.h | 91 + .../rp2_common/hardware_rtc/CMakeLists.txt | 1 + .../hardware_rtc/include/hardware/rtc.h | 74 + .../src/rp2_common/hardware_rtc/rtc.c | 188 + .../rp2_common/hardware_spi/CMakeLists.txt | 1 + .../hardware_spi/include/hardware/spi.h | 297 + .../src/rp2_common/hardware_spi/spi.c | 199 + .../rp2_common/hardware_sync/CMakeLists.txt | 1 + .../hardware_sync/include/hardware/sync.h | 336 + .../src/rp2_common/hardware_sync/sync.c | 58 + .../rp2_common/hardware_timer/CMakeLists.txt | 2 + .../hardware_timer/include/hardware/timer.h | 180 + .../src/rp2_common/hardware_timer/timer.c | 207 + .../rp2_common/hardware_uart/CMakeLists.txt | 1 + .../hardware_uart/include/hardware/uart.h | 432 + .../src/rp2_common/hardware_uart/uart.c | 112 + .../rp2_common/hardware_vreg/CMakeLists.txt | 1 + .../hardware_vreg/include/hardware/vreg.h | 55 + .../src/rp2_common/hardware_vreg/vreg.c | 12 + .../hardware_watchdog/CMakeLists.txt | 1 + .../include/hardware/watchdog.h | 87 + .../rp2_common/hardware_watchdog/watchdog.c | 99 + .../rp2_common/hardware_xosc/CMakeLists.txt | 1 + .../hardware_xosc/include/hardware/xosc.h | 50 + .../src/rp2_common/hardware_xosc/xosc.c | 46 + .../rp2_common/pico_bit_ops/CMakeLists.txt | 57 + .../rp2_common/pico_bit_ops/bit_ops_aeabi.S | 132 + .../rp2_common/pico_bootrom/CMakeLists.txt | 8 + .../src/rp2_common/pico_bootrom/bootrom.c | 38 + .../pico_bootrom/include/pico/bootrom.h | 85 + .../include/pico/bootrom/sf_table.h | 50 + .../pico_cxx_options/CMakeLists.txt | 23 + .../src/rp2_common/pico_cxx_options/doc.h | 4 + .../rp2_common/pico_divider/CMakeLists.txt | 52 + .../src/rp2_common/pico_divider/divider.S | 863 + .../src/rp2_common/pico_double/CMakeLists.txt | 127 + .../src/rp2_common/pico_double/double_aeabi.S | 801 + .../rp2_common/pico_double/double_init_rom.c | 66 + .../src/rp2_common/pico_double/double_math.c | 607 + .../src/rp2_common/pico_double/double_none.S | 82 + .../pico_double/double_v1_rom_shim.S | 2184 + .../pico_double/include/pico/double.h | 60 + .../src/rp2_common/pico_fix/CMakeLists.txt | 1 + .../CMakeLists.txt | 9 + .../pico/fix/rp2040_usb_device_enumeration.h | 17 + .../rp2040_usb_device_enumeration.c | 121 + .../src/rp2_common/pico_float/CMakeLists.txt | 126 + .../src/rp2_common/pico_float/float_aeabi.S | 724 + .../rp2_common/pico_float/float_init_rom.c | 70 + .../src/rp2_common/pico_float/float_math.c | 565 + .../src/rp2_common/pico_float/float_none.S | 80 + .../rp2_common/pico_float/float_v1_rom_shim.S | 347 + .../pico_float/include/pico/float.h | 61 + .../rp2_common/pico_int64_ops/CMakeLists.txt | 44 + .../pico_int64_ops/include/pico/int64_ops.h | 20 + .../pico_int64_ops/pico_int64_ops_aeabi.S | 40 + .../src/rp2_common/pico_malloc/CMakeLists.txt | 14 + .../pico_malloc/include/pico/malloc.h | 38 + .../src/rp2_common/pico_malloc/pico_malloc.c | 72 + .../rp2_common/pico_mem_ops/CMakeLists.txt | 52 + .../pico_mem_ops/include/pico/mem_ops.h | 22 + .../src/rp2_common/pico_mem_ops/mem_ops.c | 7 + .../rp2_common/pico_mem_ops/mem_ops_aeabi.S | 98 + .../rp2_common/pico_multicore/CMakeLists.txt | 17 + .../pico_multicore/include/pico/multicore.h | 173 + .../src/rp2_common/pico_multicore/multicore.c | 262 + .../rp2_common/pico_platform/CMakeLists.txt | 25 + .../pico_platform/include/pico/asm_helper.S | 38 + .../pico_platform/include/pico/platform.h | 100 + .../src/rp2_common/pico_platform/platform.c | 29 + .../src/rp2_common/pico_printf/CMakeLists.txt | 63 + .../pico_printf/include/pico/printf.h | 93 + .../src/rp2_common/pico_printf/printf.c | 937 + .../src/rp2_common/pico_printf/printf_none.S | 23 + .../rp2_common/pico_runtime/CMakeLists.txt | 44 + .../pico_runtime/include/pico/runtime.h | 26 + .../src/rp2_common/pico_runtime/runtime.c | 243 + .../pico_standard_link/CMakeLists.txt | 93 + .../pico_standard_link/binary_info.c | 85 + .../src/rp2_common/pico_standard_link/crt0.S | 315 + .../src/rp2_common/pico_standard_link/doc.h | 10 + .../pico_standard_link/memmap_blocked_ram.ld | 251 + .../pico_standard_link/memmap_copy_to_ram.ld | 252 + .../pico_standard_link/memmap_default.ld | 251 + .../pico_standard_link/memmap_no_flash.ld | 213 + .../pico_standard_link/new_delete.cpp | 26 + .../src/rp2_common/pico_stdio/CMakeLists.txt | 18 + .../src/rp2_common/pico_stdio/LICENSE | 22 + .../pico_stdio/include/pico/stdio.h | 107 + .../pico_stdio/include/pico/stdio/driver.h | 24 + .../src/rp2_common/pico_stdio/stdio.c | 287 + .../pico_stdio_semihosting/CMakeLists.txt | 13 + .../include/pico/stdio_semihosting.h | 34 + .../stdio_semihosting.c | 51 + .../rp2_common/pico_stdio_uart/CMakeLists.txt | 13 + .../pico_stdio_uart/include/pico/stdio_uart.h | 62 + .../rp2_common/pico_stdio_uart/stdio_uart.c | 97 + .../rp2_common/pico_stdio_usb/CMakeLists.txt | 20 + .../pico_stdio_usb/include/pico/stdio_usb.h | 52 + .../pico_stdio_usb/include/tusb_config.h | 36 + .../src/rp2_common/pico_stdio_usb/stdio_usb.c | 115 + .../pico_stdio_usb/stdio_usb_descriptors.c | 121 + .../src/rp2_common/pico_stdlib/CMakeLists.txt | 45 + .../src/rp2_common/pico_stdlib/stdlib.c | 104 + .../src/rp2_common/tinyusb/CMakeLists.txt | 111 + .../pico-sdk/src/rp2_common/tinyusb/doc.h | 7 + .../libraries/pico-sdk/test/CMakeLists.txt | 10 + .../test/hardware_pwm_test/CMakeLists.txt | 4 + .../hardware_pwm_test/hardware_pwm_test.c | 168 + .../pico-sdk/test/kitchen_sink/CMakeLists.txt | 101 + .../pico-sdk/test/kitchen_sink/kitchen_sink.c | 102 + .../test/pico_divider_test/CMakeLists.txt | 17 + .../pico_divider_test/pico_divider_test.c | 376 + .../test/pico_float_test/CMakeLists.txt | 38 + .../test/pico_float_test/llvm/LICENSE.TXT | 68 + .../test/pico_float_test/llvm/call_apsr.S | 38 + .../test/pico_float_test/llvm/call_apsr.h | 40 + .../test/pico_float_test/pico_double_test.c | 434 + .../test/pico_float_test/pico_float_test.c | 538 + .../test/pico_stdlib_test/CMakeLists.txt | 8 + .../test/pico_stdlib_test/pico_stdlib_test.c | 179 + .../pico-sdk/test/pico_test/CMakeLists.txt | 4 + .../test/pico_test/include/pico/test.h | 61 + .../test/pico_time_test/CMakeLists.txt | 8 + .../test/pico_time_test/pico_time_test.c | 211 + .../libraries/pico-sdk/tools/CMakeLists.txt | 60 + .../pico-sdk/tools/FindELF2UF2.cmake | 43 + .../pico-sdk/tools/FindPicotool.cmake | 43 + .../libraries/pico-sdk/tools/FindPioasm.cmake | 50 + .../pico-sdk/tools/check_doxygen_groups.py | 49 + .../pico-sdk/tools/elf2uf2/CMakeLists.txt | 9 + .../libraries/pico-sdk/tools/elf2uf2/elf.h | 60 + .../libraries/pico-sdk/tools/elf2uf2/main.cpp | 324 + .../pico-sdk/tools/extract_configs.py | 201 + .../pico-sdk/tools/pioasm/CMakeLists.txt | 42 + .../pico-sdk/tools/pioasm/c_sdk_output.cpp | 142 + .../pico-sdk/tools/pioasm/gen/lexer.cpp | 2697 ++ .../pico-sdk/tools/pioasm/gen/location.h | 302 + .../pico-sdk/tools/pioasm/gen/parser.cpp | 2208 + .../pico-sdk/tools/pioasm/gen/parser.hpp | 2894 ++ .../pico-sdk/tools/pioasm/hex_output.cpp | 41 + .../libraries/pico-sdk/tools/pioasm/lexer.ll | 236 + .../libraries/pico-sdk/tools/pioasm/main.cpp | 100 + .../pico-sdk/tools/pioasm/output_format.h | 100 + .../libraries/pico-sdk/tools/pioasm/parser.yy | 353 + .../pico-sdk/tools/pioasm/pio_assembler.cpp | 391 + .../pico-sdk/tools/pioasm/pio_assembler.h | 103 + .../tools/pioasm/pio_disassembler.cpp | 171 + .../pico-sdk/tools/pioasm/pio_disassembler.h | 22 + .../pico-sdk/tools/pioasm/pio_types.h | 396 + .../pico-sdk/tools/pioasm/python_output.cpp | 323 + bsp/raspberry-pico/link.ld | 269 + bsp/raspberry-pico/rtconfig.h | 164 + bsp/raspberry-pico/rtconfig.py | 66 + 423 files changed, 137242 insertions(+) create mode 100644 bsp/raspberry-pico/.config create mode 100644 bsp/raspberry-pico/Kconfig create mode 100644 bsp/raspberry-pico/README.md create mode 100644 bsp/raspberry-pico/SConscript create mode 100644 bsp/raspberry-pico/SConstruct create mode 100644 bsp/raspberry-pico/applications/SConscript create mode 100644 bsp/raspberry-pico/applications/main.c create mode 100644 bsp/raspberry-pico/drivers/SConscript create mode 100644 bsp/raspberry-pico/drivers/board.c create mode 100644 bsp/raspberry-pico/drivers/board.h create mode 100644 bsp/raspberry-pico/drivers/drv_uart.c create mode 100644 bsp/raspberry-pico/drivers/drv_uart.h create mode 100644 bsp/raspberry-pico/libraries/SConscript create mode 100644 bsp/raspberry-pico/libraries/generated/bs2_default_padded_checksummed.S create mode 100644 bsp/raspberry-pico/libraries/generated/elf2uf2 create mode 100644 bsp/raspberry-pico/libraries/generated/pico_base/pico/config_autogen.h create mode 100644 bsp/raspberry-pico/libraries/generated/pico_base/pico/version.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/.gitignore create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/.gitmodules create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/LICENSE.TXT create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/README.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/Platform/PICO.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_platform.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_toolchain.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_utils.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/host.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/pico/pico.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/rp2040.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/find_compiler.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang_arm.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/Doxyfile.in create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/DoxygenLayout.xml create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/examples.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/footer.html create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/header.html create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/index.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/logo-mobile.svg create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/logo.svg create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/main.css create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/main.js create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/mainpage.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/normalise.css create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/pico.jpg create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/rp2040.png create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/search.svg create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/styles.css create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/docs/weblinks_page.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/external/pico_sdk_import.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_init.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_version.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/board_setup.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/boards/generic_board.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/none.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/pico.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/vgaboard.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/README.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/include/boot/picoboot.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/include/boot/uf2.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/assert.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/config.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/error.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/types.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/version.h.in create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/code.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/defs.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/structure.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/include/pico/bit_ops.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/include/pico/divider.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/include/pico/stdlib.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/critical_section.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/critical_section.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/lock_core.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/mutex.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sem.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sync.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/lock_core.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/mutex.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/sem.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/time.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/timeout_helper.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/time.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/timeout_helper.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/datetime.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/doc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/datetime.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/pheap.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/queue.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/pheap.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/queue.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/README.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/boot_stage2.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/divider.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/include/hardware/divider.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/gpio.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/include/hardware/gpio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/include/hardware/sync.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/sync_core0_only.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/include/hardware/timer.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/timer.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_uart/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_uart/include/hardware/uart.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_uart/uart.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/bit_ops.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/divider.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/include/pico/multicore.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/hardware/platform_defs.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/pico/platform.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/platform_base.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_printf/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/include/pico/stdio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/stdio.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/stdlib.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/README.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/platform_defs.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/adc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/busctrl.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/clocks.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dma.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dreq.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/i2c.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/intctrl.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_qspi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_qspi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pll.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/psm.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pwm.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/resets.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rosc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rtc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/spi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/ssi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/syscfg.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sysinfo.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/tbman.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/timer.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/uart.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/usb.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/vreg_and_chip_reset.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/watchdog.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xip.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xosc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/rp2040.svd create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/adc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/bus_ctrl.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/clocks.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/dma.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/i2c.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/interp.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/iobank0.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ioqspi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/mpu.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pll.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/psm.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pwm.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/resets.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rosc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rtc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/scb.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/sio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/spi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/syscfg.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/systick.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/timer.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/uart.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/usb.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/vreg_and_chip_reset.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xip_ctrl.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xosc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/README.md create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_is25lp080.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_usb_blinky.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25q080.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25x10cl.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot_stage2.ld create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/doc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/pad_checksum create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_adc/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_adc/adc.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_adc/include/hardware/adc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/include/hardware/address_mapped.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/claim.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/include/hardware/claim.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/clocks.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/include/hardware/clocks.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/divider.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/include/hardware/divider.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/dma.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/include/hardware/dma.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/flash.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/include/hardware/flash.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/gpio.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_i2c/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_i2c/i2c.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_i2c/include/hardware/i2c.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/include/hardware/interp.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/interp.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/include/hardware/irq.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio_instructions.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/pio.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/include/hardware/pll.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/pll.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/include/hardware/resets.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/include/hardware/rtc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/rtc.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/include/hardware/spi.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/spi.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/include/hardware/sync.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/sync.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/include/hardware/timer.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/timer.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/include/hardware/uart.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/uart.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/include/hardware/vreg.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/vreg.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/include/hardware/xosc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/xosc.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom/sf_table.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/doc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/divider.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_aeabi.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_init_rom.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_math.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_none.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/include/pico/double.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include/pico/fix/rp2040_usb_device_enumeration.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_aeabi.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_init_rom.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_math.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_none.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/include/pico/float.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/include/pico/int64_ops.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/include/pico/malloc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/include/pico/mem_ops.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/include/pico/multicore.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/multicore.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/asm_helper.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/platform.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/platform.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/include/pico/printf.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf_none.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/include/pico/runtime.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/runtime.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/crt0.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/doc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_no_flash.ld create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/LICENSE create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio/driver.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/stdio.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/include/pico/stdio_semihosting.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/stdio_semihosting.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_uart/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_uart/include/pico/stdio_uart.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_uart/stdio_uart.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/include/pico/stdio_usb.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/include/tusb_config.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb_descriptors.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/doc.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/hardware_pwm_test.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/kitchen_sink.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/pico_divider_test.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/LICENSE.TXT create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.S create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_double_test.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_float_test.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/pico_stdlib_test.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/include/pico/test.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/pico_time_test.c create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/FindELF2UF2.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/FindPicotool.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/FindPioasm.cmake create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/check_doxygen_groups.py create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/elf2uf2/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/elf2uf2/elf.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/elf2uf2/main.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/extract_configs.py create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/CMakeLists.txt create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/c_sdk_output.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/lexer.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/location.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.hpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/hex_output.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/lexer.ll create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/main.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/output_format.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/parser.yy create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.cpp create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_types.h create mode 100644 bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/python_output.cpp create mode 100644 bsp/raspberry-pico/link.ld create mode 100644 bsp/raspberry-pico/rtconfig.h create mode 100644 bsp/raspberry-pico/rtconfig.py diff --git a/bsp/raspberry-pico/.config b/bsp/raspberry-pico/.config new file mode 100644 index 0000000000..200215d311 --- /dev/null +++ b/bsp/raspberry-pico/.config @@ -0,0 +1,534 @@ +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Configuration +# + +# +# RT-Thread Kernel +# +CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_ARCH_DATA_TYPE is not set +# CONFIG_RT_USING_SMP is not set +CONFIG_RT_ALIGN_SIZE=4 +# CONFIG_RT_THREAD_PRIORITY_8 is not set +CONFIG_RT_THREAD_PRIORITY_32=y +# CONFIG_RT_THREAD_PRIORITY_256 is not set +CONFIG_RT_THREAD_PRIORITY_MAX=32 +CONFIG_RT_TICK_PER_SECOND=100 +CONFIG_RT_USING_OVERFLOW_CHECK=y +CONFIG_RT_USING_HOOK=y +CONFIG_RT_USING_IDLE_HOOK=y +CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 +CONFIG_IDLE_THREAD_STACK_SIZE=256 +# CONFIG_RT_USING_TIMER_SOFT is not set +CONFIG_RT_DEBUG=y +CONFIG_RT_DEBUG_COLOR=y +# CONFIG_RT_DEBUG_INIT_CONFIG is not set +# CONFIG_RT_DEBUG_THREAD_CONFIG is not set +# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set +# CONFIG_RT_DEBUG_IPC_CONFIG is not set +# CONFIG_RT_DEBUG_TIMER_CONFIG is not set +# CONFIG_RT_DEBUG_IRQ_CONFIG is not set +# CONFIG_RT_DEBUG_MEM_CONFIG is not set +# CONFIG_RT_DEBUG_SLAB_CONFIG is not set +# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set +# CONFIG_RT_DEBUG_MODULE_CONFIG is not set + +# +# Inter-Thread communication +# +CONFIG_RT_USING_SEMAPHORE=y +CONFIG_RT_USING_MUTEX=y +CONFIG_RT_USING_EVENT=y +CONFIG_RT_USING_MAILBOX=y +CONFIG_RT_USING_MESSAGEQUEUE=y +# CONFIG_RT_USING_SIGNALS is not set + +# +# Memory Management +# +CONFIG_RT_USING_MEMPOOL=y +# CONFIG_RT_USING_MEMHEAP is not set +# CONFIG_RT_USING_NOHEAP is not set +CONFIG_RT_USING_SMALL_MEM=y +# CONFIG_RT_USING_SLAB is not set +# CONFIG_RT_USING_USERHEAP is not set +# CONFIG_RT_USING_MEMTRACE is not set +CONFIG_RT_USING_HEAP=y + +# +# Kernel Device Object +# +CONFIG_RT_USING_DEVICE=y +# CONFIG_RT_USING_DEVICE_OPS is not set +# CONFIG_RT_USING_INTERRUPT_INFO is not set +CONFIG_RT_USING_CONSOLE=y +CONFIG_RT_CONSOLEBUF_SIZE=128 +CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" +CONFIG_RT_VER_NUM=0x40003 +CONFIG_ARCH_ARM=y +# CONFIG_RT_USING_CPU_FFS is not set +CONFIG_ARCH_ARM_CORTEX_M=y +CONFIG_ARCH_ARM_CORTEX_M0=y +# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set + +# +# RT-Thread Components +# +CONFIG_RT_USING_COMPONENTS_INIT=y +CONFIG_RT_USING_USER_MAIN=y +CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048 +CONFIG_RT_MAIN_THREAD_PRIORITY=10 + +# +# C++ features +# +# CONFIG_RT_USING_CPLUSPLUS is not set + +# +# Command shell +# +CONFIG_RT_USING_FINSH=y +CONFIG_FINSH_THREAD_NAME="tshell" +CONFIG_FINSH_USING_HISTORY=y +CONFIG_FINSH_HISTORY_LINES=5 +CONFIG_FINSH_USING_SYMTAB=y +CONFIG_FINSH_USING_DESCRIPTION=y +# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set +CONFIG_FINSH_THREAD_PRIORITY=20 +CONFIG_FINSH_THREAD_STACK_SIZE=4096 +CONFIG_FINSH_CMD_SIZE=80 +# CONFIG_FINSH_USING_AUTH is not set +CONFIG_FINSH_USING_MSH=y +CONFIG_FINSH_USING_MSH_DEFAULT=y +CONFIG_FINSH_USING_MSH_ONLY=y +CONFIG_FINSH_ARG_MAX=10 + +# +# Device virtual file system +# +# CONFIG_RT_USING_DFS is not set + +# +# Device Drivers +# +CONFIG_RT_USING_DEVICE_IPC=y +CONFIG_RT_PIPE_BUFSZ=512 +# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set +CONFIG_RT_USING_SERIAL=y +CONFIG_RT_SERIAL_USING_DMA=y +CONFIG_RT_SERIAL_RB_BUFSZ=64 +# CONFIG_RT_USING_CAN is not set +# CONFIG_RT_USING_HWTIMER is not set +# CONFIG_RT_USING_CPUTIME is not set +# CONFIG_RT_USING_I2C is not set +# CONFIG_RT_USING_PHY is not set +# CONFIG_RT_USING_PIN is not set +# CONFIG_RT_USING_ADC is not set +# CONFIG_RT_USING_DAC is not set +# CONFIG_RT_USING_PWM is not set +# CONFIG_RT_USING_MTD_NOR is not set +# CONFIG_RT_USING_MTD_NAND is not set +# CONFIG_RT_USING_PM is not set +# CONFIG_RT_USING_RTC is not set +# CONFIG_RT_USING_SDIO is not set +# CONFIG_RT_USING_SPI is not set +# CONFIG_RT_USING_WDT is not set +# CONFIG_RT_USING_AUDIO is not set +# CONFIG_RT_USING_SENSOR is not set +# CONFIG_RT_USING_TOUCH is not set +# CONFIG_RT_USING_HWCRYPTO is not set +# CONFIG_RT_USING_PULSE_ENCODER is not set +# CONFIG_RT_USING_INPUT_CAPTURE is not set +# CONFIG_RT_USING_WIFI is not set + +# +# Using USB +# +# CONFIG_RT_USING_USB_HOST is not set +# CONFIG_RT_USING_USB_DEVICE is not set + +# +# POSIX layer and C standard library +# +# CONFIG_RT_USING_LIBC is not set +# CONFIG_RT_USING_PTHREADS is not set +CONFIG_RT_LIBC_USING_TIME=y + +# +# Network +# + +# +# Socket abstraction layer +# +# CONFIG_RT_USING_SAL is not set + +# +# Network interface device +# +# CONFIG_RT_USING_NETDEV is not set + +# +# light weight TCP/IP stack +# +# CONFIG_RT_USING_LWIP is not set + +# +# AT commands +# +# CONFIG_RT_USING_AT is not set + +# +# VBUS(Virtual Software BUS) +# +# CONFIG_RT_USING_VBUS is not set + +# +# Utilities +# +# CONFIG_RT_USING_RYM is not set +# CONFIG_RT_USING_ULOG is not set +# CONFIG_RT_USING_UTEST is not set +# CONFIG_RT_USING_LWP is not set + +# +# RT-Thread online packages +# + +# +# IoT - internet of things +# +# CONFIG_PKG_USING_LORAWAN_DRIVER is not set +# CONFIG_PKG_USING_PAHOMQTT is not set +# CONFIG_PKG_USING_UMQTT is not set +# CONFIG_PKG_USING_WEBCLIENT is not set +# CONFIG_PKG_USING_WEBNET is not set +# CONFIG_PKG_USING_MONGOOSE is not set +# CONFIG_PKG_USING_MYMQTT is not set +# CONFIG_PKG_USING_KAWAII_MQTT is not set +# CONFIG_PKG_USING_BC28_MQTT is not set +# CONFIG_PKG_USING_WEBTERMINAL is not set +# CONFIG_PKG_USING_CJSON is not set +# CONFIG_PKG_USING_JSMN is not set +# CONFIG_PKG_USING_LIBMODBUS is not set +# CONFIG_PKG_USING_FREEMODBUS is not set +# CONFIG_PKG_USING_LJSON is not set +# CONFIG_PKG_USING_EZXML is not set +# CONFIG_PKG_USING_NANOPB is not set + +# +# Wi-Fi +# + +# +# Marvell WiFi +# +# CONFIG_PKG_USING_WLANMARVELL is not set + +# +# Wiced WiFi +# +# CONFIG_PKG_USING_WLAN_WICED is not set +# CONFIG_PKG_USING_RW007 is not set +# CONFIG_PKG_USING_COAP is not set +# CONFIG_PKG_USING_NOPOLL is not set +# CONFIG_PKG_USING_NETUTILS is not set +# CONFIG_PKG_USING_CMUX is not set +# CONFIG_PKG_USING_PPP_DEVICE is not set +# CONFIG_PKG_USING_AT_DEVICE is not set +# CONFIG_PKG_USING_ATSRV_SOCKET is not set +# CONFIG_PKG_USING_WIZNET is not set + +# +# IoT Cloud +# +# CONFIG_PKG_USING_ONENET is not set +# CONFIG_PKG_USING_GAGENT_CLOUD is not set +# CONFIG_PKG_USING_ALI_IOTKIT is not set +# CONFIG_PKG_USING_AZURE is not set +# CONFIG_PKG_USING_TENCENT_IOT_EXPLORER is not set +# CONFIG_PKG_USING_JIOT-C-SDK is not set +# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set +# CONFIG_PKG_USING_JOYLINK is not set +# CONFIG_PKG_USING_NIMBLE is not set +# CONFIG_PKG_USING_OTA_DOWNLOADER is not set +# CONFIG_PKG_USING_IPMSG is not set +# CONFIG_PKG_USING_LSSDP is not set +# CONFIG_PKG_USING_AIRKISS_OPEN is not set +# CONFIG_PKG_USING_LIBRWS is not set +# CONFIG_PKG_USING_TCPSERVER is not set +# CONFIG_PKG_USING_PROTOBUF_C is not set +# CONFIG_PKG_USING_ONNX_PARSER is not set +# CONFIG_PKG_USING_ONNX_BACKEND is not set +# CONFIG_PKG_USING_DLT645 is not set +# CONFIG_PKG_USING_QXWZ is not set +# CONFIG_PKG_USING_SMTP_CLIENT is not set +# CONFIG_PKG_USING_ABUP_FOTA is not set +# CONFIG_PKG_USING_LIBCURL2RTT is not set +# CONFIG_PKG_USING_CAPNP is not set +# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set +# CONFIG_PKG_USING_AGILE_TELNET is not set +# CONFIG_PKG_USING_NMEALIB is not set +# CONFIG_PKG_USING_AGILE_JSMN is not set +# CONFIG_PKG_USING_PDULIB is not set +# CONFIG_PKG_USING_BTSTACK is not set +# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set +# CONFIG_PKG_USING_WAYZ_IOTKIT is not set + +# +# security packages +# +# CONFIG_PKG_USING_MBEDTLS is not set +# CONFIG_PKG_USING_libsodium is not set +# CONFIG_PKG_USING_TINYCRYPT is not set +# CONFIG_PKG_USING_TFM is not set +# CONFIG_PKG_USING_YD_CRYPTO is not set + +# +# language packages +# +# CONFIG_PKG_USING_LUA is not set +# CONFIG_PKG_USING_JERRYSCRIPT is not set +# CONFIG_PKG_USING_MICROPYTHON is not set + +# +# multimedia packages +# +# CONFIG_PKG_USING_OPENMV is not set +# CONFIG_PKG_USING_MUPDF is not set +# CONFIG_PKG_USING_STEMWIN is not set +# CONFIG_PKG_USING_WAVPLAYER is not set +# CONFIG_PKG_USING_TJPGD is not set +# CONFIG_PKG_USING_HELIX is not set +# CONFIG_PKG_USING_AZUREGUIX is not set +# CONFIG_PKG_USING_TOUCHGFX2RTT is not set + +# +# tools packages +# +# CONFIG_PKG_USING_CMBACKTRACE is not set +# CONFIG_PKG_USING_EASYFLASH is not set +# CONFIG_PKG_USING_EASYLOGGER is not set +# CONFIG_PKG_USING_SYSTEMVIEW is not set +# CONFIG_PKG_USING_RDB is not set +# CONFIG_PKG_USING_QRCODE is not set +# CONFIG_PKG_USING_ULOG_EASYFLASH is not set +# CONFIG_PKG_USING_ULOG_FILE is not set +# CONFIG_PKG_USING_LOGMGR is not set +# CONFIG_PKG_USING_ADBD is not set +# CONFIG_PKG_USING_COREMARK is not set +# CONFIG_PKG_USING_DHRYSTONE is not set +# CONFIG_PKG_USING_MEMORYPERF is not set +# CONFIG_PKG_USING_NR_MICRO_SHELL is not set +# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set +# CONFIG_PKG_USING_LUNAR_CALENDAR is not set +# CONFIG_PKG_USING_BS8116A is not set +# CONFIG_PKG_USING_GPS_RMC is not set +# CONFIG_PKG_USING_URLENCODE is not set +# CONFIG_PKG_USING_UMCN is not set +# CONFIG_PKG_USING_LWRB2RTT is not set +# CONFIG_PKG_USING_CPU_USAGE is not set +# CONFIG_PKG_USING_GBK2UTF8 is not set +# CONFIG_PKG_USING_VCONSOLE is not set +# CONFIG_PKG_USING_KDB is not set +# CONFIG_PKG_USING_WAMR is not set + +# +# system packages +# +# CONFIG_PKG_USING_GUIENGINE is not set +# CONFIG_PKG_USING_CAIRO is not set +# CONFIG_PKG_USING_PIXMAN is not set +# CONFIG_PKG_USING_LWEXT4 is not set +# CONFIG_PKG_USING_PARTITION is not set +# CONFIG_PKG_USING_FAL is not set +# CONFIG_PKG_USING_FLASHDB is not set +# CONFIG_PKG_USING_SQLITE is not set +# CONFIG_PKG_USING_RTI is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set +# CONFIG_PKG_USING_CMSIS is not set +# CONFIG_PKG_USING_DFS_YAFFS is not set +# CONFIG_PKG_USING_LITTLEFS is not set +# CONFIG_PKG_USING_THREAD_POOL is not set +# CONFIG_PKG_USING_ROBOTS is not set +# CONFIG_PKG_USING_EV is not set +# CONFIG_PKG_USING_SYSWATCH is not set +# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set +# CONFIG_PKG_USING_PLCCORE is not set +# CONFIG_PKG_USING_RAMDISK is not set +# CONFIG_PKG_USING_MININI is not set +# CONFIG_PKG_USING_QBOOT is not set + +# +# Micrium: Micrium software products porting for RT-Thread +# +# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set +# CONFIG_PKG_USING_UCOSII_WRAPPER is not set +# CONFIG_PKG_USING_UC_CRC is not set +# CONFIG_PKG_USING_UC_CLK is not set +# CONFIG_PKG_USING_UC_COMMON is not set +# CONFIG_PKG_USING_UC_MODBUS is not set +# CONFIG_PKG_USING_PPOOL is not set +# CONFIG_PKG_USING_OPENAMP is not set +# CONFIG_PKG_USING_RT_PRINTF is not set +# CONFIG_PKG_USING_RT_MEMCPY_CM is not set +# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set +# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set +# CONFIG_PKG_USING_QFPLIB_M3 is not set + +# +# peripheral libraries and drivers +# +# CONFIG_PKG_USING_SENSORS_DRIVERS is not set +# CONFIG_PKG_USING_REALTEK_AMEBA is not set +# CONFIG_PKG_USING_SHT2X is not set +# CONFIG_PKG_USING_SHT3X is not set +# CONFIG_PKG_USING_AS7341 is not set +# CONFIG_PKG_USING_STM32_SDIO is not set +# CONFIG_PKG_USING_ICM20608 is not set +# CONFIG_PKG_USING_U8G2 is not set +# CONFIG_PKG_USING_BUTTON is not set +# CONFIG_PKG_USING_PCF8574 is not set +# CONFIG_PKG_USING_SX12XX is not set +# CONFIG_PKG_USING_SIGNAL_LED is not set +# CONFIG_PKG_USING_LEDBLINK is not set +# CONFIG_PKG_USING_LITTLED is not set +# CONFIG_PKG_USING_LKDGUI is not set +# CONFIG_PKG_USING_NRF5X_SDK is not set +# CONFIG_PKG_USING_NRFX is not set +# CONFIG_PKG_USING_WM_LIBRARIES is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set +# CONFIG_PKG_USING_INFRARED is not set +# CONFIG_PKG_USING_ROSSERIAL is not set +# CONFIG_PKG_USING_AGILE_BUTTON is not set +# CONFIG_PKG_USING_AGILE_LED is not set +# CONFIG_PKG_USING_AT24CXX is not set +# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set +# CONFIG_PKG_USING_AD7746 is not set +# CONFIG_PKG_USING_PCA9685 is not set +# CONFIG_PKG_USING_I2C_TOOLS is not set +# CONFIG_PKG_USING_NRF24L01 is not set +# CONFIG_PKG_USING_TOUCH_DRIVERS is not set +# CONFIG_PKG_USING_MAX17048 is not set +# CONFIG_PKG_USING_RPLIDAR is not set +# CONFIG_PKG_USING_AS608 is not set +# CONFIG_PKG_USING_RC522 is not set +# CONFIG_PKG_USING_WS2812B is not set +# CONFIG_PKG_USING_EMBARC_BSP is not set +# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set +# CONFIG_PKG_USING_MULTI_RTIMER is not set +# CONFIG_PKG_USING_MAX7219 is not set +# CONFIG_PKG_USING_BEEP is not set +# CONFIG_PKG_USING_EASYBLINK is not set +# CONFIG_PKG_USING_PMS_SERIES is not set +# CONFIG_PKG_USING_CAN_YMODEM is not set +# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set +# CONFIG_PKG_USING_QLED is not set +# CONFIG_PKG_USING_PAJ7620 is not set +# CONFIG_PKG_USING_AGILE_CONSOLE is not set +# CONFIG_PKG_USING_LD3320 is not set +# CONFIG_PKG_USING_WK2124 is not set +# CONFIG_PKG_USING_LY68L6400 is not set +# CONFIG_PKG_USING_DM9051 is not set +# CONFIG_PKG_USING_SSD1306 is not set +# CONFIG_PKG_USING_QKEY is not set +# CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_NES is not set +# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set +# CONFIG_PKG_USING_VDEVICE is not set +# CONFIG_PKG_USING_SGM706 is not set + +# +# miscellaneous packages +# +# CONFIG_PKG_USING_LIBCSV is not set +# CONFIG_PKG_USING_OPTPARSE is not set +# CONFIG_PKG_USING_FASTLZ is not set +# CONFIG_PKG_USING_MINILZO is not set +# CONFIG_PKG_USING_QUICKLZ is not set +# CONFIG_PKG_USING_LZMA is not set +# CONFIG_PKG_USING_MULTIBUTTON is not set +# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set +# CONFIG_PKG_USING_CANFESTIVAL is not set +# CONFIG_PKG_USING_ZLIB is not set +# CONFIG_PKG_USING_DSTR is not set +# CONFIG_PKG_USING_TINYFRAME is not set +# CONFIG_PKG_USING_KENDRYTE_DEMO is not set +# CONFIG_PKG_USING_DIGITALCTRL is not set +# CONFIG_PKG_USING_UPACKER is not set +# CONFIG_PKG_USING_UPARAM is not set + +# +# samples: kernel and components samples +# +# CONFIG_PKG_USING_KERNEL_SAMPLES is not set +# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set +# CONFIG_PKG_USING_NETWORK_SAMPLES is not set +# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set +# CONFIG_PKG_USING_HELLO is not set +# CONFIG_PKG_USING_VI is not set +# CONFIG_PKG_USING_KI is not set +# CONFIG_PKG_USING_NNOM is not set +# CONFIG_PKG_USING_LIBANN is not set +# CONFIG_PKG_USING_ELAPACK is not set +# CONFIG_PKG_USING_ARMv7M_DWT is not set +# CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_ULAPACK is not set +# CONFIG_PKG_USING_UKAL is not set +# CONFIG_PKG_USING_CRCLIB is not set + +# +# games: games run on RT-Thread console +# +# CONFIG_PKG_USING_THREES is not set +# CONFIG_PKG_USING_2048 is not set +# CONFIG_PKG_USING_SNAKE is not set +# CONFIG_PKG_USING_TETRIS is not set +# CONFIG_PKG_USING_LWGPS is not set +# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set +# CONFIG_PKG_USING_STATE_MACHINE is not set + +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_MPLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set + +# +# Network Utilities +# +# CONFIG_PKG_USING_WICED is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RDBD_SRC is not set +# CONFIG_PKG_USING_RTINSIGHT is not set +# CONFIG_PKG_USING_SMARTCONFIG is not set +# CONFIG_PKG_USING_RTX is not set +# CONFIG_RT_USING_TESTCASE is not set +# CONFIG_PKG_USING_NGHTTP2 is not set +# CONFIG_PKG_USING_AVS is not set +# CONFIG_PKG_USING_ALI_LINKKIT is not set +# CONFIG_PKG_USING_STS is not set +# CONFIG_PKG_USING_DLMS is not set +# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set +# CONFIG_PKG_USING_ZBAR is not set +# CONFIG_PKG_USING_MCF is not set +# CONFIG_PKG_USING_URPC is not set +# CONFIG_PKG_USING_BSAL is not set +# CONFIG_PKG_USING_DCM is not set +# CONFIG_PKG_USING_EMQ is not set +# CONFIG_PKG_USING_CFGM is not set +# CONFIG_PKG_USING_RT_CMSIS_DAP is not set +# CONFIG_PKG_USING_SMODULE is not set +# CONFIG_PKG_USING_SNFD is not set +# CONFIG_PKG_USING_UDBD is not set +# CONFIG_PKG_USING_BENCHMARK is not set +# CONFIG_PKG_USING_UBJSON is not set +# CONFIG_PKG_USING_DATATYPE is not set +CONFIG_SOC_RP2040=y diff --git a/bsp/raspberry-pico/Kconfig b/bsp/raspberry-pico/Kconfig new file mode 100644 index 0000000000..c9666bbc93 --- /dev/null +++ b/bsp/raspberry-pico/Kconfig @@ -0,0 +1,26 @@ +mainmenu "RT-Thread Configuration" + +config BSP_DIR + string + option env="BSP_ROOT" + default "." + +config RTT_DIR + string + option env="RTT_ROOT" + default "../.." + +config PKGS_DIR + string + option env="PKGS_ROOT" + default "packages" + +source "$RTT_DIR/Kconfig" +source "$PKGS_DIR/Kconfig" + +config SOC_RP2040 + bool + select ARCH_ARM_CORTEX_M0 + select RT_USING_COMPONENTS_INIT + select RT_USING_USER_MAIN + default y diff --git a/bsp/raspberry-pico/README.md b/bsp/raspberry-pico/README.md new file mode 100644 index 0000000000..43a51a89c9 --- /dev/null +++ b/bsp/raspberry-pico/README.md @@ -0,0 +1,31 @@ +# Raspberry PICO + +## Build + +``` +scons -c +scons +``` + +**gcc version >= 6.x.x** + +## Flash + +``` +./Libraries/generated/elf2uf2 rtthread-pico.elf rtthread-pico.uf2 +``` + +- Copy the rtthread-pico.uf2 file to the "RPI-RP2" disk +- Then led blink. + +## Run + +``` + \ | / +- RT - Thread Operating System + / | \ 4.0.3 build Jan 28 2021 + 2006 - 2021 Copyright by rt-thread team +Hello, RT-Thread! +msh > +``` + diff --git a/bsp/raspberry-pico/SConscript b/bsp/raspberry-pico/SConscript new file mode 100644 index 0000000000..0992612410 --- /dev/null +++ b/bsp/raspberry-pico/SConscript @@ -0,0 +1,12 @@ +from building import * + +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) + +Return('objs') diff --git a/bsp/raspberry-pico/SConstruct b/bsp/raspberry-pico/SConstruct new file mode 100644 index 0000000000..5fa1ce567b --- /dev/null +++ b/bsp/raspberry-pico/SConstruct @@ -0,0 +1,37 @@ +import os +import sys +import rtconfig + +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../..') + +sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] +from building import * + +TARGET = 'rtthread-pico.' + rtconfig.TARGET_EXT + +DefaultEnvironment(tools=[]) +env = Environment(tools = ['mingw'], + AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, + CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, + CXX = rtconfig.CXX, + AR = rtconfig.AR, ARFLAGS = '-rc', + LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) +env.PrependENVPath('PATH', rtconfig.EXEC_PATH) + +Export('RTT_ROOT') +Export('rtconfig') + +# prepare building environment +objs = PrepareBuilding(env, RTT_ROOT) + +#if GetDepend('RT_USING_RTGUI'): +# objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0) + +# libc testsuite +# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0) + +# make a building +DoBuilding(TARGET, objs) diff --git a/bsp/raspberry-pico/applications/SConscript b/bsp/raspberry-pico/applications/SConscript new file mode 100644 index 0000000000..01eb940dfb --- /dev/null +++ b/bsp/raspberry-pico/applications/SConscript @@ -0,0 +1,11 @@ +Import('RTT_ROOT') +Import('rtconfig') +from building import * + +cwd = os.path.join(str(Dir('#')), 'applications') +src = Glob('*.c') +CPPPATH = [cwd, str(Dir('#'))] + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/raspberry-pico/applications/main.c b/bsp/raspberry-pico/applications/main.c new file mode 100644 index 0000000000..f1792ed836 --- /dev/null +++ b/bsp/raspberry-pico/applications/main.c @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +#include "board.h" + +int main() { + const uint LED_PIN = 25; + + rt_kprintf("Hello, RT-Thread!\n"); + + gpio_init(LED_PIN); + gpio_set_dir(LED_PIN, GPIO_OUT); + while (true) { + gpio_put(LED_PIN, 1); + rt_thread_mdelay(1000); + gpio_put(LED_PIN, 0); + rt_thread_mdelay(1000); + } +} + diff --git a/bsp/raspberry-pico/drivers/SConscript b/bsp/raspberry-pico/drivers/SConscript new file mode 100644 index 0000000000..9c96da4809 --- /dev/null +++ b/bsp/raspberry-pico/drivers/SConscript @@ -0,0 +1,9 @@ +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/raspberry-pico/drivers/board.c b/bsp/raspberry-pico/drivers/board.c new file mode 100644 index 0000000000..e4db84bdad --- /dev/null +++ b/bsp/raspberry-pico/drivers/board.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2009-01-05 Bernard first implementation + */ + +#include +#include + +#include + +#include "board.h" +#include "hardware/structs/systick.h" + +uint8_t heap[1024 * 80]; + +void isr_systick(void) +{ + /* enter interrupt */ + rt_interrupt_enter(); + + rt_tick_increase(); + + /* leave interrupt */ + rt_interrupt_leave(); +} + +uint32_t systick_config(uint32_t ticks) +{ + if ((ticks - 1UL) > M0PLUS_SYST_RVR_RELOAD_BITS) + { + return (1UL); /* Reload value impossible */ + } + + mpu_hw->rvr = (uint32_t)(ticks - 1UL); /* set reload register */ + mpu_hw->csr = M0PLUS_SYST_CSR_CLKSOURCE_BITS | + M0PLUS_SYST_CSR_TICKINT_BITS | + M0PLUS_SYST_CSR_ENABLE_BITS; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +void rt_hw_board_init() +{ + /* Configure the SysTick */ + systick_config(frequency_count_khz(CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC)*10000/RT_TICK_PER_SECOND); + + rt_system_heap_init(heap, (uint8_t *)heap + sizeof(heap)); + + stdio_init_all(); + rt_hw_uart_init(); + +#ifdef RT_USING_CONSOLE + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); +#endif +} diff --git a/bsp/raspberry-pico/drivers/board.h b/bsp/raspberry-pico/drivers/board.h new file mode 100644 index 0000000000..725ce1e4c2 --- /dev/null +++ b/bsp/raspberry-pico/drivers/board.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2009-09-22 Bernard add board.h to this bsp + */ + +// <<< Use Configuration Wizard in Context Menu >>> +#ifndef __BOARD_H__ +#define __BOARD_H__ + +#include "pico/stdlib.h" +#include "hardware/pll.h" +#include "hardware/clocks.h" +#include "hardware/structs/pll.h" +#include "hardware/structs/clocks.h" + +#define PICO_SRAM_SIZE 256 +#define PICO_SRAM_END (0x20000000 + PICO_SRAM_SIZE * 1024) + +extern int __bss_end; +#define HEAP_BEGIN (&__bss_end) +#define HEAP_END PICO_SRAM_END + +int rt_hw_uart_init(void); + +#endif diff --git a/bsp/raspberry-pico/drivers/drv_uart.c b/bsp/raspberry-pico/drivers/drv_uart.c new file mode 100644 index 0000000000..48599e01f8 --- /dev/null +++ b/bsp/raspberry-pico/drivers/drv_uart.c @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + +#include +#include +#include +#include "board.h" +#include "drv_uart.h" + +#include "hardware/uart.h" +#include "hardware/irq.h" + +#define UART_ID uart0 +#define BAUD_RATE 115200 +#define DATA_BITS 8 +#define STOP_BITS 1 +#define PARITY UART_PARITY_NONE + +// We are using pins 0 and 1, but see the GPIO function select table in the +// datasheet for information on which other pins can be used. +#define UART_TX_PIN 0 +#define UART_RX_PIN 1 + +#define PICO_UART_DEVICE(uart) (struct pico_uart_dev *)(uart) + +static struct pico_uart_dev uart0_dev; + +struct pico_uart_dev +{ + struct rt_serial_device parent; + rt_uint32_t uart_periph; + rt_uint32_t irqno; +}; + +void pico_uart_isr(void) +{ + rt_interrupt_enter(); + /* read interrupt status and clear it */ + if (uart_is_readable(uart0)) /* rx ind */ + { + rt_hw_serial_isr(&uart0_dev.parent, RT_SERIAL_EVENT_RX_IND); + } + + rt_interrupt_leave(); +} + +/* + * UART interface + */ +static rt_err_t pico_uart_configure(struct rt_serial_device *serial, struct serial_configure *cfg) +{ + return RT_EOK; +} + +static rt_err_t pico_uart_control(struct rt_serial_device *serial, int cmd, void *arg) +{ + return RT_EOK; +} + +static int pico_uart_putc(struct rt_serial_device *serial, char c) +{ + uart_putc_raw(uart0, c); + + return 1; +} + +static int pico_uart_getc(struct rt_serial_device *serial) +{ + int ch; + + if (uart_is_readable(uart0)) + { + ch = uart_get_hw(uart0)->dr; + } + else + { + ch =-1; + } + + return ch; +} + +const static struct rt_uart_ops _uart_ops = +{ + pico_uart_configure, + pico_uart_control, + pico_uart_putc, + pico_uart_getc, + RT_NULL, +}; + +/* + * UART Initiation + */ +int rt_hw_uart_init(void) +{ + rt_err_t ret = RT_EOK; + + struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; + + uart_init(UART_ID, 115200); + + // Set the TX and RX pins by using the function select on the GPIO + // Set datasheet for more information on function select + gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART); + gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART); + + // Actually, we want a different speed + // The call will return the actual baud rate selected, which will be as close as + // possible to that requested + uart_set_baudrate(UART_ID, BAUD_RATE); + + // Set UART flow control CTS/RTS, we don't want these, so turn them off + uart_set_hw_flow(UART_ID, false, false); + + // Set our data format + uart_set_format(UART_ID, DATA_BITS, STOP_BITS, PARITY); + + // Turn off FIFO's - we want to do this character by character + uart_set_fifo_enabled(UART_ID, false); + + // Set up a RX interrupt + // We need to set up the handler first + // Select correct interrupt for the UART we are using + int UART_IRQ = UART_ID == uart0 ? UART0_IRQ : UART1_IRQ; + + // And set up and enable the interrupt handlers + irq_set_exclusive_handler(UART_IRQ, pico_uart_isr); + irq_set_enabled(UART_IRQ, true); + + // Now enable the UART to send interrupts - RX only + uart_set_irq_enables(UART_ID, true, false); + + uart0_dev.parent.ops = &_uart_ops; + uart0_dev.parent.config = config; + + ret = rt_hw_serial_register(&uart0_dev.parent, + "uart0", + RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, + &uart0_dev); + + return ret; +} +// INIT_DEVICE_EXPORT(rt_hw_uart_init); diff --git a/bsp/raspberry-pico/drivers/drv_uart.h b/bsp/raspberry-pico/drivers/drv_uart.h new file mode 100644 index 0000000000..73aa036833 --- /dev/null +++ b/bsp/raspberry-pico/drivers/drv_uart.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2009-01-05 Bernard the first version + */ + +#ifndef __USART_H__ +#define __USART_H__ + +#include +#include + +int rt_hw_uart_init(void); + +#endif diff --git a/bsp/raspberry-pico/libraries/SConscript b/bsp/raspberry-pico/libraries/SConscript new file mode 100644 index 0000000000..055c58dc59 --- /dev/null +++ b/bsp/raspberry-pico/libraries/SConscript @@ -0,0 +1,139 @@ +import rtconfig +Import('RTT_ROOT') +from building import * + +# get current directory +cwd = GetCurrentDir() + +# The set of source files associated with this SConscript file. +src = Split(""" +pico-sdk/src/rp2_common/pico_stdlib/stdlib.c +pico-sdk/src/rp2_common/hardware_gpio/gpio.c +pico-sdk/src/rp2_common/hardware_claim/claim.c +pico-sdk/src/rp2_common/hardware_sync/sync.c +pico-sdk/src/rp2_common/pico_platform/platform.c +pico-sdk/src/rp2_common/hardware_uart/uart.c +pico-sdk/src/common/pico_time/time.c +pico-sdk/src/common/pico_time/timeout_helper.c +pico-sdk/src/rp2_common/hardware_timer/timer.c +pico-sdk/src/common/pico_sync/sem.c +pico-sdk/src/common/pico_sync/lock_core.c +pico-sdk/src/common/pico_sync/mutex.c +pico-sdk/src/common/pico_sync/critical_section.c +pico-sdk/src/common/pico_util/datetime.c +pico-sdk/src/common/pico_util/pheap.c +pico-sdk/src/common/pico_util/queue.c +pico-sdk/src/rp2_common/pico_runtime/runtime.c +pico-sdk/src/rp2_common/hardware_clocks/clocks.c +pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c +pico-sdk/src/rp2_common/hardware_xosc/xosc.c +pico-sdk/src/rp2_common/hardware_pll/pll.c +pico-sdk/src/rp2_common/hardware_vreg/vreg.c +pico-sdk/src/rp2_common/hardware_irq/irq.c +pico-sdk/src/rp2_common/pico_printf/printf.c +pico-sdk/src/rp2_common/pico_bootrom/bootrom.c +pico-sdk/src/rp2_common/pico_double/double_init_rom.c +pico-sdk/src/rp2_common/pico_double/double_math.c +pico-sdk/src/rp2_common/pico_float/float_aeabi.S +pico-sdk/src/rp2_common/pico_float/float_init_rom.c +pico-sdk/src/rp2_common/pico_float/float_math.c +pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c +pico-sdk/src/rp2_common/pico_standard_link/binary_info.c +pico-sdk/src/rp2_common/pico_stdio/stdio.c +pico-sdk/src/rp2_common/pico_stdio_uart/stdio_uart.c +pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp +pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S +pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S +pico-sdk/src/rp2_common/pico_divider/divider.S +pico-sdk/src/rp2_common/pico_double/double_aeabi.S +pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S +pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S +pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S +pico-sdk/src/rp2_common/hardware_divider/divider.S +pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S +pico-sdk/src/rp2_common/pico_standard_link/crt0.S +generated/bs2_default_padded_checksummed.S +""") + +# # starupt scripts for STM32F2xx +# startup_scripts = 'startup_stm32f2xx.s' + +# # add for startup script +# if rtconfig.CROSS_TOOL == 'gcc': +# src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F2xx/startup/gcc_ride7/' + startup_scripts] +# elif rtconfig.CROSS_TOOL == 'keil': +# src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F2xx/startup/arm/' + startup_scripts] +# elif rtconfig.CROSS_TOOL == 'iar': +# src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F2xx/startup/iar/' + startup_scripts] + +# /home/henson/Documents/rasp-pico/pico/pico-examples/build/generated/pico_base + +path = [ + cwd + '/pico-sdk/src/common/pico_stdlib/include', + cwd + '/pico-sdk/src/rp2_common/hardware_gpio/include', + cwd + '/pico-sdk/src/common/pico_base/include', + cwd + '/pico-sdk/src/boards/include', + cwd + '/pico-sdk/src/rp2_common/pico_platform/include', + cwd + '/pico-sdk/src/rp2040/hardware_regs/include', + cwd + '/pico-sdk/src/rp2_common/hardware_base/include', + cwd + '/pico-sdk/src/rp2040/hardware_structs/include', + cwd + '/pico-sdk/src/rp2_common/hardware_claim/include', + cwd + '/pico-sdk/src/rp2_common/hardware_sync/include', + cwd + '/pico-sdk/src/rp2_common/hardware_uart/include', + cwd + '/pico-sdk/src/rp2_common/hardware_divider/include', + cwd + '/pico-sdk/src/common/pico_time/include', + cwd + '/pico-sdk/src/rp2_common/hardware_timer/include', + cwd + '/pico-sdk/src/common/pico_sync/include', + cwd + '/pico-sdk/src/common/pico_util/include', + cwd + '/pico-sdk/src/rp2_common/pico_runtime/include', + cwd + '/pico-sdk/src/rp2_common/hardware_clocks/include', + cwd + '/pico-sdk/src/rp2_common/hardware_resets/include', + cwd + '/pico-sdk/src/rp2_common/hardware_watchdog/include', + cwd + '/pico-sdk/src/rp2_common/hardware_xosc/include', + cwd + '/pico-sdk/src/rp2_common/hardware_pll/include', + cwd + '/pico-sdk/src/rp2_common/hardware_vreg/include', + cwd + '/pico-sdk/src/rp2_common/hardware_irq/include', + cwd + '/pico-sdk/src/rp2_common/pico_printf/include', + cwd + '/pico-sdk/src/rp2_common/pico_bootrom/include', + cwd + '/pico-sdk/src/common/pico_bit_ops/include', + cwd + '/pico-sdk/src/common/pico_divider/include', + cwd + '/pico-sdk/src/rp2_common/pico_double/include', + cwd + '/pico-sdk/src/rp2_common/pico_int64_ops/include', + cwd + '/pico-sdk/src/rp2_common/pico_float/include', + cwd + '/pico-sdk/src/common/pico_binary_info/include', + cwd + '/pico-sdk/src/rp2_common/pico_stdio/include', + cwd + '/pico-sdk/src/rp2_common/pico_stdio_uart/include', + cwd + '/generated/pico_base' + ] + +# path += [cwd + '/CMSIS/CM3/CoreSupport', +# cwd + '/CMSIS/Include'] + +# if GetDepend('RT_USING_LWIP') == True: +# src = src + ['STM32F2x7_ETH_Driver/src/stm32f2x7_eth.c'] +# path = path + [cwd + '/STM32F2x7_ETH_Driver/inc'] + + +CPPDEFINES = [ + 'PICO_NO_BINARY_INFO', + 'PICO_NO_PROGRAM_INFO', + 'PICO_BIT_OPS_PICO=1', + 'PICO_BUILD=1', + # 'PICO_CMAKE_BUILD_TYPE=\\"Release\\"', + 'PICO_COPY_TO_RAM=0', + 'PICO_CXX_ENABLE_EXCEPTIONS=0', + 'PICO_DIVIDER_HARDWARE=1', + 'PICO_DOUBLE_PICO=1', + 'PICO_FLOAT_PICO=1', + 'PICO_INT64_OPS_PICO=1', + 'PICO_MEM_OPS_PICO=1', + 'PICO_NO_FLASH=0', + 'PICO_NO_HARDWARE=0', + 'PICO_ON_DEVICE=1', + 'PICO_PRINTF_PICO=1', + 'PICO_STDIO_UART=1', + 'PICO_USE_BLOCKED_RAM=0' +] +group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) + +Return('group') diff --git a/bsp/raspberry-pico/libraries/generated/bs2_default_padded_checksummed.S b/bsp/raspberry-pico/libraries/generated/bs2_default_padded_checksummed.S new file mode 100644 index 0000000000..e5bcc340fa --- /dev/null +++ b/bsp/raspberry-pico/libraries/generated/bs2_default_padded_checksummed.S @@ -0,0 +1,20 @@ +// Padded and checksummed version of: /home/henson/Documents/rasp-pico/pico/pico-examples/build/pico_sdk/src/rp2_common/boot_stage2/bs2_default.bin + +.section .boot2, "a" + +.byte 0x00, 0xb5, 0x2f, 0x4b, 0x21, 0x20, 0x58, 0x60, 0x98, 0x68, 0x02, 0x21, 0x88, 0x43, 0x98, 0x60 +.byte 0xd8, 0x60, 0x18, 0x61, 0x58, 0x61, 0x2b, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x02, 0x21, 0x59, 0x61 +.byte 0x01, 0x21, 0xf0, 0x22, 0x99, 0x50, 0x28, 0x49, 0x19, 0x60, 0x01, 0x21, 0x99, 0x60, 0x35, 0x20 +.byte 0x00, 0xf0, 0x3e, 0xf8, 0x02, 0x22, 0x90, 0x42, 0x14, 0xd0, 0x06, 0x21, 0x19, 0x66, 0x00, 0xf0 +.byte 0x2e, 0xf8, 0x19, 0x6e, 0x01, 0x21, 0x19, 0x66, 0x00, 0x20, 0x18, 0x66, 0x1a, 0x66, 0x00, 0xf0 +.byte 0x26, 0xf8, 0x19, 0x6e, 0x19, 0x6e, 0x19, 0x6e, 0x05, 0x20, 0x00, 0xf0, 0x29, 0xf8, 0x01, 0x21 +.byte 0x08, 0x42, 0xf9, 0xd1, 0x00, 0x21, 0x99, 0x60, 0x18, 0x49, 0x19, 0x60, 0x00, 0x21, 0x59, 0x60 +.byte 0x17, 0x49, 0x18, 0x48, 0x01, 0x60, 0x01, 0x21, 0x99, 0x60, 0xeb, 0x21, 0x19, 0x66, 0xa0, 0x21 +.byte 0x19, 0x66, 0x00, 0xf0, 0x0c, 0xf8, 0x00, 0x21, 0x99, 0x60, 0x13, 0x49, 0x11, 0x48, 0x01, 0x60 +.byte 0x01, 0x21, 0x99, 0x60, 0x01, 0xbc, 0x00, 0x28, 0x00, 0xd1, 0x10, 0x48, 0x00, 0x47, 0x03, 0xb5 +.byte 0x99, 0x6a, 0x04, 0x20, 0x01, 0x42, 0xfb, 0xd0, 0x01, 0x20, 0x01, 0x42, 0xf8, 0xd1, 0x03, 0xbd +.byte 0x02, 0xb5, 0x18, 0x66, 0x18, 0x66, 0xff, 0xf7, 0xf2, 0xff, 0x18, 0x6e, 0x18, 0x6e, 0x02, 0xbd +.byte 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x07, 0x00, 0x00, 0x03, 0x5f, 0x00 +.byte 0x21, 0x22, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x18, 0x22, 0x20, 0x00, 0xa0, 0x01, 0x01, 0x00, 0x10 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x27, 0x2a, 0x60 diff --git a/bsp/raspberry-pico/libraries/generated/elf2uf2 b/bsp/raspberry-pico/libraries/generated/elf2uf2 new file mode 100644 index 0000000000000000000000000000000000000000..55daaadbf88e0920430e255c0a31d23731b6d741 GIT binary patch literal 94040 zcmeFaeSB5L@jrg@1Q95S2pXTSiVE_Sgr^{&32@;C1I7f9qIk)}4Fp3HlN*Q%iiY&V zZHQ6}N);6?T2v}gL8J8{Jk(G{jh5QfQjHe%Qm96XHnmEA@7bL_XV1w!fqp*i_x1au zN6DO>nVp@Tot>TCbMC#jd$XoSM@1RxiZQM*sI=)ciAiU|+=UiTx{+r5z(_Yd#`#7M z&|~pW@i}2@G>EtqjF&|t29W9{(M<$+jzk*@s@4foJ-4g<2a=+oktoYlFOF`x?1Z(8 zB%gwcZnn2l(hUbZbArSxsMjOgG`%e8P5bO{F86z{Pzp5Gi_As!TDe{;*HbW&?Wv%$ zC)tGlrLkNm^ngZ}NBlJmXFa8l6HZ}%1*r|Xaz70g{%_jL=6YLKNjXlqv6sXvsM@;* z^~f$Kd#Pd0;r86dA)W1|AdNR&BT9<%$BY_LQaG%nxU{NzSasT%VPi%OuPhs$D(Iva zwL!x-ZRTtP!_q`J7AMA{KbMLA_}EL6azDLgRKBP8?s1QAzPF|PtV|_?+9V#js6G#| zDAWA~_(wdV|50}kKALbB;@`W0x0j4NTBoK7(QH=|1oX3EWT6ru68=*c{BajNX&p(< zhfp{Y{;&&vw+nuUi~M(8_!C|5U%TLky5O^2@SnQipLN0i!UaFZWn9j1!Kb>&In{;# zmoEInUHH>o_|I^`pO10z;Ggrl%Z2|t7yLvQeQ0iZoWfBa?}G2;BIkVIFN`232KZBr zvkgy+B&v95VBS{-3k!w}p}9WB@cS1oDJ%6?2JA(tH{2p!0;1woIfYuAFK!j z{Kch}0koA@TIjC`Pm6&^KK4o8Wb8lKn zu7>~96$NgP1w9$?x7%*Sk``-R3p&*a4!#FdBgV+r_#b3>ARGOQi;;1~8Kul$byo2y zq(L?FtGq|eua&eY;@Zo3jlz!@B=Ic{d^+>TJLah>x4t9m(b{-{ycK`jH2hf_KCI!- z)$r{a{yYueq2Vd!sVkB7A={m)kbo+lP+oAMhBsJFPvEGIy5coFn@o@rHN46xh>)b= zRc=IhkA|nV)ip@N>-kf%h9{lWm8Rj<*bpsU!()KW%ctQvbrZB~4G)Jiueln&kBK#m z1sa}HctKsH;rnX*+9jH8_wzX_0VzCrwph;sDM$DN&>Yeks?+R;Pr znq>-PM-S~Z%M`$l9(u+sQ{Xy!=n=C_0qf|YpO|F|R7VfpVU{UC9X)iDS*E~r^iZBz zrhs(x&^2b60@2Y!8D^OR(9uIFW|;!d(L)!QWePY)51ne3DbO4}6lInZMER@Zs=pLi z(0{W`0R{ax%M?h^f3r*h1pPP56gbd-vrGX4{Wr@LDA0eiOaTJ@H_H?l(0{W`3lREm zmTAF5|5X{I_t#fw^rjeM{7{Z_l)uMugHHe2QU0r={Hde-Cr9~rj`CZM@~<7`R~+RX zj`A-Z<;NW52OZ`0j&i-DTD9?73XE@4UM|q;7JX$ZO{53Q5 z?hU@sC%&44?b)-k>f@d-#8j>S!Ic6`JP3d69B>w@99!$FpO}FgUwz!=1jcm)2ViP{ z^D8;EPw8w+IDaL)!`RIb{HF^3(Y*)^KJE*(`*wbDrEh0Pj4$eS-@C_y{UP8j77*Xr zRwVpH)u;Kta^jyrHmZiq_SHK6fIg=)(MsILZC)fDt34EC-}7(8Qb z!rC?^SHTo6z-CV zSno{)LmG;{`r2#)q1tp&T2I`*x>~8syS~t_SCQkQ#>DSlLJxbQhjq0=;ktTipwKt6 zk7zI$7rq6=-|RNKS3i2)V#9dtJ8(6kQ6n6KyZJi(E~5X_r2iSySfkg)6{AUCXy;2~ zQTtU2y-;HX>V%unQX}f=>@`QwrxhK(P*uCHZgz*S&fD$_z55bXdvz4m4K;@cp`Nd% zBPwBi6Rdf*uYPoqUBv}Z;m{D&q3U(U#M^ObEcoUUABfzQG~$b4zJ%w~drXL`f*YVt zdVk0lRYu#Z#8H(NQUq+M6054-3!QN2Sp3v;3(2SR-gqpHKGa6QV8#TxDcBC|+fxW(vHw+l2f%zR44wPF} z`CKdl}iVJGxD zJo%rcCVS zrKaMSkZ6rd#_Wt)xd=DZnlJPU&0Ak+hnVo8^&$#{>S^BVgVaicB!WW13+b1^r98oN z(fAH(+?of;Xgsw0&>8R(i+gBMEyn0Lav}7lfyT{4!)r<#n()G23~U3aO}^0E#Be1s zF!O14<|zp;z)h4ULs2A;XhM>PDyX`T*h9@=k^S1475d~=4~XH*VT8SR@RXpCDgW4fTUu2 zf9m+hB3^nolX5>pf<+`>eKr;sz?!B+7W6Slbw;Rm5#-mrLVt~fRfCkMY~-nsSl-81 zzhZNpSPh^gja4RGNVpBjzY|^>sx1*B=&up%UH2f}9Lj~HI`3x8UJtzW$`|Cs@e180 z_E`w?4Cw&dDAizkpHM9=J#|8%Q0-jY%TC3HYH3ZY6DaCn4dPy%U`}|xNiI>1wACLX zR;v((Tnw%hAt&xJB%ajSpb$ju*qQ6ZD#eyL4_PH9|7tY98W7Hnf9PzgFnw*c)J&jm zl%t_q6eQW=BcNb@-r}p56;S`EWZnRI8|t!S1xSyNY8fZ=PPnHj;rW)j`f{NnDH^p? zvc!(tnQ$+NP2+Y2Psbc+4cO+uP}osxWf59AL_<(lFM7LP2;4y?gd2(J@C?#&VI$E& z5!p&mt4^3FiibgHpjm#1pvr+cRE8-CrUyYa}QHOTH0W)3})x;cW4j;oFBBSQJ zsH!;1kBksv`utYJrgLO$ntXTyWeC2|Ze@*&P{9W_jL_b%WqKs3m~zeG$1LiTpoRzF zkME8>Gy|^7xISaPmN4+@gA4#QXE%msY}W%CR-HRmY^UkI?0jUDqmfa*v=b!^=*=>_ zYy=38J|-*+3D)WqCmqsUoo2`~;*f21x(jGpo!%BwY0+v9e<)e8deG_=J5jWMhA0US zq$Mk=Wg<BAhIuJ+nx5h1 z-(Y3VmF>l2p^*)TXy_Y#Sf{8qB~>(L;WMbWWphNLG@4*HmV*@UTm;#~Nfxy3BdlCK`zUJC&f}}!o?Of}2fx1POk6UucYazAf6{>6`)NVkH zy4pq*c81TX>4-+3Rtu3>GWt9t?0?b9S411ZzHr6<`S6*)eFY!Ex-{`DDt(HQVxgob z4%I}`bD%+}FWY_H7y5npTQXdIz35;4dO@h)Ve4LVIP>qSZ>%IOXr%3-GBTZIodGyX zfc+^ac{0zI5N(9jk&|2r{^nZB_{lCx#Tzvd?ILrmO#=(C0>D5Wz+z$F8x^V@3W_w( zIB_2wR=1vvg&h$7aymB4-uij6^_}pC=Gr!}&7PXttGV_d?ykLN{zJ{RVcZ!WqPEi= z_%xLsMB|~_4iK7azr)`-oplGBy$6!Zp6O+B)uw|0j}QO~50>3XwqtM7JGY+uD0rk7 zmw`^f>NKf~YLDSB{N&)%VjwQAs~24BN%=ZK z6j|=d1uDzE@e5&RvI){4&r1i;vYEv_L`0-;M6555M`s0JeYS^v|3zXa2mXOrn#d)T zhr~+{Ih^gQTc0Qd$jWN>CpNIC`QtCCWwrY|C0qg54edUBCK^-SznvEEeOO$@+66*3 z$wS>%O5`l>djM>21@S4@45GQQJ^Wo62QO&J69zctuz3JE`-wtk7p! zp)a#SA7_OQo2tD9BZtq@RQp13511iUds>Xa#A`^kXa9l)NXsHczsU$Zq3(q0=8Th8 zdBma?Qpb=3VdBc8GMrpBK_Z?6_(VpTaYKgRnu4#=NWDe_5Iz-g!6IOg;Yf7YOZ5->` z#u3?uUP&3NPAX)K+f~^EsH)S-luR*JgWEu6ge zfh^2ja5sn3>0a!^MDc7GsBVdTVMLv*+&r`EWkeb8Acud7}?ewsiO|%S}v#H{9 zF`Lq`km)v0CY5#V;rR2?}E+scM5BfX(62qAJb4HY#2sig@&}8+$K=k0gENRx_E_)2{uE=2RTOCuD@WX?I$|wqoWAwFuPZ?Xp?Ny96k;A zjyS_1LsXz6*qxumA`A&|OP7K28{E&nvrJC)Dt^NK|w98rof1yUrG7 zs|VYvrm9rMwwbEcqZ$;vOH@HmX3)`PD|cawsDX_jtr2`Aj{IRh%-#qo4OH_f(Krro zsg@Xl_k~jiP8d4QosE@+`5Q3l%tMpHV9xTJK z>U^4le8v(N{_@YfpjozpsXXKsx|zfbv`xDYDbI~C?H+#h+_9=1s)L?t)jI}qHu%|htpcxzmE6rO;|M?8-Vb3h@+#4 zj}cJA&!Zq8(xnJCSh1JTYd4Ch-5mavaFh?}HX0P+9QIgTrC7feK8|X2$d&4*!-fR= z`3B=b_Zt*!cm5;V_mXBq;NO=_c=(4jOXNg}N{X4x@3j(k2yafO$L$nGn@Fkagnp*F zA_EHvb=OHjg6nsJORP_#SKm{4oVO+6z9zCot0vGOFG1eM@_z=G6+>M`iyJEcfm;1q z%A=J;$XhR#d~yi%SS-VUa8=Qx9}`hf{x5dvz~+plV3{KaMHBHbUkiC?lsKZ;*%pmc zizq?ErsmL@7%5qhnU3i4z36hVSfT$2vDizh;`R2?e+K=;CKyy<#)CK;%?$lo6<45` z6*`&~`hsloE_m^D&?l{506~X-ChZDEDG)Yg)p=AqQ`lg->Y4R@Vufh3oJx^1Ng=lK z2%#%Azc;IH0s0QD>gEcVRhO)|_QstqQBJP zi4Q0|VoMx~Mx_py-bmiZFxL7$0d3m$yw0++mZ=w39l7}b8IlmR%_yl>5?j`8t+2dT zcnfh$PSP-$Z$E_4B-Opi7uD+6HIS4vN-Su(6dO7bpeX$mS)<5CLs$#(NDUSMTXXnj zN&z9+%GyP4Df7i^V0c&zjASv?fxjT%vuPoxBUr?mB4jQSGUfh&2B>N;YD0gD zy545Ll+VLV11TN~Z^G1s)-x~*#1hdWJJI0_Vc@&Y25ZP5)g!Vkk{W`uiFap617VCE zkfYakpLfLRXhQ3Jr0^Di))k)Wn*1&{ zqu$A${j%GhflHmZ&|FpK5N9y@;rexyjm)6xP!cbyp!(sH>os=@6s?;2 zhIZ27@iZBQ?)$|Wpo>XFo$$opnTNjNn{dx36iaa%{+R02>{);{(lNN*+F5vUmuQ6^ zY4OYQH+4=VU$+SR@P364FN{n8e;Xco)DY4~sy`jz65N z>i$^NrHl`R=5Q6B-Oz!)D5^Aso~}|v?s5wCFZPjol!mTj)T^4hgk0$id&N^iGo}5x zD8hkeW88=XX*1Mn4nHpl6lB?nM09~Y>@QCI0%#n%T!KNTac!llX?VUX15p#7eO!rG zO^_G%Rl+VnEpc|-C5C_Xo)~Z2+H}$<79Wz%5l%ohLg>kcBe#`f6J*;WurmvBmRW1D zu+*$*GlEw^HQ`Q$!nFFb-%QH~Q?HkXM+~-FLLe8Z9;u>DJT;~M{i098L>B*`J9!7X25@W zLXua?rDzjsI(ALu)rbm%e{p}hjvXyzctmNP0YBYKxKEeyn~pt_%|3~0#ijQ{ zXso6Rb!_vQwK+LG?BjHaiypi7MbtyAo5=2jb;K*v{YRNf)xwl28qwn)6K#(SXUB-p+!T8(pf-WH9Y zh%~Cln`&a)w?z*T-t9>bSxUrtd;&+rc_h2SU_mq(=~DtUu}wy=V%jJlI!?2cTm6R4cpK0v~EUw3S};shhn)Ruw_$ zG0+dK6L_IgBkA!6^VAG_h>>mkl9WhT)nA@SgG=l}%|3reiz=cAcN;GzbC>^21mV%b zHv2^pZ(GsGsLk2$L}g$|$9Sa+zlULn^h%g#l6ml^nP;ldELemFn@IO!Vp1<454Eg< z-Iv`mH_{v;5204?p?=lR#yj9M@Q;)e)*G*DRx0{#v))3;I5bD#E$clXUI1~7;=_31 zkPH~@V!&o{8qI*_@IEbG@pl{E$3->n#9PAEpa`4pokJ97h3R?9-7M?#tz?RvC*h~_)<+gMB7Y0L90zO z7CEi?!L2cPSqO7=k$$Y&&DIsY8cxze^lri5dDXo_$hYSYAMVz392tAkG5hyo_QR>* z7WkZ=GXm7CXfmoM!+hXs4o{=UJL9~KK|F{P`*dN{wRn+L#-#?qgg_)7Vu(4l=1A9x zz1sVckXY}-$LQ!DZP!&bpn-Y2XfV+jWt(_cR5qMF2rLcgUK@80@3)dyw?PXso%zng zKdE}no^<;ukNX-uOw113vV8+kSWwLvDWbN>15{c=2XW4PRKs-HvC@*(97cwL1qi;0 z-LFU|#nih@wq}Zhs`?0Eml>wd$D{j{uk=@+?K=(qw3cJX)72A3bqZSb16GbypQwd) z?PC5>v;&PM6Ab~~rpMzR(F6Bjd+txv3B1rEKf1SxhvQK)qx?7rs$i1=QY*9?D-owR)HeW7ald_f~8q9H-&gcChTSTR~S1+L3U z^bNrgYs4qnbQ&w`+-KFn*d%gwOlL|oX#^vTi}>sqEQgE}{50|8`+f-?6)xfLyI08S z_6Kq*_=%W<4|j-91^)}tEkdwER7kSSBLbw@^Vv+zflpxJic z5V%|#&(SN+G%iJ=P8WotL#XZcC{WTwn=1-GPxH5 zU>iQdg%Hqz*In$xWOLC^u#u5pCxa@VqoBoS>+Qs3OlsSzkLT-+FhUFZ@LD=L5I*{* zuu3Df+#j9OUPJpE6p^o??Ir4aqPR!a#`6@~wTkG62Aab;P+>;M{`%K#z*!Hy7wi!I zYJmXM5YF`+y(#I#+mSNs+8thwdro}rpj&z1lQBQz2Aj=16f*S$M!t!QaFd9D3o8og z|HLaUXbek~J-plpMKo)PxJToK^ZG8WbYQiDJX-omkevJ?+Z5|?AN0_~+7?^2huHuD zYjst%HyWnk+!|4_0kXk{)CLcSQEq(QyN&jZ4Ri)YAA)ZnB;0m`yl)OaE}os!^1qgy z@pJ5JR(rRtT(Qj%50_D;Iea$GCGjC=A)q<@ckzm)x8d++co&_XG_jq2OP_wGinG8f z6!{Zqwd?Q-DZDv+Sj2asHyXoN7YP-1 zO1)J^In-V1Yjn`YXFpv|BlNS3r$s~1Ml7B7E%g?hI>M3YG{T(U+L-H!pfeld8F`6N z!#VbeI@UJ!wkRMEc49~gm$&}No9%uEQ$0)PV|IU2CHJ=YiBk*ec8%FEWV_|xjtEDY zIX)ZoDUG}NT<$h;8YSNHeE=d=u(PaaTbVI~AY!_xLqpsyzMVn%=R4tAs&DB;tq-C} z>`Vp&I3|=DK%v)PL-;hpSL3AsU)^cgCiFQmcGW;b@7Zy@2j zSIDNKd!m?0#lgGjfRhd-#d}k5Z<;WT#Qs_XwM(1S=J2`ps(nQfaZDVmnel7{p)ufi zCsKaqSk(QPOft^fR?$yMdx9}b&G$g=1Lkln=xvBrv@taw5Fa8f=wqGkV;3e3dmkWe zlY|HqzxyK3Ll4Tsi;2+XxpJat zt!u`76Sy_Mg`;^)&Je8%wr$>=6L7me%bMn>sM5vAFS3Z;t3GZHon#)d;OVXpchN!n z?$0)KE}M@7_<~PuSk$DimlOU|@h)383}=zS>+B3C)9kUx&5ALSP5+oqBxwW&V`SYw zJ|Ywq8NtO+MeB)`%-V8yo6ljyPe$2kc4bvSw}o7%DCw8z3QdXe-nJlKEtDNQ0%>Y{ zPY-r}9~PJzZ@3T6|2p~{-bb7fau_Q{C@-}Sw{&xE!&79&|CANxz=apn!-oA?i6!Ght09> zGMDAN8HE1Xr+hk$iAZjLlaS(Cv$q8c6uz&)DdVNTH3Z(&qRs65oLIWm3B8oPnLQn}{v8Tb^RJltrZ<>VXe zxnwxST88g76h(}YjNsO@*;cee3$lDL+pWG4qf~(~NFw>OJjE4@*>*9r8S9?!K(R5- zF_kXfHIh#TqkUK%`gA$o8{MUbZTdV;nnMF(vn(y2=9pSkfar#P1n4c5BbOr-bHLc zzEWy$;5RQtZonErr;GEXnu-S&`ugeHOoCvFoo)EI3%->JWt+tvaY?2G&(OEZsJB{a zp+Z{lPWYDsOQ*~jOW~Z~0CQq#pHV$+P2c`=Q>PxJ(-fOd>MMcfVjvpf3JsVXTOxg0 zqg8xW2T0A~&0_!I-9-0K(tU`u#IzDxR^YA4tokJ_u)_x8xLJ7D}>q69G)XB+G;+}LzeO^^{8ggT=9`YYq-$^ z%C~R?XN{YQ>JnUO1o<=7=RpNT7ps;n5Yd3(Q*2nZ96Zjk6nw8g>dY{bp%>IQzxP^v zy|C%6A_nnE`iJ!1P1lq3Y<`EtF}=2;CCwWm_0*{$9H}{cFSVli$GS(zKM-!6Ip5i~ z1|mH>kz2G@k~$YswdW_9qATWU!{wrg9UFNGeE}}**2WUD%R>|DhuQ}St!xjU9EqpP zu7W7rG|i zS2r~g#Ux)SBN62!U(J$^C|XZEhsk7Nhl@+=Xy-k`@m0=@FLl>^JsC8ijMD+@XMY4` z+DJU7uW2yaTADxlRGYSmoUH52;P^MxJgmgbbAETq&xy#4(@3~BBx;5+8C2(hnKMM| zPZ#5NUDoAi2=GmaKjkuMFQr#|e4zr))*x|eqG zH)Jdk95Te`3lE|1P2T{e?&BHSny)iX3UAH%1!4!B#rq4q) zM%YH2)VDXOkPtB?+V=<2&7KlH{|xEgP0pp%Wz+rGK7%7rm67RnobG(CLDJnchWVPq z8^I$rZlhv76~%k6aClp0=+Gnipl!``P_K7trmWly0$QN1Hmfhb6Zd#e37xS=C={)D zsU+Awi%&BQTt&kZ&R<0WtlxXdxHhYP;&Zd`1=VvhL+@wI&J2B>F)JhV-E3d|u&qGn zW)1!xJ{TW<=ROS2&hKM_=coLUe?LTijl`7D=NX;-Kl0V=j`EHBQ`KK!kofE7(-%?G z*9Pt`vKl1=??&SUNhWbp`M=kHE%09p{MQ2iwZMNZ@Lvo3zq0`S{wrTo@#DFHLQk;F zLqB=zDK5p&>w1cSGc1buO#X0wqPMRYj?uLBo~~_Dql>@MBRz z%oUyqToGUXE-}4~*`@T`$!4R(y9liZDvX(BK~G+(N7V*rMWCQ;VJUuhw@_f0;@60a z%SxpJIf0w1iYo%1k*S{i;-CjVQ5-A@48!jb7fTsNX6aJ=X0NCTo}#jfC3!*BMn=vI zPoO$bP!$wElR*e;RWU8Mt)Th{oJqfZst6%lurr_7pjyM;pd=(#FFf}C%fUFYRS4vyrtx;E{B1PR`XiXslAYsZo$uN=@Qdzwr~?x*vE- z@+uYvDxf7aUy@htuY~Ii8f-`}x%_hf4E+4L_*ruPMRa^y|JgC)H$ZL<_VvNK&dzF&pDAQ@&4suT111A*0L%t#2P_Bl;gSAYz}0{afLj4u0Cxel15W)V>f^(gcLF8@J_?u( z*ajE`?1Ohu)&Z6RHUd5mcmVL%fb?0^{eb7-lcN)!g?$0%0Tu#Q1FizRA8<2ZBj6su z_W=(Aeg_zfuZJ0g*XjlWP6wOYD!_Gsn*pB$+ymGSco6VuJYbH;m-Dm$ z4g&lH&UJ+dl_#?orfR6+21MGvBQjY=N0GNc&wLJ=$2Dlw?F5oAC)quV6 zPVol7RKP~Sxqz*Jw*z(n-UFC~--&%0Fb(h+;Prr~_fjli$@hh0T%;i z0j>lr0elv44d4;Lt$@b?_W=%l1@!^10PJ%X{2Xv7;O&4}fcpST0Auk%r8R&P0Jj3R z0qzGJ`Woy8xEwI)Z14l70e%ZO7jQZrjxGmW3Ahn(BjC$`M*t51_T3480UQW;&N=8W z-~_-Y0j~#a0$dK5vu8-2yhFa5AgSZ zivZL2W1az)0&W5PIpAKvoq%D$cEI?7@T=dUKHwNYAK((eMSu?jt_Iu(xCO8ca4+CD zfMLMx@55g&h93bA1?=^E*d6d3z!JczfNKCN0Jj2Ww_=_GZUXE8d>%0A637Eg16=n3 z><0KG;BvsDfExkN`y=cQcmv=8z?FdC0p1IE&ZUO&0pJ9{{s-W1fcbzc0dxKYy8&(i z+za>-U>Gp%L-czP<^|v&z()bI0QUiw0DcR&25{s@&>Jula3A0Tz$1YF1K0<-+5Lb+ z0p9`40&E8?0X(%0^#P{>ZUy`q;6A{ufJXpd1?+Pf#vO1d;3*%YK42kW3E)z|HGm<& zt$L@+syE;B3IeVOZ}0lL21@%m$464D|so z2V4s{1F!*b8DI$2HU)kJI1unFz$t(+f5m(S900fqupDqR;Ew?J z06qkG5U?FEHWmH;0)7WL2hayt3b+VxCE#knZveLfHhhVG1GWGj18fKEKN7$G(~f=v zE(e?i_#t35U_0Ojz^lH(x(HYe*b2B2umkWJz@$;I17I3p(ow`Yz$t*$fCYdX05<_P z0=^2^3iu&l2VmmgP=7S?AHX!gF@SRcX94a5+ymHu4CbLBuc%vcjHv3wsI&X@j9(ii z@mMa5v{jv*7!EYtGm!v7i2?D(rj-~k@ELs*r}j;np3r+){7U1>vo61E_l3C4Qk)SA4O08L5~?w2t}fA#lIrZPXjdR z(=GZwpyz>(X=~9JSo9-67lMAJPG4%#`#_%*^!Fp39{s*xp!SD?-VVA)r(bK;&pH9U z1oVMuALh68E3xXY0sV5&F>Ne*z@l#j-PcY1eW0&Z%SbxU@Z@T8s(EV;rk&Q|_}P%M0B{Qq=z zein;$>pMGNq(+sT=mxWX zE9gf+FSgO8Gm!ia&~HFrkWyIn=U9D7is_!7b^`j`6VR(qK;LizdSf?qnxiy_XQTfk z$<{lukSZJbYGPt8wCrqvzThXFoln{9{HSSX59p_NW2f|P=mVig66{R%pTm9ZOid4O zO-%G-mc3U)&ZFSF7JR0z(KF5Q+yeRspwG3@uQus>LGOpTk*?FxMg=%%yu+ZUf<92E zUuU%+ABPwT`T(7tWzh$LJ`{8}fAMugr#3wpFRFh#?qhS25UKGXJKQAO@qp$7-zxC= zh;O{cce|y_cC@txJdyfBGWLVM74)I{n4+DS^Te=7=YpOLdL$i5el_T$KzFnE2GB19-7Qu&f}Re#o4>SzUJbgN zzjT1!0D8LKKh0l~dSWdH-A(^A(D#GxrvF^f-vGTvmmhtLX}@aFhdf zKNL*FLvOV|4Ibf-FK9fPKTd(t?|~-){H7jLEjq1L0rW-ieY5^mcg57l zu8FJZ5i=_WqR1v&!Pov!XD7Ci7T;{EoqeEx(GC3w=tn@mK(9a7s^907?&}W)o$9-_ zp9T6~K)*znKi`sH0y^pMwtlVw{kv}T+Y0(|(B1634|M9k8~q6AAA*i;iDkb$OTRw7 z5GO%*^XZ|WQ~jxWeax9^i0}ZH1$ykmot>{b=)5cozb*&QL*Q{6gSDV<0==IuBh%8c z0rY!7ck5#d=y$r%Nym23ZvwqmmrpTxnbk)B-tcGeM4Ef#ujEHWFT#E7FFcklNe=rH zuttB_J8@HI=QYGvr}0JmL}TRBE78^!;F*GZ)Aw(+blC)YKIm@tXaao}=x#Y<8`mGK z%hz&ZqmNjAyONk>1ao1}j_=+&TKs>{E@(tiQyw}bAc|4NpBnO>iL(gWOF zjMsA1Ps4reRTvQ!=gO=$=p1@2cp~`}jn_uVxCiv9SPx@+Yci&-iK&T=8AGcg^@V=R zr{R&va)>?@^k+eL>q{2sn_cK0)Gq=3UeF)Hz1a`)nYC75=qx?)QFk5ajJ+S|k#wLo z=Zw>cUF{Q&B_(bs{# z5AphvPX^=}mDmw`T9 zudnUXW}TpZkn7_Z+wudM>WUb-4)hBl-)+ur2Ym?WGxYk=Q$z1Wz} zIR<*U3!Uc6KKRFK(0`8m*ni@%SuLFVNl2HCBOcfbJ%LGw8{n&BlvBkAB>JPOk<%3-n0q0FBEQ z(C2{eW`n(;mw-M`*Dv}Sp&-={gZ?<^ZgV~!hf1%3K1{D)X!UOp==(sAq@M?Me4xJ% zx@`;{epmvY=wEbpBK%n6=(XBd1A04TKvj#bH{`q!Yl`D-=ky|+eQ11Sb)(^#VZK-ekvK12>J2FILk z*{TV0zIoa`wzPqM#D(r5+d%Xupua-*S{u>ZEWaEGo?ExM+iD8vw{$}<1icz`EIU>k z+Wv4A=nFvyu;|*k?`9C@cSGL;dM@axdVOuZKL~mNbho+tGJK&N^eWVk&4s~~9irvo zEcw$QEY>^0gJH4g+S#)Y^zERJ*6G^W?jq3N06kKUO7d5O{wC;={LKUU7SLY-y;PSk zeO_eSV*Z1tXG7$E68#A1r-JU*MxP{{|AO9K8_D3A0Uo!0W`mv&y4$=e2YmtPk;Z~_ zTnqYQ(A{EW1L$)>AEDbpJL7HveIe*>xnn!%4WJL#>ub4N;+c4s0=irOl0pA1=x+VX z2K`;o-SjI5y$y6XKUxd=e$d@~xdHUgKp(5?udTx^pnu;@{dUk3o^fC267g=rIiS1g zmkfF$=#l2C2Rdbg-UIaR;zGMR^0ACq>-K;rdAoZX2SL9Cbf4aa zc77KNMP`CNRHqkc@gMYgpr`9}?Yv|P=(m9Gn*V~n9CSAutOC6P^vSw>^sx#mc!0Ye z<8?3Sm*YP6w^&8gc<{M7svCRpXDfJYdm_l7Zjy{J=pTUIj(f8{=+U3ZeiBcgbLIO@ zvz-iE&a#l*WEbhq&u1$tFC^jV;nfbMoC6a>8zbhj9@ z4s_DbEe3A~{Z`Q3*3$i;)AuL3(T{^t1Ll`$2E-ru}1})BAaD`uF$XeKF8sCTp%} z=j@|E-w(Q5%$o&z%nR=N1wp?8bc9(;{?&3Gl6}^JJ_d9*|J@Gy6wuxLYd`2$fnE+- z=3I|nXwJc7pg#cm0G+Nq>+284Sqr+`_>BVnPS7Li2hqkXu5W8!=4#>)i~3j%o&(*q zu>thAL3fMUji7%6y4x7Ff==&Jy2XeN(2s+js@p)znUfIA6C2&n0MkIHcQkElxOT=g z7xdwvyX8UEpicxnk`2i|8$iDb^f9`A+L=cq=y{-L>2&S+Wh?0QppVw+T0Y(Z`lFz` z&4Hwg3}Zd$ZuUz9{bA4}+0TPE=YswW=*#u?DUNHo+H&yp!h5W4ezpt1E3A3G9Q1xKb#~6w>Cy5)gxcQ-I=$Z;sXpatL5yJ$=x^da_BA~0RCz(Be4ixx zMXN1(2Quzg?zWD<81IBYmfKhi0{t(b!(>)F^DOy3(7))0z6kWApu5Ga)u8_abhmxW z7SJbkqyJveM}ZzGCVQZA81w?r7wY=Um?Yj{B7672f&b&+af>NKLEj9z+nmY*{YB8- z=2QvjTS0fT!5Yw?1Kn*5wu1gxH}rj=-`5TO2#2|R_8qh)Zc5+eANBC{O{?iS zt#5j1-?WUr$r*hIP3r5J)Hi8T-^5Ay(&R)`T@E>0AP14aygECh`aKa9ci$<-@u;RA zJ5DhgPQj7`?5WvtHSxwfQLn}w?rA(sud4xhN@d(F#!sVUq0bQPlXK(d8I`h34En$L z%i}VPc{=TZbEEo~0I__^_fb(BqvIZlHlB+{8D^rZ6ZC#VP|k^)A9ZW5+9=~bYKo~u zzc}iw@z{l|iMeuBTvSI4Hk55~7u?aq_-PLtAL;SHnNg?S9Tj(PRMd{BID8@YK1&qq z*?Vt`YE0y3)CG zi`fmhjJR5uE@C1u@r?iaxJ)lMA-vLsaTQl$PYHW)c`ws@ad}m=yy?wlv0mX`%wxt8 z;A%$rZHeS+#%jJ{vl!f*fg@~jEn>k6zknN7ddIV&PGNr4zKEm1DZYPl`V4k~I?m-b zuGqr*D?JcT*fN-AGun2T%5v_c>vQHW;0yCu$cmB`S;FqvUG!)%5N7?v|!$#5;hO$-|tHZg2rC|f)Ezws@0-f5F3U+x(+JHM(l zSmhZveB|)tVJTy)L^0*I)a2pGqXtW~y;{Ul3_@L!8hDK(#)vl3BI09=xe@WP#`1{x zI77`VO+4mA4@1o-JHDr(=A9iMZzzAX<4-Y^AKUT03^iZu_}+$^S9Uz2jPeJK5QAvr ziHPrOv_%-t7$d=GkBCn+Hi=DxCLFgh#;JyiV>%_qKsL8h$H@B_{PgP9Rgv)h4d307 z@B@t2mm=X$H{+#FjY0HLang=YG9t~>7~@PcuG#q!bsc_7^cdr8!xIs&qOv80!dtBI zRi}lKcNi&nXQI*KuxDS!n;-b$iWe|mtv`%5==o9<^clqZa5y!l3Vc^PEMYlnT~l&y z7W`f9xdHe{`adH0`x)^oaf3^>`?9$2XPmNGFubI2&O+eKwjdkNAtvAp%c!%Vzm%-I>Ms zatFSW63#bil(e3QK(`5`C7>DI**PEIj47- zcL^e%cJ-?ZfscwX?;pl28hBNgSq1o>`F~s`v5MzXWN*}Ni&x^gd&b?2 zcaHm8j6Zmz%6IDdEaNw_AF6f-VBn~~r)5e3!&uG@jK5^4M5HtR zSBxK8DG^H<|4+uxX9SBghQi<^|H%x=sO&kP@oQ2gehAAkFc2QvrM4)9gby(PT=q|8 z=R=IIV!N@r1|3RMyJvB{Rrb6b>pkJu@pz?kGxst+XSzh7JL016OgUA{KVupHH|B5U zekuO3P>kdsWj#5p8#@@^v_J|_{uX_@*!Fwd7a+^919gDD=a3QW282?SaEYD?p@3WWGm{3+##Vv!@8F50;;oPI>8!ufr;PCjE2I$R4^J`vdA5Hs zw{ej1bNmva#`i+JQ_>IZZe@ds&l7{?Qs7CSD<(*O)owcDul}LLt9Dl~{=RaFUnqg` zE5;YHBPjmfxFPv(l}SdW=VZp;$O2fL@gU>Z%#-|>CgP&+q#-$XvYd+;U(NV;*wM^! zVf+Vd&ot&g%J{`Rjwp)j2OcRu_G(%Fiv-3qz(?}W1I*up1*>-ZVxp0r`8>ZAzJT%0 zb!0p6k>u}X{!JVpm7WKIKQ;O+!+Eaq74xs3EfrVec*ccNp9Q>7D1XRc{0EE}$NjBg zymQ@uk@3&Wl#IE|KOO@?{dMN&w=mwBpTEiYjcm79S520M>*cU$nqN*UwD&5T*`R*?i^~@x$fV9iBI^`Sx;rpdw^GMu?PX4 zVE)W&C06nLmhs>4yiooS2L(v}%R$M{-8SxKymOs>3wR|{Z*8QW5U+I&AdAb^-221%@F+$}h<&58& zF8Ng)_#5z%`jrgDgngDter30O#=qp1coiS6g#r6TcRi1y@A@G*r!SQJ9CnRU&=JD7 zPL_BMA4V19ABA3Ysd@J|#xLP`I6{(*Q!qbC&OYv__)I@&a~c0jo>;Zazk%`LNfPmM zB?t9M&hS|h@e1RgVf^uOi9mQ1*N2SX$o`}B?1>JNoDqv9-x%g!$oQ#+5~0SomGK*^ zB>p<)KNB4!IqB^G0~mi5jCbxM>KI=*T?$aX zx=-;lUdeA)@(UzCt7W95%650bAL)8d0%IBD=LRG~$$y0LVIDxGCw+Gj=^wpF@+*H{ zfb~YzWzhoM0zB~-vE2|h#nsGs=lb$zAt%xJTax6X?}DMLc9fLk%zHO8egiv>((`S` zC-Fq*ZW|dGXwqjO$3rYz;;Lu-->YPq)iri9zMaQQ`S}6H4`n}5?M{TfNdBW7f7Cqs zgz?Aor2N?u7}r3LNOlVVFXXWQsONc~G2WS%rog`izawsJV|?lo*&v(Mh@C<0TIcGR z4&pk*{5O=zGL}nmoeM{bq-P57)NX01i%`k+5#pFvf2{t1k~)4_i&<73$lSYE|d#`tufoAJ}xe=?c>8^-^>L?V=}JXgqe=Ww7^dS1i$oi|DT z>sZbkjNicPsfycYUK!c`LxHD$-H;&#z@5ak#Dzb^{6m?aht1f>_@lfY<+7aAbeZ2e z&zG(Mp4xSe*AE&0kHt~|o6oqN@qMul(1mazuIJLFoL9JAh5v%_TR1MM_%jZAQ@fAz zd{qAM1mo-20e>jP8-HQ^*Bt+q{YxiFIa4?fQF68cuf~o=2(XL!f6R&uU}EBADaV-) z{}1B_O_7Wo7L8{a|1hsFN}rDz|2#W_(&2Q}r~VFM|5tb)@r^p7sJEb~GT(mdVeX{>**n_UyB`|u$5dYc6>h~DI;BDsbn++T8An89UMe+}1VQU!w4g0^6v!C&)6_Qcq zKUW|?k(?>X60iKHgzegz5`nZtTt8*}A2|*y z{#O~_kH;mQ`9ER&nQVYm#$S>X*`DKpr+$5Ry<}AWa6jW4SrLd8*PD!gdx$L0W&Gb6 z@62!KVxc7Y(O4ho8Z3cP%lPZqkfn@&4fuY1uY*4@e-_(K<$-6-lJYACNp2;7G~V2d%W+k;^+(44 z41PhEn%Aezk#Z&=-=RzK=K@dj&Y5rcnctab-p%+v9BftEdPUbc5*Uv$J{tC*>vRc>)8H6l+%J=e^BJGVc;|j$J>#8u{`ZVOm@fq=JEUWs zR`)DgfE?hd-A{NOAIrqM81H<(@Gaw==b}R~e@IS}qhA{sKNWh>)mH-J8^%B6mx!T^ z&p^IH`wpX8A~-x5*8orQ<9U45I`|0VDKDez3<-=T#yj@~?Tp{Wj<4)I2lJWaFDj7& z%2>|N8NZa{hO*%&jQ^I`5#D<^o^vzfkD`Bcakw%5!uaX}i61V3aW?Eu{q?bb@^mt48SgxgdY190vz?Wm z=P!_QN_e94FdOB-E1kJX0cu_Fj{r~lcv#LDuJmWdUmuhRHC`8By^JJ(67VD^na8D^ z<$THby=)(zX2$85C&V9EEE%z^i|a6e%wzmV?6=C_{=|6a{`yReH_378b2;O8@qjeoG3-gRFCI2YnH&#fzPXgm? z=tuIM`Q#12dzeQDw=locZySM+2c`d-z@l)y(gVdq0Vm^O4>=pi6w`IN-y~zkHlPn|*0#{3PyZsw5i) z2(YBjIX6j!iUZpi??qgpOU1nl!AJZz46@^g0Pm3~+g~s9JJ;){6n=tar|*`e>t_{G zzVrF`?-}2O{E@CI35^s5KZ__@fGBD*ue8u#uqaS)qaQz3 zH!{^Pf9xUg(_9~{!G7rUdlLW z2%G*V)3wEm^K;NixYktsvYyxPojJu%rD-!~`@KF!`ljR<{wY74nK2`CGH5o(E3_lf zhYENZ>v#3kskz=+{#hB5vb>NwZ)R>VCDlJi{CJ^1Kd&<2W^#+G7?Wm7s+Yz+LhVs< zfXf%j*`h|wQ9VUgALsWkEUoevR9B~r_51N_j7u;-i!pU+B4lP?P;?wYHR%@^f8mb+Pj!Pb;wM5mm;te81ngbeS}nJ4fz zu)*eD@04=rEu5PIL&`|gOr>Ro(EMNU5HIlBASW>O|JJj~9=XBPai&@E+p>WQteaRn zDgs!b^WY%)*|5AhFA*6E10p(MjB;}Q>FLw5GAB)*JJ&yQ_$VPR1;Lsv-pA7;Z3 z5i!J={y&=SQ2&1uRyi)BHab*LR(`XeCJshF*-IV(yN$s@SXj2ipI1tAu~f)a{QW7ITp#A&ZJU(GT655(3qf3Clx zc;TX;*Tq}@^8=nT8Z(IJr0`OqiZf(jA&{!TCr&V_ZQ)O!)LQUzE+39aV8xJsM=CT$ zx+FYul=3bL<$0;XDNhtryIH|g#R^UV*Xx~$*_oM*=nMBmaaM{S%X98zf9@pmu-ss2 zfHJ55^NN)_j$;63*Q_d}{(j13GP9N>d#7K$n4&e(L0Yv$qhs*v;3fXju8G7FT2MqH z0WEW`g0?ie|E7g{bU_(DmF&%dB}|{Or)LpEIZ_6(&|IbYNu-p@u|!)dubxqjqD4b3 zT-GvR^G&s4jTS$`ESa^oyZETBvX2Er47V>1g5rC z0BP}J+PsRa*xUhN^O08^tdyQ$tKjvfBp1pb3db*uBPyi$vk`r0`wbB%wO0`l7Lko2 z+;jw2ICV;da|nMhH#j;-K{0dsl=4|Lb;kL{Elne8?*zsQ>!Q4>lAs^k_!C8Tw29d6=sO1| zTR4k67fv=f!4OzlD*~9q7-N5)KLv`}{f1*6jRg9Jr3Z-|B9mNsP(Rr}xvW$kNH~*U zx%*j){EzlEbglri=(}Xc2@Bfjx=9veWnYEt2H?@La$Z_k;q522CY{{0;z&RTJjJD0 zr?K$TehvSNE~TW|$618dE++^ydDw)b$%=Nrrm=Ne{(rmfaOPs}jm2sbdE#}qPsT}u z+9%@-tuk0xT!>_P5l;UfUO_Mr*a%dVm7j1Ipl4_&=yckWylQ`C@hvhJ!z4sB z3ofcCTZVv%!&X}Lmpb>t|E@fAl-Vw=RgS%^^JI;uKg_)Zey(=fZdrDUm1RTrzbVC% zLmhdKVD7(8kOT5w2TGlQ5d)FS2i@Z6wIon#@A=8uE2X=6>9n~cPOFHU0>9%#BH-n` zz|!6}iPRcup4`CrSc1F8O)QNkSY*2dR?B1*lcAj4*oi$IZsn>q$&Ub#V=k*W_s#Q* z?SmgHU%{gEbR6kqOv?193?E7Hjl}#P&)=*OO&KYUAg#k?N1*qXTSue+$yC#R5R26e zYrlO2q@G0xB!TLJKsipvx~@v{_&ahwK=XCXN#&Mf)oCKFir8~t<|0oJ%c0i1SW6_LU0KZ0U#$xmPni+IfDo?%vaS_{Zp^s&+N{-mF{}x z&FlC2byrt?^;LC0@wg-C*r4(hiI;UwUj7}%U`axtZg>b~DH^d@?XUK)u^dIyIXfXD zA2!8CM$ZW{a@TCx$3cfjn$b^Ca|4~B(41R^SN>5&hxjY#E;5QYSJr750d3gO60~5{ zN0CU^ZUy;{@EF_<>N+nprip_=`H6V2A_Tjzye@;N@>(rX-`Vl5?A|(eVa0LqAj?O`4!5Y6 z1243K*FcyfC#UPLA20)+hG(n}SC6CH{)W5uCPJE2Gx5Vb@gCKHePLsekPK-pQXCNdtzrrQJG@6;sE|p;a6U&C zLW$nXQH$-|IET}~j!edr`S_%)tigtv$s|#>>JbIEI9ziaIq8iJorKwbd5K zG{Yt7zOcmx-_kk|KMf6j%jfd z8xHV;`O$O+;(pgEIG$|ruvyyEMV3fT>$)bHQWQ>+G=l{w;T1;-Q}heOFj2#smIB_~ zLh2UL!6fqB^7W&g@mV1}@!k0p00$MfZs9cg#$KPZ-&UujD%vYk->u9T@^g^Up^N}Z zTC?5fSe{fc_~~E$K_BTQeIyi}ofXsZY<^7Mz{#WH0TTNXYZ3SBV$(nNY}v-F)p3tj zji3*m8+=tr%Z%bRw6E&BOeZapdqqhxBP8g-uFsKJg`_=Z3ZNqqJWA)cr^j=cmI>D< z0%_OKVq}3K3YpWIilCwlk^Lh)-~%KmOxz-fNUZIef_)!gpCah zp39)6sBq)>0ql5^4G}@i&6hcx(Xp7a^K*FokfL_TRM@FRmW(+4gkf5o<9sBjVj-IF z0u;MHIrL&OJJpT^3)pZX+P_6Hc<+f4d`B>i;%T@Uj9fn6?)*~xoQpFx4wkhA9`cpg z(wHjc=?s$CH?}z5K0vxD7(ojaLxhwZ^9?BJ&5)O}ay>*qXT>3s<4YL_5e0@B~t ziTi9u*Y6?)Ac2GYpe`1N0iB!+SkmZFI$3x!IBD0eGGx}SLV8soB z6-=-LKc4NE8JkFUb8xx_XhiO`Mqe-`%k+=)ZmzCm*O0y>4|87OeO`T!%*{6j)1gGlt!G`cF$%mp=H1a6^hbzw+AX6 zMmCKG=E)kdX)kJOlq(5Lg#%^kI?-j`PjS-sB38+*p6;#& zlO-l18kLrT8zca4A;R-;_-I~?-#Q&03Kf_)q>(LJgxt-*X`=cZpQT(b!5O2pX3zl^qNZrOTHREK62VZ9cDgId~#b8^DA&i^K8m$>ezM zOe$f$R^1aE;bovr?S?kahRZzgVG2l^I{Mz7Ovg({RGN$@O!HWi;U_ghE=ZypP{l0# zO6t(6C$*l0J(^w1K*Diru=tynfK;Xm$9_K=GCmq^)1s2y^}9zW^OQF8(VWp z8O5D9Z|d4=PBk+Z(U^*fGbef^A7{>U_&27f^F0t?qx*1SB@G+>8y5LN$SAIs(X4}`3Q$f#l57whag`_fqL8F<-1SYki zy335H(C%!8;^UZ35+dJ3|DsEoAj3TI8npwaxz7batO#zV7AkJXSs6!=DGANz|{OaX`+%1qB zBFhCk%MHnrn?@I;G_*#yvzW;!95QZ#n0&59qM@@L6^Fp8=XJ(jwwsVbj;Mdu-5mmX zKiPOgD5DD)8)qJv9Y0$y2ixtH^XNBc#puFV(1xs63x&|fX5y4k6@a{^Pudn3U9IyV zoFYzp&*s#9!3M#~`>(pqpLXVuER;hpx&{9w?p7REX+lgUEn4Kr`%4nk}YJ`7; z4sJIQR#;wcO#lA3t0FTxbcR_ zLp=UQk<^Vl?3IOIln5pZOIH95jU z-Fb&HQb!f|DIEn5chO3kVQAPumr&J(a9P89%=lhacyq1Uw! z)`4{SdE{_iDQ?lefQ)_!Ox!-;+~Hijvm)ZZ>N^3K%fkkv@GJLB*v)6;634rwXaW;v zE*vo$Rx`Jz!D^wDj!uLz3st-mO?`Y(A_xGnf+TRNrU74G8y${^PJq!E1T852khiVU zO@d1Lrv%S9y1Nw2(h`oSLa13g#8tb1?S-Qw983w*WxraAZ%7 z>2Bg#IXd zCj?wVjE_1fxN{s(31nA$|5>GAX@&&@RuiTsD`10z`H51o;Q*}pyri?r7p;&cj#m1N zF(LVvWKp51;iu(|oWP9sQ%#4ZV=;`^p**gtR5Hg11M-Xnx8o>d0(H-J0_Vj8Y9cCw2(j=*bQ}yop~q z(q8Gum**EYlIJsSC$A$J11bS?!{PES zo0Vb#blMJTgGf+R$eq!O+^J*F|4?8RUshKk*6$~HRH9SUZ>B{w`}dn=z@ z!O3Z6S)_5a=<-?r`rKMTLQsP^AMnNVEh6jB_482G51P1Y2#g=-I@d541Mxl4-nW2! zUwA9efY!{Ys)LB-6OfMKh%#PA_x%?7o}XtwDUu})1Vo-w9XMdG3Y#r!UV~-cL)}Kf)JK}S?eZoLL(XjZw46!!{6`I3p@me>6)S7;3N07GQH6s{0 zEo+f6=xACwd6dk8zfHHj1Py}}5!&lM&Ik_e&U*U+p;`rHuxyz1aZ08$N`%$c?@$`3 zzE%l|lk`%hJCy6{2FG5$EPEtU;ViN|&Nuk}(L-cx6r1Du>4f0a&6{|o18vw4yPwN+ zcH$Y59qi#2jp>51W$9_Q1hS>Eq_mlyMs5dRU2YIr+q`#~j;o*Dv3CjSbPaYdSuvQj zeLk+c4h?tU0_fdW6+@iuyqXOym*~AFL9@uKu1yPs1jb6c91>_wgEQ2tjly>wc*iSK zlI2l**j|Qq@6a_;wPYi>GO-@9kTP5;#h#|9IM7)uUYpD35(2iBhtJ>VKj0s z&j)688M%$AZ|WZ=9Y}o^&O5f7F1oqEVF36M`{k@%?#}aUjU8DI->`~a#%2`lQl|sq zvW(taG2nyVNKxFIU~4$nALW@ zv)_p&1JwPva&GSjx?uz70c~&dEm&;o-USmIz+8u!Nfh-LC<;&s`Zz=f@x~yupmR%% zd9^9`0IY+|ApnXeLF5rsQtu_wk>_&$Fig4dI<#q%whgXQifSED?6Cv}BEVs|-V(p*;9nIGs(^U8-KYcZt0hY^%Yj;O z5(x~^*R4gEVACp=I=bDY@^v{El6@KdjS{a1?lkY@lue%q2~!3vn_(sG6na2w^x%$0lkiC(@loA&zH!FJro%PRY{ zM=ExwdlVhoKHWdud47LK4q*%P=V_}+K7EhgrP|+lbc9>D@?_?I!Ao4{cztN{rND1k z`ZS~p@@aZ_((4nn>h?n?Bgzv^zb?>Wn*U->6)T>q}r*HYg%tkpiFAEcz$fyecK zB=xntY|gj!>GkRV`SjCcZU1{xUrTxIbnmlr9ozmPj(-vVwEmx^zLvM-JGGJePU~O7 zXZoYpW78>G|0{GN{i|T(Y z^|gFk>Ql3*o!Wjm-1{j$P@n4ce)t9ViWVJ_eMwWiJdm zKQQ(GE%mkhpyB?%HTB>7n!A&hf8WtNyVADjkEZ_FnLAI*FQwIatm8v}lKMLSy|?98 zDc?68uHz?X_5O+v^oUyjH}AM#w0u|ONzXTz>;1#jzx6YBrj|edj@ERgz5hQ={f~a< z&eQT`)BpDV|HbKF#y^?ny~lrX^&kJpv6K|4{0GDE0L`ceNn@di)vG zC)wBgee3@>{ZIbp?)1qYTzSbnzus3%`aQ1S`_R?vJ(l|N zRST`B-=9TgI;Qu(EcGuvc4zFVU`U0_Qfl#>-2aLmkW%Y^+Z?C1(qCMfTk!9<9&^!q zPu_d~EWW;kf7*W4U!*Rz?XHIV|C4{Y@}&py(QscqO4B`8|69ARh2PbNN(J+^_kSm# B&1V1r literal 0 HcmV?d00001 diff --git a/bsp/raspberry-pico/libraries/generated/pico_base/pico/config_autogen.h b/bsp/raspberry-pico/libraries/generated/pico_base/pico/config_autogen.h new file mode 100644 index 0000000000..45b006b71f --- /dev/null +++ b/bsp/raspberry-pico/libraries/generated/pico_base/pico/config_autogen.h @@ -0,0 +1,9 @@ +// AUTOGENERATED FROM PICO_CONFIG_HEADER_FILES and then PICO__CONFIG_HEADER_FILES +// DO NOT EDIT! + + +// based on PICO_CONFIG_HEADER_FILES: + +#include "boards/pico.h" + +// based on PICO_RP2040_CONFIG_HEADER_FILES: diff --git a/bsp/raspberry-pico/libraries/generated/pico_base/pico/version.h b/bsp/raspberry-pico/libraries/generated/pico_base/pico/version.h new file mode 100644 index 0000000000..cf2df6871b --- /dev/null +++ b/bsp/raspberry-pico/libraries/generated/pico_base/pico/version.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// --------------------------------------- +// THIS FILE IS AUTOGENERATED; DO NOT EDIT +// --------------------------------------- + +#ifndef _PICO_VERSION_H +#define _PICO_VERSION_H + +#define PICO_SDK_VERSION_MAJOR 1 +#define PICO_SDK_VERSION_MINOR 0 +#define PICO_SDK_VERSION_REVISION 0 +#define PICO_SDK_VERSION_STRING "1.0.0" + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/.gitignore b/bsp/raspberry-pico/libraries/pico-sdk/.gitignore new file mode 100644 index 0000000000..a3b81f81db --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/.gitignore @@ -0,0 +1,5 @@ +.idea +.vscode +cmake-* +.DS_Store +build diff --git a/bsp/raspberry-pico/libraries/pico-sdk/.gitmodules b/bsp/raspberry-pico/libraries/pico-sdk/.gitmodules new file mode 100644 index 0000000000..70b4bfb369 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/.gitmodules @@ -0,0 +1,4 @@ +[submodule "tinyusb"] + path = lib/tinyusb + url = https://github.com/raspberrypi/tinyusb.git + branch = pico diff --git a/bsp/raspberry-pico/libraries/pico-sdk/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/CMakeLists.txt new file mode 100644 index 0000000000..86d2f54df2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.12) +if (NOT TARGET _pico_sdk_inclusion_marker) + add_library(_pico_sdk_inclusion_marker INTERFACE) + include(pico_sdk_init.cmake) + + project(pico_sdk C CXX ASM) + + if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + if (PICO_DEOPTIMIZED_DEBUG) + message("Using fully de-optimized debug build (set PICO_DEOPTIMIZED_DEBUG=0 to optimize)") + else() + message("Using regular optimized debug build (set PICO_DEOPTIMIZED_DEBUG=1 to de-optimize)") + endif() + endif() + + pico_is_top_level_project(PICO_SDK_TOP_LEVEL_PROJECT) + + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 11) + + if (NOT PICO_SDK_TOP_LEVEL_PROJECT) + set(PICO_SDK 1 PARENT_SCOPE) + endif() + + # allow customization + add_sub_list_dirs(PICO_SDK_PRE_LIST_DIRS) + + add_subdirectory(tools) + add_subdirectory(src) + + add_compile_options(-Winline) + + if (PICO_SDK_TOP_LEVEL_PROJECT AND NOT DEFINED PICO_SDK_TESTS_ENABLED) + set(PICO_SDK_TESTS_ENABLED 1) + endif() + if (PICO_SDK_TESTS_ENABLED) + add_subdirectory(test) + endif () + set(PICO_SDK_TESTS_ENABLED "${PICO_SDK_TESTS_ENABLED}" CACHE INTERNAL "Enable build of SDK tests") + + # allow customization + add_sub_list_dirs(PICO_SDK_POST_LIST_DIRS) + + # add docs at the end, as we gather documentation dirs as we go + add_subdirectory(docs) +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/LICENSE.TXT b/bsp/raspberry-pico/libraries/pico-sdk/LICENSE.TXT new file mode 100644 index 0000000000..e8a64f191e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/LICENSE.TXT @@ -0,0 +1,21 @@ +Copyright 2020 (c) 2020 Raspberry Pi (Trading) Ltd. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following + disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/README.md b/bsp/raspberry-pico/libraries/pico-sdk/README.md new file mode 100644 index 0000000000..57d19dcdf8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/README.md @@ -0,0 +1,160 @@ +# Pico SDK + +The Pico SDK provides the headers, libraries and build system +necessary to write programs for the RP2040 based devices such as the Raspberry Pi Pico +in C, C++ or assembly language. + +The Pico SDK is designed to provide an API and programming environment that is familiar both to non-embedded C developers and embedded C developers alike. +A single program runs on the device at a time and starts with a conventional `main()` method. Standard C/C++ libraries are supported along with +C level libraries/APIs for accessing all of the RP2040's hardware include PIO (Programmable IO) + +Additionally the Pico SDK provides higher level libraries for dealing with timers, synchronization, USB (TinyUSB) and multi-core programming +along with various utilities. + +The Pico SDK can be used to build anything from simple applications, full fledged runtime environments such as MicroPython, to low level software +such as RP2040's on chip bootrom itself. + +Additional libraries/APIs that are not yet ready for inclusion in the Pico SDK can be found in [pico-extras](https://github.com/raspberrypi/pico-extras). + +# Documentation + +See [Getting Started with the Raspberry Pi Pico](https://rptl.io/pico-get-started) for information on how to setup your +hardware, IDE/environment and for how to build and debug software for the Raspberry Pi Pico +and other RP2040 based devices. + +See [Pico C/C++ SDK](https://rptl.io/pico-c-sdk) to learn more about programming using the +Pico SDK, exploring more advanced features, and complete PDF based API documentation. + +See [Online Pico SDK API docs](https://rptl.io/pico-doxygen) for HTML based API documentation. + +# Example code + +See [pico-examples](https://github.com/raspberrypi/pico-examples) for example code you can build. + +# Quick-start your own project + +These instructions are exteremly terse, and Linux based only. For detailed steps, +instructions for other platforms, and just in general, we recommend you see [Pico C/C++ SDK](https://rptl.io/pico-c-sdk) + +1. Install CMake (at least version 3.12), and GCC cross compiler + ``` + sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi + ``` +1. Set up your project to point to use the Pico SDK + + * By cloning the Pico SDK locally (most common) + 1. `git clone` this Pico SDK repository + 1. Copy [pico_sdk_import.cmake](https://github.com/raspberrypi/pico-sdk/blob/master/external/pico_sdk_import.cmake) + from the SDK into your project directory + 2. Set `PICO_SDK_PATH` to the SDK location in your environment, or pass it (`-DPICO_SDK_PATH=`) to cmake later. + 3. Setup a `CMakeLists.txt` like: + + ```cmake + cmake_minimum_required(VERSION 3.12) + + # initialize the SDK based on PICO_SDK_PATH + # note: this must happen before project() + include(pico_sdk_import.cmake) + + project(my_project) + + # initialize the Pico SDK + pico_sdk_init() + + # rest of your project + + ``` + + * With Pico SDK as a submodule + 1. Clone the SDK as a submodule called `pico-sdk` + 1. Setup a `CMakeLists.txt` like: + + ```cmake + cmake_minimum_required(VERSION 3.12) + + # initialize pico_sdk from submodule + # note: this must happen before project() + include(pico-sdk/pico_sdk_init.cmake) + + project(my_project) + + # initialize the Pico SDK + pico_sdk_init() + + # rest of your project + + ``` + + * With automatic download from github + 1. Copy [pico_sdk_import.cmake](https://github.com/raspberrypi/pico-sdk/blob/master/external/pico_sdk_import.cmake) + from the SDK into your project directory + 1. Setup a `CMakeLists.txt` like: + + ```cmake + cmake_minimum_required(VERSION 3.12) + + # initialize pico_sdk from GIT + # (note this can come from environment, CMake cache etc) + set(PICO_SDK_FETCH_FROM_GIT on) + + # pico_sdk_import.cmake is a single file copied from this SDK + # note: this must happen before project() + include(pico_sdk_import.cmake) + + project(my_project) + + # initialize the Pico SDK + pico_sdk_init() + + # rest of your project + + ``` + +3. Setup a CMake build directory. + For example, if not using an IDE: + ``` + $ mkdir build + $ cd build + $ cmake .. + ``` + +4. Write your code (see [pico-examples](https://github.com/raspberrypi/pico-examples) or the [Pico C/C++ SDK](https://rptl.io/pico-c-sdk) documentation +for more information) + + About the simplest you can do is a single source file (e.g. hello_world.c) + + ```c + #include + #include "pico/stdlib.h" + + int main() { + setup_default_uart(); + printf("Hello, world!\n"); + return 0; + } + ``` + And add the following to your `CMakeLists.txt`: + + ```cmake + add_executable(hello_world + hello_world.c + ) + + # Add pico_stdlib library which aggregates commonly used features + target_link_libraries(hello_world pico_stdlib) + + # create map/bin/hex/uf2 file in addition to ELF. + pico_add_extra_outputs(hello_world) + ``` + + Note this example uses the default UART for _stdout_; + if you want ot use the default USB see the [hello-usb](https://github.com/raspberrypi/pico-examples/tree/master/hello_world/usb) example. + + +5. Make your target from the build directory you created. + ```sh + $ make hello_world + ``` + +6. You now have `hello_world.elf` to load via a debugger, or `hello_world.uf2` that can be installed and +run on your Raspberry Pi Pico via drag and drop. diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/Platform/PICO.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/Platform/PICO.cmake new file mode 100644 index 0000000000..06388b503c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/Platform/PICO.cmake @@ -0,0 +1,4 @@ +# this is included because toolchain file sets SYSTEM_NAME=PICO + +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +set(CMAKE_EXECUTABLE_SUFFIX .elf) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_platform.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_platform.cmake new file mode 100644 index 0000000000..51ee39a008 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_platform.cmake @@ -0,0 +1,29 @@ +# PICO_CMAKE_CONFIG: PICO_PLATFORM, platform to build for e.g. rp2040/host, default=rp2040 or environment value, group=build +if (DEFINED ENV{PICO_PLATFORM} AND (NOT PICO_PLATFORM)) + set(PICO_PLATFORM $ENV{PICO_PLATFORM}) + message("Using PICO_PLATFORM from environment ('${PICO_PLATFORM}')") +else() + if (NOT PICO_PLATFORM) + set(PICO_PLATFORM "rp2040") + pico_message("Defaulting PICO_PLATFORM to ${PICO_PLATFORM} since not specified.") + else() + message("PICO platform is ${PICO_PLATFORM}.") + endif() +endif () + +set(PICO_PLATFORM ${PICO_PLATFORM} CACHE STRING "PICO Build platform (e.g. rp2040, host)") + +# PICO_CMAKE_CONFIG: PICO_CMAKE_RELOAD_PLATFORM_FILE, custom CMake file to use to set up the platform environment, default=none, group=build +set(PICO_CMAKE_PRELOAD_PLATFORM_FILE "" CACHE INTERNAL "") +set(PICO_CMAKE_PRELOAD_PLATFORM_DIR "${CMAKE_CURRENT_LIST_DIR}/preload/platforms" CACHE INTERNAL "") + +if (NOT PICO_CMAKE_PRELOAD_PLATFORM_FILE) + set(PICO_CMAKE_PRELOAD_PLATFORM_FILE ${PICO_CMAKE_PRELOAD_PLATFORM_DIR}/${PICO_PLATFORM}.cmake CACHE INTERNAL "") +endif () + +if (NOT EXISTS "${PICO_CMAKE_PRELOAD_PLATFORM_FILE}") + message(FATAL_ERROR "${PICO_CMAKE_PRELOAD_PLATFORM_FILE} does not exist. \ + Either specify a valid PICO_PLATFORM (or PICO_CMAKE_PRELOAD_PLATFORM_FILE).") +endif () + +include(${PICO_CMAKE_PRELOAD_PLATFORM_FILE}) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_toolchain.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_toolchain.cmake new file mode 100644 index 0000000000..9fc933d018 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_pre_load_toolchain.cmake @@ -0,0 +1,44 @@ +# PICO_CMAKE_CONFIG: PICO_TOOLCHAIN_PATH, Path to search for compiler, default=none (i.e. search system paths), group=build +# Set your compiler path here if it's not in the PATH environment variable. +set(PICO_TOOLCHAIN_PATH "" CACHE INTERNAL "") + +# Set a default build type if none was specified +set(default_build_type "Release") + +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Defaulting build type to '${default_build_type}' since not specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build, options are: 'Debug', 'Release', 'MinSizeRel', 'RelWithDebInfo'." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +if (CMAKE_BUILD_TYPE STREQUAL "Default") + error("Default build type is NOT supported") +endif() + +# PICO_CMAKE_CONFIG: PICO_COMPILER, Optionally specifies a different compiler (other than pico_arm_gcc.cmake) - this is not yet fully supported, default=none, group=build +# If PICO_COMPILER is specified, set toolchain file to ${PICO_COMPILER}.cmake. +if (DEFINED PICO_COMPILER) + if (DEFINED CMAKE_TOOLCHAIN_FILE) + get_filename_component(toolchain "${CMAKE_TOOLCHAIN_FILE}" NAME_WE) + if (NOT "${PICO_COMPILER}" STREQUAL "${toolchain}") + message(WARNING "CMAKE_TOOLCHAIN_FILE is already defined to ${toolchain}.cmake, you\ + need to delete cache and reconfigure if you want to switch compiler.") + endif () + else () + set(toolchain_dir "${CMAKE_CURRENT_LIST_DIR}/preload/toolchains") + set(toolchain_file "${toolchain_dir}/${PICO_COMPILER}.cmake") + if (EXISTS "${toolchain_file}") + set(CMAKE_TOOLCHAIN_FILE "${toolchain_file}" CACHE INTERNAL "") + else () + # todo improve message + message(FATAL_ERROR "Toolchain file \"${PICO_COMPILER}.cmake\" does not exist, please\ + select one from \"cmake/toolchains\" folder.") + endif () + endif () +endif () + +message("PICO compiler is ${PICO_COMPILER}") +unset(PICO_COMPILER CACHE) + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_utils.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_utils.cmake new file mode 100644 index 0000000000..3bce54b075 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/pico_utils.cmake @@ -0,0 +1,28 @@ +function(pico_message param) + if (${ARGC} EQUAL 1) + message("${param}") + return() + endif () + + if (NOT ${ARGC} EQUAL 2) + message(FATAL_ERROR "Expect at most 2 arguments") + endif () + message("${param}" "${ARGV1}") +endfunction() + +macro(assert VAR MSG) + if (NOT ${VAR}) + message(FATAL_ERROR "${MSG}") + endif () +endmacro() + +function(pico_find_in_paths OUT PATHS NAME) + foreach(PATH IN LISTS ${PATHS}) + if (EXISTS ${PATH}/${NAME}) + get_filename_component(FULLNAME ${PATH}/${NAME} ABSOLUTE) + set(${OUT} ${FULLNAME} PARENT_SCOPE) + return() + endif() + endforeach() + set(${OUT} "" PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/host.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/host.cmake new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/pico/pico.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/pico/pico.cmake new file mode 100644 index 0000000000..6e49411ab1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/pico/pico.cmake @@ -0,0 +1,7 @@ +if (NOT (DEFINED PICO_COMPILER OR DEFINED CMAKE_TOOLCHAIN_FILE)) + pico_message("Defaulting PICO platform compiler to pico_arm_gcc since not specified.") + set(PICO_COMPILER "pico_arm_gcc") +endif () + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/rp2040.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/rp2040.cmake new file mode 100644 index 0000000000..3406bfcfd7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/platforms/rp2040.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/pico/pico.cmake) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/find_compiler.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/find_compiler.cmake new file mode 100644 index 0000000000..6052369fd2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/find_compiler.cmake @@ -0,0 +1,31 @@ +# Toolchain file is processed multiple times, however, it cannot access CMake cache on some runs. +# We store the search path in an environment variable so that we can always access it. +if (NOT "${PICO_TOOLCHAIN_PATH}" STREQUAL "") + set(ENV{PICO_TOOLCHAIN_PATH} "${PICO_TOOLCHAIN_PATH}") +endif () + +# Find the compiler executable and store its path in a cache entry ${compiler_path}. +# If not found, issue a fatal message and stop processing. PICO_TOOLCHAIN_PATH can be provided from +# commandline as additional search path. +function(pico_find_compiler compiler_path compiler_exe) + # Search user provided path first. + find_program( + ${compiler_path} ${compiler_exe} + PATHS ENV PICO_TOOLCHAIN_PATH + PATH_SUFFIXES bin + NO_DEFAULT_PATH + ) + + # If not then search system paths. + if ("${${compiler_path}}" STREQUAL "${compiler_path}-NOTFOUND") + if (DEFINED ENV{PICO_TOOLCHAIN_PATH}) + message(WARNING "PICO_TOOLCHAIN_PATH specified ($ENV{PICO_TOOLCHAIN_PATH}), but ${compiler_exe} not found there") + endif() + find_program(${compiler_path} ${compiler_exe}) + endif () + if ("${${compiler_path}}" STREQUAL "${compiler_path}-NOTFOUND") + set(PICO_TOOLCHAIN_PATH "" CACHE PATH "Path to search for compiler.") + message(FATAL_ERROR "Compiler '${compiler_exe}' not found, you can specify search path with\ + \"PICO_TOOLCHAIN_PATH\".") + endif () +endfunction() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang.cmake new file mode 100644 index 0000000000..1d2c4ebd87 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang.cmake @@ -0,0 +1,53 @@ +# NOTE: THIS IS A WIP ONLY PICO_ARM_GCC IS CURRENTLY SUPPORTED +# todo there is probably a more "cmake" way of doing this going thru the standard path with our "PICO" platform +# i.e. CMakeInformation and whatnot +include(${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake) + +# include our Platform/pico.cmake +set(CMAKE_SYSTEM_NAME PICO) +set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus) + +# Find CLANG +pico_find_compiler(PICO_COMPILER_CC clang) +pico_find_compiler(PICO_COMPILER_CXX clang) +#pico_find_compiler(PICO_COMPILER_ASM armasm) +set(PICO_COMPILER_ASM "${PICO_COMPILER_CC}" CACHE INTERNAL "") +pico_find_compiler(PICO_OBJCOPY llvm-objcopy) +pico_find_compiler(PICO_OBJDUMP llvm-objdump) + +# Specify the cross compiler. +set(CMAKE_C_COMPILER ${PICO_COMPILER_CC} CACHE FILEPATH "C compiler") +set(CMAKE_CXX_COMPILER ${PICO_COMPILER_CXX} CACHE FILEPATH "C++ compiler") +set(CMAKE_C_OUTPUT_EXTENSION .o) + +# todo should we be including CMakeASMInformation anyway - i guess that is host side +set(CMAKE_ASM_COMPILER ${PICO_COMPILER_ASM} CACHE FILEPATH "ASM compiler") +set(CMAKE_ASM_COMPILE_OBJECT " -o -c ") +set(CMAKE_INCLUDE_FLAG_ASM "-I") +set(CMAKE_OBJCOPY ${PICO_OBJCOPY} CACHE FILEPATH "") +set(CMAKE_OBJDUMP ${PICO_OBJDUMP} CACHE FILEPATH "") + +# Disable compiler checks. +set(CMAKE_C_COMPILER_FORCED TRUE) +set(CMAKE_CXX_COMPILER_FORCED TRUE) + +# Add target system root to cmake find path. +get_filename_component(PICO_COMPILER_DIR "${PICO_COMPILER_CC}" DIRECTORY) +get_filename_component(CMAKE_FIND_ROOT_PATH "${PICO_COMPILER_DIR}" DIRECTORY) + +# Look for includes and libraries only in the target system prefix. +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +include_directories(/usr/include/newlib) + +# todo move to platform/Generix-xxx +set(ARM_CLANG_COMMON_FLAGS " --target=arm-none-eabi -mcpu=cortex-m0plus -mthumb") +set(CMAKE_C_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") +set(CMAKE_CXX_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") +set(CMAKE_ASM_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") +set(CMAKE_C_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") +set(CMAKE_CXX_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang_arm.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang_arm.cmake new file mode 100644 index 0000000000..50fabbc354 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_clang_arm.cmake @@ -0,0 +1,52 @@ +# NOTE: THIS IS A WIP ONLY PICO_ARM_GCC IS CURRENTLY SUPPORTED +# todo there is probably a more "cmake" way of doing this going thru the standard path with our "PICO" platform +# i.e. CMakeInformation and whatnot +include(${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake) + +# include our Platform/PICO.cmake +set(CMAKE_SYSTEM_NAME PICO) +set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus) + +# Find ARMClang. +pico_find_compiler(PICO_COMPILER_CC armclang) +pico_find_compiler(PICO_COMPILER_CXX armclang) +pico_find_compiler(PICO_COMPILER_ASM armasm) +set(PICO_COMPILER_ASM "${PICO_COMPILER_ASM}" CACHE INTERNAL "") +pico_find_compiler(PICO_OBJCOPY llvm-objcopy) +pico_find_compiler(PICO_OBJDUMP llvm-objdump) + +# Specify the cross compiler. +set(CMAKE_C_COMPILER ${PICO_COMPILER_CC} CACHE FILEPATH "C compiler") +set(CMAKE_CXX_COMPILER ${PICO_COMPILER_CXX} CACHE FILEPATH "C++ compiler") +set(CMAKE_C_OUTPUT_EXTENSION .o) + +# todo should we be including CMakeASMInformation anyway - i guess that is host side +set(CMAKE_ASM_COMPILER ${PICO_COMPILER_ASM} CACHE FILEPATH "ASM compiler") +set(CMAKE_ASM_COMPILE_OBJECT " -o -c ") +set(CMAKE_INCLUDE_FLAG_ASM "-I") +set(CMAKE_OBJCOPY ${PICO_OBJCOPY} CACHE FILEPATH "") +set(CMAKE_OBJDUMP ${PICO_OBJDUMP} CACHE FILEPATH "") + +# Disable compiler checks. +set(CMAKE_C_COMPILER_FORCED TRUE) +set(CMAKE_CXX_COMPILER_FORCED TRUE) + +# Add target system root to cmake find path. +get_filename_component(PICO_COMPILER_DIR "${PICO_COMPILER_CC}" DIRECTORY) +get_filename_component(CMAKE_FIND_ROOT_PATH "${PICO_COMPILER_DIR}" DIRECTORY) + +# Look for includes and libraries only in the target system prefix. +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# todo move to platform/Generix-xxx +set(ARM_CLANG_COMMON_FLAGS " --cpu=Cortex-M0plus") +string(APPEND CMAKE_C_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") +string(APPEND CMAKE_CXX_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") +string(APPEND CMAKE_ASM_FLAGS_INIT "${ARM_CLANG_COMMON_FLAGS}") +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") +string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT "${ARM_CLANG_COMMON_FLAGS} -Og") + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake new file mode 100644 index 0000000000..4fc0950ec4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake @@ -0,0 +1,66 @@ +# todo there is probably a more "cmake" way of doing this going thru the standard path with our "PICO" platform +# i.e. CMakeInformation and whatnot +include(${CMAKE_CURRENT_LIST_DIR}/find_compiler.cmake) + +# include our Platform/PICO.cmake +set(CMAKE_SYSTEM_NAME PICO) +set(CMAKE_SYSTEM_PROCESSOR cortex-m0plus) + +if (NOT PICO_GCC_TRIPLE) + if (DEFINED ENV{PICO_GCC_TRIPLE}) + set(PICO_GCC_TRIPLE $ENV{PICO_GCC_TRIPLE}) + message("PICO_GCC_TRIPLE set from environment: $ENV{PICO_GCC_TRIPLE}") + else() + set(PICO_GCC_TRIPLE arm-none-eabi) + message("PICO_GCC_TRIPLE defaulted to arm-none-eabi") + endif() +endif() + +# Find GCC for ARM. +pico_find_compiler(PICO_COMPILER_CC ${PICO_GCC_TRIPLE}-gcc) +pico_find_compiler(PICO_COMPILER_CXX ${PICO_GCC_TRIPLE}-g++) +set(PICO_COMPILER_ASM "${PICO_COMPILER_CC}" CACHE INTERNAL "") +pico_find_compiler(PICO_OBJCOPY ${PICO_GCC_TRIPLE}-objcopy) +pico_find_compiler(PICO_OBJDUMP ${PICO_GCC_TRIPLE}-objdump) + +# Specify the cross compiler. +set(CMAKE_C_COMPILER ${PICO_COMPILER_CC} CACHE FILEPATH "C compiler") +set(CMAKE_CXX_COMPILER ${PICO_COMPILER_CXX} CACHE FILEPATH "C++ compiler") +set(CMAKE_C_OUTPUT_EXTENSION .o) + +# todo should we be including CMakeASMInformation anyway - i guess that is host side +set(CMAKE_ASM_COMPILER ${PICO_COMPILER_ASM} CACHE FILEPATH "ASM compiler") +set(CMAKE_ASM_COMPILE_OBJECT " -o -c ") +set(CMAKE_INCLUDE_FLAG_ASM "-I") +set(CMAKE_OBJCOPY ${PICO_OBJCOPY} CACHE FILEPATH "") +set(CMAKE_OBJDUMP ${PICO_OBJDUMP} CACHE FILEPATH "") + +# Disable compiler checks. +set(CMAKE_C_COMPILER_FORCED TRUE) +set(CMAKE_CXX_COMPILER_FORCED TRUE) + +# Add target system root to cmake find path. +get_filename_component(PICO_COMPILER_DIR "${PICO_COMPILER_CC}" DIRECTORY) +get_filename_component(CMAKE_FIND_ROOT_PATH "${PICO_COMPILER_DIR}" DIRECTORY) + +# Look for includes and libraries only in the target system prefix. +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +option(PICO_DEOPTIMIZED_DEBUG "Build debug builds with -O0" 0) + +# todo move to platform/Generix-xxx +set(ARM_GCC_COMMON_FLAGS " -march=armv6-m -mcpu=cortex-m0plus -mthumb") +#set(ARM_GCC_COMMON_FLAGS " -mcpu=cortex-m0plus -mthumb") +foreach(LANG IN ITEMS C CXX ASM) + set(CMAKE_${LANG}_FLAGS_INIT "${ARM_GCC_COMMON_FLAGS}") + if (PICO_DEOPTIMIZED_DEBUG) + set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-O0") + else() + set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-Og") + endif() + set(CMAKE_${LANG}_LINK_FLAGS "-Wl,--build-id=none") +endforeach() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/docs/CMakeLists.txt new file mode 100644 index 0000000000..0b3e6383d7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/CMakeLists.txt @@ -0,0 +1,59 @@ +find_package(Doxygen) +if (PICO_SDK_TOP_LEVEL_PROJECT AND ${DOXYGEN_FOUND}) + set(PICO_BUILD_DOCS_DEFAULT 1) +endif() +option(PICO_BUILD_DOCS "Build HTML Doxygen docs" ${PICO_BUILD_DOCS_DEFAULT}) + +if (DEFINED ENV{PICO_EXAMPLES_PATH} AND NOT PICO_EXAMPLES_PATH) + set(PICO_EXAMPLES_PATH $ENV{PICO_EXAMPLES_PATH}) + message("Using PICO_EXAMPLES_PATH from environment ('${PICO_EXAMPLES_PATH}')") +endif() + +if(PICO_BUILD_DOCS) + if(NOT DOXYGEN_FOUND) + message(FATAL_ERROR "Doxygen is needed to build the documentation.") + endif() + + include(ExternalProject) + + if(PICO_EXAMPLES_PATH) + get_filename_component(PICO_EXAMPLES_PATH "${PICO_EXAMPLES_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") + if (EXISTS ${PICO_EXAMPLES_PATH}) + message("Documentation example code will come from ${PICO_EXAMPLES_PATH}") + else() + message(WARNING "Documentation example code configured to come from ${PICO_EXAMPLES_PATH}, but that path does not exist") + endif() + add_custom_target(doc-pico-examples) + else() + ExternalProject_Add(doc-pico-examples + GIT_REPOSITORY git@github.com:raspberrypi/pico-examples.git + GIT_TAG master + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + ) + ExternalProject_Get_property(doc-pico-examples SOURCE_DIR) + ExternalProject_Get_property(doc-pico-examples GIT_REPOSITORY) + ExternalProject_Get_property(doc-pico-examples GIT_TAG) + set(PICO_EXAMPLES_PATH ${SOURCE_DIR}) + message("Documentation example code will come from git repo ${GIT_REPOSITORY}, branch ${GIT_TAG}") + endif() + + set(DOXY_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen") + set(DOXY_INPUT_DIRS "${PICO_DOXYGEN_PATHS}") + set(DOXY_EXCLUDE_DIRS "${PICO_DOXYGEN_EXCLUDE_PATHS}") + set(DOXY_EXAMPLE_DIR "${PICO_EXAMPLES_PATH}") + + set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) + set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + + configure_file(${doxyfile_in} ${doxyfile} @ONLY) + + add_custom_target(docs + COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM) + + add_dependencies(docs doc-pico-examples) +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/Doxyfile.in b/bsp/raspberry-pico/libraries/pico-sdk/docs/Doxyfile.in new file mode 100644 index 0000000000..544d80a3d0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/Doxyfile.in @@ -0,0 +1,64 @@ +PROJECT_NAME = "Pico SDK" +PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ + +#STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ +STRIP_FROM_PATH = @DOXY_INPUT_DIRS@ +# @PROJECT_BINARY_DIR@ +#INPUT = @doxy_main_page@ \ +# @PROJECT_SOURCE_DIR@ \ +# @PROJECT_BINARY_DIR@ + +FILE_PATTERNS = *.h \ + *.cpp \ + *.c \ + *.S \ + *.s \ + *.md + +USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/docs/mainpage.md +LAYOUT_FILE = @PROJECT_SOURCE_DIR@/docs/DoxygenLayout.xml +HTML_FOOTER = @PROJECT_SOURCE_DIR@/docs/footer.html +HTML_HEADER = @PROJECT_SOURCE_DIR@/docs/header.html + +PROJECT_BRIEF = "Pico SDK documentation" +PROJECT_NUMBER = 1.0 +OPTIMIZE_OUTPUT_FOR_C = YES +# HTML_EXTRA_STYLESHEET = @PROJECT_SOURCE_DIR@/docs/customdoxygen.css +HTML_EXTRA_STYLESHEET = @PROJECT_SOURCE_DIR@/docs/normalise.css @PROJECT_SOURCE_DIR@/docs/main.css @PROJECT_SOURCE_DIR@/docs/styles.css +HTML_EXTRA_FILES = @PROJECT_SOURCE_DIR@/docs/logo-mobile.svg @PROJECT_SOURCE_DIR@/docs/logo.svg @PROJECT_SOURCE_DIR@/docs/search.svg \ + @PROJECT_SOURCE_DIR@/docs/main.js @PROJECT_SOURCE_DIR@/docs/pico.jpg @PROJECT_SOURCE_DIR@/docs/rp2040.png +GENERATE_TREEVIEW = YES # This is needed as it wraps the content area in an HTML tag that we need to use +HTML_COLORSTYLE_HUE = 350 +HTML_COLORSTYLE_SAT = 200 +HTML_COLORSTYLE_GAMMA = 150 +GENERATE_LATEX = NO +GENERATE_XML = YES +GROUP_GRAPHS = NO + +ALIASES += tag=@internal +ALIASES += end=@internal + +OUTPUT_DIRECTORY = @DOXY_OUTPUT_DIR@ +INPUT = @PROJECT_SOURCE_DIR@/docs/index.h @DOXY_INPUT_DIRS@ @PROJECT_SOURCE_DIR@/docs/ + +#EXCLUDE = @DOXY_EXCLUDE_DIRS@ @PROJECT_SOURCE_DIR@/src/rp2040 +EXCLUDE = @DOXY_EXCLUDE_DIRS@ +RECURSIVE = YES +EXAMPLE_PATH = @PICO_EXAMPLES_PATH@ + +# This is needed as we have a number of static inline functions that need to be documented. +EXTRACT_STATIC = YES + +EXTRACT_ALL = NO +ALWAYS_DETAILED_SEC = NO +#REPEAT_BRIEF = NO + +# Need these next options to ensure that functions with modifiers do not confuse the Doxygen parser. +# And any further function modifiers here. +MACRO_EXPANSION = YES + +PREDEFINED = __not_in_flash_func(x) \ + __time_critical_func(x) \ + __not_in_flash(x)= \ + __no_inline_not_in_flash(x)= \ + __attribute__(x)= diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/DoxygenLayout.xml b/bsp/raspberry-pico/libraries/pico-sdk/docs/DoxygenLayout.xml new file mode 100644 index 0000000000..e1ba19d515 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/DoxygenLayout.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/examples.md b/bsp/raspberry-pico/libraries/pico-sdk/docs/examples.md new file mode 100644 index 0000000000..2e57012f42 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/examples.md @@ -0,0 +1,21 @@ +## Examples Index {#examples_page} + +This page links to the various example code fragments in this documentation. For more complete examples, please see the pico_examples repository, which contains complete buildable projects. + + - [RTC example](@ref rtc_example) + - [UART example](@ref uart_example) + - [ADC example](@ref adc_example) + - [I2C example](@ref i2c_example) + - [Clock example](@ref clock_example) + - [Timer example](@ref timer_example) + - [Flash programming example](@ref flash_example) + - [Watchdog example](@ref watchdog_example) + - [Divider example](@ref divider_example) + - [PWM example](@ref pwm_example) + - [Multicore example](@ref multicore_example) + - [Reset example](@ref reset_example) + + +All examples are "Copyright (c) 2020 Raspberry Pi (Trading) Ltd", and are released under a 3-Clause BSD licence. Briefly, this means you are free to use the example code +as long as you retain the copyright notice. Full details on the licence can be found [here](https://opensource.org/licenses/BSD-3-Clause). + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/footer.html b/bsp/raspberry-pico/libraries/pico-sdk/docs/footer.html new file mode 100644 index 0000000000..377fd4a6c5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/footer.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/header.html b/bsp/raspberry-pico/libraries/pico-sdk/docs/header.html new file mode 100644 index 0000000000..87c2919193 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/header.html @@ -0,0 +1,61 @@ + + + + + + + + + + + $projectname: $title + $title + + + + + $treeview + $search + $mathjax + + + + $extrastylesheet + + + + + + + + + + +
+ + + + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/index.h b/bsp/raspberry-pico/libraries/pico-sdk/docs/index.h new file mode 100644 index 0000000000..5ec99cba54 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/index.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// Here to organize documentation order + +/** + * \defgroup hardware Hardware APIs + * This group of libraries provides a thin and efficient C API / abstractions to access the RP2040 hardware without having to read and write + * hardware registers directly. + * @{ + * \defgroup hardware_adc hardware_adc + * \defgroup hardware_base hardware_base + * \defgroup hardware_claim hardware_claim + * \defgroup hardware_clocks hardware_clocks + * \defgroup hardware_divider hardware_divider + * \defgroup hardware_dma hardware_dma + * \defgroup hardware_flash hardware_flash + * \defgroup hardware_gpio hardware_gpio + * \defgroup hardware_i2c hardware_i2c + * \defgroup hardware_interp hardware_interp + * \defgroup hardware_irq hardware_irq + * \defgroup hardware_pio hardware_pio + * \defgroup hardware_pll hardware_pll + * \defgroup hardware_pwm hardware_pwm + * \defgroup hardware_resets hardware_resets + * \defgroup hardware_rtc hardware_rtc + * \defgroup hardware_spi hardware_spi + * \defgroup hardware_sync hardware_sync + * \defgroup hardware_timer hardware_timer + * \defgroup hardware_uart hardware_uart + * \defgroup hardware_vreg hardware_vreg + * \defgroup hardware_watchdog hardware_watchdog + * \defgroup hardware_xosc hardware_xosc + * @} + * + * \defgroup high_level High Level APIs + * This group of libraries provide higher level functionality that isn't hardware related or provides a richer + * set of functionality above the basic hardware interfaces + * @{ + * \defgroup pico_multicore pico_multicore + * \defgroup pico_stdlib pico_stdlib + * \defgroup pico_sync pico_sync + * \defgroup pico_time pico_time + * \defgroup pico_util pico_util + * @} + * + * \defgroup third_party Third-party Libraries + * Third party libraries for implementing high level functionality. + * @{ + * \defgroup tinyusb_device tinyusb_device + * \defgroup tinyusb_host tinyusb_host + * @} + * + * \defgroup runtime Runtime Infrastructure + * Libraries that are used to provide efficient implementation of certain + * language level and C library functions, as well as CMake INTERFACE libraries + * abstracting the compilation and link steps in the SDK + * @{ + * \defgroup boot_stage2 boot_stage2 + * \defgroup pico_base pico_base + * \defgroup pico_bit_ops pico_bit_ops + * \defgroup pico_bootrom pico_bootrom + * \defgroup pico_cxx_options pico_cxx_options + * \defgroup pico_divider pico_divider + * \defgroup pico_double pico_double + * \defgroup pico_float pico_float + * \defgroup pico_int64_ops pico_int64_ops + * \defgroup pico_malloc pico_malloc + * \defgroup pico_mem_ops pico_mem_ops + * \defgroup pico_platform pico_platform + * \defgroup pico_printf pico_printf + * \defgroup pico_runtime pico_runtime + * \defgroup pico_stdio pico_stdio + * \defgroup pico_standard_link pico_standard_link + * @} + * + * \defgroup misc External API Headers + * Headers for interfaces that are shared with code outside of the SDK + * @{ + * \defgroup boot_picoboot boot_picoboot + * \defgroup boot_uf2 boot_uf2 + * @} +*/ \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/logo-mobile.svg b/bsp/raspberry-pico/libraries/pico-sdk/docs/logo-mobile.svg new file mode 100644 index 0000000000..27192bef1e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/logo-mobile.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/logo.svg b/bsp/raspberry-pico/libraries/pico-sdk/docs/logo.svg new file mode 100644 index 0000000000..86a2a40916 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/logo.svg @@ -0,0 +1,213 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/main.css b/bsp/raspberry-pico/libraries/pico-sdk/docs/main.css new file mode 100644 index 0000000000..9fb2144980 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/main.css @@ -0,0 +1,101 @@ +/************************/ +/* GENERAL */ +/************************/ + +body { + color: #1e1e1e; +} + +h1, h2, h3, h4, h5, h6, p, a, li, span, blockquote, input, textarea, select, label { + font-family: 'Roboto', sans-serif !important; +} + +p { +/* font-size: 16px; + line-height: 25px; + margin-bottom: 20px;*/ +} + +a { + text-decoration: none; + color: inherit; +} + + +/* Sidebar */ +#top { + background-color: #F5F5F5; + width: 275px; + position: fixed; + top: 0; + bottom: 0; + left: 0; + height: auto !important; + overflow: auto; + padding: 25px; + box-sizing: border-box; + display: flex; + flex-direction: column; +} +@media (max-width: 1012px) { + #top { + box-shadow: 5px 0px 10px 0px rgba(0,0,0,0.25); + position: fixed; + z-index: 9999; + left: -100%; + width: 450px; + background-color: #F5F5F5; + transition: 0.2s left; + } +} +@media (max-width: 767px) { + #top { + width: calc(100% - 50px); + padding: 20px; + } +} +@media (max-width: 1012px) { + #top.open { + left: 0; + } +} + + +/* Content */ +#doc-content { + padding: 25px 50px 25px 290px; + margin: 0 !important; + height: auto !important; +} +@media (max-width: 1012px) { + #doc-content { + padding: 110px 40px 40px 40px; + } +} +@media (max-width: 767px) { + #doc-content { + padding: 90px 20px 50px 20px; + } +} + + +/* Hide the default doxygen stuff that we dont want */ +.ui-resizable-handle { + display: none !important; +} +#nav-sync { + display: none !important; +} +#nav-tree { + height: 100% !important; + background: none; + overflow: auto; + padding: 35px; + box-sizing: border-box; +} +#nav-path, #side-nav { + display: none !important; +} + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/main.js b/bsp/raspberry-pico/libraries/pico-sdk/docs/main.js new file mode 100644 index 0000000000..e732e8f76a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/main.js @@ -0,0 +1,17 @@ +$(document).ready(function() { + + // Trigger the mobile navigation + $(document).on('click', '.navigation-toggle', function (event) { + event.preventDefault(); + $(this).toggleClass('clicked'); + $('#top').toggleClass('open'); + }); + + // Add a class to all
  • 's with children + $('#main-nav ul li > ul').parent().addClass('hasChildren'); + $('#main-nav .has-submenu').removeClass('has-submenu'); + $('#main-nav .sm').removeClass('sm'); + $('#main-nav .sm-dox').removeClass('sm-dox'); + $('#main-nav #main-menu').removeAttr('data-smartmenus-id'); + $('#main-nav #main-menu').removeAttr('id'); +}); diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/mainpage.md b/bsp/raspberry-pico/libraries/pico-sdk/docs/mainpage.md new file mode 100644 index 0000000000..890815011e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/mainpage.md @@ -0,0 +1,31 @@ +# Pico SDK + +The Pico SDK (Software Development Kit) provides the headers, libraries and build system necessary to write programs for the RP2040 based devices such as the Raspberry Pi Pico in C, C++ or assembly language. The Pico SDK is designed to provide an API and programming environment that is familiar both to non-embedded C developers and embedded C developers alike. + +A single program runs on the device at a time with a conventional main() method. Standard C/C++ libraries are supported along with APIs for accessing the RP2040’s hardware, including DMA, IRQs, and the wide variety fixed function peripherals and PIO (Programmable IO). + +Additionally the Pico SDK provides higher level libraries for dealing with timers, USB, synchronization and multi-core programming, along with additional high level functionality built using PIO such as audio. The Pico SDK can be used to build anything from simple applications, full fledged runtime environments such as MicroPython, to low level software such as the RP2040’s on chip bootrom itself. + +This documentation is generated from the Pico SDK source tree using Doxygen. It provides basic information on the APIs used for each library, but does not provide usage information. Please refer to the Databooks for usage and more technical information. + +## SDK Design + +The RP2040 is a powerful chip, however it is an embedded environment, so both RAM, and program space are at premium. Additionally the trade offs between performance and other factors (e.g. edge case error handling, runtime vs compile time configuration) are necessarily much more visible to the developer than they might be on other higher level platforms. + +The intention within the SDK has been for features to just work out of the box, with sensible defaults, but also to give the developer as much control and power as possible (if they want it) to fine tune every aspect of the application they are building and the libraries used. + +## The build system + +The Pico SDK uses CMake to manage the build. CMake is widely supported by IDEs (Integrated Development Environments), and allows a simple specification of the build (via CMakeLists.txt files), from which CMake can generate a build system (for use by `make`, `ninja` or other build tools) customized for the platform and by any configuration variables the developer chooses for a list of configuration variables). + +Apart from being a widely used build system for C/C++ development, CMake is fundamental to the way the Pico SDK is structured, and how applications are configured and built. + +The Pico SDK builds an executable which is bare metal, i.e. it includes the entirety of the code needed to run on the device (other than floating point and other optimized code contained in the bootrom within the RP2040). + +## Examples + + +This SDK contains a number of example code fragments. An index of these examples can be found [here](@ref examples_page) + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/normalise.css b/bsp/raspberry-pico/libraries/pico-sdk/docs/normalise.css new file mode 100644 index 0000000000..2b0f97b48f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/normalise.css @@ -0,0 +1,447 @@ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. + */ + + html { + line-height: 1.15; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ + } + + /* Sections + ========================================================================== */ + + /** + * Remove the margin in all browsers (opinionated). + */ + + body { + margin: 0; + } + + /** + * Add the correct display in IE 9-. + */ + + article, + aside, + footer, + header, + nav, + section { + display: block; + } + + /** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + + h1 { + font-size: 145%; + margin: 0.67em 0; + } + + /* Grouping content + ========================================================================== */ + + /** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. + */ + + figcaption, + figure, + main { /* 1 */ + display: block; + } + + /** + * Add the correct margin in IE 8. + */ + + figure { + margin: 1em 40px; + } + + /** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + + hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ + } + + /** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + + pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ + } + + /* Text-level semantics + ========================================================================== */ + + /** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. + */ + + a { + background-color: transparent; /* 1 */ + -webkit-text-decoration-skip: objects; /* 2 */ + } + + /** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + + abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ + } + + /** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. + */ + + b, + strong { + font-weight: inherit; + } + + /** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + + b, + strong { + font-weight: bolder; + } + + /** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + + code, + kbd, + samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ + } + + /** + * Add the correct font style in Android 4.3-. + */ + + dfn { + font-style: italic; + } + + /** + * Add the correct background and color in IE 9-. + */ + + mark { + background-color: #ff0; + color: #000; + } + + /** + * Add the correct font size in all browsers. + */ + + small { + font-size: 80%; + } + + /** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + /* Embedded content + ========================================================================== */ + + /** + * Add the correct display in IE 9-. + */ + + audio, + video { + display: inline-block; + } + + /** + * Add the correct display in iOS 4-7. + */ + + audio:not([controls]) { + display: none; + height: 0; + } + + /** + * Remove the border on images inside links in IE 10-. + */ + + img { + border-style: none; + } + + /** + * Hide the overflow in IE. + */ + + svg:not(:root) { + overflow: hidden; + } + + /* Forms + ========================================================================== */ + + /** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. + */ + + button, + input, + optgroup, + select, + textarea { + font-family: sans-serif; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ + } + + /** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + + button, + input { /* 1 */ + overflow: visible; + } + + /** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + + button, + select { /* 1 */ + text-transform: none; + } + + /** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. + */ + + button, + html [type="button"], /* 1 */ + [type="reset"], + [type="submit"] { + -webkit-appearance: button; /* 2 */ + } + + /** + * Remove the inner border and padding in Firefox. + */ + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + /** + * Restore the focus styles unset by the previous rule. + */ + + button:-moz-focusring, + [type="button"]:-moz-focusring, + [type="reset"]:-moz-focusring, + [type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; + } + + /** + * Correct the padding in Firefox. + */ + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + /** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + + legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ + } + + /** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + + progress { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ + } + + /** + * Remove the default vertical scrollbar in IE. + */ + + textarea { + overflow: auto; + } + + /** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. + */ + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + } + + /** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + height: auto; + } + + /** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + + [type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ + } + + /** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. + */ + + [type="search"]::-webkit-search-cancel-button, + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none; + } + + /** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + + ::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ + } + + /* Interactive + ========================================================================== */ + + /* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. + */ + + details, /* 1 */ + menu { + display: block; + } + + /* + * Add the correct display in all browsers. + */ + + summary { + display: list-item; + } + + /* Scripting + ========================================================================== */ + + /** + * Add the correct display in IE 9-. + */ + + canvas { + display: inline-block; + } + + /** + * Add the correct display in IE. + */ + + template { + display: none; + } + + /* Hidden + ========================================================================== */ + + /** + * Add the correct display in IE 10-. + */ + + [hidden] { + display: none; + } \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/pico.jpg b/bsp/raspberry-pico/libraries/pico-sdk/docs/pico.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f60d148fee3ec52aa4ccac3a1848eb6935196e3b GIT binary patch literal 26372 zcmeFZWmFtr(=R$$a0mo<4estCBxrE=5F9eNy96KH9fAx_aJL|X6WrZ`Gq?rr~?$uR$SI^7B%Ld@JytJG&01gfSkcDl4mrcOnM-OWY z06Xns?i-Rx+hn+LKiJAQub9PgEAcu#E z0|ys7CkH@O!o$JD)YjaE>WjIhwVfEvSz8wkm9?1|jW(Ymr=o+Dxs|o7my@}=my(95 zm#wLg8I6QEm8gfX2hag%?qWja0sLy`EbJjh^N(_282|S)2MyIfA}+RKG&+hZR8sa% z=2U#_yzHDbu+mOu7Q$*Dr2kbG_DhWBUyXEkcV~C!VYhd(IwXv3GS5qk+}@Urho!{9En+7W;n-nwkDv z&cW5`>pzv7nR1waH3yp8xj4h@#Pt^r&_P(r$^37}XxQ6-6{GoIJLhdo`yf?ArfUz9^%LR_Vfc{?q{|fv) z1+&^;_TT0gr}_{5#{&Pcz<(_89}E1)0{^kV|9uwt9|z9d4(7GF!`w5#OE&-q1yBYT zhX6+dfX9JDz=3<|15m=eOeDB}=&x(|m*C(L5RqOXqoAUp!vq>$1K{Bh5a1CJkdP2z zPAZ%)>^cAu2ML#&OY+qlRTE?yM?CJp_V zG4t~A3kV7cOMUn#Eh8%@udbn~rLCi@XKH3{VQFP;z>pVNo%-q_nKIuD+qMskx=~XK!Es0Az4zcxrlPc5Z%QacOgFduMlV|M$Tm z^y2dB`sViT{^2h!m@oWauweWDEiN1wE_g&l1VrS&xZvR3{{qKBM55+;g)6CwY~uKa zhC2`i?|poJO%Ez9kJ>r@7pF-y0y^GJdgxzh{~-JS1}y0R2-&}Z{SU5XfD{1nA9{s| z_zLyat5>KPs4&97#`sIvxY+*??!O5CA0qxsWdEiYm=ZWdBqU^HWDMAc9Pc$A`TuWv zS%rlZ#4k$#3le=$(!$-mmVfydUIN=vdz~h$uvU>0q_15RiWq5IT^Tg`GwJ_}1e# zFHZOu0YRkQhL>v*9acS3$oII{N=S$>P4#N85TTNSFh#Ih5VtE417YE5QAgo-vt? zeU%+276NDDtndk=aD&3y3Gk1I#q~A#O(cME46t8B4^NPiDbEOJ^*s{s@(Tu9UR6?3 z#Xy!eBJHNMPWK_t)SSJ4Ww-@ltypPzTmFO=R10-cvr$|8_9gyJ$51zspdeY|#PyRh z;a$FuL@|GP{RG}Skupxq`nbH9f&~9;2P2XonVFrOYr4irvyI_4<3AQylGk*8uDQ^U zbC8d-ypIk8sB9mim^NPNsxvDqNp6Ebx#OSDT!IY1Be46ueL|Zs6pSHyD7B?(Kk~uF z2=lJgc1!=B4R~T6VWM(6B}j|70YnqJt?KRXq$8n7e_K|5^DP3sl@>`v#xc%wKl0vx zBN)Qp;fvXOtZvsLro4_2JE~p!^eLP7&l}C@lgYI;eSvs$QNUp@vm-=k`(T}KJ!-Uu zx4iiyyMEDr>Bg>e3N7oym~zaNpPtb`S8yjw@0Oyx0*kj0txmzEZlQyp%KLM`&d#H@ z>sBr8eYXGU#M3gud> z)}oN_TuliB+Lti^E!A6{s~vYSu6tGs^N1qD=^%q9g$b3ReO4vi>+~)^SOW;2$f4$< z3g!ISNSXb$v@AT$5{%6403iv^Q&J;RFUCnbS)Uu)NmYeQ6jIH+oZN`g6=NQE%*(!E*=$`Ov0UN}+K zjkvYOkdy~3tgz9!5epSU$kHBKe>DsSeRAfCuxgo>)HU_XhXr4&)ZB>n|0^ z*^B48k*LSU&k>j;o((=^aJ9giV5DcQuWa}+VK#+q7Qk$16d|9LUWiyg+jR)#>1< z#LSgGvRnAtaQDp1%H&RJ>*6j}*N~qSIf`+Lz%y{uF$++TV#i*A3`h$ zCsFA&S6$BQ<-DeM56g*>ep_mb8}W5n?r%G@p<raCkMpv(ClJ7x=_9{(PITks6A5ozS^2iYvi<2i~+TG~%0FlLiP6 z3-~W1OFWl7H1)YNeP&A-rsX9hP0${^=PnF=aGYr3(+!otd9S9@P|@K^8^)qQ8j>vk zFvQ7TH^Ou~t|@d}LjK`WzeAs+CX+Ekr`R{4MZ)E^pM7svgON#0^?OAr zTZX$ULM*Ku9!%ln)ulvZCz;GU+ikLkn&=+jZJXu{xrX^RJr43Z%PjW3M(>0SS(LNpE#Fg&vd(57XydJkYY0mlSp^fP@!XdT;pZ5zeYKX2UY#xsE+8^mVvL4J7 z#qSH`Ja<^K-rQO85k2{O3EX%)fnNX^+E}wW+{toU?ly`XA3Q@-p$U7BeFP6A2b&c7 zv304Ja)8t2EZ|2Tl4kk%cJWb`0m52hAXDlVa9YiZ`G|5HEcKSyT$k=l^?0mj;ZR*xuw8JNUT!tfC zj4n7|$}S9}j5!BohY~H0ffJo9tHm=U-fAi#Ne+0o5}U>t2MKW7X$P+Y#55O-e`8ToLdt@&Kbe8PLurJ z3|3!6C#P}m7QrvSftUjipy=2R7Tv|IDdOW+$CmyJfP1FuSpF5D2hen<-K#F&b)LOy zhzu`r0{OaQYSng>t8{(C-sUwYY_oFUK-w}n?*%VOl|^RS1@2(A;O<}?&{$t=Yc|6N zMjhdemr%HVPNYd8t2J{)*L5SeDgTO|8+fb=}{pV4{VXkRFu3fu! zUsL722duBm0;p%#_w8G`9A5dQ9|Rg3+T0qOPVO{Me|h}4VvuYK+SrJ_e3?>B9y8C~u(Iwa2V)zcW1)-aar!_vkclhTarVyG9@_tetv%G8GA*SnU~y6D4_M(eB`1 zl3F>4M~@nO1{R)sLhSWCvg~NGg`K0;1l+Hr1`j82!uzJm&PMoCix$CowrB1o2G-il zon}JR^MZl{PS{HA&SP#w_}gp5;VT|7r@s|;YKK}hLlw+?daG@20Jd%PeY1Tg_lIZB ziv#K)2CEP}Rin*5yiLWTF@XQeaN2bS+8FLD#S3mFpB?LI+0nTe+mRehky0xuUk1-(UCB zVk{5tymF3Br6Mz}7OMU-$EyHTf+9_&gRq9nJXf4!Wc;#O3S&2~oR$N5%h9((G*^%t zomeivw!Jwildx3CaI`zyb2P1e0_r83p4?l@&*@)ji_1;AlD+`2*C1sF36TAPA{|b8 z`JA#N$e?d4h2+%&RJ*Ukwol8t&}bQAZ&PTmb1^DQ9XKS|O)Dto>m37uwR9S@$?0TTWg*KOG1dO7t-Gbs%`pF0bCoapRSKmSQ5iCK7f0 zb!iyW1QpSnyRyy3IiZRnE&0UyxSB5IyY&hn22JdDir7TW?b9nxEi#lsYWVh3bXD#W zHC?y8&`cU@dnAqmp7Xt&aY_M+*tAt6$yqvfV#(;Q_mMj_=7J2x0P$~UJ7&%q$K|P$ z*~-?8hA)8leNhX`ko;>O-i|Ssla+Fl5~BmJZ+gYq42h0dZi&M`OhUB`E-HV;bY?{! z_((w!`uu37UI4XreVoh9_fukvev*%)env8%$gUU=XG@-lZZaxb?ZEE#KlD~d*=gM` zl26>ju;lIjEazju{}GNXM-Ji}dI2=d@x=;Lz1`S}|5+DZ2rs0;iVj4?8P`E5Jg*1y zsj19TxKZL{Z2oTLJsV*tdm2}eojK!u{9S!aIo#gFs#z1~&B^Q)ghlM_C*6kWzC{?} zBU!{B??M%dY*>pDeCiJzg;?G6TnQmY?%MNuveh4nY3Y|c(%*4^1UT=1)%Ix0$}`gA zN0XuuGzr$5C!y~%q7f&E*_%63QKvKheIee_$!xDL&M8BmA+hJNUV+>C0p@nah%-k>sGDxp-$9-_nus>nDY3 zYh0^a_%#$dMA;wZyFFylqkSdf-H$tF6v#RaiE=ZiF3T;n0{pf2YDmrjlTU>R^<<^n zV1sL9{B@7S-Z=t_*VEUD=t~`aTG3=@+{ta$TkdIy%<}gi*wF&8WN8J#qHIhe9_XS^%J;>%Av_}`xFg{T*fSR z(_zdzZ%$z9*cf58&#@<1=$N%$g z&GChKZ3MxsLW&4|O%xQf-)E1XN*TThpTw1@5do>94<#QQ@8|Orps7YFYYLi;brfHc zwzJGksfh2NHTUGdt8HX?6Wtjzd5D|Tk zF&@4&%YDz3@67qRkCc~uvamy$!>v((^CU&2^}9D1vU>U?Vu^vXpa8^Bvk_ihNjaBu zrA)_fSLF^`Cc@|D;d<=eU_fBtEBeI8T&tF4H@UlUXzBnhe;+Mfz&6fKtT(jX7Pv$h zn7r*G$T;k$)_H$0FD5b%bcV9@lZ>Z5e2B(lVy;!BW7Lx4cC0r`mWplHaPOwco3X1O za}s+$pdGojhwf?j)!w8@U)wE`AmKv_FP!W}Zvcc&kmw7hjEQAIG@)k3!%Rr%+hv!j zuMuR@11M^o5?&Xw05egP3y+=Y(vTuGRp;m>0yK{@yj2o>J++Q!{VaVO%wlEC+03sQ zuXL$d{_Ied`?sQOKQ26!-zo7bcu=48fbg4KwuAgn#)056tkp56?%d{0+bn*lZf zWnH_9yml(K5d+q@JPtZs3$-krScvJ!LIB}rJ$37G0jnzq+c)oV!SX&e-p}A9Jsw?y zeow@LvB241r?H{xaqB+&h-O$X0Qsw^^+*c(_UWQ&k_)0KO&YoHI#U+N)nj`}YQCCq zS3Omhh7Hdnb7xmc=~=ofBWQIZ@S0>L47b|}$axQ1mT4=`SFw*)>re3?4a9__g$7Q@ z7Q7Zf+}X@LHjfJpU>pBMuaK(zFVKpV1lIUh9*b~F0kNF8To8jxqo@}EdT^ftF;}#p zTzd+&pPC?q(uRm?pFs>l=Dc@67qBzDD)?vn1ps|`H|{m)b(v220*IZ{{Gq|Zd-(Hs z9x1ACld0KcZ_4XwIME14Fit5{#+eB?G?KC=ht>xmZFKT-8LEDlxTPFv`Geo$0R>d1 zxrdIcB;%ay6d3+Y74R%NPg5(4N+XqP4SO2KPP@y#-;)+RcpP{EY|s83gelI^$EMO% zZ-cU|G#vNV)-2RN#Un*70BWv!1_eb;bEIYLbk0RGt}O48w+_BWr*#^yv14rE>)v0P zQ^VaZ#?MzezU2kgw4I$wAP-Wh(|EScP!^Ndg|AgiUMZ1 zrH>M@B*n`L)>B4Ts%+Wz#t$lp1{2GmYxavhP0(^vG1=P*QtUT1?-L(-C3cI+UfJL2 ztZ~^gG!T}zN`_{=|8D2Mq=rZ4n4M11vX|?;*@ba%{wZQ_gm34~`m%^{NT?uiyIH4D zb6~$WX$1u`GJuLiB7tgf^x7J#o9S`-^>Yei^rA8U*6tVc*zu)jW2|oSG}c!-@HSOhZo>3H_!G==Nqde{2t^|L?=>)DxTX|=k9$vFQ&Wbt-<=6AcgCd zjaY#pNq&*+Z8T2oHAdO((gCySCyD&Q9Mb7ME&UGFU_TqMd}^F6(FLtMcNZGAk0i`4lcYbrF7r zuaEuOBDv%@r&pp-O_z`<*YLM9)%MRl7;p~dxQet~z#>gO*&YB{f)Hfez%GXr_ud@u z*lTTqJQb3G*{`g9pJ01_#5Md-TxU<+JlkXlUn3v%A@wmo4vA>vLP^9d*eHIp>&=n- zl6f|$lPdJ*sm?@(9dPm!Q|AX&ypRBQm68Dgm3~r29gwCWF`JLMue+(Qr+;~IsABo$Lkmz+V(n+S8kLP^9r-AZ>Q-iO7h^KqjHXTDQ}xWcSf8t?L7m z6`&w^x-5{wiid{rezIGFX}cQce30BlPJ>Sj5jQ#?DfZsbRZ7ZDRgVbSFQ2WHo)28B zp_@`$c&EJpJT83tvr_1Sd-g^5I+of+x?zz@)12v40yi!Z$p?sXQpiyjG~*WOH%k*u z$)U-vh%W!qmDrMPN)nThk*b`8Mgu`4WA%4N#=kS8Q;$=Br-MuOUH}^FMRKZ2*hxEH zBx+e{+pTD0rm}D94gS&aaNXj(x3Md&a6Z2L+z!$<>1^WYZWkK+^%A**j}8u`_#uKgBn+-x>C(G=DYM z`RST6^44u{YHnI6*+>bm?qWSoH&Ph$9_ee1yw?@&^=Yy(gp&*baKf zH;z3V;C%xgqcuM9(VyFC(iUiP)cr`^J-vBByR^S&%r94aub$ZYo(BT(PHZYZjeAi<90UNtX4?zdx~9=aJUlI*VkSyB1H|+eX8a3ox*2etKUa@#VuGK z*1wc+bXHl^kflBxN*H2-YVUx}MmD(v7WZMHB+@C<#6|D@r=%C zeB18UZAI;!_>tLDq00$GDXRCGsy=3IZbCiB!?Zs4gn;lDk|%Hv*b<|&P}a)dPrIjv z76dM-l9fn)t8>acj7|YID}fWg;~TbqD9>y@F_li8aE&fd(P^f001!_&#z=xG_RHmF z_LP|S>uf2gr?#8Ap2rgOAOE~(0)pEz5F2#9XxOjzV|;b1V@6_i;I{*qB``8X6q1NO zFg4V-H73Zk#K;v`BnWuiguN#MI0Ta>-EOt7+H)|3Xy|>~^Z3PtQ?uGh{5~Ecl1fMM z4PFMmp1t8{`95L)*j<5iSqjZ=mHmwUm5|m#``7yb2>MElb=zso;O3$Hg%{r>`@ZW7 z0JXR_&f2jhVp`56hjTK>!rQ~WcfZkHmXydlIZ5NG$i;%odm}LyioB-$=}vZP1?_feNMUt zGRax|zYR=x!^w6WgEYvlR(NLAwST2S-gt{FoB=_tYYnVyt|Y6Sno>rCgdUI3O6Jo zUx_ma%w~7`c*wRN$-w}fAtBL%MhcHeotuI7QNW*uSNQdql%!iyf6SS?&6KI>K^Vg>fx zL%TYhGn@bT3$H=u)kmn!MQ*$)$~P6&Wt(FSV=ffR%Ug=p!H5>dZ{hZWs#6D)zVuL^ zdrlafw1w}!uE<{I+NF$R$yCCJAyFgIEk1D zN1w$)oPR)?2i6L4vRs9glA*T!58qS|-g{)qef0SFldTay=_jWlp4)a~8AGijx=^(GSopInq0H+m(S#5n#rn>%2KueBocwZoK z_s@aoxIhhN=s1A58{jf;jO~N!P8{QpeK3mc2qcNWGFOq=uvNrvNKut*yOe0ZmytRL z_eUw>POHhtOdZR$HZ4rHmBNO3B;MdUmwjqh;YueXb<;fTv(q{EjBU8QcJ zSewrwR9AbQp-{Juk|)tde^mXxCSikLa$*&UT-+Z?LM;OlZv$v|O;g|kL~1hb>olP1 zHmy1Nm1{Kpd^3BNF`}=c*K0624ysa147a2L2a&RfWZ<@DPZ#lQ`_Y@_E zh3tRU64}Paa?@`tL9uMNbrR!VAcDg@=mJUpdA$v%f?v&gRkphWfn#`Y+i|?kcLX}y z2`z)HY5>Xh#yr9P-fL#_S+2C9`*7kHfR=c{Jn~e9G3e){iBop~XNND=FD$V-BRf(! z`ER>w=(;w;kbPGu-X=-oZp=+*hqz3K6?c!xR;8A&zj~-jhHny^D^m>3#NMZV%G)Xd zP|44lW3IT59=YMy3)p>zO0x326rVr34xlm?;z|mQ3*MAHlTC?AmWk(6hS?F!ZtFyk z5EJXp)TKddP`{vYb)yFc4k8fU=3+lN(;v46qg*4mqzLYKWG@CXqqXgEYA~NLbYd$h z0`;+q3mB$(r$Kkn3q|pE=X?}>b+XY9!{a-B!>tx%vb9jic0z0 zn-q=DW8oJ`e;{8>GYvdh>lCb+61B}+mBG7FQ>G$qUzTcScM`JW^f=MKO%>-%;kQ3- z8`^!o4DwGOs-`G1(6IJ3;ypdFy{frV>z@Mo7FOlj+B(m*Q&fAj?Ic4O!19j-Q_o8d5eN~j@alWZ@dJ+2 zMP9mw*d}2b>rxXVM@qG&dX5b{$6d7Yk&O6OZ5+Qb?a^67SFK2Y8^WvVKn)+iFtelj9d_loOPFr+XScm?^WdfFZ z8$>S$7C~TX``$vyzWZgJi55AZc-*7k!d8OVjr&WiKJ@{|mmYJ8$EuxY*0 zPRTGk0Fu4VYsQ*lZncAx)R`UXg^QDh>zSbCJj!6354(OfZEqxytV%cPT@ywchEWDf zJfPB^Z!k;0TjRjCk}jmSx;-mR%}J~N@T(p9rh`pXYD-a?4O<~@i-{g-HQy>RTydTRMfQcZa{%tLcTd+V39Vo zPdaQ+CkO=CM`_;|q9qqWo8p?62ij#2Z_J zeo4X?0Ao16(pAJPp{QeGPM3hG(V9JxZPVoMPJ#1)*4k!A;v7;_vN+4=1IFQi4zCN5 zhZ}LC^W`VjbFK0UL!_1&khG@;Wt`{dd&l6J0G$-E3&&q1=R8njNEh(YdRCvl$x~8& z7*afHN?G0MS*aiCW;vyu&B`V$zUtIiwT)MK*)n;!j`B9>VPAQYFH>Z>8S7(abL2)T zY0~Fih1W6;BJ+fsF90N)*42|4LL`?XUxBv|TN^-q2cFxcI0Xj>_r3XUW zlegvIGwv9yQEWs#S>}z6Jc+!$`P(&5wzDT%lA;1g7dj;@LsSVZ6Jm{7(0k_`ES&}c zpxq0A=hlG5CR*Ygav`o5dP?hEQjvhf;_1M-!}Peb6YDjVfc^qFo}DFF(yYmlj$lv6 zP8t<}FIz>uSH9o-0c>C+n9!ZwfFeDmi2L?+nGWWDjoqs~`7_+e%{Ag6c2wIm{iI0P z3oZ4nLeD1IR-rH>#$+~xYtRv4=T`Y_5>5q6mBDIN{j*{me{aOY7~D5oO}Dy|anBRo z<|bR@m{q*x_&icT;Ty)cJ3=?t1g{{HxW{5Ax5-+hY!LeM2W|c>GBFX~p+MLl@>QXG zC&&0{&_hs%nD%L-#6u1e5FS_I7;e@@WwVc zNIKP)ih=LowE;+4AAftGfrhyz<&3`V;glY-ewS!eQuR>X6UTS+^gtF9?Mfu)f9hbS z4M`5)j1?kF%t?kPpfwpl?WQHeHXfZT%{3X0nzHe#X#3Wbic#I>c3>E6rxKeWH@>5( zo>K<+jf7od!z1_jSen%$v`X8k5T}z>Gej>bboh=TOOqc9Y$Zr#iI9`KpY#@Z+FhR#i>D@q|YcDjJQaYW3;pDfkQ0AV+(E zV;llLLP&Q-(fQ4HhaQgyiKC18vY{^scIlEnPHy=_548jmYD(5Yb7TDXk?=Lt{;tGy z*BdAo{zdQ8_hcg8=GGaC#vpub?3%KF8((>vCWjb@fG~v2F39@+X%Kr&DxkNyYOcFZ z7Tu?>N&!n!@ZH$m57AqQS9;}f%vSk)>@^cCE#Poe0pl}Vj^|^Tcy_3Gc0lp!0|mcz zx<|W;Xs+=>4^uTZVJDm}HG$(8*MN1Jm z-w%fynot5eosjayn``m9^IH&aNu~OyIdenqn-xSWb{%R1f2^%{f<(k*oI4b@MVb8+ z#7&?H{%W)Mz=Sc;&;GwP&)3?vC+_52IZmRT73*4BMBc5i!Q9PF05JTuNI44FaXn(QuD(XFcXlL5j9VYY=-;tn+>pn3ELP6d|#5u_FQh2h4 zzJ?`QJkh$HFD)-sHZ7`7THt>Fx`5XCbgDWTqvTo59%IqmoN#!!rx3B{d!fK0n!xiJ zqppQj2|$*S`qpR7HM(~$GMRDB@F_Bdq^iZUQ4SdY_??!W21o=B2^k zCs=rp78F`QDa&wh4?g~U8f#ud&V^fjqfiXPl4-2a0R%ztXg$}fydXvAfhYgC#dTL< zFIM|b&K^DXwc+Z}&eDjzT@+2gSclJzh@|LiuxRX&VRUSGr8xPMK=WJ$Jy5d&Q-{87 zEkN#)CRU7;!6qM}i!5-eJ+`~IkImB^xS6d4QL_Fn$<(Q0>iC9Bjkp<^`$9O^hvetH zs8EUR{G`=Eg;cpMfwq1Ey4;)yyso%;>?rIrq{7)FE&uRk{=-E1kPUq>7~MsDUk5JhD?k zhchfajjQ5LyXU}k3*8auVVU0E@%z!#lHSj1NX=7h%uSr;+&%0`%|v(xlPQ3^c!)xr zk{H<(NK3DP35M>~{^E!U`F+udf0Tm+IoI8;*JF8DYRfh>O$9@)5 zOLc4`uO=@k3AQMF6;D6_nzD#Q^naOogsi0`@+QF?!@DJ!20;y;#)XBLJQ9lDL!bEy zAF=b~`H1SuGu9nzOSiVm_C*{W1!`77J2YJ6=KUE>%Ga>Ki9MM-H<`RI!exsFI>s?L z@iXxf2LzpvADZjr$RxKoQ)-zS>uXFLgKr(CMN%Ck12W_h@6{S_^RTt{WiUA=$T$3q zEA(BVIE?i~+5!9X-jk$}^j| zLO58cHCV>)1wX|E^BE8P8hcgSWz!Ujy3-UR=M$W^x-8_FBYk?mFWzA@(Tft@aJ-UM z7_%VFu7DrIJzjoUlC$pjbfS65lYpWoEiDmUjJo9=zHBW=KuZ>$i8C8#l6pHGL|TW6 z!a$2A&2s7G5j$vT-W^2d{KEr5_C{u<+uDfEuPu!jT`9zs;kG#`5Tg@< z>o9aa4rrY6`zWuxofj-^{c(WFWnQ7$aDw^VKf0lW&% zb*t6-Nzt2(A2hK~l+>DVTn4{mW-4@pzoT~xYM0w0f3NW8{f)|~oX)nJ>^4Ps9yHbn zT>3V#*66;Mo`lGiY=B*{gKw6-HK%v0+*f8(CYaTQoc%iGQL81vHZ!fZUAlyy`Vg6! zXJ+GSoaL7&Emk&Eq-V)@JqkE?u{U6$%vD=h`*~*r6sDFxUx1VQ$ul+V>ajX}4WY&O z^`XUzmAig^XESMcbmDFJPMj>+Yv-I`F#gP%$G+Sha1)5Ed_F_Dgz8D$%&nLt8E{|)4Ng;We14A%h+|XZd{I74&L%nq$|);EUc)I`^uWB-Zpd1Ml-Dv z154CG*@st09~$8``vw=WPwkHoslXzw^QBfn)tT|r@k+h|b3$J#wbW;d_8c*rIb_N1 z6Ain(#yEelzHb=-)oOB>i|#d;HY=1iaK4yl4Cu=mBd?onplS8K?iS|i5|-+#D`e`@ zN9vdb&T59f0CK65I7g&)?BH61Jnr@5Y)AR%QGE_oz$our9cQ%}aI;tTg+!f`?`07t z4cSa^m-QuY1U1-cy|epX=Si#r*Lm#hzJX5Q+qa&%Q>R#dnh>kk7rf<$8`5Hx_PdcA z8h7A{TtkDbnn5GWHKo2FWx@?2lev+(;z`qJVkcf?nRo|J%twOq7}z<%p#6tyaCuxL zXVx`xrx(2Qb$QJ-UEh7|-tnJaSEAp@#(lm#s%blnb^AM1*JL0EB{ARMB0h6Ixk(P# zzXgvz?f%@@CPMP%`XhYvz1w9CjqdLIOp3?&NEQ)jc>R!m0JE7p#w&z~HuPSBg)rbD(y+3?ODsxS&l+zX&v zwtKg>t-LFcE@v^mvdX?7f#)&FnmStbbyk8`ob=hJ$n>hPk-g#T1H$4*^ESe+hK4#8 zjIT9|8$m+il|h~ig2WS|TNP!6GAD0*#-;hI)pOocy#Ry`9fX~8$eU!ZmgS6k7KZGq zZ$Ra!PGezk;pp*!0p2cqjok|$`(6OvL;&X|iJxL}e|!TfNW`)EYWs$6%|jn$kzE|B zn?_}yoFtNk%$gCg+225XVT;A83|YObW5f(1n&ALHqM>VvWKrHMO8!qTfX?-8MGD?B zsd8h7TCpDG7VPQ03CeS3PtSnvm^Uu~SYfE9kxX-l53F@JF`0#*#hZ@;9CJ$$65wK3 zRzJX}Ta$=WzEvA`jHCR#R3Yx+mrKhLgodqbx2E=N4YAM zTbTP~XrstqWNX#bMAc7oI;<>`9bRia66j&cx!tu$$OTh5R$**!t;-lf-XV2OF$lZsPC2W zBEMc}ygljC3*ZYR{CH(FvS0T*TvqTUE-A(L!pYOqcK0poYW<&XdId7}yWtEzeR*W3 zo|uJ&IL(2>mb6uZU|V}pi2k|xim+wa$+i6z4_neZeO+O}bS-VG4P8250o4ytTo#2~ z-&A?-;v&KV`%Ce;Njv(s$@<6AWtT+#_ot4aIx0Hop`!IonXpcSA^(~P@zfTIsZPoV z>g4vCrm_Sci1@V+PGW{-JtIEEW?dlsYuID9#9Gy$OBIWjAQUslQ%Dk)$DsZ$rUz4r z`3IHrJo%wH9VmA=4;A({397`)?BmZ=-Xs+jb)D!!fluyW4fRGE=Xti&v~xT%;{UQk~Y0}xvgIp&yY**Ya2b* zb=zsn=GyFO+pk)%SBsDlkP)%_Eb6Mj-uvo~tkJvQ2SVakLR9NHXio#XjRO4e)@hbF zOL1AFx(5+JUNc>m!THht)W+t7E`CDHHDDIqg{I9vcDFJ!z-v+=3~epD3ee)l{^<|F z;U9vCe>NOEkB*FZe^s?>GCVP?5r$L)`2fX-L{1k=E6f4Ef4@2b6Jy2>e$K^gXBGJs*^e7!IWIX7lK+5CkH&mTi+%;@PdzF%PgC|Ec7%dV=ZR~ez? zaqJ>3Y|eYg1AtxXZ4l2t=2hpD%OEG&d(?xqyZId4SXkq3}z8P?xw zB^J$A#9~0nhiGssz%w{O*i%I_QPcT7;iIMUYAVI|<^^5m4Q)CtEQhFsH+XSBT(aVE z)c05`;JE{5?0)W;mPMY4vyA4RCrK5T6AGJ0HZ zJnuBQZSD{qTrwHufO7}hAJw{AXRA+LMe16;OZ9Y7#s!4vwyOXPfd^_!@`IO0N=a6& zE``f(t6$^w8;FYo){^E{uve+v8Gc+#jLh?)T+qs^`INrdm1TvXwdY_OJI0xs>R%r5^(@AF-tYKc>fkt z5tQr&K=(Nd^cmr)?Q#0u61NghOrM*mx7PhH!vYL@U|O;^%j3!=a*i~j$HY^e=nJ5N z%-qjL*GK#Sy=%ELa|Ej!fn8~EPD#QAd92MQ=pAci0wIQy8ApZMvzf%t_#aTV?*oK_ zN!gR>uMpXlG`QacCUEwWd;a#OPgU?%rvSS>_@5RhtZgBGt`$i7WYrz|I1XP!2b_4@ zVyj5=0{AqeCTl5erTnl!JV>1y$6ey!9E3uQ|69*y31ZGmk|ce~G-puoU7UQ&Oh#qB z4$SSGb0X;g-5QQ&%&Y-sGs^_xHnh?u zM|6MznI+kR6<`qHu^O^3_}Kk`p{Y|8!kX}NT0Vv_dWcZ!OI^@%rz?u5QPd?)>~KXP zKzUz)U0j2qN&;)Y3oJhdEWPj?^AWAVoUT)JVZWdIjI$5#{RD-13$COq`qD+o$-|() z4xy*C+`%`$nbyqox%LwJ2<|nPLmt;%Wd+Y-lI0pO`QD7%=KsJa4Uz*jx`B?*f@2NH z)OTf~F?e^a)$>NJ?Jb*gxSeQq@qfrLAeY{dhuJ&HiHDp=X|)>T9C7?@q6?tKAD0 zjBjr3!iX*2p|0lWgO#phXw*QYK{F5I6r~K&(ZWziEn)j87W3~`vwb+LFI^Jb@*^|_ z`s?BSab#Qx39A=?;rg@Q3xM+Waj)ZSqqxi6ksrJ%<@+bsnp=vsZlGV*Y8e4Zvzb=x z9db)`mWE~E#DUS-dGLo6WqjiyTB6Tw5o$ulBOiw2be*Pvh;|!xbTI*!k^Mp?Mmf7B z(;gW%1!wo<^L=TRK4Rd52gA^krR=;E>5G+`CHaumHXBf~8!|BjaXw{<_M?aNjVqUl zd(8VFu?fn3_zu!-i+~5ac=&!{1D^Zf9T$4(S)qHwR@lwxA?ld1&9UCkpw<}GpFyXG zIkohLjB@}Q7Ue&@BU+odVky>9#(7c7EU$^54tl(mv@f;yKf`I@n7XO6#Vb4;f90V~RNb8(IX%O<1zjb&egj3aLIyD6Nk z5bWHx-|y^Ln(vHV!94=uCLJA(bqNaI#tbJ|QO%*bbgyx^Cd9ZdG)(6 zJ*L%zwq}eg$7=MW3sWMwiH!tSur8^nC{?Fgr{%|T8s!gIG2bpJK@`rp3XM@-gI$z) zYh4EDxLbd0H{#18AFVZt(>}>bV5h8(#kI-BXC;iHPzMFTmkx=}_>n@De@>ttl;-_* zhb}Ldiw06?#Sg_tSg_IZWF;O2{&Lhy&3!FSDz9Qgc#}|TX`g`;K4D<@oQzwJzO>(U zLY2znMd5jVyG>BD&E}y$Vr|D-rTK}46hB!C=Q7SY4p|jK=TfaSr~IUG;~^-d{0FU0 zl*9eJ5mU+fi6SM+*Qvsczy=+U72QPp`#$0ZT*krMhPuw#?V0d&qjj{%qaQpDlEnM5 zBb6HFMPaBvy?Rzj5B=iwt7}&U;*#Z@ae!_9ze5|aMu2F3Au_qq>e*#?`qT@)t{XY;uKD-+9#dUbr zKry>H9)xwTuRbq5t7-O7K0NTwtKNt z^OAI@kAuWKGf5MR4&U+90H>TrE}!|yHjMB++~Yt_!u1V(Lcha`xVDIUY&ka{{Z4@%g=x!hz4f_jJ6kNc4OKx z-}~JM%lESgTn7hoHbSwEB-{bUKw=IkXRA&XTrVbx{>eE05&r;ur~d#GO16`q;UD+P zfAKX`FyI0)--tiPo(4LVBi9iB0F454=K7+?*)BUM{FDCxh^Z3R=~xgp`>xP&>_TVq zs<M2cYfw_03Eb*kcXX91cl6 z0M0o*zca>hgMdyxO#L9I22~g&6(EKRVqA|*sRRSi`ifhePX&2%N>?pP$i-!h4j63N z&zR#OLVAEt%-H1cJ5!+3BZ)HVB$$r9Km_BAbqA*$vEhDQ%}W9lZ#DM3&HxzYReA+b zJ9gvmACw$!HDwQ&&Aa_yR$_YbgUI6;;NyZmRr!APT=Wx#CC&F4>jj(0pKW)F(Kksc zLAj;czv|S2qz51&W$Z$()yq{!g5S^B6YT6xRuXr4NUFgjErGfIZcYb1amX7t60Xc! z?M6aMvwiK|IM4C>54qI*-*W~%QS_^eyLhxIHE3r=aVj*5ElPLN_Fi=OYi>x091k^ZP+Nmkp@8MS7;;D@r)ew?bfF@F$g5%_%MI(nJKVqcUShd zHZtfk*u?~ZE}&XZDts3CRarvhXS0*VTp1~a87;u~BXBG1*ldqlQqac}3X~^i?{#r* z<&GUYO@i7#C8db9)QK30*!hR}vU8QkI2>Sf>Z;xyODmPsr@0FhQb@DL@-8J2u!=Pq zAgf4JF=gBU$iU4}n;}(lHV?XR2j|}-(36j*DtMPsx6<{effjpru%0`Z+CTzEV{Ouf z=X1oQ;~5~Hl~zp}U~9U#xbsI(Pa*ns*N1L2_>)h)o=diJCRrqXi}Mn{Ghsj}%VhNf z9qUd)Es!kp@J0?L;QIdn6;<%%<@oScp9PMa9QH80-)EWJysk{d%efP2`CNbrPg z)-Q_g;E%(8b=ba-Q3Z}jQ3p5(0{LmT1oQI|j-2sLMV%Rj0yvykBt752>+~%|>H4*f zr4+J4uz95(*@=C{Hi7cvXl&qua7J^-6*QXHhHbTb>8><*Ze@^LMzcw5B;p%LAYeBD z*z;p)1~5+MimU-prH13cz-2s<*1E}(^4Z=US6KT4 z!?|6By3RbvH;Qs*GpqHyU?N7ws8`QijVW-+9+Fd}l zaLWqXjkvb8Xj)8`DoJ8?^Nsj{;nU+TxWSvwKoZ**o2iKZh*F0QS zKB~k@qS8yT)p+N}QtLhsi$%GH!%s_l=nNK?mdyl3SzQafip{lCcijtKq8G(Dw9?{_@&!?yk+gj-8@XO;6Nki53CK79DZZX06bU;vd1%C=8> z_H75nTCamr_f597)9w~I_Xc>3=ueiVSqz6Ga6S5cGg1ST!!YN7M;nR9`Q!fptyq2$ z*FM3n{{Uz{AINC|G9o^65l|UllocAWYDQx0b46&f&844;?3YJUl7w@V!ef-Z~ z)8@3+B59$GW@z|qC}KPMXBD6{+k1tI-YAesImYd)@`1|{$K_r3?AN2%Po;RLP@7LT zl3K+Sk;H%!?t$1wp#K09o(Hc^MPPlkCf3sR$NYR3Vt?9j82&lWYUagrMx2~_9tBL5 zVQbS)rQ;@*ypLY+H^YV0Ed0<#wWMcm;JcaFb-?33Jo{3@MDO!4V19%gXWF`5a_%clD&|Q@8{=e9d$SAx zKd-fTKUASCFSeAu>t6TSpQC#?rR+#C78rL{l{Kd` z{C~)ac|T5aYT6%qgahl(N}WgHUg7AHgGC^vsRRGl`?88CprLAxq#NvV?a3iY09D$h zsL%F$IcC8-6r6npMAy2?j_1k#D)A!e&L#tRd6{G!g1vK$`X68Zy+@~fP`Rtb!)q@JDQznC?n=gF z*&qZkURVM!Lk0PVs0X3Oe>=lr=t6JbYFBFO&Gk94(#<1MrAjeUrj^ouOIsN}Ch?Wd zwKRlGXP!ZZk&XhW_uv3MumySRNfcR3kC&cGjQik_Mt#TOT{nZgINl`I?X(o1$!9|> z(lE;;Yl2vhT#yw{`^-8h?mi*>D$+bH0lCv}C%c{~ns!M5DI&%shyQqxZQYLQr6uNRBLdy@UyzK!-i zc$W9~s#LDkJp9T}^Qr#YjtWDy%VZEp#ygfHq7MDrr%dN-!hRc*#X9Ytij$jhFfvOn z0ofW2%y}Jq4|AIJe;@oO(0n;)8%w*mo^ceDd2Ux^rW9!k5~>Q46p@Yz7{DYE(^nft zl$2%tT=TFQC0s=}h@l-7{{REQl|{z@?~R*tF&Hxu-1i7O59`xaNeV~iark!h>^lyX zr{PT*{7J6bXwb+b`%dP0NEk@bcQa$yaHFPioPcxdemVG4qIh=AWzny0rnvItWe&!sJvg7dy!WA50zy+vH!Hb;M`S|VTMP0Q#ub+sIODi0<0;WUAH%mCW946$?;_3Sxq*IAoaA-j z4t~7x>DR6Zzv0a~>s!^d?Hh!a?nRB7Kz>j%&Pe0#s3#u0SG@SQ;U|T3%Ns<}u4i3F z<-$ifV93(H2(lmnLNUO~1>2nS(zLIQrA7Pf^DsF+HyWx{q?VUoar5yZV%neuRX7;w z#}x*hsNY#ddb)k|w$a|g&|D%m)siwx4a2#?A%3I|wV~nrIrZ&NPtxGTa$iV@3-YKB zB$38;fKEH(-o5X|9|-&*rdV4hmvL~n*DfPVg4>kICkiA?ZP?A%XkEF@I@ro|J~kOf zQ;x(!bD-?g`|Y|uW}fEdG^n(ek=_`t49UINl{NVkE4YHd0CAEIXswH*G^lRg`yJ40?P`-rH)S24YXv8@Hsrwb(n0mEebsz-%hq! zBUdYRB(WLU+trh2%BPi9+;Rq3jw`G1=ACh<_?J)8E)j`)wSwhiI6GENvf+myU>-*! zw>9*hxA5!08ZD)@!^3efxS0|ByNU9l$Qd}3pwIInm3+c9cURKqc2R@IVx=mOX*BJx zk?}W&wEqC?S@Rt3lQGWpV5A>F(Yfq1+rBHHz7ox6s96XSO$EvjH?pZ z&me=&bDG(@(HZ#2?x36I8NCsu>jEv_-T0 zh1b}ybFj)K@_lo(w?4S{ucN$0@Vmg8PlkN=6U}lR43{t*I=|iCBOfLQQoDH`{L`fhFvBPi8{!rbKfdeU~FWcop~b69e{m#`c{X6@BBL#iKM&NqMi*TO6Ex8aV)ByUKAJFoB77OvJcTwSbuQ>B~j3Pqa6X(3#xc8Q8OC`nfZagw`_xavEK`X9pH8?^Bbg=?%`SUudS zGf2}3wu#)#Uo$w4Mg)W?cMz(Fd1WpM@~;!v#b@GeQ%=&=-Wcu*+oKkC`IT8$EtWi< z`8D)?@565dczeQfys39}FkH>#+({YToH0}cCtQ#U<2`EUkEIAka@93|kvI&$6^g}G zg!OQ|Z|D6Z!L)A`-06&t&hbd2iDS<{mm}$29p}U+xeMn_Ez^u`4#xxQn)A(9OP@^E zE_7_Q#Fq0I<0>%Hs{qmQ*_l~#I}=|{+#1Ymd*0toZ+9TuCf0HYz;HQkjo zHNGU3{cW$}HysagP6C~ZPL=c*BwSL`W|EK}|Iqucl9v>;6eUGGBH|e!Y~oNLWWhP60#1Y-B|dG;LV#K7R;n)eUz#_a%7LEeAm!kHPhZ7 z3u>@msWPRF%f@8J?qVREk8VF2?ewnzcyB?zOYJXDTWf_F-mLvQj26dk_0np3C8oP- z_PV5gVmKj`k~m;gjHw+#ApL8%7n9DlZ*9+Qv^;FDp9_L`S=qOJeNTzL58LnYdjgw- zSxp`QCp(!x!oG#^W}7v?hjl3R08E0$=*C~~58Sen2#qmWoN(Qd_C}nCX>bLt_dd2Wc4JSzu{j>c#lnz(?h(9{1$U-aM2k6&P+@W2=>pu zE2q;u0pYzG?QeA5HaI7Y5FHB+4^Req&%Jdwx>dfhYS!9{`H0|xxgY>|?Ss(cgHIWg z%Dq=tp4(~Y8A6^92=MP)xA>n5{2+@yGq+a&kF&~veN+s7HT52~r@fw;aSiBWx*47? zGY1D@2M6i+*8PWod^MzB3;PW^D`{dME62DVe;)PJ-f3}aw#MH5H>->hk~sQ~Y2$Kv zVk-MiduW&38Am=33h?sQ?Z3SEJK-E8_};-J0H}sk0|)+jFg^Q<`nOWk4V8?kdRXp` zMuew!2%MV~F>1TgK_HPqZ`(CRk+MfwR8_UHMIXvbvI z#MJhj_I69|44qE}hIA)qcHW+6!2bXWAz|aa9UqXZGGO=p#Dn#(udej3v0GyBF<+R) z<`8h(PXPN4ndY?ZyaC~@GUhAG9WoeZgykems|@jhgXzU}S2}uXFdKWoUOo=f$3v0R z(A8tIcZi>~=eCyr0EZ_gQ^4WnMr}K`^z%Lh_*jg-Ink7Zgffr(fgt|1_9U7-dV0p! zD%)MRM6w;&U^v14S*!NG1Mt<2+*ejwY%t3S$~uA=agGQ%>BV((*~fhuhUf-f4i8XN zUW~pq(S|8AFU>J1A)3$l5_WlF#-HpU|HkxcPO9>2)iWIH}K3rE-C7RvG<=l*bK?Abw zF-}>Hjb7F z8_$yyy0R;fLbq&sduFZ0;9m{d&m8ueUA#{hF|sb!Q`mwr&MT{XHMxkxDE;05$3yw{ z{3@}TN7g6K=W8nuCWP=*XG%`@ZJ(e12Sy$~($wT^z9;o>@vpO6NJ~N|xmFQ7f~dzR z8#x#qx#$n!R^#wDhV3Uw?eyDpc+TW-xMghTDn>ACsgludpzX+ApL5SFs+ISiGy- z$u}!mSb0Pzf{jQwerDPE{{W()Pl$GS$sgM)z~hV?jOX?Aue0RRptIX^al~^v;a#%3 zv-03}=cjDd-}plG24S5)G#tqnN`%+CR7#HnxDOluS#aX^x z*%&xIIs88wy8aIE{{WaJ{>`>xj3fujO~JFB*~W98ezm-95@?JwjnQLiQ_zom)5T?e z+m`QTV9Kda2kmvgG@JX+fD8;iB)hi#zuV=2$IJf!A7Gw;4xjyc`%--#-W7Z6p|%%o z%o)C1=Q-MV>;5&NFN8D(edkQJCx4h2#DwnaoZ~sqIrXj6Xe5WonM0;Fm0`ghF^-tU z7>ub_QBs!5!^@>tas{Xa-X&X_leCbF0>SY=$tj1k)y#xd!Nc#NG^ zj1;Bts|HyKVJB8szdV~h2=QgK$H%&(tTGjCM|SYPE&~kz04n<`T_)Tk>NAb8o?H|1 zoOdhJ^sQ-pEup)!wx4R@vd45u$vtv$&U)6ocFX06ih&x81;-zi74mgiLNb@at@#F9 z31KH%eBT_K`_F>>V;#gkKh-X+W0Na-vMh=|Rlr_)9+>|CIIpqpbch5}Y8L|#o>&$; zNFB=b{{T6yd3-UWx#q^*k+ZlMlbrGCTPp&D5nu!Z0Y^Y6uam~KAqh+2jkNg&T}|OC z)~KcN%KreF@K2A@<{upE7cfOIKWJ7-6M(pl26}ZK#A3e6mq~%6eNJ(OBj(E-F!xc# zYQKi`gP-&(W4nwPkoEj4T03=B5fvL$U<`3iwow|;rx{D(jkN2qWzd!uwR*Ss<$p`I zc@BwWC-KGO5xO)!X#?3&N4Hb@SG6G|bH!)Jr@?KJYZ}C_)FOokw{LDMMMlxZcIDU= zg`@26ey5>`t?gyZJ0^~_lyhF8$}JS$dQ$#00sqnazik_8PSl^{K|^u;=*Lr1e~mY} zs^|ks=ZXT3)ghv!2+9I-eQ9w|{{RX~0A|6Sl)DEM`d;FIBH9mHP=It4@k%HGn|aL` zsVS$SpayIoN_IV|XrKmc8P9rL4@z|u0NiI8?MsSUbpS?GP!tYn=7B&BAb(mgDb%z8 z%nwRHJNNacng?p28IQ};wI~D9jMIlokYftwlnQ+nKr?Uipnz%r0O3UdGZbSK`YJ$f zDKX7HieNJon{mLW_oOt$Hy*U=aH4?>!RwM~Hi~%bPCY0AglF20lnQkP4999rVx&DO W2TA~LD8)XTKnaR5OH0~-KmXa7Kjvuw literal 0 HcmV?d00001 diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/rp2040.png b/bsp/raspberry-pico/libraries/pico-sdk/docs/rp2040.png new file mode 100644 index 0000000000000000000000000000000000000000..ce4e0f1c8f02dc7ab6e3d77da51ed7ad06cd6333 GIT binary patch literal 81684 zcmZ^J1za4<(l74r?hsrTg1cLg#dUFa*Wm6fPH=a~q9M4uTY#WJ6D(Me$2p(e^X|KE z_SZYr)%CCLs;TPj>FpRbRXKDN5)>#XD0BsRX$>eSXo5F-6ba_-yVybR`t1g1EukU- z1=W;<`UHZ1tM^*!Dp;wgKrz43NKlB-I8d-}6!hB%3YrA!FNrq_$_$$He`z~t#{ZUi zQwz-n^_OzYx8erP{Wp#GMu$e(LczV=|H5XxmA@|exAIs0@4K3>U!v^C<~f9JFl>LO}`p2)>bymL4D~A4dl# zcR?Q!n!hCk-{`;C95hsai+I?J(CDhDQAs(wSyJ(`1K2rfL{X@ysD#}ttOPZrW&a!g zRuiGI@$hgF;)Bcx||Is6D z>2B_3>*8VS>_qjKUXYoyr-uj)&0ih;@AY5fv@rkQeq21=9RBXb!koj>!P3#v$-|w4 zi=B((KjGf2{a>Jy`+s}m%`Y52AeT1~=YIrQ`q=)KOY2i2f1XY|ZY^{8yK^~T({~@S^ zIsQ%NU*7#2E#+qUS5N|-ogGB~?->0roc~1rqvhX`QqB&}ZkjG2b4yXK|Azd7^$+R4oGvKk?C9cV>HhcV-g@|d zc>gZ1t6}Nx?BMxVNQ%Da{%^oPng0&>m%Nsft%vCUK>m&W@2C%Mwr^nz`n#JqEB+qV zKY9NyulFx~{~Fdmng0zC=J+d*{*hPzm9&3z-?CN|G>YQ&;qL`i2Al#U{69-utqXdc)m+i83Te=pbx z?#0d^WRjn-lE*@hrfTh*G@Wg^xzXM<@?YAx3%veiv6cJltIkqb3Q^~RyUF30yXvP& zVPBr>{V`VW9x<2fk#jE<1_mp5yjk&0adMkp_+kp{)ku|Kl@qd>m~nNUlt$8@SCilE ztAMEyzr0R+wUpytEs6z*MPqA*v=GS(TOL(E+33SBV!3Q zkV>(@b%rv&^^P6lX9sC(?)hwz6u|u1MymEvxPEM57E!yz3YJp*S^#e%Qpw4J0?juc zJoli89&&Buld_MUhWbG@8RbNLh+S@`rSz`FM~(jFr~>mcqH;Ih2%a*P+^A(sMY)}fh_J+)F!>T?c( zW~Eo4V22)ZB4u1p#x;teC6(I1eswYeqHpQaImt3Gl!H1qq#B(@vpvDod{sfx3g4s! zd_^LlC2lQ3?=f0si=T8nG46qqg>I{G=C@!=bHchDY&vPh&Ru=glaj==hmXb<^9$u0 z%+n@(_qaqRWjjW6b5$zVQW8UUT&jicG2OeILxe=S%btW2Boyaj?SZr^Spv>`Nh+#b zU=(~Mr&cW3E;asyC>qY{61@nS$O5*5q|qgLyq?U(gZMmk3X7N;eHuX6RjQq;uA3`M zv<@Q2QeHZ(9|O9Q)=ctBrOeg?pjkp93hMGB+i2Xl45zO?z%G)2;?75XbP$zBP&q<*FT)NC0-#%>9EdlcKGmzzi#H7C zv795_^TP+H?57VJF1gFFr>V;oVAy&nvv7DP| zHdt5OeVK%lpp4$0?MsH5l9^Ago2@eJduUXXl~PTIu3|vZA6VeX7F$a zink;HF~4fZ*22Z?>SZkSk6^w~%vh3Ux zh*)+0&zoF}RYche9g64@js=>3Ztu&JolE6HMrE z1X83*x{QxZskCF`y^&el0_{5jmb;@sbp?v)U<;JyzW30{`C1J-+FsYfY_5O}CPX9h zFH>SzMZ7L56(uG(kqriDyV`sUl=O*KqVUzpY41LEREi%W0T;*nRHcBL^EG67Xonj4 z>ivRtx(YwN2o$ks7TTw@nN4i-Rdc>NuGi4<9sll84FIZ(@l@(dLL6Y%QuRT~?giA1 zw4KFy#8jPZ6>#@ISih=xqhII)5|RdoD^-kjmiii>W1(pqL6%f5P>kyIofrmK14fy# zZKiSG2_AA4YuZC#%gKS%h($vZKk5Yx7!xU*{WMcy1JM_;mQea9v6%Qxk5y4LPgLItC7;6(aU&Bk zXjjXK4mGVZf1Gk?{i1o4elj6x0Yd)K%MHH>ozES0s0`D`&MHx*luHasB5(aXE8T!R z$<>V@CGPHNT`bs}tN1+u>#=SP$uL?gq+u%Bs+g!cFSLqshlUHxK&8nC@3t7rumaTC z#u)671|Q?eTHVk*;F$!X;o`Q(UgJ~ebf?XHp43=>-#n-A#oFcU$Z+W7NVs_yGkH-j zFh92N52hreemQtc6jsEuq_0kLcOHk4U7J5RYeR^`yA+EoXA$R2t_iE8t^GLdBmL1xOZB9US~h zNJ9}pV#dO>%!mUK#9lLkIA-;QtxkB6=*Hk9=6aJ-|8 z2-9gf#`7^)6T}}CzZ>$AL=^VYI^TGe^>)|@)+i5#&SA$Ta(mMF5Xb~_{AKv zgLr*3@D1=$8An_TN9Aa6(M7rdS9$b2mP&Y=(JOUG@p*E`hJF@FP{A4mmxjZbTsj{$ zjN7nc4+%+Y$nQ!k;u&BvEN%9g=1$JS{&11-G>xF0gM662qs4B5;p+C{Hu;KF#bY)j zO~(VZ*o)stKa%^sM{2U;>STP;Q%JL^dMZDeVkc-ExyBVF<9)Wh1YT_p;F>?t{_k)B`mInP%+G7*_IRL zKni#~=}D6dy%|x4XdO+w(XM}5E|?))16e>O4;2}gS^8DewtwlT7}Vk5C)zf~yi_8z zj~LMC_hQDqdeqfeUfLQ6LbX9Z_NJx(gq?;94DjTU{kDRn;A%zL5?kNq42qX#Sm{o4 zU5GnD&K<@xv6&_Xn8Tc5OtJaEv>>4draB|7NJW^|!K<2q^zlfgf;8j9??tI_jPj`^ zkNLhaL?>KCgI1hp(XgVL-iicqvU{Tj&lQ(=YP&~WrHqDK%d};gBTQ|(Reh;;CF2c| z`p#feDm!3~1Sk9o8K9h;AZ5R4i^L&?g^L~yNZtKVrp|U^pZtU0Fu^YR3oitYPUjCL zw!&~U6c;~2a&5ge-7H4hR)VdZA`ORwzQ8D5nA zK~{P2QgU_b+HTFH4-;cUO*ZN%FlyfdynI;Vmn40bTG>eMtw91OMD^`V4(t5M(f920 zX;8y%uY^Umip#Ad$Q&6lmAOXRmo)@X)u?t%vL>0Woe-v7qQ^>hO{TIZuf>>1XbJvQ zN2Lm&nyysUNn=E8LP4pc5U9hmCFl}j9JAJ&awSlX>Wz)6V!@uOhpp-04F!V(xa!ss zif<&898u`%Y**KS3)=$t&DpExrnDpg^2R=bbuzVzVpt-`4-|W(*FMym@u<8l*jcm$O{go+0>N`RPV^*e?B_+`U zpExTPlw}YdL}ssSSe5t` zr}{rjS4wPE*6e=xmDnFon|q271=a;^~`KkGx}4@PaK=s^XKJ3PwDD3fMb}7 zVmF5H6_m5mvny%1s=P)xp^i<2KexP?;Y4QsZgqnMmCobkGh}3iLJ>Z#9pdoe28iq7 zhR}tFN{9~uq@&m}PFR>gFsZeiU>N2@lAEQiYR-8?V10ERs7iWqsB}4^M_ig!A#5L^K@<%6TxS?TG< zuqkCVq=r)guQec8&$F&t;l^Othg727mO&#|$1YqE$SJ{<6yc1U!?;f}^N8P_Sr|L6 z^VDR9u@x)AzLbX=4hxRbRNb+})+=*&YXgWMK(qBM_i@0_?V@&vm+I3M z@}yBg;iokI)}@N5jxAB5vzQKW^q@v0OcTb+htNPo2|~-mR|a!BdMA_1u*hobl;I@C zthunt3B*xp;NPEl^x#36{w{IDr^!zlWwibB1D2$EOAt0iJOZt?np?)!xX}#>-A9svm?_QY@$M!6i(?VYjm;QS=zXHHe3h>%BRL=5H3H115%Kj1+cii`>p~)43|qJiK;2t;-v9l;lX&PO*UXonAF3z!4+sy34PU5@KR*I)3^%l#0Jc|!pTZ3V}8^9 z0HHEU(IrF`rT4OuTi2DBw}q}HB2!RpKSw`AM%H&R_oV5d@$|zFs^*P>YFJ9aI52_1 zR;pOXQ9!Mo)^Cdg>TCtWgm_8J2pq%S9A!yn%R?O*kEnTxIK_i-HGOu}iA2GWROtwV zb4!$J#xvQ^g(Oo5cAuR6{s0oD6=L_qfgs}yA_fbW_yFfnA~={(^Bf8Mjq!0kN0ibO zUR`(2C-QlL&;<+s#EJ>(cxgG`;cC4Kz#;}PgGtNMCS4B&O`6p)v}pemPBoSt+hRB* zoli}?)281f$@V)kxB4bA0N$A#;ul?xhcjl#Uz2%}mi*}4Dx;wBPQMN$N5l-EkHdF6 ztmN01s_fOGK+)66A=W(qIGuAwZ@~0XrKq1k`u;5wOd}#>@fWHsY>w##m5v4Uf%nIq zIK$QHiX_j?S$1!ml3~BPQJC?JbW)+5*~&tL$CR?{j>+XmYdu5KScVLr1X;sMrcCvx+Ydgd|ag zYE{$4m=Cm>Cn8s#`G+tZw(1WiaidAmZ|)42>bIY;mkxn`%{E)tunED-(5ynw#^86u zmiR2%vFYJCr#Q68#C7m-8hHh43&mhUtSq_R=+!GyyLy+6m)2!@k)2y>k~c<^Goj?j zQ;>clDGU)N$ z_8vx?w1>$Yy$#8Mu558USjCgNSl8IJbS8tDRZHNJv`R2_zeXB}-0GqEwX+Y;JRkLF z8BuGuSZ@{;Q41xgoWvADCU&72!5hFPlKcd0CYWdiBkTM=Vhvv&SA-IdOiHX~jR22+ z_n{-yY;(8mm+^$PAIwVCyP7^Ut7QActaY**%c?1hGk-POX+!~aLXWHu)I~DXxKV-$ zEpxTrCK1f6z3^3d&{~B9s8yWOk$ZiqE61H*tIpk}ilMLG1XG5v3*eA9GArG30qbyL6+}#=?KO0$1byQJ|bt7N)k2VbsAL4IlCZY zzw$JHtpH6>4y8J}dJN3M!FQd0g4B8mraC;s?>U*jwM|hoi;+Ja?lP9cyIh5*q#87t z(_xi&qE$1<0}tIk#;!6`fMnpCE$HTTH;0*{6If}hQ>Bngv3Wz7Bfz}Ei}F;*%Tlro z9J;7LYv#pNng?c8L2$Grj%f-b)#f3n}{38=X7>? zVqT{Gkkup)`f(!*R{f|?w-jGpNC3`25r9(%+cT%(L&_Sf70W(w$?!w3m1z*uRFU+i zeA$LA6%n1d&s0jy!uuJn#63-*d64$(a0$r zaGfDT?G{Apj&(Kxs{IUHVAb7nvfv!1dBlZio@9X4;&&qWk@7-*!{DWlV_1_ zdgBd@A=Gp9T+X(I0@?K_=$Q1g=`nWDn`qN{^_WstnqIkO#%w?Cig32(8pV$88lh;z zMhNrb+nd1Hw)<{1A0p>rz2E~x#Z(kKzPx}ky~?xKYqg(-QL60k9};BX8$0b6r9G@G8!_nm&qy&#GBsKn7Wulr$(7v zbNy*b^!sB{q!c)1;fSc zi?P($Dwe8Ufe_)nrkP)eoM(5YtSW5h+}J6VG|xsw^bs2_+$3W$j13=hBFq?HX!rY=3;FQKyd* zL1Qz%yW8)w`s=Qf-MewAx{v4Rt|U09$9eWwk`Z)+_1ipU$WCbc(nfzdA43J9iKR@*{fcVkkq0xSz!&4m8Jon0HCyyydcovL3!5pOB z5$7ZuGa^frJ^InUKwjRm25KWf8JUF`J7axdPmJuIv)RA)72KoMxLDJq`+3eLUN$Vb0CPO~Qxe5>*^!4(le7ciD)Gk zWy$r8O_eVs!&Fp9Xep)6tWb%u`0A()sjjmc)|(IMn!`W*(jmgO3Valx@Er7O&UVM- z^(lhGN4sXFIa?ZlBO=0aVfp(~>syxgDG zxkS$%vQB!MJGFd$9al0`=K1x4;)5xd|KsC9pXvTFCW8GbX+=c^*>CgOb42eQuq;7f7AJuHLo5Xoj^m&*X3%tjG+X z>}sP{vqaE>Y6!o4{F|mv{_W*+Fm0!oGhgrNXpV4$)IQ(%JyGm}B~cblic9yJ(`S+( zQS%qm!wTo z;c=Y#Fb(Lo@IkOSGOTV_lhjo(@+)pHU8y5L>DgKHDe36_rd62F->+0!Tn=?@ExPOu zajYMZFt0J4u12M$rwFp3l`V#GP~I_=1VQFFw7R&p-2KhREC2-NS2C}*p6fd<++fA< z{y9^Ab?4<{RKf_w;G;{#l6ThDMJ`wj?7=?#6!2l703_#coh#-jdpQnHKkHZBAg;MVEvmxD708ylZs zVCKvQxkpW%M9G4qXHJ=)kj^=IegUEV@85O#!sEu~>8Ne~Mx81U;~1HNn91f1NB$JRnqgV`71X7F=bcake~liOuR@@rgeq=>BfsG9nJ?o zm>_~nQ4<#ssA`jx@>4#yQCLP=+iC7bplnZ2QsoBaw3fYbFlWZ-XTR=RSqizxyhbFo!#=q&lzvl1^s-v2&2+ym6g)l6ff`0Ein_bqbGZtQ z*{&h`LQQR5D|Vg_a13TKK|L*BnmfLJ)nGmlaiT22MMd*q#lzsbKKAH3JvBJjj`K~L z1k0LF53ktCXmi(=!x*=#^ryh#c}(w^<|$gClqva<4*{@kfZ;(b3V^d zLW@zZDINfMTe{NcV(`3hImZpr7#->qsWohL`2S)r`Dr6;;i7M-ySllB5=GOkDnJzb zd0pgC$M~0prEl3Lv200mC}xxy;ltC(dV(%Meu@*a$J5l^wQUD+E8~W@x)*VEPi z<+Z+PoRk9MCt+i?z{KEy*;y@IF)=W<(m!=gsy?7OSYQ7}f#&BKOMBYpN`>{M{mW77 zMhwtRm;?bPATsMCr;25<;PLOS_?=6e=DAwTcb~eve+E3~|AA)KT-Q2e`rPtmsbSt& zlEk!|z8ui+SCti6$iy%P2guW!XC_;DQnLBVO^xwONoXVRhwCSV7K-wzwpt995-Nj ztjXrH+8AUVVmeBR6dBrwHT6NR|6a|0ad&R^@Gx=vSN*d6l#z{CO-zG`m!6@N_QV5i_~oM2v74>t^EUIlCaFF z23{l?2A*1$&4jJMGVT_cnc9fm6wl!h`WlA!3={}5NvFfhf~dkx`pS%mC13X_(ciVA zaOvtgI-Z6ty-!cg`B|Di*bgPKHwo>CaNVN{P|(Z~Sol!K`UBsDM*~*?TsFHJD0hG4 z;Tu;ZaYuqe3k@l4`7`!;n>1Q>Sr|Y`8@9vj#-azmdz2dL{GA~2P=XQ%N2P3Avf34x zy7FtPlxKA}Gz4m0fGkO~DgpwA43!;N(5RF+);m5vzgP&*Ip9@8hSy}+DXf2gT|8gp zIX*icl3^ysMC^}>l8cdURvVunV}!V*2w}pT)e_vcI&r7<9S)8c{2m@UzE#*lCrepr82bJXbbNAnS9I!{g-rP7wk_2W;-i;m*cexE_W zvucV!>s_~IC8F?N`&_YNr--9!M=?J8DCGBt^nPuHn&YLUWtJ`3K0I)QAiQMo!JIxX ztgN)b9i3K989|>kv|YQ(@$(Mm>m-JOo4CUjL1L$v-Lltq9?j|?4^STuoHh)oqRBS1 zbagXTOkJ`Dj!FVOD;DyQ2nHYf))$${f}T!I0$!TGdnKv4Y17-+kWRX*a;Qb?mZ+=H z&6DN|b*nxf?T?;f)-^cab)J_E0eg%N_&({E7}u;IN)ZQCmb#T4VTL#IUHHnSNm4tk znJ4*+V@mTNz$#liKF%jU2-PsQRcNp^iTBg>k#SQb$rWE(xG5lH@06-Hm|hCa91P=@ zht`%fIkjgmM)YHsCuYIvKDK~3yuRz|er zJsDf%4qLs#F_Sf+EZ`ZlV0Gf0VLhm72Qp8^J2B-}FES6=$U#}sE@gMBM6j_&n49OTC70>06!gm)Dj8F~1-`J@%Gir3%9A2`=sMffTzkGK?X) zH0rcGGp!j2XjMr^bQ_Xs7cn1C$WoulL#yYBg)eA%m|8Uc0-@7^_Jtu1n;t<+3e zxl?x$pgj(xe4p>{Um*M-*DRhT-4DvijTqdWXO8?X`I1Mk!iYC$OqdW!sL=!g!xK1% z^?m<6#&q&>`<$CKltDT|3G(&*i5Z?f0kU?0Jl0v^lZsf`@QtrR z*Szo2JrBP4vwiaUnz9lCNAu*OM3|wj(I;8s#l4FR+vyeF zbv86KoTc~j_R79HcX0gb`9p$xcL*!A$Z+_F3z_DQ8QEC(oK2d4;yD`JTILl?2b=Y4fo% zc`I&hWbrM=WEmzg9pteeiin|Lk{R+<4b2yljrR3jgTd#>ruk_^PxKOKG$Z;S*@jLa`YmgP z#|Cw(G!!PrZ->pUvK%RIRf&`53ZFm9W5%a7=8tfspzk(x@O@r+FqxQ8H^ z#70C6`E@IMs(cI4=oqx=>4tRl1iQaZt1M@KhMY(P>V9(Cv2yPvZAM6IEfz79z;p^> z^J0}@<1ArqsiNaWG^GJAax&AFl$#IBBpAP(po%_ZpK@Z*98Zsf?Nt$rP zCRDk4r0m!2oYXOUj2qC~;YB2lYUA7586jbAkUaNAXNw(fxG=`l#c1DkMowy&%IC&2 zP?Sq8+VFvYLTZ$m`IhFPXP)dI3PfJ~c$0?H#~%(N%8cm%7!i8>zoP=nLxEIi=9f1oSHojtaYMg1 zGZ8;z;ULh`4vQCTPZ20od5rC2p&GdG3Xt$-b<{b2VRk%bLdBuYnd9g2I_;T_F;Fd)r;A(X*XB|2bcLbLZdZmO zH6G;f=imC-JBdZVFOE3LZeIHC?l3>7iazaEU6m!%Kgo!;r5klj=7T4G*45=U={oq^ zcW8hL+FpkitSg1O#OG{E*Q%Wz>(Qgq?DP&RjgvChuR%;MNyPGc3@OryXkYSMf6!$9 znR(gI{S*_RsIAi${16oO{KKv;vdB*nq4{4sKNT`aUaQ^ zSqZh)cyjW~R-eqzRBZ=HHFVoMiVwUSfq76z2m?EuBopZq9RZizxrQg0B&>JDA>%`P zK;~QyV9gRrOQ|%Cu_J(30VBz{knvKQHCMGUq^rGAZzEFGY9~?GWNvs<;#o#^)oX<8ymOBC&FYr^JRl}L8+&^>f>R!zu2Kav&I^rk;{@{a zUe-v_t{&_FsjNDv9yrTJO*VNQmNWztKPLG392|dYv49;IhK{^xyi}FZBsw)(jEf4s zhzeV+4_RVd19T!5l6uQj))uCpsBqcC4o*(noq^ZEFD5S)Vvl{^dijJC^aOkt4_1)ynzzIcT4 zlf&(0z0HJHnF6BQi^-G;edhFFc`F{>9TGwTv~N|CJK+Kb4e#~!4P}K~J^SqA^9}RD z1HzQTtEE4Vuh4R}Z250fP%r#0#9=oaPpv)@2PNX6Q71_$n&;a3Dw7)j*R0z5zUTs@Y0gDNH1$W#r&<)`6 z8}a;iLP8kf%mvqmu8GMgozt1)R#!)g3*qZAWw5)oz+-0cK|R1PrLo}aa2_*u9J^IZ zR7HhP4L7=!zAS!gt}cF_No(;Oh8Ir;%a#`@D(fLihFDgvo^*!@w3YVS&DFz!eYuYA z7);S%-zn}ghdt>jD>4C3l^N4740Wfvve?F1~o}76I7~LaxoSs7+?nOBWZn zjES+AJ=2f+nJiijV%%hCnJp9dHl0TNbB{CZ*E?!>_QnjvmNZ%NR@F;_6w(QP#Ha8C z(R+KaPrEK-uKxYM^~*Gvn;C=!L@Ybwq~KqK+HIt1xE$D~yb_l1x;__)UmQ&6T>8Y5 zgO(%ubiKGuGaV*BqknSH08jX4cHrrHG`$4gZz){rhSs$NG>s}_?n$@3 z9~39Kd2B(g75)RZOCg4q6-AJ}r5GOgdWKphd$9K|rxGB&t}Uj2$_km&rzI(#^Efp? zp=G9ls-x!X9vXgHWo7+1Br$UK1+6)OE--+Bm5Vg=;3P`ysi-XTiIMtH@2FjM*Kt)3 zzGW8TBFms|KcI?f@74O92q1IzU7k#l)D%XW!VBJ(c`GN$;^5LVR_@p9lXF4A;;O33 zAdH<{um&qZQw&IKD4hN)(#yr;)$Z2v)%KsmeE+t#r?eNJ*$Fz@KkxaPWdM_c2JSzWG=kJpiII5_5iqBJ+L7V}u8yz62M z?hQLmRWy&^)HS*GWf+qtgB2}c_3EuYczRqX=u(N%4aY_nGx}@bc`B z**IO>;MjhR*Xv>wc)uLT2hqK%W#wo#?(FV){q0S04-4&AW#^>@gUP~A zalma&ic@NF(sUEssE(=*UzW|iSCO&rTCPf6%#zyw>W+pt=gDC$8ctt*Z_8hT6)*i~ z>5o1*AEu}YY+!wmjuU;Mj!b|orX!!neGfb0?T#Yx4n1Qm#~l36KcLz2)Xe5%XU34sZIOk`+?upl&> z_FDjAUAwh1Vy`H666hkoF`~bsT9-LqBm{ZOwJgAS7F2V2yudLl|Mj_Mg5|}u(vZ0c zHC%2=lCP_=5!@v_(uRbpD}D>Ae(!ZBJvUI5$$_aqA+)(wx%QF7p8+(Pd!n;o;!t?eM!L?hswpX90U=mJ=20)>g~2u=kW_JSanKl(Dx(g~ z2dgfq56M9(2bbpvmVJsWUsRjE%rR3yqAqvi=jPOn#D{*Kp;Li%ztTgNWPVZ^LJl7I zkj%*5Il2WqaTIaJz0FyE96-BQi_U;crlp@xk;vCxz;5Y!i;3@kRvzV-&$o<-x%^!% zYv%mWE#6Z}Fs1hux54hrG~TIw>ieJQ_wOk^YgJj9h4<81@rJ1V04JY5eI1USI!5?R zfw%&Q%PkvHH(~IZ1ZC~{z6(SPjHyg26C?P-lQ-hWPXk=T8tP9ZY`K)PW2et1 z*Ui^_c?}5l6XV07B~!CZl{^k7GMQ;dcxFxN_{y(M5lt{I>YfeluH{qUSh+s~?ALA& z1N1(Q=7LCYdaI3GN%T{D15ZZ-l2eKUlo-3>G3xU1R-3J#Z8$rVRU4DW+Bnjb(PX=U zf>V6d+j7g}4luhYACn9PvugplRc9p2AAvMdzgxIYZ{gOOhEjw4g8IHO^|Hrg?#X`D z85!x0Y0#|-dbx>{XO-~cm)L`Lx%+7_X5sb9Cu)W&|7R_YBlduV;6a}M^VcsO$0JMWE`6eq=kHC-8QXuwPu67PEc^?kv;G`N;0SXhKZl%+N#pM0|ue8;L)0W-%yIBN5eif6+g8y-0L2 z87;8Vm~-nGQHxe-S{Lr}{?V7v?O!1Bxa7undvieTRCj3uAa{3mbZ|GbwzNg|o=$*F zNdum4!$_xO{k{Fc-AmW*tPWKZaYTpGUR8W6I@_;DWWOZ5`~ zHOyP{yC}gkCuG}|{baTYt&=OJ_&)7Ptz?@nnry+8n1B6G-#P;zKHbwh&5HjXN`zD=A<~&u6D?859|= zXN$O(%J%U77G@zFb4T34ms@w9;5oBA-8W&)TGfwj zXmt`DoqbAbVxVtixUL_!1NF6|$;aH?c9F6NkP&;4FYizMTI z#rEq#&+o#}dz?Iz{lFJSd!NZm-bn(d?XgRi48`-HVCNqQnj)-yZ=3xuTWviHwJSZ( zQ&9=}5rK4P$3d^*Q)S}(T5QImBGKrZ1J2!nxKZmfpL(VV75U4@Z!+wNyIk%1VUN;g zjQ7YB4#MoH!6nUPa;C%4sFYH>VViZCS-2xxeMlyszO{XQpm;|*@Q#}GXFw@Y88PF< zpj1}=W*3Kv=#DNm->5X;{^Ww*UF?gRDAO(y zvvY82&uH)uq3y{6@)hQT*UR90>xNGvws%HikKR2XoSTy+&D$KJ*CV$fnz+jP4N_Lu zmqp&r;9s9sa?yRFUN11W%`N;JlPZ$_TpYxKyK_@?ZugGddUMLxdTQ zTO|v$3_)L^ma}~7w9STdC#{lZ+~55md@aLa39Wz@CO*%-yXH+eKD;XfS!@2X-XQIBMF0|@ZKs3+cR##$A~xi zv~MS}{isp={)Vt-(`FD?r4D_ah++>SNlkFK+2d~S9^(nzp!`4>3wiy)@v=*&b12MV zZ7r0SLf-1-O?ffq;wx*^DmRjcq9@$JZ*3LVVaA^$9CU?TfS`QND3T0`xaf0DJpZ2D z6XyD5!Ip~CK>O_kPi8zO38Xt&Z{RxFh~WgU#Infe;iu4@V%ec(eJ=?+NrL%}xm3p1 z!24)fOXwwf5PoPZ1^u{JHgzZSw0p z?AK{k(2N&#ew)H_tu=C<@8l1MI0xjDqac#q(tOMsGljq^xz1vY4d}QE_Qr^zB#21`t=vfKr*m!g;H=)))B;6RV7t(~E|bD6WovR#?r zv*6pOrAyzUrGnb}xASCL{7piGMs#n>E*#V45F;~R(B<;hp#ZO+pYV}5UAKZWP#p8O<`?UuTULWUg*v^ zYWI>uG`FSp#jP<;&blkU?TKq-AKk@A3^CxR-YsqBb)5o8c ze)|E|iv^I7Ep7~c@7U)VaLSwMBAsM0lYR2^)ym2$he1MNKWj^-aqKA2Kh!sn zHs>apd9@OaKnb-rD)pFo*?KZnYooW)O{~r~$5hnK!O)p1TII|DG+Qk#@N87JR-O27 z2rHhBEG_-k3ax0SUD<&~icx*Rn$26$*)Nr(nHc6W&^U{u3TH+hEt9T$l)Y6r`px@4 zKRBz8-2o=em$}omwe7mxJrKvZ%-Wq+#0tcEniJaR`Qq3e{@{b({_5k$_0Fi(85U~| zoI%l#OgcPd`Y{~Wn)Prr$!)pqc9S6`ole^_QJDY$KmbWZK~y|_agfcdVw}ZuY;kdw zoh7!3mY3FWn#PBk8?$zH?_quZ&bJ<7qxcYpW?@8Z+&{KcziINoZv z-g^5Tj@-O+XP3dGT)gDS!n30sgXEJJ&o9cI^FsanvXD%#J$mwdVR_^6vzLWhFJJBa z_Or(V%=2V|m<6!oHb&hK7iSsjY)o!Tz0x z&!0YBTH0V2hecGKu`Y~-E!^w1FsZZZi$ns+M66n`vg6!riK}b1Tw*VnZQ?GMF(lJm z)x)0B#?}s-USxsSFSeFmPY%ZNabbt|?!9{t-ny$?RI!g+%EE0EXoA{ylQoj~Y+Ku^ z#Nd5Ud^-q3}97nz8}|8r<_QI*G3 zAfodGwiNa+orgzb5wO8@BgMw%#V`L)>?J$4%9 z+lgk2-N)-=ZpJAFoaH>e2y=1nIN;D*z20P^^5FhMzManxo^W7??Qy(#xICmFXBM)J zYVq*+2;&tRzzl@L%KJBV@Gc{V@o3QQh%XPeriCOH!Er3)-&kEZI?Mm;SC7t$?e5TZ zd?Gt4?1y#-1Ge=S=pQkRRB;?(*}M|}15PM~qi$cA>!J>ij*GQHquGf@gSU5=GO6?@ zpFd@3^6odj_TBg1I)47>m+ybv9{5YOZYUDC%wIl#eaY2Ac-L~ZNwrqMdo`IzQdm5d zaJ5)nT0W<@)VkHi_~`+sHmd$e;@-WRYnvOF=S2o;uB|#dKSh1>#R6XnoOJO|jVF@y zq5%%xlQE_lcE;}9xz}pd7Z)?EYB&OnDI(yP1zxMwzzO5z>^PNPy0d?W^%d&QIlvw} zTy7tpin&sW$sTh*`WTya)PJ|vp{Lfd=mbI!-g@idTX*>S0LN%fLvo!R>rL^UqvNQq zGuMH%9-$=8&S0sEQcDS|Zli%trPG>Y!5!UczVm2|H@%&DuI8W$(Fq0Mkl-pGt=dX? ztw9Ee0JZk(1Vv`S4GU+tFhDC{k?8{KqG}LtHOgBZPy?lZ36vk{Ux?4P0(XFLih*4Q zEON|yQpq%Zh6PNikmLKBh^N^#XE{--HWn8a%=O=QKLEQ7UI6SkpzFNp%upFlcq9&NwacdAe6$6TI^7Pp! zt7{9Ke*5q@pZ)Lu^2Y}+Pw(Aa&Za`EtLqEN0DDxgj&h&9IQ!Q>`P;ww)%(Bt@RN@| z{lXiFZm#b#R3_r#d_GS}Ii<$YZce19GHeKM|L6bsAN{xg?7ulZJ32f$<&Kr_efynQ z$P*5E6EQbF+W0Flp=DPJXHY!R84DJ;?P_Hma=GLIqkbPVq5Jvsmz+9ZTU~Q`LfkIm zp7eLOHyf?)+35wH5Mv-^dH(c^F6V8>lT>#)MKx(#6+Rm|r#&IXF= z+K)4A!>;@~gdxoyh32}@6)Gn{E3t+s{g%!{R6Y#$7-H}RS!XF(NX+^%7^F(lHNsy7 z3B7q#-;w?!ixy9>diKko{mrB2$LZukQx^C5%5gCo+c=wS@NaD1#LKf>#r-jb<4L(( zmkUDi2^){tlSyS3xWI!`uGqvm>&>trPRU*lwA4@^mM4uyIh(<&YXuWiIu!>_mtrA? zftZut%gY;$MiE062CltZyLa|Ba0mG5kN+AMZ{}$jb}<&ipGC}#osDr^JnHc1#%Fb7Z7q>Z+`fD3#nYE>-{0f`c1q20f{+7FtWWV^Vpeuz?>3cLDP2N^ zhpT%s02xohQn~z{Z@zo)!Cl5Nb(9bdq6f(+L`WJ{I+O|tTwvz0KBy=I%A>TGB%>Ph z0g{Z~D?C(7W6$Z>91AC!Nt#n~+niuBaAdAK`j<&&kd=rUU%yR?71d=BURGfcXo@Mh z3qVtW#h`9Q)DL7lfV5RkBEm@jDl$G@lS#kB#tDZsyDU=qIxw@Mt=W}lq0jjg?!kz0 z)ml7reDa+6Sg~4zgllm?Ysx9kF|)FCl9SI9E>&a%V^Q?^``V?N$!{8gNq!=IL-`_9Ea|_9&Rn=HiSW|;SHw-BiChR#M)utlCx+iMX_AS*n@KG~~_WAlG)q!ogCxQ7M=I(I0((Z+E*|l8ahjKlvEP z*G6aXqaXk3)}42Q{?Rwz`!+XSHG1PNo2M-*%5(4D{wJS2qTWK`#>o)}4cUer>}}up z^x`-ij8^L9?|<(PPmf=8dhwOTrBKi}oCGk<;qerSB$~~m^^Kjs{_$VQY;<_S@zssh zB@T@oom}_>{@mFmrU=dy#-l!b1L>&v9@U$r(a_)SPZ*lG7>VOY46X9L^7)vo>Q<+@ zrSmAA5k;_dK{dF%1ZXC5Dy*Xh;c5VGPMy-q1Da7g1G!3z4mwjsF#91%jY1BPog}}Y zI^j19Qz^y-hK!B!x2fn#HlGZEjXagPDk-Ig2sW(<>kU`j;PmdT@!s zpxNmzaH&9_ZO;}b1-L&TU(B;v#B__pJRF$AnT_@i1fua+w$UiDiG)FxJwHyA_4=Lc z!V+tSmxnKz)!;6`KWt(QEV$CdSR}ONhHg3%XJGJP;CLCwlklnGzK&#Kp;W5$nvH14 zcjM+>c5(Ty|K`UGV$3bk2v+S3CI_!h%jFhVNqzI{cfbCP2W&4k8pFe*SNQ+q<9GY! z4tt;6JWMNH)?D22@{4f5p(ur~d1gEAs_Zp2wm$Mme8sR#JO09zq z{>h*Grw{Ml3VBE6vu7)-tAG28UpBkGcCY2}W!Q09$R=LCdi}j`f8&q;;dcYx(I=lh zVRx!r?{G4LBMp4`W0A;s+>de9wZ|2W`ddvonH!46O2sl;KA0Ie__M;b51A;HvwwRZ zXV$^cg$ois-P!C4OC9_~XM5AVK}E9TpMOl<>v9Qnp`yN(p*`uSi z<&C5B`pN0@n>X%q#BDU}y!Z95ef;Q?`!|->SF-A2?m(e%Iv9A_Q z*%z!Q`KHhXF7nL!j+jVK^^|Lo8HOmdyg z3=GZPVxg4Us4OuPHoUBWT~?7*vlU+QSP+e8a{(^z?#t zRVsn~CCwC=V@RBnW9i7?#u8^{Zd};)~Z8+z4H7R`Kx120+c@?uA>;>dFRV&C2p7 z%i@u2z`MCifF6aJRg6yEz8HnOEf&yN^T?pe4Zs}TOQb;Ku0!02>6To(!FG_^Cc>VZ zz<|ZhIuj0#qtSU-fN{$cpR+_P%^!l;-CEq;T;~r!M8lycFJ9c*+hw&Rmvpn{mdk;Q zURU?d{@q%mdvKILc>4J6?LDs1;nJUCx$Sk2wzhAHQ$;X%b7%eChqv){ee(Q(!`IkC zinzg+@e`>1(cl06pZudg*jh>DPY<6wdGYG3ba+{9aVLt`y}FoMSy|#%J4_dB<;BYv?9g%Z{X6fxbMy8N$a)$lh9T)bVz`sOBX62oLe59`8BqkIJUUDs>YrBh zsdg!K0Z6h@EWuG~HqAhD)4HcfKz3%K)143yEQ_4NcZl=mppwH*M%*j9PMXfxnUf;8 z4iygOQH4_<35}`PIP+7umZ%C@WhL}faw~uIlfU}Wi*tMn#!S7?{+l;%yT+Ytc9HE3 z%+?&|iTu@u zPz2}hL8+8ueWlJ&B#Miks;=6>8<$9acRrSaCohi|`qpU;qNtkRWbS?l9UGwC(@(fx;> z;pj!G$weEKMo7$hlyU%+zM)i0=@3Cd)L{$Lsf?CNNs3{pVJ2!(UH8L1azFekcvop> z1iG5+gxKQhjNX`?>OE3?i&pn0B6d~+u#hyGiSXTO7Y={+v!9)n2h0^ZEpCEm1CMn6{fmSD9)|CTwQQ}dAzf==XPTai_2egn2b@u9kx5<<}@D*fEE{~ zxv(hsIakCOwZ5`}i^JmLGMYh0x^?p|MhGS_!C;hOkk2soD|#KXzI?HE8^i6!GFO5m zGYd;g%TFIa;uAlf_&9{aHSn=m3NOCnlLJOG#sTgx$QSCTml(S8_wQ`I_x2sS>)y`x zKl#T$*xFne54)c~e#VUG{@pG9&JTY<=sWK|{G;!^J8YFc{`B#``qw{xad;~GO8!uz z&Ane(9b?13{B0sGkO;@w$Bk}oEVFL8dHY7hkBfruveZ5}y2OIdZYk>z{E`CvC5u6q zi&<7zmeR?v?2CFs`TPaNk*l@}W!XnT-qP5H} z5I3Z<_-VJebRVNQ_wo;M&CV{aGZ?bpN{etth;QEU$tmOEy*oP(AKu3gkts2)X+I1; zx)5`;Q=7x}<(oM*?C26=RL*L{qF4s*_fDIkBuXKws8{ zY|WkHBvIYVuVJZhfzKwX7!nvEOi{r%K-E{Q{xhGqa4?8EQ8N`d|Gade*B^cGQ61+Q zudCK*vpnU{L95*@mm6Gxy|S2P&k^G?9e~6AG$hk<#->`U&YVil$@%=USQ!p5+%06Y zYfIUKS1;8U5G#eR-mEV#t|K73jnx{<9{%!A*fr+Q=D6^A;IBep5XXEZZgQ^C^5QC9 z-V7JJ+uJMI1fDWa)CI*QnJQeem%oO!jWy z+r(njQIbNsPCw zjJegCPXPC)az6bqkfsW*LHt_{eb)!p+@1ZXRY^jQ&GeSg^<$EWZo? zbgqnKvWnvZU9rP8#Y3(_0f6VIN8JG2qzUouz%PiEAv0d)(6?{i+TGn|13^#7!IXBE zdRJXYPvn58E+i=`nSgG0-qQ!5ts+V{1l3B__*PV@j}EIXGFq#Qgb9sTJ4 z`+qcqs!{4C8!Gt`SU$HDNmM$5T*j;5Ff!PX@ zOlCQszr?3A8V(jp%;#TOgPLZe#4I~#jDOM*lsw6nd!_UixrFaFiXPhalr?$JHc>EtJ$ zKVDtkDitnRwD7IKXM%Y>r?3lRxfd^K@^c@ zC|TGHud1PyB9>&sOqY@G0?b-0{_tK_(5kyE96JDa;ZYn+D-x(9eNH#>vnc$hF~DH!XZ6Aj zCwyG+++jt;cc9aAopVgx?`Ckr-hq!PXO>>Se#NCCz7~d^%TR~c+|tKfm^!h zy>H#Q`QYAuRCOV$ohs#f$PlEvkg_W%uOB^~qaDzq^~fkQ%v zZ!G5&m~42Mu(7D^Gxx(-jUPjp`_%%GhYxOZ=_V#&`J*T<*Yffze%#6A0``gZja`(f zQpr=ue4&87q0wmYXCFNNi1;-(s@t3EC#PrmQr++A?`^Cd9K2@R>ej6t&$wME{r{A` zS#u;=cIStEi3r5L2Y|p1rTNix~INP3d=q=ykdf}ZpN zBr}a^Od8TS9I}h-uI}op>e{!g%1i)>9f*Bj5dk2u=y&dQ_Xr@fNXjcK;C}sX?tbpQ z=bq(%YWpbyE(BoeuwI35!8e4RyLEl#kALwaziZs%b_T*R1o8OceDeOUB9qhpNK9bj zST4^yn84vgl*kl$c9t*v=O8`%_y{7kxw-jBWNJDFFX~ODG7KTyNC)~lUwru9H&1uU zEqr^A#%&Yq=}~_Iyt=isfyJ~SMtCNsrovewGMt}YU%qyHbZoPYA}={PC7`8?)qo8l z{1~1NXi-^G*!kd^f#U{oWx(Q|a86)?jio4j9d94J(w+STyd|1aEC5-ra1*Xz4sW+N zTWzeov7qOX@7%t#xH#uQh2SY6$U%Mmdb_kS2HaDgeXw zMa*A|tR%b6`aRkjgWhzW-d|Pq3x*IaTeVv!-DY~K=)K#MeEF12QsaxBSU;q`V?J=V zu?w)X9xB!tbAG2xMOQhE~ccAQr<)u=w5DK^lF3#@UyT@dY z+JqQH%L|K{OycgHSN8UH1HK?|Ytf)L7Rf@&FAxAE; zhfZd7^I&pn83A3u?+LK2Zy!zLWp1-!{&#C-`akPYfsQmXcp>7r({uU^rXpq>UZ;zgs+JpbVP?NW8C4R2h@gbE)J$TGR=L1O218 zF`u-t+G01)NFblc^v(we)PJ>Y>;9TmqzDqLiZ8hJ`1V1Xf-! zRP5)me?f!=J|f%^OJA|teEMwb`n9EqpV++}w3%$*y^#7@$LXD|m2=Zm5t1guzS}qE zK-&pNLl6?qMTnB@&5NPz?Bp@tU5Sod>&xS9(5xY^H<4l-^>O z!0gaJID$|PSqsr1Q6vC0F*1x!_5^ezWtz>RL;xH2ox8W$3-Pd`T4frA?8LwaW*lBl zhe)~1!$}5V?1f5Af)PqkiIO09E+7B=6qVDcS$Br|RAraiQcaVtZu_{< z5H!GKavx--O0|Ic1y~Qv*buEI)9IC!n`MT?*-+=Wv$MSpeicDi_xCpe<$>;JXIBWm zu)KKV;9$GaY6OB)hldr`sMzE@n~>eTEjTE2L^PMoBxh&l50ZO+|Kz~XNV$|^4}p|# zW@ZH&nOruR%48uR1~&5RVx=@Qb8Wc);{W)!|KZ;CnV4S(pWT2=1=g+zEwafsj8Qj}nd! zo^a+-$Dcy)=P){OAL$)o?Q1 z+Frv}@S-320`5^j`1+o0tlhf)N;bE1csN)t6+rWuaC+fOb7gRMiU3O>ZG%a|9D#*s zZGCNYc;MFc8Uk;sE$4CNC={9u0{q!F(N7se){k@3+{xL_iU?;Y&2)KD999Ip86 zrU}G?A`Zh2&Bw`?R)T9yYsQpm(vbD>tvQ}MiZ~z-Gm~{<jedL(`L>~&!iic494T@ zKFGK}&00RW9iN-dR$E_h{C0bHmssUnyX$}e zGyY-WkarU)2JVr?3>@$f?`L?V)vkk}6N^SzPFV$j^*%b8zJa8X0t?86|4$*zEQmd|I`T2(el#iX^`9Fv#Nhdj_GX8;Z29;|bn8|F zPha-l6&tzUYpZ~!(klhXDXT4qT1oY2wu)FMszReyDPr9)%NYqg+jECezpO+slib!X zQgug9O1e63$(?>QA!NjZzn$Ow_@j^eMqTThYwVOqMv=LVVpjsyyS>p`y~r#JG`pz# z28NDL+mXmjADG(beeBl}LF2fJG&UHB95yS3aseNH7`|XI1~9K&30F8SHaP3m55SyGss*ZG(HPA7b3ZI z=CjYfdA6Nc+t_=uvH$4tS~8hVBywPPp=w0hOHAUAzY^1Cf=Pf4e0_NdB*%dPwjUS} z^dp=Y8+UE*CGgRJ3z~2`cei)m`OU|L^6_8&_1|pmnts3GJ%jIQmPGuJ2P-Ma1?>VHl z=avUWRZ_q>F*BGsX^(p4rW!Nym&}^%%~H~~KHxjCk&`md9afSeW$TKn73E&4Q||UY zj3#oUN(!j@$<(dox#mcaY?RdhXhb!^yOX@qs7jG@Nicrl`j{IpM0C)~t-tr)hZ`we z)^L&=xpwUioIft#%yu(V)BF2iYJ(WuWG_1vi$MzD6Krj7FvS8M!pI>I6>{E24R4lX z=nwEjWDJ;Y!BDZQfnM1RKz}gph%OK$u!X?46paePJe(t-6=KuROwS{+n4X@?W_F1> zSE=FpAa;7UZZ54X#uw+OlRFz8oL~F#Sz-}8}|L*fAPo9Cr zRd1h;6P_d(L_@_+jAnSyA`u?hvyF`*62xyDseo<5ee?G1Vm|+?-+g-X{_F5#*$Q@_ zp7ovV5V05>aks|_WFm|l zycvGAcW>WFrqZLM6JX`x?2X6{yBp+<>f57eCJH61afdaBNRPmv@(Ex~G00#eM7VOK zouX158U!_k^%=nf%-hK^V-kHgb{+%+NB!F1?Y;HJ!|8a880>s~nLU+?PmLcngkywjzR?w~RU4Efg&s(&-40vXrD|P7w;{h~=5D6%KQq=JV+@f`w__I2&nZ2S$I?xx zJQ7_C;ZHfS`t4)<(<+b}UZRM7k-;G>Ku_Nie5MXoUa;?wf-g9k&m~9j#Uu93U>~+N zos-s7B!o8}2G`U%NSIKfGqm~2wK2PGE*{6+nSeTo2k`Dj-d(QbaJ?jIRkoNzB!ggg zaxzLN1~CkixX3PX^PZZ6XhPxXmml2wgP;DmRn4{0HE>lcD@$ys9bLZMi_inDPJv%}TcF_k|K9C03+BznD ztU{oWqX@=khcST0hedUJZ$DQkIvwM(9q1q6i4?olkH-hn5f8di9H^RzF^BQXN+$P) zMkcTyMQVcO0W%1)HC!Lz<=_G^zo7q!Kr;k8#wbvtR${)0dvA+rjg3!wB(Xa#R0Fbi`@X}d!mLh@pWe*6S}R49H<$WEe$}4L%FsR0&!d04sd7dsy^8AB zVBS=H(e?J6l9v~Yi8O?TBPsxyqXca8coAgr75Q`smn6g@krzhC0fJ+<&Pvj(l#g0R z$xH@Q9SlY>67_ilL>J9wli(%5lFd!U4jU!-Jwkf4+oy>%9RT-e^>tKYruJ*igIPI^WpdF4qsSUj5|rFI}E6(GyCw(f{p#|G$QY2mY%+ z`y&k8c&mE}^=IXOn}EI$9|t(Zj<7aACx=K#)o7 zBlJbs0iInPGi6ljC6*JYem7aD)tjh&rU|iHBV_ui%jM`Fl3*4%){l)yFlPMlq6iON zE~23kgwy9FRwtH0$WsPcefh&D7lo~u3rP%qDb$ph&$5!<@T;*(53(J zUs=elnZU|QiduGz3iTh=1Kk&8CqH;p-2B~d-%FQ)AOwF$fPVqnWWeN#S#SgKMTO&= znTaP7djzRwR>J`fxhb_e`tEX+jx3-KskGQmg`uwLX5r3w~qK+J)Ug&{anD~Vw&P>h{ZkR=fz z14xg&IGH(^nOgugXg==0c73^V2y%#>TQHf#*~WXcUdv-}kSdgXp1{qOX~Z6x9LC!v za7I}((LS>|#Df)`4LcmHR8erz%D{j?!|_7sBDj2n>qE~L4LXshqiiOeE0EZHDR|vN zG5^w?n=I$}C}Kt!2}W2?c<_g>+)JiYP$z~_yy4lYFn)p9Mq!Q0juB>$a9nW^G zDJdL>K8#68ikkVPbt$cSA%jldG14oL(DpOgc87qc_`tB3Da2-0s3F3SilI&+pM^(9 zcaGSKFNP2t3uR`(XPfJI1VFeL$Y4F$!1fe~^-7uG1xSi*TM4esXy(h9Zbf8Xi7>^ot)%MtvYb)mtr`w*wy3wXCN&?RoJX4EaWJmY$7Iv(jRe zaOd{D=~!SU=5E((UVGoY8{u-X=5=B5aBV<>!-IeK%fH7T_S#bPu$E`Z zrD?b_?3LJ}Jbm^wS44h!5e!eW(Z?KNXaL8MQ+9@|c*_g3;joX%<*Ucf5{%8t;mYC+ z8Y&dH(>Mvb0^dGeB}`KwC}tK6Fop#Rfc?ZCokae@nB=)Ocav++*02LQJsa5A+HSUv zmlp6FcYp|s@DMiD__B&3pceB(oAar8ZGL~_uR#F4sfxhN+PVaGsebsxj(nM&$y#>^`%8s}E#o_oEgQr!5T7h!du zBz39(2!AV?M9|z16ywhOzxyy-?GTh3T{{v2;uNF)7i_5kV%o6#$7}zHU_gMG0We>x zmUv3IbCic`GatNVnnIef|h6A(AV)aNI_Gj93;^paBeWu%5&f537D6 z*CW7X;1x?5tiLf@L*_eScY<#9#;Y%5PD+%nPe1>vbB-Y@G*iNVtFZ=3B4d zS(%Ta%(oNwc&xuxEcmfe9q-3br&4LBGntvm2>cF0L_~txxflc!cz!0jv~u(3 zfB2*2*-+ovA(0pnf5+$IvXT^t-cobAc#sSBAB+URB4Gsy0~3!1&ilu(yMd=_;%Uc2 zA~zFhG}wqp{Hx6Pm{|~$i*buEFc6IJ6kx4j(|~v_7F}e+a*#|S-)8%S>KR24p;lPX zFo=}_3D4GUsx`TcZ~$QgE_x#)xK4ofC=<|$>_uf?Bm1#pp2_RM{ksc`Gki}m>t@bl z2?B>vvPed*p(f7xulLZTq6kf&8o!D@40_R|rc=6^E)(9B8uX<}qunv1Q~0%Nv+_{0 z5+in7FwUq;X!E(l8d}yJsZ<@-(9$hQ269^yiY}mQ)sJ!ImQ|w+4>eG9H;vA!?npzD z&qz~6sD}5h1`}4H!`uV!Vt#gkeG9TUY<7?tuw5bI0%eKVg^Y-ZDQ=gIoj1d=b=<5r z+oBCCyL3DQ6B92N3uWC3iE2S+B>o;?Hn z32uuy8@o6(hEDX64qGaf0str$i#}U_c5(q!4ba&{`7IZVwYzuj{lVLB%+E}X4ff%A z5u1(xy?xYd5KaR0P-N(T{-;0xU;gL+_D}!hXBRM>xQve5Baztr+}z6IHHd9-ads*` z^W(Q(8a=J;KU?kVL;T%gzkz__7k~Kh&;InslOg|UN6bAjuV#BwC{>BUoXJ*lr9-!4 zcwE9X9%JGe3QuASivXG}2PQ(S$$%Rp=fGJ528{4TKojBLfa^pw900YnRt3~CMK;1T zu|PB$Sk?iP#Ks1g#m-E8F&qlA+Q%lR(H$YiESIv;$fN?A9Ar$Qq>WF7!KBCb009G^ z1C%INheP{|WuZ+K%0 zbYl&X1nRonsw5b-t2=*B;k9I4vXKI-Q=5VdaIFSiX=&(lChP<>Jia6pw#qX9=9wPsI2R z;I%wA7Sn)-wAwXXGEsrxZ;yf!zW>ziL79lnKO$p9Qm}KFis1u(|K7b=#J~R4@4xu^ z^YhUlUVw8`i^u067%o7aQJ-ygVg87?@$636-;@hmTRUS8H}mfPLHh2U!oxQn{OkYb zKSjv#^zpNge*dM->6nkh*!k)|ymQt!+^FQXSHCRhQn(ln*rI#etB&zuyRS9;_{l4G zum9=4{Q0{de6_aGCU6kjJbdX6_BZF}qV-yB;QW+11W9_iQg=5nx9NwXTgUBeCOban zWDP;Sg0i)Fmxs+;jL=WkfJh!ZWQ&% zx0kQ2sLdQj7JZszqjSiwky$4wy3(iJdi1sW)rtISiV_;6h;BtusZQsz5*k z6Q0LT&^O4W2MoVb!03lAE4L(B{{NoC7!0bh?^)CI;4{j12M-B!L5*v<$GP-HbwK?! zp42F(?n*}*sf|xQ{&FJ?zVjHuw`LnqI4=Vr9P*=u5Y1w%>2fnRxO^ZsE?&EH|K=Pq z|Ni#f4=`pQ9d`lx!Pd@UBOvTC&JLXp()M#~osLc#IF_>G2fdYb_2iUwevrq3L*ofq zK(K9R%ZF106Aa>qP$RPQPRk~E73w+=B z=?-majmMKiaeBtNPSJfKi%vD#G?pNv2wS=Vb~uo=tT)&)1_IcrOktQ0JHhTAbOa>A z1Y$tW#7cq@B!VBTO9_ICT#Ic3FxH5VnP?ei0Qlepmq;ds56l;v%{Ew}@bsNd-@@Di zxNS_;fnb!lGIws>u#E!H6vxVqb@2 z1Yo+;le5tYXQo(tx|2H_c8^X(1_uBfJ#QVMO1k)m-@aQzIx=eC&y@b^oi7sm*&n>J z{6GB!pHCiP2FBBxC#V41~jn#xY(-bK8 z)IlxQx#Td@job34n{?%_rf)Usq%}=VI*1063pCx)QG$&Uc&p5QnrK|O zg(G`l?&O=|bilWVk32o?-%lj5DMq@5&V&>MZjlIqPtFhPAP(Z2S4Uugp^z9^4h{G` zu23jWD6j`Fzw{@6@&^dmMOHi5zc4!)4}0bpV$td8N+I{@r=O;Z?WdcG{WJ!g4TM)q z^K%4FtT&JFSHt>_U3H;=ZP6Hr!I*qw7UcE?)9K6}2GWJ*cWY}5QEW`vs=+d`8sIe1 zY!YV{V4(hL^XR)L>n_{K_|WmpbO=8pVnq^+OyU{PPBL%iN5Q;7?&0>HD4jFQCB|Bg! zabT~_{4SiltVD81yF$P{WFyyVsK~wNj^}R~RVczSvO{yS@N^d+UFVg`G%-@#YDk|@ z&=^8;ueWDC-IA>89_CW!X-`e+R2S`~af(PMWQ1QjRO+Ra-V3V_R*%(Psf2<$QAV;F zL$sh$)M^e6Q|aJ?-+!{UpJi0A^%sT+Kb8^MJEI8&mW^09?0;bJ*gfN~Ivtw^5DWVp z0%bGz^D3~E!>j=<9~RvHK$I_zEg7vaO=3H9bbJUTG}bBTt}ujSv|yY%;q;@>n3}yN z*xdDEBofNy3k&lLY`?{IXXu1*-55_V%}$2gHV0_B9iSV}pM3M^qc7JJ8Rqq)Lqf?* zEK001^Ii|~ZX^gpU`kcWS(dfEME3r@n;-+@7>EJu>gxLXR$@1q#go+GaN%wKZ1btp zDbW@@9x(WsKAbfotM(7&3c1~6Zft0DZYC1+A~wX(=?K|cIErAviO`uq4A@ez3!~yt zAizsw=pwZAd4mK%5BhP)2!K@TkN}%7t5vTrOs5W;ghde-V6hJ*z6<^o7yYyGS(sr6 z9j8Wq32cmlfgPjA9VivkSkT3y0p=HEcxn0L8Vdpf#a>7NgP)^ef)S}7hDp48924%@zm2x$kB^R0M7)U#UZ6lv6-}+4!Q-BccIr-sNf?md5LJ!)6eyU~7Am{Sni` z#DseYWS=vgzCg4TqgneR>LE=(D8Q9<9&cJ@ZbIh7s!SR8?Hb1{aqddE~d=Fu? z(T@WZW`umxD!%awljH==lnf-WTtGZ6p=KB!8OO5~YjGF07ck7Duwczzds||wwp2EFwE8q)b`-#m~G!#Uy)OU7*f?oxG$F`t06`N@t zR%fPTAZdWdkWMGS55Z2kaWwLWKl|zOOpqw^Uw`$@S8K^(o9nx^&1ZYXLE;IGkHPmn zUORZYorC`aOYy98j4d39hq+t;fIxr0irE^Z6wDeBY~aarqtC7wo z28V5#0^vH-nOvc9h?mhSIOXgcokUQ={}(@d^H4OVgxXM-B0D}dJYCP{HcmBlaYK`( zL82zzTaz;B`j$~l4-<7^R@!r48toMXN<89%WIL0Bda2Hp*zFr02ocU7(jXF#KJo5 z?CxiV2S*65#zd&qbmI<@D=@Rd7_fl?BRxJld)&r>Cvw!Pjg4UXRVmjh2q&0}&hFI! z06+jqL_t)xv0z3Sii9KJ^Wr_u)X18qA{3pnzseWV$#f3584Sr3Z*w*uUkC*;gE&Fg zxt~lvTH9(KpMU-6F(4%a+zm#NIzX)WMPHnrum@wqeSU#N zWB@P*oMhR^qcPsuJ=ombg#OuKVC0Hi1R*MNKV;!s+uPVM`F;4eVzXC`hC*O|A0Jli zV}vdpL=6>$rs-L=<)ygf4_s7>A(CJZ-hfGW)_G5%Rtns zth(6d;=x!c=UGG;KZxl?gl)H{vbpt*$2g)Rkt0M!`{eA&`X+h;IJYsjZcgvy+v=Ok6O!IH>mZW3pf`mWoUtC=Xa?02{*(l4?iCZ5VUFqA@-(iGmblBcusbtq=OU zU!8~*$v^;_0y)tHW)$QuUkL(Ild|0HlGxQVslmv6>6WH0{VVnL+@v=Bk3>y&-0Tja zo}5xla?pS}%s1~NC zc>{DwCtrXm1OHvFVb#S3w*d(| z^N|O4=NrT)-Z*&g!!L3DOC%FWDH^S#%)wq?rvm`hV;qY_*KXFAba;~J8{T&aM~0P?hY?GVFR@~{%}d2Qpw-gL~)&awW0Wr+@(^*^25 z4|-km@k#s+fu!T*6XgjrLPT(g?|9(|7{uS*HjcCg>^&AUJ|HqwW(^^EbtnQ7V&GGE zd5s<-;uarW$gGDPBvGZPRDDyOs`Q@g?x~esQJb`Hl%*T`9;BrR@%b{{wp7j+4tTU?f>Qc^VRH~C2bvyDR zRTim^9W=HCeK-;iA@E_0z!!nb#+IOYD4>Mw6JU*iv~{`zQQyFeiw=qE_HYp}nC zFbZ6bf#de4zyEM;D}|kEBovySj8v)l@C2zFP}dWlaPxF1pfj}J>t)GUxS!jFlGAi}!I*p%Qf zdJ&_w5GWJF2VWo%gV_;aLgDd-8IcEx19Z&@KiKiZClUm5KU4Y3zkPo)8oqsf0jw2d zA&4|4oDrlJcuL_|fl~u32F}|+e2JZV1uWR1`!}z@{@~u|a32nHq@W!ltP7kijvJdh zyOr9}`oI}pjqfgr2Jz^fjG0aUC6^`&p$kQ&nm~+PFCs;qO)?09NxMR^&(W+-lwPPN zjQlF|3x*K6>7_oXR~PQKq#7|URWGGFbx8YG1M2+yesoWJ@9Iv|sD5Ai$@P^w*N-QU zpj**pRc_-H2OcDE1iHeM6PXeMRQ3sMdC{XYb7Nac997bp6yd|!ptE&`4yX+wHB&xD zTo`~hs(I9lD$*8sZfC3y&>RP@M5Cilw%T5omyeB-9>Zh|nfLa0`!7y+_6~vpY(zc# zyL;ZLTbV*x;SVwf&P9JRvwU(U%U89KK)RPq>@eanV)aKBMDgu&4HX$v=BaORkCfKwc|MT&(=IOv+4S#*26h@_ML)bLRfYrZ63RMsS+V>oA>V36%) zVl&8H(X`5@$w2aQSikzjxOas(g}jU*)*Wej6sZD2jjAfu50!9&64veieOqnvQd;U&7!*^gc&~M*yLd`bmQ7GRwH~@Y6GNC(~1bwWCrJJ7_XvMhfQlMGkRZ3L!EJe&wVPsJGtvV&Kw+8br$(M$ZRoH4+o<}W8QiHl}J)2zh zv}zSmxzvvy2;J-NJ+m@$qKq$cXM?ZuWc4wh50yWGPgrxXEC;!|eZo%XoLE{!TxM$oN4K)H1R`;EZ+*fx zzO=lY&6n`?fa%4*y;d)6?&k)E#zxMGp5nkv39a<-zy)If`v~#?%zzvp2@3nCx!IWs z$JmYKIn)Q}X|T)2UkKSIg9>(cb9WaJcD`I)UEiFZ3@}OgeJ-Tf5?P&mBV&vSzn2im z0~kQSk@CTExvbM+J3np1FR=8;hh?w`*CXZ#)^Um6dQz=ZeWJ;aI==VNvUw3=srJk!+04Y=#`JkNh4NCxQiiUX;EDjjO0vS%bycHzl=(3Wjz3-lUi)1gna0Ad?0r);?1p`5xaFJEu zBI0wq@~IT2=y+bRED!brK#oABh!_phXANh3GAN0Xj6C|U|L&dr^Z_=hfK+1Q#QMXU z!540}Fy?NgvKfqkFrmsy7>HBs#4*6DRB-+s0O{N5m_X%wof46wzIIu2LQ4HB||{=)7i?z0_u=S>$ac$cdSg%6qGL z0gl}BWKVISRr8QD^O9HCJvTGRUoxm$MlqdVbwX0qEgI6*S|{BKjBZ}~bM?Kbp(Jw_ zBnjdzD)IAvG=>PlF3$SLiPbQG`AJJh4An7EK3PCmPtUI{FSKffh45qtD}&*|Vm3FkuyF6%^j@-v(*$UvSUvCT zXU0bGvhFVxQ+S~w%|p|5bkYe$5#LulE(aSzB+Ee;_B2d0K>PX#+J`97M>eQ%J@$*Zj$|EC#^K)^`e_Re13fcB? z6PNE=rF@D?&4$DUvmPws&?Oum;dMXZX5T25*nQ_NY)Bn6rsBp99DkGspz&Rlk|a0 zsaFnNh5RbQC7JXW3?Y@-_|YZhg515s$jW5(Ks81d8C3d^_RUA?Ju%C^us&&r3{tIG zkLtR*;78rW#)iAbm3}aJ>x3WPT;KQkJQy8Ua~0eQPEK-g5$tN1R;6#}=+qC<9bME5 zeAIAwY7{5tdX;a>WC)vqWsSs$>pMl>pyo8v=6UX1oa5i~Y8ugzAP05d*i zgdk9W1!9rq;cer?AZz1(gZtou%ZEkZa(w0Ow_iWlT1NuGG6=duzPg1nm$?8bnUk^N z_r&6}n`@5{p*0Q*7|UWh5S^UfSYLxp|5JeiE{&Sq2~*aX;K6uVdg06rN)? zW3bKedaYLdVqg@6RhCM(#}6)SG!ow37c-(pvrI5A^iD7WY%&=nEYUbGqN~Cf3LYE# zI{j(%r&V87iLKQq*W_<}V?|nB%1{)n2agbpqOtB>g9xS8f8L>rswQ-827UH4YEqn0 zpKeQRdNS%;Jqa&3)n%k24taYrR(LsF8P%Dmmuq8I ztEF*v_;fQ}Vm`xAM2(sAWwF zA@BgG6jAkHAy%s98Co#(I7%?I&|okbBRsc_jrrVo%M2nN!*jbWArkPGY23Meowz<2 z0nlq?31DmCT+L=_Z20`f!sKMcH#IZmCr;Mf^p{_M#kv;^g-V4iqVvPn366BEp-6$j z(_%{(jRx;rUmQAt{Luf5Vu_PFNMeaOy>NYO@H8HeOvYyLNM|q~3wIYl8aX^_2f2aG zI+mTtj{P1dfb^b;!MnFt>|=w3zp7MExA&7%Q&Z@X2mpgy`@>gXdg;a-C<~a1KV5sq z2*FluZT&kYF;MsrCGd_>f5GeG%K%JQC=^|upR!H3zJ2sHTSuU@K{dh83XcXN&k{Qj z(_5HEh7syr7cndj0h2sM_Q=MMouMp}4moC0_-yf_(@`BENP97<9&MaY1#cZP0) z{z$%>eEZeY;o6H_`^7c_>12Ey|U$s29qJ_ON^4-ehFdF|%y zn{0nR`t)Or2G08!Y&HUc+`hIj2q$<9s8$n&E@&b5UwK(JRA&-v(e8lM>cwJdWqAdm zJFl6Td=Kwki}*Z=ROZu1fG*~~S>1i-cOM_5QNQ$m{QKV?w>uACza0&S*Vl<$a$G6r z094_1gagi>{`g0QLjFe&AKbaQJRNc6GJF0|%0Ka3f9+cJ9eC=ybY(IkXm9>!YWPL@)N1>J8%ENlVL=+znVop9X7&Dz0^%=JPd@(5 zd!OuNaa@HhI%dNPa2aYmCT3(`$XVmFa}u}kd_dx*5&~#woak3bQP~z#7qcnb7b1DH zw{g30E7${?eROzqZ-0Z~$I`?wiO1(sseL7-J%cDA7Yrz|fQ8% zUdMxb%hQt~l%gY}6JLD#84j)3E#VoF%mC9fQmE8HisM<{eDk$@;@Q)UePWtm*Wh$H z%XJLEofzsde&Bl9L?YFIfC;LJ$_KmHLW$tbb|;aMj*bh(lBmw`gdG?Ga#>>1_Vuw# z6ceg*i7w8Au^XJ4j5q3ah6Kj1NL(hTCQ})f_i^m{fc|><{(bz|c>_p<6cMOTj_mvi zx7|pse*Ed9-7I?>76&`-T-YFkCkm7qF-lOR!Zjs`YcOg@8IN-%0qszb6WI>GFR)73 zT3~0%ejpkO1IG@c0RF9bveFqAis|VYOeagl93K<54!Ze2zH2zx?2vTouUA3ZT^tTJ&0=;A8R0?i{UaFy!BOwiOJxUVrsgd@}Uv zEBCIiOvk4&K6T?9b&Bi@8@M*|{jn<8D8&lscR&|li1uugKz)bGM{w}=(v*F4=*y>> zU%vZpFg%Ne(emOPvSzo_jad>5+RbY#^(v8=G3UeKQ~*Zcc=1sMNu0S5FA3z;b1IG? zlL%}rNG!a4th(XrU{LW5fo;Rhft?S+aad~*UErKuE^oe=Wy$3|y!P75vvX5qrb5Nb zG1iopPE@YkS1XVjK-Mr4q7*6+dXN(}kT{WZ^UxHpGYA=*|F~~tQ$@|}@>gdwQZC=M zYSt&Za(&J(tI%KcR&?pyTnFVzE?0Ufo7F8+RT1@98j@yuOFmZ#Z>{&f6y$$7jK4~@ zAg_yS)oFgZr>cHQ;QcnzTkrn%!*UC$uDjl9Kz0x}svG14aCNwmRqLe(ckk}(Zen$U zK#W;77>F?jki{WA11UQknZwY2WAh0g9LqYUSYS{wKxVw5M8{x=4GbPK00Vej9uQ9n zTZD=QEh)-D$QsELAi8h8_39h1-(`bwkl49-W9gL#_h;tj&T%X~=^zG#$Hy#g1iewe zL_r4o;O_5Oyr^?-}p`78flJ#?C;4E-zlEiy8Q=koZu zT+P*5)wR`-KCyoF2@P?)fRQsP)aQDu{Kf0pswV6}?s`E>?9F*L*KzqMmyC*{|RIAYB9Fu!%7nRt0=}wB9H|ah?MvSB^szToz{Dyx+ew1RmH zQfAQ98m;>5%p|ta_zv;CE0rdi%Iiy$vs1ns*OnIIq4dsLE?4^ct4G_(+U{NgN`RRJ zlLr|#MmkQf59=5NfZslPLL@JOT@@P_$wC#oG^`qCrebJ#+0@0tJ}hDYIt5XGGK$st z=LeuuDhi!&iC*TILt$`1HDkJ}Gn>?gLtF~X5zVQ!vYvmSCfpyZtkrV&@4emx+iB7MF7K;X_)o1Q|EN&G9SACNpQ!r6Mb97-&jTB%$a--8Fx@ zDLOyD7FC;hsMb2Q&U=#NX78n@Oj2GjgsiM4NvpzU7xjhwnn!QF(zfo3>LRy#D|ulF zGtuavs!e|6|K7q>ELr)H5o2VK6nPs$zR9&;{rbI)WD%|oEXAqGNknHv?VXtLgAhU< z(A_XRMNl>wo5Y11!)LG8pGxlwjPu|avH`r-FxFsDto5z_#_1;Ub`#odLT5)4%kGBpsJOBoWyeFq- z!Qx>GCzvE2N?5(sD&S_7u_C>5Yq?S)-~zj^L2!q7hL1md58s@}&-R9F{$yfzV!|aNT;9-8yMf&k zj!Y~^;6Y#!f)Uo8+qdTz;(R_vl#q-XD^yIfHzmnCuG=>n%s6nE-dCgzxR#g|JA+r-NY_yxGd)&Q#?o4O+ zzTQiAI&nYM_4M_01-n z4H$NG=qf|OARHwwgSk}lqmMs&^mO~#J{E8d1ni+u3{Q356xvSkiNJbvhhoeK?2t7(fB64_lZTvx{`Y>WO|W z<|C;)MiKJBA=qt>YNLdjALS3cO(LDcpJ8;gA6qrNgV0NGfLK_r+MW#nR6W9OlW9yq6KwYy*D^-iwi(?%6;b%|&?O*@?<4?Y+VC$Jl z65R+XR5F!fm|_2bPaX(zKqAuTY7Ln+qqqOrvsFwwSpoKv$!xJIxZ6Wuz6}Cig01;E zAzR`LjEavx|9Wkw&_2Ul@OU~tN6ZC;W;j!z2V>UQT;Ce8V}9D&e)eQzdmrr;=BLD5 zVXxnRaV(KAU9LI&y5-e(atOK8sR;-6xa=6mF-ihpb$fU3uyu|w)9x5;9W^q!T%}sU z!UxN`*;&l|B+|_O-Zmm~yTi>I#qv&`d@dy)lj)?7X{enmRDrX@rW>}Fp`sQD`O#~U zA|ge8n))fGa&+lKpJ^&mdAQ%3Md(Hyy@{HfBv}{H6lgS|v&*e+RXT%EbGI6O*Se-5 zS(2@5vl^qK?xk4;)Y~Osb=xYd-jC3@bzI5WJ7%mr`o!#FZ)Gw-TtG%l0wQcc)>*X}`RH5r zQ;jF9+w8|0RTw3UGv%9+IMh()6x}k=TmdKHyO6Z=NRhh-P$){>% zH-G)x_j8Ri&WSY~3QZoh4iPco&5v{r`UAO>z&od>1BiDQ7Z!-I!+2AX?ZBpKF<{7m zu@BTX;dEo#({3Y~Xz?uv;p*^KbGzW0aFS*_?ezvRX~6{(>o1fZbPpeL0;M2qfZUn# z)7c~*pmp3Mj?Z=vl7uiA7&vvhgNP8=L^y2rot<6aazFrvTYLGX+kBwat#mS9MQ@MH z&Eui1&XcuOkcRMq!`=c)Wz&M}4_OGdW{rA<(FpU?Iy{QU3VX7m>E0AH2=h?mBzCh`}dG|;diIPiL~=jdZS zB(vA&CH^_xX2hZm!vrK2i@)*aTc8C2eZr`b0Ri(Szrw}IkP=yf9$UiSajp;j<>g$R z@oW9-5`}dp_avj4-MXPpxMftMvMJ({+#FX6kW*2$B4*tpxw@9xYM7~ly0CQ6IE+DT z<&a!zY}1PRrxMhUDxupphD7(Ck>OH;9#NN)RE<(t+T*XBsyD!|F`0C4n9XB7c7A+z z(k6bE>~>m5F1Md`1A@bp4Nvb}A&s`BP+}FrNDP$s8haZ^kd*{}9RSDrAu@v+TaM0I z9}wGTf)-8mYa(=kr#%64Mv(f&R0QNr2E=UwXEB^W%4#0gU~F>P3^7&2MrQS! z#ha0F5K#%^V9VdkfAzwERVwRaH9 z*Ic2XyhPzA13<{n&CbC_vfR-eBF0=M9S%(r$`ZNoAUO2d6lxsw$hG4>Y;KUYBSD5A zQ6G9R81O92PlJZHn@D5ay*N8PJ~Bo)?lfxFA!jOEM1KmA(je<9=nF7f@WXSnvsiQ> zzL(VigY=zEJlip5!yb>3%+SKC9PR7P>(}6T!9!K@m7}Tzox}i=uGyf@)RIkch|0*{e961A&0QT*#ni!I}ngZ*PsXG>1wA-Ci5g!(GxqJzA*8F^IYbUk4dxYR? zqPoduu;m$3=&i%IZ!8U-H3tUAFt;fb5VgUI;?o3S+YS=@j96q6c(BGI9{jRd ze*ke{i1EQt46$|LVMj-83^TkW0)Ze-tY8(Pn5s37kh396KsblTJGMUZox?J#b$iOh3~kE-ys1Y92LU2)yo40|8U5 z41y`T4#A^2!%k=5xO0s9f<*xBBv5bxFS4vtM8gbWEaCvxVP6CnBtDxWQ!28pLS5>Qpj;nicbgVkrlJ9_F2_ z%3hBP^dDGO^)A6G!49qlCJXXtzBZ!qC#(C7!()b7DBuT(kCh4`n}9qH4!J#Gk&XvA zyl%b{HtG2y!83u*8Y2P{8yomK_%Dn?^7%ZF6tKjMXRu+gu0S3~80di4x3{0F*P6^S z7yaifu*N5a&Xk!Cm-g93F2 z%u409m0c=R6-p8f34dv2G|ptiboU$G+g3j7M3to?UA-i$^-8Bm16EG!MC$HVu1e5_ z=Q4I{l#=SU)Ti_5`c*2+qqGhYvtj7#2Nw>jlk>^QB(emid6&Zu{u>`SK0ViJR8UYP zQfWSCyM0K^_xaiD7^b+L_Qlx+MbOS%E}hF~&o74j93bPKj!OYAx93R-eV}*%5KhY&_-n_}S0p~Ly*<%!$kl6FaL{w6?BjLfiV~!I;=^EOGqt|NYpEZ_4Tz{vja9Y zn|q>}&^LuVI&pJpc5L8`@LSuvsl7z%$wt!aj}rKZNrCAfwHT1u9w(-)gI;e0CCtjo zO6P18^Cl1?h{XUh6$B;=sm;L?@nLYFh{Y!DqkV9s=zL*N0fj_#jS)Kjb3n?myF{3d z&gZkQzhzcplg3VorCxSsK)Q;wfUql(Xf#R(h=Ged6AqRoKR$&st2dj^W6Z%ieUQpk zfz4;_CXg*diw`M44SY?Z5TObE)%6FKZ{H;n>rBe1bUC?vkVj|Z0lRlqE7m2A>O5A8 zS+kj-@*5R%E^Wyz{x=6Es@1%~vorG;tssIc|en$c2T4TD6R98VL(>KRb9UHV4kLsAZ-nV*}?$qoN!-|9}7H-C;zO z>>3?T0YV`(x7}H*)j$HmKp~wu@OXTu=Yy=e3<9K-lT!<)M@T7Hgho3chY^diR94$0 z3<#0X0GUc;nko<_ydU_$lcS?SWaP4*qo2b>=!oTo5O+8UvbG-{F>N`)%3{pD`syo- zOY`8s7^8?+OwW0nB2th|nmRbwC-SSuj6n?MIFU<}Fv!y-W|hw%d|k%M)?1{v9-XcC zR~0c5%yUia{7P^uea}kjmQ}f>H)?I^rt29)UF*V9_Da>N2AqK=-1 zq?{TfoLF@j*{pR;-yoHLym27e*7i6F z69nk|DG=#sib{fBjaBG)A&*L4q6NcE!4&b;5k*8o@lq+tRtHe_gM&?v+mkC6?PEkk z8F0E?Y1hz=X06ep0E-?;tu>$gArZ0%_9WHRc{ms&hB z6oULIo5P217}ri~ zf&=Nw^2``&%+67!P)Vk;R2vFL>b3G@EVlZDkg4EjjUEy(6GrK@28(;Fejq za96kU#jsA`y|I}=>cA|3hB}!}V%(5Q9bg5Inht<;$C2R$V9p;I1)eYVuP=Be#Y0RDMOt)@0mEG-hqGJ5nWd zjaFWr_Tpd4%ET#$YSLJOph1I~>PqB#E1-lF(k0a|rHu-D^HHn%r_*#hGM4zKN*OKp z{M?mHR^Vy?(eIB`g_W#1_uzSf-Q^lf4jv~DJ0ud^bc6&P!rrd?qBFJVfVqE zVv9n&_~_IulHpfgd1-NBj{Pp*)*pxf+Gevk!>m^f3p;Z^mO&0!k<(*#5oZVjh<3<2 zzUZm_&wlokSAX>IZYBd3E}BHN zH9Q}vk>kgw=k@0C_I4806HCU->`bS97zj9qPiz0_HasB4cfA;qMTi5U1n7O?YdFB4f(&8*cABx1VqroZycc9hPEx0nUf$*Vb*`Tpk zUw&;a?w_5C0AI|^k;*2frg1tCli)Fq$ zz^DN0u|BY>@QQ7=q1mY*1As5Y;K8#{(FOo1fK(oX>VVxkk_m({uzd6cISoPeCL>X7 zuVjsxq`#JY^7p^~-A201WR1oVwh9)4 z+Ath}V}TXGa1PUKWLctymAwS8nleQbpaDh#Lmr}16TSgytOq3ZQVvrw@~~&X01OcT ztudn})t=bni=w41;b~nhLD?*T06xOyup$9&2wxwKgwV=IV&SLj`=Maq_1A8^@#;%7 zR;(Q2*oO@(FhFHIQb9a{eWZIs1B>%Bb1`=YD3bFb$Jp>(Wa72g?q6GuhkeeMU%Iul zI8A`MrMcJ--g;#w=JQPq#inD&U?4Udi%ZwmR#*3vX&i@moP{}%57N`|c`R8GOtYQ) z$&Y_{|IX5Q|H=FBe|$PP-a0xy09g5_lHk+=?s# zj+l)iW_@sU6k%?n&v`&&>xX;-#sW%h#ubLJ3>fSZ71{KmbK`BGgvGd*6Tlp?UI%83 zS6ypLI0^iYfGBzC{@r*yMh!w5;<5_wCLvbkFNbF6IPYQPB;EY}Bx_pHbgTNrqE91TWsthe_T=0=q%a4! zF5kV>9bLoa47!~0Yt+&+HjEoq8S2xSWY*%J`6G6TrR}eN{r(rtQ`}VSSbVx&es~0Q z6i_oz8-PM73mxG?@N>ha3*8^QJJ<$^HzrPuG!fYywJ``nik0DneGAA1 z$<#iYM8t5R$b34DI&utI9G6({3l>`6Ady?;WI(Jpy<=H8q1OESpXu5_s#4 z*B532`Q67G&o;kYP4wGiKDQ%ru!rFVN@q4mD)cvwbmQPBBJiMfgd)&`auX7$e5_%i zdpJXo^ng9e=Tq0N-NFgU?GCc?BO;*&*fw}qU|DT8cO)o!VfHo%+4)?&AIyW?E+21u zbohcz7v}Rc2ZMkV^tD&<7n(+`B=au|v}}Pm#M)J4U9ty~(L<7^c>SyCf)}mnO-?xN zAyJ(oiTaj#qOLCgm^+TksV}&)Mu%}vQ6=>oE_b~>(>aW`HT7CFY}~VYDAyL{>zl@} zZtzM$?ve6*qAsIqm2yV)@=7>02aOaqD(6IJmTSqvv{g;6z4zf4`T7YqT0oYHUmdX< zh6WG}peJQ_4tgkAaWOtV!Ke(`^hr28jS_$0;!IQ%{p55*HxLk?42A^2G&pxOux0fHXw$^rUvr@1{=P8(^CrwB;XS5HU}G|g2XsrU*tkChz%t>7UuGNvGBV7)k zdb+mr#n<1a3-za4i7&o+JT&f$$3i2+XT&tYw|r)1l3fQ%VYE*WEw<-BdHdo0JJ%z@ zz|3^Cp4%>$n(uzTKJE;aaqX_xcn`oqK-{%j6^$+A4$H?wLH3}u27LiM5y5t4VPNUT zsv1U*b(@8qh$+ORz;YLR4txh$58g6E%PWPqwkcVF6+*H64%heGs*w zU7!dbf=wn0YivP+{@}yc9?Z?pAi5LoL%t?M1+zJ|3W=Gi9Ev#2zv@C0hWhx54ivAX z=>+OhNpe#kS1!%u?q4H=5Z-faS8rw3xyoskAN)7}>t9fX(Y(pF>D#)a(j{wrTjk6X zd2m&=*-=%~3yWNC*sS1t{_1MfO(kAYZOF)>9o3XMh~V+aMJFqJ-@N;~&kl+WqDV8l z%bKoku^M%!LXa81I; z`=f|`7w6)n0Q^fRVysjdW)hNQ1Y@vKe2_4co0*!;&N@49I*Gh z$s|?|t@a7{xx=#4n~MmT1g77;k(T)_*R+5@IOwDp;wIo+C0q zL%^PDac-K?m?jjG%l+_;S7&CYjqxM=I-f#@5E2(PXc#|g4CyO1e)Q*lo^FI(g;?cK zXSkBh>cyoKtK6kjsa3xNNv2a|>wPCA%D6S2K;7f2u=C9aAAMeE00qpK#?t;2 z+cs1aOnWfmNaUDtQK+MrL|Dw)f)gu3R}>mdoTw$xowL26>iEoZwN~`HedFU3C_?}( zMeDB7o)}$7$>8Srsc?BAcJDSIqpgvFi`?H?AaNG#`PXT1WJhIMbp(nEOqyA|!mNaTM zmjS8gO1bA#bOti&Qo4k?l)U;^Z)qn$9-dd*`}lA0Z7s1#!m)$8WeyGmXM5? z8z5Cf*q|sIbqLXNu#D`-_6Iz8CeaCpcc>o}_9~Mu%mjQ$Fc2-3(&1nTi~TX1?;x=W zHxGM;yEwxSyG)d-7}0?Bfin!!KEQG&Tz;{t^w1~}P)*hzj2j9brlyIZaKa6J#ksiexNlmTV@ z*PD^z#ofp6fBap!am>ye;)8!fZ^$H#h8}}!fJ1%W2wxN{Np{Tm*defkO59Ex^vx=i z%_Ol*J-;B@$Po=GJLpsFuNg>4anA%$ZQS@q;TYkdhU`GDHbWDW82I25%91!43gA_t+-goigd?u_wX5?} z;ecnpaZpv^{!%oi49$X${suo?!BxsUkPbPP0UZ1FJ>PJ5jr#;#AU6wI9 zK{FsQ|LVRB6;AYjI#E3HSiuY_cX0Lv?rnX{_wCu^}T2s(q*rg$4u! z!-mxy&fV}=k?>457x()72(J+39W^Ch2s+KiVeO!Q2;B)@sL1ph%{1!&smMIupSN$m z{^a?}*H6~A_L8fciTB=k9Zk-)*YAYC+3u^HFyB-ERAiQM74QOCTu1-N{+m7@WO7%R zmXD7rm`V_dY-phGjo0VhqmKP#_PBijFe`RGM=QxhGD~Mp`YT}ZASg+tlBhBnMZ~7W z0DVA$zjJA5WFQfbL##8=(5OQKW)2PXGw)yr1m=lsgpS&ULV8F7U%1b0LzokR@eR-l z#&PZ3Azn{xR8T8}iv+i99~ocWNaBW?$>Dg1nYIL;N#}CJDn2}{wAyFoObQ4JjC!!% z+1}nfZFd4e!pjcj8zthT!Bjvdhz}SaoaxJDLJ|e@WCO ztVFAL?=2D`T}|gwk2P8}-Ky&g1kZ(;N!Ksc!omN$?|@=7GOIsU*UcJqmoEHTdF1&o z-1#S681G4!l%d-#C8y@4*()=_d?g4$tH~EX{rRt}CqwWIr7|X!V9FdLr(!FDdIww) zAT10HVD@MPk7&@C4m)lB002M$Nkl6yjZ->zU5F(X&r%*dxUthm|ZT{BvrM+D=ttYnrA#fshcefy7{LFzyK`D#? zoP7vF5l|N37+s^o@7%vJ7n=Y$HI>ZbtNLssv6DEcHqTJqK(9#H8FduIOpezJ&>R~c z!uu2oVj73xDJHYUVy;@rBNV}IHCsSz!R~IX)5n-86VVK{DGv@ovU+2(aC(ZCnd#$f zIx@rB8}K^cynio~Nn@@GQ!A04J3xyd_s1P*a4r^M!ACku^y6?SjCY;iH-U*DFP7oN zB*i+8kLpJsei(~Qv)z(!tiH4?H6oEyYmTf!FmmdgUq$8QvPjvY3r!GQ>J;Nd7wD3b zakqz{jFEF8qdAr&QU9}QFgqX#>J|-khmZ_JD=WPeI#wlm5>>(8T-|$CaXmmO`W^Z7 zeW^(ozA(_c^%*zik90)-Q9}RM%_Vh6Q!MZdq2GP-Fkcs?DySeBVj(h~oms*-3wbo2 z$#4pYs(s_w7oRh)BV>c0yY-+QqaLHm_F4B2#2va;uO7eL)<>-5z9D*rTxx zfa6D^B~Aw(-~RsES-<=9FCWf?10eLW`K~uR2M74Nj#sPrr&XiV;bO6Z{wWj)X7jm4 zJhPW(-o1ZwaW1^Kxv`%pe6@n)8*ldhT)s3rGvjp*Qv|qu@yR)r_zO$~*aU#P&C1L} z3GkhRSll$dE87oSf2CUIO%4o#KVApn7d{N%Bm`(c__EaSHb6p-#uk`*X6F_Fu*Z}E zkb544EfxzqhClFu%vEHiARZLWMjemc0fGyi9AnW#9-iy;1kv0O{t>wT(a`i%^o{#> z0l8<$F)OKWEaQino%h4EC?D4RPZLz{uaJRIhWa(hRme-73tdPKzJN(;>QX0i%85aX zW=_=sU8k8#*U|f{3Yxd2MiYLdyGE&Yq#mOO#`PckV|2xQ42sI4_w6EN_|{>yqh5x2 z+k7}WBB$oiG5+d7rSq!WP(g8L<(I$tqIP_aohUovS_5Gk3>c7A$M|`&Tp)s*3eN^7 zCeAu-EVcPI0Pd`MJwN@`ud)8bP6AI2HeWEPZ0n1a8ch+N1XS0+#Kd8}hS3HFNSMqbI%8hI zBO4PQqFk~_QaLLm1BUu}*Wl>GR3VgOOnO|N!{bBHOtH~v9XF6x!*Kx~h8%_0k5rJ) z46(CAIjAoJiW8 zb^!|jd}p4oy{t73mltM{7h{#_!gc_?Q-_F%8OQ*J5IqcZ#-QozCsMD7)v%UeqVa(< zJ?cW}JmH_fMd#;VtP%zFjoZ<`{_#5?x_$BG3Q&fCgv>2066oaW^=pMpa%W@h{KSt; zB40Y{8xS{d^e77pSI4#9vwaHK2V<#P%>o30b3`!6?sAa0K=o9kR4#;qJ}~rhxyISq zNJT=dI&fk=Kd;Ti0P8`>c7!bgLV|X?3S>4`xhz?HE>;nOiy>LZ`Wq<-FLyt_i$I*C zb%MRp7{U*Bj6g^52G~|1h&yj|aE`*{G?$kd=de-6SOjY+46NAoAYLbEQmaLb83o*< z0QEE}$#+(yVtnyS1gwW^%B3ZKcF%qzd zNgo`P3YEQ7>CTPAySL_-V}XKuBs?8On%6ljeD&-9m@hTfcQOORUX)kq9IDJQB+i(4 z=Mbx9fOH$>eK326#be4Yvi-qO=P`xi>Rj{ zMWWJixtK2dm@F{h$QAmr+yVa{0VXzth*cOcSOBiBZ^GQc2V$n+Mfy@J;pBTh+D{@j z87w}8$)jQUBxmQ%Mv<)-Y%OaG(nWY_7+v1a$nb#I=V5jLbIUzW!~hW}5DJM!Oh`d} zcViIn*@X~{ai#yrSMO4W&Mg!xz1P$tC5*$MAM?^6PR6dTQ&F8NDrKp}XhP+ehI$X( zuA)21%PM4*>}FJD)C8cID9LD6N^Y}8)tXtiu9qwI06JB7)ab66(fDgtA~mZA=hqyZ zRtsj2xS>z=uUW79Yb4P>+_-SQoC<}+7VB(;Cjl%w>lq^?J&*~l16+nikOCv!g5rnm z1aCWlMIp8#EDGULh8#ZZ$C#MG`3ZR^eVzg4>GQtPautypJ0G|ww)n?8yX&x#sB|zV z%jWV(5g{6zZKy3_C`8Tc4}>%M{Qv#;>*d-<%k$wEFSZK5eZ+pd35K;}oV|o?BnXfQ z=&Ni|90Y3dc@9zsz{U?dLW$(|%=9$x0e-PqDzE~ugA%UYol03kIUy&Uo}NXfg7GeblX2e!HlvslBCTZM^?2OPTE*uhw9H_sSVGE)k_~YW z!<7j|C?D0T+Cj?4Rjh{)3?Erhfc#bey40fcSyX48s6vuW%6AW4gT6LynWU(x%*roR z*i&1#3hPYWB|m#1!{yGZk-9j#&6wLHlB{&A9!|`xW*K$QAZ^kvB{#-VLkUDjcbUOXHViqn2{XLF0h~5Du z#P<&F1sOURxhyHU+<{nzLk;I=h^m-(@ri(;N9E{p4tu?UQl-T9n#q15;E7E~OT{9h zFP{g$03sqYdWTpyu(I*{eJEsex$>ixr(j<1#Z$oQ+DFHc5rY&5kO51M*jNmLFLw&A z9VCdd3ws@KNN6839mnt>JQ;FA-ra00>UNFd0|!ten+~LHydnVK*ct({g`EM|lq{Yo ze=rzjuHlu=%`CvbA-+dEfKwf?cqoghIeCykY=G_zd5qWVtrI%~NduuDA`!eN2y}bDe+awnykr!+c;ShvN{+toVP=Yf593AF9u5YYh!dbRjC@4W zVIHzU;9vodHuL!LV=$$8!OgY{JfC+jfvnFq`7(4M2yeFF_eR zBk;*6&Il;UrzV4l0bt39+$Ot&(-Q;|l`^|-{Q=M0!5Qg4Wo&n&K;oi;ig)Jjkd;f`tqC`Qyxw+8X9 z?L;F}X~Kh#d$zYXkg)gl*|A`P#1MqQaUn~DAA=|%--$r*?A$Jhif%h`B(U;>PK(9j zxW~zcqfS(8WK_DFj(IqRNy}A7-Nsj z$oG-9VM4{1(`{W<03Vvf)|qvy4BQ9)s#~i z^e;{6gG=*{m1NLXH(j+!KKW-9v(AKiSvSqY%)m9LbV5IrTG16I z#MR{m;z1ye^NhQBzt9%(9kFI$|HBpydu_o;+=j=_Nu^Q)y2R^(paFtIjN-j<hc0L$S?eFdHGLK+{fhZsQx0%?CxOgK1Jt4$x5fgZ5XoP(vk_w!KnGYoNAS*g( zSZLMYlh2rhG6!j;kqCq!0uKbtwYtlD=6|YU7*^ zsb4c$l`=2nCYAIMv)nQ1R_^M`yAnC6RI0U(OFh=jS$Df9x*Mub7s_{Y{P8o|dR6^q z_tkq;wWv->M`23LRNYaeQs+=r-$9Xhx=`6*zL>>Vhe)Of)?6+h+xJO?zLSyrw`PY2 z`|#3nyIp8D*ESDUp6_754;e)xp|@}RFgQ7h2II>0>#J)!Kl|y=ON}FpQ`6}r!9rfY zePhIK`_m8aV!*$(75^Xq=l=~iGW4*7D)M+SlgYJDuwDtn4cd=TjSL3IL&;Peqn3a1 z&;GM$c;dy2=g(I+iRsQ(-nKfAg2`KYX~lxtpAchPU_A9+%T5 z-lV9o`sZfnUc7vX`jzF8NZrJD33!7%<58 zZr#4N`0L+)_2l^r>~Z+&>|4n7=AG+su3!WCUG|MVi4P03mDpjpK@{p^3&%oqWAO?Q z2*(}J7%Qv-L==xj797KUp7A%lUgyWZZ?13eAZG`mwbZDwnamb)1aG}_^EHeHQ<*%` zU$Et!^f`wI&r!(&Qvtvwq6pweP+r61!G$87Abpjh3u)5&wwOVvP8U(sE2lm6XtJ_0=v!2%`_!AW%gCwPj33>qNu0fR)VWF9 z)(xYtTk4%mqvg`@wg$UuMk<3%uEbYA{_N3a3bO;O z+ThusRPp-e-601<>O?42=h*O-`S6(i?8TE6wgj=cxp&{XJsI$>u5L_(rr)}MV|L1g zvIQ*MdbM=_jk~w5#j2GG5ZKt!A$=x<{o+ixbJF&@hHl+lbd3yWGv$rl4K@te$N}4! zD;5xi^>vPkuZ^`2yNgmGf91;3^~I^S>hQubXb|O-Z~V$!^v!!WS(oDRI7oU|t}cJ{!QI=}VgcXS(!$h- z@888IoQ07!N=z}>y4eSR@X`B=bCVyuediE$8iK}72jFjzvBt+;7#v|aRjTB%t6-?W zs&zeXMeJ|G>^frrg=p^7=Ex1QkL4 z*)ym}U?gzYAT#r_TY;|DBvC89OVwt()bQ#dq#D)r8;$7{Bgv}r(usNjdf-}}yIe#) ziM53ER-oUEj9$IOnB&I$Yd*1bMaoIKdNZ8!hKoDj{PY*UE4P4_a_~;zJ@E0yH3$P_ zoG6{1AYxhe$1_utNC>`up8DeP>hraDI(_ioJ9pvZ_YxVu-x-;j_|>m}|Lf0IHsa-# zZyw)${k2KIGn3A>kw6eOv{~BP*dBBQKKcCN((=-^>kA)${Hwzge1`_vM*Z=UpG*9}cCdUI_*V7kU zRn{^>I3UZz_~Q5kyu0g*GfYH}Rvsfxz}WQK)w$)R=+62J;^ck#@a6QB|AY7MuD;yf z-b=%|Aws#bymWPGX2Roe6Ge4w^yTV?H!y*DI|2gahiGqMj6zDTz>bjz!*CwG!h7F) zV|H$at(Wk5tU-_va~={HHd!)?WRg@{BYh&jjE62!sbpgy^&~6$kZbv;(j}v$c8}gm zQsP23H86CNWUzW-omfrurkEpGk0>jPoJh7;B=h>@ z4XR3v2asGkr;L`~gKXANlXu^Dp51!<+fTnq=Bgu56Twad55Ugb=N{4lP<^p3866(D zadj5y&q4lhb9Z}w?#l7;DWN(%V-7&pk#UXK2k;20HNjW|j=mj<%mqF6m6f&H(FyWg zxWT$S8JYc&$O%0O7OqVKIFFd-sNIXFvPR zmq2E3>?E0gXJ@A4>CDTGy|>?f^TYSwdi3QN51*{=r7NS((d$byM7Q7E-FLczJTX== z`9g_TfbarIAS$3lDvADgc$gTB4G9n2Kak3#2xQ`RI&u4BAwsMMRLRTdPYz0FJE`>G zuoLKq*;p){&2R4PX0!D--@f@BaDUP6XWbS}_^l z^G{4|ZEmh@romUim4l5a5=>+RsE^QJVI0H-qW z)X{>VAQUa5h$Q*^oN@G!prn};BHb3!QuL$GEt0WLR3_u+Rf!jB@>uEAW1XAjd3wG4NCn3K{1H?a z>6nour}{y9xAFe1G zodT5_j8qJTMo~YtuuCGOUkj{YHt1`co51`Q3ix$^0CD&uL|(DElR663{0N4sw*LL? zO;GA4BT=CC-nf6iUd_?TLbHQFkM(46VSz3Gm8%Qqr$^=b5e`Ja|L*MV0LoJ;f4a7P zKt%Avqxe+lZu4X)nOq<2KZltN1sn{CXB&q*$-?sWCUT3R5yy)SG{|XxKoDBO^@%`%5yaP(fuaue>5X$mklc}vZBf8QT9YYQ$ivv= zXsWS_>nhEPd#=bK)Wu=^(HBNR+A?TWTD_1%<-1^=V2l}~0(lY&U+RJMQa^ysrhXN9 z%Yzwh^kh(@&CJ@9t}EwxtzPl2)%#K7sHdmWfu2iBs4JDtC`|&O&+-Y*`*1)Qsg%l0 zT(Ao6w)g1p$lr$=2R*6%s|PFhZ!b-T{8yJ}d;tUplh>DL5fSApM*}0{SpMI-bA9=> zJD+~}Bov%L!gg&r_PbyIy4C{8dK9yNky3Q<2p`64iC|hOW!Vcifp0$mp}Olyq|;6kd9Hrt>K7Fs(vc#JY!W4beGc z7`rMV3BD~~(j;8@{1BI7>V%Ti2vJm_a#%#AX|;F!aNo+@OGGMNYS2e7b(v}1zeYDG zFQm_}F+|OgVA{xaOQ=z79 zvvHkby)3fo$JWD1a?$)5Ry=4vP-HTGa1&^iazs2pn!2*`4ZGfh>;@)V@kHj<)tT?V zb5}y_9ySxZ>nDAVLiMQKZUzI+J|gvu*xtN7Q?4D`2Znz3v;UMY9AXR2L`zur5RrXm z79gX+KI+b{Jb7MjqEqh&vM?H%xP9xYe|!{RdysSSib0T#+g~!1%jQbBW=~FruehCl zpYyzZywyL1Z%yZ<;q}a;*2FFx$vbgVmanj(SX^D(Jv+;>JtJxe`vF!4_Bj26qkFp> z&>_yD+ndioDq+B}mF+t(<5=1`Z_m%orc!nyz1GlkfnVjFV9Ni~58wabgYOkmJG)yu zLu0P}RAwoP)1I@CJ7B&dX2ts-yqAw}A@0MM34Pkp@lFgOeRwjJ*n76NL)clwcU~`% zUdv1ha8t->?%%n(v@nxP?IiYh>?6*>*5St9KEVQUclY{&b91v8@m7ktR+G5vSTbO= zULo+zX{og^J2O1$%w~xtVaISDk>kuv)Fy~W0}LSySP^q$04}s7bfc85SW3yj=uy4M z-7Z0@E6J`;)EsUSovO&lVE!@E6jhsPf9$WSl#a{e`4lvd+4+S#OOrlSH+U|cp3N^_pN>Wf2Pwq6 zKcv4PD@s+TLM=if96Hgs&`GcQr80xmt-Ff8 zq<*6+sY7ZrYo^GBAtY7ET~(3Fq+8WJFb0NI`?pTWEID~>-N5DUTrAK#ez>EDE=4Y- z>&L(F^i~6^LfTRdvd+WM_{M|upPe_xIcKs_0qw2bJgfyrT;Rw!T}x>D+h^_V$Ah$)x`H$s_a_Bg3w-;nThK z=ehL3)AhY#y){1rV)i>+g;1c$q;IoO|gFQ51BW~Wff%C#}Uk44sn)9)s@nU{h!-~D z9S%=;agxJMe9VEjs4J5@fOA8ugEatwOE6bpF6Tu~_{Z+PF2P=Yoq<^GX?(^G}-+S-Zx{Q;!vVC^G5>1)@BE0jp2_7h2@dv3R% z1?Q;0&+D~EBVpFMtT>q;;VjI{S>N3I3FZhQPz98dzkE6l{)mAO)22|P(1t}h-7}rU zwLzRh20f%B<;`2F0wbF$rZdVqVOFdg>a9R%nEG^;n&Q+s-7>0DiJV&l-l(j%QnP+} zG&%46?cS4)>Pq=Fic`C4PYU(q?4Fu;yD6_e)1@!fp&p$yX;m86{h~_0&xesgxmv_o z2$ejB(syp%z(AWho^Wys*exJC+VlRsz3p_N{$OSO`jxqlK6nSfXm;<|^Otkk_7Pj{ z7$7&O8d1RFAcTz%;vs+mZd{2r;fi*)GWD~)bP-^kR4OT-{|x`|F|>t^CXwo^<6b{z zEI=mQxV8+m&F*gUs96e62GPLUhuth(<9jBRLdyX9TPDVY!Pl7q1Jm3)pX-SJ*a#JTzJH zm7!X7-a`m#j45g+v(9f4J+}<%5CSo%#44&Q)p@wD59_X6Qd(DK-0b6de>OvZqej28~8xD=L>s>GC0WN}+3Sj*y4 zj4^-{+tuZ0HJ@&_PU$(aEN1a&WY+H;8@5BBEj)to?ZIsUQ&IN!Jd(#Bf>~v2fr0th z$Z#sTgL62G*tO*ar*jyIB0xNLd*AZ>Jdy~)2V<~PDhhvl=idF;^fcBt_JQMUHi?xj z(E))^!Gmf2gaHRYDd-%z{cJ2CK{@D-5$Hz`O{mIe^(*%YQyL+ib zGDTQOl(V>vpj`5dyQZh67~AdBBW$TgM}~NN;sQTJ^om*(WPZiHDQXkPS6EO87JZ$Z zD91ZKl%@d@&KWjxCWUAUR9BbC)g%h}YvfXYEOOEmq-oMhH0!;aa0bF8bUa*13G7e8(X^s5~|dj=<;Wy z6OC$NH=f3pbS5@cZ=L+^(@%&=N^nKC!dI4-)ZW)SKRfl>mD%8Acz!PCb`8CC?}le= zFbPg#A&+wr+X?X5Tpj|%57+VAK0C*DJDn!r0@C*OyYIg}IpMo^_x8+`KcCnF9%MhA zZylc(@>zO%=k=>^y>;6?*jLFW3E)$%9TrLrzD{Ivf{3n|GEl?f!ZIT7)6Ov#7V~op zi2eZA$CC#Watvp2Rp6J86$%7m(b$a}v)7gu7&6ZCzoI|xHGUF?H?R`_uaQK{EqMKHIGj*-bHMKW)?i|h1n=^ zkV?fe;QfplV3i0m`Tl!vO(UbXA-7=ZW$+-8gC!Tus*E2NCJ}P$KTxP~n4|y^sY4UG zCMuz;9_r#gxqInN749J-W3IRA>^&h{H>al9-d}as7(%+C-ol!cjUF2Pq(rwuow@f~ zpZBJy{1+08Ca8y};^-Ma#+7QqC?k0|y_ku7W|h_uVu?v_KK<>dkLt(3dYobyicdeT zrtnt~_w;o1AeF>aG@VZDB@%XrmrXf~6{93qsyuu89G9K}0bj2q63Mmomq#aroEyR1 z8?wk1ig-{D4Gv@POpM1wJW;P!9zS|qsTluh+JB{LI+?wc_|<|AOyp#A)Cpt!@zfA zW9^x3(1}F*Ae9h%oWU_{L=&krz=?2DzxmbAUv4FG<>Nx3h@%5qL{2x*@sbj>=>FF*B>NWENJ5`cC)s)n`VX`lhN`S0WAJkJVeqqFGJiRtNt0 z;-DzKw<_aYJsZ`&;?R$6-q20(Yn`Y*=&nk?SV67+=t2x3l^YL%&dNXhPygM2|39Sa zHo$3Ee2&|#Av<9?nC%)PV@^EGFdQI^E*jX0i5NSb_4Sp2Kir28S-&kf8Ox-0`Bnhj zAc4TK2A3Pe5A45DjDTJM1_;oHkdezZK4J%uy3=nP0t^fDQjD5GX5f>%MsZv_0Dg(hb)={`NF6TB5;9>&=2-VVGi+8$O;*{_VMq(WuX@U|g~A;^c?@2Yx|hsH0sFxVc8a zA94(#*K%&|#(9}wFyQ3pBbc8b)V}`z=D+?g-+1$N(2;l?`R)?wf@t8t`(X7hVZj+a zyjxj@%wfc*zd!~(1Z|R%G3iQ$dLZc=O41A!Nd;C`S)wk}RnN_yQ?nsW%+#PyE=c6a z-dnZqs5D^JqmqoCT^azYtgh6`ZY(w3>x*afNeZa{Rc+KPm8+*xSyjvOBdeCIIovdR zV=h6ulD_s4CMu%?{rI{7^M`-s0LxC5=)ySA4B64L16Y7|&*zRk0+2i*v5s%=XYU|fo!AJ7=lBKgrl*rZ+)}C&YOWmgluMN)cIhiK zE<=)4FDD}Nl7=L!@jMrwO4p#fC1trLLr)$_`Su|hj3+h6!=+5Tot`ZErcpv&NWUZt zVlfzQvmlI(C@&TMB2{bLTt~RIum>zHA6CRzKt=G#e3rzEvouD?! zzKpl82Cim_%o1pmwl2Hq1`}vnKio z9^hjmwh;#i3Jl2pTDcg)8W1d@vr~NRCPUNA>v$L7%Y%J4Kt$T3qAtRSO( zcxV7S4^dSCXyJ6R8Xq<*Uhic3AXP5pSbSu8F+aOSVlt*o66(^1qE$)Pbf^hTCz@nJ zRk}9$HS=FcGzdrjsOHr5AO4ZL6g}&h3HawnuJEqJL%QWfB)d6FA&J)3s@XOmpCcFjA3&x zCRnF{k0Q<AI zWJ+jz&LyIC6IO{L$o?RHA3VyK17rdW`!PSj%`WH%%4%qScIF_Pr5kW-Lw51~35Tbm zu@IX0;}#5*4TTT;1WZL=yAp%(XS@<&`Rd|q`XI^7fgYCmd2VhIg%74~Xl8J;WdNeT z2cG~rG?W^diuk>P&A@^QTL{lH5yXy;n5Qj}P!Y&6wzJth@Q6yukIIP741yAl$potq z4-FTI>1sZg0ze`bjQ}^#;yi^>U>JLgC~WNY>&p)wt-x&pUia4B*XhPPZ`~%E<@`)6 z5DX9ok9`Wh3=8vfj5mBqu3uS#*+Vw4ygb9p0rM3+VcZj$0^nDL;0A{RXt zRQRLszZaRB6g?1hDHP3|uFXsp=O#alFyoI!@{&>i(*s6Pw$KHM>ab`;s6(Y&DLRAx z)g!_fNM?olmXX+-+q$88N`<=e%Z!}SqZ9`-$w6m)n?;PEY!8UR@vr-MD`;myEa0ZOv*WlklwWq`_fzy8_^u z_`Tx?&BMNd)2*#l)VuI?Y?Ba+zj^J$n4?_g_699rM*{CF~(UX!x@q zytlL%6K}b}(N919JbsYDY@%3Zxo*$QdzKa#H?}q=!_$FrX8}XC5f?TM7(@N_kH623 z9`NhyS7sA?$wK97DC{fcGtX9c-oA5Xac1h>x2|EBgM2@e$+eG9dB&gp<1d%zq91(t zp2IOzFBJ|YuHF?u^OK1r+cyqY;GO+l79T!|1oP^grP2wnm!QiIuu_ z$^K%yR^H40LfuyNly7DvU5_8DUh_`(ue92|`X`+AK0r^8FP6MmCC%$nBzNz~8!X3H zKmGbChB@V04W^EX%j@+40fiI`;TFygSdJofc>Tsg$nW~{tEb29K|=S$BK|k;-^^#q zU}g|jJ>J;bLc7HK zoC;6ezr9?7pXqlz{$_<0120$9_D;{lr~~-#A!HRy4J>+akZ<369RxPyY`8)#E-wA> zgZmR6d!?Ad((KOdrRnhG&UPY|&CJfuzyHn~lm0PGV@K_0(P-$}as*CsbN66j>GmMN z3^jloFenFa!~eF{A(4YjN1B)Cuxj=`S zV7g@t;?jB4%`O>TBs}9vimHDX@{z(;P3?#-uR>NWl(WvQ%JfK;k{5@p&d^(cb9o^g zsxkR%KAVxQZd!Nsm60a7r7|_as5EKL=+T9yRi%;@e&`HK$0D0xk2`>~8ll&4?NZu$ z0!5}#bg~cexJPP@qlKGSSDvi?TtEEq`}J}Xj5z330Bg?scM~ZTpHw~W4{UGkfBF3L zR6MbNkYw`%=e98KhYs;vKr}Zu8`<4YARAbDu}buBaQ0b?!0d`ndcXMO(Zgr)zyI}% zAHIL%z4zaJvAU5+$H)D_yLVo16yslh`LJ=^@AoGD;?F-itbYt6dXU^cX_c3jmd`=I zKk))T!aHXD1cn7{WWY`HrJ`+Q!ah>Eb?08D+ zbiR2G_G$rKehhSiY(={e0>oy}fDnPATKVFtm?8^Bm0GBzh(ijR zhn3SzxcIk+jCEDLx6R58KFGK<>5#6F!ttF$h|cJ)SSNb?bT4~b>pfR3s%McWmODM8 zNM|HfH*eiF@~hj%t)9n|*JZsHeOnSFNlPv8b0F#>fWCmE1AGCRjn^As1A`$9Mlq;J z5HuwY(r@0q?PU~I>j(KV$Twr1fkw-bEtA2<_GNc>=lbH?J3CJaM>jHxlGO44{p0V? zPY@Th2;x25K3iT|`q2;G8yjf7c>2s62of=seKsfyXdCJO%=8qz+fgeS4!D@J&(2*4 z16{tzwQJ*%iLtF>{j108=OAHuiLKxW1~5#vfw?d;(6{z-6^C_jw~5z)SQiNyb}@wU zq1j3ebde3@yExJT6E6BCM2Hf=Yq(G@ZSKUgWw67m4_1bzCPS^mBNjIV8;xqt>GAEQ z%XkgO(*swo9W2gGGb9>Ewqg;PT#-+SBzk{$y>HM#&yijNVk%&8{r#ZSpPq)F9BcIbCS@VNKhUTfJ z9y5a`1ohiXJ_c!BEF&dN!qK%DDONV?#Jb&Wx0e*H&Y0c!&LL!#w@$38FZ9<+RVUI* z-4{JRQL!DgfUo~uuA*I_wj{`>fprhYD0t<%;j9^Fg+lhRN zvjE#%jNMWPaexB9{ATCJKe%ynDma6o^U)~*>F^E>*?#$}Px}T$kytL3XJ%vnc4{t@ z#hE(0wzGFO=r}%Uz`wy+-MGFKne^?iKkXZ4Zy&7Jj)}Pdvd8tg590fAe{fsEAn-N776olOpHDujr+0P}CpK0c2Z55$j+;CC#pT5-tSSJ7y!ZWgypashbi`bE zv9>xnF@?D`CNbFNpfW{zMkpa!_s<6j8aLq&5HIZXq}8a^@pW*yMtpX6G#c{qtijSHDUrCWYT>$Jg#xeZ4kq6XLq}O+HddczyZ$AO?~}f zl_1KlQ9?}$66I07P%Y&;eWKAK&=4R&$h$F&A~4?W&c^O;9GT)lrU-Y1VH9Q{$m$T9 zAYy^x9OysAFc&x%)Bp>!vjA6M1T-@4vO-8A}x}m zODQH17^%iBl|h{=icp!1TT;|2-+MysQn^7-CXt$#s+b{X>rLZanlQ^*q$-KrQ`g-g zq)GHr`QA%9ApQ96^XuY#WO4Do*xOH!k2|r<`s}mMH}*?R zuc1H=c@<`lG4I5!YvDor-H$(g_-rEsK>&LVRJ3bkV0Y~$P7QmR;(PDhA3VpU+;J+R zxeoSh2dmp}-Mi``vRffjC?6u-u9m7RJ3GmA636LAy^d8S;Hu2-;PQ4(vzc6ebpZ@%_js5C3-+V?`5#Bb&J&4_?979Yy$U`>5bOWez_OJfcU)6K_ zqa&V~8GkytZR@lc{)`xZrM{cA7N6iMlsz}V~Hn{alV}D3MB;R;jS>j4qJ6r}aK{`Ha@HmJKTkTV# ziKALZgU4P-eP-G9aIhjFR=`d{4)u+dG}gT2FO*{tm`XJ7Pz(PkVGxFut((ipAPF>N z&?ni|p+}2Klo~X}_av%{jl8;{?hrETFmIcToN=xHSWR9?H7;}w#+y)2V&3SzV?3Mm z?^Ts3$+dAyGRVq~=0jq78@<2SQKLCT)JIJHRiMk@Ntg@aJun(YxtY!;&~y9T-c)@L zKy`)dIf$DZ^J%GQKWw%4lZE3mJG*v(eBu3ea2w^gT`e zDic4NqKq<9PBDZ=B~quEQEnMEs3d97%B=3__EblV4Uc40HApMcW0jzOnMtMXZy)9Z z$Q@loQglm34c{&#DZRBxd%D!O^6E}>rvX(^CmOd@5o%!Sf{}nj11ia?##o5VYgBjx zeS-c8E+{4fsdOG)5bl`=={;Oi7>4P5+=T&u3iBD_QWYP5v-*$?afT?uQ9=WG1Jli1 zCOip()!gdpXJ0+rUTBIO449t9#o5mvu2c?B9YX_ii!+d9zImgHla(V1(c|S;ytF;QybcicJQ&H+>?Dxc#^`y_fy|d#B%>w?2ea3*Tip>mG zoiou$>!dSS89>{MhkRrzhO{o1&j&s1@&^fB{$(ahA9%g+T!eioRS8kC==TN&Y`Mfi zhNUq$;eGlng;?6-!gzFQ)a3?n#21(<7s0!#fWsQ}5&mrK+3E(O6qj=Z2SL_oeD6;x zEg&2l*tW9+V+`RHtUtV_R7L-aY9Vi7O!(p!X;}e8I=jUuihdvhDcMUlT$-ay28+6_ zYg80-k&=ztG;Qm845F1JgXUE^X{Ag2l#`0ZH$%65sRw2e`Aa7_^hs~}A3ir)cvU8D zNp&3E4oNdQ&HR;XdWF&e+kWE>_4ZYr8*diPy~~eQr*%|kLPH%69$FsQ_*M(7K61a{vH2ib+I4RN3`% zb(64DkmgzYq*^L5M{exIUp!me-B^P-*dgRV`|HY+fRjS`xkjjF6aIs?DPiKb6!MjFxdrrXs6 zLY)iescSI)7&)z4yC=p2nEmM9_>MEluQFRr^k(F)v}m?&ok-uzM5%$r9g9veJ7nrt zWz5-x2h~r-JfqW~mB`dItO#EQ{A-*St}flc0tLUAU|@1?Hs*E@kByAk`UV?^)j``i zW-{zpn7r%q`NylpB7E2PKKvn8YEx6eciw#?lRC&|if8!t+HB8Wtp11p;~)S2R}X6^ zw$E1fswV^AeDm~|pFSHL3o4~X2k(RZRQ9W9yC{Po+-AL$&t)7VZrk|)u0+VtU~2&A zX_j+)`*E17Ql$x`$$Q_s`GfcFVGV?u7ZibVrMbGkJv!z9+ylo!QS;Bo{`0^3308Tm zLZJ{;-kOVrJ$M{MrfYbTPe+ImR!ApWO%NE+uMEthFLgU-qLX+!5D^HKaVimad;Osa zA94sdJBNoHSQNZU%@rt^p$nsY#IYn|fQY_|RI5C049%B}_ z^||SAcyeodE1pbZX8>k5GI3}bs~yZ>F?kqqV@G%P&f7PzjljN1B3pKbe)q}e1m~Ip zO&Onc7n{-+W{TLwqUmA4vk4TfkNMS&k1DjIDGoB}WxIq5Isa#NDkw`j1$A?PQF%w<-s~Qn@u3Q!k>&84mmOO zw6XU5&dt|hOKvPi|KV2;>?1CwVP-!xNcke>_h-+Zzxd^EBLDhtfAVks<(~n~gMk?P zlh2<&Kkvu%xB zA~)i}j@?~sI)+an7(fGk{aEXH-GI}#B~DqRiMay`U-(M=>RxVavXkKxBd5TA2ZI8S z%Z)i}@*w|w>wujVw=m>^0SD*> z2Z?UpD5mq#W3&Em7o@@qJvJM*avCl6)Sw&US0CM%r@AcprBbVH_0r7Q0Sv74+JoPG z@pxd=1AD+X15qiN+(BiCY!{2Pkzt~t9E8Htiwn_o>VW-y>$I<2tso1+y8#l%KRgtQ z0&Roc&6uNaW_GS~c!)j`j0D2^!ems49Y5-3DZmB~iTQ-j0X|~3)NH`9G)sr|qZeB# z2C?FW4vA4|?>pJu-cF|T3@U75(6JJ4<;Hc;fcqbO{q-|Zlv{r2Y8*DEiv$7ZiIIT^+M4j+PQqd}A|K!6b_BCkO( z#+tz3N7mqVjQ|(C^7NTf8`>Bx_%E>?MQVm@b8NT|+n?tfTeSv=c`U$ZIEQ1~j(620 z#z<~P`1av(2ShF;_~Tv=Zi^TfqVhsZCJ2mPq}(82Nz7&((eK^4IVs^Y)ILb2+ySvq zV9wJncbqe%_>o0Qk%0VFM4-t}pIgM%Lrx~4NM=p+I^~c2T9vDOMq9dmUAan?qBJ$*-=UDJ-52v%`QXJ%5M<7y4!nhWmk1yzQZ-6h`MFK7=QKBr$&$@bE(%; zS!HEuJ?kV^zxeg1k8_nK5->5x>9mR1Gcp9)vzsq~fhJH@TRQ-HCQFt2v-J%s#*vOl z)Zxh~L31A_zJs9e=CZ}F9=zDxN$n-lI|MLD=Ma|zLUMG}h)jtGH9@int%Z>oPSJ%* zt5hjtZkn%x)Y%VS2cwbI1B^w&MG}v(aVYT`0P(;BkIp=L@-&f1qZuj_jpyVTpBV_Q z+Bhj?^Phe4X)=|4u=3*Q^c-7hKyC2SMvpmYAA9)t+0&P6NDHwcD3oe&sx{&!*hap7 z@EGb`UElib5k^QkR6Xn*QNY5@{=+~1d}nJH{qe`2eO(b`RvQc(yzua_8$}aBeqJJ! z$$-R`oNl8F!u}PZ1+M~3*2j;Z;&<3Q?p$4%y?^ian8Q^n*8#OmBoesFZ|&|43_5K1 zC4w3`HN`%YogIOs5UhL ze$V**H}8hS6VL-gQK$lfkZ+~Nka8B%Bgo+M_+ycrL5JqzqsmGRJ%>eyI?bdeb=6D8 zuRJHwOxFdiiiK!}I;AW8bcNbhjz4^2l_Z-Y^lxQ18=`I~JDwIAFW=9Uy zSJfu9DXvtFAQ?qw?Q)j`y*{uOL>-o3A@V&s3?9&VbGbd`qtLbu5HtnR!XYRgaU!(~RmoVjNf3FzFNl>kn!#qP$!v;OW->E8 z6%L=Y57~xb?u~B5HRkD)XmoWv1whk&zIlKv8v&EY@a@T!uP)EV4^oexJtMRVE`UU_ zM@7ScTtip6vk$IK?ZFx&zI_7rH{{cIW$7xLa;#lhDjP?qrH#}~bZTZMvc9$DaCk6B zV43}gj~`+*4(?ZKYrD}TO1X>0>ha3TpxyEC`S#jwh8;^|KQlcwgZuizYy=V9Z$H@^ zANL}H+uYeijmye|SAxi0I-RAZYsJzzK*8x8s$n}82hes(ylw%+s(>5O35AQ5iZ6&q z`YEun=tfy}tFTtA+M}4+GhLE&dLuP<>o?oE^jAIAr8F*e z4c4!f!KhOY6scT4eor&z`>^gwSt4)a41{!dXb>Eq-Ti$$fACacj}Gev_rJZf)+Fk+ zCxpQ=@?T2eI|<_1uzehPIKm2e4TP|vpr7puf^^`i@FoDv4H8F)1oS4BX*iI}@^*&n z6l%C|+%NF0|ohU&fvLd7Q1WkxpJyb^qCvx${z zzF5Rf0Xd2wMjRq-&)mL!8=(czTx_~(4c4h)z+5qn9kve;$#~2$$JCgJZ=(aktlsM; zGAv>~0eDfIoTao76lfti8C-m4;~<4GsV{`^EYgB#%sl+n1*{aQr{}(vetEQ*BxV)Y zIl1JYb$+3gs`kPVy40A|rJ9#2)cCWSH)=Fn?dku8Q?kjUe)sX}47?oUMd)^$M0?3{zCOkR0wX?^b9yDVDJ79H= zz7=RyT#4LcFQ9aa%QF|S~1F~N_4(|(r>pVTGiyGevSI|xoSwaVvK2B_oc?jVN{`R z8&xafrtg1vZ2ZyATDA4&G&>+2WKC7ClKb*TyIs()iLq_IR>>i+9wr(Sl`%ZpAe>;( zOV|&F7PedYQlSp+E)Fhu+KA2wyJx%`h*>=ey8?w_#q4G#9V~zlMU- zSbUP<cz~X?j?n5e2!SFItFR`J0Y~WIVI~nF%*LWj+ib&` ze=9W_@f- zU1*ZvPFFXcu*)juQvshhlTDGt6pr5;%1|(=2r!3XAD9g@(=&urfOEsI8$a-gVC>V+ zzXazLofy7)_~aoB!+;1p2PA$@(BeBCA{X&0WaSxgprrBpL(@}}VEiJk#P|kh3uwJq zZXlWtFTdgrv#ElP;J&tx@ukOYZpm5`62g97sWO$BRt?Bmoh|EP1q!Jx) z%9LR%ZnnSs^lL`D!N{qP%x8wKgtYWmRv%voK!1Kk2FCc&N!G7f1QO~cEk#I@$vQDg z=&Gz%dg)oJFi1{%(sNv_Tk7PHEk{qD?>xPn>7QQe!V|r!ewD%MoO*wfjTd3QIjfX$ zlg6b#Du?cv%vgPAhb`a~ho-@s@&ppegZ=m}ihmG%_=L4)gGDBnOTv^F!Mw(yvUP;W z0pxhB5D*_>!PRV3$xOs6ptnz2HIK)kqN{+%3wvJ!{$^u)b9lrF)VkZ{g|dsq0!tna z0(*%)kH=5EUPdWV6#&BmRs{PO8e*GXt`_?3PB7nmZaZ;)!05vD2(rTm$?pUF9zPmF zKlq0SZ6Lq7JmZ;sDG~|eWk6T)hr`jDeH1;JXA30iU9w5uZN*nyJeT z6UZ#$@OsDZ+`Nht>*@Jmwpff#&tauH;dde}!%CXX9Fb0W6}4*7?e^5FWt?Z>ehGYn zT`MmZX9O(12?@R%-)1VQ){rp(UtGs+8zvSA1U!pyq-Wp4+QsW-Wb!FoV3j8NuRY**c znb0#|yN8hEj!6_c-MXu9Q5{8e9!*7xSj;l&FGZ|UBpBybl4_b%`DY#$-5Cigk6tUy zEZ_Ru?WoxyvUIEbR(_pel`=A4?1xpz$fo6n$Va>Kx++9*Sg`EmiX2Ikr_U#lNp%Lmpo0|bOybUF}vsRS}x2j&M3n}$)b!_yZE zIrQkTYIqYNT4fRQdV?%PkVViJ0?mW{2Bd%~jm)5IqcAtH!Hw8J1)2^=u@8V3V)f%c z@~}Z-6rFcYwl)E5+sC5;^j&zhW)o#pfgKk%Z}@T&w-i%o!h{veHQ8^Vi8?tZz9j*U z-hJ~;#BPjlsFvk|Egy1g4$MX|U}L#Mi~(LNvBN+hak(7dJbjuif<8w;FDybU&BNop zo%I@kV6yucI4edw(Zuj+%IEX-X3HNWP9B~h86b$~qLT!LVH(2E0{JrT6>NCe{P3pP zIxDNuyBlRBszQ~C~SFY-tPr?tZ#01 z7AN^g7!l~v!t4|}03lsr*hEyI{_xoED8`O^>T_$#F>dP%BT2~>)H!$6!0V=H z^6AYk=Q0~}=hcVY>S>WoMzvCxB2Cpf)yMCSa%a@7>Y}`+VQEuQxqd!rMjrXX6B_NA zMdW!d_Qt4LRVA5w?)IMR*QkEGCFqCrfd=(|Mp^8P+k4MG{q2`8GiBUVKvNsRq#qDK zK5#HFg}Dh7jk6~km13nf8Hy5E7yPQevwoEKr>BIwVK2?p45U4~f+%oVEJ}n5K0ZP! zAfQsPe|{el>IP(rr5<-tFpj$s@twjn!uB*96>O#1bSeEwM_lj*2Z^f9XhE6_Cx$&3 z;lNJN@SGBJ8~-IYOcz6RIy`sQ*N#n16C4h~-L8P^3Tr@U@zlW{`yXJn(&;4Q4S6){ z5_Sx1;jUb{1y=?@0^Zc)mitq|N4aB$?Dz@i}l!Z_XNhdTwh2O&PV4rq9> zdBt0TWi6h}prRr6IKT!6X-wS)8R0x3Qt#m*kVA&S3g+1{LM40)(3Sv~9v&g3gbkI& z8E;&+c8Kyw#3*($G|AjS<;W*kozV00tpK%*ClU-uxI_W|9UMTaj!Xu&_V$g}Uc0_L zH5JB&i;t?-A!aiRgi#45*|(`pQI|HlXNoYO0ikN+;HDhbrJ{c8(oBBk-*4qI>(TUo ziH!A4ZpmKA%=wCXxuq-a{wleGlv4j>Q1(1PZxyedcoYdQzG$#09+!uBSOW1R!nzi6Y7iCq-qG;X;6R6vjO<%rR8Crl zO!-P}$d09t8er&vaYVF=Flzq*)#n-EtZ(1E-QRx#WsDOB>-2PHW*Lj`T;TwLI1QvT zae9Od3N=(Xp7E!89V7fJU(rU@VQh9Z)mBUJ%B%_q5nG*fF5`CjV$*X@2h0+-p`r#Q5DZ|Y*rYDb&l1j&?ZxZ2Zuz~0 zfdIkO>2{9t_&8KY0R)OgF!sZliv1p|A{!#S42Z43`qLyr$=DFM$G9Xw=yV$d)`No- z&w{KhjU~jG=*?J-G2ms4zFc2pJk7+Wkq4kg3r>XbAz>C6><4<1<$aV{31%|r_be^V zj(f%!SID&SCSnZ0EAsYOqA?(99T5(F2y5|5rGi)m`jM}#Mvj^v<@-}a4n+oC5>RKF zuDXfPg(lMOz!B1rTC7apMWa>*IWg-o6Dh9iF$m2hK=ZyX^G8>q-t6k!>XvmvGEZt{ z)UE2v%THoudew>1QEtiF-sLc@%B2mn9d)iR)RUi`CSE@J{Z}u*Jb)G$D)~b8#%s5s z5}?d*mq5EhJ;&V5uFAEjdTDL<1D}< zP%ugk1m$Oa3=GW1$bd0FR6a7|Bvub7C9sk#WtgtuAT${SnBEHlM<_JS77I0z&`_rj z=p6PoNVKq+ZZ@&{@sx47E@X)retdMqqt_c{xVQJZs8+#Y3{PQr zDh{)(f&8*)^TQY9lj#fIiA7-+G4xW9Bq|ED?wXV#xhzuQq?b5*Yk0*u6zSO@~KAl6d8T}@! zvf>#!<<;sFp$F1Y7h3hK&t$mOznb z1m}V65@G|48kGy;C%>N{KWrg7Q{fov)pT@{5y*Va1}T-^JrpU~2`+0fv0DR$OC)ch zzyu@}&lKne%O1hQ0|6fsJW~Y>6t984Ih}B1eqxme{C*6SfY|c+z425EI8`=rI172) zPN+STO&qn)#$4V?=^z#hm22Q;MKPjYLRJ`=V#R>JgIv z;^vK8jibgvE_-y;WM#&3oHww&j~W*!Roj2 z2$~L$%C!n3QkNTQ-PVpsE7SzwN_%H zj!n-80uugJGy%adi_iMzF1A!SIJ{U}`{Jw5amoNN4@dfJu6Xt8|6kmhHT!WSRb1

    gw)aaf_DHW-__22k+jXHZ=sX8HI+V&w+V?hBl-|wCdk| z5mA0v9u|sf-0h@AiP-nb{p30JiYB<@2XWYR7%iBPENq$HEYl3s)^!v$(fJwBvO@}D zN|$N~bCHT6Xk&`75m27D*qYL&zz&eC*@BEjw#|9r%Uq9m-v+DFZ+!b5?;m7q49~Q2 zk%qQUI zvsReMD%P1jeW!%IIqd%8d2BWk@n$TFm&q0HLuCwPor(*FYKm8dO z0}N2yB)P&DlnANJPqou8-Aj?u2@)EVyR?EmH8KED0U zg9~~I8>@29xNUm>{vEpcfBx4`*yYNdeYTmhR>7?*_7l*LFn{AV7)$dwJ@ZnYrsLJv z%)WR~fgRbmzPimuj=%Z4f5b?h6yj|_zxeqFylL;!MYb{=qbqv+>=6#lZ6($XuV24) z_O;8bH~jine|q!t>xhs<*3Pq7y{GQu=`$AjSyOq$!ZeE??BBch;ND;T_22ScjQ6k6 zqEsd~KK+bKAVy}sNO@ju^#MD(S(D@j6b;BLM1Es#_K7gct1eR0treB~#e3v1IppW| zPB`qtah75LCFx=3EZ>pDG?6K0wUd@=I59QYM&}12Y|(2QR}CE|qxe?{EgD;fB#TR> zjvyvHKf@M~IeCf+!dez=i>QVk)NrVKQW2*xVgUe*L%dY}0k?bj8p`Y3@Z8hO0*>>g z1MWYZV!!qtFA{moh3siAd)|HfZQ2{_+T505Ho|??-`@LHqspm0TF50HDLr@L{cG2_ zg{mp}sZ($4UuKEo=@Y#wo*OA&-C=!`~~7|{5l zIP<0J*Z-SK5w3i=pYxOV-e=1Ji(t>5(H>YKqzyjj?U1a7b8&I&&ewb*mRIdCQ-zAJyV&o`nkb zPw?z0?@9jZ&TVemkkdc@^&hfC|IN4eKK=9tg9Q`ak3Rg6w~TPtm5tcskyUIq#s0^C z{uhgrY+_)kgBQxZb%`&%o?$~RLm3}F;%&v(Z(M)-%A3qQsW@(KGomut)~dm&J+_0; zkf=|piE*CxAtjKdv&Cgpkzng?B< z^C854*A(T^!~HjS3+Z=!Er(u@2U;{+1H@~<}g|SXW$4Q&P`?)W~GBh8X$00ud z;s%{QPsp&^%nRW8{3-glX5h9UgA)1~y?9Lz-pRTXdxBV4xWId<-`u}_`xcA8+^Kx) z5?|V4ddQOkk6C@9b+fR+>lE0)c^#QT|{@i3oWJ;m-)t#s`@*XJ>5-Vd2Ee)H`emI%0c#LXhM)&1r- zpD>(W+`q^$d-K-kJnzKfIE!FRH7~GouVr_AGn}_5y#L-??9pb=9*btA{{Dv_zWdHK zmO%dgpZ`>O=um_6Pt$Si@ioeW@ z>hJTQE|1bPuwCR!M(pc8^V%Q%;v+`94}SW=r3?G#U)$qG0{fh_7N_|ed(-*Gq{8;k z)_xpq{+g~|TjLa>JI@ktIKnmwnTF8c2CnXO( z_CtQv%6n7XB_AydV<3jYdBY49vgTgwS!6Ni!j+Fc_}MRCzxX}l3|%8RymEDq8d0Bp zAYW(jVeyx{K-3q5F@6IkOJ`hnu=-4qe8uBs``lgZPu|xDAn;(`sdkaRoH2pV0pSod*Hb6C+Tn`jIhSaBjh9scCOu4n*hj}G zhb;F?c=DV6i(8%gSmGJh!P)P8ms_`ZA={4b-u?FK<#%*v>Fnv_CwajQyD0Wqv}e8g z@x#07tM@R8SAv|zJR1Ld@4n5(ICcim1+YTMn%eqvvVh2ynE&H_fJo-s>ZVZ z{rg{Yx0D$jYxH|(U!42Nd3OCUAhI2v*8siF?KR#>|KfF)8ETp zI(3r$MAyFHV(9KSOf(sp&!1;?=RPYvY#`Lf9rS;X52N(?1r;l=;h^dvCOn<(&1;u% zZ>ot_6Yjs0AekH^4yQ3J>7y*_i1sE_S|q*x;`a*wFv7NH?~q8o(j?X_+w{rkDTClF zn91Dnlc)dW&;Q~tfA7y&v}H*Q3g0AVhM>>f=|!hZeAq}2nRyE9&d+heQ^%M@-Mx76 zDjgyP%gz38@ALHaF&Y~a32Kx6`w2es6w^?pJc;O2+z68S?z#p-yg*#%r za34KUMow`v=rkUG@+6a`V=UD3-lF5r^$9HQo?W>3=99+{o_){5=cgY%RX0SgnMv_n z6R$;NXW#+Lkf--}aD;m}#}1zGFe2A)Xym)XEU)0#JTu2ZLB4(U(gU7aWit8v7~fH4 zS%9TBY-ZJ)Rq%&=m5BX-#}1gOGG}06oZ8@p+UVo*i8U3TiDK-vdoZs+j+1UK$6<1w z9HtT=k;&1~-QFOVuWYvsW04d#@pN5IA;GPs`=0sCYg2+5y-;N(4%Z~Nenx}G^m1Yl zV#JtQ;pm&PRAv>&5GYJ&YfLG!cm*N~k($u<0{oTTpyY?ATXYYDZk~aJ>JXd&X+4~& zBCnx<;5 zdh1q3`b)H8i5dj%juPFcYM01je~MvDUfikC{7x_yoxv6+W_kd@=2?Rt6M`9Q85L=& zpyRJh{GekGiy35xJkfR2;By7eFR#wyGZlhjxzL*_a0yxiWk3cg9!d;T>GrXS5f%SY zTW83mzh?s<``&m$iB>LS7%cT-IA*ZCYn$Bhv^(19GZ?)XuP^{+Ou_)|bK@a!dJgtM z@F~7$Pss}u3YqHRxdj&7G|0H+Fl#`H^mFI;E?(MKjku0rSC#39Lv^K}`7u%|9N&Vq zn`Wf2;B^2|s?e{~FP*+8tD*x2 z|BHjCWQ)A=+<~vS6oyRqp+@+OyK2(HVasW8dh$xDnbIj|49@CkBz5wDdFb&ol$;8M ze6c~E2*WyshS_}Rg@(j{t*UYV#lxytrYHx^lwOU3;FD0y@ZLBFsvT8T!vR}A#;|EU zS;cB@Rft8B(&$dzJV}TDHd7lB%p5`PtdZ?8{l>nRG@(&o8Mf8R!x4_KA#p^08JE(O z;me{7PAPWVkP+skM)cM|X|iny!+_)9hJ@wlNifB|uUZuSuB$^XtLB0?xB-Mc7SQ(t z##D>x%{H*qqSa6#s!eFVr(Y%TPwh`OGR8!Zu#tEK4LcE%J4Orq zlmeo>Fo)JgyGI%uZ4KA|x})N4wlY)wIgrW$nbqK8K&jS5io!&~6VT@;^bQ>(yYE28 zMluv1XEok+6|2B!j}Ncv)14doCYDGjPN~uW^ORTpxy@5k?yIm%mMi~0t6y=?LPw$o z!|ZgAHt~)w3FYQoiXH8R4r9$Ho$?L#-v6DHaLk_*y?70 z7!A*0Ms#g8p#^ADHTx-3$Rx-qde_H{ZH$C-q#Pw2hnp3py*Oy7=AhVI1LC4nlaiIeO!&T2^*=26S3YOOLxsxe7JTV_xKu?ej)lL!kC z4PVJ>gk(c27iSmKjJDuJY{65}O~mjAu{cWs6poyg{gkGO zg|^j%20k;t{6se7m@2Zvm|+vss~lqim3R?b06$W7(mOLrfF{>EIH|5Uz8Qb9h3dQ2 zgd&Nx4%jLeX0tAyBxzj*0S=>F#It#4QV1mDlu+%Pkhv@ofV|52^hul;M6!k|YnQ9F zvO=7o4UHHBf_>0U$8@mNa2Qr#*2GUUAze!W!XGy{`6sHdNG9P0YmQt#sqX+yLybBI zuYG7J7A2#c0`g`gxjbY1hE6e7{-LY5cyovkwb|GtMDEk-MWf_R2xL$`rVRQ4?xDco zkWSi7vy$e77G3g@(n=y#fkFj16xupe!tj`_(p8==4T(`OgZNG$3%e8>%#71@rv#hQ zlnxH8%8*X>T)F62bcEA!ztxHx#waBgD zHMA%*vO|d^aYn>{g3%zPLoL5&E|Bmm&>~h!+p(Uei?A5n>R2$9VJ3}daV(DT*q#P% z!$vO3E`>fLmN5f0*%=7RrtNM;fHBUr423PJoZDd{VbWk5R^)6!=i2$ZRv*@;a;MxZ zVUtX3R0>0uRH}fgn)KaQV$?$>LkYe6LeEgpxGPaQbu4|3w(fwl@y#>?QPVqNNY6W zl+`-%KdKxPO;I1RkpFHCwnJ30iN}Yy(|$x3(N?uEO{*CnTXPnVQ5uq`t0d{@01YQf z+L=VFi|VLo5HmhU3`Ho+>-3$13)bK`8`5vBF+>re_y2@ui`vR$v@9TB9+lV;WL4$q zFArt5&8>P0S%Qx2vPShSD|Bv0qa@bo4J0+^6!~Z`_Eu!3yLLNTe&YrMp2`g2K%`&| zAuV`imy!c?eFl07W!QP;o}$yq8O9WX*8V8Lt% zI&DLj%?N)(j-AP^ZBrIHkusP!q0)JTz*>EC45L>`1*vJB=T>$sC@Z~F<`;;?xf>)B z*3im?@*QCo(SrQJ0czL9qTi;nW4YqxP%kwgP5@g4I);AjlO3Z#qu4%e6@!GUdtpqH zn^2E{ETxW$UvWhuD`S!;*RQ#jrz+1_J|=JH#ZYBiR5z(;=^C3=y-dVo24!Jh(reYi z?>y_&rmlWQy@M8Gw3bul5bZy_36;{RvaQE@XP#P|P9HpDVeZJc3NK1Z=@BQ;3uq-I z!iL}`-|v`6MbBL5rRJ#E)1cO@J70bDfX&@h;-RGpVMCH zG{DB56iqWMP%_U18iMs1)%Wa>D6FP!t%)5*XwYjlmNMrx%R?;q`NcJ_9K_`*(6MmX8%(N)yRNa2Xk zDKRw;uTjXTRU!+(L!t}y(lK<~5d`}XWQo+VF4Iby2O`ySHBU+`g)-@_oVR4BA6ea& zhTj=&QRZtq=#}{hIQLw524UeYYvv1#)V0t5A%z{vc68LmtP z)Jhw^?e|UP9SWQC?MQ`OrdK(xMb?xBUV#9o;#eeGjhuUaq|q*^z1f5p9JVJ3OZg*`@=PI%EuEmSmWq^#rlbFKs{+C~fh131&;#48GC{qqcsg+@)s-AhpL5M( zXldYc6~z<=?dQ2@ogO-$RfsP7Vna=fvztKQ0r+0nN zd3$U$U<{Ley^SSW8b+%^Y}vLkQ1TbHB#pH>;m|a@h*a8`iDFB7fsQ(-@ZqTw-#io* zlf!h?a8234X_qT<*tb!IbL`zQY@KpW-d-JQ%q>udBaG@s!O=j0jPd`UaAiEsM|4rJ zp)ZUHTM-Kc$|nDUvvjTb7sxQIDTQ`~K>WBEn?tXRtim4yQf^6zJC89h#niR73U&EF zQ`FfBV5N3;c~ON6tOv@pP7s**Bhoz3_7rOcU>&xZO27X9$m8(R!K`M}T#bk}d1(Qr zyQF3=sQjQuSc2(1$+HSz03X8R5UWiJujkO1@`y6dc8iP9Wi?%4k$tBL+NZT~W!7cdA--2d#6; zIy(meVWxo%sZHthGuqgwL3ZKJGTT^32V=9}1hp=hA?=7ktZ%tR&ARFDXg`3Db+FJy zl2Xky*cd$%Z{rz;oETGQSQn+Wh)!5LLQ9pKY@4+;5_f4Wp6-hc9(pA$G%CrYkzouk z_{XSZrwmP@;^_>P4%G3({m&PmsYq?B7|;*=e?~WoL4)7C}q? z7Gk6JkwFL{Dip3#TAG>rwGQthsZ?8H!Au#HiV45*+ybK6}VV`FG& zwq`Ue<_T{KHCU^#B7iW=;~4Xuu6^zXJTqbhIik3Sj0tGSc@%Ybo%EIg1ma;i$25hV z{|MS52s%bVg}dq`^w?BSULtKm@HDmsip2!p|C%v#wuo;g6=OH!aIRvX1tL2m^~fPf zou%h(ivOrk%ZO`dotdIkU{dBfYBl9Dost}?ysQIr&Z#xdw162Eog4QksPer=Nrkqu zX^u(~fcXnXg=dO7KKv6tu43&ZmKiP8NfRd=vaDZmjUYzWqgOH`h#gc(q6=QlyFPK=1QKMDQVMEDIy&Tz-%)L27HK3WI-|_3Z49oeu=Pq)8?!l$AkHo;lEXQZ zl+-aA;;!?Uw~pF)E2+#b$}Y4YMsNAG@Zpxj2}AKrp&g3F@5)_RPBfHK9n9wMv1G)| z<0(*VK~l;LMeVgi2=g0 zh*EP4wNt&f5}b3Xu5(23;Nqi?!qUZO!&L0*NwU7{n}EYZ95%wrLh0;*m;YukAj<(N zfhw35s00VfhdX&{Lb79(4BI9#;!{2y@0HTAd$xqY9|pxH&ZDBGSQj74rKu|f$2MO51UQ{om#Y~4(X1W7>{ zrAM%Js%)^f2HQ1nYH6_j0-?0Tu!^n&pmlr)x)yPc^N?F*z{VZ@m^AI(K+tPxxYdILC|-PE?QSS3)Fv!d&mmW0Pf_7vx5?KG_--1WIWI zy43i)Q7(m0^`v5Mbq0U_TK0ow?G83&N*!>BNl~{%sXe?1RBxhcrx3=%R*J?Sc4G&PF5McqNO@YyQef07O9;oo0dt? zY~lvJXQ7Gn(`|*hS)x1`ftpe`)M|Om^%B`|o5V@c%1!{KC?=IxBtV+AD;2XU6}Tbn z*JVWBK+S@IV^n`gc+>PERzL_bt7BD?3$14+CUu_t&hjuMfuMpID2;zk3|r$G@wYPD zbj_0%DyHh}Y@tN9m{mizr0fqR#IZ7(ZO%@G$AIf}-enru3R=<02JDH_exAHUaLruo zL9mR8BE-vbv964f$eaf}DfKbQhBlUSIJW3Wl_KoX5xofq1TB^wv^A;5+)P;hlx-v! zc+L=ea_$U`Ety$o!9cAPwIYWwfABdVeG8cyOa|3uRsxkbqWK$m6%1Pnq$Tx;_=lsJ z?aXwRh7it(2e3iG>`?J5U}9tISu5}oBp}{JmP7O$Y~(DqQnyPSI;w3&0~n*D6BK4C z8o?WWr8(eNK?uCz4;2(5x~fJ>v?=Y(5mx!A^8Jbsv!Y!@4p&NoIVY*WLsYagO|qR5 zJ7QJQltF4_IQ-fRwP)+>irvD+J8;4Snm9}>C1 literal 0 HcmV?d00001 diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/search.svg b/bsp/raspberry-pico/libraries/pico-sdk/docs/search.svg new file mode 100644 index 0000000000..0d6facafad --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/search.svg @@ -0,0 +1 @@ +Jemis Mali \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/styles.css b/bsp/raspberry-pico/libraries/pico-sdk/docs/styles.css new file mode 100644 index 0000000000..04c1f02478 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/styles.css @@ -0,0 +1,703 @@ + +.logo { + margin-bottom: 30px; +} +@media (max-width: 1012px) { + .logo { + display: none; + } +} + +.logo--mobile { + display: none; +} +@media (max-width: 1012px) { + .logo--mobile { + display: block; + box-sizing: border-box; + max-width: 35px; + position: absolute; + z-index: 10; + top: 50%; + left: 40px; + transform: translateY(-50%); + } + .logo--mobile img { + width: 100%; + } +} +@media (max-width: 767px) { + .logo--mobile { + left: 20px; + } +} + + + +.navigation-footer { + margin-top: auto; + order: 3; + color: #CA4F62; + display: flex; + align-items: center; +} +@media (max-width: 1012px) { + .navigation-footer { + margin-top: 50px; + } +} +.navigation-footer img { + height: 35px; +} +.navigation-footer a { + font-size: .9em; + margin-left: 10px; +} + + + + + +/* Search Box */ +#MSearchBox { + border-radius: 5px; + margin-top: 0px; + margin-bottom: 15px; + background: none; + background-color: white; + position: relative; + border-radius: 0; + box-shadow: none; + width: 100%; +} +#MSearchBox .right { + display: none; +} +#MSearchBox .left { + width: 100%; + height: auto; + left: 0; +} +#MSearchBox img { + position: absolute; + z-index: 1; + top: 4px; + left: 0px; +} +#MSearchBox input[type=text] { + position: inherit; + padding: 16px 15px 14px 30px; + border: 0; + box-sizing: border-box; + background: none; + background-color: white; + width: 100%; + margin: 0; + box-sizing: border-box; + font-family: 'Roboto', sans-serif; + font-size: 0.9em; +} +#MSearchSelectWindow { + position: fixed; + top: 145px !important; + left: 35px !important; + border: solid 1px #d4d4d4; + border-radius: 0; + box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.25); + background-color: white; +} +#MSearchSelectWindow .SelectItem { + font-family: 'Roboto', sans-serif; + padding: 1px 25px 1px 6px; +} +#MSearchSelectWindow .SelectionMark { + color: black; +} +#MSearchSelectWindow .SelectItem:hover { + background-color: #CA4F62; +} +#MSearchResultsWindow { + position: fixed; + top: 145px !important; + left: 35px !important; + border: solid 1px #d4d4d4; + border-radius: 0; + box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.25); + background-color: white; +} +.SRSymbol { + color: #CA4F62; +} + + + +/* Main Navigation */ +#main-nav ul { + list-style-type: none; + margin: 0; + padding: 0; +} +#main-nav > ul { + display: flex; + flex-direction: column; +} +#main-nav > ul > li > a { + font-weight: normal; + font-size: 18px; +} +#main-nav > ul > li { + position: relative; + padding-bottom: 20px; + flex: 1; + order: 2; +} +#main-nav > ul > li:last-child { + order: 1; + float: none !important; +} +#main-nav ul li a { + display: block; +} + +#main-nav ul li.hasChildren > a:hover[aria-expanded="false"] { + text-decoration: none; +} + +#main-nav ul li a:hover { + text-decoration: underline; + color: #CA4F62; +} + +#main-nav ul ul li { + position: relative; + padding-bottom: 10px; +} + +#main-nav ul li.hasChildren > a[aria-expanded="false"]:after { + position: absolute; + content: "+"; + /*top: -1px;*/ + right: -2px; + line-height: 20px; + font-size: 20px; +} + +#main-nav li ul { + padding-left: 5px; + display: none; + padding-top: 15px; + /*padding-bottom: 15px;*/ +} + +@media (max-width: 1012px) { + #main-nav > ul > li.hasChildren:after { + top: 9px; + } + #main-nav > ul > li { + padding-bottom: 0px; + } + #main-nav > ul > li:first-child { + border-top: 1px solid rgba(0,0,0,0.2); + } + #main-nav > ul > li { + padding: 10px 0; + border-bottom: 1px solid rgba(0,0,0,0.2); + } + #main-nav > ul > li:last-child { + padding: 10px 0; + } + #main-nav > ul > li ul { + padding-bottom: 10px; + } +} + + +/* Page Header */ +div.header { + background: none; + padding: 0px; + margin-bottom: 20px; + border-bottom: none; +} +div.header .headertitle { + padding: 0; +} +div.header .title { + margin: 0; +} +div.header .summary { + font-size: 13px; + padding: 9px 0 0 0; + width: auto; +} +@media (max-width: 767px) { + div.header .summary { + text-align: left; + margin-bottom: 20px; + } +} +div.header .summary a:hover { + color: #CA4F62; +} +div.header .ingroups { + font-size: 13px; + width: auto; + font-weight: normal; +} + + +/* Floating labels */ +span.mlabels { + margin: 0; + margin-left: 10px; +} +span.mlabel { + margin: 0; + margin-left: 10px; + border: solid 1px #CA4F62; + background-color: #CA4F62; + padding: 3px 5px; + font-weight: normal; +} + + +/* Content area */ +div.contents { + padding: 0; + margin: 0px; + margin-bottom: 20px; +} +div.contents ul li { + margin-bottom: 10px; +} +div.contents ul li:last-child { + margin-bottom: 0px; +} + +div.toc { + padding: 0; + padding-bottom: 20px; + background-color: transparent; + border: none; + box-sizing: border-box; + float: none; + width: 100%; + margin: 0; + border-radius: 0; +} + +@media (max-width: 767px) { + div.toc { + // + } +} +div.toc h3 { + margin: 0; + margin-bottom: 5px; + color: black; + font: 400 14px/22px Roboto,sans-serif; + font-weight: bold; +} +div.toc ul { + margin: 0; +} +div.toc ul li { + margin-left: 0 !important; + padding-left: 15px !important; + font: 400 14px/22px Roboto,sans-serif; +} +div.toc li ul { + padding-left: 10px; + padding-top: 7px; +} + +/* Group Headers */ +h2.groupheader { + border-bottom: solid 1px #d4d4d4; + color: black; + margin: 0px; + margin-top: 30px; + padding: 10px 0; +} +tr.heading h2 { + margin: 0px; +} + + +/* Tables */ +table.memberdecls { + margin-top: 30px; + /*margin-bottom: 30px;*/ +} +table.memberdecls td.memSeparator { + line-height: 0; + font-size: 0; + border-bottom: 1px solid #d4d4d4; +} +table.memberdecls td.memItemLeft { + padding: 7px 15px 4px 15px; + background-color: #f5f5f5; +} +table.memberdecls td.memItemRight { + padding: 7px 15px 4px 15px; + background-color: #f5f5f5; +} +table.memberdecls td.mdescLeft { + padding: 7px 15px 4px 15px; + background-color: #f5f5f5; +} +table.memberdecls td.mdescRight { + padding: 7px 15px 4px 15px; + background-color: #f5f5f5; +} + +table.params .paramname { + color: black; +} + + +table.markdownTable td, table.markdownTable th { + border: 1px solid #d4d4d4; + padding: 3px 7px; + color: black; +} + +table.markdownTable th.markdownTableHeadLeft, table.markdownTable th.markdownTableHeadRight, table.markdownTable th.markdownTableHeadCenter, table.markdownTable th.markdownTableHeadNone { + background-color: #f5f5f5; + color: black; + padding: 3px 7px; +} + +div.contents .fragment { + border: solid 1px #CA4F62; + padding: 20px; + border-radius: 4px; +} + +div.contents .line { + line-height: 15px; +} + + +.memtitle { + margin-top: 10px; + border-top: solid 1px #d4d4d4; + border-left: solid 1px #d4d4d4; + border-right: solid 1px #d4d4d4; + background: none; + background-color: #f5f5f5; + padding: 8px 10px; + font-weight: bold; + font-size: 18px; +} +.memtitle .permalink a, .memtitle .permalink a:visited { + color: black; +} +.memtitle .permalink a:hover { + text-decoration: none; +} +.memitem { + margin: 0; + box-shadow: none; +} +.memitem.glow { + box-shadow: 0 0 15px #CA4F62; +} +.memitem .memproto { + box-shadow: none; + background: none; + background-color: #f5f5f5; + border-top: solid 1px #d4d4d4; + border-left: solid 1px #d4d4d4; + border-right: solid 1px #d4d4d4; + color: black; + padding: 8px 10px; +} +.memitem .memproto .memname { + margin-left: 0; +} +.memitem .memdoc { + box-shadow: none; + background: none; + border-bottom: solid 1px #d4d4d4; + border-left: solid 1px #d4d4d4; + border-right: solid 1px #d4d4d4; + padding: 10px 12px; + +} + + +/* General links? */ +a.el { + font-weight: normal; +} +a.el { + color: #CA4F62; +} +a.el:visited { + color: #CA4F62; +} +a.el:hover { + color: #CA4F62; +} +div.contents a { + color: #CA4F62; +} +div.contents a:visited { + color: #CA4F62; +} +div.contents a:hover { + color: #CA4F62; +} + + +/* Highlighted effect */ +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px #CA4F62; +} + + +/* Directory */ +div.directory { + margin: 20px 0px; + border-top: 1px solid #d4d4d4; + border-bottom: 1px solid #d4d4d4; +} +div.directory .levels { + font-size: 13px; + padding: 8px 0; +} +div.directory .levels span:hover { + color: #CA4F62; +} +table.directory { + /*width: 100%;*/ +} +table.directory tr.even { + background-color: #f5f5f5; +} +table.directory td.entry { + padding: 8px 6px; + vertical-align: middle; + box-sizing: border-box; +} +table.directory td.desc { + padding: 8px 6px; + vertical-align: middle; + box-sizing: border-box; +} + + +/* Icons */ +.iconfopen, .icondoc { + margin: 0; +} + + + +dl.reflist dt { + box-shadow: none; + background-color: #F5F5F5; + border-top: solid 1px #d4d4d4; + border-left: solid 1px #d4d4d4; + border-right: solid 1px #d4d4d4; + padding: 10px; +} +dl.reflist dd { + box-shadow: none; + background: none; + border-bottom: solid 1px #d4d4d4; + border-left: solid 1px #d4d4d4; + border-right: solid 1px #d4d4d4; + padding: 10px; +} + + +/* Standard arrow icon? */ +.arrow { + color: #d4d4d4; + width: auto; + height: auto; + margin: 0 5px; +} + +.icona { + height: auto; + width: auto; + margin-right: 8px; +} +.icona .icon { + font-family: 'Roboto', sans-serif; + margin: 0; + background-color: #CA4F62; + padding: 1px; + font-weight: normal; +} + +/* horizontal ruler */ +hr { + border: none; + border-top: 1px solid #d4d4d4; + margin-top: 20px; + margin-bottom: 20px; +} + + +/* Notes */ +dl.warning { + margin: 0px; + padding: 0px; + padding-left: 10px; +} +dl.note { + margin: 0px; + padding: 0px; + padding-left: 10px; +} +dl.attention { + margin: 0px; + padding: 0px; + padding-left: 10px; +} +dl.todo { + margin: 0px; + padding: 0px; + padding-left: 10px; +} +dl dt, dl dt a.el { + font-weight: bold; +} +dl dd { + margin: 0px; +} + + +table.fieldtable { + box-shadow: none; + border: 1px solid #d4d4d4; +} +table.fieldtable th { + background: none; + background-color: #F5F5F5; + border-bottom: 1px solid #d4d4d4; + color: black; + font-size: 100%; + font-weight: bold; +} +table.fieldtable td.fieldname, table.fieldtable td.fielddoc { + border-bottom: 1px solid #d4d4d4; + border-right: 1px solid #d4d4d4; + vertical-align: middle; +} + + +div.qindex { + background-color: #F5F5F5; + border: none; + text-align: center; + padding: 8px 0; +} +table.classindex div.ah { + font-family: 'Roboto', sans-serif; + margin: 0; + background: none; + background-color: #CA4F62; + padding: 1px; + font-weight: normal; + border: none; + box-shadow: none; + border-radius: 0; + padding: 3px; +} +table.classindex td { + padding: 3px 6px; + vertical-align: middle; + font-size: 14px; +} +table.classindex table td { + padding: 0; + vertical-align: middle; +} + + +div.textblock h2 { + border-bottom: solid 1px #d4d4d4; + padding-bottom: 10px; +} + + + + + +.navigation-mobile { + display: none; + background-color: #F5F5F5; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 70px; +} +@media (max-width: 1012px) { + .navigation-mobile { + display: block; + } +} + + +.navigation-toggle { + cursor: pointer; + width: 44px; + height: 44px; + margin-right: 20px; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + bottom: 5%; + z-index: 50; + display: none; +} +@media (max-width: 1012px) { + .navigation-toggle { + display: block; + } +} +@media (max-width: 767px) { + .navigation-toggle { + margin-right: 0px; + } +} +.navigation-toggle span { + display: block; + text-indent: -9999px; + position: absolute; + height: 2px; + left: 10px; + right: 10px; + background-color: #CA4F62; + border-radius: 1px; + transition: 0.15s all; +} +.line-1 { + top: 14px; +} +.line-2 { + top: 50%; + margin-top: -1px; +} +.line-3 { + bottom: 14px; +} +.navigation-toggle.clicked .line-1 { + transform: rotate(45deg); + top: 21px; +} +.navigation-toggle.clicked .line-2 { + opacity: 0; +} +.navigation-toggle.clicked .line-3 { + transform: rotate(-45deg); + bottom: 21px; +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/docs/weblinks_page.md b/bsp/raspberry-pico/libraries/pico-sdk/docs/weblinks_page.md new file mode 100644 index 0000000000..923f970307 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/docs/weblinks_page.md @@ -0,0 +1,30 @@ +## Documentation and datasheets {#weblinks_page} + +The full documentation for the RP2040 and Raspberry Pi Pico board can be found at the following links + + - [RP2040 Datasheet](https://rptl.io/rp2040-datasheet) + - [Raspberry Pi Pico datasheet](https://rptl.io/pico-datasheet) + - [Hardware Design with the RP2040](https://rptl.io/rp2040-design) + - [Pico C/C++ SDK](https://rptl.io/pico-c-sdk) + - [Pico Python SDK](https://rptl.io/pico-micropython) + - [Getting Started with Raspberry Pi Pico](https://rptl.io/pico-get-started) + +### Weblinks + +At Raspberry Pi we have a very community based attitude to help. We run a very popular and busy forum where you can ask questions about any aspect of the Raspberry Pi ecosystem, including the Raspberry Pi Pico. + +You can find our forums at the [following link](https://www.raspberrypi.org/forums). + +For the main Raspberry Pi website, [see here](https://www.raspberrypi.org) + +For the Raspberry Pi Pico page, [see here](https://rptl.io/rp2040-get-started) + +### Github + +All the source code for the Pico SDK, examples and other libraries can be found on Github. + + - [Pico C/C++ SDK](https://github.com/raspberrypi/pico-sdk) + - [Pico Examples](https://github.com/raspberrypi/pico-examples) + - [Pico Extras - Libraries under development](https://github.com/raspberrypi/pico-extras) + - [Pico Playground - Examples that use Pico Extras](https://github.com/raspberrypi/pico-playground) + - [Pico Bootrom source code](https://github.com/raspberrypi/pico-bootrom) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/external/pico_sdk_import.cmake b/bsp/raspberry-pico/libraries/pico-sdk/external/pico_sdk_import.cmake new file mode 100644 index 0000000000..e02a33e545 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/external/pico_sdk_import.cmake @@ -0,0 +1,62 @@ +# This is a copy of /external/pico_sdk_import.cmake + +# This can be dropped into an external project to help locate this SDK +# It should be include()ed prior to project() + +if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH)) + set(PICO_SDK_PATH $ENV{PICO_SDK_PATH}) + message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')") +endif () + +if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT} AND (NOT PICO_SDK_FETCH_FROM_GIT)) + set(PICO_SDK_FETCH_FROM_GIT $ENV{PICO_SDK_FETCH_FROM_GIT}) + message("Using PICO_SDK_FETCH_FROM_GIT from environment ('${PICO_SDK_FETCH_FROM_GIT}')") +endif () + +if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_PATH)) + set(PICO_SDK_FETCH_FROM_GIT_PATH $ENV{PICO_SDK_FETCH_FROM_GIT_PATH}) + message("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH}')") +endif () + +set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the PICO SDK") +set(PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT}" CACHE BOOL "Set to ON to fetch copy of PICO SDK from git if not otherwise locatable") +set(PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH}" CACHE FILEPATH "location to download SDK") + +if (NOT PICO_SDK_PATH) + if (PICO_SDK_FETCH_FROM_GIT) + include(FetchContent) + set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) + if (PICO_SDK_FETCH_FROM_GIT_PATH) + get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") + endif () + FetchContent_Declare( + pico_sdk + GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk + GIT_TAG master + ) + if (NOT pico_sdk) + message("Downloading PICO SDK") + FetchContent_Populate(pico_sdk) + set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) + endif () + set(FETCHCONTENT_BASE_DIR ${FETCHCONTENT_BASE_DIR_SAVE}) + else () + message(FATAL_ERROR + "PICO SDK location was not specified. Please set PICO_SDK_PATH or set PICO_SDK_FETCH_FROM_GIT to on to fetch from git." + ) + endif () +endif () + +get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") +if (NOT EXISTS ${PICO_SDK_PATH}) + message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found") +endif () + +set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake) +if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE}) + message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the PICO SDK") +endif () + +set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the PICO SDK" FORCE) + +include(${PICO_SDK_INIT_CMAKE_FILE}) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_init.cmake b/bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_init.cmake new file mode 100644 index 0000000000..63621d40bb --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_init.cmake @@ -0,0 +1,54 @@ +# Initialize the PICO SDK +# This file must be included prior to the project() call + +if (_PICO_SDK_INIT) + return() +endif () +set(_PICO_SDK_INIT 1) + +function(pico_is_top_level_project VAR) + string(TOLOWER ${CMAKE_CURRENT_LIST_DIR} __list_dir) + string(TOLOWER ${CMAKE_SOURCE_DIR} __source_dir) + if (__source_dir STREQUAL __list_dir) + set(${VAR} 1 PARENT_SCOPE) + else() + set(${VAR} 0 PARENT_SCOPE) + endif() +endfunction() + +if (NOT PICO_SDK_PATH) + set(PICO_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}) +endif () + +get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}") + +set(PICO_SDK_PATH ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Path to the Pico SDK" FORCE) + +list(APPEND CMAKE_MODULE_PATH ${PICO_SDK_PATH}/cmake) + +include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_version.cmake) +include(pico_utils) + +message("Pico SDK is located at ${CMAKE_CURRENT_LIST_DIR}") + +include(pico_pre_load_platform) + +# todo perhaps this should be included by the platform instead? +# We want to configure correct toolchain prior to project load +include(pico_pre_load_toolchain) + +macro(pico_sdk_init) + if (NOT CMAKE_PROJECT_NAME) + message(WARNING "pico_sdk_init() should be called after the project is created (and languages added)") + endif() + add_subdirectory(${PICO_SDK_PATH} pico_sdk) +endmacro() + +macro(add_sub_list_dirs var) + foreach(LIST_DIR IN LISTS ${var}) + get_filename_component(SHORT_NAME "${LIST_DIR}" NAME) + message("Including custom CMakeLists.txt ${SHORT_NAME}") + add_subdirectory(${LIST_DIR} ${SHORT_NAME}) + endforeach() +endmacro() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_version.cmake b/bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_version.cmake new file mode 100644 index 0000000000..e170c1afb4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/pico_sdk_version.cmake @@ -0,0 +1,12 @@ +# PICO_BUILD_DEFINE: PICO_SDK_VERSION_MAJOR, SDK major version number, type=int, pico_base +# PICO_CONFIG: PICO_SDK_VERSION_MAJOR, SDK major version number, type=int, pico_base +set(PICO_SDK_VERSION_MAJOR 1) +# PICO_BUILD_DEFINE: PICO_SDK_VERSION_MINOR, SDK minor version number, type=int, pico_base +# PICO_CONFIG: PICO_SDK_VERSION_MINOR, SDK minor version number, type=int, pico_base +set(PICO_SDK_VERSION_MINOR 0) +# PICO_BUILD_DEFINE: PICO_SDK_VERSION_REVISION, SDK version revision, type=int, pico_base +# PICO_CONFIG: PICO_SDK_VERSION_REVISION, SDK version revision, type=int, pico_base +set(PICO_SDK_VERSION_REVISION 0) +# PICO_BUILD_DEFINE: PICO_SDK_VERSION_STRING, SDK version, type=string, group=pico_base +# PICO_CONFIG: PICO_SDK_VERSION_STRING, SDK version, type=string, group=pico_base +set(PICO_SDK_VERSION_STRING "${PICO_SDK_VERSION_MAJOR}.${PICO_SDK_VERSION_MINOR}.${PICO_SDK_VERSION_REVISION}") diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/CMakeLists.txt new file mode 100644 index 0000000000..5d7a4c7783 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_policy(SET CMP0079 NEW) # allow inserting of dependencies into our INTERFACE libraries +set(PICO_PLATFORM_CMAKE_FILE "" CACHE INTERNAL "") +set(PICO_DOXYGEN_PATHS "" CACHE INTERNAL "") # generated each time + +if (NOT PICO_PLATFORM_CMAKE_FILE) + set(PICO_PLATFORM_CMAKE_FILE ${CMAKE_CURRENT_LIST_DIR}/${PICO_PLATFORM}.cmake CACHE INTERNAL "") +endif () + +if (NOT EXISTS "${PICO_PLATFORM_CMAKE_FILE}") + message(FATAL_ERROR "${PICO_PLATFORM_CMAKE_FILE} does not exist. \ + Either specify a valid PICO_PLATFORM (or PICO_PLATFORM_CMAKE_FILE).") +endif () + +include(${CMAKE_CURRENT_LIST_DIR}/board_setup.cmake) + +# todo add option to disable skip flag +function(pico_add_subdirectory subdir) + string(TOUPPER ${subdir} subdir_upper) + set(replace_flag SKIP_${subdir_upper}) + if (NOT ${replace_flag}) + add_subdirectory(${subdir}) + else () + message("Not including ${subdir} because ${replace_flag} defined.") + endif () +endfunction() + +function(pico_wrap_function TARGET FUNCNAME) + target_link_options(${TARGET} INTERFACE "LINKER:--wrap=${FUNCNAME}") +endfunction() + +function(pico_add_map_output TARGET) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + target_link_options(${TARGET} PRIVATE "LINKER:-Map=$${CMAKE_EXECUTABLE_SUFFIX}.map") + else () + target_link_options(${TARGET} INTERFACE "LINKER:-Map=$${CMAKE_EXECUTABLE_SUFFIX}.map") + endif () +endfunction() + +macro(pico_simple_hardware_target NAME) + pico_simple_hardware_headers_target(${NAME}) + pico_simple_hardware_impl_target(${NAME}) +endmacro() + +macro(pico_simple_hardware_headers_target NAME) + if (NOT TARGET hardware_${NAME}_headers) + add_library(hardware_${NAME}_headers INTERFACE) + + target_include_directories(hardware_${NAME}_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + target_link_libraries(hardware_${NAME}_headers INTERFACE pico_base_headers) + if (NOT PICO_NO_HARDWARE) + target_link_libraries(hardware_${NAME}_headers INTERFACE hardware_structs hardware_claim) + endif() + endif() +endmacro() + +macro(pico_simple_hardware_headers_only_target NAME) + if (NOT TARGET hardware_${NAME}) + add_library(hardware_${NAME} INTERFACE) + + target_include_directories(hardware_${NAME} INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + target_link_libraries(hardware_${NAME} INTERFACE pico_base_headers) + if (NOT PICO_NO_HARDWARE) + target_link_libraries(hardware_${NAME} INTERFACE hardware_structs) + endif() + endif() +endmacro() + +macro(pico_simple_hardware_impl_target NAME) + if (NOT TARGET hardware_${NAME}) + add_library(hardware_${NAME} INTERFACE) + + target_sources(hardware_${NAME} INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/${NAME}.c + ) + + target_link_libraries(hardware_${NAME} INTERFACE hardware_${NAME}_headers pico_platform) + endif() +endmacro() + +function(pico_add_doxygen SOURCE_DIR) + set(PICO_DOXYGEN_PATHS "${PICO_DOXYGEN_PATHS} ${SOURCE_DIR}" CACHE INTERNAL "") +endfunction() + +function(pico_add_doxygen_exclude SOURCE_DIR) + set(PICO_DOXYGEN_EXCLUDE_PATHS "${PICO_DOXYGEN_EXCLUDE_PATHS} ${SOURCE_DIR}" CACHE INTERNAL "") +endfunction() + +include(${PICO_PLATFORM_CMAKE_FILE}) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/board_setup.cmake b/bsp/raspberry-pico/libraries/pico-sdk/src/board_setup.cmake new file mode 100644 index 0000000000..dfd8db8225 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/board_setup.cmake @@ -0,0 +1,31 @@ +# PICO_CMAKE_CONFIG: PICO_BOARD, The board name being built for. This is overridable from the user environment, type=string, default=rp2040, group=build +if (DEFINED ENV{PICO_BOARD}) + set(PICO_BOARD $ENV{PICO_BOARD}) + message("Using PICO_BOARD from environment ('${PICO_BOARD}')") +else() + if (NOT PICO_BOARD) + set(PICO_BOARD "pico") + pico_message("Defaulting PICO target board to ${PICO_BOARD} since not specified.") + else() + message("PICO target board is ${PICO_BOARD}.") + endif() +endif() +set(PICO_BOARD ${PICO_BOARD} CACHE STRING "PICO target board (e.g. pico)") + +# PICO_CMAKE_CONFIG: PICO_BOARD_CMAKE_DIRS, Directors to look for .cmake in. This is overridable from the user environment, type=list, default="", group=build +if (DEFINED ENV{PICO_BOARD_CMAKE_DIRS}) + set(PICO_BOARD_CMAKE_DIRS $ENV{PICO_BOARD_CMAKE_DIRS}) + message("Using PICO_BOARD_CMAKE_DIRS from environment ('${PICO_BOARD_CMAKE_DIRS}')") +endif() + +list(APPEND PICO_BOARD_CMAKE_DIRS ${CMAKE_CURRENT_LIST_DIR}/boards) + +pico_find_in_paths(PICO_BOARD_CMAKE_FILE PICO_BOARD_CMAKE_DIRS ${PICO_BOARD}.cmake) +if (EXISTS "${PICO_BOARD_CMAKE_FILE}") + message("Using CMake board configuration from ${PICO_BOARD_CMAKE_FILE}") + include(${PICO_BOARD_CMAKE_FILE} board_config) +else() + include(boards/generic_board.cmake) +endif() + +list(APPEND PICO_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/boards/include) # so boards/foo.h can be explicitly included \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/boards/generic_board.cmake b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/generic_board.cmake new file mode 100644 index 0000000000..9682473fb5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/generic_board.cmake @@ -0,0 +1,23 @@ +# For boards without their own cmake file, simply include a header + +# PICO_CMAKE_CONFIG: PICO_BOARD_HEADER_DIRS, Directors to look for .h in. This is overridable from the user environment, type=list, default="", group=build +if (DEFINED ENV{PICO_BOARD_HEADER_DIRS}) + set(PICO_BOARD_HEADER_DIRS $ENV{PICO_BOARD_HEADER_DIRS}) + message("Using PICO_BOARD_HEADER_DIRS from environment ('${PICO_BOARD_HEADER_DIRS}')") +endif() +set(PICO_BOARD_HEADER_DIRS ${PICO_BOARD_HEADER_DIRS} CACHE STRING "PICO board header directories") + +list(APPEND PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR}/include/boards) +pico_find_in_paths(PICO_BOARD_HEADER_FILE PICO_BOARD_HEADER_DIRS ${PICO_BOARD}.h) + +if (EXISTS ${PICO_BOARD_HEADER_FILE}) + message("Using board configuration from ${PICO_BOARD_HEADER_FILE}") + list(APPEND PICO_CONFIG_HEADER_FILES ${PICO_BOARD_HEADER_FILE}) +else() + set(msg "Unable to find definition of board '${PICO_BOARD}' (specified by PICO_BOARD):\n") + list(JOIN PICO_BOARD_HEADER_DIRS ", " DIRS) + string(CONCAT msg ${msg} " Looked for ${PICO_BOARD}.h in ${DIRS} (additional paths specified by PICO_BOARD_HEADER_DIRS)\n") + list(JOIN PICO_BOARD_CMAKE_DIRS ", " DIRS) + string(CONCAT msg ${msg} " Looked for ${PICO_BOARD}.cmake in ${DIRS} (additional paths specified by PICO_BOARD_CMAKE_DIRS)") + message(FATAL_ERROR ${msg}) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/none.h b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/none.h new file mode 100644 index 0000000000..236c395eb3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/none.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// ----------------------------------------------------- + +#ifndef _BOARDS_NONE_H +#define _BOARDS_NONE_H + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/pico.h b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/pico.h new file mode 100644 index 0000000000..c1ab7819a2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/pico.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// ----------------------------------------------------- + +// This header may be included by other board headers as "boards/pico.h" + +#ifndef _BOARDS_PICO_H +#define _BOARDS_PICO_H + +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 0 +#endif + +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 0 +#endif + +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 1 +#endif + +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN 25 +#endif + +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 2 +#endif + +#ifndef PICO_FLASH_SIZE_BYTES +#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) +#endif + +// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) +#define PICO_SMPS_MODE_PIN 23 + +#ifndef PICO_FLOAT_SUPPORT_ROM_V1 +#define PICO_FLOAT_SUPPORT_ROM_V1 1 +#endif + +#ifndef PICO_DOUBLE_SUPPORT_ROM_V1 +#define PICO_DOUBLE_SUPPORT_ROM_V1 1 +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/vgaboard.h b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/vgaboard.h new file mode 100644 index 0000000000..e2c3674c26 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/boards/include/boards/vgaboard.h @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// ----------------------------------------------------- + +#ifndef _BOARDS_VGABOARD_H +#define _BOARDS_VGABOARD_H + +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 1 +#endif + +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 20 +#endif + +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 21 +#endif + +#ifndef PICO_DEFAULT_LED_PIN +#define PICO_DEFAULT_LED_PIN 25 // same as Pico +#endif + +// Audio pins. I2S BCK, LRCK are on the same pins as PWM L/R. +// - When outputting I2S, PWM sees BCK and LRCK, which should sound silent as +// they are constant duty cycle, and above the filter cutoff +// - When outputting PWM, I2S DIN should be low, so I2S should remain silent. +#define VGABOARD_I2S_DIN_PIN 26 +#define VGABOARD_I2S_BCK_PIN 27 +#define VGABOARD_I2S_LRCK_PIN 28 + +#define VGABOARD_PWM_L_PIN 28 +#define VGABOARD_PWM_R_PIN 27 + +#define VGABOARD_VGA_COLOR_PIN_BASE 0 +#define VGABOARD_VGA_SYNC_PIN_BASE 16 + +// Note DAT2/3 are shared with UART TX/RX (pull jumpers off header to access +// UART pins and disconnect SD DAT2/3) +#define VGABOARD_SD_CLK_PIN 5 +#define VGABOARD_SD_CMD_PIN 18 +#define VGABOARD_SD_DAT0_PIN 19 + +// Note buttons are shared with VGA colour LSBs -- if using VGA, you can float +// the pin on VSYNC assertion and sample on VSYNC deassertion +#define VGABOARD_BUTTON_A_PIN 0 +#define VGABOARD_BUTTON_B_PIN 6 +#define VGABOARD_BUTTON_C_PIN 11 + +#ifndef PICO_SCANVIDEO_COLOR_PIN_BASE +#define PICO_SCANVIDEO_COLOR_PIN_BASE VGABOARD_VGA_COLOR_PIN_BASE +#endif + +#ifndef PICO_SCANVIDEO_SYMC_PIN_BASE +#define PICO_SCANVIDEO_SYNC_PIN_BASE VGABOARD_VGA_SYNC_PIN_BASE +#endif + +#ifndef PICO_SD_CLK_PIN +#define PICO_SD_CLK_PIN VGABOARD_SD_CLK_PIN +#endif + +#ifndef PICO_SD_CMD_PIN +#define PICO_SD_CMD_PIN VGABOARD_SD_CMD_PIN +#endif + +#ifndef PICO_SD_DAT0_PIN +#define PICO_SD_DAT0_PIN VGABOARD_SD_DAT0_PIN +#endif + +#define PICO_AUDIO_I2S_DATA_PIN VGABOARD_I2S_DIN_PIN +#define PICO_AUDIO_I2S_CLOCK_PIN_BASE VGABOARD_I2S_BCK_PIN + +#define PICO_AUDIO_PWM_L_PIN VGABOARD_PWM_L_PIN +#define PICO_AUDIO_PWM_R_PIN VGABOARD_PWM_R_PIN + +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 2 +#endif + +#ifndef PICO_FLASH_SIZE_BYTES +#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) +#endif + +// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) +#define PICO_SMPS_MODE_PIN 23 + +#ifndef PICO_FLOAT_SUPPORT_ROM_V1 +#define PICO_FLOAT_SUPPORT_ROM_V1 1 +#endif + +#ifndef PICO_DOUBLE_SUPPORT_ROM_V1 +#define PICO_DOUBLE_SUPPORT_ROM_V1 1 +#endif + +#define PICO_VGA_BOARD + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/CMakeLists.txt new file mode 100644 index 0000000000..9b256a080c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/CMakeLists.txt @@ -0,0 +1,16 @@ +pico_add_subdirectory(boot_picoboot) +pico_add_subdirectory(boot_uf2) +pico_add_subdirectory(pico_base) + +# PICO_CMAKE_CONFIG: PICO_BARE_METAL, Flag to exclude anything except base headers from the build, type=bool, default=0, group=build +if (NOT PICO_BARE_METAL) + pico_add_subdirectory(pico_bit_ops) + pico_add_subdirectory(pico_binary_info) + pico_add_subdirectory(pico_divider) + pico_add_subdirectory(pico_sync) + pico_add_subdirectory(pico_time) + pico_add_subdirectory(pico_util) + pico_add_subdirectory(pico_stdlib) +endif() + +pico_add_doxygen(${CMAKE_CURRENT_LIST_DIR}) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/README.md b/bsp/raspberry-pico/libraries/pico-sdk/src/common/README.md new file mode 100644 index 0000000000..0f30a4211e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/README.md @@ -0,0 +1,3 @@ +This directory code that is common to all builds regardless of `PICO_PLATFORM`. It is a mix +of common header files, or high level functionality built entirely using `hardware_` or `pico_` libraries provided +by the actual target `PICO_PLATFORM`` \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/CMakeLists.txt new file mode 100644 index 0000000000..463fde42d0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(boot_picoboot_headers INTERFACE) +target_include_directories(boot_picoboot_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/include/boot/picoboot.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/include/boot/picoboot.h new file mode 100644 index 0000000000..ddfa0aaad4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_picoboot/include/boot/picoboot.h @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _BOOT_PICOBOOT_H +#define _BOOT_PICOBOOT_H + +#include +#include +#include + +#ifndef NO_PICO_PLATFORM +#include "pico/platform.h" +#endif + +/** \file picoboot.h +* \defgroup boot_picoboot boot_picoboot +* +* Header file for the PICOBOOT USB interface exposed by an RP2040 in BOOTSEL mode. +*/ + +#define PICOBOOT_MAGIC 0x431fd10bu + +// -------------------------------------------- +// CONTROL REQUESTS FOR THE PICOBOOT INTERFACE +// -------------------------------------------- + +// size 0 OUT - unstall EPs and reset +#define PICOBOOT_IF_RESET 0x41 + +// size 16 IN - return the status of the last command +#define PICOBOOT_IF_CMD_STATUS 0x42 + +// -------------------------------------------------- +// COMMAND REQUESTS SENT TO THE PICOBOOT OUT ENDPOINT +// -------------------------------------------------- +// +// picoboot_cmd structure of size 32 is sent to OUT endpoint +// transfer_length bytes are transferred via IN/OUT +// device responds on success with 0 length ACK packet set via OUT/IN +// device may stall the transferring endpoint in case of error + +enum picoboot_cmd_id { + PC_EXCLUSIVE_ACCESS = 0x1, + PC_REBOOT = 0x2, + PC_FLASH_ERASE = 0x3, + PC_READ = 0x84, // either RAM or FLASH + PC_WRITE = 5, // either RAM or FLASH (does no erase) + PC_EXIT_XIP = 0x6, + PC_ENTER_CMD_XIP = 0x7, + PC_EXEC = 0x8, + PC_VECTORIZE_FLASH = 0x9 +}; + +enum picoboot_status { + PICOBOOT_OK = 0, + PICOBOOT_UNKNOWN_CMD = 1, + PICOBOOT_INVALID_CMD_LENGTH = 2, + PICOBOOT_INVALID_TRANSFER_LENGTH = 3, + PICOBOOT_INVALID_ADDRESS = 4, + PICOBOOT_BAD_ALIGNMENT = 5, + PICOBOOT_INTERLEAVED_WRITE = 6, + PICOBOOT_REBOOTING = 7, + PICOBOOT_UNKNOWN_ERROR = 8, +}; + +struct __packed picoboot_reboot_cmd { + uint32_t dPC; // 0 means reset into bootrom + uint32_t dSP; + uint32_t dDelayMS; +}; + +// used for EXEC, VECTORIZE_FLASH +struct __packed picoboot_address_only_cmd { + uint32_t dAddr; +}; + +// used for READ, WRITE, FLASH_ERASE +struct __packed picoboot_range_cmd { + uint32_t dAddr; + uint32_t dSize; +}; + +enum picoboot_exclusive_type { + NOT_EXCLUSIVE = 0, + EXCLUSIVE, + EXCLUSIVE_AND_EJECT +}; + +struct __packed picoboot_exclusive_cmd { + uint8_t bExclusive; +}; + +// little endian +struct __packed __aligned(4) picoboot_cmd { + uint32_t dMagic; + uint32_t dToken; // an identifier for this token to correlate with a status response + uint8_t bCmdId; // top bit set for IN + uint8_t bCmdSize; // bytes of actual data in the arg part of this structure + uint16_t _unused; + uint32_t dTransferLength; // length of IN/OUT transfer (or 0) if none + union { + uint8_t args[16]; + struct picoboot_reboot_cmd reboot_cmd; + struct picoboot_range_cmd range_cmd; + struct picoboot_address_only_cmd address_only_cmd; + struct picoboot_exclusive_cmd exclusive_cmd; + }; +}; + +static_assert(32 == sizeof(struct picoboot_cmd), "picoboot_cmd must be 32 bytes big"); + +struct __packed __aligned(4) picoboot_cmd_status { + uint32_t dToken; + uint32_t dStatusCode; + uint8_t bCmdId; + uint8_t bInProgress; + uint8_t _pad[6]; +}; + +static_assert(16 == sizeof(struct picoboot_cmd_status), "picoboot_cmd_status must be 16 bytes big"); +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/CMakeLists.txt new file mode 100644 index 0000000000..6ca5c2063c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(boot_uf2_headers INTERFACE) +target_include_directories(boot_uf2_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/include/boot/uf2.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/include/boot/uf2.h new file mode 100644 index 0000000000..a040242bd9 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/boot_uf2/include/boot/uf2.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _BOOT_UF2_H +#define _BOOT_UF2_H + +#include +#include + +/** \file uf2.h +* \defgroup boot_uf2 boot_uf2 +* +* Header file for the UF2 format supported by an RP2040 in BOOTSEL mode. +*/ + +#define UF2_MAGIC_START0 0x0A324655u +#define UF2_MAGIC_START1 0x9E5D5157u +#define UF2_MAGIC_END 0x0AB16F30u + +#define UF2_FLAG_NOT_MAIN_FLASH 0x00000001u +#define UF2_FLAG_FILE_CONTAINER 0x00001000u +#define UF2_FLAG_FAMILY_ID_PRESENT 0x00002000u +#define UF2_FLAG_MD5_PRESENT 0x00004000u + +#define RP2040_FAMILY_ID 0xe48bff56 + +struct uf2_block { + // 32 byte header + uint32_t magic_start0; + uint32_t magic_start1; + uint32_t flags; + uint32_t target_addr; + uint32_t payload_size; + uint32_t block_no; + uint32_t num_blocks; + uint32_t file_size; // or familyID; + uint8_t data[476]; + uint32_t magic_end; +}; + +static_assert(sizeof(struct uf2_block) == 512, "uf2_block not sector sized"); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/CMakeLists.txt new file mode 100644 index 0000000000..af04c121c7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/CMakeLists.txt @@ -0,0 +1,40 @@ +if (NOT TARGET pico_base_headers) + # build the auto gen config headers + + set(header_content "// AUTOGENERATED FROM PICO_CONFIG_HEADER_FILES and then PICO__CONFIG_HEADER_FILES\n// DO NOT EDIT!\n") + string(TOUPPER ${PICO_PLATFORM} PICO_PLATFORM_UPPER) + + macro(add_header_content_from_var VAR) + set(header_content "${header_content}\n\n// based on ${VAR}:\n") + foreach(var IN LISTS ${VAR}) + set(header_content "${header_content}\n#include \"${var}\"") + endforeach() + endmacro() + + # PICO_CMAKE_CONFIG: PICO_CONFIG_HEADER_FILES, List of extra header files to include from pico/config.h for all platforms, type=list, default="", group=pico_base + add_header_content_from_var(PICO_CONFIG_HEADER_FILES) + + # PICO_CMAKE_CONFIG: PICO_CONFIG_RP2040_HEADER_FILES, List of extra header files to include from pico/config.h for rp2040 platform, type=list, default="", group=pico_base + # PICO_CMAKE_CONFIG: PICO_CONFIG_HOST_HEADER_FILES, List of extra header files to include from pico/config.h for host platform, type=list, default="", group=pico_base + add_header_content_from_var(PICO_${PICO_PLATFORM_UPPER}_CONFIG_HEADER_FILES) + + file(GENERATE + OUTPUT ${CMAKE_BINARY_DIR}/generated/pico_base/pico/config_autogen.h + CONTENT "${header_content}" + ) + + configure_file( include/pico/version.h.in ${CMAKE_BINARY_DIR}/generated/pico_base/pico/version.h) + + add_library(pico_base_headers INTERFACE) + target_include_directories(pico_base_headers INTERFACE include ${CMAKE_BINARY_DIR}/generated/pico_base) + + foreach(DIR IN LISTS PICO_INCLUDE_DIRS) + target_include_directories(pico_base_headers INTERFACE ${DIR}) + endforeach() + + # PICO_BUILD_DEFINE: PICO_BOARD, Name of board, type=string, default=CMake PICO_BOARD variable, group=pico_base + target_compile_definitions(pico_base_headers INTERFACE + PICO_BOARD="${PICO_BOARD}") + + target_link_libraries(pico_base_headers INTERFACE pico_platform_headers) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico.h new file mode 100644 index 0000000000..42c8b30c4b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef PICO_H_ +#define PICO_H_ + +/** \file pico.h +* \defgroup pico_base pico_base +* +* Core types and macros for the Pico SDK. This header is intended to be included by all source code +*/ + +#include "pico/types.h" +#include "pico/version.h" +#include "pico/config.h" +#include "pico/platform.h" +#include "pico/assert.h" +#include "pico/error.h" + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/assert.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/assert.h new file mode 100644 index 0000000000..7d2beff953 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/assert.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_ASSERT_H +#define _PICO_ASSERT_H + +#include "pico/types.h" + +#ifdef __cplusplus + +#include + +extern "C" { +#else +#include +#endif + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLE_ALL, Global assert enable, type=bool, default=0, group=pico_base +// PICO_CONFIG: PARAM_ASSERTIONS_DISABLE_ALL, Global assert disable, type=bool, default=0, group=pico_base + +#ifndef PARAM_ASSERTIONS_ENABLE_ALL +#define PARAM_ASSERTIONS_ENABLE_ALL 0 +#endif + +#ifndef PARAM_ASSERTIONS_DISABLE_ALL +#define PARAM_ASSERTIONS_DISABLE_ALL 0 +#endif + +#define PARAM_ASSERTIONS_ENABLED(x) ((PARAM_ASSERTIONS_ENABLED_ ## x || PARAM_ASSERTIONS_ENABLE_ALL) && !PARAM_ASSERTIONS_DISABLE_ALL) + +#define invalid_params_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) assert(!(test));}) +#define valid_params_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) assert(test);}) +#define hard_assert_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) hard_assert(!(test));}) + +#ifdef NDEBUG +extern void hard_assertion_failure(); +static inline void hard_assert(bool condition, ...) { + if (!condition) + hard_assertion_failure(); +} +#else +#define hard_assert assert +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/config.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/config.h new file mode 100644 index 0000000000..20f32cb906 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/config.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef PICO_CONFIG_H_ +#define PICO_CONFIG_H_ + +// ----------------------------------------------------- +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES +// OR USE #ifndef __ASSEMBLER__ guards +// ------------- + +// PICO_CONFIG_HEADER_FILES and then PICO_SDK__CONFIG_INCLUDE_FILES +// entries are dumped in order at build time into this generated header + +#include "pico/config_autogen.h" + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/error.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/error.h new file mode 100644 index 0000000000..722a696f51 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/error.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_ERROR_H +#define _PICO_ERROR_H + +/*! + * Common return codes from pico_sdk methods that return a status + */ +enum { + PICO_OK = 0, + PICO_ERROR_NONE = 0, + PICO_ERROR_TIMEOUT = -1, + PICO_ERROR_GENERIC = -2, + PICO_ERROR_NO_DATA = -3, +}; + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/types.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/types.h new file mode 100644 index 0000000000..37a4c303c0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/types.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_TYPES_H +#define _PICO_TYPES_H + +#include +#include +#include + +typedef unsigned int uint; + +#ifdef NDEBUG +/*! \typedef absolute_time_t + \brief An opaque 64 bit timestamp in microseconds + + The type is used instead of a raw uint64_t to prevent accidentally passing relative times or times in the wrong + time units where an absolute time is required. It is equivalent to uint64_t in release builds. + + \see to_us_since_boot + \see update_us_since_boot +*/ +typedef uint64_t absolute_time_t; + +/*! fn to_us_since_boot + * \brief convert an absolute_time_t into a number of microseconds since boot. + * \param t the number of microseconds since boot + * \return an absolute_time_t value equivalent to t + */ +static inline uint64_t to_us_since_boot(absolute_time_t t) { + return t; +} + +/*! fn update_us_since_boot + * \brief update an absolute_time_t value to represent a given number of microseconds since boot + * \param t the absolute time value to update + * \param us_since_boot the number of microseconds since boot to represent + */ +static inline void update_us_since_boot(absolute_time_t *t, uint64_t us_since_boot) { + *t = us_since_boot; +} + +#define ABSOLUTE_TIME_INITIALIZED_VAR(name, value) name = value +#else +typedef struct { + uint64_t _private_us_since_boot; +} absolute_time_t; + +static inline uint64_t to_us_since_boot(absolute_time_t t) { + return t._private_us_since_boot; +} + +static inline void update_us_since_boot(absolute_time_t *t, uint64_t us_since_boot) { + t->_private_us_since_boot = us_since_boot; +} +#define ABSOLUTE_TIME_INITIALIZED_VAR(name, value) name = {value} +#endif + +/** \struct datetime_t + * \ingroup util_datetime + * \brief Structure containing date and time information + * + * When setting an RTC alarm, set a field to -1 tells + * the RTC to not match on this field + */ +typedef struct { + int16_t year; ///< 0..4095 + int8_t month; ///< 1..12, 1 is January + int8_t day; ///< 1..28,29,30,31 depending on month + int8_t dotw; ///< 0..6, 0 is Sunday + int8_t hour; ///< 0..23 + int8_t min; ///< 0..59 + int8_t sec; ///< 0..59 +} datetime_t; + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/version.h.in b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/version.h.in new file mode 100644 index 0000000000..08fbfb52e5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_base/include/pico/version.h.in @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// --------------------------------------- +// THIS FILE IS AUTOGENERATED; DO NOT EDIT +// --------------------------------------- + +#ifndef _PICO_VERSION_H +#define _PICO_VERSION_H + +#define PICO_SDK_VERSION_MAJOR ${PICO_SDK_VERSION_MAJOR} +#define PICO_SDK_VERSION_MINOR ${PICO_SDK_VERSION_MINOR} +#define PICO_SDK_VERSION_REVISION ${PICO_SDK_VERSION_REVISION} +#define PICO_SDK_VERSION_STRING "${PICO_SDK_VERSION_STRING}" + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/CMakeLists.txt new file mode 100644 index 0000000000..2660e9114a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/CMakeLists.txt @@ -0,0 +1,30 @@ +add_library(pico_binary_info_headers INTERFACE) + +target_include_directories(pico_binary_info_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + +add_library(pico_binary_info INTERFACE) + +target_link_libraries(pico_binary_info INTERFACE pico_binary_info_headers) + +function(pico_set_program_name TARGET name) + # PICO_BUILD_DEFINE: PICO_PROGRAM_NAME, value passed to pico_set_program_name, type=string, default=none, group=pico_binary_info + target_compile_definitions(${TARGET} PRIVATE -DPICO_PROGRAM_NAME="${name}") +endfunction() + +function(pico_set_program_description TARGET description) + # since this is the command line, we will remove newlines + string(REPLACE "\n" " " description ${description}) + string(REPLACE "\"" "\\\"" description ${description}) + # PICO_BUILD_DEFINE: PICO_PROGRAM_DESCRIPTION, value passed to pico_set_program_description, type=string, default=none, group=pico_binary_info + target_compile_definitions(${TARGET} PRIVATE -DPICO_PROGRAM_DESCRIPTION="${description}") +endfunction() + +function(pico_set_program_url TARGET url) + # PICO_BUILD_DEFINE: PICO_PROGRAM_URL, value passed to pico_set_program_url, type=string, default=none, group=pico_binary_info + target_compile_definitions(${TARGET} PRIVATE -DPICO_PROGRAM_URL="${url}") +endfunction() + +function(pico_set_program_version TARGET version) + # PICO_BUILD_DEFINE: PICO_PROGRAM_VERSION_STRING, value passed to pico_set_program_version, type=string, default=none, group=pico_binary_info + target_compile_definitions(${TARGET} PRIVATE -DPICO_PROGRAM_VERSION_STRING="${version}") +endfunction() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info.h new file mode 100644 index 0000000000..2a641abda0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_BINARY_INFO_H +#define _PICO_BINARY_INFO_H + +/** + * Binary info is intended for embedding machine readable information with the binary in FLASH. + * + * Example uses include: + * + * - Program identification / information + * - Pin layouts + * - Included features + * - Identifying flash regions used as block devices/storage + */ + +#include "pico/binary_info/defs.h" +#include "pico/binary_info/structure.h" +#if PICO_ON_DEVICE +#include "pico/binary_info/code.h" +#endif + + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/code.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/code.h new file mode 100644 index 0000000000..af3ce554e6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/code.h @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_BINARY_INFO_CODE_H +#define _PICO_BINARY_INFO_CODE_H + +#include "pico.h" +#include "pico/binary_info/structure.h" + +#if !PICO_NO_BINARY_INFO +#define __bi_decl(name, bi, section_prefix, attr) static const attr __attribute__((section(section_prefix __STRING(name)))) struct _binary_info_core *name = bi +#define __bi_lineno_var_name __CONCAT(__bi_, __LINE__) +#define __bi_ptr_lineno_var_name __CONCAT(__bi_ptr, __LINE__) +#define __bi_enclosure_check_lineno_var_name __CONCAT(_error_bi_is_missing_enclosing_decl_,__LINE__) +#define __bi_mark_enclosure static const __unused int __bi_enclosure_check_lineno_var_name=0; +#if !defined(__GNUC__) || __cplusplus || __GNUC__ >= 8 +#define __bi_enclosure_check(x) (x + __bi_enclosure_check_lineno_var_name) +#else +// skip the version check on older GCC non C++, as it doesn't compile.. this is only here to catch the +// user accidentally forgetting to enclose the binary item with bi_decl +#define __bi_enclosure_check(x) (x) +#endif +/** + * Declare some binary information that will be included if the contain source file/line is compiled into the binary + */ +#define bi_decl(_decl) __bi_mark_enclosure _decl; __bi_decl(__bi_ptr_lineno_var_name, &__bi_lineno_var_name.core, ".binary_info.keep.", __used); +/** + * Declare some binary information that will be included if the function containing the decl is linked into the binary. + * The SDK uses --gc-sections, so functions that are never called will be removed by the linker, and any associated + * binary information declared this way will also be stripped + */ +#define bi_decl_if_func_used(_decl) ({__bi_mark_enclosure _decl; __bi_decl(__bi_ptr_lineno_var_name, &__bi_lineno_var_name.core, ".binary_info.", ); *(volatile uint8_t *)&__bi_ptr_lineno_var_name;}); + +#define bi_decl_with_attr(_decl, _attr) __bi_mark_enclosure _attr _decl; __bi_decl(__bi_ptr_lineno_var_name, &__bi_lineno_var_name.core, ".binary_info.keep.", __used); +#define bi_decl_if_func_used_with_attr(_decl, _attr) ({__bi_mark_enclosure _attr _decl; __bi_decl(__bi_ptr_lineno_var_name, &__bi_lineno_var_name.core, ".binary_info.", ); *(volatile uint8_t *)&__bi_ptr_lineno_var_name;}); +#else +#define __bi_decl(bi, name, attr) +#define bi_decl_with_attr(_decl, _attr) +#define bi_decl(_decl) +#define bi_decl_if_func_used_with_attr(_decl, _attr) ((void)0); +#define bi_decl_if_func_used(_decl) ((void)0); +#endif + +#define bi_int(_tag, _id, _value) \ + static const struct _binary_info_id_and_int __bi_lineno_var_name = { \ + .core = { \ + .type = __bi_enclosure_check(BINARY_INFO_TYPE_ID_AND_INT), \ + .tag = _tag, \ + },\ + .id = _id, \ + .value = _value \ + }; + +#define bi_string(_tag, _id, _value) \ + static const struct _binary_info_id_and_string __bi_lineno_var_name = { \ + .core = { \ + .type = __bi_enclosure_check(BINARY_INFO_TYPE_ID_AND_STRING), \ + .tag = _tag, \ + },\ + .id = _id, \ + .value = _value, \ + } + +#define bi_block_device(_tag, _name, _address, _size, _extra, _flags) \ + static const struct _binary_info_block_device __bi_lineno_var_name = { \ + .core = { \ + .type = __bi_enclosure_check(BINARY_INFO_TYPE_BLOCK_DEVICE), \ + .tag = _tag, \ + },\ + .name = _name, \ + .address = _address, \ + .size = _size, \ + .extra = _extra, \ + .flags = _flags, \ + } + +#define __bi_encoded_pins_with_func(_encoding) \ + static const struct _binary_info_pins_with_func __bi_lineno_var_name = { \ + .core = { \ + .type = __bi_enclosure_check(BINARY_INFO_TYPE_PINS_WITH_FUNC), \ + .tag = BINARY_INFO_TAG_RASPBERRY_PI, \ + },\ + .pin_encoding = _encoding \ + } + +#define __bi_pins_with_name(_mask, _label) \ + static const struct _binary_info_pins_with_name __bi_lineno_var_name = { \ + .core = { \ + .type = __bi_enclosure_check(BINARY_INFO_TYPE_PINS_WITH_NAME), \ + .tag = BINARY_INFO_TAG_RASPBERRY_PI, \ + },\ + .pin_mask = _mask, \ + .label = _label \ + } + +#define __bi_named_group(_parent_tag, _parent_id, _group_tag, _group_id, _label, _flags) \ +static const struct _binary_info_named_group __bi_lineno_var_name = { \ + .core = { \ + .type = __bi_enclosure_check(BINARY_INFO_TYPE_NAMED_GROUP), \ + .tag = _parent_tag, \ + },\ + .parent_id = _parent_id, \ + .group_tag = _group_tag, \ + .flags = _flags, \ + .group_id = _group_id, \ + .label = _label \ + } + +#define bi_binary_end(end) bi_int(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_BINARY_END, end) +#define bi_program_name(name) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_NAME, name) +#define bi_program_description(description) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_DESCRIPTION, description) +#define bi_program_version_string(version_string) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_VERSION_STRING, version_string) +#define bi_program_build_date_string(date_string) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_BUILD_DATE_STRING, date_string) +#define bi_program_url(url) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_URL, url) +// multiple of these may be added +#define bi_program_feature(feature) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_FEATURE, feature) +#define bi_program_build_attribute(attr) bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_BUILD_ATTRIBUTE, attr) +#define bi_program_feature_group(tag, id, name) __bi_named_group(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_FEATURE, tag, id, name, 0) +#define bi_program_feature_group_with_flags(tag, id, name, flags) __bi_named_group(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PROGRAM_FEATURE, tag, id, name, flags) + +#define bi_1pin_with_func(p0, func) __bi_encoded_pins_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 7) | ((p0) << 12)) +#define bi_2pins_with_func(p0, p1, func) __bi_encoded_pins_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 7) | ((p1) << 12) | ((p1) << 17)) +#define bi_3pins_with_func(p0, p1, p2, func) __bi_encoded_pins_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 7) | ((p1) << 12) | ((p2) << 17) | ((p2) << 22)) +#define bi_4pins_with_func(p0, p1, p2, p3, func) __bi_encoded_pins_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 7) | ((p1) << 12) | ((p2) << 17) | ((p3) << 22) | ((p3) << 27)) +#define bi_5pins_with_func(p0, p1, p2, p3, p4, func) __bi_encoded_pins_with_func(BI_PINS_ENCODING_MULTI | ((func << 3)) | ((p0) << 7) | ((p1) << 12) | ((p2) << 17) | ((p3) << 22) | ((p4) << 27)) +#define bi_pin_range_with_func(plo, phi, func) __bi_encoded_pins_with_func(BI_PINS_ENCODING_RANGE | ((func << 3)) | ((plo) << 7) | ((phi) << 12)) + +#define bi_pin_mask_with_name(pmask, label) __bi_pins_with_name((pmask), (label)) +// names are sperated by | ... i.e. "name1|name2|name3" +#define bi_pin_mask_with_names(pmask, label) __bi_pins_with_name((pmask), (label)) +#define bi_1pin_with_name(p0, name) bi_pin_mask_with_name(1u << (p0), name) +#define bi_2pins_with_names(p0, name0, p1, name1) bi_pin_mask_with_names((1u << (p0)) | (1u << (p1)), name0 "|" name1) +#define bi_3pins_with_names(p0, name0, p1, name1, p2, name2) bi_pin_mask_with_names((1u << (p0)) | (1u << (p1)) | (1u << (p2)), name0 "|" name1 "|" name2) +#define bi_4pins_with_names(p0, name0, p1, name1, p2, name2, p3, name3) bi_pin_mask_with_names((1u << (p0)) | (1u << (p1)) | (1u << (p2)) | (1u << (p3)), name0 "|" name1 "|" name2 "|" name3) + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/defs.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/defs.h new file mode 100644 index 0000000000..407c0ac488 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/defs.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_BINARY_INFO_DEFS_H +#define _PICO_BINARY_INFO_DEFS_H + +// this file is for pre-processor definitions only + +// should be found within the first 256 bytes of the real binary (i.e. after the flash second stage if a flash binary) +// +// Note the layout is: +// +// addr : BINARY_INFO_MARKER_START +// addr+0x04 : __binary_info_start +// addr+0x08 : __binary_info_end +// addr+0x0c : __address_mapping_table +// addr+0x10 | BINARY_INFO_MARKER_END +// +// __binary_info_start to __binary_info_end are the start, end (non inclusive) of an array +// of pointers to binary_info_t structures +// +// __address_mapping_table is an array of the following items: +// +// uint32_t source_addr_start +// uint32_t dest_addr_start +// uint32_t dest_addr_end +// +// representing a mapping from the stored address in the binary/flash to addresses at runtime. +// The linker will store pointers within the binary using their runtime values, however because of +// "AT" mapping in the link script these addresses actually correspond to a different address in the binary +// image. This mapping (which in the case of crt0.S is simply the data copy table used at initialization +// to copy data into it's runtime location) can be used by picotool or others to reverse the mapping to find data +// within the binary. +// +// Note the above array is terminated with a NULL source_addr_start + +#define BINARY_INFO_MARKER_START 0x7188ebf2 +#define BINARY_INFO_MARKER_END 0xe71aa390 + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/structure.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/structure.h new file mode 100644 index 0000000000..2e261b252b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_binary_info/include/pico/binary_info/structure.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_BINARY_INFO_STRUCTURE_H +#define _PICO_BINARY_INFO_STRUCTURE_H + +// NOTE: This file may be included by non SDK code, so does not use SDK includes + +// NOTE: ALL CHANGES MUST BE BACKWARDS COMPATIBLE + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifndef __packed +#define __packed __attribute__((packed)) +#endif + +typedef struct _binary_info_core binary_info_t; + +#define BINARY_INFO_TYPE_RAW_DATA 1 +#define BINARY_INFO_TYPE_SIZED_DATA 2 +#define BINARY_INFO_TYPE_BINARY_INFO_LIST_ZERO_TERMINATED 3 +#define BINARY_INFO_TYPE_BSON 4 +#define BINARY_INFO_TYPE_ID_AND_INT 5 +#define BINARY_INFO_TYPE_ID_AND_STRING 6 +// traditional block device +#define BINARY_INFO_TYPE_BLOCK_DEVICE 7 +#define BINARY_INFO_TYPE_PINS_WITH_FUNC 8 +#define BINARY_INFO_TYPE_PINS_WITH_NAME 9 +#define BINARY_INFO_TYPE_PINS_WITH_NAMES 9 +#define BINARY_INFO_TYPE_NAMED_GROUP 10 + +// note plan is to reserve c1 = 0->31 for "collision tags"; i.e. +// for which you should always use random IDs with the binary_info, +// giving you 4 + 8 + 32 = 44 bits to avoid collisions +#define BINARY_INFO_MAKE_TAG(c1, c2) ((((uint)c2&0xffu)<<8u)|((uint)c1&0xffu)) + +// Raspberry Pi defined. do not use +#define BINARY_INFO_TAG_RASPBERRY_PI BINARY_INFO_MAKE_TAG('R','P') + +#define BINARY_INFO_ID_RP_PROGRAM_NAME 0x02031c86 +#define BINARY_INFO_ID_RP_PROGRAM_VERSION_STRING 0x11a9bc3a +#define BINARY_INFO_ID_RP_PROGRAM_BUILD_DATE_STRING 0x9da22254 +#define BINARY_INFO_ID_RP_BINARY_END 0x68f465de +#define BINARY_INFO_ID_RP_PROGRAM_URL 0x1856239a +#define BINARY_INFO_ID_RP_PROGRAM_DESCRIPTION 0xb6a07c19 +#define BINARY_INFO_ID_RP_PROGRAM_FEATURE 0xa1f4b453 +#define BINARY_INFO_ID_RP_PROGRAM_BUILD_ATTRIBUTE 0x4275f0d3 +#define BINARY_INFO_ID_RP_SDK_VERSION 0x5360b3ab +#define BINARY_INFO_ID_RP_PICO_BOARD 0xb63cffbb + +#if PICO_ON_DEVICE +#define bi_ptr_of(x) x * +#else +#define bi_ptr_of(x) uint32_t +#endif +typedef struct __packed _binary_info_core { + uint16_t type; + uint16_t tag; +} binary_info_core_t; + +typedef struct __packed _binary_info_raw_data { + struct _binary_info_core core; + uint8_t bytes[1]; +} binary_info_raw_data_t; + +typedef struct __packed _binary_info_sized_data { + struct _binary_info_core core; + uint32_t length; + uint8_t bytes[1]; +} binary_info_sized_data_t; + +typedef struct __packed _binary_info_list_zero_terminated { + struct _binary_info_core core; + bi_ptr_of(binary_info_t) list; +} binary_info_list_zero_terminated_t; + +typedef struct __packed _binary_info_id_and_int { + struct _binary_info_core core; + uint32_t id; + int32_t value; +} binary_info_id_and_int_t; + +typedef struct __packed _binary_info_id_and_string { + struct _binary_info_core core; + uint32_t id; + bi_ptr_of(const char) value; +} binary_info_id_and_string_t; + +typedef struct __packed _binary_info_block_device { + struct _binary_info_core core; + bi_ptr_of(const char) name; // optional static name (independent of what is formatted) + uint32_t address; + uint32_t size; + bi_ptr_of(binary_info_t) extra; // additional info + uint16_t flags; +} binary_info_block_device_t; + +#define BI_PINS_ENCODING_RANGE 1 +#define BI_PINS_ENCODING_MULTI 2 + +typedef struct __packed _binary_info_pins_with_func { + struct _binary_info_core core; + // p4_5 : p3_5 : p2_5 : p1_5 : p0_5 : func_4 : 001_3 //individual pins p0,p1,p2,p3,p4 ... if fewer than 5 then duplicate p + // phi_5 : plo_5 : func_4 : 010_3 // pin range plo-phi inclusive + uint32_t pin_encoding; +} binary_info_pins_with_func_t; + +typedef struct __packed _binary_info_pins_with_name { + struct _binary_info_core core; + uint32_t pin_mask; + bi_ptr_of(const char) label; +} binary_info_pins_with_name_t; + +#define BI_NAMED_GROUP_SHOW_IF_EMPTY 0x0001 // default is to hide +#define BI_NAMED_GROUP_SEPARATE_COMMAS 0x0002 // default is newlines +#define BI_NAMED_GROUP_SORT_ALPHA 0x0004 // default is no sort +#define BI_NAMED_GROUP_ADVANCED 0x0008 // if set, then only shown in say info -a + +typedef struct __packed _binary_info_named_group { + struct _binary_info_core core; + uint32_t parent_id; + uint16_t flags; + uint16_t group_tag; + uint32_t group_id; + bi_ptr_of(const char) label; +} binary_info_named_group_t; + +enum { + BINARY_INFO_BLOCK_DEV_FLAG_READ = + 1 << 0, // if not readable, then it is basically hidden, but tools may choose to avoid overwriting it + BINARY_INFO_BLOCK_DEV_FLAG_WRITE = 1 << 1, + BINARY_INFO_BLOCK_DEV_FLAG_REFORMAT = 1 << 2, // may be reformatted.. + + BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN = 0 << 4, // unknown free to look + BINARY_INFO_BLOCK_DEV_FLAG_PT_MBR = 1 << 4, // expect MBR + BINARY_INFO_BLOCK_DEV_FLAG_PT_GPT = 2 << 4, // expect GPT + BINARY_INFO_BLOCK_DEV_FLAG_PT_NONE = 3 << 4, // no partition table +}; + +#ifdef __cplusplus +} +#endif +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/CMakeLists.txt new file mode 100644 index 0000000000..603a520609 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/CMakeLists.txt @@ -0,0 +1,5 @@ +if (NOT TARGET pico_bit_ops_headers) + add_library(pico_bit_ops_headers INTERFACE) + target_include_directories(pico_bit_ops_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + target_link_libraries(pico_bit_ops_headers INTERFACE pico_base_headers) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/include/pico/bit_ops.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/include/pico/bit_ops.h new file mode 100644 index 0000000000..7b63c1dcd7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_bit_ops/include/pico/bit_ops.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_BIT_OPS_H +#define _PICO_BIT_OPS_H + +#include "pico.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file bit_ops.h +* \defgroup pico_bit_ops pico_bit_ops +* +* Optimized bit manipulation functions. +* Additionally provides replacement implementations of the compiler built-ins __builtin_popcount, __builtin_clz +* and __bulitin_ctz +*/ + +/*! \brief Reverse the bits in a 32 bit word + * \ingroup pico_bit_ops + * + * \param bits 32 bit input + * \return the 32 input bits reversed + */ +uint32_t __rev(uint32_t bits); + +/*! \brief Reverse the bits in a 64 bit double word + * \ingroup pico_bit_ops + * + * \param bits 64 bit input + * \return the 64 input bits reversed + */ +uint64_t __revll(uint64_t bits); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/CMakeLists.txt new file mode 100644 index 0000000000..aed07d2927 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/CMakeLists.txt @@ -0,0 +1,5 @@ +if (NOT TARGET pico_divider_headers) + add_library(pico_divider_headers INTERFACE) + target_include_directories(pico_divider_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + target_link_libraries(pico_divider_headers INTERFACE pico_base_headers) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/include/pico/divider.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/include/pico/divider.h new file mode 100644 index 0000000000..749f734be9 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_divider/include/pico/divider.h @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_DIVIDER_H_ +#define _PICO_DIVIDER_H_ + +#include "pico.h" +#include "hardware/divider.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \defgroup pico_divider pico_divider + * Optimized 32 and 64 bit division functions accelerated by the RP2040 hardware divider. + * Additionally provides integration with the C `/` and `%` operators + */ + +/** \file pico/divider.h +* \brief High level APIs including combined quotient and remainder functions for 32 and 64 bit accelerated by the hardware divider +* \ingroup pico_divider +* +* These functions all call __aeabi_idiv0 or __aebi_ldiv0 on division by zero +* passing the largest applicably signed value +* +* Functions with unsafe in their name do not save/restore divider state, so are unsafe to call from interrupts. Unsafe functions are slightly faster. +*/ + +/** + * \brief Integer divide of two signed 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient + */ +int32_t div_s32s32(int32_t a, int32_t b); + +/** + * \brief Integer divide of two signed 32-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + */ +static inline int32_t divmod_s32s32_rem(int32_t a, int32_t b, int32_t *rem) { + divmod_result_t r = hw_divider_divmod_s32(a, b); + *rem = to_remainder_s32(r); + return to_quotient_s32(r); +} + +/** + * \brief Integer divide of two signed 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in low word/r0, remainder in high word/r1 + */ +divmod_result_t divmod_s32s32(int32_t a, int32_t b); + +/** + * \brief Integer divide of two unsigned 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return Quotient + */ +uint32_t div_u32u32(uint32_t a, uint32_t b); + +/** + * \brief Integer divide of two unsigned 32-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + */ +static inline uint32_t divmod_u32u32_rem(uint32_t a, uint32_t b, uint32_t *rem) { + divmod_result_t r = hw_divider_divmod_u32(a, b); + *rem = to_remainder_u32(r); + return to_quotient_u32(r); +} + +/** + * \brief Integer divide of two unsigned 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in low word/r0, remainder in high word/r1 + */ +divmod_result_t divmod_u32u32(uint32_t a, uint32_t b); + +/** + * \brief Integer divide of two signed 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return Quotient + */ +int64_t div_s64s64(int64_t a, int64_t b); + +/** + * \brief Integer divide of two signed 64-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + */ +int64_t divmod_s64s64_rem(int64_t a, int64_t b, int64_t *rem); + +/** + * \brief Integer divide of two signed 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in result (r0,r1), remainder in regs (r2, r3) + */ +int64_t divmod_s64s64(int64_t a, int64_t b); + +/** + * \brief Integer divide of two unsigned 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return Quotient + */ +uint64_t div_u64u64(uint64_t a, uint64_t b); + +/** + * \brief Integer divide of two unsigned 64-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + */ +uint64_t divmod_u64u64_rem(uint64_t a, uint64_t b, uint64_t *rem); + + +/** + * \brief Integer divide of two signed 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in result (r0,r1), remainder in regs (r2, r3) + */ +uint64_t divmod_u64u64(uint64_t a, uint64_t b); + +// ----------------------------------------------------------------------- +// these "unsafe" functions are slightly faster, but do not save the divider state, +// so are not generally safe to be called from interrupts +// ----------------------------------------------------------------------- + +/** + * \brief Unsafe integer divide of two signed 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient + * + * Do not use in interrupts + */ +int32_t div_s32s32_unsafe(int32_t a, int32_t b); + +/** + * \brief Unsafe integer divide of two signed 32-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + * + * Do not use in interrupts + */ +int32_t divmod_s32s32_rem_unsafe(int32_t a, int32_t b, int32_t *rem); + +/** + * \brief Unsafe integer divide of two unsigned 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in low word/r0, remainder in high word/r1 + * + * Do not use in interrupts + */ +int64_t divmod_s32s32_unsafe(int32_t a, int32_t b); + +/** + * \brief Unsafe integer divide of two unsigned 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return Quotient + * + * Do not use in interrupts + */ +uint32_t div_u32u32_unsafe(uint32_t a, uint32_t b); + +/** + * \brief Unsafe integer divide of two unsigned 32-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + * + * Do not use in interrupts + */ +uint32_t divmod_u32u32_rem_unsafe(uint32_t a, uint32_t b, uint32_t *rem); + +/** + * \brief Unsafe integer divide of two unsigned 32-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in low word/r0, remainder in high word/r1 + * + * Do not use in interrupts + */ +uint64_t divmod_u32u32_unsafe(uint32_t a, uint32_t b); + +/** + * \brief Unsafe integer divide of two signed 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return Quotient + * + * Do not use in interrupts + */ +int64_t div_s64s64_unsafe(int64_t a, int64_t b); + +/** + * \brief Unsafe integer divide of two signed 64-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + * + * Do not use in interrupts + */ +int64_t divmod_s64s64_rem_unsafe(int64_t a, int64_t b, int64_t *rem); + +/** + * \brief Unsafe integer divide of two signed 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in result (r0,r1), remainder in regs (r2, r3) + * + * Do not use in interrupts + */ +int64_t divmod_s64s64_unsafe(int64_t a, int64_t b); + +/** + * \brief Unsafe integer divide of two unsigned 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return Quotient + * + * Do not use in interrupts + */ +uint64_t div_u64u64_unsafe(uint64_t a, uint64_t b); + +/** + * \brief Unsafe integer divide of two unsigned 64-bit values, with remainder + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \param [out] rem The remainder of dividend/divisor + * \return Quotient result of dividend/divisor + * + * Do not use in interrupts + */ +uint64_t divmod_u64u64_rem_unsafe(uint64_t a, uint64_t b, uint64_t *rem); + +/** + * \brief Unsafe integer divide of two signed 64-bit values + * \ingroup pico_divider + * + * \param a Dividend + * \param b Divisor + * \return quotient in result (r0,r1), remainder in regs (r2, r3) + * + * Do not use in interrupts + */ +uint64_t divmod_u64u64_unsafe(uint64_t a, uint64_t b); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/CMakeLists.txt new file mode 100644 index 0000000000..454ea578a8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/CMakeLists.txt @@ -0,0 +1,11 @@ +if (NOT TARGET pico_stdlib_headers) + add_library(pico_stdlib_headers INTERFACE) + target_include_directories(pico_stdlib_headers INTERFACE include) + target_link_libraries(pico_stdlib_headers INTERFACE + hardware_gpio + hardware_uart + hardware_divider + pico_time + pico_util + ) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/include/pico/stdlib.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/include/pico/stdlib.h new file mode 100644 index 0000000000..165765f4dc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_stdlib/include/pico/stdlib.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_STDLIB_H +#define _PICO_STDLIB_H + +#include "pico.h" +#include "pico/stdio.h" +#include "pico/time.h" +#include "hardware/gpio.h" +#include "hardware/uart.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file stdlib.h + * \defgroup pico_stdlib pico_stdlib + * + * Aggregation of a core subset of Pico SDK libraries used by most executables along with some additional + * utility methods. Including pico_stdlib gives you everything you need to get a basic program running + * which prints to stdout or flashes a LED + * + * This library aggregates: + * - @ref hardware_uart + * - @ref hardware_gpio + * - @ref pico_binary_info + * - @ref pico_runtime + * - @ref pico_platform + * - @ref pico_printf + * - @ref pico_stdio + * - @ref pico_standard_link + * - @ref pico_util + * + * There are some basic default values used by these functions that will default to + * usable values, however, they can be customised in a board definition header via + * config.h or similar + */ + +// Note PICO_STDIO_UART, PICO_STDIO_USB, PICO_STDIO_SEMIHOSTING are set by the +// respective INTERFACE libraries, so these defines are set if the library +// is included for the target executable + +#if PICO_STDIO_UART +#include "pico/stdio_uart.h" +#endif + +#if PICO_STDIO_USB +#include "pico/stdio_usb.h" +#endif + +#if PICO_STDIO_SEMIHOSTING +#include "pico/stdio_semihosting.h" +#endif + +/*! \brief Set up the default UART and assign it to the default GPIO's + * \ingroup pico_stdlib + * + * By default this will use UART 0, with TX to pin GPIO 0, + * RX to pin GPIO 1, and the baudrate to 115200 + * + * Calling this method also initializes stdin/stdout over UART if the + * @ref pico_stdio_uart library is linked. + * + * Defaults can be changed using configuration defines, + * PICO_DEFAULT_UART_INSTANCE, + * PICO_DEFAULT_UART_BAUD_RATE + * PICO_DEFAULT_UART_TX_PIN + * PICO_DEFAULT_UART_RX_PIN + */ +void setup_default_uart(); + +/*! \brief Initialise the system clock to 48MHz + * \ingroup pico_stdlib + * + * Set the system clock to 48MHz, and set the peripheral clock to match. + */ +void set_sys_clock_48mhz(); + +/*! \brief Initialise the system clock + * \ingroup pico_stdlib + * + * \param vco_freq The voltage controller oscillator frequency to be used by the SYS PLL + * \param post_div1 The first post divider for the SYS PLL + * \param post_div2 The second post divider for the SYS PLL. + * + * See the PLL documentation in the datasheet for details of driving the PLLs. + */ +void set_sys_clock_pll(uint32_t vco_freq, uint post_div1, uint post_div2); + +/*! \brief Check if a given system clock frequency is valid/attainable + * \ingroup pico_stdlib + * + * \param freq_khz Requested frequency + * \param vco_freq_out On success, the voltage controller oscillator frequeucny to be used by the SYS PLL + * \param post_div1_out On success, The first post divider for the SYS PLL + * \param post_div2_out On success, The second post divider for the SYS PLL. + * @return true if the frequency is possible and the output parameters have been written. + */ +bool check_sys_clock_khz(uint32_t freq_khz, uint *vco_freq_out, uint *post_div1_out, uint *post_div2_out); + +/*! \brief Attempt to set a system clock frequency in khz + * \ingroup pico_stdlib + * + * Note that not all clock frequencies are possible; it is preferred that you + * use src/rp2_common/hardware_clocks/scripts/vcocalc.py to calculate the parameters + * for use with set_sys_clock_pll + * + * \param freq_khz Requested frequency + * \param required if true then this function will assert if the frequency is not attainable. + * \return true if the clock was configured + */ +static inline bool set_sys_clock_khz(uint32_t freq_khz, bool required) { + uint vco, postdiv1, postdiv2; + if (check_sys_clock_khz(freq_khz, &vco, &postdiv1, &postdiv2)) { + set_sys_clock_pll(vco, postdiv1, postdiv2); + return true; + } else if (required) { + panic("System clock of %u kHz cannot be exactly achieved", freq_khz); + } + return false; +} + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/CMakeLists.txt new file mode 100644 index 0000000000..8d1d0f832f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/CMakeLists.txt @@ -0,0 +1,44 @@ +if (NOT TARGET pico_sync_headers) + add_library(pico_sync_headers INTERFACE) + target_include_directories(pico_sync_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + target_link_libraries(pico_sync_headers INTERFACE hardware_sync pico_time) +endif() + +if (NOT TARGET pico_sync_core) + add_library(pico_sync_core INTERFACE) + target_sources(pico_sync_core INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/lock_core.c + ) + target_link_libraries(pico_sync_core INTERFACE pico_sync_headers) +endif() + +if (NOT TARGET pico_sync_sem) + add_library(pico_sync_sem INTERFACE) + target_sources(pico_sync_sem INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/sem.c + ) + target_link_libraries(pico_sync_sem INTERFACE pico_sync_core pico_time) +endif() + +if (NOT TARGET pico_sync_mutex) + add_library(pico_sync_mutex INTERFACE) + target_sources(pico_sync_mutex INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/mutex.c + ) + target_link_libraries(pico_sync_mutex INTERFACE pico_sync_core pico_time) +endif() + +if (NOT TARGET pico_sync_critical_section) + add_library(pico_sync_critical_section INTERFACE) + target_sources(pico_sync_critical_section INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/critical_section.c + ) + target_link_libraries(pico_sync_critical_section INTERFACE pico_sync_core pico_time) +endif() + +if (NOT TARGET pico_sync) + add_library(pico_sync INTERFACE) + target_link_libraries(pico_sync INTERFACE pico_sync_sem pico_sync_mutex pico_sync_critical_section pico_sync_core) +endif() + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/critical_section.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/critical_section.c new file mode 100644 index 0000000000..5f47090d7c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/critical_section.c @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/critical_section.h" + +#if !PICO_NO_HARDWARE +static_assert(sizeof(critical_section_t) == 8, ""); +#endif + +void critical_section_init(critical_section_t *critsec) { + critical_section_init_with_lock_num(critsec, spin_lock_claim_unused(true)); +} + +void critical_section_init_with_lock_num(critical_section_t *critsec, uint lock_num) { + lock_init(&critsec->core, lock_num); + __mem_fence_release(); +} + +void critical_section_deinit(critical_section_t *critsec) { + spin_lock_unclaim(spin_lock_get_num(critsec->core.spin_lock)); +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/critical_section.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/critical_section.h new file mode 100644 index 0000000000..17a8b3f475 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/critical_section.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLATFORM_CRITICAL_SECTION_H +#define _PLATFORM_CRITICAL_SECTION_H + +#include "pico/lock_core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file critical_section.h + * \defgroup critical_section critical_section + * \ingroup pico_sync + * \brief Critical Section API for short-lived mutual exclusion safe for IRQ and multi-core + * + * A critical section is non-reentrant, and provides mutual exclusion using a spin-lock to prevent access + * from the other core, and from (higher priority) interrupts on the same core. It does the former + * using a spin lock and the latter by disabling interrupts on the calling core. + * + * Because interrupts are disabled by this function, uses of the critical_section should be as short as possible. + */ + +typedef struct __packed_aligned critical_section { + lock_core_t core; + uint32_t save; +} critical_section_t; + +/*! \brief Initialise a critical_section structure allowing the system to assign a spin lock number + * \ingroup critical_section + * + * The critical section is initialized ready for use, and will use a (possibly shared) spin lock + * number assigned by the system. Note that in general it is unlikely that you would be nesting + * critical sections, however if you do so you *must* use \ref critical_section_init_with_lock_num + * to ensure that the spin lock's used are different. + * + * \param critsec Pointer to critical_section structure + */ +void critical_section_init(critical_section_t *critsec); + +/*! \brief Initialise a critical_section structure assigning a specific spin lock number + * \ingroup critical_section + * \param critsec Pointer to critical_section structure + * \param lock_num the specific spin lock number to use + */ +void critical_section_init_with_lock_num(critical_section_t *critsec, uint lock_num); + +/*! \brief Enter a critical_section + * \ingroup critical_section + * + * If the spin lock associated with this critical section is in use, then this + * method will block until it is released. + * + * \param critsec Pointer to critical_section structure + */ +static inline void critical_section_enter_blocking(critical_section_t *critsec) { + critsec->save = spin_lock_blocking(critsec->core.spin_lock); +} + +/*! \brief Release a critical_section + * \ingroup critical_section + * + * \param critsec Pointer to critical_section structure + */ +static inline void critical_section_exit(critical_section_t *critsec) { + spin_unlock(critsec->core.spin_lock, critsec->save); +} +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/lock_core.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/lock_core.h new file mode 100644 index 0000000000..758eb94fb5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/lock_core.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_LOCK_CORE_H +#define _PICO_LOCK_CORE_H + +#include "pico.h" +#include "hardware/sync.h" + +/** \file lock_core.h + * \ingroup pico_sync + * + * Base implementation for locking primitives protected by a spin lock + */ +typedef struct lock_core { + // spin lock protecting this lock's state + spin_lock_t *spin_lock; + + // note any lock members in containing structures need not be volatile; + // they are protected by memory/compiler barriers when gaining and release spin locks +} lock_core_t; + +void lock_init(lock_core_t *core, uint lock_num); + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/mutex.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/mutex.h new file mode 100644 index 0000000000..c9b4c1bf74 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/mutex.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLATFORM_MUTEX_H +#define _PLATFORM_MUTEX_H + +#include "pico/lock_core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file mutex.h + * \defgroup mutex mutex + * \ingroup pico_sync + * \brief Mutex API for non IRQ mutual exclusion between cores + * + * Mutexes are application level locks usually used protecting data structures that might be used by + * multiple cores. Unlike critical sections, the mutex protected code is not necessarily + * required/expected to complete quickly, as no other sytemwide locks are held on account of a locked mutex. + * + * Because they are not re-entrant on the same core, blocking on a mutex should never be done in an IRQ + * handler. It is valid to call \ref mutex_try_enter from within an IRQ handler, if the operation + * that would be conducted under lock can be skipped if the mutex is locked (at least by the same core). + * + * See \ref critical_section.h for protecting access between multiple cores AND IRQ handlers + */ + +typedef struct __packed_aligned mutex { + lock_core_t core; + bool owned; + int8_t owner; +} mutex_t; + +/*! \brief Initialise a mutex structure + * \ingroup mutex + * + * \param mtx Pointer to mutex structure + */ +void mutex_init(mutex_t *mtx); + +/*! \brief Take ownership of a mutex + * \ingroup mutex + * + * This function will block until the calling core can claim ownership of the mutex. + * On return the caller core owns the mutex + * + * \param mtx Pointer to mutex structure + */ +void mutex_enter_blocking(mutex_t *mtx); + +/*! \brief Check to see if a mutex is available + * \ingroup mutex + * + * Will return true if the mutex is unowned, false otherwise + * + * \param mtx Pointer to mutex structure + * \param owner_out If mutex is owned, and this pointer is non-zero, it will be filled in with the core number of the current owner of the mutex + */ +bool mutex_try_enter(mutex_t *mtx, uint32_t *owner_out); + +/*! \brief Wait for mutex with timeout + * \ingroup mutex + * + * Wait for up to the specific time to take ownership of the mutex. If the calling + * core can take ownership of the mutex before the timeout expires, then true will be returned + * and the calling core will own the mutex, otherwise false will be returned and the calling + * core will *NOT* own the mutex. + * + * \param mtx Pointer to mutex structure + * \param timeout_ms The timeout in milliseconds. + * \return true if mutex now owned, false if timeout occurred before mutex became available + */ +bool mutex_enter_timeout_ms(mutex_t *mtx, uint32_t timeout_ms); + +/*! \brief Wait for mutex until a specific time + * \ingroup mutex + * + * Wait until the specific time to take ownership of the mutex. If the calling + * core can take ownership of the mutex before the timeout expires, then true will be returned + * and the calling core will own the mutex, otherwise false will be returned and the calling + * core will *NOT* own the mutex. + * + * \param mtx Pointer to mutex structure + * \param until The time after which to return if the core cannot take owner ship of the mutex + * \return true if mutex now owned, false if timeout occurred before mutex became available + */ +bool mutex_enter_block_until(mutex_t *mtx, absolute_time_t until); + +/*! \brief Release ownership of a mutex + * \ingroup mutex + * + * \param mtx Pointer to mutex structure + */ +void mutex_exit(mutex_t *mtx); + +/*! \brief Test for mutex initialised state + * \ingroup mutex + * + * \param mtx Pointer to mutex structure + * \return true if the mutex is initialised, false otherwise + */ +static inline bool mutex_is_initialzed(mutex_t *mtx) { + return mtx->core.spin_lock != 0; +} + +/*! \brief Helper macro for static definition of mutexes + * \ingroup mutex + * + * A mutex defined as follows: + * + * ```c + * auto_init_mutex(my_mutex); + * ``` + * + * Is equivalent to doing + * + * ```c + * static mutex_t my_mutex; + * + * void my_init_function() { + * mutex_init(&my_mutex); + * } + * ``` + * + * But the initialization of the mutex is performed automatically during runtime initialization + */ +#define auto_init_mutex(name) static __attribute__((section(".mutex_array"))) mutex_t name + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sem.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sem.h new file mode 100644 index 0000000000..19ac2925a3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sem.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLATFORM_SEM_H +#define _PLATFORM_SEM_H + +#include "pico/lock_core.h" + +/** \file sem.h + * \defgroup sem sem + * \ingroup pico_sync + * \brief Semaphore API for restricting access to a resource + * + * A semaphore holds a number of available permits. `sem_acquire` methods will acquire a permit if available + * (reducing the available count by 1) or block if the number of available permits is 0. + * \ref sem_release() increases the number of available permits by one potentially unblocking a `sem_acquire` method. + * + * Note that \ref sem_release() may be called an arbitrary number of times, however the number of available + * permits is capped to the max_permit value specified during semaphore initialization. + * + * Although these semaphore related functions can be used from IRQ handlers, it is obviously preferable to only + * release semaphores from within an IRQ handler (i.e. avoid blocking) + */ + +#ifdef __cplusplus +extern "C" { +#endif +typedef struct __packed_aligned semaphore { + struct lock_core core; + int16_t permits; + int16_t max_permits; +} semaphore_t; + + +/*! \brief Initialise a semaphore structure + * \ingroup sem + * + * \param sem Pointer to semaphore structure + * \param initial_permits How many permits are initially acquired + * \param max_permits Total number of permits allowed for this semaphore + */ +void sem_init(semaphore_t *sem, int16_t initial_permits, int16_t max_permits); + +/*! \brief Return number of available permits on the semaphore + * \ingroup sem + * + * \param sem Pointer to semaphore structure + * \return The number of permits available on the semaphore. + */ +int sem_available(semaphore_t *sem); + +/*! \brief Release a permit on a semaphore + * \ingroup sem + * + * Increases the number of permits by one (unless the number of permits is already at the maximum). + * A blocked `sem_acquire` will be released if the number of permits is increased. + * + * \param sem Pointer to semaphore structure + * \return true if the number of permits available was increased. + */ +bool sem_release(semaphore_t *sem); + +/*! \brief Reset semaphore to a specific number of available permits + * \ingroup sem + * + * Reset value should be from 0 to the max_permits specified in the init function + * + * \param sem Pointer to semaphore structure + * \param permits the new number of available permits + */ +void sem_reset(semaphore_t *sem, int16_t permits); + +/*! \brief Acquire a permit from the semaphore + * \ingroup sem + * + * This function will block and wait if no permits are available. + * + * \param sem Pointer to semaphore structure + */ +void sem_acquire_blocking(semaphore_t *sem); + +/*! \brief Acquire a permit from a semaphore, with timeout + * \ingroup sem + * + * This function will block and wait if no permits are available, until the + * defined timeout has been reached. If the timeout is reached the function will + * return false, otherwise it will return true. + * + * \param sem Pointer to semaphore structure + * \param timeout_ms Time to wait to acquire the semaphore, in ms. + * \return false if timeout reached, true if permit was acquired. + */ +bool sem_acquire_timeout_ms(semaphore_t *sem, uint32_t timeout_ms); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sync.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sync.h new file mode 100644 index 0000000000..041bfd7ffc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/include/pico/sync.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_SYNC_H +#define _PICO_SYNC_H + +/** \file pico/sync.h + * \defgroup pico_sync pico_sync + * Synchronization primitives and mutual exclusion + */ + +#include "pico/sem.h" +#include "pico/mutex.h" +#include "pico/critical_section.h" + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/lock_core.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/lock_core.c new file mode 100644 index 0000000000..cf53a05c63 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/lock_core.c @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/lock_core.h" + +void lock_init(lock_core_t *core, uint lock_num) { + assert(lock_num >= 0 && lock_num < NUM_SPIN_LOCKS); + core->spin_lock = spin_lock_instance(lock_num); +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/mutex.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/mutex.c new file mode 100644 index 0000000000..e2771d9dd2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/mutex.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/mutex.h" +#include "pico/time.h" + +#if !PICO_NO_HARDWARE +static_assert(sizeof(mutex_t) == 8, ""); +#endif + +void mutex_init(mutex_t *mtx) { + lock_init(&mtx->core, next_striped_spin_lock_num()); + __mem_fence_release(); +} + +void __time_critical_func(mutex_enter_blocking)(mutex_t *mtx) { + assert(mtx->core.spin_lock); + bool block = true; + do { + uint32_t save = spin_lock_blocking(mtx->core.spin_lock); + if (!mtx->owned) { + mtx->owned = true; + mtx->owner = get_core_num(); + block = false; + } + spin_unlock(mtx->core.spin_lock, save); + if (block) { + __wfe(); + } + } while (block); +} + +bool __time_critical_func(mutex_try_enter)(mutex_t *mtx, uint32_t *owner_out) { + bool entered; + uint32_t save = spin_lock_blocking(mtx->core.spin_lock); + if (!mtx->owned) { + mtx->owned = true; + mtx->owner = get_core_num(); + entered = true; + } else { + if (owner_out) *owner_out = mtx->owner; + entered = false; + } + spin_unlock(mtx->core.spin_lock, save); + return entered; +} + +bool __time_critical_func(mutex_enter_timeout_ms)(mutex_t *mtx, uint32_t timeout_ms) { + return mutex_enter_block_until(mtx, make_timeout_time_ms(timeout_ms)); +} + +bool __time_critical_func(mutex_enter_block_until)(mutex_t *mtx, absolute_time_t until) { + assert(mtx->core.spin_lock); + bool block = true; + do { + uint32_t save = spin_lock_blocking(mtx->core.spin_lock); + if (!mtx->owned) { + mtx->owned = true; + mtx->owner = get_core_num(); + block = false; + } + spin_unlock(mtx->core.spin_lock, save); + if (block) { + if (best_effort_wfe_or_timeout(until)) { + return false; + } + } + } while (block); + return true; +} + +void __time_critical_func(mutex_exit)(mutex_t *mtx) { + uint32_t save = spin_lock_blocking(mtx->core.spin_lock); + assert(mtx->owned); + mtx->owned = 0; +#ifndef NDEBUG + mtx->owner = -1; +#endif + __sev(); + spin_unlock(mtx->core.spin_lock, save); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/sem.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/sem.c new file mode 100644 index 0000000000..4ed7285450 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_sync/sem.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/sem.h" +#include "pico/time.h" + +void sem_init(semaphore_t *sem, int16_t initial_permits, int16_t max_permits) { + lock_init(&sem->core, next_striped_spin_lock_num()); + sem->permits = initial_permits; + sem->max_permits = max_permits; + __mem_fence_release(); +} + +int __time_critical_func(sem_available)(semaphore_t *sem) { + return *(volatile typeof(sem->permits) *) &sem->permits; +} + +void __time_critical_func(sem_acquire_blocking)(semaphore_t *sem) { + bool block = true; + do { + uint32_t save = spin_lock_blocking(sem->core.spin_lock); + if (sem->permits > 0) { + sem->permits--; + __sev(); + block = false; + } + spin_unlock(sem->core.spin_lock, save); + if (block) { + __wfe(); + } + } while (block); +} + +bool __time_critical_func(sem_acquire_timeout_ms)(semaphore_t *sem, uint32_t timeout_ms) { + bool block = true; + absolute_time_t target = nil_time; + do { + uint32_t save = spin_lock_blocking(sem->core.spin_lock); + if (sem->permits > 0) { + sem->permits--; + __sev(); + block = false; + } + spin_unlock(sem->core.spin_lock, save); + if (block) { + if (is_nil_time(target)) { + target = make_timeout_time_ms(timeout_ms); + } + if (best_effort_wfe_or_timeout(target)) { + return false; + } + } + } while (block); + return true; +} + +// todo this should really have a blocking variant for when permits are maxed out +bool __time_critical_func(sem_release)(semaphore_t *sem) { + bool rc; + uint32_t save = spin_lock_blocking(sem->core.spin_lock); + int32_t count = sem->permits; + if (count < sem->max_permits) { + sem->permits = count + 1; + __sev(); + rc = true; + } else { + rc = false; + } + spin_unlock(sem->core.spin_lock, save); + return rc; +} + +void __time_critical_func(sem_reset)(semaphore_t *sem, int16_t permits) { + assert(permits >= 0 && permits <= sem->max_permits); + uint32_t save = spin_lock_blocking(sem->core.spin_lock); + if (permits > sem->permits) __sev(); + sem->permits = permits; + spin_unlock(sem->core.spin_lock, save); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/CMakeLists.txt new file mode 100644 index 0000000000..fe38855851 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/CMakeLists.txt @@ -0,0 +1,16 @@ +if (NOT TARGET pico_time_headers) + add_library(pico_time_headers INTERFACE) + + target_include_directories(pico_time_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + target_link_libraries(pico_time_headers INTERFACE hardware_timer) +endif() + +if (NOT TARGET pico_time) + add_library(pico_time INTERFACE) + + target_sources(pico_time INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/time.c + ${CMAKE_CURRENT_LIST_DIR}/timeout_helper.c) + target_link_libraries(pico_time INTERFACE pico_time_headers pico_sync pico_util) +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/time.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/time.h new file mode 100644 index 0000000000..a7a00b80e8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/time.h @@ -0,0 +1,692 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_TIME_H +#define _PICO_TIME_H + +#include "pico.h" +#include "hardware/timer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file time.h + * \defgroup pico_time pico_time + * + * API for accurate timestamps, sleeping, and time based callbacks + * + * \note The functions defined here provide a much more powerful and user friendly wrapping around the + * low level hardware timer functionality. For these functions (and any other Pico SDK functionality + * e.g. timeouts, that relies on them) to work correctly, the hardware timer should not be modified. i.e. it is expected + * to be monotonically increasing once per microsecond. Fortunately there is no need to modify the hardware + * timer as any functionality you can think of that isn't already covered here can easily be modelled + * by adding or subtracting a constant value from the unmodified hardware timer. + * + * \sa \ref hardware_timer + */ + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_TIME, Enable/disable assertions in the time module, type=bool, default=0, group=pico_time +#ifndef PARAM_ASSERTIONS_ENABLED_TIME +#define PARAM_ASSERTIONS_ENABLED_TIME 0 +#endif + +// PICO_CONFIG: PICO_TIME_SLEEP_OVERHEAD_ADJUST_US, How many microseconds to wake up early (and then busy_wait) to account for timer overhead when sleeping in low power mode, type=int, default=6, group=pico_time +#ifndef PICO_TIME_SLEEP_OVERHEAD_ADJUST_US +#define PICO_TIME_SLEEP_OVERHEAD_ADJUST_US 6 +#endif +/*! + * \defgroup timestamp timestamp + * \ingroup pico_time + * \brief Timestamp functions relating to points in time (including the current time) + * + * These are functions for dealing with timestamps (i.e. instants in time) represented by the type absolute_time_t. This opaque + * type is provided to help prevent accidental mixing of timestamps and relative time values. + */ + +/*! \brief Return a representation of the current time. + * \ingroup timestamp + * + * Returns an opaque high fidelity representation of the current time sampled during the call. + * + * \return the absolute time (now) of the hardware timer + * + * \sa absolute_time_t + * \sa sleep_until() + * \sa time_us_64() + */ +static inline absolute_time_t get_absolute_time() { + absolute_time_t t; + update_us_since_boot(&t, time_us_64()); + return t; +} + +static inline uint32_t us_to_ms(uint64_t us) { + if (us >> 32u) { + return (uint32_t)(us / 1000u); + } else { + return ((uint32_t)us) / 1000u; + } +} + +/*! fn to_ms_since_boot + * \ingroup timestamp + * \brief Convert a timestamp into a number of milliseconds since boot. + * \param t an absolute_time_t value to convert + * \return the number of microseconds since boot represented by t + * \sa to_us_since_boot + */ +static inline uint32_t to_ms_since_boot(absolute_time_t t) { + uint64_t us = to_us_since_boot(t); + return us_to_ms(us); +} + +/*! \brief Return a timestamp value obtained by adding a number of microseconds to another timestamp + * \ingroup timestamp + * + * \param t the base timestamp + * \param us the number of microseconds to add + * \return the timestamp representing the resulting time + */ +static inline absolute_time_t delayed_by_us(const absolute_time_t t, uint64_t us) { + absolute_time_t t2; + uint64_t base = to_us_since_boot(t); + uint64_t delayed = base + us; + if (delayed < base) { + delayed = (uint64_t)-1; + } + update_us_since_boot(&t2, delayed); + return t2; +} + +/*! \brief Return a timestamp value obtained by adding a number of milliseconds to another timestamp + * \ingroup timestamp + * + * \param t the base timestamp + * \param ms the number of milliseconds to add + * \return the timestamp representing the resulting time + */ +static inline absolute_time_t delayed_by_ms(const absolute_time_t t, uint32_t ms) { + absolute_time_t t2; + uint64_t base = to_us_since_boot(t); + uint64_t delayed = base + ms * 1000ull; + if (delayed < base) { + delayed = (uint64_t)-1; + } + update_us_since_boot(&t2, delayed); + return t2; +} + +/*! \brief Convenience method to get the timestamp a number of microseconds from the current time + * \ingroup timestamp + * + * \param us the number of microseconds to add to the current timestamp + * \return the future timestamp + */ +static inline absolute_time_t make_timeout_time_us(uint64_t us) { + return delayed_by_us(get_absolute_time(), us); +} + +/*! \brief Convenience method to get the timestamp a number of milliseconds from the current time + * \ingroup timestamp + * + * \param ms the number of milliseconds to add to the current timestamp + * \return the future timestamp + */ +static inline absolute_time_t make_timeout_time_ms(uint32_t ms) { + return delayed_by_ms(get_absolute_time(), ms); +} + +/*! \brief Return the difference in microseconds between two timestamps + * \ingroup timestamp + * + * \param from the first timestamp + * \param to the second timestamp + * \return the number of microseconds between the two timestamps (positive if `to` is after `from`) + */ +static inline int64_t absolute_time_diff_us(absolute_time_t from, absolute_time_t to) { + return to_us_since_boot(to) - to_us_since_boot(from); +} + +/*! \brief The timestamp representing the end of time; no timestamp is after this + * \ingroup timestamp + */ +extern const absolute_time_t at_the_end_of_time; + +/*! \brief The timestamp representing a null timestamp + * \ingroup timestamp + */ +extern const absolute_time_t nil_time; + +/*! \brief Determine if the given timestamp is nil + * \ingroup timestamp + * \param t the timestamp + * \return true if the timestamp is nil + * \sa nil_time() + */ +static inline bool is_nil_time(absolute_time_t t) { + return !to_us_since_boot(t); +} + +/*! + * \defgroup sleep sleep + * \ingroup pico_time + * \brief Sleep functions for delaying execution in a lower power state. + * + * These functions allow the calling core to sleep. This is a lower powered sleep; waking and re-checking time on every processor + * event (WFE) + * + * \note These functions should not be called from an IRQ handler. + * + * \note Lower powered sleep requires use of the \link alarm_pool_get_default default alarm pool\endlink which may + * be disabled by the #PICO_TIME_DEFAULT_ALARM_POOL_DISABLED define or currently full in which case these functions + * become busy waits instead. + * + * \note Whilst \a sleep_ functions are preferable to \a busy_wait functions from a power perspective, the \a busy_wait equivalent function + * may return slightly sooner after the target is reached. + * + * \sa busy_wait_until() \sa busy_wait_us() \sa busy_wait_us_32() + */ + +/*! \brief Wait until after the given timestamp to return + * \ingroup sleep + * + * \note This method attempts to perform a lower power (WFE) sleep + * + * \param target the time after which to return + * \sa sleep_us() + * \sa busy_wait_until() + * */ +void sleep_until(absolute_time_t target); + +/*! \brief Wait for the given number of microseconds before returning + * \ingroup sleep + * + * \note This method attempts to perform a lower power (WFE) sleep + * + * \param us the number of microseconds to sleep + * \sa busy_wait_us() + */ +void sleep_us(uint64_t us); + +/*! \brief Wait for the given number of milliseconds before returning + * \ingroup sleep + * + * \note This method attempts to perform a lower power sleep (using WFE) as much as possible. + * + * \param ms the number of milliseconds to sleep + */ +void sleep_ms(uint32_t ms); + +/*! \brief Helper method for blocking on a timeout + * \ingroup sleep + * + * This method will return in response to a an event (as per __wfe) or + * when the target time is reached, or at any point before. + * + * This method can be used to implement a lower power polling loop waiting on + * some condition signalled by an event (__sev()). + * + * This is called \a best_effort because under certain circumstances (notably the default timer pool + * being disabled or full) the best effort is simply to return immediately without a __wfe, thus turning the calling + * code into a busy wait. + * + * Example usage: + * ```c + * bool my_function_with_timeout_us(uint64_t timeout_us) { + * absolute_time_t timeout_time = make_timeout_time_us(timeout_us); + * do { + * // each time round the loop, we check to see if the condition + * // we are waiting on has happened + * if (my_check_done()) { + * // do something + * return true; + * } + * // will try to sleep until timeout or the next processor event + * } while (!best_effort_wfe_or_timeout(timeout_time)); + * return false; // timed out + * } + * ``` + * + * @param timeout_timestamp the timeout time + * @return true if the target time is reached, false otherwise + */ +bool best_effort_wfe_or_timeout(absolute_time_t timeout_timestamp); + +/*! + * \defgroup alarm alarm + * \ingroup pico_time + * \brief Alarm functions for scheduling future execution + * + * Alarms are added to alarm pools, which may hold a certain fixed number of active alarms. Each alarm pool + * utilizes one of four underlying hardware alarms, thus you may have up to four alarm pools. An alarm pool + * calls (except when the callback would happen before or during being set) the callback on the core from which + * the alarm pool was created. Callbacks are called from the hardware alarm IRQ handler, so care must + * be taken in their implementation. + * + * A default pool is created the core specified by PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM + * on core 0, and may be used by the method variants that take no alarm pool parameter. + * + * \sa struct alarm_pool + * \sa hardware_timer + */ + +// PICO_CONFIG: PICO_TIME_DEFAULT_ALARM_POOL_DISABLED, Disable the default alarm pool, type=bool, default=0, advanced=true, group=pico_time +#ifndef PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +/*! + * \brief If 1 then the default alarm pool is disabled (so no hardware alarm is claimed for the pool) + * + * \note Setting to 1 may cause some code not to compile as default timer pool related methods are removed + * + * \note When the default alarm pool is disabled, \a sleep_ methods and timeouts are no longer lower powered + * (they become \a busy_wait_) + * + * \ingroup alarm + * \sa #PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM + * \sa alarm_pool_get_default() + */ +#define PICO_TIME_DEFAULT_ALARM_POOL_DISABLED 0 +#endif + +// PICO_CONFIG: PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM, Select which HW alarm is used for the default alarm pool, min=0, max=3, default=3, advanced=true, group=pico_time +#ifndef PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM +/*! + * \brief Selects which hardware alarm is used for the default alarm pool + * \ingroup alarm + * \sa alarm_pool_get_default() + */ +#define PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM 3 +#endif + +// PICO_CONFIG: PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS, Selects the maximum number of concurrent timers in the default alarm pool, min=0, max=255, default=16, advanced=true, group=pico_time +#ifndef PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS +/*! + * \brief Selects the maximum number of concurrent timers in the default alarm pool + * \ingroup alarm + * + * \note For implementation reasons this is limited to PICO_PHEAP_MAX_ENTRIES which defaults to 255 + * \sa #PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM + * \sa alarm_pool_get_default() + */ +#define PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS 16 +#endif + +/** + * \brief The identifier for an alarm + * + * \note this identifier is signed because -1 is used as an error condition when creating alarms + * + * \note alarm ids may be reused, however for convenience the implementation makes an attempt to defer + * reusing as long as possible. You should certainly expect it to be hundreds of ids before one is + * reused, although in most cases it is more. Nonetheless care must still be taken when cancelling + * alarms or other functionality based on alarms when the alarm may have expired, as eventually + * the alarm id may be reused for another alarm. + * + * \ingroup alarm + */ +typedef int32_t alarm_id_t; // note this is signed because we use -1 as a meaningful error value + +/** + * \brief User alarm callback + * \ingroup alarm + * \param id the alarm_id as returned when the alarm was added + * \param user_data the user data passed when the alarm was added + * \return <0 to reschedule the same alarm this many us from the time the alarm was previously scheduled to fire + * \return >0 to reschedule the same alarm this many us from the time this method returns + * \return 0 to not reschedule the alarm + */ +typedef int64_t (*alarm_callback_t)(alarm_id_t id, void *user_data); + +typedef struct alarm_pool alarm_pool_t; + +/** + * \brief Create the default alarm pool (if not already created or disabled) + * \ingroup alarm + */ +void alarm_pool_init_default(); + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +/*! + * \brief The default alarm pool used when alarms are added without specifying an alarm pool, + * and also used by the Pico SDK to support lower power sleeps and timeouts. + * + * \ingroup alarm + * \sa #PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM + */ +alarm_pool_t *alarm_pool_get_default(); +#endif + +/** + * \brief Create an alarm pool + * + * The alarm pool will call callbacks from an alarm IRQ Handler on the core of this function is called from. + * + * In many situations there is never any need for anything other than the default alarm pool, however you + * might want to create another if you want alarm callbacks on core 1 or require alarm pools of + * different priority (IRQ priority based preemption of callbacks) + * + * \note This method will hard assert if the hardware alarm is already claimed. + * + * \ingroup alarm + * \param hardware_alarm_num the hardware alarm to use to back this pool + * \param max_timers the maximum number of timers + * \note For implementation reasons this is limited to PICO_PHEAP_MAX_ENTRIES which defaults to 255 + * \sa alarm_pool_get_default() + * \sa hardware_claiming + */ +alarm_pool_t *alarm_pool_create(uint hardware_alarm_num, uint max_timers); + +/** + * \brief Return the hardware alarm used by an alarm pool + * \ingroup alarm + * \param pool the pool + * \return the hardware alarm used by the pool + */ +uint alarm_pool_hardware_alarm_num(alarm_pool_t *pool); + +/** + * \brief Destroy the alarm pool, cancelling all alarms and freeing up the underlying hardware alarm + * \ingroup alarm + * \param pool the pool + * \return the hardware alarm used by the pool + */ +void alarm_pool_destroy(alarm_pool_t *pool); + +/*! + * \brief Add an alarm callback to be called at a specific time + * \ingroup alarm + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core the alarm pool was created on. If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param pool the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) + * @param time the timestamp when (after which) the callback should fire + * @param callback the callback function + * @param user_data user data to pass to the callback function + * @param fire_if_past if true, this method will call the callback itself before returning 0 if the timestamp happens before or during this method call + * @return >0 the alarm id + * @return 0 the target timestamp was during or before this method call (whether the callback was called depends on fire_if_past) + * @return -1 if there were no alarm slots available + */ +alarm_id_t alarm_pool_add_alarm_at(alarm_pool_t *pool, absolute_time_t time, alarm_callback_t callback, void *user_data, bool fire_if_past); + +/*! + * \brief Add an alarm callback to be called after a delay specified in microseconds + * \ingroup alarm + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core the alarm pool was created on. If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param pool the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) + * @param us the delay (from now) in microseconds when (after which) the callback should fire + * @param callback the callback function + * @param user_data user data to pass to the callback function + * @param fire_if_past if true, this method will call the callback itself before returning 0 if the timestamp happens before or during this method call + * @return >0 the alarm id + * @return 0 the target timestamp was during or before this method call (whether the callback was called depends on fire_if_past) + * @return -1 if there were no alarm slots available + */ +static inline alarm_id_t alarm_pool_add_alarm_in_us(alarm_pool_t *pool, uint64_t us, alarm_callback_t callback, void *user_data, bool fire_if_past) { + return alarm_pool_add_alarm_at(pool, delayed_by_us(get_absolute_time(), us), callback, user_data, fire_if_past); +} + +/*! + * \brief Add an alarm callback to be called after a delay specified in milliseconds + * \ingroup alarm + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core the alarm pool was created on. If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param pool the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) + * @param ms the delay (from now) in milliseconds when (after which) the callback should fire + * @param callback the callback function + * @param user_data user data to pass to the callback function + * @param fire_if_past if true, this method will call the callback itself before returning 0 if the timestamp happens before or during this method call + * @return >0 the alarm id + * @return 0 the target timestamp was during or before this method call (whether the callback was called depends on fire_if_past) + * @return -1 if there were no alarm slots available + */ +static inline alarm_id_t alarm_pool_add_alarm_in_ms(alarm_pool_t *pool, uint32_t ms, alarm_callback_t callback, void *user_data, bool fire_if_past) { + return alarm_pool_add_alarm_at(pool, delayed_by_ms(get_absolute_time(), ms), callback, user_data, fire_if_past); +} + +/*! + * \brief Cancel an alarm + * \ingroup alarm + * \param pool the alarm_pool containing the alarm + * \param alarm_id the alarm + * \return true if the alarm was cancelled, false if it didn't exist + * \sa alarm_id_t for a note on reuse of IDs + */ +bool alarm_pool_cancel_alarm(alarm_pool_t *pool, alarm_id_t alarm_id); + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +/*! + * \brief Add an alarm callback to be called at a specific time + * \ingroup alarm + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param time the timestamp when (after which) the callback should fire + * @param callback the callback function + * @param user_data user data to pass to the callback function + * @param fire_if_past if true, this method will call the callback itself before returning 0 if the timestamp happens before or during this method call + * @return >0 the alarm id + * @return 0 the target timestamp was during or before this method call (whether the callback was called depends on fire_if_past) + * @return -1 if there were no alarm slots available + */ +static inline alarm_id_t add_alarm_at(absolute_time_t time, alarm_callback_t callback, void *user_data, bool fire_if_past) { + return alarm_pool_add_alarm_at(alarm_pool_get_default(), time, callback, user_data, fire_if_past); +} + +/*! + * \brief Add an alarm callback to be called after a delay specified in microseconds + * \ingroup alarm + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param us the delay (from now) in microseconds when (after which) the callback should fire + * @param callback the callback function + * @param user_data user data to pass to the callback function + * @param fire_if_past if true, this method will call the callback itself before returning 0 if the timestamp happens before or during this method call + * @return >0 the alarm id + * @return 0 the target timestamp was during or before this method call (whether the callback was called depends on fire_if_past) + * @return -1 if there were no alarm slots available + */ +static inline alarm_id_t add_alarm_in_us(uint64_t us, alarm_callback_t callback, void *user_data, bool fire_if_past) { + return alarm_pool_add_alarm_in_us(alarm_pool_get_default(), us, callback, user_data, fire_if_past); +} + +/*! + * \brief Add an alarm callback to be called after a delay specified in milliseconds + * \ingroup alarm + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param ms the delay (from now) in milliseconds when (after which) the callback should fire + * @param callback the callback function + * @param user_data user data to pass to the callback function + * @param fire_if_past if true, this method will call the callback itself before returning 0 if the timestamp happens before or during this method call + * @return >0 the alarm id + * @return 0 the target timestamp was during or before this method call (whether the callback was called depends on fire_if_past) + * @return -1 if there were no alarm slots available + */ +static inline alarm_id_t add_alarm_in_ms(uint32_t ms, alarm_callback_t callback, void *user_data, bool fire_if_past) { + return alarm_pool_add_alarm_in_ms(alarm_pool_get_default(), ms, callback, user_data, fire_if_past); +} +/*! + * \brief Cancel an alarm from the default alarm pool + * \ingroup alarm + * \param alarm_id the alarm + * \return true if the alarm was cancelled, false if it didn't exist + * \sa alarm_id_t for a note on reuse of IDs + */ +static inline bool cancel_alarm(alarm_id_t alarm_id) { + return alarm_pool_cancel_alarm(alarm_pool_get_default(), alarm_id); +} + +#endif + +/*! + * \defgroup repeating_timer repeating_timer + * \ingroup pico_time + * \brief Repeating Timer functions for simple scheduling of repeated execution + * + * \note The regular \a alarm_ functionality can be used to make repeating alarms (by return non zero from the callback), + * however these methods abstract that further (at the cost of a user structure to store the repeat delay in (which + * the alarm framework does not have space for). + */ + +typedef struct repeating_timer repeating_timer_t; + +/** + * \brief Callback for a repeating timer + * \ingroup repeating_timer + * \param rt repeating time structure containing information about the repeating time. user_data is of primary important to the user + * \return true to continue repeating, false to stop. + */ +typedef bool (*repeating_timer_callback_t)(repeating_timer_t *rt); + +/** + * \brief Information about a repeating timer + * \ingroup repeating_timer + * \return + */ +struct repeating_timer { + int64_t delay_us; + alarm_pool_t *pool; + alarm_id_t alarm_id; + repeating_timer_callback_t callback; + void *user_data; +}; + +/*! + * \brief Add a repeating timer that is called repeatedly at the specified interval in microseconds + * \ingroup repeating_timer + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core the alarm pool was created on. If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param pool the alarm pool to use for scheduling the repeating timer (this determines which hardware alarm is used, and which core calls the callback) + * @param delay_us the repeat delay in microseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 + * @param callback the repeating timer callback function + * @param user_data user data to pass to store in the repeating_timer structure for use by the callback. + * @param out the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space + * @return false if there were no alarm slots available to create the timer, true otherwise. + */ +bool alarm_pool_add_repeating_timer_us(alarm_pool_t *pool, int64_t delay_us, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out); + +/*! + * \brief Add a repeating timer that is called repeatedly at the specified interval in milliseconds + * \ingroup repeating_timer + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core the alarm pool was created on. If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param pool the alarm pool to use for scheduling the repeating timer (this determines which hardware alarm is used, and which core calls the callback) + * @param delay_ms the repeat delay in milliseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 microsecond + * @param callback the repeating timer callback function + * @param user_data user data to pass to store in the repeating_timer structure for use by the callback. + * @param out the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space + * @return false if there were no alarm slots available to create the timer, true otherwise. + */ +static inline bool alarm_pool_add_repeating_timer_ms(alarm_pool_t *pool, int32_t delay_ms, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out) { + return alarm_pool_add_repeating_timer_us(pool, delay_ms * (int64_t)1000, callback, user_data, out); +} + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +/*! + * \brief Add a repeating timer that is called repeatedly at the specified interval in microseconds + * \ingroup repeating_timer + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param delay_us the repeat delay in microseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 + * @param callback the repeating timer callback function + * @param user_data user data to pass to store in the repeating_timer structure for use by the callback. + * @param out the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space + * @return false if there were no alarm slots available to create the timer, true otherwise. + */ +static inline bool add_repeating_timer_us(int64_t delay_us, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out) { + return alarm_pool_add_repeating_timer_us(alarm_pool_get_default(), delay_us, callback, user_data, out); +} + +/*! + * \brief Add a repeating timer that is called repeatedly at the specified interval in milliseconds + * \ingroup repeating_timer + * + * Generally the callback is called as soon as possible after the time specified from an IRQ handler + * on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before + * the alarm setup could be completed, then this method will optionally call the callback itself + * and then return a return code to indicate that the target time has passed. + * + * \note It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core. + * + * @param delay_ms the repeat delay in milliseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 microsecond + * @param callback the repeating timer callback function + * @param user_data user data to pass to store in the repeating_timer structure for use by the callback. + * @param out the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space + * @return false if there were no alarm slots available to create the timer, true otherwise. + */ +static inline bool add_repeating_timer_ms(int32_t delay_ms, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out) { + return alarm_pool_add_repeating_timer_us(alarm_pool_get_default(), delay_ms * (int64_t)1000, callback, user_data, out); +} +#endif + +/** + * \brief Cancel a repeating timer + * \ingroup repeating_timer + * \param timer the repeating timer to cancel + * \return true if the repeating timer was cancelled, false if it didn't exist + * \sa alarm_id_t for a note on reuse of IDs + */ +bool cancel_repeating_timer(repeating_timer_t *timer); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/timeout_helper.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/timeout_helper.h new file mode 100644 index 0000000000..e757f73058 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/include/pico/timeout_helper.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_TIMEOUT_HELPER_H +#define _PICO_TIMEOUT_HELPER_H + +#include "pico/time.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct timeout_state { + absolute_time_t next_timeout; + uint64_t param; +} timeout_state_t; + +typedef bool (*check_timeout_fn)(timeout_state_t *ts); + +check_timeout_fn init_single_timeout_until(timeout_state_t *ts, absolute_time_t target); +check_timeout_fn init_per_iteration_timeout_us(timeout_state_t *ts, uint64_t per_iteration_timeout_us); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/time.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/time.c new file mode 100644 index 0000000000..8a5df427ca --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/time.c @@ -0,0 +1,361 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include "pico.h" +#include "pico/time.h" +#include "pico/util/pheap.h" +#include "hardware/sync.h" +#include "hardware/gpio.h" + +CU_REGISTER_DEBUG_PINS(core) +CU_SELECT_DEBUG_PINS(core) + +const absolute_time_t ABSOLUTE_TIME_INITIALIZED_VAR(nil_time, 0); +// use LONG_MAX not ULONG_MAX so we don't have sign overflow in time diffs +const absolute_time_t ABSOLUTE_TIME_INITIALIZED_VAR(at_the_end_of_time, ULONG_MAX); + +typedef struct alarm_pool_entry { + absolute_time_t target; + alarm_callback_t callback; + void *user_data; +} alarm_pool_entry_t; + +typedef struct alarm_pool { + pheap_t *heap; + spin_lock_t *lock; + alarm_pool_entry_t *entries; + // one byte per entry, used to provide more longevity to public IDs than heap node ids do + // (this is increment every time the heap node id is re-used) + uint8_t *entry_ids_high; + alarm_id_t alarm_in_progress; // this is set during a callback from the IRQ handler... it can be cleared by alarm_cancel to prevent repeats + uint8_t hardware_alarm_num; +} alarm_pool_t; + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +static alarm_pool_t *default_alarm_pool; +#endif +static alarm_pool_t *pools[NUM_TIMERS]; + +void alarm_pool_init_default() { +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + // allow multiple calls for ease of use from host tests + if (!default_alarm_pool) { + default_alarm_pool = alarm_pool_create(PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM, + PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS); + } +#endif +} + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +alarm_pool_t *alarm_pool_get_default() { + assert(default_alarm_pool); + return default_alarm_pool; +} +#endif + +static inline alarm_pool_entry_t *get_entry(alarm_pool_t *pool, pheap_node_id_t id) { + assert(id && id <= pool->heap->max_nodes); + return pool->entries + id - 1; +} + +static inline uint8_t *get_entry_id_high(alarm_pool_t *pool, pheap_node_id_t id) { + assert(id && id <= pool->heap->max_nodes); + return pool->entry_ids_high + id - 1; +} + +bool timer_pool_entry_comparator(void *user_data, pheap_node_id_t a, pheap_node_id_t b) { + alarm_pool_t *pool = (alarm_pool_t *)user_data; + return to_us_since_boot(get_entry(pool, a)->target) < to_us_since_boot(get_entry(pool, b)->target); +} + +static inline alarm_id_t make_public_id(uint8_t id_high, pheap_node_id_t id) { + return ((uint)id_high << 8u * sizeof(id)) | id; +} + +static alarm_id_t add_alarm_under_lock(alarm_pool_t *pool, absolute_time_t time, alarm_callback_t callback, + void *user_data, alarm_id_t reuse_id, bool create_if_past, bool *missed) { + alarm_id_t id; + if (reuse_id) { + assert(!ph_contains(pool->heap, reuse_id)); + id = reuse_id; + } else { + id = ph_new_node(pool->heap); + } + if (id) { + alarm_pool_entry_t *entry = get_entry(pool, id); + entry->target = time; + entry->callback = callback; + entry->user_data = user_data; + DEBUG_PINS_SET(core, 1); + if (id == ph_insert(pool->heap, id)) { + bool is_missed = hardware_alarm_set_target(pool->hardware_alarm_num, time); + if (is_missed && !create_if_past) { + ph_delete(pool->heap, id); + } + if (missed) *missed = is_missed; + } + } + return id; +} + +static void alarm_pool_alarm_callback(uint alarm_num) { + // note this is called from timer IRQ handler + alarm_pool_t *pool = pools[alarm_num]; + bool again; + do { + absolute_time_t now = get_absolute_time(); + alarm_callback_t callback = NULL; + absolute_time_t target = nil_time; + void *user_data = NULL; + uint8_t id_high; + again = false; + uint32_t save = spin_lock_blocking(pool->lock); + pheap_node_id_t next_id = ph_peek_head(pool->heap); + if (next_id) { + alarm_pool_entry_t *entry = get_entry(pool, next_id); + if (absolute_time_diff_us(now, entry->target) <= 0) { + // we reserve the id in case we need to re-add the timer + pheap_node_id_t __unused removed_id = ph_remove_head_reserve(pool->heap, true); + assert(removed_id == next_id); // will be true under lock + target = entry->target; + callback = entry->callback; + user_data = entry->user_data; + assert(callback); + id_high = *get_entry_id_high(pool, next_id); + pool->alarm_in_progress = make_public_id(id_high, removed_id); + } else { + if (hardware_alarm_set_target(alarm_num, entry->target)) { + again = true; + } + } + } + spin_unlock(pool->lock, save); + if (callback) { + DEBUG_PINS_SET(core, 4); + DEBUG_PINS_CLR(core, 1); + DEBUG_PINS_CLR(core, 4); + int64_t repeat = callback(make_public_id(id_high, next_id), user_data); + save = spin_lock_blocking(pool->lock); + // todo think more about whether we want to keep calling + if (repeat < 0 && pool->alarm_in_progress) { + assert(pool->alarm_in_progress == make_public_id(id_high, next_id)); + add_alarm_under_lock(pool, delayed_by_us(target, -repeat), callback, user_data, next_id, true, NULL); + } else if (repeat > 0 && pool->alarm_in_progress) { + assert(pool->alarm_in_progress == make_public_id(id_high, next_id)); + add_alarm_under_lock(pool, delayed_by_us(get_absolute_time(), repeat), callback, user_data, next_id, + true, NULL); + } else { + // need to return the id to the heap + ph_add_to_free_list(pool->heap, next_id); + (*get_entry_id_high(pool, next_id))++; // we bump it for next use of id + } + pool->alarm_in_progress = 0; + spin_unlock(pool->lock, save); + again = true; + } + } while (again); +} + +// note the timer is create with IRQs on this core +alarm_pool_t *alarm_pool_create(uint hardware_alarm_num, uint max_timers) { + hardware_alarm_claim(hardware_alarm_num); + hardware_alarm_cancel(hardware_alarm_num); + hardware_alarm_set_callback(hardware_alarm_num, alarm_pool_alarm_callback); + alarm_pool_t *pool = (alarm_pool_t *)malloc(sizeof(alarm_pool_t)); + pool->lock = spin_lock_instance(next_striped_spin_lock_num()); + pool->heap = ph_create(max_timers, timer_pool_entry_comparator, pool); + pool->entries = (alarm_pool_entry_t *)calloc(max_timers, sizeof(alarm_pool_entry_t)); + pool->entry_ids_high = (uint8_t *)calloc(max_timers, sizeof(uint8_t)); + pool->hardware_alarm_num = hardware_alarm_num; + pools[hardware_alarm_num] = pool; + return pool; +} + +void alarm_pool_destroy(alarm_pool_t *pool) { + assert(pools[pool->hardware_alarm_num] == pool); + pools[pool->hardware_alarm_num] = NULL; + // todo clear out timers + ph_destroy(pool->heap); + hardware_alarm_set_callback(pool->hardware_alarm_num, NULL); + hardware_alarm_unclaim(pool->hardware_alarm_num); + free(pool->entry_ids_high); + free(pool->entries); + free(pool); +} + +alarm_id_t alarm_pool_add_alarm_at(alarm_pool_t *pool, absolute_time_t time, alarm_callback_t callback, + void *user_data, bool fire_if_past) { + bool missed = false; + + uint public_id; + do { + uint8_t id_high = 0; + uint32_t save = spin_lock_blocking(pool->lock); + pheap_node_id_t id = add_alarm_under_lock(pool, time, callback, user_data, 0, false, &missed); + if (id) id_high = *get_entry_id_high(pool, id); + + spin_unlock(pool->lock, save); + + if (!id) { + return -1; + } + + public_id = missed ? 0 : make_public_id(id_high, id); + if (missed && fire_if_past) { + int64_t repeat = callback(public_id, user_data); + if (!repeat) { + public_id = 0; + break; + } else if (repeat < 0) { + time = delayed_by_us(time, -repeat); + } else { + time = delayed_by_us(get_absolute_time(), repeat); + } + } else { + break; + } + } while (true); + return public_id; +} + +bool alarm_pool_cancel_alarm(alarm_pool_t *pool, alarm_id_t alarm_id) { + bool rc = false; + uint32_t save = spin_lock_blocking(pool->lock); + pheap_node_id_t id = (pheap_node_id_t) alarm_id; + if (ph_contains(pool->heap, id)) { + assert(alarm_id != pool->alarm_in_progress); // it shouldn't be in the heap if it is in progress + // check we have the right high value + uint8_t id_high = (uint8_t)((uint)alarm_id >> 8u * sizeof(pheap_node_id_t)); + if (id_high == *get_entry_id_high(pool, id)) { + rc = ph_delete(pool->heap, id); + // note we don't bother to remove the actual hardware alarm timeout... + // it will either do callbacks or not depending on other alarms, and reset the next timeout itself + assert(rc); + } + } else { + if (alarm_id == pool->alarm_in_progress) { + // make sure the alarm doesn't repeat + pool->alarm_in_progress = 0; + } + } + spin_unlock(pool->lock, save); + return rc; +} + +uint alarm_pool_hardware_alarm_num(alarm_pool_t *pool) { + return pool->hardware_alarm_num; +} + +static void alarm_pool_dump_key(pheap_node_id_t id, void *user_data) { + alarm_pool_t *pool = (alarm_pool_t *)user_data; +#if PICO_ON_DEVICE + printf("%lld (hi %02x)", to_us_since_boot(get_entry(pool, id)->target), *get_entry_id_high(pool, id)); +#else + printf("%ld", to_us_since_boot(get_entry(pool, id)->target)); +#endif +} + +static int64_t repeating_timer_callback(alarm_id_t id, void *user_data) { + repeating_timer_t *rt = (repeating_timer_t *)user_data; + if (rt->callback(rt)) { + return rt->delay_us; + } else { + rt->alarm_id = 0; + return 0; + } +} + +bool alarm_pool_add_repeating_timer_us(alarm_pool_t *pool, int64_t delay_us, repeating_timer_callback_t callback, void *user_data, repeating_timer_t *out) { + if (!delay_us) delay_us = 1; + out->pool = pool; + out->callback = callback; + out->delay_us = delay_us; + out->user_data = user_data; + out->alarm_id = alarm_pool_add_alarm_at(pool, make_timeout_time_us(delay_us >= 0 ? delay_us : -delay_us), repeating_timer_callback, out, true); + return out->alarm_id > 0; +} + +bool cancel_repeating_timer(repeating_timer_t *timer) { + bool rc = false; + if (timer->alarm_id) { + rc = alarm_pool_cancel_alarm(timer->pool, timer->alarm_id); + timer->alarm_id = 0; + } + return rc; +} + +void alarm_pool_dump(alarm_pool_t *pool) { + uint32_t save = spin_lock_blocking(pool->lock); + ph_dump(pool->heap, alarm_pool_dump_key, pool); + spin_unlock(pool->lock, save); +} + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED +static int64_t sev_callback(alarm_id_t id, void *user_data) { + __sev(); + return 0; +} +#endif + +void sleep_until(absolute_time_t t) { +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + uint64_t t_us = to_us_since_boot(t); + uint64_t t_before_us = t_us - PICO_TIME_SLEEP_OVERHEAD_ADJUST_US; + // needs to work in the first PICO_TIME_SLEEP_OVERHEAD_ADJUST_US of boot + if (t_before_us > t_us) t_before_us = 0; + absolute_time_t t_before; + update_us_since_boot(&t_before, t_before_us); + if (absolute_time_diff_us(get_absolute_time(), t_before) > 0) { + if (add_alarm_at(t_before, sev_callback, NULL, false) >= 0) { + // able to add alarm for just before the time + while (!time_reached(t_before)) { + __wfe(); + } + } + } +#endif + // now wait until the exact time + busy_wait_until(t); +} + +void sleep_us(uint64_t us) { +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + sleep_until(make_timeout_time_us(us)); +#else + if (us >> 32u) { + busy_wait_until(make_timeout_time_us(us)); + } else { + busy_wait_us_32(us); + } +#endif + +} + +void sleep_ms(uint32_t ms) { + sleep_us(ms * 1000ull); +} + +bool best_effort_wfe_or_timeout(absolute_time_t timeout_timestamp) { +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + alarm_id_t id; + id = add_alarm_at(timeout_timestamp, sev_callback, NULL, false); + if (id <= 0) { + tight_loop_contents(); + return time_reached(timeout_timestamp); + } else { + __wfe(); + // we need to clean up if it wasn't us that caused the wfe; if it was this will be a noop. + cancel_alarm(id); + return time_reached(timeout_timestamp); + } +#else + tight_loop_contents(); + return time_reached(timeout_timestamp); +#endif +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/timeout_helper.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/timeout_helper.c new file mode 100644 index 0000000000..d9abe5a33b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_time/timeout_helper.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/timeout_helper.h" + +static bool check_single_timeout_us(timeout_state_t *ts) { + return time_reached(ts->next_timeout); +} + +check_timeout_fn init_single_timeout_until(timeout_state_t *ts, absolute_time_t target) { + ts->next_timeout = target; + return check_single_timeout_us; +} + +static bool check_per_iteration_timeout_us(timeout_state_t *ts) { + if (time_reached(ts->next_timeout)) { + return true; + } + ts->next_timeout = make_timeout_time_us(ts->param); + return false; +} + +check_timeout_fn init_per_iteration_timeout_us(timeout_state_t *ts, uint64_t per_iteration_timeout_us) { + ts->next_timeout = make_timeout_time_us(per_iteration_timeout_us); + ts->param = per_iteration_timeout_us; + return check_per_iteration_timeout_us; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/CMakeLists.txt new file mode 100644 index 0000000000..a829c14e94 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/CMakeLists.txt @@ -0,0 +1,15 @@ +if (NOT TARGET pico_util_headers) + add_library(pico_util_headers INTERFACE) + target_include_directories(pico_util_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + target_link_libraries(pico_util_headers INTERFACE pico_base_headers hardware_sync) +endif() + +if (NOT TARGET pico_util) + add_library(pico_util INTERFACE) + target_sources(pico_util INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/datetime.c + ${CMAKE_CURRENT_LIST_DIR}/pheap.c + ${CMAKE_CURRENT_LIST_DIR}/queue.c + ) + target_link_libraries(pico_util INTERFACE pico_util_headers) +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/datetime.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/datetime.c new file mode 100644 index 0000000000..e035515d37 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/datetime.c @@ -0,0 +1,41 @@ +#include "pico/util/datetime.h" + +#include + +static const char *DATETIME_MONTHS[12] = { + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +}; + +static const char *DATETIME_DOWS[7] = { + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", +}; + +void datetime_to_str(char *buf, uint buf_size, const datetime_t *t) { + snprintf(buf, + buf_size, + "%s %d %s %d:%02d:%02d %d", + DATETIME_DOWS[t->dotw], + t->day, + DATETIME_MONTHS[t->month - 1], + t->hour, + t->min, + t->sec, + t->year); +}; \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/doc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/doc.h new file mode 100644 index 0000000000..4485b5d5ff --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/doc.h @@ -0,0 +1,4 @@ +/** + * \defgroup pico_util pico_util + * \brief Useful data structures and utility functions + */ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/datetime.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/datetime.h new file mode 100644 index 0000000000..61b5c7e923 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/datetime.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_DATETIME_H +#define _PICO_DATETIME_H + +#include "pico.h" + +/** \file datetime.h + * \defgroup util_datetime datetime + * \brief Date/Time formatting + * \ingroup pico_util + */ + +/*! \brief Convert a datetime_t structure to a string + * \ingroup util_datetime + * + * \param buf character buffer to accept generated string + * \param buf_size The size of the passed in buffer + * \param t The datetime to be converted. + */ +void datetime_to_str(char *buf, uint buf_size, const datetime_t *t); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/pheap.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/pheap.h new file mode 100644 index 0000000000..59617e7def --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/pheap.h @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_UTIL_PHEAP_H +#define _PICO_UTIL_PHEAP_H + +#include "pico.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_PHEAP, Enable/disable assertions in the pheap module, type=bool, default=0, group=pico_util +#ifndef PARAM_ASSERTIONS_ENABLED_PHEAP +#define PARAM_ASSERTIONS_ENABLED_PHEAP 0 +#endif + +/** + * \file pheap.h + * \defgroup util_pheap pheap + * Pairing Heap Implementation + * \ingroup pico_util + * + * pheap defines a simple pairing heap. the implementation simply tracks array indexes, it is up to + * the user to provide storage for heap entries and a comparison function. + * + * NOTE: this class is not safe for concurrent usage. It should be externally protected. Furthermore + * if used concurrently, the caller needs to protect around their use of the returned id. + * for example, ph_remove_head returns the id of an element that is no longer in the heap. + * + * The user can still use this to look at the data in their companion array, however obviously further operations + * on the heap may cause them to overwrite that data as the id may be reused on subsequent operations + * + */ +// PICO_CONFIG: PICO_PHEAP_MAX_ENTRIES, Maximum number of entries in the pheap, min=1, max=65534, default=255, group=pico_util +#ifndef PICO_PHEAP_MAX_ENTRIES +#define PICO_PHEAP_MAX_ENTRIES 255 +#endif + +// public heap_node ids are numbered from 1 (0 means none) +#if PICO_PHEAP_MAX_ENTRIES < 256 +typedef uint8_t pheap_node_id_t; +#elif PICO_PHEAP_MAX_ENTRIES < 65535 +typedef uint16_t pheap_node_id_t; +#else +#error invalid PICO_PHEAP_MAX_ENTRIES +#endif + +typedef struct pheap_node { + pheap_node_id_t child, sibling, parent; +} pheap_node_t; + +// return true if a < b in natural order +typedef bool (*pheap_comparator)(void *user_data, pheap_node_id_t a, pheap_node_id_t b); + +typedef struct pheap { + pheap_node_t *nodes; + pheap_comparator comparator; + void *user_data; + pheap_node_id_t max_nodes; + pheap_node_id_t root_id; + // we remove from head and add to tail to stop reusing the same ids + pheap_node_id_t free_head_id; + pheap_node_id_t free_tail_id; +} pheap_t; + +pheap_t *ph_create(uint max_nodes, pheap_comparator comparator, void *user_data); + +void ph_clear(pheap_t *heap); + +void ph_destroy(pheap_t *heap); + +static inline pheap_node_t *ph_get_node(pheap_t *heap, pheap_node_id_t id) { + assert(id && id <= heap->max_nodes); + return heap->nodes + id - 1; +} + +static void ph_add_child_node(pheap_t *heap, pheap_node_id_t parent_id, pheap_node_id_t child_id) { + pheap_node_t *n = ph_get_node(heap, parent_id); + assert(parent_id); + assert(child_id); + assert(parent_id != child_id); + pheap_node_t *c = ph_get_node(heap, child_id); + c->parent = parent_id; + if (!n->child) { + n->child = child_id; + } else { + c->sibling = n->child; + n->child = child_id; + } +} + +static pheap_node_id_t ph_merge_nodes(pheap_t *heap, pheap_node_id_t a, pheap_node_id_t b) { + if (!a) return b; + if (!b) return a; + if (heap->comparator(heap->user_data, a, b)) { + ph_add_child_node(heap, a, b); + return a; + } else { + ph_add_child_node(heap, b, a); + return b; + } +} + +static inline pheap_node_id_t ph_new_node(pheap_t *heap) { + if (!heap->free_head_id) return 0; + pheap_node_id_t id = heap->free_head_id; + heap->free_head_id = ph_get_node(heap, id)->sibling; + if (!heap->free_head_id) heap->free_tail_id = 0; + return id; +} + +// note this will callback the comparator for the node +// returns the (new) root of the heap +static inline pheap_node_id_t ph_insert(pheap_t *heap, pheap_node_id_t id) { + assert(id); + pheap_node_t *hn = ph_get_node(heap, id); + hn->child = hn->sibling = hn->parent = 0; + heap->root_id = ph_merge_nodes(heap, heap->root_id, id); + return heap->root_id; +} + +static inline pheap_node_id_t ph_peek_head(pheap_t *heap) { + return heap->root_id; +} + +pheap_node_id_t ph_remove_head_reserve(pheap_t *heap, bool reserve); + +static inline pheap_node_id_t ph_remove_head(pheap_t *heap) { + return ph_remove_head_reserve(heap, false); +} + +static inline bool ph_contains(pheap_t *heap, pheap_node_id_t id) { + return id == heap->root_id || ph_get_node(heap, id)->parent; +} + +bool ph_delete(pheap_t *heap, pheap_node_id_t id); + +static inline void ph_add_to_free_list(pheap_t *heap, pheap_node_id_t id) { + assert(id && !ph_contains(heap, id)); + if (heap->free_tail_id) { + ph_get_node(heap, heap->free_tail_id)->sibling = id; + } + heap->free_tail_id = id; +} + +void ph_dump(pheap_t *heap, void (*dump_key)(pheap_node_id_t, void *), void *user_data); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/queue.h b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/queue.h new file mode 100644 index 0000000000..d65548eaa7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/include/pico/util/queue.h @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _UTIL_QUEUE_H +#define _UTIL_QUEUE_H + +#include "pico.h" +#include "hardware/sync.h" + +/** \file queue.h + * \defgroup queue queue + * Multi-core and IRQ safe queue implementation. + * + * Note that this queue stores values of a specified size, and pushed values are copied into the queue + * \ingroup pico_util + */ + +typedef struct { + spin_lock_t *lock; + uint8_t *data; + uint16_t wptr; + uint16_t rptr; + uint16_t element_size; + uint16_t element_count; +} queue_t; + +/*! \brief Initialise a queue with a specific spinlock for concurrency protection + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param element_size Size of each value in the queue + * \param element_count Maximum number of entries in the queue + * \param spinlock_num The spin ID used to protect the queue + */ +void queue_init_with_spinlock(queue_t *q, uint element_size, uint element_count, uint spinlock_num); + +/*! \brief Initialise a queue, allocating a (possibly shared) spinlock + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param element_size Size of each value in the queue + * \param element_count Maximum number of entries in the queue + */ +static inline void queue_init(queue_t *q, uint element_size, uint element_count) { + return queue_init_with_spinlock(q, element_size, element_count, next_striped_spin_lock_num()); +} + +/*! \brief Destroy the specified queue. + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * + * Does not deallocate the queue_t structure itself. + */ +void queue_free(queue_t *q); + +/*! \brief Unsafe check of level of the specified queue. + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \return Number of entries in the queue + * + * This does not use the spinlock, so may return incorrect results if the + * spin lock is not externally locked + */ +static inline uint queue_get_level_unsafe(queue_t *q) { + int32_t rc = (int32_t)q->wptr - (int32_t)q->rptr; + if (rc < 0) { + rc += + q->element_count + 1; + } + return rc; +} + +/*! \brief Check of level of the specified queue. + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \return Number of entries in the queue + */ +static inline uint queue_get_level(queue_t *q) { + uint32_t save = spin_lock_blocking(q->lock); + uint level = queue_get_level_unsafe(q); + spin_unlock(q->lock, save); + return level; +} + +/*! \brief Check if queue is empty + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \return true if queue is empty, false otherwise + * + * This function is interrupt and multicore safe. + */ +static inline bool queue_is_empty(queue_t *q) { + return queue_get_level(q) == 0; +} + +/*! \brief Check if queue is full + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \return true if queue is full, false otherwise + * + * This function is interrupt and multicore safe. + */ +static inline bool queue_is_full(queue_t *q) { + return queue_get_level(q) == q->element_count; +} + +// nonblocking queue access functions: + +/*! \brief Non-blocking add value queue if not full + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param data Pointer to value to be copied into the queue + * \return true if the value was added + * + * If the queue is full this function will return immediately with false, otherwise + * the data is copied into a new value added to the queue, and this function will return true. + */ +bool queue_try_add(queue_t *q, void *data); + +/*! \brief Non-blocking removal of entry from the queue if non empty + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param data Pointer to the location to receive the removed value + * \return true if a value was removed + * + * If the queue is not empty function will copy the removed value into the location provided and return + * immediately with true, otherwise the function will return immediately with false. + */ +bool queue_try_remove(queue_t *q, void *data); + +/*! \brief Non-blocking peek at the next item to be removed from the queue + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param data Pointer to the location to receive the peeked value + * \return true if there was a value to peek + * + * If the queue is not empty this function will return immediately with true with the peeked entry + * copied into the location specified by the data parameter, otherwise the function will return false. + */ +bool queue_try_peek(queue_t *q, void *data); + +// blocking queue access functions: + +/*! \brief Blocking add of value to queue + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param data Pointer to value to be copied into the queue + * + * If the queue is full this function will block, until a removal happens on the queue + */ +void queue_add_blocking(queue_t *q, void *data); + +/*! \brief Blocking remove entry from queue + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param data Pointer to the location to receive the removed value + * + * If the queue is empty this function will block until a value is added. + */ +void queue_remove_blocking(queue_t *q, void *data); + +/*! \brief Blocking peek at next value to be removed from queue + * \ingroup queue + * + * \param q Pointer to a queue_t structure, used as a handle + * \param data Pointer to the location to receive the peeked value + * + * If the queue is empty function will block until a value is added + */ +void queue_peek_blocking(queue_t *q, void *data); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/pheap.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/pheap.c new file mode 100644 index 0000000000..8e9c68614c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/pheap.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "pico/util/pheap.h" + +pheap_t *ph_create(uint max_nodes, pheap_comparator comparator, void *user_data) { + invalid_params_if(PHEAP, !max_nodes || max_nodes >= (1u << sizeof(pheap_node_id_t))); + pheap_t *heap = calloc(1, sizeof(pheap_t)); + heap->max_nodes = max_nodes; + heap->comparator = comparator; + heap->nodes = calloc(max_nodes, sizeof(pheap_node_t)); + heap->user_data = user_data; + ph_clear(heap); + return heap; +} + +void ph_clear(pheap_t *heap) { + heap->root_id = 0; + heap->free_head_id = 1; + heap->free_tail_id = heap->max_nodes; + for(uint i = 1; i < heap->max_nodes; i++) { + ph_get_node(heap, i)->sibling = i + 1; + } + ph_get_node(heap, heap->max_nodes)->sibling = 0; +} + +void ph_destroy(pheap_t *heap) { + free(heap->nodes); + free(heap); +} + +pheap_node_id_t ph_merge_two_pass(pheap_t *heap, pheap_node_id_t id) { + if (!id || !ph_get_node(heap, id)->sibling) { + return id; + } else { + pheap_node_id_t a, b, new_node; + a = id; + b = ph_get_node(heap, id)->sibling; + new_node = ph_get_node(heap, b)->sibling; + ph_get_node(heap, a)->sibling = ph_get_node(heap, b)->sibling = 0; + return ph_merge_nodes(heap, ph_merge_nodes(heap, a, b), ph_merge_two_pass(heap, new_node)); + } +} + +static pheap_node_id_t ph_remove_any_head(pheap_t *heap, pheap_node_id_t root_id, bool reserve) { + assert(root_id); +// printf("Removing head %d (parent %d sibling %d)\n", root_id, ph_get_node(heap, root_id)->parent, ph_get_node(heap, root_id)->sibling); + assert(!ph_get_node(heap, root_id)->sibling); + assert(!ph_get_node(heap, root_id)->parent); + pheap_node_id_t new_root_id = ph_merge_two_pass(heap, ph_get_node(heap, root_id)->child); + if (!reserve) { + if (heap->free_tail_id) { + ph_get_node(heap, heap->free_tail_id)->sibling = root_id; + } + heap->free_tail_id = root_id; + } + if (new_root_id) ph_get_node(heap, new_root_id)->parent = 0; + ph_get_node(heap, root_id)->sibling = 0; + return new_root_id; +} + +pheap_node_id_t ph_remove_head_reserve(pheap_t *heap, bool reserve) { + pheap_node_id_t old_root_id = ph_peek_head(heap); + heap->root_id = ph_remove_any_head(heap, old_root_id, reserve); + return old_root_id; +} + +#include +bool ph_delete(pheap_t *heap, pheap_node_id_t id) { + // 1) trivial cases + if (!id) return false; + if (id == heap->root_id) { + ph_remove_head(heap); + return true; + } + // 2) unlink the node from the tree + pheap_node_t *node = ph_get_node(heap, id); + if (!node->parent) return false; // not in tree + pheap_node_t *parent = ph_get_node(heap, node->parent); + if (parent->child == id) { + parent->child = node->sibling; + } else { + pheap_node_id_t prev_sibling_id = parent->child; + bool __unused found = false; + do { + pheap_node_t *prev_sibling = ph_get_node(heap, prev_sibling_id); + if (prev_sibling->sibling == id) { + prev_sibling->sibling = node->sibling; + found = true; + break; + } + prev_sibling_id = prev_sibling->sibling; + } while (prev_sibling_id); + assert(found); + } + node->sibling = node->parent = 0; +// ph_dump(heap, NULL, NULL); + // 3) remove it from the head of its own subtree + pheap_node_id_t new_sub_tree = ph_remove_any_head(heap, id, false); + assert(new_sub_tree != heap->root_id); + heap->root_id = ph_merge_nodes(heap, heap->root_id, new_sub_tree); + return true; +} + +static uint ph_dump_node(pheap_t *heap, pheap_node_id_t id, void (*dump_key)(pheap_node_id_t, void *), void *user_data, uint indent) { + uint count = 0; + if (id) { + count++; + for (uint i = 0; i < indent * 2; i++) { + putchar(' '); + } + pheap_node_t *node = ph_get_node(heap, id); + printf("%d (c=%d s=%d p=%d) ", id, node->child, node->sibling, node->parent); + if (dump_key) dump_key(id, user_data); + printf("\n"); + count += ph_dump_node(heap, node->child, dump_key, user_data, indent + 1); + count += ph_dump_node(heap, node->sibling, dump_key, user_data, indent); + } + return count; +} + +void ph_dump(pheap_t *heap, void (*dump_key)(pheap_node_id_t, void *), void *user_data) { + uint count = ph_dump_node(heap, heap->root_id, dump_key, user_data, 0); + printf("node_count %d\n", count); +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/queue.c b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/queue.c new file mode 100644 index 0000000000..785e7f01ad --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/common/pico_util/queue.c @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "pico/util/queue.h" + +void queue_init_with_spinlock(queue_t *q, uint element_size, uint element_count, uint spinlock_num) { + q->lock = spin_lock_instance(spinlock_num); + q->data = (uint8_t *)calloc(element_count + 1, element_size); + q->element_count = element_count; + q->element_size = element_size; + q->wptr = 0; + q->rptr = 0; +} + +void queue_free(queue_t *q) { + free(q->data); +} + +static inline void *element_ptr(queue_t *q, uint index) { + assert(index <= q->element_count); + return q->data + index * q->element_size; +} + +static inline uint16_t inc_index(queue_t *q, uint16_t index) { + if (++index > q->element_count) { // > because we have element_count + 1 elements + index = 0; + } + return index; +} + +bool queue_try_add(queue_t *q, void *data) { + bool success = false; + uint32_t flags = spin_lock_blocking(q->lock); + if (queue_get_level_unsafe(q) != q->element_count) { + memcpy(element_ptr(q, q->wptr), data, q->element_size); + q->wptr = inc_index(q, q->wptr); + success = true; + } + spin_unlock(q->lock, flags); + if (success) __sev(); + return success; +} + +bool queue_try_remove(queue_t *q, void *data) { + bool success = false; + uint32_t flags = spin_lock_blocking(q->lock); + if (queue_get_level_unsafe(q) != 0) { + memcpy(data, element_ptr(q, q->rptr), q->element_size); + q->rptr = inc_index(q, q->rptr); + success = true; + } + spin_unlock(q->lock, flags); + if (success) __sev(); + return success; +} + +bool queue_try_peek(queue_t *q, void *data) { + bool success = false; + uint32_t flags = spin_lock_blocking(q->lock); + if (queue_get_level_unsafe(q) != 0) { + memcpy(data, element_ptr(q, q->rptr), q->element_size); + success = true; + } + spin_unlock(q->lock, flags); + return success; +} + +void queue_add_blocking(queue_t *q, void *data) { + bool done; + do { + done = queue_try_add(q, data); + if (done) break; + __wfe(); + } while (true); +} + +void queue_remove_blocking(queue_t *q, void *data) { + bool done; + do { + done = queue_try_remove(q, data); + if (done) break; + __wfe(); + } while (true); +} + +void queue_peek_blocking(queue_t *q, void *data) { + bool done; + do { + done = queue_try_peek(q, data); + if (done) break; + __wfe(); + } while (true); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host.cmake b/bsp/raspberry-pico/libraries/pico-sdk/src/host.cmake new file mode 100644 index 0000000000..5a3f3584ac --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host.cmake @@ -0,0 +1,10 @@ +# For targeting the host for testing purposes + +function(pico_add_extra_outputs TARGET) +endfunction() + +set(PICO_NO_HARDWARE "1" CACHE INTERNAL "") +set(PICO_ON_DEVICE "0" CACHE INTERNAL "") + +add_subdirectory(common) +add_subdirectory(host) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/CMakeLists.txt new file mode 100644 index 0000000000..56790055b0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/CMakeLists.txt @@ -0,0 +1,28 @@ +pico_add_subdirectory(hardware_divider) +pico_add_subdirectory(hardware_gpio) +pico_add_subdirectory(hardware_sync) +pico_add_subdirectory(hardware_timer) +pico_add_subdirectory(hardware_uart) +pico_add_subdirectory(pico_bit_ops) +pico_add_subdirectory(pico_divider) +pico_add_subdirectory(pico_multicore) +pico_add_subdirectory(pico_platform) +pico_add_subdirectory(pico_printf) +pico_add_subdirectory(pico_stdio) +pico_add_subdirectory(pico_stdlib) + +pico_add_doxygen(${CMAKE_CURRENT_LIST_DIR}) + +macro(pico_set_float_implementation TARGET IMPL) +endmacro() + +macro(pico_set_double_implementation TARGET IMPL) +endmacro() + +macro(pico_set_boot_stage2 TARGET IMPL) +endmacro() + +set(PICO_HOST_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "") +function(pico_define_boot_stage2 NAME) + add_executable(${NAME} ${PICO_HOST_DIR}/boot_stage2.c) +endfunction() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/README.md b/bsp/raspberry-pico/libraries/pico-sdk/src/host/README.md new file mode 100644 index 0000000000..c6d89622af --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/README.md @@ -0,0 +1,14 @@ +This is a basic set of replacement library implementations sufficient to get simple applications +running on your computer (Raspberry Pi OS, Linux, macOS or Windows using Cygwin or Windows Subsystem for Linux). +It is selected by `PICO_PLATFORM=host` in your CMake build + +This can be extremely useful for testing and debugging higher level application code, or porting code which is not yet small enough +to run on the RP2040 device itself. + +This base level host library provides a minimal environment to compile programs, but is likely sufficient for programs +that don't access hardware directly. + +It is possible however to inject additional SDK library implementations/simulations to provide +more complete functionality. For an example of this see the [pico-host-sdl](https://github.com/raspberrypi/pico-host-sdl) +which uses the SDL2 library to add additional library support for pico_multicore, timers/alarms in pico-time and +pico-audio/pico-scanvideo from [pico-extras](https://github.com/raspberrypi/pico-extras) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/boot_stage2.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/boot_stage2.c new file mode 100644 index 0000000000..cfa374bdb6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/boot_stage2.c @@ -0,0 +1 @@ +// empty \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/CMakeLists.txt new file mode 100644 index 0000000000..a6156c0794 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(divider) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/divider.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/divider.c new file mode 100644 index 0000000000..a133179984 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/divider.c @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/divider.h" + +__thread uint64_t hw_divider_result_threadlocal; diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/include/hardware/divider.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/include/hardware/divider.h new file mode 100644 index 0000000000..4d818747ad --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_divider/include/hardware/divider.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_DIVIDER_H +#define _HARDWARE_DIVIDER_H + +#include "pico/types.h" + +typedef uint64_t divmod_result_t; + +static inline int __sign_of(int32_t v) { + return v > 0 ? 1 : (v < 0 ? -1 : 0); +} + +// divides unsigned values a by b... (a/b) returned in low 32 bits, (a%b) in high 32 bits... results undefined for b==0 +static inline uint64_t hw_divider_divmod_u32(uint32_t a, uint32_t b) { + if (!b) return (((uint64_t)a)<<32u) | (uint32_t)(-1); // todo check this + return (((uint64_t)(a%b))<<32u) | (a/b); +} + +// divides signed values a by b... (a/b) returned in low 32 bits, (a%b) in high 32 bits... results undefined for b==0 +static inline uint64_t hw_divider_divmod_s32(int32_t a, int32_t b) { + if (!b) return (((uint64_t)a)<<32u) | (uint32_t)(-__sign_of(a)); + return (((uint64_t)(a%b))<<32u) | (uint32_t)(a/b); +} + +extern __thread divmod_result_t hw_divider_result_threadlocal; + +static inline void hw_divider_divmod_s32_start(int32_t a, int32_t b) { + hw_divider_result_threadlocal = hw_divider_divmod_s32(a, b); +} + +static inline void hw_divider_divmod_u32_start(uint32_t a, uint32_t b) { + hw_divider_result_threadlocal = hw_divider_divmod_u32(a, b); +} + +static inline divmod_result_t hw_divider_result_wait() { + return hw_divider_result_threadlocal; +} + +static inline uint64_t hw_divider_result_nowait() { + return hw_divider_result_threadlocal; +} + +inline static uint32_t to_quotient_u32(unsigned long long int r) { + return (uint32_t) r; +} + +inline static int32_t to_quotient_s32(unsigned long long int r) { + return (int32_t)(uint32_t)r; +} + +inline static uint32_t to_remainder_u32(unsigned long long int r) { + return (uint32_t)(r >> 32u); +} + +inline static int32_t to_remainder_s32(unsigned long long int r) { + return (int32_t)(r >> 32u); +} + +static inline uint32_t hw_divider_u32_quotient_wait() { + return to_quotient_u32(hw_divider_result_wait()); +} + +static inline uint32_t hw_divider_u32_remainder_wait() { + return to_remainder_u32(hw_divider_result_wait()); +} + +static inline int32_t hw_divider_s32_quotient_wait() { + return to_quotient_s32(hw_divider_result_wait()); +} + +static inline int32_t hw_divider_s32_remainder_wait() { + return to_remainder_s32(hw_divider_result_wait()); +} + +static inline uint32_t hw_divider_u32_quotient(uint32_t a, uint32_t b) { + return b ? (a / b) : -1; +} + +static inline uint32_t hw_divider_u32_remainder(uint32_t a, uint32_t b) { + return b ? (a % b) : a; +} + +static inline int32_t hw_divider_s32_quotient(int32_t a, int32_t b) { + return b ? (a / b) : -__sign_of(a); +} + +static inline int32_t hw_divider_s32_remainder(int32_t a, int32_t b) { + return b ? (a % b) : a; +} + +static inline uint32_t hw_divider_u32_quotient_inlined(uint32_t a, uint32_t b) { + return hw_divider_u32_quotient(a,b); +} + +static inline uint32_t hw_divider_u32_remainder_inlined(uint32_t a, uint32_t b) { + return hw_divider_u32_remainder(a,b); +} + +static inline int32_t hw_divider_s32_quotient_inlined(int32_t a, int32_t b) { + return hw_divider_s32_quotient(a,b); +} + +static inline int32_t hw_divider_s32_remainder_inlined(int32_t a, int32_t b) { + return hw_divider_s32_remainder(a,b); +} + +typedef uint64_t hw_divider_state_t; + +static inline void hw_divider_save_state(hw_divider_state_t *dest) { + *dest = hw_divider_result_threadlocal; +} + +static inline void hw_divider_restore_state(hw_divider_state_t *src) { + hw_divider_result_threadlocal = *src; +} + +#endif // _HARDWARE_DIVIDER_H diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/CMakeLists.txt new file mode 100644 index 0000000000..1bfb078f37 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(gpio) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/gpio.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/gpio.c new file mode 100644 index 0000000000..d5f4996f25 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/gpio.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/gpio.h" + +// todo weak or replace? probably weak +void gpio_set_function(uint gpio, enum gpio_function fn) { + +} + +void gpio_pull_up(uint gpio) { + +} + +void gpio_pull_down(uint gpio) { + +} + +void gpio_disable_pulls(uint gpio) { + +} + +void gpio_set_pulls(uint gpio, bool up, bool down) { + +} + +void gpio_set_outover(uint gpio, uint value) { + +} + +void gpio_set_inover(uint gpio, uint value) { + +} + +void gpio_set_oeover(uint gpio, uint value) { + +} + +void gpio_set_irq_enabled(uint gpio, uint32_t events, bool enable) { + +} + +void gpio_acknowledge_irq(uint gpio, uint32_t events) { + +} + +void gpio_init(uint gpio) { + +} + +PICO_WEAK_FUNCTION_DEF(gpio_get) + +bool PICO_WEAK_FUNCTION_IMPL_NAME(gpio_get)(uint gpio) { + return 0; +} + +uint32_t gpio_get_all() { + return 0; +} + +void gpio_set_mask(uint32_t mask) { + +} + +void gpio_clr_mask(uint32_t mask) { + +} + +void gpio_xor_mask(uint32_t mask) { + +} + +void gpio_put_masked(uint32_t mask, uint32_t value) { + +} + +void gpio_put_all(uint32_t value) { + +} + +void gpio_put(uint gpio, int value) { + +} + +void gpio_set_dir_out_masked(uint32_t mask) { + +} + +void gpio_set_dir_in_masked(uint32_t mask) { + +} + +void gpio_set_dir_masked(uint32_t mask, uint32_t value) { + +} + +void gpio_set_dir_all_bits(uint32_t value) { + +} + +void gpio_set_dir(uint gpio, bool out) { + +} + +void gpio_debug_pins_init() { + +} + +void gpio_set_input_enabled(uint gpio, bool enable) { + +} + +void gpio_init_mask(uint gpio_mask) { + +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/include/hardware/gpio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/include/hardware/gpio.h new file mode 100644 index 0000000000..7c6d354bae --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_gpio/include/hardware/gpio.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_GPIO_H_ +#define _HARDWARE_GPIO_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "pico.h" + +enum gpio_function { + GPIO_FUNC_XIP = 0, + GPIO_FUNC_SPI = 1, + GPIO_FUNC_UART = 2, + GPIO_FUNC_I2C = 3, + GPIO_FUNC_PWM = 4, + GPIO_FUNC_SIO = 5, + GPIO_FUNC_PIO0 = 6, + GPIO_FUNC_PIO1 = 7, + GPIO_FUNC_GPCK = 8, + GPIO_FUNC_USB = 9, + GPIO_FUNC_NULL = 0xf, +}; + + +#define GPIO_OUT 1 +#define GPIO_IN 0 + +#define N_GPIOS 30 + +// ---------------------------------------------------------------------------- +// Pad Controls + IO Muxing +// ---------------------------------------------------------------------------- +// Declarations for gpio.c + +void gpio_set_function(uint gpio, enum gpio_function fn); + +enum gpio_function gpio_get_function(uint gpio); + +void gpio_pull_up(uint gpio); + +void gpio_pull_down(uint gpio); + +void gpio_disable_pulls(uint gpio); + +void gpio_set_pulls(uint gpio, bool up, bool down); + +void gpio_set_outover(uint gpio, uint value); + +void gpio_set_inover(uint gpio, uint value); + +void gpio_set_oeover(uint gpio, uint value); + +void gpio_set_input_enabled(uint gpio, bool enable); + +// Configure a GPIO for direct input/output from software +void gpio_init(uint gpio); + +void gpio_init_mask(uint gpio_mask); + +// ---------------------------------------------------------------------------- +// Input +// ---------------------------------------------------------------------------- + +// Get the value of a single GPIO +bool gpio_get(uint gpio); + +// Get raw value of all +uint32_t gpio_get_all(); + +// ---------------------------------------------------------------------------- +// Output +// ---------------------------------------------------------------------------- + +// Drive high every GPIO appearing in mask +void gpio_set_mask(uint32_t mask); + +void gpio_clr_mask(uint32_t mask); + +// Toggle every GPIO appearing in mask +void gpio_xor_mask(uint32_t mask); + + +// For each 1 bit in "mask", drive that pin to the value given by +// corresponding bit in "value", leaving other pins unchanged. +// Since this uses the TOGL alias, it is concurrency-safe with e.g. an IRQ +// bashing different pins from the same core. +void gpio_put_masked(uint32_t mask, uint32_t value); + +// Drive all pins simultaneously +void gpio_put_all(uint32_t value); + + +// Drive a single GPIO high/low +void gpio_put(uint gpio, int value); + +// ---------------------------------------------------------------------------- +// Direction +// ---------------------------------------------------------------------------- + +// Switch all GPIOs in "mask" to output +void gpio_set_dir_out_masked(uint32_t mask); + +// Switch all GPIOs in "mask" to input +void gpio_set_dir_in_masked(uint32_t mask); + +// For each 1 bit in "mask", switch that pin to the direction given by +// corresponding bit in "value", leaving other pins unchanged. +// E.g. gpio_set_dir_masked(0x3, 0x2); -> set pin 0 to input, pin 1 to output, +// simultaneously. +void gpio_set_dir_masked(uint32_t mask, uint32_t value); + +// Set direction of all pins simultaneously. +// For each bit in value, +// 1 = out +// 0 = in +void gpio_set_dir_all_bits(uint32_t value); + +// Set a single GPIO to input/output. +// true = out +// 0 = in +void gpio_set_dir(uint gpio, bool out); + +// debugging +#define PICO_DEBUG_PIN_BASE 19u + +// note these two macros may only be used once per compilation unit +#define CU_REGISTER_DEBUG_PINS(p, ...) +#define CU_SELECT_DEBUG_PINS(x) +#define DEBUG_PINS_ENABLED(p) false + +#define DEBUG_PINS_SET(p, v) ((void)0) +#define DEBUG_PINS_CLR(p, v) ((void)0) +#define DEBUG_PINS_XOR(p, v) ((void)0) + +void gpio_debug_pins_init(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/CMakeLists.txt new file mode 100644 index 0000000000..4f6917740e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/CMakeLists.txt @@ -0,0 +1,12 @@ +pico_simple_hardware_headers_target(sync) + +if (NOT TARGET hardware_sync) + add_library(hardware_sync INTERFACE) + + target_sources(hardware_sync INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/sync_core0_only.c + ) + + target_link_libraries(hardware_sync INTERFACE hardware_sync_headers pico_platform) +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/include/hardware/sync.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/include/hardware/sync.h new file mode 100644 index 0000000000..a27ea01005 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/include/hardware/sync.h @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_SYNC_H +#define _HARDWARE_SYNC_H + +#include "pico.h" + +#ifndef __cplusplus + +#if (__STDC_VERSION__ >= 201112L) +#include +#else +enum { + memory_order_acquire, memory_order_release +}; +static inline void atomic_thread_fence(uint x) {} +#endif + +#else + +#include + +#endif + +#ifndef PICO_SPINLOCK_ID_TIMER +#define PICO_SPINLOCK_ID_TIMER 10 +#endif + +#ifndef PICO_SPINLOCK_ID_STRIPED_FIRST +#define PICO_SPINLOCK_ID_STRIPED_FIRST 16 +#endif + +#ifndef PICO_SPINLOCK_ID_STRIPED_LAST +#define PICO_SPINLOCK_ID_STRIPED_LAST 23 +#endif + +typedef struct _spin_lock_t spin_lock_t; + +inline static void __mem_fence_acquire() { +#ifndef __cplusplus + atomic_thread_fence(memory_order_acquire); +#else + std::atomic_thread_fence(std::memory_order_acquire); +#endif +} + +inline static void __mem_fence_release() { +#ifndef __cplusplus + atomic_thread_fence(memory_order_release); +#else + std::atomic_thread_fence(std::memory_order_release); +#endif +} + +#ifdef __cplusplus +extern "C" { +#endif + +void __sev(); + +void __wev(); + +void __wfi(); + +void __wfe(); + +uint32_t save_and_disable_interrupts(); + +void restore_interrupts(uint32_t status); + +uint spin_lock_get_num(spin_lock_t *lock); + +spin_lock_t *spin_lock_instance(uint lock_num); + +void spin_lock_unsafe_blocking(spin_lock_t *lock); + +void spin_unlock_unsafe(spin_lock_t *lock); + +uint32_t spin_lock_blocking(spin_lock_t *lock); + +bool is_spin_locked(const spin_lock_t *lock); + +void spin_unlock(spin_lock_t *lock, uint32_t saved_irq); + +uint get_core_num(); + +spin_lock_t *spin_lock_init(uint lock_num); + +void clear_spin_locks(void); + +uint next_striped_spin_lock_num(); + +void spin_lock_claim(uint lock_num); +void spin_lock_claim_mask(uint32_t lock_num_mask); +void spin_lock_unclaim(uint lock_num); +int spin_lock_claim_unused(bool required); +uint spin_lock_num(spin_lock_t *lock); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/sync_core0_only.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/sync_core0_only.c new file mode 100644 index 0000000000..878eba68f8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_sync/sync_core0_only.c @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/sync.h" +#include "hardware/platform_defs.h" + +// This is a dummy implementation that is single threaded + +static struct _spin_lock_t { + bool locked; +} _spinlocks[NUM_SPIN_LOCKS]; + +PICO_WEAK_FUNCTION_DEF(save_and_disable_interrupts) + +//static uint8_t striped_spin_lock_num; + +uint32_t PICO_WEAK_FUNCTION_IMPL_NAME(save_and_disable_interrupts)() { + return 0; +} + +PICO_WEAK_FUNCTION_DEF(restore_interrupts) + +void PICO_WEAK_FUNCTION_IMPL_NAME(restore_interrupts)(uint32_t status) { +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_instance) + +spin_lock_t *PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_instance)(uint lock_num) { + assert(lock_num < NUM_SPIN_LOCKS); + return &_spinlocks[lock_num]; +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_get_num) + +uint PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_get_num)(spin_lock_t *lock) { + return lock - _spinlocks; +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_init) + +spin_lock_t *PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_init)(uint lock_num) { + spin_lock_t *lock = spin_lock_instance(lock_num); + spin_unlock_unsafe(lock); + return lock; +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_unsafe_blocking) + +void PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_unsafe_blocking)(spin_lock_t *lock) { + lock->locked = true; +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_blocking) + +uint32_t PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_blocking)(spin_lock_t *lock) { + spin_lock_unsafe_blocking(lock); + return 1; // todo wrong value +} + +PICO_WEAK_FUNCTION_DEF(is_spin_locked) + +bool PICO_WEAK_FUNCTION_IMPL_NAME(is_spin_locked)(const spin_lock_t *lock) { + return lock->locked; +} + +PICO_WEAK_FUNCTION_DEF(spin_unlock_unsafe) + +void PICO_WEAK_FUNCTION_IMPL_NAME(spin_unlock_unsafe)(spin_lock_t *lock) { + lock->locked = false; +} + +PICO_WEAK_FUNCTION_DEF(spin_unlock) + +void PICO_WEAK_FUNCTION_IMPL_NAME(spin_unlock)(spin_lock_t *lock, uint32_t saved_irq) { + spin_unlock_unsafe(lock); +} + +PICO_WEAK_FUNCTION_DEF(__sev) + +volatile bool event_fired; + +void PICO_WEAK_FUNCTION_IMPL_NAME(__sev)() { + event_fired = true; +} + +PICO_WEAK_FUNCTION_DEF(__wfi) + +void PICO_WEAK_FUNCTION_IMPL_NAME(__wfi)() { + panic("Can't wait on irq for host core0 only implementation"); +} + +PICO_WEAK_FUNCTION_DEF(__wfe) + +void PICO_WEAK_FUNCTION_IMPL_NAME(__wfe)() { + while (!event_fired) tight_loop_contents(); +} + +PICO_WEAK_FUNCTION_DEF(get_core_num) + +uint PICO_WEAK_FUNCTION_IMPL_NAME(get_core_num)() { + return 0; +} + +PICO_WEAK_FUNCTION_DEF(clear_spin_locks) + +void PICO_WEAK_FUNCTION_IMPL_NAME(clear_spin_locks)(void) { + for (uint i = 0; i < NUM_SPIN_LOCKS; i++) { + spin_unlock_unsafe(spin_lock_instance(i)); + } +} + +PICO_WEAK_FUNCTION_DEF(next_striped_spin_lock_num) +uint PICO_WEAK_FUNCTION_IMPL_NAME(next_striped_spin_lock_num)() { + return 0; +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_claim) +void PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_claim)(uint lock_num) { +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_claim_mask) +void PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_claim_mask)(uint32_t mask) { +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_unclaim) +void PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_unclaim)(uint lock_num) { +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_claim_unused) +int PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_claim_unused)(bool required) { + return 0; +} + +PICO_WEAK_FUNCTION_DEF(spin_lock_num) +uint PICO_WEAK_FUNCTION_IMPL_NAME(spin_lock_num)(spin_lock_t *lock) { + return 0; +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/CMakeLists.txt new file mode 100644 index 0000000000..ba00444ae3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/CMakeLists.txt @@ -0,0 +1,16 @@ +pico_simple_hardware_target(timer) + +target_compile_definitions(hardware_timer INTERFACE + PICO_HARDWARE_TIMER_RESOLUTION_US=1000 # to loosen tests a little +) + +if (NOT DEFINED PICO_TIME_NO_ALARM_SUPPORT) + # we don't have alarm pools in the basic host support, though pico_host_sdl adds it + set(PICO_TIME_NO_ALARM_SUPPORT "1" CACHE INTERNAL "") +endif() + +if (PICO_TIME_NO_ALARM_SUPPORT) + target_compile_definitions(hardware_timer INTERFACE + PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 + ) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/include/hardware/timer.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/include/hardware/timer.h new file mode 100644 index 0000000000..3ddf427a66 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/include/hardware/timer.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_TIMER_H +#define _HARDWARE_TIMER_H + +#include "pico.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifndef PARAM_ASSERTIONS_ENABLED_TIMER +#define PARAM_ASSERTIONS_ENABLED_TIMER 0 +#endif + +static inline void check_hardware_alarm_num_param(uint alarm_num) { + invalid_params_if(TIMER, alarm_num >= NUM_TIMERS); +} + +uint32_t time_us_32(); +uint64_t time_us_64(); +void busy_wait_us_32(uint32_t delay_us); +void busy_wait_us(uint64_t delay_us); +void busy_wait_until(absolute_time_t t); +bool time_reached(absolute_time_t t); +typedef void (*hardware_alarm_callback_t)(uint alarm_num); +void hardware_alarm_claim(uint alarm_num); +void hardware_alarm_unclaim(uint alarm_num); +void hardware_alarm_set_callback(uint alarm_num, hardware_alarm_callback_t callback); +bool hardware_alarm_set_target(uint alarm_num, absolute_time_t t); +void hardware_alarm_cancel(uint alarm_num); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/timer.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/timer.c new file mode 100644 index 0000000000..d6dfa1cee2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/hardware_timer/timer.c @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/timer.h" +#if defined(__unix__) || defined(__APPLE__) +#include +#include +#include + +#endif + +// in our case not a busy wait +PICO_WEAK_FUNCTION_DEF(busy_wait_us) +void PICO_WEAK_FUNCTION_IMPL_NAME(busy_wait_us_32)(uint32_t delay_us) { +#if defined(__unix__) || defined(__APPLE__) + usleep(delay_us); +#else + assert(false); +#endif +} +PICO_WEAK_FUNCTION_DEF(busy_wait_us) +void PICO_WEAK_FUNCTION_IMPL_NAME(busy_wait_us)(uint64_t delay_us) { + absolute_time_t t; + update_us_since_boot(&t, time_us_64() + delay_us); + busy_wait_until(t); +} + +// this may or may not wrap +PICO_WEAK_FUNCTION_DEF(time_us_64) +uint64_t PICO_WEAK_FUNCTION_IMPL_NAME(time_us_64)() { +#if defined(__unix__) || defined(__APPLE__) +// struct timeval tv; +// gettimeofday(&tv, NULL); +// return tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec; + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + return ts.tv_sec * (uint64_t) 1000000 + ts.tv_nsec / 1000; +#else + panic_unsupported(); +#endif +} + +PICO_WEAK_FUNCTION_DEF(timer_us_32) +uint32_t PICO_WEAK_FUNCTION_IMPL_NAME(timer_us_32)() { + return (uint32_t) time_us_64(); +} + +PICO_WEAK_FUNCTION_DEF(time_reached) +bool PICO_WEAK_FUNCTION_IMPL_NAME(time_reached)(absolute_time_t t) { + uint64_t target = to_us_since_boot(t); + if (target > 0xffffffffu) return false; + return time_us_64() >= target; +} + +PICO_WEAK_FUNCTION_DEF(busy_wait_until) +void PICO_WEAK_FUNCTION_IMPL_NAME(busy_wait_until)(absolute_time_t target) { +#if defined(__unix__) + struct timespec tspec; + tspec.tv_sec = to_us_since_boot(target) / 1000000; + tspec.tv_nsec = (to_us_since_boot(target) % 1000000) * 1000; + clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &tspec, NULL); +#else + const int chunk = 1u<<30u; + uint64_t target_us = to_us_since_boot(target); + uint64_t time_us = time_us_64(); + while (target_us - time_us >= chunk) { + busy_wait_us_32(chunk); + time_us = time_us_64(); + } + if (target_us != time_us) { + busy_wait_us_32(target_us - chunk); + } +#endif +} + +static uint8_t claimed_alarms; + +void hardware_alarm_claim(uint alarm_num) { + assert(!(claimed_alarms & (1u << alarm_num))); + claimed_alarms |= 1u < +#include "hardware/uart.h" + +#if defined(__unix) || defined(__APPLE__) +#define _XOPEN_SOURCE 600 /* for ONLCR */ +#define __BSD_VISIBLE 1 /* for ONLCR in *BSD */ + +#include +#include +#include +#include + +#ifndef FNONBLOCK +#define FNONBLOCK O_NONBLOCK +#endif + +struct termios _tty; +static tcflag_t _res_oflg = 0; +static tcflag_t _res_lflg = 0; + +void _resetty(void) { + if (!isatty(STDIN_FILENO)) + return; + + /* reset tty: */ + _tty.c_oflag = _res_oflg; + _tty.c_lflag = _res_lflg; + tcsetattr(STDIN_FILENO, TCSADRAIN, &_tty); +} + +void _inittty(void) { + if (!isatty(STDIN_FILENO)) + return; + + /* save tty: */ + tcgetattr(STDIN_FILENO, &_tty); + _res_oflg = _tty.c_oflag; + _res_lflg = _tty.c_lflag; + + /* set raw: */ + _tty.c_lflag &= ~(ICANON | ICRNL);// | ISIG); + //_tty.c_oflag &= ~ONLCR; + tcsetattr(STDIN_FILENO, TCSANOW, &_tty); + + fcntl(STDIN_FILENO, F_SETFL, FNONBLOCK); + atexit(_resetty); +} + +#else +void _inittty() {} +#endif + +typedef struct { + bool dummy; +} uart_hw_t; + +uart_inst_t *const uart0; +uart_inst_t *const uart1; + +static int _nextchar = EOF; + +static bool _peekchar() { + if (_nextchar == EOF) { + _nextchar = getchar(); + } + return _nextchar != EOF; +} + +uint uart_init(uart_inst_t *uart, uint baud_rate) { + _inittty(); + return baud_rate; +} + +size_t uart_is_writable(uart_inst_t *uart) { + return 1; +} + +// If returns 0, no data is available to be read from UART. +// If returns nonzero, at least that many bytes can be written without blocking. +size_t uart_is_readable(uart_inst_t *uart) { + return _peekchar() ? 1 : 0; +} + +// Write len bytes directly from src to the UART +//void uart_write_blocking(uart_inst_t uart, const uint8_t *src, size_t len); + +// Read len bytes directly from the UART to dst +//void uart_read_blocking(uart_inst_t uart, uint8_t *dst, size_t len); + +// ---------------------------------------------------------------------------- +// UART-specific operations and aliases + +void uart_putc(uart_inst_t *uart, char c) { + putchar(c); +} + +void uart_puts(uart_inst_t *uart, const char *s) { + puts(s); +} + +char uart_getc(uart_inst_t *uart) { + while (!_peekchar()) { + tight_loop_contents(); + } + char rc = (char) _nextchar; + _nextchar = EOF; + return rc; +} + +void uart_default_tx_wait_blocking() { + +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/CMakeLists.txt new file mode 100644 index 0000000000..e4f8829228 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(pico_bit_ops INTERFACE) + +target_sources(pico_bit_ops INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/bit_ops.c) + +target_link_libraries(pico_bit_ops INTERFACE pico_bit_ops_headers) + +macro(pico_set_bit_ops_implementation TARGET IMPL) +endmacro() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/bit_ops.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/bit_ops.c new file mode 100644 index 0000000000..11f69fe636 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_bit_ops/bit_ops.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/bit_ops.h" + +uint32_t __rev(uint32_t v) { + v = ((v & 0x55555555u) << 1u) | ((v >> 1u) & 0x55555555u); + v = ((v & 0x33333333u) << 2u) | ((v >> 2u) & 0x33333333u); + v = ((v & 0x0f0f0f0fu) << 4u) | ((v >> 4u) & 0x0f0f0f0fu); + return (v << 24u) | ((v & 0xff00u) << 8u) | ((v >> 8u) & 0xff00u) | (v >> 24u); +} + +uint64_t __revll(uint64_t v) { + v = ((v & 0x5555555555555555u) << 1u) | ((v >> 1u) & 0x5555555555555555u); + v = ((v & 0x3333333333333333u) << 2u) | ((v >> 2u) & 0x3333333333333333u); + v = ((v & 0x0f0f0f0f0f0f0f0fu) << 4u) | ((v >> 4u) & 0x0f0f0f0f0f0f0f0fu); + v = ((v & 0x00ff00ff00ff00ffu) << 8u) | ((v >> 8u) & 0x00ff00ff00ff00ffu); + return (v << 48u) | ((v & 0xffff0000u) << 16u) | ((v >> 16u) & 0xffff0000u) | (v >> 48u); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/CMakeLists.txt new file mode 100644 index 0000000000..7a26204c2d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(pico_divider INTERFACE) + +target_sources(pico_divider INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/divider.c) + +target_link_libraries(pico_divider INTERFACE pico_divider_headers) + +macro(pico_set_divider_implementation TARGET IMPL) +endmacro() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/divider.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/divider.c new file mode 100644 index 0000000000..df0e275171 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_divider/divider.c @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/divider.h" + +// These functions save/restore divider state, so are safe to call from interrupts +int32_t div_s32s32(int32_t a, int32_t b) { + return hw_divider_s32_quotient(a, b); +} + +divmod_result_t divmod_s32s32(int32_t a, int32_t b) { + return hw_divider_divmod_s32(a, b); +} + +uint32_t div_u32u32(uint32_t a, uint32_t b) { + return hw_divider_u32_quotient(a, b); +} + +divmod_result_t divmod_u32u32(uint32_t a, uint32_t b) { + return hw_divider_divmod_u32(a, b); +} + +static inline int __sign_of_64(int32_t v) { + return v > 0 ? 1 : (v < 0 ? -1 : 0); +} + +typedef struct { + uint64_t quotient; + uint64_t remainder; +} qr_u64; + +typedef struct { + int64_t quotient; + int64_t remainder; +} qr_s64; + +// divides unsigned values a by b... (a/b) returned in low 32 bits, (a%b) in high 32 bits... results undefined for b==0 +static inline qr_u64 udiv64(uint64_t a, uint64_t b) { + qr_u64 rc; + if (!b) { + rc.quotient = (uint64_t)-1; // todo check this + rc.remainder = a; + } else { + rc.quotient = a/b; + rc.remainder = a%b; + } + return rc; +} + +// divides signed values a by b... (a/b) returned in low 32 bits, (a%b) in high 32 bits... results undefined for b==0 +static inline qr_s64 div64(int64_t a, int64_t b) { + qr_s64 rc; + if (!b) { + rc.quotient = (uint64_t)(-__sign_of_64(a)); + rc.remainder = a; + } else { + rc.quotient = a/b; + rc.remainder = a%b; + } + return rc; +} + +int64_t div_s64s64(int64_t a, int64_t b) { + qr_s64 qr = div64(a, b); + return qr.quotient; +} + +int64_t divmod_s64s64_rem(int64_t a, int64_t b, int64_t *rem) { + qr_s64 qr = div64(a, b); + *rem = qr.remainder; + return qr.quotient; +} + +int64_t divmod_s64s64(int64_t a, int64_t b) { + qr_s64 qr = div64(a, b); + return qr.quotient; +} + +uint64_t div_u64u64(uint64_t a, uint64_t b) { + qr_u64 qr = udiv64(a, b); + return qr.quotient; +} + +uint64_t divmod_u64u64_rem(uint64_t a, uint64_t b, uint64_t *rem) { + qr_u64 qr = udiv64(a, b); + *rem = qr.remainder; + return qr.quotient; +} + +uint64_t divmod_u64u64(uint64_t a, uint64_t b) { + qr_u64 qr = udiv64(a, b); + return qr.quotient; +} + +// these functions are slightly faster, but unsafe the divider state, so are not generally safe to be called from interrupts + +int32_t div_s32s32_unsafe(int32_t a, int32_t b) { return div_s32s32(a,b); } +int32_t divmod_s32s32_rem_unsafe(int32_t a, int32_t b, int32_t *rem) { return divmod_s32s32_rem(a, b, rem); } +int64_t divmod_s32s32_unsafe(int32_t a, int32_t b) { return divmod_s32s32(a, b); } + +uint32_t div_u32u32_unsafe(uint32_t a, uint32_t b) { return div_u32u32(a, b); } +uint32_t divmod_u32u32_rem_unsafe(uint32_t a, uint32_t b, uint32_t *rem) { return divmod_u32u32_rem(a, b, rem); } +uint64_t divmod_u32u32_unsafe(uint32_t a, uint32_t b) { return divmod_u32u32(a, b); } + +int64_t div_s64s64_unsafe(int64_t a, int64_t b) { return div_s64s64(a, b); } +int64_t divmod_s64s64_rem_unsafe(int64_t a, int64_t b, int64_t *rem) { return divmod_s64s64_rem(a, b, rem); } +int64_t divmod_s64s64_unsafe(int64_t a, int64_t b) { return divmod_s64s64(a, b); } + +uint64_t div_u64u64_unsafe(uint64_t a, uint64_t b) { return div_u64u64(a, b); } +uint64_t divmod_u64u64_rem_unsafe(uint64_t a, uint64_t b, uint64_t *rem) { return divmod_u64u64_rem(a, b, rem); } +uint64_t divmod_u64u64_unsafe(uint64_t a, uint64_t b) { return divmod_u64u64(a, b); } diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/CMakeLists.txt new file mode 100644 index 0000000000..c5eabdab2b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/CMakeLists.txt @@ -0,0 +1,8 @@ +if (NOT TARGET pico_multicore) + add_library(pico_multicore INTERFACE) + + target_include_directories(pico_multicore INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +endif() + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/include/pico/multicore.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/include/pico/multicore.h new file mode 100644 index 0000000000..de6672ae27 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_multicore/include/pico/multicore.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_MULTICORE_H +#define _PICO_MULTICORE_H + +#include "pico/types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void multicore_reset_core1(); +void multicore_launch_core1(void (*entry)(void)); +void multicore_launch_core1_with_stack(void (*entry)(void), uint32_t *stack_bottom, size_t stack_size_bytes); +void multicore_sleep_core1(); +void multicore_launch_core1_raw(void (*entry)(void), uint32_t *sp, uint32_t vector_table); + +bool multicore_fifo_rvalid(); +bool multicore_fifo_wready(); +void multicore_fifo_push(uint32_t data); +uint32_t multicore_fifo_pop_blocking(); +void multicore_fifo_drain(); +void multicore_fifo_clear_irq(); +int32_t multicore_fifo_get_status(); + +// call this from the lockout victim thread +void multicore_lockout_victim_init(); + +// start locking out the other core (it will be +bool multicore_lockout_start_timeout_us(uint64_t timeout_us); +void multicore_lockout_start_blocking(); + +bool multicore_lockout_end_timeout_us(uint64_t timeout_us); +void multicore_lockout_end_blocking(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/CMakeLists.txt new file mode 100644 index 0000000000..92ae6a2b70 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/CMakeLists.txt @@ -0,0 +1,25 @@ +if (NOT TARGET pico_platform_headers) + add_library(pico_platform_headers INTERFACE) + + target_compile_definitions(pico_platform_headers INTERFACE + PICO_NO_HARDWARE=1 + PICO_ON_DEVICE=0 + PICO_BUILD=1 + ) + + target_include_directories(pico_platform_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +endif() + +if (NOT TARGET pico_platform) + add_library(pico_platform INTERFACE) + + target_sources(pico_platform INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/platform_base.c + ) + + target_link_libraries(pico_platform INTERFACE pico_platform_headers pico_bit_ops ${PICO_PLATFORM_EXTRA_LIBRARIES}) +endif() + +function(pico_add_platform_library TARGET) + target_link_libraries(pico_platform INTERFACE ${TARGET}) +endfunction() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/hardware/platform_defs.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/hardware/platform_defs.h new file mode 100644 index 0000000000..1ca575e29b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/hardware/platform_defs.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_PLATFORM_DEFS_H +#define _HARDWARE_PLATFORM_DEFS_H + +#define NUM_CORES 2u + +#define NUM_DMA_CHANNELS 12u + +#define NUM_TIMERS 4u + +#define NUM_IRQS 32u + +#define NUM_SPIN_LOCKS 32u + +#define XOSC_MHZ 12 + +#define NUM_SPIN_LOCKS 32u + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/pico/platform.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/pico/platform.h new file mode 100644 index 0000000000..0e994d9b48 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/include/pico/platform.h @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_PLATFORM_H_ +#define _PICO_PLATFORM_H_ + +#include "hardware/platform_defs.h" +#include + +#ifdef __unix__ + +#include + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define __not_in_flash(grup) +#define __not_in_flash_func(func) func +#define __no_inline_not_in_flash_func(func) +#define __in_flash(group) +#define __scratch_x(group) +#define __scratch_y(group) + +#define __packed_aligned +#define __packed + +#define __time_critical_func(x) x +#define __after_data(group) + +//int running_on_fpga() { return false; } +extern void tight_loop_contents(); + +#ifndef _MSC_VER +#ifndef __noreturn +#define __noreturn __attribute((noreturn)) +#endif + +#ifndef __unused +#define __unused __attribute__((unused)) +#endif + +#ifndef __noinline +#define __noinline __attribute__((noinline)) +#endif + +#ifndef __aligned +#define __aligned(x) __attribute__((aligned(x))) +#endif + +#define PICO_WEAK_FUNCTION_DEF(x) _Pragma(__STRING(weak x)) +#define PICO_WEAK_FUNCTION_IMPL_NAME(x) x + +#else +#ifndef __noreturn +#define __noreturn __declspec(noreturn) +#endif + +#ifndef __unused +#define __unused +#endif + +#ifndef __noinline +#define __noinline __declspec(noinline) +#endif + +#ifndef __aligned +#define __aligned(x) __declspec(align(x)) +#endif + +#ifndef __CONCAT +#define __CONCAT(x,y) x ## y +#endif + +#ifndef __STRING +#define __STRING(x) #x +#endif() + +#define __thread __declspec( thread ) + +#define PICO_WEAK_FUNCTION_DEF(x) __pragma(comment(linker, __STRING(/alternatename:_##x=_##x##__weak))); +#define PICO_WEAK_FUNCTION_IMPL_NAME(x) x ## __weak + +static __noreturn void __builtin_unreachable() { +} + +#include +#define __builtin_clz __lzcnt +#endif + +#ifndef count_of +#define count_of(a) (sizeof(a)/sizeof((a)[0])) +#endif + +#ifndef MAX +#define MAX(a, b) ((a)>(b)?(a):(b)) +#endif + +#ifndef MIN +#define MIN(a, b) ((b)>(a)?(a):(b)) +#endif + +// abort in our case +void __noreturn __breakpoint(); + +void __noreturn panic_unsupported(); + +void __noreturn panic(const char *fmt, ...); + +// arggggghhhh there is a weak function called sem_init used by SDL +#define sem_init sem_init_alternative + +extern uint32_t host_safe_hw_ptr_impl(uintptr_t x); +// return a 32 bit handle for a raw ptr; DMA chaining for example embeds pointers in 32 bit values +// which of course does not work if we're running the code natively on a 64 bit platforms. Therefore +// we provide this macro which allows that code to provide a 64->32 bit mapping in host mode +#define host_safe_hw_ptr(x) host_safe_hw_ptr_impl((uintptr_t)(x)) +void *decode_host_safe_hw_ptr(uint32_t ptr); + +#define __fast_mul(a,b) ((a)*(b)) + +typedef unsigned int uint; + +inline static int32_t __mul_instruction(int32_t a,int32_t b) +{ + return a*b; +} + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/platform_base.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/platform_base.c new file mode 100644 index 0000000000..be1dbd444a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_platform/platform_base.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#include +#include + +#include "pico.h" + +PICO_WEAK_FUNCTION_DEF(tight_loop_contents) + +void PICO_WEAK_FUNCTION_IMPL_NAME(tight_loop_contents)() { + +} + +void __noreturn panic_unsupported() { + panic("not supported"); +} + +void hard_assertion_failure(void) { + panic("Hard assert"); +} + +void panic(const char *fmt, ...) { + va_list args; + + puts("*** PANIC ***\n"); + if (fmt) { + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); + } + + puts("\n"); + + __breakpoint(); +} + +void __breakpoint() { + #ifdef _MSC_VER + __debugbreak(); + #else + __builtin_trap(); + #endif +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_printf/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_printf/CMakeLists.txt new file mode 100644 index 0000000000..2151746d73 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_printf/CMakeLists.txt @@ -0,0 +1,6 @@ +if (NOT TARGET pico_printf) + add_library(pico_printf INTERFACE) + function(pico_set_printf_implementation) + endfunction() +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/CMakeLists.txt new file mode 100644 index 0000000000..8ab5ed466d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/CMakeLists.txt @@ -0,0 +1,20 @@ +if (NOT TARGET pico_stdio) + add_library(pico_stdio INTERFACE) + + target_include_directories(pico_stdio INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + target_sources(pico_stdio INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/stdio.c + ) + add_library(pico_stdio_usb INTERFACE) + add_library(pico_stdio_uart INTERFACE) + add_library(pico_stdio_semihosting INTERFACE) + + function(pico_enable_stdio_uart) + endfunction() + function(pico_enable_stdio_usb) + endfunction() + function(pico_enable_stdio_semihosting) + endfunction() +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/include/pico/stdio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/include/pico/stdio.h new file mode 100644 index 0000000000..798edb3a17 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/include/pico/stdio.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _PICO_STDIO_H +#define _PICO_STDIO_H + +typedef struct stdio_driver stdio_driver_t; + +#define STDIO_ERROR -1 +#define STDIO_NO_INPUT -2 + +static inline void stdio_usb_init() {} +void stdio_uart_init(); +static inline void stdio_init_all() { stdio_uart_init(); } +static inline void stdio_filter_driver(stdio_driver_t *); +static inline void stdio_set_translate_crlf(stdio_driver_t *driver, bool enabled) {} +int getchar_timeout_us(uint32_t timeout_us); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/stdio.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/stdio.c new file mode 100644 index 0000000000..87be91da3e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdio/stdio.c @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/stdlib.h" +#include "hardware/uart.h" + +int getchar_timeout_us(uint32_t timeout_us) { + absolute_time_t t = make_timeout_time_us(timeout_us); + while (!uart_is_readable(uart_default)) { + if (absolute_time_diff_us(t, get_absolute_time()) > 0) { + return STDIO_NO_INPUT; + } + sleep_ms(1); + } + return uart_getc(uart_default); +} + +void stdio_uart_init() { + uart_init(uart_default, 0); +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/CMakeLists.txt new file mode 100644 index 0000000000..f4dac4d8de --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/CMakeLists.txt @@ -0,0 +1,19 @@ +if (NOT TARGET pico_stdlib) + add_library(pico_stdlib INTERFACE) + + target_sources(pico_stdlib INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/stdlib.c + ) + + target_link_libraries(pico_stdlib INTERFACE + pico_stdlib_headers + pico_platform + pico_time + pico_divider + pico_binary_info + pico_printf + pico_stdio + hardware_gpio + ) +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/stdlib.c b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/stdlib.c new file mode 100644 index 0000000000..166bd5fed2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/host/pico_stdlib/stdlib.c @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/stdlib.h" + +void setup_default_uart() { + +} + +void set_sys_clock_48mhz() { + +} + +bool check_sys_clock_khz(uint32_t freq_khz, uint *vco_out, uint *postdiv1_out, uint *postdiv2_out) { + *vco_out = 1000000; + *postdiv1_out = 0; + *postdiv2_out = 0; + return true; +} + +void set_sys_clock_pll(__unused uint32_t vco_freq, __unused uint post_div1, __unused uint post_div2) { + +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040.cmake b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040.cmake new file mode 100644 index 0000000000..c68df450a4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040.cmake @@ -0,0 +1,6 @@ +# include everything needed to build against rp2040 + +include(rp2_common.cmake) + +add_subdirectory(rp2040) + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/CMakeLists.txt new file mode 100644 index 0000000000..a6089de064 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/CMakeLists.txt @@ -0,0 +1,6 @@ +# Targets specific to B0 silicon +pico_add_subdirectory(hardware_regs) +pico_add_subdirectory(hardware_structs) + +pico_add_doxygen(${CMAKE_CURRENT_LIST_DIR}) +pico_add_doxygen_exclude(${CMAKE_CURRENT_LIST_DIR}/hardware_regs) # very very big diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/README.md b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/README.md new file mode 100644 index 0000000000..b705b35a9a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/README.md @@ -0,0 +1,7 @@ +This directory contains header files defining the RP2040 hardware. It is selected when +`PICO_PLATFORM=rp2040` (the default) is specified for the build + +`hardware_regs` contains low level hardware register #defines autogenerated from the RP2040 chip definition itself. + +`hardware_structs` contains C structures for accessing memory mapped registers + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/CMakeLists.txt new file mode 100644 index 0000000000..46358cabec --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(hardware_regs INTERFACE) +target_include_directories(hardware_regs INTERFACE include) +target_link_libraries(hardware_regs INTERFACE hardware_base) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/platform_defs.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/platform_defs.h new file mode 100644 index 0000000000..51c027222d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/platform_defs.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_PLATFORM_DEFS_H +#define _HARDWARE_PLATFORM_DEFS_H + +// This header is included from C and assembler - only define macros + +#include "hardware/regs/addressmap.h" + +#define NUM_CORES 2u +#define NUM_DMA_CHANNELS 12u +#define NUM_IRQS 32u +#define NUM_PIOS 2u +#define NUM_PIO_STATE_MACHINES 4u +#define NUM_PWM_SLICES 8u +#define NUM_SPIN_LOCKS 32u +#define NUM_UARTS 2u +#define NUM_BANK0_GPIOS 30u + +#define PIO_INSTRUCTION_COUNT 32u + +#define XOSC_MHZ 12u + +// PICO_CONFIG: PICO_STACK_SIZE, Stack Size, min=0x100, default=0x800, advanced=true, group=pico_standard_link +#ifndef PICO_STACK_SIZE +#define PICO_STACK_SIZE 0x800u +#endif + +// PICO_CONFIG: PICO_HEAP_SIZE, Heap size to reserve, min=0x100, default=0x800, advanced=true, group=pico_standard_link +#ifndef PICO_HEAP_SIZE +#define PICO_HEAP_SIZE 0x800 +#endif + +// PICO_CONFIG: PICO_NO_RAM_VECTOR_TABLE, Enable/disable the RAM vector table, type=bool, default=0, advanced=true, group=pico_runtime +#ifndef PICO_NO_RAM_VECTOR_TABLE +#define PICO_NO_RAM_VECTOR_TABLE 0 +#endif + +#ifndef PICO_FLASH_SIZE_BYTES +#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) +#endif + +#endif + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/adc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/adc.h new file mode 100644 index 0000000000..82bb0f8fb6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/adc.h @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : ADC +// Version : 2 +// Bus type : apb +// Description : Control and data interface to SAR ADC +// ============================================================================= +#ifndef HARDWARE_REGS_ADC_DEFINED +#define HARDWARE_REGS_ADC_DEFINED +// ============================================================================= +// Register : ADC_CS +// Description : ADC Control and Status +#define ADC_CS_OFFSET 0x00000000 +#define ADC_CS_BITS 0x001f770f +#define ADC_CS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_CS_RROBIN +// Description : Round-robin sampling. 1 bit per channel. Set all bits to 0 to +// disable. +// Otherwise, the ADC will cycle through each enabled channel in a +// round-robin fashion. +// The first channel to be sampled will be the one currently +// indicated by AINSEL. +// AINSEL will be updated after each conversion with the +// newly-selected channel. +#define ADC_CS_RROBIN_RESET 0x00 +#define ADC_CS_RROBIN_BITS 0x001f0000 +#define ADC_CS_RROBIN_MSB 20 +#define ADC_CS_RROBIN_LSB 16 +#define ADC_CS_RROBIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_AINSEL +// Description : Select analog mux input. Updated automatically in round-robin +// mode. +#define ADC_CS_AINSEL_RESET 0x0 +#define ADC_CS_AINSEL_BITS 0x00007000 +#define ADC_CS_AINSEL_MSB 14 +#define ADC_CS_AINSEL_LSB 12 +#define ADC_CS_AINSEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_ERR_STICKY +// Description : Some past ADC conversion encountered an error. Write 1 to +// clear. +#define ADC_CS_ERR_STICKY_RESET 0x0 +#define ADC_CS_ERR_STICKY_BITS 0x00000400 +#define ADC_CS_ERR_STICKY_MSB 10 +#define ADC_CS_ERR_STICKY_LSB 10 +#define ADC_CS_ERR_STICKY_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_ERR +// Description : The most recent ADC conversion encountered an error; result is +// undefined or noisy. +#define ADC_CS_ERR_RESET 0x0 +#define ADC_CS_ERR_BITS 0x00000200 +#define ADC_CS_ERR_MSB 9 +#define ADC_CS_ERR_LSB 9 +#define ADC_CS_ERR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_READY +// Description : 1 if the ADC is ready to start a new conversion. Implies any +// previous conversion has completed. +// 0 whilst conversion in progress. +#define ADC_CS_READY_RESET 0x0 +#define ADC_CS_READY_BITS 0x00000100 +#define ADC_CS_READY_MSB 8 +#define ADC_CS_READY_LSB 8 +#define ADC_CS_READY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_START_MANY +// Description : Continuously perform conversions whilst this bit is 1. A new +// conversion will start immediately after the previous finishes. +#define ADC_CS_START_MANY_RESET 0x0 +#define ADC_CS_START_MANY_BITS 0x00000008 +#define ADC_CS_START_MANY_MSB 3 +#define ADC_CS_START_MANY_LSB 3 +#define ADC_CS_START_MANY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_START_ONCE +// Description : Start a single conversion. Self-clearing. Ignored if start_many +// is asserted. +#define ADC_CS_START_ONCE_RESET 0x0 +#define ADC_CS_START_ONCE_BITS 0x00000004 +#define ADC_CS_START_ONCE_MSB 2 +#define ADC_CS_START_ONCE_LSB 2 +#define ADC_CS_START_ONCE_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_TS_EN +// Description : Power on temperature sensor. 1 - enabled. 0 - disabled. +#define ADC_CS_TS_EN_RESET 0x0 +#define ADC_CS_TS_EN_BITS 0x00000002 +#define ADC_CS_TS_EN_MSB 1 +#define ADC_CS_TS_EN_LSB 1 +#define ADC_CS_TS_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_CS_EN +// Description : Power on ADC and enable its clock. +// 1 - enabled. 0 - disabled. +#define ADC_CS_EN_RESET 0x0 +#define ADC_CS_EN_BITS 0x00000001 +#define ADC_CS_EN_MSB 0 +#define ADC_CS_EN_LSB 0 +#define ADC_CS_EN_ACCESS "RW" +// ============================================================================= +// Register : ADC_RESULT +// Description : Result of most recent ADC conversion +#define ADC_RESULT_OFFSET 0x00000004 +#define ADC_RESULT_BITS 0x00000fff +#define ADC_RESULT_RESET 0x00000000 +#define ADC_RESULT_MSB 11 +#define ADC_RESULT_LSB 0 +#define ADC_RESULT_ACCESS "RO" +// ============================================================================= +// Register : ADC_FCS +// Description : FIFO control and status +#define ADC_FCS_OFFSET 0x00000008 +#define ADC_FCS_BITS 0x0f0f0f0f +#define ADC_FCS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_THRESH +// Description : DREQ/IRQ asserted when level >= threshold +#define ADC_FCS_THRESH_RESET 0x0 +#define ADC_FCS_THRESH_BITS 0x0f000000 +#define ADC_FCS_THRESH_MSB 27 +#define ADC_FCS_THRESH_LSB 24 +#define ADC_FCS_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_LEVEL +// Description : The number of conversion results currently waiting in the FIFO +#define ADC_FCS_LEVEL_RESET 0x0 +#define ADC_FCS_LEVEL_BITS 0x000f0000 +#define ADC_FCS_LEVEL_MSB 19 +#define ADC_FCS_LEVEL_LSB 16 +#define ADC_FCS_LEVEL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_OVER +// Description : 1 if the FIFO has been overflowed. Write 1 to clear. +#define ADC_FCS_OVER_RESET 0x0 +#define ADC_FCS_OVER_BITS 0x00000800 +#define ADC_FCS_OVER_MSB 11 +#define ADC_FCS_OVER_LSB 11 +#define ADC_FCS_OVER_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_UNDER +// Description : 1 if the FIFO has been underflowed. Write 1 to clear. +#define ADC_FCS_UNDER_RESET 0x0 +#define ADC_FCS_UNDER_BITS 0x00000400 +#define ADC_FCS_UNDER_MSB 10 +#define ADC_FCS_UNDER_LSB 10 +#define ADC_FCS_UNDER_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_FULL +// Description : None +#define ADC_FCS_FULL_RESET 0x0 +#define ADC_FCS_FULL_BITS 0x00000200 +#define ADC_FCS_FULL_MSB 9 +#define ADC_FCS_FULL_LSB 9 +#define ADC_FCS_FULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_EMPTY +// Description : None +#define ADC_FCS_EMPTY_RESET 0x0 +#define ADC_FCS_EMPTY_BITS 0x00000100 +#define ADC_FCS_EMPTY_MSB 8 +#define ADC_FCS_EMPTY_LSB 8 +#define ADC_FCS_EMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_DREQ_EN +// Description : If 1: assert DMA requests when FIFO contains data +#define ADC_FCS_DREQ_EN_RESET 0x0 +#define ADC_FCS_DREQ_EN_BITS 0x00000008 +#define ADC_FCS_DREQ_EN_MSB 3 +#define ADC_FCS_DREQ_EN_LSB 3 +#define ADC_FCS_DREQ_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_ERR +// Description : If 1: conversion error bit appears in the FIFO alongside the +// result +#define ADC_FCS_ERR_RESET 0x0 +#define ADC_FCS_ERR_BITS 0x00000004 +#define ADC_FCS_ERR_MSB 2 +#define ADC_FCS_ERR_LSB 2 +#define ADC_FCS_ERR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_SHIFT +// Description : If 1: FIFO results are right-shifted to be one byte in size. +// Enables DMA to byte buffers. +#define ADC_FCS_SHIFT_RESET 0x0 +#define ADC_FCS_SHIFT_BITS 0x00000002 +#define ADC_FCS_SHIFT_MSB 1 +#define ADC_FCS_SHIFT_LSB 1 +#define ADC_FCS_SHIFT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_FCS_EN +// Description : If 1: write result to the FIFO after each conversion. +#define ADC_FCS_EN_RESET 0x0 +#define ADC_FCS_EN_BITS 0x00000001 +#define ADC_FCS_EN_MSB 0 +#define ADC_FCS_EN_LSB 0 +#define ADC_FCS_EN_ACCESS "RW" +// ============================================================================= +// Register : ADC_FIFO +// Description : Conversion result FIFO +#define ADC_FIFO_OFFSET 0x0000000c +#define ADC_FIFO_BITS 0x00008fff +#define ADC_FIFO_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_FIFO_ERR +// Description : 1 if this particular sample experienced a conversion error. +// Remains in the same location if the sample is shifted. +#define ADC_FIFO_ERR_RESET "-" +#define ADC_FIFO_ERR_BITS 0x00008000 +#define ADC_FIFO_ERR_MSB 15 +#define ADC_FIFO_ERR_LSB 15 +#define ADC_FIFO_ERR_ACCESS "RF" +// ----------------------------------------------------------------------------- +// Field : ADC_FIFO_VAL +// Description : None +#define ADC_FIFO_VAL_RESET "-" +#define ADC_FIFO_VAL_BITS 0x00000fff +#define ADC_FIFO_VAL_MSB 11 +#define ADC_FIFO_VAL_LSB 0 +#define ADC_FIFO_VAL_ACCESS "RF" +// ============================================================================= +// Register : ADC_DIV +// Description : Clock divider. If non-zero, CS_START_MANY will start +// conversions +// at regular intervals rather than back-to-back. +// The divider is reset when either of these fields are written. +// Total period is 1 + INT + FRAC / 256 +#define ADC_DIV_OFFSET 0x00000010 +#define ADC_DIV_BITS 0x00ffffff +#define ADC_DIV_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_DIV_INT +// Description : Integer part of clock divisor. +#define ADC_DIV_INT_RESET 0x0000 +#define ADC_DIV_INT_BITS 0x00ffff00 +#define ADC_DIV_INT_MSB 23 +#define ADC_DIV_INT_LSB 8 +#define ADC_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ADC_DIV_FRAC +// Description : Fractional part of clock divisor. First-order delta-sigma. +#define ADC_DIV_FRAC_RESET 0x00 +#define ADC_DIV_FRAC_BITS 0x000000ff +#define ADC_DIV_FRAC_MSB 7 +#define ADC_DIV_FRAC_LSB 0 +#define ADC_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : ADC_INTR +// Description : Raw Interrupts +#define ADC_INTR_OFFSET 0x00000014 +#define ADC_INTR_BITS 0x00000001 +#define ADC_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_INTR_FIFO +// Description : Triggered when the sample FIFO reaches a certain level. +// This level can be programmed via the FCS_THRESH field. +#define ADC_INTR_FIFO_RESET 0x0 +#define ADC_INTR_FIFO_BITS 0x00000001 +#define ADC_INTR_FIFO_MSB 0 +#define ADC_INTR_FIFO_LSB 0 +#define ADC_INTR_FIFO_ACCESS "RO" +// ============================================================================= +// Register : ADC_INTE +// Description : Interrupt Enable +#define ADC_INTE_OFFSET 0x00000018 +#define ADC_INTE_BITS 0x00000001 +#define ADC_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_INTE_FIFO +// Description : Triggered when the sample FIFO reaches a certain level. +// This level can be programmed via the FCS_THRESH field. +#define ADC_INTE_FIFO_RESET 0x0 +#define ADC_INTE_FIFO_BITS 0x00000001 +#define ADC_INTE_FIFO_MSB 0 +#define ADC_INTE_FIFO_LSB 0 +#define ADC_INTE_FIFO_ACCESS "RW" +// ============================================================================= +// Register : ADC_INTF +// Description : Interrupt Force +#define ADC_INTF_OFFSET 0x0000001c +#define ADC_INTF_BITS 0x00000001 +#define ADC_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_INTF_FIFO +// Description : Triggered when the sample FIFO reaches a certain level. +// This level can be programmed via the FCS_THRESH field. +#define ADC_INTF_FIFO_RESET 0x0 +#define ADC_INTF_FIFO_BITS 0x00000001 +#define ADC_INTF_FIFO_MSB 0 +#define ADC_INTF_FIFO_LSB 0 +#define ADC_INTF_FIFO_ACCESS "RW" +// ============================================================================= +// Register : ADC_INTS +// Description : Interrupt status after masking & forcing +#define ADC_INTS_OFFSET 0x00000020 +#define ADC_INTS_BITS 0x00000001 +#define ADC_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ADC_INTS_FIFO +// Description : Triggered when the sample FIFO reaches a certain level. +// This level can be programmed via the FCS_THRESH field. +#define ADC_INTS_FIFO_RESET 0x0 +#define ADC_INTS_FIFO_BITS 0x00000001 +#define ADC_INTS_FIFO_MSB 0 +#define ADC_INTS_FIFO_LSB 0 +#define ADC_INTS_FIFO_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_ADC_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h new file mode 100644 index 0000000000..39451ac22c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/addressmap.h @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _ADDRESSMAP_H_ +#define _ADDRESSMAP_H_ + +// Register address offsets for atomic RMW aliases +#define REG_ALIAS_RW_BITS (0x0u << 12u) +#define REG_ALIAS_XOR_BITS (0x1u << 12u) +#define REG_ALIAS_SET_BITS (0x2u << 12u) +#define REG_ALIAS_CLR_BITS (0x3u << 12u) + +#define ROM_BASE 0x00000000 +#define XIP_BASE 0x10000000 +#define XIP_MAIN_BASE 0x10000000 +#define XIP_NOALLOC_BASE 0x11000000 +#define XIP_NOCACHE_BASE 0x12000000 +#define XIP_NOCACHE_NOALLOC_BASE 0x13000000 +#define XIP_CTRL_BASE 0x14000000 +#define XIP_SRAM_BASE 0x15000000 +#define XIP_SRAM_END 0x15004000 +#define XIP_SSI_BASE 0x18000000 +#define SRAM_BASE 0x20000000 +#define SRAM_STRIPED_BASE 0x20000000 +#define SRAM_STRIPED_END 0x20040000 +#define SRAM4_BASE 0x20040000 +#define SRAM5_BASE 0x20041000 +#define SRAM_END 0x20042000 +#define SRAM0_BASE 0x21000000 +#define SRAM1_BASE 0x21010000 +#define SRAM2_BASE 0x21020000 +#define SRAM3_BASE 0x21030000 +#define SYSINFO_BASE 0x40000000 +#define SYSCFG_BASE 0x40004000 +#define CLOCKS_BASE 0x40008000 +#define RESETS_BASE 0x4000c000 +#define PSM_BASE 0x40010000 +#define IO_BANK0_BASE 0x40014000 +#define IO_QSPI_BASE 0x40018000 +#define PADS_BANK0_BASE 0x4001c000 +#define PADS_QSPI_BASE 0x40020000 +#define XOSC_BASE 0x40024000 +#define PLL_SYS_BASE 0x40028000 +#define PLL_USB_BASE 0x4002c000 +#define BUSCTRL_BASE 0x40030000 +#define UART0_BASE 0x40034000 +#define UART1_BASE 0x40038000 +#define SPI0_BASE 0x4003c000 +#define SPI1_BASE 0x40040000 +#define I2C0_BASE 0x40044000 +#define I2C1_BASE 0x40048000 +#define ADC_BASE 0x4004c000 +#define PWM_BASE 0x40050000 +#define TIMER_BASE 0x40054000 +#define WATCHDOG_BASE 0x40058000 +#define RTC_BASE 0x4005c000 +#define ROSC_BASE 0x40060000 +#define VREG_AND_CHIP_RESET_BASE 0x40064000 +#define TBMAN_BASE 0x4006c000 +#define DMA_BASE 0x50000000 +#define USBCTRL_DPRAM_BASE 0x50100000 +#define USBCTRL_BASE 0x50100000 +#define USBCTRL_REGS_BASE 0x50110000 +#define PIO0_BASE 0x50200000 +#define PIO1_BASE 0x50300000 +#define XIP_AUX_BASE 0x50400000 +#define SIO_BASE 0xd0000000 +#define PPB_BASE 0xe0000000 + +#endif // _ADDRESSMAP_H_ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/busctrl.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/busctrl.h new file mode 100644 index 0000000000..6c02aee54a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/busctrl.h @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : BUSCTRL +// Version : 1 +// Bus type : apb +// Description : Register block for busfabric control signals and performance +// counters +// ============================================================================= +#ifndef HARDWARE_REGS_BUSCTRL_DEFINED +#define HARDWARE_REGS_BUSCTRL_DEFINED +// ============================================================================= +// Register : BUSCTRL_BUS_PRIORITY +// Description : Set the priority of each master for bus arbitration. +#define BUSCTRL_BUS_PRIORITY_OFFSET 0x00000000 +#define BUSCTRL_BUS_PRIORITY_BITS 0x00001111 +#define BUSCTRL_BUS_PRIORITY_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : BUSCTRL_BUS_PRIORITY_DMA_W +// Description : 0 - low priority, 1 - high priority +#define BUSCTRL_BUS_PRIORITY_DMA_W_RESET 0x0 +#define BUSCTRL_BUS_PRIORITY_DMA_W_BITS 0x00001000 +#define BUSCTRL_BUS_PRIORITY_DMA_W_MSB 12 +#define BUSCTRL_BUS_PRIORITY_DMA_W_LSB 12 +#define BUSCTRL_BUS_PRIORITY_DMA_W_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : BUSCTRL_BUS_PRIORITY_DMA_R +// Description : 0 - low priority, 1 - high priority +#define BUSCTRL_BUS_PRIORITY_DMA_R_RESET 0x0 +#define BUSCTRL_BUS_PRIORITY_DMA_R_BITS 0x00000100 +#define BUSCTRL_BUS_PRIORITY_DMA_R_MSB 8 +#define BUSCTRL_BUS_PRIORITY_DMA_R_LSB 8 +#define BUSCTRL_BUS_PRIORITY_DMA_R_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : BUSCTRL_BUS_PRIORITY_PROC1 +// Description : 0 - low priority, 1 - high priority +#define BUSCTRL_BUS_PRIORITY_PROC1_RESET 0x0 +#define BUSCTRL_BUS_PRIORITY_PROC1_BITS 0x00000010 +#define BUSCTRL_BUS_PRIORITY_PROC1_MSB 4 +#define BUSCTRL_BUS_PRIORITY_PROC1_LSB 4 +#define BUSCTRL_BUS_PRIORITY_PROC1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : BUSCTRL_BUS_PRIORITY_PROC0 +// Description : 0 - low priority, 1 - high priority +#define BUSCTRL_BUS_PRIORITY_PROC0_RESET 0x0 +#define BUSCTRL_BUS_PRIORITY_PROC0_BITS 0x00000001 +#define BUSCTRL_BUS_PRIORITY_PROC0_MSB 0 +#define BUSCTRL_BUS_PRIORITY_PROC0_LSB 0 +#define BUSCTRL_BUS_PRIORITY_PROC0_ACCESS "RW" +// ============================================================================= +// Register : BUSCTRL_BUS_PRIORITY_ACK +// Description : Bus priority acknowledge +// Goes to 1 once all arbiters have registered the new global +// priority levels. +// Arbiters update their local priority when servicing a new +// nonsequential access. +// In normal circumstances this will happen almost immediately. +#define BUSCTRL_BUS_PRIORITY_ACK_OFFSET 0x00000004 +#define BUSCTRL_BUS_PRIORITY_ACK_BITS 0x00000001 +#define BUSCTRL_BUS_PRIORITY_ACK_RESET 0x00000000 +#define BUSCTRL_BUS_PRIORITY_ACK_MSB 0 +#define BUSCTRL_BUS_PRIORITY_ACK_LSB 0 +#define BUSCTRL_BUS_PRIORITY_ACK_ACCESS "RO" +// ============================================================================= +// Register : BUSCTRL_PERFCTR0 +// Description : Bus fabric performance counter 0 +// Busfabric saturating performance counter 0 +// Count some event signal from the busfabric arbiters. +// Write any value to clear. Select an event to count using +// PERFSEL0 +#define BUSCTRL_PERFCTR0_OFFSET 0x00000008 +#define BUSCTRL_PERFCTR0_BITS 0x00ffffff +#define BUSCTRL_PERFCTR0_RESET 0x00000000 +#define BUSCTRL_PERFCTR0_MSB 23 +#define BUSCTRL_PERFCTR0_LSB 0 +#define BUSCTRL_PERFCTR0_ACCESS "WC" +// ============================================================================= +// Register : BUSCTRL_PERFSEL0 +// Description : Bus fabric performance event select for PERFCTR0 +// Select a performance event for PERFCTR0 +#define BUSCTRL_PERFSEL0_OFFSET 0x0000000c +#define BUSCTRL_PERFSEL0_BITS 0x0000001f +#define BUSCTRL_PERFSEL0_RESET 0x0000001f +#define BUSCTRL_PERFSEL0_MSB 4 +#define BUSCTRL_PERFSEL0_LSB 0 +#define BUSCTRL_PERFSEL0_ACCESS "RW" +// ============================================================================= +// Register : BUSCTRL_PERFCTR1 +// Description : Bus fabric performance counter 1 +// Busfabric saturating performance counter 1 +// Count some event signal from the busfabric arbiters. +// Write any value to clear. Select an event to count using +// PERFSEL1 +#define BUSCTRL_PERFCTR1_OFFSET 0x00000010 +#define BUSCTRL_PERFCTR1_BITS 0x00ffffff +#define BUSCTRL_PERFCTR1_RESET 0x00000000 +#define BUSCTRL_PERFCTR1_MSB 23 +#define BUSCTRL_PERFCTR1_LSB 0 +#define BUSCTRL_PERFCTR1_ACCESS "WC" +// ============================================================================= +// Register : BUSCTRL_PERFSEL1 +// Description : Bus fabric performance event select for PERFCTR1 +// Select a performance event for PERFCTR1 +#define BUSCTRL_PERFSEL1_OFFSET 0x00000014 +#define BUSCTRL_PERFSEL1_BITS 0x0000001f +#define BUSCTRL_PERFSEL1_RESET 0x0000001f +#define BUSCTRL_PERFSEL1_MSB 4 +#define BUSCTRL_PERFSEL1_LSB 0 +#define BUSCTRL_PERFSEL1_ACCESS "RW" +// ============================================================================= +// Register : BUSCTRL_PERFCTR2 +// Description : Bus fabric performance counter 2 +// Busfabric saturating performance counter 2 +// Count some event signal from the busfabric arbiters. +// Write any value to clear. Select an event to count using +// PERFSEL2 +#define BUSCTRL_PERFCTR2_OFFSET 0x00000018 +#define BUSCTRL_PERFCTR2_BITS 0x00ffffff +#define BUSCTRL_PERFCTR2_RESET 0x00000000 +#define BUSCTRL_PERFCTR2_MSB 23 +#define BUSCTRL_PERFCTR2_LSB 0 +#define BUSCTRL_PERFCTR2_ACCESS "WC" +// ============================================================================= +// Register : BUSCTRL_PERFSEL2 +// Description : Bus fabric performance event select for PERFCTR2 +// Select a performance event for PERFCTR2 +#define BUSCTRL_PERFSEL2_OFFSET 0x0000001c +#define BUSCTRL_PERFSEL2_BITS 0x0000001f +#define BUSCTRL_PERFSEL2_RESET 0x0000001f +#define BUSCTRL_PERFSEL2_MSB 4 +#define BUSCTRL_PERFSEL2_LSB 0 +#define BUSCTRL_PERFSEL2_ACCESS "RW" +// ============================================================================= +// Register : BUSCTRL_PERFCTR3 +// Description : Bus fabric performance counter 3 +// Busfabric saturating performance counter 3 +// Count some event signal from the busfabric arbiters. +// Write any value to clear. Select an event to count using +// PERFSEL3 +#define BUSCTRL_PERFCTR3_OFFSET 0x00000020 +#define BUSCTRL_PERFCTR3_BITS 0x00ffffff +#define BUSCTRL_PERFCTR3_RESET 0x00000000 +#define BUSCTRL_PERFCTR3_MSB 23 +#define BUSCTRL_PERFCTR3_LSB 0 +#define BUSCTRL_PERFCTR3_ACCESS "WC" +// ============================================================================= +// Register : BUSCTRL_PERFSEL3 +// Description : Bus fabric performance event select for PERFCTR3 +// Select a performance event for PERFCTR3 +#define BUSCTRL_PERFSEL3_OFFSET 0x00000024 +#define BUSCTRL_PERFSEL3_BITS 0x0000001f +#define BUSCTRL_PERFSEL3_RESET 0x0000001f +#define BUSCTRL_PERFSEL3_MSB 4 +#define BUSCTRL_PERFSEL3_LSB 0 +#define BUSCTRL_PERFSEL3_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_BUSCTRL_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/clocks.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/clocks.h new file mode 100644 index 0000000000..1b44490f7c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/clocks.h @@ -0,0 +1,2359 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : CLOCKS +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_CLOCKS_DEFINED +#define HARDWARE_REGS_CLOCKS_DEFINED +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT0_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_GPOUT0_CTRL_OFFSET 0x00000000 +#define CLOCKS_CLK_GPOUT0_CTRL_BITS 0x00131de0 +#define CLOCKS_CLK_GPOUT0_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_GPOUT0_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_GPOUT0_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_GPOUT0_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_GPOUT0_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_GPOUT0_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_GPOUT0_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_GPOUT0_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_GPOUT0_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_CTRL_DC50 +// Description : Enables duty cycle correction for odd divisors +#define CLOCKS_CLK_GPOUT0_CTRL_DC50_RESET 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_DC50_BITS 0x00001000 +#define CLOCKS_CLK_GPOUT0_CTRL_DC50_MSB 12 +#define CLOCKS_CLK_GPOUT0_CTRL_DC50_LSB 12 +#define CLOCKS_CLK_GPOUT0_CTRL_DC50_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_GPOUT0_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_GPOUT0_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_GPOUT0_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_GPOUT0_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_GPOUT0_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_GPOUT0_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_GPOUT0_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_GPOUT0_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_sys +// 0x1 -> clksrc_gpin0 +// 0x2 -> clksrc_gpin1 +// 0x3 -> clksrc_pll_usb +// 0x4 -> rosc_clksrc +// 0x5 -> xosc_clksrc +// 0x6 -> clk_sys +// 0x7 -> clk_usb +// 0x8 -> clk_adc +// 0x9 -> clk_rtc +// 0xa -> clk_ref +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_BITS 0x000001e0 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_MSB 8 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x0 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x1 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x2 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x3 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_ROSC_CLKSRC 0x4 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x5 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_SYS 0x6 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_USB 0x7 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_ADC 0x8 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_RTC 0x9 +#define CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLK_REF 0xa +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT0_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_GPOUT0_DIV_OFFSET 0x00000004 +#define CLOCKS_CLK_GPOUT0_DIV_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT0_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_GPOUT0_DIV_INT_RESET 0x000001 +#define CLOCKS_CLK_GPOUT0_DIV_INT_BITS 0xffffff00 +#define CLOCKS_CLK_GPOUT0_DIV_INT_MSB 31 +#define CLOCKS_CLK_GPOUT0_DIV_INT_LSB 8 +#define CLOCKS_CLK_GPOUT0_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT0_DIV_FRAC +// Description : Fractional component of the divisor +#define CLOCKS_CLK_GPOUT0_DIV_FRAC_RESET 0x00 +#define CLOCKS_CLK_GPOUT0_DIV_FRAC_BITS 0x000000ff +#define CLOCKS_CLK_GPOUT0_DIV_FRAC_MSB 7 +#define CLOCKS_CLK_GPOUT0_DIV_FRAC_LSB 0 +#define CLOCKS_CLK_GPOUT0_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT0_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_GPOUT0_SELECTED_OFFSET 0x00000008 +#define CLOCKS_CLK_GPOUT0_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT0_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_GPOUT0_SELECTED_MSB 31 +#define CLOCKS_CLK_GPOUT0_SELECTED_LSB 0 +#define CLOCKS_CLK_GPOUT0_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT1_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_GPOUT1_CTRL_OFFSET 0x0000000c +#define CLOCKS_CLK_GPOUT1_CTRL_BITS 0x00131de0 +#define CLOCKS_CLK_GPOUT1_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_GPOUT1_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_GPOUT1_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_GPOUT1_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_GPOUT1_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_GPOUT1_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_GPOUT1_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_GPOUT1_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_GPOUT1_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_CTRL_DC50 +// Description : Enables duty cycle correction for odd divisors +#define CLOCKS_CLK_GPOUT1_CTRL_DC50_RESET 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_DC50_BITS 0x00001000 +#define CLOCKS_CLK_GPOUT1_CTRL_DC50_MSB 12 +#define CLOCKS_CLK_GPOUT1_CTRL_DC50_LSB 12 +#define CLOCKS_CLK_GPOUT1_CTRL_DC50_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_GPOUT1_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_GPOUT1_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_GPOUT1_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_GPOUT1_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_GPOUT1_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_GPOUT1_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_GPOUT1_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_GPOUT1_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_sys +// 0x1 -> clksrc_gpin0 +// 0x2 -> clksrc_gpin1 +// 0x3 -> clksrc_pll_usb +// 0x4 -> rosc_clksrc +// 0x5 -> xosc_clksrc +// 0x6 -> clk_sys +// 0x7 -> clk_usb +// 0x8 -> clk_adc +// 0x9 -> clk_rtc +// 0xa -> clk_ref +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_BITS 0x000001e0 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_MSB 8 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x0 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x1 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x2 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x3 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_ROSC_CLKSRC 0x4 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x5 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_SYS 0x6 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_USB 0x7 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_ADC 0x8 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_RTC 0x9 +#define CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLK_REF 0xa +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT1_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_GPOUT1_DIV_OFFSET 0x00000010 +#define CLOCKS_CLK_GPOUT1_DIV_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT1_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_GPOUT1_DIV_INT_RESET 0x000001 +#define CLOCKS_CLK_GPOUT1_DIV_INT_BITS 0xffffff00 +#define CLOCKS_CLK_GPOUT1_DIV_INT_MSB 31 +#define CLOCKS_CLK_GPOUT1_DIV_INT_LSB 8 +#define CLOCKS_CLK_GPOUT1_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT1_DIV_FRAC +// Description : Fractional component of the divisor +#define CLOCKS_CLK_GPOUT1_DIV_FRAC_RESET 0x00 +#define CLOCKS_CLK_GPOUT1_DIV_FRAC_BITS 0x000000ff +#define CLOCKS_CLK_GPOUT1_DIV_FRAC_MSB 7 +#define CLOCKS_CLK_GPOUT1_DIV_FRAC_LSB 0 +#define CLOCKS_CLK_GPOUT1_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT1_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_GPOUT1_SELECTED_OFFSET 0x00000014 +#define CLOCKS_CLK_GPOUT1_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT1_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_GPOUT1_SELECTED_MSB 31 +#define CLOCKS_CLK_GPOUT1_SELECTED_LSB 0 +#define CLOCKS_CLK_GPOUT1_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT2_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_GPOUT2_CTRL_OFFSET 0x00000018 +#define CLOCKS_CLK_GPOUT2_CTRL_BITS 0x00131de0 +#define CLOCKS_CLK_GPOUT2_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_GPOUT2_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_GPOUT2_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_GPOUT2_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_GPOUT2_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_GPOUT2_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_GPOUT2_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_GPOUT2_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_GPOUT2_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_CTRL_DC50 +// Description : Enables duty cycle correction for odd divisors +#define CLOCKS_CLK_GPOUT2_CTRL_DC50_RESET 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_DC50_BITS 0x00001000 +#define CLOCKS_CLK_GPOUT2_CTRL_DC50_MSB 12 +#define CLOCKS_CLK_GPOUT2_CTRL_DC50_LSB 12 +#define CLOCKS_CLK_GPOUT2_CTRL_DC50_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_GPOUT2_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_GPOUT2_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_GPOUT2_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_GPOUT2_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_GPOUT2_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_GPOUT2_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_GPOUT2_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_GPOUT2_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_sys +// 0x1 -> clksrc_gpin0 +// 0x2 -> clksrc_gpin1 +// 0x3 -> clksrc_pll_usb +// 0x4 -> rosc_clksrc_ph +// 0x5 -> xosc_clksrc +// 0x6 -> clk_sys +// 0x7 -> clk_usb +// 0x8 -> clk_adc +// 0x9 -> clk_rtc +// 0xa -> clk_ref +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_BITS 0x000001e0 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_MSB 8 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x0 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x1 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x2 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x3 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH 0x4 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x5 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLK_SYS 0x6 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLK_USB 0x7 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLK_ADC 0x8 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLK_RTC 0x9 +#define CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLK_REF 0xa +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT2_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_GPOUT2_DIV_OFFSET 0x0000001c +#define CLOCKS_CLK_GPOUT2_DIV_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT2_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_GPOUT2_DIV_INT_RESET 0x000001 +#define CLOCKS_CLK_GPOUT2_DIV_INT_BITS 0xffffff00 +#define CLOCKS_CLK_GPOUT2_DIV_INT_MSB 31 +#define CLOCKS_CLK_GPOUT2_DIV_INT_LSB 8 +#define CLOCKS_CLK_GPOUT2_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT2_DIV_FRAC +// Description : Fractional component of the divisor +#define CLOCKS_CLK_GPOUT2_DIV_FRAC_RESET 0x00 +#define CLOCKS_CLK_GPOUT2_DIV_FRAC_BITS 0x000000ff +#define CLOCKS_CLK_GPOUT2_DIV_FRAC_MSB 7 +#define CLOCKS_CLK_GPOUT2_DIV_FRAC_LSB 0 +#define CLOCKS_CLK_GPOUT2_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT2_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_GPOUT2_SELECTED_OFFSET 0x00000020 +#define CLOCKS_CLK_GPOUT2_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT2_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_GPOUT2_SELECTED_MSB 31 +#define CLOCKS_CLK_GPOUT2_SELECTED_LSB 0 +#define CLOCKS_CLK_GPOUT2_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT3_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_GPOUT3_CTRL_OFFSET 0x00000024 +#define CLOCKS_CLK_GPOUT3_CTRL_BITS 0x00131de0 +#define CLOCKS_CLK_GPOUT3_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_GPOUT3_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_GPOUT3_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_GPOUT3_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_GPOUT3_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_GPOUT3_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_GPOUT3_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_GPOUT3_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_GPOUT3_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_CTRL_DC50 +// Description : Enables duty cycle correction for odd divisors +#define CLOCKS_CLK_GPOUT3_CTRL_DC50_RESET 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_DC50_BITS 0x00001000 +#define CLOCKS_CLK_GPOUT3_CTRL_DC50_MSB 12 +#define CLOCKS_CLK_GPOUT3_CTRL_DC50_LSB 12 +#define CLOCKS_CLK_GPOUT3_CTRL_DC50_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_GPOUT3_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_GPOUT3_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_GPOUT3_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_GPOUT3_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_GPOUT3_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_GPOUT3_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_GPOUT3_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_GPOUT3_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_sys +// 0x1 -> clksrc_gpin0 +// 0x2 -> clksrc_gpin1 +// 0x3 -> clksrc_pll_usb +// 0x4 -> rosc_clksrc_ph +// 0x5 -> xosc_clksrc +// 0x6 -> clk_sys +// 0x7 -> clk_usb +// 0x8 -> clk_adc +// 0x9 -> clk_rtc +// 0xa -> clk_ref +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_BITS 0x000001e0 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_MSB 8 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x0 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x1 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x2 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x3 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH 0x4 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x5 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLK_SYS 0x6 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLK_USB 0x7 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLK_ADC 0x8 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLK_RTC 0x9 +#define CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLK_REF 0xa +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT3_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_GPOUT3_DIV_OFFSET 0x00000028 +#define CLOCKS_CLK_GPOUT3_DIV_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT3_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_GPOUT3_DIV_INT_RESET 0x000001 +#define CLOCKS_CLK_GPOUT3_DIV_INT_BITS 0xffffff00 +#define CLOCKS_CLK_GPOUT3_DIV_INT_MSB 31 +#define CLOCKS_CLK_GPOUT3_DIV_INT_LSB 8 +#define CLOCKS_CLK_GPOUT3_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_GPOUT3_DIV_FRAC +// Description : Fractional component of the divisor +#define CLOCKS_CLK_GPOUT3_DIV_FRAC_RESET 0x00 +#define CLOCKS_CLK_GPOUT3_DIV_FRAC_BITS 0x000000ff +#define CLOCKS_CLK_GPOUT3_DIV_FRAC_MSB 7 +#define CLOCKS_CLK_GPOUT3_DIV_FRAC_LSB 0 +#define CLOCKS_CLK_GPOUT3_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_GPOUT3_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_GPOUT3_SELECTED_OFFSET 0x0000002c +#define CLOCKS_CLK_GPOUT3_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_GPOUT3_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_GPOUT3_SELECTED_MSB 31 +#define CLOCKS_CLK_GPOUT3_SELECTED_LSB 0 +#define CLOCKS_CLK_GPOUT3_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_REF_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_REF_CTRL_OFFSET 0x00000030 +#define CLOCKS_CLK_REF_CTRL_BITS 0x00000063 +#define CLOCKS_CLK_REF_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_REF_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_usb +// 0x1 -> clksrc_gpin0 +// 0x2 -> clksrc_gpin1 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_BITS 0x00000060 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_MSB 6 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x0 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x1 +#define CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x2 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_REF_CTRL_SRC +// Description : Selects the clock source glitchlessly, can be changed +// on-the-fly +// 0x0 -> rosc_clksrc_ph +// 0x1 -> clksrc_clk_ref_aux +// 0x2 -> xosc_clksrc +#define CLOCKS_CLK_REF_CTRL_SRC_RESET "-" +#define CLOCKS_CLK_REF_CTRL_SRC_BITS 0x00000003 +#define CLOCKS_CLK_REF_CTRL_SRC_MSB 1 +#define CLOCKS_CLK_REF_CTRL_SRC_LSB 0 +#define CLOCKS_CLK_REF_CTRL_SRC_ACCESS "RW" +#define CLOCKS_CLK_REF_CTRL_SRC_VALUE_ROSC_CLKSRC_PH 0x0 +#define CLOCKS_CLK_REF_CTRL_SRC_VALUE_CLKSRC_CLK_REF_AUX 0x1 +#define CLOCKS_CLK_REF_CTRL_SRC_VALUE_XOSC_CLKSRC 0x2 +// ============================================================================= +// Register : CLOCKS_CLK_REF_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_REF_DIV_OFFSET 0x00000034 +#define CLOCKS_CLK_REF_DIV_BITS 0x00000300 +#define CLOCKS_CLK_REF_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_REF_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_REF_DIV_INT_RESET 0x1 +#define CLOCKS_CLK_REF_DIV_INT_BITS 0x00000300 +#define CLOCKS_CLK_REF_DIV_INT_MSB 9 +#define CLOCKS_CLK_REF_DIV_INT_LSB 8 +#define CLOCKS_CLK_REF_DIV_INT_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_REF_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_REF_SELECTED_OFFSET 0x00000038 +#define CLOCKS_CLK_REF_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_REF_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_REF_SELECTED_MSB 31 +#define CLOCKS_CLK_REF_SELECTED_LSB 0 +#define CLOCKS_CLK_REF_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_SYS_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_SYS_CTRL_OFFSET 0x0000003c +#define CLOCKS_CLK_SYS_CTRL_BITS 0x000000e1 +#define CLOCKS_CLK_SYS_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_sys +// 0x1 -> clksrc_pll_usb +// 0x2 -> rosc_clksrc +// 0x3 -> xosc_clksrc +// 0x4 -> clksrc_gpin0 +// 0x5 -> clksrc_gpin1 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_BITS 0x000000e0 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_MSB 7 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x0 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x1 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_ROSC_CLKSRC 0x2 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x3 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x4 +#define CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x5 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_CTRL_SRC +// Description : Selects the clock source glitchlessly, can be changed +// on-the-fly +// 0x0 -> clk_ref +// 0x1 -> clksrc_clk_sys_aux +#define CLOCKS_CLK_SYS_CTRL_SRC_RESET 0x0 +#define CLOCKS_CLK_SYS_CTRL_SRC_BITS 0x00000001 +#define CLOCKS_CLK_SYS_CTRL_SRC_MSB 0 +#define CLOCKS_CLK_SYS_CTRL_SRC_LSB 0 +#define CLOCKS_CLK_SYS_CTRL_SRC_ACCESS "RW" +#define CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLK_REF 0x0 +#define CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX 0x1 +// ============================================================================= +// Register : CLOCKS_CLK_SYS_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_SYS_DIV_OFFSET 0x00000040 +#define CLOCKS_CLK_SYS_DIV_BITS 0xffffffff +#define CLOCKS_CLK_SYS_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_SYS_DIV_INT_RESET 0x000001 +#define CLOCKS_CLK_SYS_DIV_INT_BITS 0xffffff00 +#define CLOCKS_CLK_SYS_DIV_INT_MSB 31 +#define CLOCKS_CLK_SYS_DIV_INT_LSB 8 +#define CLOCKS_CLK_SYS_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_DIV_FRAC +// Description : Fractional component of the divisor +#define CLOCKS_CLK_SYS_DIV_FRAC_RESET 0x00 +#define CLOCKS_CLK_SYS_DIV_FRAC_BITS 0x000000ff +#define CLOCKS_CLK_SYS_DIV_FRAC_MSB 7 +#define CLOCKS_CLK_SYS_DIV_FRAC_LSB 0 +#define CLOCKS_CLK_SYS_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_SYS_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_SYS_SELECTED_OFFSET 0x00000044 +#define CLOCKS_CLK_SYS_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_SYS_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_SYS_SELECTED_MSB 31 +#define CLOCKS_CLK_SYS_SELECTED_LSB 0 +#define CLOCKS_CLK_SYS_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_PERI_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_PERI_CTRL_OFFSET 0x00000048 +#define CLOCKS_CLK_PERI_CTRL_BITS 0x00000ce0 +#define CLOCKS_CLK_PERI_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_PERI_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_PERI_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_PERI_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_PERI_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_PERI_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_PERI_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_PERI_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_PERI_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_PERI_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_PERI_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_PERI_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_PERI_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_PERI_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clk_sys +// 0x1 -> clksrc_pll_sys +// 0x2 -> clksrc_pll_usb +// 0x3 -> rosc_clksrc_ph +// 0x4 -> xosc_clksrc +// 0x5 -> clksrc_gpin0 +// 0x6 -> clksrc_gpin1 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_BITS 0x000000e0 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_MSB 7 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS 0x0 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x1 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x2 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH 0x3 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x4 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x5 +#define CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x6 +// ============================================================================= +// Register : CLOCKS_CLK_PERI_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_PERI_SELECTED_OFFSET 0x00000050 +#define CLOCKS_CLK_PERI_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_PERI_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_PERI_SELECTED_MSB 31 +#define CLOCKS_CLK_PERI_SELECTED_LSB 0 +#define CLOCKS_CLK_PERI_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_USB_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_USB_CTRL_OFFSET 0x00000054 +#define CLOCKS_CLK_USB_CTRL_BITS 0x00130ce0 +#define CLOCKS_CLK_USB_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_USB_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_USB_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_USB_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_USB_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_USB_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_USB_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_USB_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_USB_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_USB_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_USB_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_USB_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_USB_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_USB_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_USB_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_USB_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_USB_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_USB_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_USB_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_USB_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_USB_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_USB_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_USB_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_USB_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_USB_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_USB_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_usb +// 0x1 -> clksrc_pll_sys +// 0x2 -> rosc_clksrc_ph +// 0x3 -> xosc_clksrc +// 0x4 -> clksrc_gpin0 +// 0x5 -> clksrc_gpin1 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_BITS 0x000000e0 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_MSB 7 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x0 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x1 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH 0x2 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x3 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x4 +#define CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x5 +// ============================================================================= +// Register : CLOCKS_CLK_USB_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_USB_DIV_OFFSET 0x00000058 +#define CLOCKS_CLK_USB_DIV_BITS 0x00000300 +#define CLOCKS_CLK_USB_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_USB_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_USB_DIV_INT_RESET 0x1 +#define CLOCKS_CLK_USB_DIV_INT_BITS 0x00000300 +#define CLOCKS_CLK_USB_DIV_INT_MSB 9 +#define CLOCKS_CLK_USB_DIV_INT_LSB 8 +#define CLOCKS_CLK_USB_DIV_INT_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_USB_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_USB_SELECTED_OFFSET 0x0000005c +#define CLOCKS_CLK_USB_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_USB_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_USB_SELECTED_MSB 31 +#define CLOCKS_CLK_USB_SELECTED_LSB 0 +#define CLOCKS_CLK_USB_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_ADC_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_ADC_CTRL_OFFSET 0x00000060 +#define CLOCKS_CLK_ADC_CTRL_BITS 0x00130ce0 +#define CLOCKS_CLK_ADC_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_ADC_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_ADC_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_ADC_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_ADC_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_ADC_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_ADC_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_ADC_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_ADC_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_ADC_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_ADC_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_ADC_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_ADC_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_ADC_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_ADC_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_ADC_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_ADC_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_ADC_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_ADC_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_ADC_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_ADC_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_ADC_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_ADC_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_ADC_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_ADC_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_ADC_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_usb +// 0x1 -> clksrc_pll_sys +// 0x2 -> rosc_clksrc_ph +// 0x3 -> xosc_clksrc +// 0x4 -> clksrc_gpin0 +// 0x5 -> clksrc_gpin1 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_BITS 0x000000e0 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_MSB 7 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x0 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x1 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH 0x2 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x3 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x4 +#define CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x5 +// ============================================================================= +// Register : CLOCKS_CLK_ADC_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_ADC_DIV_OFFSET 0x00000064 +#define CLOCKS_CLK_ADC_DIV_BITS 0x00000300 +#define CLOCKS_CLK_ADC_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_ADC_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_ADC_DIV_INT_RESET 0x1 +#define CLOCKS_CLK_ADC_DIV_INT_BITS 0x00000300 +#define CLOCKS_CLK_ADC_DIV_INT_MSB 9 +#define CLOCKS_CLK_ADC_DIV_INT_LSB 8 +#define CLOCKS_CLK_ADC_DIV_INT_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_ADC_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_ADC_SELECTED_OFFSET 0x00000068 +#define CLOCKS_CLK_ADC_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_ADC_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_ADC_SELECTED_MSB 31 +#define CLOCKS_CLK_ADC_SELECTED_LSB 0 +#define CLOCKS_CLK_ADC_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_RTC_CTRL +// Description : Clock control, can be changed on-the-fly (except for auxsrc) +#define CLOCKS_CLK_RTC_CTRL_OFFSET 0x0000006c +#define CLOCKS_CLK_RTC_CTRL_BITS 0x00130ce0 +#define CLOCKS_CLK_RTC_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_CTRL_NUDGE +// Description : An edge on this signal shifts the phase of the output by 1 +// cycle of the input clock +// This can be done at any time +#define CLOCKS_CLK_RTC_CTRL_NUDGE_RESET 0x0 +#define CLOCKS_CLK_RTC_CTRL_NUDGE_BITS 0x00100000 +#define CLOCKS_CLK_RTC_CTRL_NUDGE_MSB 20 +#define CLOCKS_CLK_RTC_CTRL_NUDGE_LSB 20 +#define CLOCKS_CLK_RTC_CTRL_NUDGE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_CTRL_PHASE +// Description : This delays the enable signal by up to 3 cycles of the input +// clock +// This must be set before the clock is enabled to have any effect +#define CLOCKS_CLK_RTC_CTRL_PHASE_RESET 0x0 +#define CLOCKS_CLK_RTC_CTRL_PHASE_BITS 0x00030000 +#define CLOCKS_CLK_RTC_CTRL_PHASE_MSB 17 +#define CLOCKS_CLK_RTC_CTRL_PHASE_LSB 16 +#define CLOCKS_CLK_RTC_CTRL_PHASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_CTRL_ENABLE +// Description : Starts and stops the clock generator cleanly +#define CLOCKS_CLK_RTC_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_RTC_CTRL_ENABLE_BITS 0x00000800 +#define CLOCKS_CLK_RTC_CTRL_ENABLE_MSB 11 +#define CLOCKS_CLK_RTC_CTRL_ENABLE_LSB 11 +#define CLOCKS_CLK_RTC_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_CTRL_KILL +// Description : Asynchronously kills the clock generator +#define CLOCKS_CLK_RTC_CTRL_KILL_RESET 0x0 +#define CLOCKS_CLK_RTC_CTRL_KILL_BITS 0x00000400 +#define CLOCKS_CLK_RTC_CTRL_KILL_MSB 10 +#define CLOCKS_CLK_RTC_CTRL_KILL_LSB 10 +#define CLOCKS_CLK_RTC_CTRL_KILL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_CTRL_AUXSRC +// Description : Selects the auxiliary clock source, will glitch when switching +// 0x0 -> clksrc_pll_usb +// 0x1 -> clksrc_pll_sys +// 0x2 -> rosc_clksrc_ph +// 0x3 -> xosc_clksrc +// 0x4 -> clksrc_gpin0 +// 0x5 -> clksrc_gpin1 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_RESET 0x0 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_BITS 0x000000e0 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_MSB 7 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_LSB 5 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_ACCESS "RW" +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB 0x0 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS 0x1 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH 0x2 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC 0x3 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 0x4 +#define CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 0x5 +// ============================================================================= +// Register : CLOCKS_CLK_RTC_DIV +// Description : Clock divisor, can be changed on-the-fly +#define CLOCKS_CLK_RTC_DIV_OFFSET 0x00000070 +#define CLOCKS_CLK_RTC_DIV_BITS 0xffffffff +#define CLOCKS_CLK_RTC_DIV_RESET 0x00000100 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_DIV_INT +// Description : Integer component of the divisor, 0 -> divide by 2^16 +#define CLOCKS_CLK_RTC_DIV_INT_RESET 0x000001 +#define CLOCKS_CLK_RTC_DIV_INT_BITS 0xffffff00 +#define CLOCKS_CLK_RTC_DIV_INT_MSB 31 +#define CLOCKS_CLK_RTC_DIV_INT_LSB 8 +#define CLOCKS_CLK_RTC_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_RTC_DIV_FRAC +// Description : Fractional component of the divisor +#define CLOCKS_CLK_RTC_DIV_FRAC_RESET 0x00 +#define CLOCKS_CLK_RTC_DIV_FRAC_BITS 0x000000ff +#define CLOCKS_CLK_RTC_DIV_FRAC_MSB 7 +#define CLOCKS_CLK_RTC_DIV_FRAC_LSB 0 +#define CLOCKS_CLK_RTC_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_RTC_SELECTED +// Description : Indicates which src is currently selected (one-hot) +#define CLOCKS_CLK_RTC_SELECTED_OFFSET 0x00000074 +#define CLOCKS_CLK_RTC_SELECTED_BITS 0xffffffff +#define CLOCKS_CLK_RTC_SELECTED_RESET 0x00000001 +#define CLOCKS_CLK_RTC_SELECTED_MSB 31 +#define CLOCKS_CLK_RTC_SELECTED_LSB 0 +#define CLOCKS_CLK_RTC_SELECTED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_CLK_SYS_RESUS_CTRL +// Description : None +#define CLOCKS_CLK_SYS_RESUS_CTRL_OFFSET 0x00000078 +#define CLOCKS_CLK_SYS_RESUS_CTRL_BITS 0x000111ff +#define CLOCKS_CLK_SYS_RESUS_CTRL_RESET 0x000000ff +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR +// Description : For clearing the resus after the fault that triggered it has +// been corrected +#define CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_RESET 0x0 +#define CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_BITS 0x00010000 +#define CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_MSB 16 +#define CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_LSB 16 +#define CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_RESUS_CTRL_FRCE +// Description : Force a resus, for test purposes only +#define CLOCKS_CLK_SYS_RESUS_CTRL_FRCE_RESET 0x0 +#define CLOCKS_CLK_SYS_RESUS_CTRL_FRCE_BITS 0x00001000 +#define CLOCKS_CLK_SYS_RESUS_CTRL_FRCE_MSB 12 +#define CLOCKS_CLK_SYS_RESUS_CTRL_FRCE_LSB 12 +#define CLOCKS_CLK_SYS_RESUS_CTRL_FRCE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE +// Description : Enable resus +#define CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE_RESET 0x0 +#define CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE_BITS 0x00000100 +#define CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE_MSB 8 +#define CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE_LSB 8 +#define CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_RESUS_CTRL_TIMEOUT +// Description : This is expressed as a number of clk_ref cycles +// and must be >= 2x clk_ref_freq/min_clk_tst_freq +#define CLOCKS_CLK_SYS_RESUS_CTRL_TIMEOUT_RESET 0xff +#define CLOCKS_CLK_SYS_RESUS_CTRL_TIMEOUT_BITS 0x000000ff +#define CLOCKS_CLK_SYS_RESUS_CTRL_TIMEOUT_MSB 7 +#define CLOCKS_CLK_SYS_RESUS_CTRL_TIMEOUT_LSB 0 +#define CLOCKS_CLK_SYS_RESUS_CTRL_TIMEOUT_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_CLK_SYS_RESUS_STATUS +// Description : None +#define CLOCKS_CLK_SYS_RESUS_STATUS_OFFSET 0x0000007c +#define CLOCKS_CLK_SYS_RESUS_STATUS_BITS 0x00000001 +#define CLOCKS_CLK_SYS_RESUS_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED +// Description : Clock has been resuscitated, correct the error then send +// ctrl_clear=1 +#define CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_RESET 0x0 +#define CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_BITS 0x00000001 +#define CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_MSB 0 +#define CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_LSB 0 +#define CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_FC0_REF_KHZ +// Description : Reference clock frequency in kHz +#define CLOCKS_FC0_REF_KHZ_OFFSET 0x00000080 +#define CLOCKS_FC0_REF_KHZ_BITS 0x000fffff +#define CLOCKS_FC0_REF_KHZ_RESET 0x00000000 +#define CLOCKS_FC0_REF_KHZ_MSB 19 +#define CLOCKS_FC0_REF_KHZ_LSB 0 +#define CLOCKS_FC0_REF_KHZ_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_FC0_MIN_KHZ +// Description : Minimum pass frequency in kHz. This is optional. Set to 0 if +// you are not using the pass/fail flags +#define CLOCKS_FC0_MIN_KHZ_OFFSET 0x00000084 +#define CLOCKS_FC0_MIN_KHZ_BITS 0x01ffffff +#define CLOCKS_FC0_MIN_KHZ_RESET 0x00000000 +#define CLOCKS_FC0_MIN_KHZ_MSB 24 +#define CLOCKS_FC0_MIN_KHZ_LSB 0 +#define CLOCKS_FC0_MIN_KHZ_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_FC0_MAX_KHZ +// Description : Maximum pass frequency in kHz. This is optional. Set to +// 0x1ffffff if you are not using the pass/fail flags +#define CLOCKS_FC0_MAX_KHZ_OFFSET 0x00000088 +#define CLOCKS_FC0_MAX_KHZ_BITS 0x01ffffff +#define CLOCKS_FC0_MAX_KHZ_RESET 0x01ffffff +#define CLOCKS_FC0_MAX_KHZ_MSB 24 +#define CLOCKS_FC0_MAX_KHZ_LSB 0 +#define CLOCKS_FC0_MAX_KHZ_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_FC0_DELAY +// Description : Delays the start of frequency counting to allow the mux to +// settle +// Delay is measured in multiples of the reference clock period +#define CLOCKS_FC0_DELAY_OFFSET 0x0000008c +#define CLOCKS_FC0_DELAY_BITS 0x00000007 +#define CLOCKS_FC0_DELAY_RESET 0x00000001 +#define CLOCKS_FC0_DELAY_MSB 2 +#define CLOCKS_FC0_DELAY_LSB 0 +#define CLOCKS_FC0_DELAY_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_FC0_INTERVAL +// Description : The test interval is 0.98us * 2**interval, but let's call it +// 1us * 2**interval +// The default gives a test interval of 250us +#define CLOCKS_FC0_INTERVAL_OFFSET 0x00000090 +#define CLOCKS_FC0_INTERVAL_BITS 0x0000000f +#define CLOCKS_FC0_INTERVAL_RESET 0x00000008 +#define CLOCKS_FC0_INTERVAL_MSB 3 +#define CLOCKS_FC0_INTERVAL_LSB 0 +#define CLOCKS_FC0_INTERVAL_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_FC0_SRC +// Description : Clock sent to frequency counter, set to 0 when not required +// Writing to this register initiates the frequency count +// 0x00 -> NULL +// 0x01 -> pll_sys_clksrc_primary +// 0x02 -> pll_usb_clksrc_primary +// 0x03 -> rosc_clksrc +// 0x04 -> rosc_clksrc_ph +// 0x05 -> xosc_clksrc +// 0x06 -> clksrc_gpin0 +// 0x07 -> clksrc_gpin1 +// 0x08 -> clk_ref +// 0x09 -> clk_sys +// 0x0a -> clk_peri +// 0x0b -> clk_usb +// 0x0c -> clk_adc +// 0x0d -> clk_rtc +#define CLOCKS_FC0_SRC_OFFSET 0x00000094 +#define CLOCKS_FC0_SRC_BITS 0x000000ff +#define CLOCKS_FC0_SRC_RESET 0x00000000 +#define CLOCKS_FC0_SRC_MSB 7 +#define CLOCKS_FC0_SRC_LSB 0 +#define CLOCKS_FC0_SRC_ACCESS "RW" +#define CLOCKS_FC0_SRC_VALUE_NULL 0x00 +#define CLOCKS_FC0_SRC_VALUE_PLL_SYS_CLKSRC_PRIMARY 0x01 +#define CLOCKS_FC0_SRC_VALUE_PLL_USB_CLKSRC_PRIMARY 0x02 +#define CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC 0x03 +#define CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC_PH 0x04 +#define CLOCKS_FC0_SRC_VALUE_XOSC_CLKSRC 0x05 +#define CLOCKS_FC0_SRC_VALUE_CLKSRC_GPIN0 0x06 +#define CLOCKS_FC0_SRC_VALUE_CLKSRC_GPIN1 0x07 +#define CLOCKS_FC0_SRC_VALUE_CLK_REF 0x08 +#define CLOCKS_FC0_SRC_VALUE_CLK_SYS 0x09 +#define CLOCKS_FC0_SRC_VALUE_CLK_PERI 0x0a +#define CLOCKS_FC0_SRC_VALUE_CLK_USB 0x0b +#define CLOCKS_FC0_SRC_VALUE_CLK_ADC 0x0c +#define CLOCKS_FC0_SRC_VALUE_CLK_RTC 0x0d +// ============================================================================= +// Register : CLOCKS_FC0_STATUS +// Description : Frequency counter status +#define CLOCKS_FC0_STATUS_OFFSET 0x00000098 +#define CLOCKS_FC0_STATUS_BITS 0x11111111 +#define CLOCKS_FC0_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_DIED +// Description : Test clock stopped during test +#define CLOCKS_FC0_STATUS_DIED_RESET 0x0 +#define CLOCKS_FC0_STATUS_DIED_BITS 0x10000000 +#define CLOCKS_FC0_STATUS_DIED_MSB 28 +#define CLOCKS_FC0_STATUS_DIED_LSB 28 +#define CLOCKS_FC0_STATUS_DIED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_FAST +// Description : Test clock faster than expected, only valid when status_done=1 +#define CLOCKS_FC0_STATUS_FAST_RESET 0x0 +#define CLOCKS_FC0_STATUS_FAST_BITS 0x01000000 +#define CLOCKS_FC0_STATUS_FAST_MSB 24 +#define CLOCKS_FC0_STATUS_FAST_LSB 24 +#define CLOCKS_FC0_STATUS_FAST_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_SLOW +// Description : Test clock slower than expected, only valid when status_done=1 +#define CLOCKS_FC0_STATUS_SLOW_RESET 0x0 +#define CLOCKS_FC0_STATUS_SLOW_BITS 0x00100000 +#define CLOCKS_FC0_STATUS_SLOW_MSB 20 +#define CLOCKS_FC0_STATUS_SLOW_LSB 20 +#define CLOCKS_FC0_STATUS_SLOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_FAIL +// Description : Test failed +#define CLOCKS_FC0_STATUS_FAIL_RESET 0x0 +#define CLOCKS_FC0_STATUS_FAIL_BITS 0x00010000 +#define CLOCKS_FC0_STATUS_FAIL_MSB 16 +#define CLOCKS_FC0_STATUS_FAIL_LSB 16 +#define CLOCKS_FC0_STATUS_FAIL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_WAITING +// Description : Waiting for test clock to start +#define CLOCKS_FC0_STATUS_WAITING_RESET 0x0 +#define CLOCKS_FC0_STATUS_WAITING_BITS 0x00001000 +#define CLOCKS_FC0_STATUS_WAITING_MSB 12 +#define CLOCKS_FC0_STATUS_WAITING_LSB 12 +#define CLOCKS_FC0_STATUS_WAITING_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_RUNNING +// Description : Test running +#define CLOCKS_FC0_STATUS_RUNNING_RESET 0x0 +#define CLOCKS_FC0_STATUS_RUNNING_BITS 0x00000100 +#define CLOCKS_FC0_STATUS_RUNNING_MSB 8 +#define CLOCKS_FC0_STATUS_RUNNING_LSB 8 +#define CLOCKS_FC0_STATUS_RUNNING_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_DONE +// Description : Test complete +#define CLOCKS_FC0_STATUS_DONE_RESET 0x0 +#define CLOCKS_FC0_STATUS_DONE_BITS 0x00000010 +#define CLOCKS_FC0_STATUS_DONE_MSB 4 +#define CLOCKS_FC0_STATUS_DONE_LSB 4 +#define CLOCKS_FC0_STATUS_DONE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_STATUS_PASS +// Description : Test passed +#define CLOCKS_FC0_STATUS_PASS_RESET 0x0 +#define CLOCKS_FC0_STATUS_PASS_BITS 0x00000001 +#define CLOCKS_FC0_STATUS_PASS_MSB 0 +#define CLOCKS_FC0_STATUS_PASS_LSB 0 +#define CLOCKS_FC0_STATUS_PASS_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_FC0_RESULT +// Description : Result of frequency measurement, only valid when status_done=1 +#define CLOCKS_FC0_RESULT_OFFSET 0x0000009c +#define CLOCKS_FC0_RESULT_BITS 0x3fffffff +#define CLOCKS_FC0_RESULT_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_RESULT_KHZ +// Description : None +#define CLOCKS_FC0_RESULT_KHZ_RESET 0x0000000 +#define CLOCKS_FC0_RESULT_KHZ_BITS 0x3fffffe0 +#define CLOCKS_FC0_RESULT_KHZ_MSB 29 +#define CLOCKS_FC0_RESULT_KHZ_LSB 5 +#define CLOCKS_FC0_RESULT_KHZ_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_FC0_RESULT_FRAC +// Description : None +#define CLOCKS_FC0_RESULT_FRAC_RESET 0x00 +#define CLOCKS_FC0_RESULT_FRAC_BITS 0x0000001f +#define CLOCKS_FC0_RESULT_FRAC_MSB 4 +#define CLOCKS_FC0_RESULT_FRAC_LSB 0 +#define CLOCKS_FC0_RESULT_FRAC_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_WAKE_EN0 +// Description : enable clock in wake mode +#define CLOCKS_WAKE_EN0_OFFSET 0x000000a0 +#define CLOCKS_WAKE_EN0_BITS 0xffffffff +#define CLOCKS_WAKE_EN0_RESET 0xffffffff +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SRAM3 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM3_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM3_BITS 0x80000000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM3_MSB 31 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM3_LSB 31 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SRAM2 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM2_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM2_BITS 0x40000000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM2_MSB 30 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM2_LSB 30 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SRAM1 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM1_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM1_BITS 0x20000000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM1_MSB 29 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM1_LSB 29 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SRAM0 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM0_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM0_BITS 0x10000000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM0_MSB 28 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM0_LSB 28 +#define CLOCKS_WAKE_EN0_CLK_SYS_SRAM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SPI1 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI1_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI1_BITS 0x08000000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI1_MSB 27 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI1_LSB 27 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_PERI_SPI1 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI1_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI1_BITS 0x04000000 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI1_MSB 26 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI1_LSB 26 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SPI0 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI0_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI0_BITS 0x02000000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI0_MSB 25 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI0_LSB 25 +#define CLOCKS_WAKE_EN0_CLK_SYS_SPI0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_PERI_SPI0 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI0_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI0_BITS 0x01000000 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI0_MSB 24 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI0_LSB 24 +#define CLOCKS_WAKE_EN0_CLK_PERI_SPI0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_SIO +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_SIO_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_SIO_BITS 0x00800000 +#define CLOCKS_WAKE_EN0_CLK_SYS_SIO_MSB 23 +#define CLOCKS_WAKE_EN0_CLK_SYS_SIO_LSB 23 +#define CLOCKS_WAKE_EN0_CLK_SYS_SIO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_RTC +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_RTC_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_RTC_BITS 0x00400000 +#define CLOCKS_WAKE_EN0_CLK_SYS_RTC_MSB 22 +#define CLOCKS_WAKE_EN0_CLK_SYS_RTC_LSB 22 +#define CLOCKS_WAKE_EN0_CLK_SYS_RTC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_RTC_RTC +// Description : None +#define CLOCKS_WAKE_EN0_CLK_RTC_RTC_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_RTC_RTC_BITS 0x00200000 +#define CLOCKS_WAKE_EN0_CLK_RTC_RTC_MSB 21 +#define CLOCKS_WAKE_EN0_CLK_RTC_RTC_LSB 21 +#define CLOCKS_WAKE_EN0_CLK_RTC_RTC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_ROSC +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_ROSC_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROSC_BITS 0x00100000 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROSC_MSB 20 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROSC_LSB 20 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_ROM +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_ROM_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROM_BITS 0x00080000 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROM_MSB 19 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROM_LSB 19 +#define CLOCKS_WAKE_EN0_CLK_SYS_ROM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_RESETS +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_RESETS_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_RESETS_BITS 0x00040000 +#define CLOCKS_WAKE_EN0_CLK_SYS_RESETS_MSB 18 +#define CLOCKS_WAKE_EN0_CLK_SYS_RESETS_LSB 18 +#define CLOCKS_WAKE_EN0_CLK_SYS_RESETS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PWM +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PWM_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PWM_BITS 0x00020000 +#define CLOCKS_WAKE_EN0_CLK_SYS_PWM_MSB 17 +#define CLOCKS_WAKE_EN0_CLK_SYS_PWM_LSB 17 +#define CLOCKS_WAKE_EN0_CLK_SYS_PWM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PSM +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PSM_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PSM_BITS 0x00010000 +#define CLOCKS_WAKE_EN0_CLK_SYS_PSM_MSB 16 +#define CLOCKS_WAKE_EN0_CLK_SYS_PSM_LSB 16 +#define CLOCKS_WAKE_EN0_CLK_SYS_PSM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PLL_USB +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_USB_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_USB_BITS 0x00008000 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_USB_MSB 15 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_USB_LSB 15 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_USB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PLL_SYS +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_SYS_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_SYS_BITS 0x00004000 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_SYS_MSB 14 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_SYS_LSB 14 +#define CLOCKS_WAKE_EN0_CLK_SYS_PLL_SYS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PIO1 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO1_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO1_BITS 0x00002000 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO1_MSB 13 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO1_LSB 13 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PIO0 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO0_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO0_BITS 0x00001000 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO0_MSB 12 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO0_LSB 12 +#define CLOCKS_WAKE_EN0_CLK_SYS_PIO0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_PADS +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_PADS_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_PADS_BITS 0x00000800 +#define CLOCKS_WAKE_EN0_CLK_SYS_PADS_MSB 11 +#define CLOCKS_WAKE_EN0_CLK_SYS_PADS_LSB 11 +#define CLOCKS_WAKE_EN0_CLK_SYS_PADS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_VREG_AND_CHIP_RESET +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_VREG_AND_CHIP_RESET_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_VREG_AND_CHIP_RESET_BITS 0x00000400 +#define CLOCKS_WAKE_EN0_CLK_SYS_VREG_AND_CHIP_RESET_MSB 10 +#define CLOCKS_WAKE_EN0_CLK_SYS_VREG_AND_CHIP_RESET_LSB 10 +#define CLOCKS_WAKE_EN0_CLK_SYS_VREG_AND_CHIP_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_JTAG +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_JTAG_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_JTAG_BITS 0x00000200 +#define CLOCKS_WAKE_EN0_CLK_SYS_JTAG_MSB 9 +#define CLOCKS_WAKE_EN0_CLK_SYS_JTAG_LSB 9 +#define CLOCKS_WAKE_EN0_CLK_SYS_JTAG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_IO +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_IO_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_IO_BITS 0x00000100 +#define CLOCKS_WAKE_EN0_CLK_SYS_IO_MSB 8 +#define CLOCKS_WAKE_EN0_CLK_SYS_IO_LSB 8 +#define CLOCKS_WAKE_EN0_CLK_SYS_IO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_I2C1 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C1_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C1_BITS 0x00000080 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C1_MSB 7 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C1_LSB 7 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_I2C0 +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C0_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C0_BITS 0x00000040 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C0_MSB 6 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C0_LSB 6 +#define CLOCKS_WAKE_EN0_CLK_SYS_I2C0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_DMA +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_DMA_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_DMA_BITS 0x00000020 +#define CLOCKS_WAKE_EN0_CLK_SYS_DMA_MSB 5 +#define CLOCKS_WAKE_EN0_CLK_SYS_DMA_LSB 5 +#define CLOCKS_WAKE_EN0_CLK_SYS_DMA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_BUSFABRIC +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSFABRIC_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSFABRIC_BITS 0x00000010 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSFABRIC_MSB 4 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSFABRIC_LSB 4 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSFABRIC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_BUSCTRL +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSCTRL_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSCTRL_BITS 0x00000008 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSCTRL_MSB 3 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSCTRL_LSB 3 +#define CLOCKS_WAKE_EN0_CLK_SYS_BUSCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_ADC +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_ADC_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_ADC_BITS 0x00000004 +#define CLOCKS_WAKE_EN0_CLK_SYS_ADC_MSB 2 +#define CLOCKS_WAKE_EN0_CLK_SYS_ADC_LSB 2 +#define CLOCKS_WAKE_EN0_CLK_SYS_ADC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_ADC_ADC +// Description : None +#define CLOCKS_WAKE_EN0_CLK_ADC_ADC_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_ADC_ADC_BITS 0x00000002 +#define CLOCKS_WAKE_EN0_CLK_ADC_ADC_MSB 1 +#define CLOCKS_WAKE_EN0_CLK_ADC_ADC_LSB 1 +#define CLOCKS_WAKE_EN0_CLK_ADC_ADC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN0_CLK_SYS_CLOCKS +// Description : None +#define CLOCKS_WAKE_EN0_CLK_SYS_CLOCKS_RESET 0x1 +#define CLOCKS_WAKE_EN0_CLK_SYS_CLOCKS_BITS 0x00000001 +#define CLOCKS_WAKE_EN0_CLK_SYS_CLOCKS_MSB 0 +#define CLOCKS_WAKE_EN0_CLK_SYS_CLOCKS_LSB 0 +#define CLOCKS_WAKE_EN0_CLK_SYS_CLOCKS_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_WAKE_EN1 +// Description : enable clock in wake mode +#define CLOCKS_WAKE_EN1_OFFSET 0x000000a4 +#define CLOCKS_WAKE_EN1_BITS 0x00007fff +#define CLOCKS_WAKE_EN1_RESET 0x00007fff +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_XOSC +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_XOSC_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_XOSC_BITS 0x00004000 +#define CLOCKS_WAKE_EN1_CLK_SYS_XOSC_MSB 14 +#define CLOCKS_WAKE_EN1_CLK_SYS_XOSC_LSB 14 +#define CLOCKS_WAKE_EN1_CLK_SYS_XOSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_XIP +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_XIP_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_XIP_BITS 0x00002000 +#define CLOCKS_WAKE_EN1_CLK_SYS_XIP_MSB 13 +#define CLOCKS_WAKE_EN1_CLK_SYS_XIP_LSB 13 +#define CLOCKS_WAKE_EN1_CLK_SYS_XIP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_WATCHDOG +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_WATCHDOG_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_WATCHDOG_BITS 0x00001000 +#define CLOCKS_WAKE_EN1_CLK_SYS_WATCHDOG_MSB 12 +#define CLOCKS_WAKE_EN1_CLK_SYS_WATCHDOG_LSB 12 +#define CLOCKS_WAKE_EN1_CLK_SYS_WATCHDOG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_USB_USBCTRL +// Description : None +#define CLOCKS_WAKE_EN1_CLK_USB_USBCTRL_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_USB_USBCTRL_BITS 0x00000800 +#define CLOCKS_WAKE_EN1_CLK_USB_USBCTRL_MSB 11 +#define CLOCKS_WAKE_EN1_CLK_USB_USBCTRL_LSB 11 +#define CLOCKS_WAKE_EN1_CLK_USB_USBCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_USBCTRL +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_USBCTRL_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_USBCTRL_BITS 0x00000400 +#define CLOCKS_WAKE_EN1_CLK_SYS_USBCTRL_MSB 10 +#define CLOCKS_WAKE_EN1_CLK_SYS_USBCTRL_LSB 10 +#define CLOCKS_WAKE_EN1_CLK_SYS_USBCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_UART1 +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_UART1_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART1_BITS 0x00000200 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART1_MSB 9 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART1_LSB 9 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_PERI_UART1 +// Description : None +#define CLOCKS_WAKE_EN1_CLK_PERI_UART1_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART1_BITS 0x00000100 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART1_MSB 8 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART1_LSB 8 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_UART0 +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_UART0_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART0_BITS 0x00000080 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART0_MSB 7 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART0_LSB 7 +#define CLOCKS_WAKE_EN1_CLK_SYS_UART0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_PERI_UART0 +// Description : None +#define CLOCKS_WAKE_EN1_CLK_PERI_UART0_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART0_BITS 0x00000040 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART0_MSB 6 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART0_LSB 6 +#define CLOCKS_WAKE_EN1_CLK_PERI_UART0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_TIMER +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_TIMER_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_TIMER_BITS 0x00000020 +#define CLOCKS_WAKE_EN1_CLK_SYS_TIMER_MSB 5 +#define CLOCKS_WAKE_EN1_CLK_SYS_TIMER_LSB 5 +#define CLOCKS_WAKE_EN1_CLK_SYS_TIMER_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_TBMAN +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_TBMAN_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_TBMAN_BITS 0x00000010 +#define CLOCKS_WAKE_EN1_CLK_SYS_TBMAN_MSB 4 +#define CLOCKS_WAKE_EN1_CLK_SYS_TBMAN_LSB 4 +#define CLOCKS_WAKE_EN1_CLK_SYS_TBMAN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_SYSINFO +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSINFO_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSINFO_BITS 0x00000008 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSINFO_MSB 3 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSINFO_LSB 3 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSINFO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_SYSCFG +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSCFG_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSCFG_BITS 0x00000004 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSCFG_MSB 2 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSCFG_LSB 2 +#define CLOCKS_WAKE_EN1_CLK_SYS_SYSCFG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_SRAM5 +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM5_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM5_BITS 0x00000002 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM5_MSB 1 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM5_LSB 1 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_WAKE_EN1_CLK_SYS_SRAM4 +// Description : None +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM4_RESET 0x1 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM4_BITS 0x00000001 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM4_MSB 0 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM4_LSB 0 +#define CLOCKS_WAKE_EN1_CLK_SYS_SRAM4_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_SLEEP_EN0 +// Description : enable clock in sleep mode +#define CLOCKS_SLEEP_EN0_OFFSET 0x000000a8 +#define CLOCKS_SLEEP_EN0_BITS 0xffffffff +#define CLOCKS_SLEEP_EN0_RESET 0xffffffff +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SRAM3 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM3_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM3_BITS 0x80000000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM3_MSB 31 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM3_LSB 31 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SRAM2 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM2_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM2_BITS 0x40000000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM2_MSB 30 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM2_LSB 30 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SRAM1 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM1_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM1_BITS 0x20000000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM1_MSB 29 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM1_LSB 29 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SRAM0 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM0_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM0_BITS 0x10000000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM0_MSB 28 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM0_LSB 28 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SRAM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SPI1 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI1_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI1_BITS 0x08000000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI1_MSB 27 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI1_LSB 27 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_PERI_SPI1 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI1_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI1_BITS 0x04000000 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI1_MSB 26 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI1_LSB 26 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SPI0 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI0_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI0_BITS 0x02000000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI0_MSB 25 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI0_LSB 25 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SPI0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_PERI_SPI0 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI0_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI0_BITS 0x01000000 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI0_MSB 24 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI0_LSB 24 +#define CLOCKS_SLEEP_EN0_CLK_PERI_SPI0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_SIO +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_SIO_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SIO_BITS 0x00800000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SIO_MSB 23 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SIO_LSB 23 +#define CLOCKS_SLEEP_EN0_CLK_SYS_SIO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_RTC +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_RTC_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RTC_BITS 0x00400000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RTC_MSB 22 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RTC_LSB 22 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RTC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_RTC_RTC +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_RTC_RTC_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_RTC_RTC_BITS 0x00200000 +#define CLOCKS_SLEEP_EN0_CLK_RTC_RTC_MSB 21 +#define CLOCKS_SLEEP_EN0_CLK_RTC_RTC_LSB 21 +#define CLOCKS_SLEEP_EN0_CLK_RTC_RTC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_ROSC +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROSC_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROSC_BITS 0x00100000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROSC_MSB 20 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROSC_LSB 20 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_ROM +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROM_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROM_BITS 0x00080000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROM_MSB 19 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROM_LSB 19 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ROM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_RESETS +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_RESETS_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RESETS_BITS 0x00040000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RESETS_MSB 18 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RESETS_LSB 18 +#define CLOCKS_SLEEP_EN0_CLK_SYS_RESETS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PWM +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PWM_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PWM_BITS 0x00020000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PWM_MSB 17 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PWM_LSB 17 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PWM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PSM +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PSM_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PSM_BITS 0x00010000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PSM_MSB 16 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PSM_LSB 16 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PSM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PLL_USB +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_USB_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_USB_BITS 0x00008000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_USB_MSB 15 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_USB_LSB 15 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_USB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PLL_SYS +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_SYS_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_SYS_BITS 0x00004000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_SYS_MSB 14 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_SYS_LSB 14 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PLL_SYS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PIO1 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO1_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO1_BITS 0x00002000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO1_MSB 13 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO1_LSB 13 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PIO0 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO0_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO0_BITS 0x00001000 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO0_MSB 12 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO0_LSB 12 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PIO0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_PADS +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_PADS_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PADS_BITS 0x00000800 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PADS_MSB 11 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PADS_LSB 11 +#define CLOCKS_SLEEP_EN0_CLK_SYS_PADS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_VREG_AND_CHIP_RESET +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_VREG_AND_CHIP_RESET_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_VREG_AND_CHIP_RESET_BITS 0x00000400 +#define CLOCKS_SLEEP_EN0_CLK_SYS_VREG_AND_CHIP_RESET_MSB 10 +#define CLOCKS_SLEEP_EN0_CLK_SYS_VREG_AND_CHIP_RESET_LSB 10 +#define CLOCKS_SLEEP_EN0_CLK_SYS_VREG_AND_CHIP_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_JTAG +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_JTAG_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_JTAG_BITS 0x00000200 +#define CLOCKS_SLEEP_EN0_CLK_SYS_JTAG_MSB 9 +#define CLOCKS_SLEEP_EN0_CLK_SYS_JTAG_LSB 9 +#define CLOCKS_SLEEP_EN0_CLK_SYS_JTAG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_IO +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_IO_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_IO_BITS 0x00000100 +#define CLOCKS_SLEEP_EN0_CLK_SYS_IO_MSB 8 +#define CLOCKS_SLEEP_EN0_CLK_SYS_IO_LSB 8 +#define CLOCKS_SLEEP_EN0_CLK_SYS_IO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_I2C1 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C1_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C1_BITS 0x00000080 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C1_MSB 7 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C1_LSB 7 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_I2C0 +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C0_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C0_BITS 0x00000040 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C0_MSB 6 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C0_LSB 6 +#define CLOCKS_SLEEP_EN0_CLK_SYS_I2C0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_DMA +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_DMA_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_DMA_BITS 0x00000020 +#define CLOCKS_SLEEP_EN0_CLK_SYS_DMA_MSB 5 +#define CLOCKS_SLEEP_EN0_CLK_SYS_DMA_LSB 5 +#define CLOCKS_SLEEP_EN0_CLK_SYS_DMA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_BUSFABRIC +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSFABRIC_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSFABRIC_BITS 0x00000010 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSFABRIC_MSB 4 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSFABRIC_LSB 4 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSFABRIC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_BUSCTRL +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSCTRL_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSCTRL_BITS 0x00000008 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSCTRL_MSB 3 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSCTRL_LSB 3 +#define CLOCKS_SLEEP_EN0_CLK_SYS_BUSCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_ADC +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_ADC_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ADC_BITS 0x00000004 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ADC_MSB 2 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ADC_LSB 2 +#define CLOCKS_SLEEP_EN0_CLK_SYS_ADC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_ADC_ADC +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_ADC_ADC_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_ADC_ADC_BITS 0x00000002 +#define CLOCKS_SLEEP_EN0_CLK_ADC_ADC_MSB 1 +#define CLOCKS_SLEEP_EN0_CLK_ADC_ADC_LSB 1 +#define CLOCKS_SLEEP_EN0_CLK_ADC_ADC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN0_CLK_SYS_CLOCKS +// Description : None +#define CLOCKS_SLEEP_EN0_CLK_SYS_CLOCKS_RESET 0x1 +#define CLOCKS_SLEEP_EN0_CLK_SYS_CLOCKS_BITS 0x00000001 +#define CLOCKS_SLEEP_EN0_CLK_SYS_CLOCKS_MSB 0 +#define CLOCKS_SLEEP_EN0_CLK_SYS_CLOCKS_LSB 0 +#define CLOCKS_SLEEP_EN0_CLK_SYS_CLOCKS_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_SLEEP_EN1 +// Description : enable clock in sleep mode +#define CLOCKS_SLEEP_EN1_OFFSET 0x000000ac +#define CLOCKS_SLEEP_EN1_BITS 0x00007fff +#define CLOCKS_SLEEP_EN1_RESET 0x00007fff +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_XOSC +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_XOSC_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XOSC_BITS 0x00004000 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XOSC_MSB 14 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XOSC_LSB 14 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XOSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_XIP +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_XIP_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XIP_BITS 0x00002000 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XIP_MSB 13 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XIP_LSB 13 +#define CLOCKS_SLEEP_EN1_CLK_SYS_XIP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_WATCHDOG +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_WATCHDOG_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_WATCHDOG_BITS 0x00001000 +#define CLOCKS_SLEEP_EN1_CLK_SYS_WATCHDOG_MSB 12 +#define CLOCKS_SLEEP_EN1_CLK_SYS_WATCHDOG_LSB 12 +#define CLOCKS_SLEEP_EN1_CLK_SYS_WATCHDOG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL_BITS 0x00000800 +#define CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL_MSB 11 +#define CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL_LSB 11 +#define CLOCKS_SLEEP_EN1_CLK_USB_USBCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL_BITS 0x00000400 +#define CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL_MSB 10 +#define CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL_LSB 10 +#define CLOCKS_SLEEP_EN1_CLK_SYS_USBCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_UART1 +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART1_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART1_BITS 0x00000200 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART1_MSB 9 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART1_LSB 9 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_PERI_UART1 +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART1_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART1_BITS 0x00000100 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART1_MSB 8 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART1_LSB 8 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_UART0 +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART0_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART0_BITS 0x00000080 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART0_MSB 7 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART0_LSB 7 +#define CLOCKS_SLEEP_EN1_CLK_SYS_UART0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_PERI_UART0 +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART0_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART0_BITS 0x00000040 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART0_MSB 6 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART0_LSB 6 +#define CLOCKS_SLEEP_EN1_CLK_PERI_UART0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_TIMER +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_TIMER_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TIMER_BITS 0x00000020 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TIMER_MSB 5 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TIMER_LSB 5 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TIMER_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_TBMAN +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_TBMAN_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TBMAN_BITS 0x00000010 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TBMAN_MSB 4 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TBMAN_LSB 4 +#define CLOCKS_SLEEP_EN1_CLK_SYS_TBMAN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_SYSINFO +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSINFO_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSINFO_BITS 0x00000008 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSINFO_MSB 3 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSINFO_LSB 3 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSINFO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_SYSCFG +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSCFG_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSCFG_BITS 0x00000004 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSCFG_MSB 2 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSCFG_LSB 2 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SYSCFG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_SRAM5 +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM5_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM5_BITS 0x00000002 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM5_MSB 1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM5_LSB 1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_SLEEP_EN1_CLK_SYS_SRAM4 +// Description : None +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM4_RESET 0x1 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM4_BITS 0x00000001 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM4_MSB 0 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM4_LSB 0 +#define CLOCKS_SLEEP_EN1_CLK_SYS_SRAM4_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_ENABLED0 +// Description : indicates the state of the clock enable +#define CLOCKS_ENABLED0_OFFSET 0x000000b0 +#define CLOCKS_ENABLED0_BITS 0xffffffff +#define CLOCKS_ENABLED0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SRAM3 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SRAM3_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM3_BITS 0x80000000 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM3_MSB 31 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM3_LSB 31 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SRAM2 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SRAM2_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM2_BITS 0x40000000 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM2_MSB 30 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM2_LSB 30 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SRAM1 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SRAM1_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM1_BITS 0x20000000 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM1_MSB 29 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM1_LSB 29 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SRAM0 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SRAM0_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM0_BITS 0x10000000 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM0_MSB 28 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM0_LSB 28 +#define CLOCKS_ENABLED0_CLK_SYS_SRAM0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SPI1 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SPI1_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SPI1_BITS 0x08000000 +#define CLOCKS_ENABLED0_CLK_SYS_SPI1_MSB 27 +#define CLOCKS_ENABLED0_CLK_SYS_SPI1_LSB 27 +#define CLOCKS_ENABLED0_CLK_SYS_SPI1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_PERI_SPI1 +// Description : None +#define CLOCKS_ENABLED0_CLK_PERI_SPI1_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_PERI_SPI1_BITS 0x04000000 +#define CLOCKS_ENABLED0_CLK_PERI_SPI1_MSB 26 +#define CLOCKS_ENABLED0_CLK_PERI_SPI1_LSB 26 +#define CLOCKS_ENABLED0_CLK_PERI_SPI1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SPI0 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SPI0_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SPI0_BITS 0x02000000 +#define CLOCKS_ENABLED0_CLK_SYS_SPI0_MSB 25 +#define CLOCKS_ENABLED0_CLK_SYS_SPI0_LSB 25 +#define CLOCKS_ENABLED0_CLK_SYS_SPI0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_PERI_SPI0 +// Description : None +#define CLOCKS_ENABLED0_CLK_PERI_SPI0_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_PERI_SPI0_BITS 0x01000000 +#define CLOCKS_ENABLED0_CLK_PERI_SPI0_MSB 24 +#define CLOCKS_ENABLED0_CLK_PERI_SPI0_LSB 24 +#define CLOCKS_ENABLED0_CLK_PERI_SPI0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_SIO +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_SIO_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_SIO_BITS 0x00800000 +#define CLOCKS_ENABLED0_CLK_SYS_SIO_MSB 23 +#define CLOCKS_ENABLED0_CLK_SYS_SIO_LSB 23 +#define CLOCKS_ENABLED0_CLK_SYS_SIO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_RTC +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_RTC_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_RTC_BITS 0x00400000 +#define CLOCKS_ENABLED0_CLK_SYS_RTC_MSB 22 +#define CLOCKS_ENABLED0_CLK_SYS_RTC_LSB 22 +#define CLOCKS_ENABLED0_CLK_SYS_RTC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_RTC_RTC +// Description : None +#define CLOCKS_ENABLED0_CLK_RTC_RTC_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_RTC_RTC_BITS 0x00200000 +#define CLOCKS_ENABLED0_CLK_RTC_RTC_MSB 21 +#define CLOCKS_ENABLED0_CLK_RTC_RTC_LSB 21 +#define CLOCKS_ENABLED0_CLK_RTC_RTC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_ROSC +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_ROSC_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_ROSC_BITS 0x00100000 +#define CLOCKS_ENABLED0_CLK_SYS_ROSC_MSB 20 +#define CLOCKS_ENABLED0_CLK_SYS_ROSC_LSB 20 +#define CLOCKS_ENABLED0_CLK_SYS_ROSC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_ROM +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_ROM_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_ROM_BITS 0x00080000 +#define CLOCKS_ENABLED0_CLK_SYS_ROM_MSB 19 +#define CLOCKS_ENABLED0_CLK_SYS_ROM_LSB 19 +#define CLOCKS_ENABLED0_CLK_SYS_ROM_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_RESETS +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_RESETS_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_RESETS_BITS 0x00040000 +#define CLOCKS_ENABLED0_CLK_SYS_RESETS_MSB 18 +#define CLOCKS_ENABLED0_CLK_SYS_RESETS_LSB 18 +#define CLOCKS_ENABLED0_CLK_SYS_RESETS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PWM +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PWM_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PWM_BITS 0x00020000 +#define CLOCKS_ENABLED0_CLK_SYS_PWM_MSB 17 +#define CLOCKS_ENABLED0_CLK_SYS_PWM_LSB 17 +#define CLOCKS_ENABLED0_CLK_SYS_PWM_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PSM +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PSM_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PSM_BITS 0x00010000 +#define CLOCKS_ENABLED0_CLK_SYS_PSM_MSB 16 +#define CLOCKS_ENABLED0_CLK_SYS_PSM_LSB 16 +#define CLOCKS_ENABLED0_CLK_SYS_PSM_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PLL_USB +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PLL_USB_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_USB_BITS 0x00008000 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_USB_MSB 15 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_USB_LSB 15 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_USB_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PLL_SYS +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PLL_SYS_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_SYS_BITS 0x00004000 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_SYS_MSB 14 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_SYS_LSB 14 +#define CLOCKS_ENABLED0_CLK_SYS_PLL_SYS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PIO1 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PIO1_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PIO1_BITS 0x00002000 +#define CLOCKS_ENABLED0_CLK_SYS_PIO1_MSB 13 +#define CLOCKS_ENABLED0_CLK_SYS_PIO1_LSB 13 +#define CLOCKS_ENABLED0_CLK_SYS_PIO1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PIO0 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PIO0_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PIO0_BITS 0x00001000 +#define CLOCKS_ENABLED0_CLK_SYS_PIO0_MSB 12 +#define CLOCKS_ENABLED0_CLK_SYS_PIO0_LSB 12 +#define CLOCKS_ENABLED0_CLK_SYS_PIO0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_PADS +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_PADS_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_PADS_BITS 0x00000800 +#define CLOCKS_ENABLED0_CLK_SYS_PADS_MSB 11 +#define CLOCKS_ENABLED0_CLK_SYS_PADS_LSB 11 +#define CLOCKS_ENABLED0_CLK_SYS_PADS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_VREG_AND_CHIP_RESET +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_VREG_AND_CHIP_RESET_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_VREG_AND_CHIP_RESET_BITS 0x00000400 +#define CLOCKS_ENABLED0_CLK_SYS_VREG_AND_CHIP_RESET_MSB 10 +#define CLOCKS_ENABLED0_CLK_SYS_VREG_AND_CHIP_RESET_LSB 10 +#define CLOCKS_ENABLED0_CLK_SYS_VREG_AND_CHIP_RESET_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_JTAG +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_JTAG_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_JTAG_BITS 0x00000200 +#define CLOCKS_ENABLED0_CLK_SYS_JTAG_MSB 9 +#define CLOCKS_ENABLED0_CLK_SYS_JTAG_LSB 9 +#define CLOCKS_ENABLED0_CLK_SYS_JTAG_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_IO +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_IO_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_IO_BITS 0x00000100 +#define CLOCKS_ENABLED0_CLK_SYS_IO_MSB 8 +#define CLOCKS_ENABLED0_CLK_SYS_IO_LSB 8 +#define CLOCKS_ENABLED0_CLK_SYS_IO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_I2C1 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_I2C1_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_I2C1_BITS 0x00000080 +#define CLOCKS_ENABLED0_CLK_SYS_I2C1_MSB 7 +#define CLOCKS_ENABLED0_CLK_SYS_I2C1_LSB 7 +#define CLOCKS_ENABLED0_CLK_SYS_I2C1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_I2C0 +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_I2C0_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_I2C0_BITS 0x00000040 +#define CLOCKS_ENABLED0_CLK_SYS_I2C0_MSB 6 +#define CLOCKS_ENABLED0_CLK_SYS_I2C0_LSB 6 +#define CLOCKS_ENABLED0_CLK_SYS_I2C0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_DMA +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_DMA_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_DMA_BITS 0x00000020 +#define CLOCKS_ENABLED0_CLK_SYS_DMA_MSB 5 +#define CLOCKS_ENABLED0_CLK_SYS_DMA_LSB 5 +#define CLOCKS_ENABLED0_CLK_SYS_DMA_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_BUSFABRIC +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_BUSFABRIC_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_BUSFABRIC_BITS 0x00000010 +#define CLOCKS_ENABLED0_CLK_SYS_BUSFABRIC_MSB 4 +#define CLOCKS_ENABLED0_CLK_SYS_BUSFABRIC_LSB 4 +#define CLOCKS_ENABLED0_CLK_SYS_BUSFABRIC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_BUSCTRL +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_BUSCTRL_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_BUSCTRL_BITS 0x00000008 +#define CLOCKS_ENABLED0_CLK_SYS_BUSCTRL_MSB 3 +#define CLOCKS_ENABLED0_CLK_SYS_BUSCTRL_LSB 3 +#define CLOCKS_ENABLED0_CLK_SYS_BUSCTRL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_ADC +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_ADC_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_ADC_BITS 0x00000004 +#define CLOCKS_ENABLED0_CLK_SYS_ADC_MSB 2 +#define CLOCKS_ENABLED0_CLK_SYS_ADC_LSB 2 +#define CLOCKS_ENABLED0_CLK_SYS_ADC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_ADC_ADC +// Description : None +#define CLOCKS_ENABLED0_CLK_ADC_ADC_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_ADC_ADC_BITS 0x00000002 +#define CLOCKS_ENABLED0_CLK_ADC_ADC_MSB 1 +#define CLOCKS_ENABLED0_CLK_ADC_ADC_LSB 1 +#define CLOCKS_ENABLED0_CLK_ADC_ADC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED0_CLK_SYS_CLOCKS +// Description : None +#define CLOCKS_ENABLED0_CLK_SYS_CLOCKS_RESET 0x0 +#define CLOCKS_ENABLED0_CLK_SYS_CLOCKS_BITS 0x00000001 +#define CLOCKS_ENABLED0_CLK_SYS_CLOCKS_MSB 0 +#define CLOCKS_ENABLED0_CLK_SYS_CLOCKS_LSB 0 +#define CLOCKS_ENABLED0_CLK_SYS_CLOCKS_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_ENABLED1 +// Description : indicates the state of the clock enable +#define CLOCKS_ENABLED1_OFFSET 0x000000b4 +#define CLOCKS_ENABLED1_BITS 0x00007fff +#define CLOCKS_ENABLED1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_XOSC +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_XOSC_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_XOSC_BITS 0x00004000 +#define CLOCKS_ENABLED1_CLK_SYS_XOSC_MSB 14 +#define CLOCKS_ENABLED1_CLK_SYS_XOSC_LSB 14 +#define CLOCKS_ENABLED1_CLK_SYS_XOSC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_XIP +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_XIP_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_XIP_BITS 0x00002000 +#define CLOCKS_ENABLED1_CLK_SYS_XIP_MSB 13 +#define CLOCKS_ENABLED1_CLK_SYS_XIP_LSB 13 +#define CLOCKS_ENABLED1_CLK_SYS_XIP_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_WATCHDOG +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_WATCHDOG_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_WATCHDOG_BITS 0x00001000 +#define CLOCKS_ENABLED1_CLK_SYS_WATCHDOG_MSB 12 +#define CLOCKS_ENABLED1_CLK_SYS_WATCHDOG_LSB 12 +#define CLOCKS_ENABLED1_CLK_SYS_WATCHDOG_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_USB_USBCTRL +// Description : None +#define CLOCKS_ENABLED1_CLK_USB_USBCTRL_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_USB_USBCTRL_BITS 0x00000800 +#define CLOCKS_ENABLED1_CLK_USB_USBCTRL_MSB 11 +#define CLOCKS_ENABLED1_CLK_USB_USBCTRL_LSB 11 +#define CLOCKS_ENABLED1_CLK_USB_USBCTRL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_USBCTRL +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_USBCTRL_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_USBCTRL_BITS 0x00000400 +#define CLOCKS_ENABLED1_CLK_SYS_USBCTRL_MSB 10 +#define CLOCKS_ENABLED1_CLK_SYS_USBCTRL_LSB 10 +#define CLOCKS_ENABLED1_CLK_SYS_USBCTRL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_UART1 +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_UART1_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_UART1_BITS 0x00000200 +#define CLOCKS_ENABLED1_CLK_SYS_UART1_MSB 9 +#define CLOCKS_ENABLED1_CLK_SYS_UART1_LSB 9 +#define CLOCKS_ENABLED1_CLK_SYS_UART1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_PERI_UART1 +// Description : None +#define CLOCKS_ENABLED1_CLK_PERI_UART1_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_PERI_UART1_BITS 0x00000100 +#define CLOCKS_ENABLED1_CLK_PERI_UART1_MSB 8 +#define CLOCKS_ENABLED1_CLK_PERI_UART1_LSB 8 +#define CLOCKS_ENABLED1_CLK_PERI_UART1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_UART0 +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_UART0_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_UART0_BITS 0x00000080 +#define CLOCKS_ENABLED1_CLK_SYS_UART0_MSB 7 +#define CLOCKS_ENABLED1_CLK_SYS_UART0_LSB 7 +#define CLOCKS_ENABLED1_CLK_SYS_UART0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_PERI_UART0 +// Description : None +#define CLOCKS_ENABLED1_CLK_PERI_UART0_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_PERI_UART0_BITS 0x00000040 +#define CLOCKS_ENABLED1_CLK_PERI_UART0_MSB 6 +#define CLOCKS_ENABLED1_CLK_PERI_UART0_LSB 6 +#define CLOCKS_ENABLED1_CLK_PERI_UART0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_TIMER +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_TIMER_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_TIMER_BITS 0x00000020 +#define CLOCKS_ENABLED1_CLK_SYS_TIMER_MSB 5 +#define CLOCKS_ENABLED1_CLK_SYS_TIMER_LSB 5 +#define CLOCKS_ENABLED1_CLK_SYS_TIMER_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_TBMAN +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_TBMAN_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_TBMAN_BITS 0x00000010 +#define CLOCKS_ENABLED1_CLK_SYS_TBMAN_MSB 4 +#define CLOCKS_ENABLED1_CLK_SYS_TBMAN_LSB 4 +#define CLOCKS_ENABLED1_CLK_SYS_TBMAN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_SYSINFO +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_SYSINFO_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_SYSINFO_BITS 0x00000008 +#define CLOCKS_ENABLED1_CLK_SYS_SYSINFO_MSB 3 +#define CLOCKS_ENABLED1_CLK_SYS_SYSINFO_LSB 3 +#define CLOCKS_ENABLED1_CLK_SYS_SYSINFO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_SYSCFG +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_SYSCFG_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_SYSCFG_BITS 0x00000004 +#define CLOCKS_ENABLED1_CLK_SYS_SYSCFG_MSB 2 +#define CLOCKS_ENABLED1_CLK_SYS_SYSCFG_LSB 2 +#define CLOCKS_ENABLED1_CLK_SYS_SYSCFG_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_SRAM5 +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_SRAM5_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM5_BITS 0x00000002 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM5_MSB 1 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM5_LSB 1 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM5_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : CLOCKS_ENABLED1_CLK_SYS_SRAM4 +// Description : None +#define CLOCKS_ENABLED1_CLK_SYS_SRAM4_RESET 0x0 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM4_BITS 0x00000001 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM4_MSB 0 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM4_LSB 0 +#define CLOCKS_ENABLED1_CLK_SYS_SRAM4_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_INTR +// Description : Raw Interrupts +#define CLOCKS_INTR_OFFSET 0x000000b8 +#define CLOCKS_INTR_BITS 0x00000001 +#define CLOCKS_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_INTR_CLK_SYS_RESUS +// Description : None +#define CLOCKS_INTR_CLK_SYS_RESUS_RESET 0x0 +#define CLOCKS_INTR_CLK_SYS_RESUS_BITS 0x00000001 +#define CLOCKS_INTR_CLK_SYS_RESUS_MSB 0 +#define CLOCKS_INTR_CLK_SYS_RESUS_LSB 0 +#define CLOCKS_INTR_CLK_SYS_RESUS_ACCESS "RO" +// ============================================================================= +// Register : CLOCKS_INTE +// Description : Interrupt Enable +#define CLOCKS_INTE_OFFSET 0x000000bc +#define CLOCKS_INTE_BITS 0x00000001 +#define CLOCKS_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_INTE_CLK_SYS_RESUS +// Description : None +#define CLOCKS_INTE_CLK_SYS_RESUS_RESET 0x0 +#define CLOCKS_INTE_CLK_SYS_RESUS_BITS 0x00000001 +#define CLOCKS_INTE_CLK_SYS_RESUS_MSB 0 +#define CLOCKS_INTE_CLK_SYS_RESUS_LSB 0 +#define CLOCKS_INTE_CLK_SYS_RESUS_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_INTF +// Description : Interrupt Force +#define CLOCKS_INTF_OFFSET 0x000000c0 +#define CLOCKS_INTF_BITS 0x00000001 +#define CLOCKS_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_INTF_CLK_SYS_RESUS +// Description : None +#define CLOCKS_INTF_CLK_SYS_RESUS_RESET 0x0 +#define CLOCKS_INTF_CLK_SYS_RESUS_BITS 0x00000001 +#define CLOCKS_INTF_CLK_SYS_RESUS_MSB 0 +#define CLOCKS_INTF_CLK_SYS_RESUS_LSB 0 +#define CLOCKS_INTF_CLK_SYS_RESUS_ACCESS "RW" +// ============================================================================= +// Register : CLOCKS_INTS +// Description : Interrupt status after masking & forcing +#define CLOCKS_INTS_OFFSET 0x000000c4 +#define CLOCKS_INTS_BITS 0x00000001 +#define CLOCKS_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : CLOCKS_INTS_CLK_SYS_RESUS +// Description : None +#define CLOCKS_INTS_CLK_SYS_RESUS_RESET 0x0 +#define CLOCKS_INTS_CLK_SYS_RESUS_BITS 0x00000001 +#define CLOCKS_INTS_CLK_SYS_RESUS_MSB 0 +#define CLOCKS_INTS_CLK_SYS_RESUS_LSB 0 +#define CLOCKS_INTS_CLK_SYS_RESUS_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_CLOCKS_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dma.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dma.h new file mode 100644 index 0000000000..884b0d39c5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dma.h @@ -0,0 +1,5257 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : DMA +// Version : 1 +// Bus type : apb +// Description : DMA with separate read and write masters +// ============================================================================= +#ifndef HARDWARE_REGS_DMA_DEFINED +#define HARDWARE_REGS_DMA_DEFINED +// ============================================================================= +// Register : DMA_CH0_READ_ADDR +// Description : DMA Channel 0 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH0_READ_ADDR_OFFSET 0x00000000 +#define DMA_CH0_READ_ADDR_BITS 0xffffffff +#define DMA_CH0_READ_ADDR_RESET 0x00000000 +#define DMA_CH0_READ_ADDR_MSB 31 +#define DMA_CH0_READ_ADDR_LSB 0 +#define DMA_CH0_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH0_WRITE_ADDR +// Description : DMA Channel 0 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH0_WRITE_ADDR_OFFSET 0x00000004 +#define DMA_CH0_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH0_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH0_WRITE_ADDR_MSB 31 +#define DMA_CH0_WRITE_ADDR_LSB 0 +#define DMA_CH0_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH0_TRANS_COUNT +// Description : DMA Channel 0 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH0_TRANS_COUNT_OFFSET 0x00000008 +#define DMA_CH0_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH0_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH0_TRANS_COUNT_MSB 31 +#define DMA_CH0_TRANS_COUNT_LSB 0 +#define DMA_CH0_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH0_CTRL_TRIG +// Description : DMA Channel 0 Control and Status +#define DMA_CH0_CTRL_TRIG_OFFSET 0x0000000c +#define DMA_CH0_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH0_CTRL_TRIG_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH0_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH0_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH0_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH0_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH0_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH0_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH0_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH0_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH0_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH0_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH0_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH0_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH0_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH0_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH0_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH0_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH0_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH0_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH0_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH0_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH0_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH0_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH0_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH0_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH0_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH0_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH0_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH0_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH0_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (0). +#define DMA_CH0_CTRL_TRIG_CHAIN_TO_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH0_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH0_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH0_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH0_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH0_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH0_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH0_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH0_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH0_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH0_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH0_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH0_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH0_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH0_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH0_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH0_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH0_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH0_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH0_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH0_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH0_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH0_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH0_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH0_CTRL_TRIG_EN_MSB 0 +#define DMA_CH0_CTRL_TRIG_EN_LSB 0 +#define DMA_CH0_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH0_AL1_CTRL +// Description : Alias for channel 0 CTRL register +#define DMA_CH0_AL1_CTRL_OFFSET 0x00000010 +#define DMA_CH0_AL1_CTRL_BITS 0xffffffff +#define DMA_CH0_AL1_CTRL_RESET "-" +#define DMA_CH0_AL1_CTRL_MSB 31 +#define DMA_CH0_AL1_CTRL_LSB 0 +#define DMA_CH0_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL1_READ_ADDR +// Description : Alias for channel 0 READ_ADDR register +#define DMA_CH0_AL1_READ_ADDR_OFFSET 0x00000014 +#define DMA_CH0_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH0_AL1_READ_ADDR_RESET "-" +#define DMA_CH0_AL1_READ_ADDR_MSB 31 +#define DMA_CH0_AL1_READ_ADDR_LSB 0 +#define DMA_CH0_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL1_WRITE_ADDR +// Description : Alias for channel 0 WRITE_ADDR register +#define DMA_CH0_AL1_WRITE_ADDR_OFFSET 0x00000018 +#define DMA_CH0_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH0_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH0_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH0_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH0_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 0 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH0_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000001c +#define DMA_CH0_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH0_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH0_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH0_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH0_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL2_CTRL +// Description : Alias for channel 0 CTRL register +#define DMA_CH0_AL2_CTRL_OFFSET 0x00000020 +#define DMA_CH0_AL2_CTRL_BITS 0xffffffff +#define DMA_CH0_AL2_CTRL_RESET "-" +#define DMA_CH0_AL2_CTRL_MSB 31 +#define DMA_CH0_AL2_CTRL_LSB 0 +#define DMA_CH0_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL2_TRANS_COUNT +// Description : Alias for channel 0 TRANS_COUNT register +#define DMA_CH0_AL2_TRANS_COUNT_OFFSET 0x00000024 +#define DMA_CH0_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH0_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH0_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH0_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH0_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL2_READ_ADDR +// Description : Alias for channel 0 READ_ADDR register +#define DMA_CH0_AL2_READ_ADDR_OFFSET 0x00000028 +#define DMA_CH0_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH0_AL2_READ_ADDR_RESET "-" +#define DMA_CH0_AL2_READ_ADDR_MSB 31 +#define DMA_CH0_AL2_READ_ADDR_LSB 0 +#define DMA_CH0_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 0 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH0_AL2_WRITE_ADDR_TRIG_OFFSET 0x0000002c +#define DMA_CH0_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH0_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH0_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH0_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH0_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL3_CTRL +// Description : Alias for channel 0 CTRL register +#define DMA_CH0_AL3_CTRL_OFFSET 0x00000030 +#define DMA_CH0_AL3_CTRL_BITS 0xffffffff +#define DMA_CH0_AL3_CTRL_RESET "-" +#define DMA_CH0_AL3_CTRL_MSB 31 +#define DMA_CH0_AL3_CTRL_LSB 0 +#define DMA_CH0_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL3_WRITE_ADDR +// Description : Alias for channel 0 WRITE_ADDR register +#define DMA_CH0_AL3_WRITE_ADDR_OFFSET 0x00000034 +#define DMA_CH0_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH0_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH0_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH0_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH0_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL3_TRANS_COUNT +// Description : Alias for channel 0 TRANS_COUNT register +#define DMA_CH0_AL3_TRANS_COUNT_OFFSET 0x00000038 +#define DMA_CH0_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH0_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH0_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH0_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH0_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_AL3_READ_ADDR_TRIG +// Description : Alias for channel 0 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH0_AL3_READ_ADDR_TRIG_OFFSET 0x0000003c +#define DMA_CH0_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH0_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH0_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH0_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH0_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_READ_ADDR +// Description : DMA Channel 1 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH1_READ_ADDR_OFFSET 0x00000040 +#define DMA_CH1_READ_ADDR_BITS 0xffffffff +#define DMA_CH1_READ_ADDR_RESET 0x00000000 +#define DMA_CH1_READ_ADDR_MSB 31 +#define DMA_CH1_READ_ADDR_LSB 0 +#define DMA_CH1_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH1_WRITE_ADDR +// Description : DMA Channel 1 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH1_WRITE_ADDR_OFFSET 0x00000044 +#define DMA_CH1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH1_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH1_WRITE_ADDR_MSB 31 +#define DMA_CH1_WRITE_ADDR_LSB 0 +#define DMA_CH1_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH1_TRANS_COUNT +// Description : DMA Channel 1 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH1_TRANS_COUNT_OFFSET 0x00000048 +#define DMA_CH1_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH1_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH1_TRANS_COUNT_MSB 31 +#define DMA_CH1_TRANS_COUNT_LSB 0 +#define DMA_CH1_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH1_CTRL_TRIG +// Description : DMA Channel 1 Control and Status +#define DMA_CH1_CTRL_TRIG_OFFSET 0x0000004c +#define DMA_CH1_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH1_CTRL_TRIG_RESET 0x00000800 +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH1_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH1_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH1_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH1_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH1_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH1_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH1_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH1_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH1_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH1_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH1_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH1_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH1_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH1_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH1_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH1_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH1_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH1_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH1_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH1_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH1_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH1_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH1_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH1_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH1_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH1_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH1_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH1_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH1_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (1). +#define DMA_CH1_CTRL_TRIG_CHAIN_TO_RESET 0x1 +#define DMA_CH1_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH1_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH1_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH1_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH1_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH1_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH1_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH1_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH1_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH1_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH1_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH1_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH1_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH1_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH1_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH1_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH1_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH1_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH1_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH1_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH1_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH1_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH1_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH1_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH1_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH1_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH1_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH1_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH1_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH1_CTRL_TRIG_EN_MSB 0 +#define DMA_CH1_CTRL_TRIG_EN_LSB 0 +#define DMA_CH1_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH1_AL1_CTRL +// Description : Alias for channel 1 CTRL register +#define DMA_CH1_AL1_CTRL_OFFSET 0x00000050 +#define DMA_CH1_AL1_CTRL_BITS 0xffffffff +#define DMA_CH1_AL1_CTRL_RESET "-" +#define DMA_CH1_AL1_CTRL_MSB 31 +#define DMA_CH1_AL1_CTRL_LSB 0 +#define DMA_CH1_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL1_READ_ADDR +// Description : Alias for channel 1 READ_ADDR register +#define DMA_CH1_AL1_READ_ADDR_OFFSET 0x00000054 +#define DMA_CH1_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH1_AL1_READ_ADDR_RESET "-" +#define DMA_CH1_AL1_READ_ADDR_MSB 31 +#define DMA_CH1_AL1_READ_ADDR_LSB 0 +#define DMA_CH1_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL1_WRITE_ADDR +// Description : Alias for channel 1 WRITE_ADDR register +#define DMA_CH1_AL1_WRITE_ADDR_OFFSET 0x00000058 +#define DMA_CH1_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH1_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH1_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH1_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH1_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 1 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH1_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000005c +#define DMA_CH1_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH1_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH1_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH1_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH1_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL2_CTRL +// Description : Alias for channel 1 CTRL register +#define DMA_CH1_AL2_CTRL_OFFSET 0x00000060 +#define DMA_CH1_AL2_CTRL_BITS 0xffffffff +#define DMA_CH1_AL2_CTRL_RESET "-" +#define DMA_CH1_AL2_CTRL_MSB 31 +#define DMA_CH1_AL2_CTRL_LSB 0 +#define DMA_CH1_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL2_TRANS_COUNT +// Description : Alias for channel 1 TRANS_COUNT register +#define DMA_CH1_AL2_TRANS_COUNT_OFFSET 0x00000064 +#define DMA_CH1_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH1_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH1_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH1_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH1_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL2_READ_ADDR +// Description : Alias for channel 1 READ_ADDR register +#define DMA_CH1_AL2_READ_ADDR_OFFSET 0x00000068 +#define DMA_CH1_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH1_AL2_READ_ADDR_RESET "-" +#define DMA_CH1_AL2_READ_ADDR_MSB 31 +#define DMA_CH1_AL2_READ_ADDR_LSB 0 +#define DMA_CH1_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 1 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH1_AL2_WRITE_ADDR_TRIG_OFFSET 0x0000006c +#define DMA_CH1_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH1_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH1_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH1_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH1_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL3_CTRL +// Description : Alias for channel 1 CTRL register +#define DMA_CH1_AL3_CTRL_OFFSET 0x00000070 +#define DMA_CH1_AL3_CTRL_BITS 0xffffffff +#define DMA_CH1_AL3_CTRL_RESET "-" +#define DMA_CH1_AL3_CTRL_MSB 31 +#define DMA_CH1_AL3_CTRL_LSB 0 +#define DMA_CH1_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL3_WRITE_ADDR +// Description : Alias for channel 1 WRITE_ADDR register +#define DMA_CH1_AL3_WRITE_ADDR_OFFSET 0x00000074 +#define DMA_CH1_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH1_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH1_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH1_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH1_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL3_TRANS_COUNT +// Description : Alias for channel 1 TRANS_COUNT register +#define DMA_CH1_AL3_TRANS_COUNT_OFFSET 0x00000078 +#define DMA_CH1_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH1_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH1_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH1_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH1_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_AL3_READ_ADDR_TRIG +// Description : Alias for channel 1 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH1_AL3_READ_ADDR_TRIG_OFFSET 0x0000007c +#define DMA_CH1_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH1_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH1_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH1_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH1_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_READ_ADDR +// Description : DMA Channel 2 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH2_READ_ADDR_OFFSET 0x00000080 +#define DMA_CH2_READ_ADDR_BITS 0xffffffff +#define DMA_CH2_READ_ADDR_RESET 0x00000000 +#define DMA_CH2_READ_ADDR_MSB 31 +#define DMA_CH2_READ_ADDR_LSB 0 +#define DMA_CH2_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH2_WRITE_ADDR +// Description : DMA Channel 2 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH2_WRITE_ADDR_OFFSET 0x00000084 +#define DMA_CH2_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH2_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH2_WRITE_ADDR_MSB 31 +#define DMA_CH2_WRITE_ADDR_LSB 0 +#define DMA_CH2_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH2_TRANS_COUNT +// Description : DMA Channel 2 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH2_TRANS_COUNT_OFFSET 0x00000088 +#define DMA_CH2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH2_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH2_TRANS_COUNT_MSB 31 +#define DMA_CH2_TRANS_COUNT_LSB 0 +#define DMA_CH2_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH2_CTRL_TRIG +// Description : DMA Channel 2 Control and Status +#define DMA_CH2_CTRL_TRIG_OFFSET 0x0000008c +#define DMA_CH2_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH2_CTRL_TRIG_RESET 0x00001000 +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH2_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH2_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH2_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH2_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH2_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH2_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH2_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH2_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH2_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH2_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH2_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH2_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH2_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH2_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH2_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH2_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH2_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH2_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH2_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH2_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH2_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH2_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH2_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH2_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH2_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH2_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH2_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH2_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH2_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (2). +#define DMA_CH2_CTRL_TRIG_CHAIN_TO_RESET 0x2 +#define DMA_CH2_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH2_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH2_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH2_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH2_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH2_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH2_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH2_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH2_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH2_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH2_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH2_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH2_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH2_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH2_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH2_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH2_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH2_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH2_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH2_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH2_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH2_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH2_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH2_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH2_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH2_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH2_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH2_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH2_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH2_CTRL_TRIG_EN_MSB 0 +#define DMA_CH2_CTRL_TRIG_EN_LSB 0 +#define DMA_CH2_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH2_AL1_CTRL +// Description : Alias for channel 2 CTRL register +#define DMA_CH2_AL1_CTRL_OFFSET 0x00000090 +#define DMA_CH2_AL1_CTRL_BITS 0xffffffff +#define DMA_CH2_AL1_CTRL_RESET "-" +#define DMA_CH2_AL1_CTRL_MSB 31 +#define DMA_CH2_AL1_CTRL_LSB 0 +#define DMA_CH2_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL1_READ_ADDR +// Description : Alias for channel 2 READ_ADDR register +#define DMA_CH2_AL1_READ_ADDR_OFFSET 0x00000094 +#define DMA_CH2_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH2_AL1_READ_ADDR_RESET "-" +#define DMA_CH2_AL1_READ_ADDR_MSB 31 +#define DMA_CH2_AL1_READ_ADDR_LSB 0 +#define DMA_CH2_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL1_WRITE_ADDR +// Description : Alias for channel 2 WRITE_ADDR register +#define DMA_CH2_AL1_WRITE_ADDR_OFFSET 0x00000098 +#define DMA_CH2_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH2_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH2_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH2_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH2_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 2 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH2_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000009c +#define DMA_CH2_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH2_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH2_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH2_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH2_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL2_CTRL +// Description : Alias for channel 2 CTRL register +#define DMA_CH2_AL2_CTRL_OFFSET 0x000000a0 +#define DMA_CH2_AL2_CTRL_BITS 0xffffffff +#define DMA_CH2_AL2_CTRL_RESET "-" +#define DMA_CH2_AL2_CTRL_MSB 31 +#define DMA_CH2_AL2_CTRL_LSB 0 +#define DMA_CH2_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL2_TRANS_COUNT +// Description : Alias for channel 2 TRANS_COUNT register +#define DMA_CH2_AL2_TRANS_COUNT_OFFSET 0x000000a4 +#define DMA_CH2_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH2_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH2_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH2_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH2_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL2_READ_ADDR +// Description : Alias for channel 2 READ_ADDR register +#define DMA_CH2_AL2_READ_ADDR_OFFSET 0x000000a8 +#define DMA_CH2_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH2_AL2_READ_ADDR_RESET "-" +#define DMA_CH2_AL2_READ_ADDR_MSB 31 +#define DMA_CH2_AL2_READ_ADDR_LSB 0 +#define DMA_CH2_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 2 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH2_AL2_WRITE_ADDR_TRIG_OFFSET 0x000000ac +#define DMA_CH2_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH2_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH2_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH2_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH2_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL3_CTRL +// Description : Alias for channel 2 CTRL register +#define DMA_CH2_AL3_CTRL_OFFSET 0x000000b0 +#define DMA_CH2_AL3_CTRL_BITS 0xffffffff +#define DMA_CH2_AL3_CTRL_RESET "-" +#define DMA_CH2_AL3_CTRL_MSB 31 +#define DMA_CH2_AL3_CTRL_LSB 0 +#define DMA_CH2_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL3_WRITE_ADDR +// Description : Alias for channel 2 WRITE_ADDR register +#define DMA_CH2_AL3_WRITE_ADDR_OFFSET 0x000000b4 +#define DMA_CH2_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH2_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH2_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH2_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH2_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL3_TRANS_COUNT +// Description : Alias for channel 2 TRANS_COUNT register +#define DMA_CH2_AL3_TRANS_COUNT_OFFSET 0x000000b8 +#define DMA_CH2_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH2_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH2_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH2_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH2_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_AL3_READ_ADDR_TRIG +// Description : Alias for channel 2 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH2_AL3_READ_ADDR_TRIG_OFFSET 0x000000bc +#define DMA_CH2_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH2_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH2_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH2_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH2_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_READ_ADDR +// Description : DMA Channel 3 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH3_READ_ADDR_OFFSET 0x000000c0 +#define DMA_CH3_READ_ADDR_BITS 0xffffffff +#define DMA_CH3_READ_ADDR_RESET 0x00000000 +#define DMA_CH3_READ_ADDR_MSB 31 +#define DMA_CH3_READ_ADDR_LSB 0 +#define DMA_CH3_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH3_WRITE_ADDR +// Description : DMA Channel 3 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH3_WRITE_ADDR_OFFSET 0x000000c4 +#define DMA_CH3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH3_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH3_WRITE_ADDR_MSB 31 +#define DMA_CH3_WRITE_ADDR_LSB 0 +#define DMA_CH3_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH3_TRANS_COUNT +// Description : DMA Channel 3 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH3_TRANS_COUNT_OFFSET 0x000000c8 +#define DMA_CH3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH3_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH3_TRANS_COUNT_MSB 31 +#define DMA_CH3_TRANS_COUNT_LSB 0 +#define DMA_CH3_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH3_CTRL_TRIG +// Description : DMA Channel 3 Control and Status +#define DMA_CH3_CTRL_TRIG_OFFSET 0x000000cc +#define DMA_CH3_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH3_CTRL_TRIG_RESET 0x00001800 +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH3_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH3_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH3_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH3_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH3_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH3_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH3_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH3_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH3_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH3_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH3_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH3_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH3_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH3_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH3_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH3_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH3_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH3_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH3_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH3_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH3_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH3_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH3_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH3_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH3_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH3_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH3_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH3_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH3_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (3). +#define DMA_CH3_CTRL_TRIG_CHAIN_TO_RESET 0x3 +#define DMA_CH3_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH3_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH3_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH3_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH3_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH3_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH3_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH3_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH3_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH3_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH3_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH3_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH3_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH3_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH3_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH3_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH3_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH3_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH3_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH3_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH3_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH3_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH3_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH3_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH3_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH3_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH3_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH3_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH3_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH3_CTRL_TRIG_EN_MSB 0 +#define DMA_CH3_CTRL_TRIG_EN_LSB 0 +#define DMA_CH3_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH3_AL1_CTRL +// Description : Alias for channel 3 CTRL register +#define DMA_CH3_AL1_CTRL_OFFSET 0x000000d0 +#define DMA_CH3_AL1_CTRL_BITS 0xffffffff +#define DMA_CH3_AL1_CTRL_RESET "-" +#define DMA_CH3_AL1_CTRL_MSB 31 +#define DMA_CH3_AL1_CTRL_LSB 0 +#define DMA_CH3_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL1_READ_ADDR +// Description : Alias for channel 3 READ_ADDR register +#define DMA_CH3_AL1_READ_ADDR_OFFSET 0x000000d4 +#define DMA_CH3_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH3_AL1_READ_ADDR_RESET "-" +#define DMA_CH3_AL1_READ_ADDR_MSB 31 +#define DMA_CH3_AL1_READ_ADDR_LSB 0 +#define DMA_CH3_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL1_WRITE_ADDR +// Description : Alias for channel 3 WRITE_ADDR register +#define DMA_CH3_AL1_WRITE_ADDR_OFFSET 0x000000d8 +#define DMA_CH3_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH3_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH3_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH3_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH3_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 3 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH3_AL1_TRANS_COUNT_TRIG_OFFSET 0x000000dc +#define DMA_CH3_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH3_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH3_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH3_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH3_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL2_CTRL +// Description : Alias for channel 3 CTRL register +#define DMA_CH3_AL2_CTRL_OFFSET 0x000000e0 +#define DMA_CH3_AL2_CTRL_BITS 0xffffffff +#define DMA_CH3_AL2_CTRL_RESET "-" +#define DMA_CH3_AL2_CTRL_MSB 31 +#define DMA_CH3_AL2_CTRL_LSB 0 +#define DMA_CH3_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL2_TRANS_COUNT +// Description : Alias for channel 3 TRANS_COUNT register +#define DMA_CH3_AL2_TRANS_COUNT_OFFSET 0x000000e4 +#define DMA_CH3_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH3_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH3_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH3_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH3_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL2_READ_ADDR +// Description : Alias for channel 3 READ_ADDR register +#define DMA_CH3_AL2_READ_ADDR_OFFSET 0x000000e8 +#define DMA_CH3_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH3_AL2_READ_ADDR_RESET "-" +#define DMA_CH3_AL2_READ_ADDR_MSB 31 +#define DMA_CH3_AL2_READ_ADDR_LSB 0 +#define DMA_CH3_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 3 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH3_AL2_WRITE_ADDR_TRIG_OFFSET 0x000000ec +#define DMA_CH3_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH3_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH3_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH3_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH3_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL3_CTRL +// Description : Alias for channel 3 CTRL register +#define DMA_CH3_AL3_CTRL_OFFSET 0x000000f0 +#define DMA_CH3_AL3_CTRL_BITS 0xffffffff +#define DMA_CH3_AL3_CTRL_RESET "-" +#define DMA_CH3_AL3_CTRL_MSB 31 +#define DMA_CH3_AL3_CTRL_LSB 0 +#define DMA_CH3_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL3_WRITE_ADDR +// Description : Alias for channel 3 WRITE_ADDR register +#define DMA_CH3_AL3_WRITE_ADDR_OFFSET 0x000000f4 +#define DMA_CH3_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH3_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH3_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH3_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH3_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL3_TRANS_COUNT +// Description : Alias for channel 3 TRANS_COUNT register +#define DMA_CH3_AL3_TRANS_COUNT_OFFSET 0x000000f8 +#define DMA_CH3_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH3_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH3_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH3_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH3_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_AL3_READ_ADDR_TRIG +// Description : Alias for channel 3 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH3_AL3_READ_ADDR_TRIG_OFFSET 0x000000fc +#define DMA_CH3_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH3_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH3_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH3_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH3_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_READ_ADDR +// Description : DMA Channel 4 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH4_READ_ADDR_OFFSET 0x00000100 +#define DMA_CH4_READ_ADDR_BITS 0xffffffff +#define DMA_CH4_READ_ADDR_RESET 0x00000000 +#define DMA_CH4_READ_ADDR_MSB 31 +#define DMA_CH4_READ_ADDR_LSB 0 +#define DMA_CH4_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH4_WRITE_ADDR +// Description : DMA Channel 4 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH4_WRITE_ADDR_OFFSET 0x00000104 +#define DMA_CH4_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH4_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH4_WRITE_ADDR_MSB 31 +#define DMA_CH4_WRITE_ADDR_LSB 0 +#define DMA_CH4_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH4_TRANS_COUNT +// Description : DMA Channel 4 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH4_TRANS_COUNT_OFFSET 0x00000108 +#define DMA_CH4_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH4_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH4_TRANS_COUNT_MSB 31 +#define DMA_CH4_TRANS_COUNT_LSB 0 +#define DMA_CH4_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH4_CTRL_TRIG +// Description : DMA Channel 4 Control and Status +#define DMA_CH4_CTRL_TRIG_OFFSET 0x0000010c +#define DMA_CH4_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH4_CTRL_TRIG_RESET 0x00002000 +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH4_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH4_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH4_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH4_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH4_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH4_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH4_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH4_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH4_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH4_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH4_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH4_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH4_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH4_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH4_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH4_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH4_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH4_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH4_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH4_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH4_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH4_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH4_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH4_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH4_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH4_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH4_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH4_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH4_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (4). +#define DMA_CH4_CTRL_TRIG_CHAIN_TO_RESET 0x4 +#define DMA_CH4_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH4_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH4_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH4_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH4_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH4_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH4_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH4_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH4_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH4_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH4_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH4_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH4_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH4_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH4_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH4_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH4_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH4_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH4_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH4_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH4_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH4_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH4_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH4_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH4_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH4_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH4_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH4_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH4_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH4_CTRL_TRIG_EN_MSB 0 +#define DMA_CH4_CTRL_TRIG_EN_LSB 0 +#define DMA_CH4_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH4_AL1_CTRL +// Description : Alias for channel 4 CTRL register +#define DMA_CH4_AL1_CTRL_OFFSET 0x00000110 +#define DMA_CH4_AL1_CTRL_BITS 0xffffffff +#define DMA_CH4_AL1_CTRL_RESET "-" +#define DMA_CH4_AL1_CTRL_MSB 31 +#define DMA_CH4_AL1_CTRL_LSB 0 +#define DMA_CH4_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL1_READ_ADDR +// Description : Alias for channel 4 READ_ADDR register +#define DMA_CH4_AL1_READ_ADDR_OFFSET 0x00000114 +#define DMA_CH4_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH4_AL1_READ_ADDR_RESET "-" +#define DMA_CH4_AL1_READ_ADDR_MSB 31 +#define DMA_CH4_AL1_READ_ADDR_LSB 0 +#define DMA_CH4_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL1_WRITE_ADDR +// Description : Alias for channel 4 WRITE_ADDR register +#define DMA_CH4_AL1_WRITE_ADDR_OFFSET 0x00000118 +#define DMA_CH4_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH4_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH4_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH4_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH4_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 4 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH4_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000011c +#define DMA_CH4_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH4_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH4_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH4_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH4_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL2_CTRL +// Description : Alias for channel 4 CTRL register +#define DMA_CH4_AL2_CTRL_OFFSET 0x00000120 +#define DMA_CH4_AL2_CTRL_BITS 0xffffffff +#define DMA_CH4_AL2_CTRL_RESET "-" +#define DMA_CH4_AL2_CTRL_MSB 31 +#define DMA_CH4_AL2_CTRL_LSB 0 +#define DMA_CH4_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL2_TRANS_COUNT +// Description : Alias for channel 4 TRANS_COUNT register +#define DMA_CH4_AL2_TRANS_COUNT_OFFSET 0x00000124 +#define DMA_CH4_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH4_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH4_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH4_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH4_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL2_READ_ADDR +// Description : Alias for channel 4 READ_ADDR register +#define DMA_CH4_AL2_READ_ADDR_OFFSET 0x00000128 +#define DMA_CH4_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH4_AL2_READ_ADDR_RESET "-" +#define DMA_CH4_AL2_READ_ADDR_MSB 31 +#define DMA_CH4_AL2_READ_ADDR_LSB 0 +#define DMA_CH4_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 4 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH4_AL2_WRITE_ADDR_TRIG_OFFSET 0x0000012c +#define DMA_CH4_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH4_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH4_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH4_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH4_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL3_CTRL +// Description : Alias for channel 4 CTRL register +#define DMA_CH4_AL3_CTRL_OFFSET 0x00000130 +#define DMA_CH4_AL3_CTRL_BITS 0xffffffff +#define DMA_CH4_AL3_CTRL_RESET "-" +#define DMA_CH4_AL3_CTRL_MSB 31 +#define DMA_CH4_AL3_CTRL_LSB 0 +#define DMA_CH4_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL3_WRITE_ADDR +// Description : Alias for channel 4 WRITE_ADDR register +#define DMA_CH4_AL3_WRITE_ADDR_OFFSET 0x00000134 +#define DMA_CH4_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH4_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH4_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH4_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH4_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL3_TRANS_COUNT +// Description : Alias for channel 4 TRANS_COUNT register +#define DMA_CH4_AL3_TRANS_COUNT_OFFSET 0x00000138 +#define DMA_CH4_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH4_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH4_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH4_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH4_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_AL3_READ_ADDR_TRIG +// Description : Alias for channel 4 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH4_AL3_READ_ADDR_TRIG_OFFSET 0x0000013c +#define DMA_CH4_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH4_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH4_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH4_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH4_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_READ_ADDR +// Description : DMA Channel 5 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH5_READ_ADDR_OFFSET 0x00000140 +#define DMA_CH5_READ_ADDR_BITS 0xffffffff +#define DMA_CH5_READ_ADDR_RESET 0x00000000 +#define DMA_CH5_READ_ADDR_MSB 31 +#define DMA_CH5_READ_ADDR_LSB 0 +#define DMA_CH5_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH5_WRITE_ADDR +// Description : DMA Channel 5 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH5_WRITE_ADDR_OFFSET 0x00000144 +#define DMA_CH5_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH5_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH5_WRITE_ADDR_MSB 31 +#define DMA_CH5_WRITE_ADDR_LSB 0 +#define DMA_CH5_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH5_TRANS_COUNT +// Description : DMA Channel 5 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH5_TRANS_COUNT_OFFSET 0x00000148 +#define DMA_CH5_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH5_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH5_TRANS_COUNT_MSB 31 +#define DMA_CH5_TRANS_COUNT_LSB 0 +#define DMA_CH5_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH5_CTRL_TRIG +// Description : DMA Channel 5 Control and Status +#define DMA_CH5_CTRL_TRIG_OFFSET 0x0000014c +#define DMA_CH5_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH5_CTRL_TRIG_RESET 0x00002800 +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH5_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH5_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH5_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH5_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH5_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH5_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH5_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH5_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH5_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH5_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH5_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH5_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH5_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH5_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH5_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH5_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH5_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH5_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH5_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH5_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH5_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH5_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH5_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH5_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH5_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH5_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH5_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH5_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH5_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (5). +#define DMA_CH5_CTRL_TRIG_CHAIN_TO_RESET 0x5 +#define DMA_CH5_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH5_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH5_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH5_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH5_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH5_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH5_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH5_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH5_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH5_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH5_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH5_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH5_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH5_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH5_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH5_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH5_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH5_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH5_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH5_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH5_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH5_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH5_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH5_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH5_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH5_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH5_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH5_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH5_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH5_CTRL_TRIG_EN_MSB 0 +#define DMA_CH5_CTRL_TRIG_EN_LSB 0 +#define DMA_CH5_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH5_AL1_CTRL +// Description : Alias for channel 5 CTRL register +#define DMA_CH5_AL1_CTRL_OFFSET 0x00000150 +#define DMA_CH5_AL1_CTRL_BITS 0xffffffff +#define DMA_CH5_AL1_CTRL_RESET "-" +#define DMA_CH5_AL1_CTRL_MSB 31 +#define DMA_CH5_AL1_CTRL_LSB 0 +#define DMA_CH5_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL1_READ_ADDR +// Description : Alias for channel 5 READ_ADDR register +#define DMA_CH5_AL1_READ_ADDR_OFFSET 0x00000154 +#define DMA_CH5_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH5_AL1_READ_ADDR_RESET "-" +#define DMA_CH5_AL1_READ_ADDR_MSB 31 +#define DMA_CH5_AL1_READ_ADDR_LSB 0 +#define DMA_CH5_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL1_WRITE_ADDR +// Description : Alias for channel 5 WRITE_ADDR register +#define DMA_CH5_AL1_WRITE_ADDR_OFFSET 0x00000158 +#define DMA_CH5_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH5_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH5_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH5_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH5_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 5 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH5_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000015c +#define DMA_CH5_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH5_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH5_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH5_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH5_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL2_CTRL +// Description : Alias for channel 5 CTRL register +#define DMA_CH5_AL2_CTRL_OFFSET 0x00000160 +#define DMA_CH5_AL2_CTRL_BITS 0xffffffff +#define DMA_CH5_AL2_CTRL_RESET "-" +#define DMA_CH5_AL2_CTRL_MSB 31 +#define DMA_CH5_AL2_CTRL_LSB 0 +#define DMA_CH5_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL2_TRANS_COUNT +// Description : Alias for channel 5 TRANS_COUNT register +#define DMA_CH5_AL2_TRANS_COUNT_OFFSET 0x00000164 +#define DMA_CH5_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH5_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH5_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH5_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH5_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL2_READ_ADDR +// Description : Alias for channel 5 READ_ADDR register +#define DMA_CH5_AL2_READ_ADDR_OFFSET 0x00000168 +#define DMA_CH5_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH5_AL2_READ_ADDR_RESET "-" +#define DMA_CH5_AL2_READ_ADDR_MSB 31 +#define DMA_CH5_AL2_READ_ADDR_LSB 0 +#define DMA_CH5_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 5 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH5_AL2_WRITE_ADDR_TRIG_OFFSET 0x0000016c +#define DMA_CH5_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH5_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH5_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH5_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH5_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL3_CTRL +// Description : Alias for channel 5 CTRL register +#define DMA_CH5_AL3_CTRL_OFFSET 0x00000170 +#define DMA_CH5_AL3_CTRL_BITS 0xffffffff +#define DMA_CH5_AL3_CTRL_RESET "-" +#define DMA_CH5_AL3_CTRL_MSB 31 +#define DMA_CH5_AL3_CTRL_LSB 0 +#define DMA_CH5_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL3_WRITE_ADDR +// Description : Alias for channel 5 WRITE_ADDR register +#define DMA_CH5_AL3_WRITE_ADDR_OFFSET 0x00000174 +#define DMA_CH5_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH5_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH5_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH5_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH5_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL3_TRANS_COUNT +// Description : Alias for channel 5 TRANS_COUNT register +#define DMA_CH5_AL3_TRANS_COUNT_OFFSET 0x00000178 +#define DMA_CH5_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH5_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH5_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH5_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH5_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_AL3_READ_ADDR_TRIG +// Description : Alias for channel 5 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH5_AL3_READ_ADDR_TRIG_OFFSET 0x0000017c +#define DMA_CH5_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH5_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH5_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH5_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH5_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_READ_ADDR +// Description : DMA Channel 6 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH6_READ_ADDR_OFFSET 0x00000180 +#define DMA_CH6_READ_ADDR_BITS 0xffffffff +#define DMA_CH6_READ_ADDR_RESET 0x00000000 +#define DMA_CH6_READ_ADDR_MSB 31 +#define DMA_CH6_READ_ADDR_LSB 0 +#define DMA_CH6_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH6_WRITE_ADDR +// Description : DMA Channel 6 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH6_WRITE_ADDR_OFFSET 0x00000184 +#define DMA_CH6_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH6_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH6_WRITE_ADDR_MSB 31 +#define DMA_CH6_WRITE_ADDR_LSB 0 +#define DMA_CH6_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH6_TRANS_COUNT +// Description : DMA Channel 6 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH6_TRANS_COUNT_OFFSET 0x00000188 +#define DMA_CH6_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH6_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH6_TRANS_COUNT_MSB 31 +#define DMA_CH6_TRANS_COUNT_LSB 0 +#define DMA_CH6_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH6_CTRL_TRIG +// Description : DMA Channel 6 Control and Status +#define DMA_CH6_CTRL_TRIG_OFFSET 0x0000018c +#define DMA_CH6_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH6_CTRL_TRIG_RESET 0x00003000 +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH6_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH6_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH6_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH6_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH6_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH6_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH6_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH6_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH6_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH6_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH6_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH6_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH6_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH6_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH6_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH6_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH6_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH6_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH6_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH6_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH6_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH6_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH6_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH6_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH6_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH6_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH6_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH6_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH6_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (6). +#define DMA_CH6_CTRL_TRIG_CHAIN_TO_RESET 0x6 +#define DMA_CH6_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH6_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH6_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH6_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH6_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH6_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH6_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH6_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH6_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH6_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH6_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH6_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH6_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH6_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH6_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH6_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH6_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH6_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH6_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH6_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH6_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH6_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH6_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH6_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH6_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH6_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH6_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH6_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH6_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH6_CTRL_TRIG_EN_MSB 0 +#define DMA_CH6_CTRL_TRIG_EN_LSB 0 +#define DMA_CH6_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH6_AL1_CTRL +// Description : Alias for channel 6 CTRL register +#define DMA_CH6_AL1_CTRL_OFFSET 0x00000190 +#define DMA_CH6_AL1_CTRL_BITS 0xffffffff +#define DMA_CH6_AL1_CTRL_RESET "-" +#define DMA_CH6_AL1_CTRL_MSB 31 +#define DMA_CH6_AL1_CTRL_LSB 0 +#define DMA_CH6_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL1_READ_ADDR +// Description : Alias for channel 6 READ_ADDR register +#define DMA_CH6_AL1_READ_ADDR_OFFSET 0x00000194 +#define DMA_CH6_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH6_AL1_READ_ADDR_RESET "-" +#define DMA_CH6_AL1_READ_ADDR_MSB 31 +#define DMA_CH6_AL1_READ_ADDR_LSB 0 +#define DMA_CH6_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL1_WRITE_ADDR +// Description : Alias for channel 6 WRITE_ADDR register +#define DMA_CH6_AL1_WRITE_ADDR_OFFSET 0x00000198 +#define DMA_CH6_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH6_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH6_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH6_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH6_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 6 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH6_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000019c +#define DMA_CH6_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH6_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH6_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH6_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH6_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL2_CTRL +// Description : Alias for channel 6 CTRL register +#define DMA_CH6_AL2_CTRL_OFFSET 0x000001a0 +#define DMA_CH6_AL2_CTRL_BITS 0xffffffff +#define DMA_CH6_AL2_CTRL_RESET "-" +#define DMA_CH6_AL2_CTRL_MSB 31 +#define DMA_CH6_AL2_CTRL_LSB 0 +#define DMA_CH6_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL2_TRANS_COUNT +// Description : Alias for channel 6 TRANS_COUNT register +#define DMA_CH6_AL2_TRANS_COUNT_OFFSET 0x000001a4 +#define DMA_CH6_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH6_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH6_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH6_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH6_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL2_READ_ADDR +// Description : Alias for channel 6 READ_ADDR register +#define DMA_CH6_AL2_READ_ADDR_OFFSET 0x000001a8 +#define DMA_CH6_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH6_AL2_READ_ADDR_RESET "-" +#define DMA_CH6_AL2_READ_ADDR_MSB 31 +#define DMA_CH6_AL2_READ_ADDR_LSB 0 +#define DMA_CH6_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 6 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH6_AL2_WRITE_ADDR_TRIG_OFFSET 0x000001ac +#define DMA_CH6_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH6_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH6_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH6_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH6_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL3_CTRL +// Description : Alias for channel 6 CTRL register +#define DMA_CH6_AL3_CTRL_OFFSET 0x000001b0 +#define DMA_CH6_AL3_CTRL_BITS 0xffffffff +#define DMA_CH6_AL3_CTRL_RESET "-" +#define DMA_CH6_AL3_CTRL_MSB 31 +#define DMA_CH6_AL3_CTRL_LSB 0 +#define DMA_CH6_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL3_WRITE_ADDR +// Description : Alias for channel 6 WRITE_ADDR register +#define DMA_CH6_AL3_WRITE_ADDR_OFFSET 0x000001b4 +#define DMA_CH6_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH6_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH6_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH6_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH6_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL3_TRANS_COUNT +// Description : Alias for channel 6 TRANS_COUNT register +#define DMA_CH6_AL3_TRANS_COUNT_OFFSET 0x000001b8 +#define DMA_CH6_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH6_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH6_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH6_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH6_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_AL3_READ_ADDR_TRIG +// Description : Alias for channel 6 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH6_AL3_READ_ADDR_TRIG_OFFSET 0x000001bc +#define DMA_CH6_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH6_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH6_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH6_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH6_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_READ_ADDR +// Description : DMA Channel 7 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH7_READ_ADDR_OFFSET 0x000001c0 +#define DMA_CH7_READ_ADDR_BITS 0xffffffff +#define DMA_CH7_READ_ADDR_RESET 0x00000000 +#define DMA_CH7_READ_ADDR_MSB 31 +#define DMA_CH7_READ_ADDR_LSB 0 +#define DMA_CH7_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH7_WRITE_ADDR +// Description : DMA Channel 7 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH7_WRITE_ADDR_OFFSET 0x000001c4 +#define DMA_CH7_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH7_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH7_WRITE_ADDR_MSB 31 +#define DMA_CH7_WRITE_ADDR_LSB 0 +#define DMA_CH7_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH7_TRANS_COUNT +// Description : DMA Channel 7 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH7_TRANS_COUNT_OFFSET 0x000001c8 +#define DMA_CH7_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH7_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH7_TRANS_COUNT_MSB 31 +#define DMA_CH7_TRANS_COUNT_LSB 0 +#define DMA_CH7_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH7_CTRL_TRIG +// Description : DMA Channel 7 Control and Status +#define DMA_CH7_CTRL_TRIG_OFFSET 0x000001cc +#define DMA_CH7_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH7_CTRL_TRIG_RESET 0x00003800 +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH7_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH7_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH7_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH7_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH7_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH7_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH7_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH7_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH7_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH7_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH7_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH7_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH7_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH7_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH7_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH7_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH7_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH7_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH7_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH7_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH7_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH7_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH7_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH7_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH7_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH7_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH7_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH7_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH7_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (7). +#define DMA_CH7_CTRL_TRIG_CHAIN_TO_RESET 0x7 +#define DMA_CH7_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH7_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH7_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH7_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH7_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH7_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH7_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH7_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH7_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH7_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH7_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH7_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH7_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH7_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH7_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH7_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH7_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH7_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH7_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH7_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH7_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH7_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH7_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH7_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH7_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH7_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH7_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH7_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH7_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH7_CTRL_TRIG_EN_MSB 0 +#define DMA_CH7_CTRL_TRIG_EN_LSB 0 +#define DMA_CH7_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH7_AL1_CTRL +// Description : Alias for channel 7 CTRL register +#define DMA_CH7_AL1_CTRL_OFFSET 0x000001d0 +#define DMA_CH7_AL1_CTRL_BITS 0xffffffff +#define DMA_CH7_AL1_CTRL_RESET "-" +#define DMA_CH7_AL1_CTRL_MSB 31 +#define DMA_CH7_AL1_CTRL_LSB 0 +#define DMA_CH7_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL1_READ_ADDR +// Description : Alias for channel 7 READ_ADDR register +#define DMA_CH7_AL1_READ_ADDR_OFFSET 0x000001d4 +#define DMA_CH7_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH7_AL1_READ_ADDR_RESET "-" +#define DMA_CH7_AL1_READ_ADDR_MSB 31 +#define DMA_CH7_AL1_READ_ADDR_LSB 0 +#define DMA_CH7_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL1_WRITE_ADDR +// Description : Alias for channel 7 WRITE_ADDR register +#define DMA_CH7_AL1_WRITE_ADDR_OFFSET 0x000001d8 +#define DMA_CH7_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH7_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH7_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH7_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH7_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 7 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH7_AL1_TRANS_COUNT_TRIG_OFFSET 0x000001dc +#define DMA_CH7_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH7_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH7_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH7_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH7_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL2_CTRL +// Description : Alias for channel 7 CTRL register +#define DMA_CH7_AL2_CTRL_OFFSET 0x000001e0 +#define DMA_CH7_AL2_CTRL_BITS 0xffffffff +#define DMA_CH7_AL2_CTRL_RESET "-" +#define DMA_CH7_AL2_CTRL_MSB 31 +#define DMA_CH7_AL2_CTRL_LSB 0 +#define DMA_CH7_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL2_TRANS_COUNT +// Description : Alias for channel 7 TRANS_COUNT register +#define DMA_CH7_AL2_TRANS_COUNT_OFFSET 0x000001e4 +#define DMA_CH7_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH7_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH7_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH7_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH7_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL2_READ_ADDR +// Description : Alias for channel 7 READ_ADDR register +#define DMA_CH7_AL2_READ_ADDR_OFFSET 0x000001e8 +#define DMA_CH7_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH7_AL2_READ_ADDR_RESET "-" +#define DMA_CH7_AL2_READ_ADDR_MSB 31 +#define DMA_CH7_AL2_READ_ADDR_LSB 0 +#define DMA_CH7_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 7 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH7_AL2_WRITE_ADDR_TRIG_OFFSET 0x000001ec +#define DMA_CH7_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH7_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH7_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH7_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH7_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL3_CTRL +// Description : Alias for channel 7 CTRL register +#define DMA_CH7_AL3_CTRL_OFFSET 0x000001f0 +#define DMA_CH7_AL3_CTRL_BITS 0xffffffff +#define DMA_CH7_AL3_CTRL_RESET "-" +#define DMA_CH7_AL3_CTRL_MSB 31 +#define DMA_CH7_AL3_CTRL_LSB 0 +#define DMA_CH7_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL3_WRITE_ADDR +// Description : Alias for channel 7 WRITE_ADDR register +#define DMA_CH7_AL3_WRITE_ADDR_OFFSET 0x000001f4 +#define DMA_CH7_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH7_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH7_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH7_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH7_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL3_TRANS_COUNT +// Description : Alias for channel 7 TRANS_COUNT register +#define DMA_CH7_AL3_TRANS_COUNT_OFFSET 0x000001f8 +#define DMA_CH7_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH7_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH7_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH7_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH7_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_AL3_READ_ADDR_TRIG +// Description : Alias for channel 7 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH7_AL3_READ_ADDR_TRIG_OFFSET 0x000001fc +#define DMA_CH7_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH7_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH7_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH7_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH7_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_READ_ADDR +// Description : DMA Channel 8 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH8_READ_ADDR_OFFSET 0x00000200 +#define DMA_CH8_READ_ADDR_BITS 0xffffffff +#define DMA_CH8_READ_ADDR_RESET 0x00000000 +#define DMA_CH8_READ_ADDR_MSB 31 +#define DMA_CH8_READ_ADDR_LSB 0 +#define DMA_CH8_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH8_WRITE_ADDR +// Description : DMA Channel 8 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH8_WRITE_ADDR_OFFSET 0x00000204 +#define DMA_CH8_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH8_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH8_WRITE_ADDR_MSB 31 +#define DMA_CH8_WRITE_ADDR_LSB 0 +#define DMA_CH8_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH8_TRANS_COUNT +// Description : DMA Channel 8 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH8_TRANS_COUNT_OFFSET 0x00000208 +#define DMA_CH8_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH8_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH8_TRANS_COUNT_MSB 31 +#define DMA_CH8_TRANS_COUNT_LSB 0 +#define DMA_CH8_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH8_CTRL_TRIG +// Description : DMA Channel 8 Control and Status +#define DMA_CH8_CTRL_TRIG_OFFSET 0x0000020c +#define DMA_CH8_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH8_CTRL_TRIG_RESET 0x00004000 +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH8_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH8_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH8_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH8_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH8_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH8_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH8_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH8_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH8_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH8_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH8_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH8_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH8_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH8_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH8_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH8_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH8_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH8_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH8_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH8_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH8_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH8_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH8_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH8_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH8_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH8_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH8_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH8_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH8_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (8). +#define DMA_CH8_CTRL_TRIG_CHAIN_TO_RESET 0x8 +#define DMA_CH8_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH8_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH8_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH8_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH8_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH8_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH8_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH8_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH8_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH8_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH8_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH8_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH8_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH8_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH8_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH8_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH8_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH8_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH8_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH8_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH8_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH8_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH8_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH8_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH8_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH8_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH8_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH8_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH8_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH8_CTRL_TRIG_EN_MSB 0 +#define DMA_CH8_CTRL_TRIG_EN_LSB 0 +#define DMA_CH8_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH8_AL1_CTRL +// Description : Alias for channel 8 CTRL register +#define DMA_CH8_AL1_CTRL_OFFSET 0x00000210 +#define DMA_CH8_AL1_CTRL_BITS 0xffffffff +#define DMA_CH8_AL1_CTRL_RESET "-" +#define DMA_CH8_AL1_CTRL_MSB 31 +#define DMA_CH8_AL1_CTRL_LSB 0 +#define DMA_CH8_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL1_READ_ADDR +// Description : Alias for channel 8 READ_ADDR register +#define DMA_CH8_AL1_READ_ADDR_OFFSET 0x00000214 +#define DMA_CH8_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH8_AL1_READ_ADDR_RESET "-" +#define DMA_CH8_AL1_READ_ADDR_MSB 31 +#define DMA_CH8_AL1_READ_ADDR_LSB 0 +#define DMA_CH8_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL1_WRITE_ADDR +// Description : Alias for channel 8 WRITE_ADDR register +#define DMA_CH8_AL1_WRITE_ADDR_OFFSET 0x00000218 +#define DMA_CH8_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH8_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH8_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH8_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH8_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 8 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH8_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000021c +#define DMA_CH8_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH8_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH8_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH8_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH8_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL2_CTRL +// Description : Alias for channel 8 CTRL register +#define DMA_CH8_AL2_CTRL_OFFSET 0x00000220 +#define DMA_CH8_AL2_CTRL_BITS 0xffffffff +#define DMA_CH8_AL2_CTRL_RESET "-" +#define DMA_CH8_AL2_CTRL_MSB 31 +#define DMA_CH8_AL2_CTRL_LSB 0 +#define DMA_CH8_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL2_TRANS_COUNT +// Description : Alias for channel 8 TRANS_COUNT register +#define DMA_CH8_AL2_TRANS_COUNT_OFFSET 0x00000224 +#define DMA_CH8_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH8_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH8_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH8_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH8_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL2_READ_ADDR +// Description : Alias for channel 8 READ_ADDR register +#define DMA_CH8_AL2_READ_ADDR_OFFSET 0x00000228 +#define DMA_CH8_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH8_AL2_READ_ADDR_RESET "-" +#define DMA_CH8_AL2_READ_ADDR_MSB 31 +#define DMA_CH8_AL2_READ_ADDR_LSB 0 +#define DMA_CH8_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 8 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH8_AL2_WRITE_ADDR_TRIG_OFFSET 0x0000022c +#define DMA_CH8_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH8_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH8_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH8_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH8_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL3_CTRL +// Description : Alias for channel 8 CTRL register +#define DMA_CH8_AL3_CTRL_OFFSET 0x00000230 +#define DMA_CH8_AL3_CTRL_BITS 0xffffffff +#define DMA_CH8_AL3_CTRL_RESET "-" +#define DMA_CH8_AL3_CTRL_MSB 31 +#define DMA_CH8_AL3_CTRL_LSB 0 +#define DMA_CH8_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL3_WRITE_ADDR +// Description : Alias for channel 8 WRITE_ADDR register +#define DMA_CH8_AL3_WRITE_ADDR_OFFSET 0x00000234 +#define DMA_CH8_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH8_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH8_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH8_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH8_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL3_TRANS_COUNT +// Description : Alias for channel 8 TRANS_COUNT register +#define DMA_CH8_AL3_TRANS_COUNT_OFFSET 0x00000238 +#define DMA_CH8_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH8_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH8_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH8_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH8_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_AL3_READ_ADDR_TRIG +// Description : Alias for channel 8 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH8_AL3_READ_ADDR_TRIG_OFFSET 0x0000023c +#define DMA_CH8_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH8_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH8_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH8_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH8_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_READ_ADDR +// Description : DMA Channel 9 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH9_READ_ADDR_OFFSET 0x00000240 +#define DMA_CH9_READ_ADDR_BITS 0xffffffff +#define DMA_CH9_READ_ADDR_RESET 0x00000000 +#define DMA_CH9_READ_ADDR_MSB 31 +#define DMA_CH9_READ_ADDR_LSB 0 +#define DMA_CH9_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH9_WRITE_ADDR +// Description : DMA Channel 9 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH9_WRITE_ADDR_OFFSET 0x00000244 +#define DMA_CH9_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH9_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH9_WRITE_ADDR_MSB 31 +#define DMA_CH9_WRITE_ADDR_LSB 0 +#define DMA_CH9_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH9_TRANS_COUNT +// Description : DMA Channel 9 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH9_TRANS_COUNT_OFFSET 0x00000248 +#define DMA_CH9_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH9_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH9_TRANS_COUNT_MSB 31 +#define DMA_CH9_TRANS_COUNT_LSB 0 +#define DMA_CH9_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH9_CTRL_TRIG +// Description : DMA Channel 9 Control and Status +#define DMA_CH9_CTRL_TRIG_OFFSET 0x0000024c +#define DMA_CH9_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH9_CTRL_TRIG_RESET 0x00004800 +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH9_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH9_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH9_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH9_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH9_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH9_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH9_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH9_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH9_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH9_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH9_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH9_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH9_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH9_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH9_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH9_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH9_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH9_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH9_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH9_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH9_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH9_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH9_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH9_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH9_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH9_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH9_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH9_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH9_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (9). +#define DMA_CH9_CTRL_TRIG_CHAIN_TO_RESET 0x9 +#define DMA_CH9_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH9_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH9_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH9_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH9_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH9_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH9_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH9_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH9_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH9_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH9_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH9_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH9_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH9_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH9_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH9_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH9_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH9_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH9_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH9_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH9_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH9_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH9_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH9_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH9_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH9_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH9_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH9_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH9_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH9_CTRL_TRIG_EN_MSB 0 +#define DMA_CH9_CTRL_TRIG_EN_LSB 0 +#define DMA_CH9_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH9_AL1_CTRL +// Description : Alias for channel 9 CTRL register +#define DMA_CH9_AL1_CTRL_OFFSET 0x00000250 +#define DMA_CH9_AL1_CTRL_BITS 0xffffffff +#define DMA_CH9_AL1_CTRL_RESET "-" +#define DMA_CH9_AL1_CTRL_MSB 31 +#define DMA_CH9_AL1_CTRL_LSB 0 +#define DMA_CH9_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL1_READ_ADDR +// Description : Alias for channel 9 READ_ADDR register +#define DMA_CH9_AL1_READ_ADDR_OFFSET 0x00000254 +#define DMA_CH9_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH9_AL1_READ_ADDR_RESET "-" +#define DMA_CH9_AL1_READ_ADDR_MSB 31 +#define DMA_CH9_AL1_READ_ADDR_LSB 0 +#define DMA_CH9_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL1_WRITE_ADDR +// Description : Alias for channel 9 WRITE_ADDR register +#define DMA_CH9_AL1_WRITE_ADDR_OFFSET 0x00000258 +#define DMA_CH9_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH9_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH9_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH9_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH9_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 9 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH9_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000025c +#define DMA_CH9_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH9_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH9_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH9_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH9_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL2_CTRL +// Description : Alias for channel 9 CTRL register +#define DMA_CH9_AL2_CTRL_OFFSET 0x00000260 +#define DMA_CH9_AL2_CTRL_BITS 0xffffffff +#define DMA_CH9_AL2_CTRL_RESET "-" +#define DMA_CH9_AL2_CTRL_MSB 31 +#define DMA_CH9_AL2_CTRL_LSB 0 +#define DMA_CH9_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL2_TRANS_COUNT +// Description : Alias for channel 9 TRANS_COUNT register +#define DMA_CH9_AL2_TRANS_COUNT_OFFSET 0x00000264 +#define DMA_CH9_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH9_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH9_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH9_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH9_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL2_READ_ADDR +// Description : Alias for channel 9 READ_ADDR register +#define DMA_CH9_AL2_READ_ADDR_OFFSET 0x00000268 +#define DMA_CH9_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH9_AL2_READ_ADDR_RESET "-" +#define DMA_CH9_AL2_READ_ADDR_MSB 31 +#define DMA_CH9_AL2_READ_ADDR_LSB 0 +#define DMA_CH9_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 9 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH9_AL2_WRITE_ADDR_TRIG_OFFSET 0x0000026c +#define DMA_CH9_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH9_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH9_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH9_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH9_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL3_CTRL +// Description : Alias for channel 9 CTRL register +#define DMA_CH9_AL3_CTRL_OFFSET 0x00000270 +#define DMA_CH9_AL3_CTRL_BITS 0xffffffff +#define DMA_CH9_AL3_CTRL_RESET "-" +#define DMA_CH9_AL3_CTRL_MSB 31 +#define DMA_CH9_AL3_CTRL_LSB 0 +#define DMA_CH9_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL3_WRITE_ADDR +// Description : Alias for channel 9 WRITE_ADDR register +#define DMA_CH9_AL3_WRITE_ADDR_OFFSET 0x00000274 +#define DMA_CH9_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH9_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH9_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH9_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH9_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL3_TRANS_COUNT +// Description : Alias for channel 9 TRANS_COUNT register +#define DMA_CH9_AL3_TRANS_COUNT_OFFSET 0x00000278 +#define DMA_CH9_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH9_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH9_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH9_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH9_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_AL3_READ_ADDR_TRIG +// Description : Alias for channel 9 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH9_AL3_READ_ADDR_TRIG_OFFSET 0x0000027c +#define DMA_CH9_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH9_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH9_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH9_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH9_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_READ_ADDR +// Description : DMA Channel 10 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH10_READ_ADDR_OFFSET 0x00000280 +#define DMA_CH10_READ_ADDR_BITS 0xffffffff +#define DMA_CH10_READ_ADDR_RESET 0x00000000 +#define DMA_CH10_READ_ADDR_MSB 31 +#define DMA_CH10_READ_ADDR_LSB 0 +#define DMA_CH10_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH10_WRITE_ADDR +// Description : DMA Channel 10 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH10_WRITE_ADDR_OFFSET 0x00000284 +#define DMA_CH10_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH10_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH10_WRITE_ADDR_MSB 31 +#define DMA_CH10_WRITE_ADDR_LSB 0 +#define DMA_CH10_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH10_TRANS_COUNT +// Description : DMA Channel 10 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH10_TRANS_COUNT_OFFSET 0x00000288 +#define DMA_CH10_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH10_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH10_TRANS_COUNT_MSB 31 +#define DMA_CH10_TRANS_COUNT_LSB 0 +#define DMA_CH10_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH10_CTRL_TRIG +// Description : DMA Channel 10 Control and Status +#define DMA_CH10_CTRL_TRIG_OFFSET 0x0000028c +#define DMA_CH10_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH10_CTRL_TRIG_RESET 0x00005000 +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH10_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH10_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH10_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH10_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH10_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH10_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH10_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH10_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH10_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH10_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH10_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH10_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH10_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH10_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH10_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH10_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH10_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH10_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH10_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH10_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH10_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH10_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH10_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH10_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH10_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH10_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH10_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH10_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH10_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (10). +#define DMA_CH10_CTRL_TRIG_CHAIN_TO_RESET 0xa +#define DMA_CH10_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH10_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH10_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH10_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH10_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH10_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH10_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH10_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH10_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH10_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH10_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH10_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH10_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH10_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH10_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH10_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH10_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH10_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH10_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH10_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH10_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH10_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH10_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH10_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH10_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH10_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH10_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH10_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH10_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH10_CTRL_TRIG_EN_MSB 0 +#define DMA_CH10_CTRL_TRIG_EN_LSB 0 +#define DMA_CH10_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH10_AL1_CTRL +// Description : Alias for channel 10 CTRL register +#define DMA_CH10_AL1_CTRL_OFFSET 0x00000290 +#define DMA_CH10_AL1_CTRL_BITS 0xffffffff +#define DMA_CH10_AL1_CTRL_RESET "-" +#define DMA_CH10_AL1_CTRL_MSB 31 +#define DMA_CH10_AL1_CTRL_LSB 0 +#define DMA_CH10_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL1_READ_ADDR +// Description : Alias for channel 10 READ_ADDR register +#define DMA_CH10_AL1_READ_ADDR_OFFSET 0x00000294 +#define DMA_CH10_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH10_AL1_READ_ADDR_RESET "-" +#define DMA_CH10_AL1_READ_ADDR_MSB 31 +#define DMA_CH10_AL1_READ_ADDR_LSB 0 +#define DMA_CH10_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL1_WRITE_ADDR +// Description : Alias for channel 10 WRITE_ADDR register +#define DMA_CH10_AL1_WRITE_ADDR_OFFSET 0x00000298 +#define DMA_CH10_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH10_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH10_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH10_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH10_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 10 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH10_AL1_TRANS_COUNT_TRIG_OFFSET 0x0000029c +#define DMA_CH10_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH10_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH10_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH10_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH10_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL2_CTRL +// Description : Alias for channel 10 CTRL register +#define DMA_CH10_AL2_CTRL_OFFSET 0x000002a0 +#define DMA_CH10_AL2_CTRL_BITS 0xffffffff +#define DMA_CH10_AL2_CTRL_RESET "-" +#define DMA_CH10_AL2_CTRL_MSB 31 +#define DMA_CH10_AL2_CTRL_LSB 0 +#define DMA_CH10_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL2_TRANS_COUNT +// Description : Alias for channel 10 TRANS_COUNT register +#define DMA_CH10_AL2_TRANS_COUNT_OFFSET 0x000002a4 +#define DMA_CH10_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH10_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH10_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH10_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH10_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL2_READ_ADDR +// Description : Alias for channel 10 READ_ADDR register +#define DMA_CH10_AL2_READ_ADDR_OFFSET 0x000002a8 +#define DMA_CH10_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH10_AL2_READ_ADDR_RESET "-" +#define DMA_CH10_AL2_READ_ADDR_MSB 31 +#define DMA_CH10_AL2_READ_ADDR_LSB 0 +#define DMA_CH10_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 10 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH10_AL2_WRITE_ADDR_TRIG_OFFSET 0x000002ac +#define DMA_CH10_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH10_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH10_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH10_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH10_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL3_CTRL +// Description : Alias for channel 10 CTRL register +#define DMA_CH10_AL3_CTRL_OFFSET 0x000002b0 +#define DMA_CH10_AL3_CTRL_BITS 0xffffffff +#define DMA_CH10_AL3_CTRL_RESET "-" +#define DMA_CH10_AL3_CTRL_MSB 31 +#define DMA_CH10_AL3_CTRL_LSB 0 +#define DMA_CH10_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL3_WRITE_ADDR +// Description : Alias for channel 10 WRITE_ADDR register +#define DMA_CH10_AL3_WRITE_ADDR_OFFSET 0x000002b4 +#define DMA_CH10_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH10_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH10_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH10_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH10_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL3_TRANS_COUNT +// Description : Alias for channel 10 TRANS_COUNT register +#define DMA_CH10_AL3_TRANS_COUNT_OFFSET 0x000002b8 +#define DMA_CH10_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH10_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH10_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH10_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH10_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_AL3_READ_ADDR_TRIG +// Description : Alias for channel 10 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH10_AL3_READ_ADDR_TRIG_OFFSET 0x000002bc +#define DMA_CH10_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH10_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH10_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH10_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH10_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_READ_ADDR +// Description : DMA Channel 11 Read Address pointer +// This register updates automatically each time a read completes. +// The current value is the next address to be read by this +// channel. +#define DMA_CH11_READ_ADDR_OFFSET 0x000002c0 +#define DMA_CH11_READ_ADDR_BITS 0xffffffff +#define DMA_CH11_READ_ADDR_RESET 0x00000000 +#define DMA_CH11_READ_ADDR_MSB 31 +#define DMA_CH11_READ_ADDR_LSB 0 +#define DMA_CH11_READ_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH11_WRITE_ADDR +// Description : DMA Channel 11 Write Address pointer +// This register updates automatically each time a write +// completes. The current value is the next address to be written +// by this channel. +#define DMA_CH11_WRITE_ADDR_OFFSET 0x000002c4 +#define DMA_CH11_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH11_WRITE_ADDR_RESET 0x00000000 +#define DMA_CH11_WRITE_ADDR_MSB 31 +#define DMA_CH11_WRITE_ADDR_LSB 0 +#define DMA_CH11_WRITE_ADDR_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH11_TRANS_COUNT +// Description : DMA Channel 11 Transfer Count +// Program the number of bus transfers a channel will perform +// before halting. Note that, if transfers are larger than one +// byte in size, this is not equal to the number of bytes +// transferred (see CTRL_DATA_SIZE). +// +// When the channel is active, reading this register shows the +// number of transfers remaining, updating automatically each time +// a write transfer completes. +// +// Writing this register sets the RELOAD value for the transfer +// counter. Each time this channel is triggered, the RELOAD value +// is copied into the live transfer counter. The channel can be +// started multiple times, and will perform the same number of +// transfers each time, as programmed by most recent write. +// +// The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT +// is used as a trigger, the written value is used immediately as +// the length of the new transfer sequence, as well as being +// written to RELOAD. +#define DMA_CH11_TRANS_COUNT_OFFSET 0x000002c8 +#define DMA_CH11_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH11_TRANS_COUNT_RESET 0x00000000 +#define DMA_CH11_TRANS_COUNT_MSB 31 +#define DMA_CH11_TRANS_COUNT_LSB 0 +#define DMA_CH11_TRANS_COUNT_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH11_CTRL_TRIG +// Description : DMA Channel 11 Control and Status +#define DMA_CH11_CTRL_TRIG_OFFSET 0x000002cc +#define DMA_CH11_CTRL_TRIG_BITS 0xe1ffffff +#define DMA_CH11_CTRL_TRIG_RESET 0x00005800 +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_AHB_ERROR +// Description : Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel +// halts when it encounters any bus error, and always raises its +// channel IRQ flag. +#define DMA_CH11_CTRL_TRIG_AHB_ERROR_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_AHB_ERROR_BITS 0x80000000 +#define DMA_CH11_CTRL_TRIG_AHB_ERROR_MSB 31 +#define DMA_CH11_CTRL_TRIG_AHB_ERROR_LSB 31 +#define DMA_CH11_CTRL_TRIG_AHB_ERROR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_READ_ERROR +// Description : If 1, the channel received a read bus error. Write one to +// clear. +// READ_ADDR shows the approximate address where the bus error was +// encountered (will not to be earlier, or more than 3 transfers +// later) +#define DMA_CH11_CTRL_TRIG_READ_ERROR_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_READ_ERROR_BITS 0x40000000 +#define DMA_CH11_CTRL_TRIG_READ_ERROR_MSB 30 +#define DMA_CH11_CTRL_TRIG_READ_ERROR_LSB 30 +#define DMA_CH11_CTRL_TRIG_READ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_WRITE_ERROR +// Description : If 1, the channel received a write bus error. Write one to +// clear. +// WRITE_ADDR shows the approximate address where the bus error +// was encountered (will not to be earlier, or more than 5 +// transfers later) +#define DMA_CH11_CTRL_TRIG_WRITE_ERROR_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_WRITE_ERROR_BITS 0x20000000 +#define DMA_CH11_CTRL_TRIG_WRITE_ERROR_MSB 29 +#define DMA_CH11_CTRL_TRIG_WRITE_ERROR_LSB 29 +#define DMA_CH11_CTRL_TRIG_WRITE_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_BUSY +// Description : This flag goes high when the channel starts a new transfer +// sequence, and low when the last transfer of that sequence +// completes. Clearing EN while BUSY is high pauses the channel, +// and BUSY will stay high while paused. +// +// To terminate a sequence early (and clear the BUSY flag), see +// CHAN_ABORT. +#define DMA_CH11_CTRL_TRIG_BUSY_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_BUSY_BITS 0x01000000 +#define DMA_CH11_CTRL_TRIG_BUSY_MSB 24 +#define DMA_CH11_CTRL_TRIG_BUSY_LSB 24 +#define DMA_CH11_CTRL_TRIG_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_SNIFF_EN +// Description : If 1, this channel's data transfers are visible to the sniff +// hardware, and each transfer will advance the state of the +// checksum. This only applies if the sniff hardware is enabled, +// and has this channel selected. +// +// This allows checksum to be enabled or disabled on a +// per-control- block basis. +#define DMA_CH11_CTRL_TRIG_SNIFF_EN_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_SNIFF_EN_BITS 0x00800000 +#define DMA_CH11_CTRL_TRIG_SNIFF_EN_MSB 23 +#define DMA_CH11_CTRL_TRIG_SNIFF_EN_LSB 23 +#define DMA_CH11_CTRL_TRIG_SNIFF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_BSWAP +// Description : Apply byte-swap transformation to DMA data. +// For byte data, this has no effect. For halfword data, the two +// bytes of each halfword are swapped. For word data, the four +// bytes of each word are swapped to reverse order. +#define DMA_CH11_CTRL_TRIG_BSWAP_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_BSWAP_BITS 0x00400000 +#define DMA_CH11_CTRL_TRIG_BSWAP_MSB 22 +#define DMA_CH11_CTRL_TRIG_BSWAP_LSB 22 +#define DMA_CH11_CTRL_TRIG_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_IRQ_QUIET +// Description : In QUIET mode, the channel does not generate IRQs at the end of +// every transfer block. Instead, an IRQ is raised when NULL is +// written to a trigger register, indicating the end of a control +// block chain. +// +// This reduces the number of interrupts to be serviced by the CPU +// when transferring a DMA chain of many small control blocks. +#define DMA_CH11_CTRL_TRIG_IRQ_QUIET_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_IRQ_QUIET_BITS 0x00200000 +#define DMA_CH11_CTRL_TRIG_IRQ_QUIET_MSB 21 +#define DMA_CH11_CTRL_TRIG_IRQ_QUIET_LSB 21 +#define DMA_CH11_CTRL_TRIG_IRQ_QUIET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_TREQ_SEL +// Description : Select a Transfer Request signal. +// The channel uses the transfer request signal to pace its data +// transfer rate. Sources for TREQ signals are internal (TIMERS) +// or external (DREQ, a Data Request from the system). +// 0x0 to 0x3a -> select DREQ n as TREQ +// 0x3b -> Select Timer 0 as TREQ +// 0x3c -> Select Timer 1 as TREQ +// 0x3d -> Select Timer 2 as TREQ (Optional) +// 0x3e -> Select Timer 3 as TREQ (Optional) +// 0x3f -> Permanent request, for unpaced transfers. +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_RESET 0x00 +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_BITS 0x001f8000 +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_MSB 20 +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_LSB 15 +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_ACCESS "RW" +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_VALUE_TIMER0 0x3b +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_VALUE_TIMER1 0x3c +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_VALUE_TIMER2 0x3d +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_VALUE_TIMER3 0x3e +#define DMA_CH11_CTRL_TRIG_TREQ_SEL_VALUE_PERMANENT 0x3f +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_CHAIN_TO +// Description : When this channel completes, it will trigger the channel +// indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this +// channel)_. +// Reset value is equal to channel number (11). +#define DMA_CH11_CTRL_TRIG_CHAIN_TO_RESET 0xb +#define DMA_CH11_CTRL_TRIG_CHAIN_TO_BITS 0x00007800 +#define DMA_CH11_CTRL_TRIG_CHAIN_TO_MSB 14 +#define DMA_CH11_CTRL_TRIG_CHAIN_TO_LSB 11 +#define DMA_CH11_CTRL_TRIG_CHAIN_TO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_RING_SEL +// Description : Select whether RING_SIZE applies to read or write addresses. +// If 0, read addresses are wrapped on a (1 << RING_SIZE) +// boundary. If 1, write addresses are wrapped. +#define DMA_CH11_CTRL_TRIG_RING_SEL_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_RING_SEL_BITS 0x00000400 +#define DMA_CH11_CTRL_TRIG_RING_SEL_MSB 10 +#define DMA_CH11_CTRL_TRIG_RING_SEL_LSB 10 +#define DMA_CH11_CTRL_TRIG_RING_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_RING_SIZE +// Description : Size of address wrap region. If 0, don't wrap. For values n > +// 0, only the lower n bits of the address will change. This wraps +// the address on a (1 << n) byte boundary, facilitating access to +// naturally-aligned ring buffers. +// +// Ring sizes between 2 and 32768 bytes are possible. This can +// apply to either read or write addresses, based on value of +// RING_SEL. +// 0x0 -> RING_NONE +#define DMA_CH11_CTRL_TRIG_RING_SIZE_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_RING_SIZE_BITS 0x000003c0 +#define DMA_CH11_CTRL_TRIG_RING_SIZE_MSB 9 +#define DMA_CH11_CTRL_TRIG_RING_SIZE_LSB 6 +#define DMA_CH11_CTRL_TRIG_RING_SIZE_ACCESS "RW" +#define DMA_CH11_CTRL_TRIG_RING_SIZE_VALUE_RING_NONE 0x0 +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_INCR_WRITE +// Description : If 1, the write address increments with each transfer. If 0, +// each write is directed to the same, initial address. +// +// Generally this should be disabled for memory-to-peripheral +// transfers. +#define DMA_CH11_CTRL_TRIG_INCR_WRITE_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_INCR_WRITE_BITS 0x00000020 +#define DMA_CH11_CTRL_TRIG_INCR_WRITE_MSB 5 +#define DMA_CH11_CTRL_TRIG_INCR_WRITE_LSB 5 +#define DMA_CH11_CTRL_TRIG_INCR_WRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_INCR_READ +// Description : If 1, the read address increments with each transfer. If 0, +// each read is directed to the same, initial address. +// +// Generally this should be disabled for peripheral-to-memory +// transfers. +#define DMA_CH11_CTRL_TRIG_INCR_READ_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_INCR_READ_BITS 0x00000010 +#define DMA_CH11_CTRL_TRIG_INCR_READ_MSB 4 +#define DMA_CH11_CTRL_TRIG_INCR_READ_LSB 4 +#define DMA_CH11_CTRL_TRIG_INCR_READ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_DATA_SIZE +// Description : Set the size of each bus transfer (byte/halfword/word). +// READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) +// with each transfer. +// 0x0 -> SIZE_BYTE +// 0x1 -> SIZE_HALFWORD +// 0x2 -> SIZE_WORD +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_BITS 0x0000000c +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_MSB 3 +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_LSB 2 +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_ACCESS "RW" +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_BYTE 0x0 +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_HALFWORD 0x1 +#define DMA_CH11_CTRL_TRIG_DATA_SIZE_VALUE_SIZE_WORD 0x2 +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_HIGH_PRIORITY +// Description : HIGH_PRIORITY gives a channel preferential treatment in issue +// scheduling: in each scheduling round, all high priority +// channels are considered first, and then only a single low +// priority channel, before returning to the high priority +// channels. +// +// This only affects the order in which the DMA schedules +// channels. The DMA's bus priority is not changed. If the DMA is +// not saturated then a low priority channel will see no loss of +// throughput. +#define DMA_CH11_CTRL_TRIG_HIGH_PRIORITY_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_HIGH_PRIORITY_BITS 0x00000002 +#define DMA_CH11_CTRL_TRIG_HIGH_PRIORITY_MSB 1 +#define DMA_CH11_CTRL_TRIG_HIGH_PRIORITY_LSB 1 +#define DMA_CH11_CTRL_TRIG_HIGH_PRIORITY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_CH11_CTRL_TRIG_EN +// Description : DMA Channel Enable. +// When 1, the channel will respond to triggering events, which +// will cause it to become BUSY and start transferring data. When +// 0, the channel will ignore triggers, stop issuing transfers, +// and pause the current transfer sequence (i.e. BUSY will remain +// high if already high) +#define DMA_CH11_CTRL_TRIG_EN_RESET 0x0 +#define DMA_CH11_CTRL_TRIG_EN_BITS 0x00000001 +#define DMA_CH11_CTRL_TRIG_EN_MSB 0 +#define DMA_CH11_CTRL_TRIG_EN_LSB 0 +#define DMA_CH11_CTRL_TRIG_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_CH11_AL1_CTRL +// Description : Alias for channel 11 CTRL register +#define DMA_CH11_AL1_CTRL_OFFSET 0x000002d0 +#define DMA_CH11_AL1_CTRL_BITS 0xffffffff +#define DMA_CH11_AL1_CTRL_RESET "-" +#define DMA_CH11_AL1_CTRL_MSB 31 +#define DMA_CH11_AL1_CTRL_LSB 0 +#define DMA_CH11_AL1_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL1_READ_ADDR +// Description : Alias for channel 11 READ_ADDR register +#define DMA_CH11_AL1_READ_ADDR_OFFSET 0x000002d4 +#define DMA_CH11_AL1_READ_ADDR_BITS 0xffffffff +#define DMA_CH11_AL1_READ_ADDR_RESET "-" +#define DMA_CH11_AL1_READ_ADDR_MSB 31 +#define DMA_CH11_AL1_READ_ADDR_LSB 0 +#define DMA_CH11_AL1_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL1_WRITE_ADDR +// Description : Alias for channel 11 WRITE_ADDR register +#define DMA_CH11_AL1_WRITE_ADDR_OFFSET 0x000002d8 +#define DMA_CH11_AL1_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH11_AL1_WRITE_ADDR_RESET "-" +#define DMA_CH11_AL1_WRITE_ADDR_MSB 31 +#define DMA_CH11_AL1_WRITE_ADDR_LSB 0 +#define DMA_CH11_AL1_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL1_TRANS_COUNT_TRIG +// Description : Alias for channel 11 TRANS_COUNT register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH11_AL1_TRANS_COUNT_TRIG_OFFSET 0x000002dc +#define DMA_CH11_AL1_TRANS_COUNT_TRIG_BITS 0xffffffff +#define DMA_CH11_AL1_TRANS_COUNT_TRIG_RESET "-" +#define DMA_CH11_AL1_TRANS_COUNT_TRIG_MSB 31 +#define DMA_CH11_AL1_TRANS_COUNT_TRIG_LSB 0 +#define DMA_CH11_AL1_TRANS_COUNT_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL2_CTRL +// Description : Alias for channel 11 CTRL register +#define DMA_CH11_AL2_CTRL_OFFSET 0x000002e0 +#define DMA_CH11_AL2_CTRL_BITS 0xffffffff +#define DMA_CH11_AL2_CTRL_RESET "-" +#define DMA_CH11_AL2_CTRL_MSB 31 +#define DMA_CH11_AL2_CTRL_LSB 0 +#define DMA_CH11_AL2_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL2_TRANS_COUNT +// Description : Alias for channel 11 TRANS_COUNT register +#define DMA_CH11_AL2_TRANS_COUNT_OFFSET 0x000002e4 +#define DMA_CH11_AL2_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH11_AL2_TRANS_COUNT_RESET "-" +#define DMA_CH11_AL2_TRANS_COUNT_MSB 31 +#define DMA_CH11_AL2_TRANS_COUNT_LSB 0 +#define DMA_CH11_AL2_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL2_READ_ADDR +// Description : Alias for channel 11 READ_ADDR register +#define DMA_CH11_AL2_READ_ADDR_OFFSET 0x000002e8 +#define DMA_CH11_AL2_READ_ADDR_BITS 0xffffffff +#define DMA_CH11_AL2_READ_ADDR_RESET "-" +#define DMA_CH11_AL2_READ_ADDR_MSB 31 +#define DMA_CH11_AL2_READ_ADDR_LSB 0 +#define DMA_CH11_AL2_READ_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL2_WRITE_ADDR_TRIG +// Description : Alias for channel 11 WRITE_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH11_AL2_WRITE_ADDR_TRIG_OFFSET 0x000002ec +#define DMA_CH11_AL2_WRITE_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH11_AL2_WRITE_ADDR_TRIG_RESET "-" +#define DMA_CH11_AL2_WRITE_ADDR_TRIG_MSB 31 +#define DMA_CH11_AL2_WRITE_ADDR_TRIG_LSB 0 +#define DMA_CH11_AL2_WRITE_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL3_CTRL +// Description : Alias for channel 11 CTRL register +#define DMA_CH11_AL3_CTRL_OFFSET 0x000002f0 +#define DMA_CH11_AL3_CTRL_BITS 0xffffffff +#define DMA_CH11_AL3_CTRL_RESET "-" +#define DMA_CH11_AL3_CTRL_MSB 31 +#define DMA_CH11_AL3_CTRL_LSB 0 +#define DMA_CH11_AL3_CTRL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL3_WRITE_ADDR +// Description : Alias for channel 11 WRITE_ADDR register +#define DMA_CH11_AL3_WRITE_ADDR_OFFSET 0x000002f4 +#define DMA_CH11_AL3_WRITE_ADDR_BITS 0xffffffff +#define DMA_CH11_AL3_WRITE_ADDR_RESET "-" +#define DMA_CH11_AL3_WRITE_ADDR_MSB 31 +#define DMA_CH11_AL3_WRITE_ADDR_LSB 0 +#define DMA_CH11_AL3_WRITE_ADDR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL3_TRANS_COUNT +// Description : Alias for channel 11 TRANS_COUNT register +#define DMA_CH11_AL3_TRANS_COUNT_OFFSET 0x000002f8 +#define DMA_CH11_AL3_TRANS_COUNT_BITS 0xffffffff +#define DMA_CH11_AL3_TRANS_COUNT_RESET "-" +#define DMA_CH11_AL3_TRANS_COUNT_MSB 31 +#define DMA_CH11_AL3_TRANS_COUNT_LSB 0 +#define DMA_CH11_AL3_TRANS_COUNT_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_AL3_READ_ADDR_TRIG +// Description : Alias for channel 11 READ_ADDR register +// This is a trigger register (0xc). Writing a nonzero value will +// reload the channel counter and start the channel. +#define DMA_CH11_AL3_READ_ADDR_TRIG_OFFSET 0x000002fc +#define DMA_CH11_AL3_READ_ADDR_TRIG_BITS 0xffffffff +#define DMA_CH11_AL3_READ_ADDR_TRIG_RESET "-" +#define DMA_CH11_AL3_READ_ADDR_TRIG_MSB 31 +#define DMA_CH11_AL3_READ_ADDR_TRIG_LSB 0 +#define DMA_CH11_AL3_READ_ADDR_TRIG_ACCESS "RO" +// ============================================================================= +// Register : DMA_INTR +// Description : Interrupt Status (raw) +// Raw interrupt status for DMA Channels 0..15. Bit n corresponds +// to channel n. Ignores any masking or forcing. Channel +// interrupts can be cleared by writing a bit mask to INTR, INTS0 +// or INTS1. +// +// Channel interrupts can be routed to either of two system-level +// IRQs based on INTE0 and INTE1. +// +// This can be used vector different channel interrupts to +// different ISRs: this might be done to allow NVIC IRQ preemption +// for more time-critical channels, or to spread IRQ load across +// different cores. +// +// It is also valid to ignore this behaviour and just use +// INTE0/INTS0/IRQ 0. +#define DMA_INTR_OFFSET 0x00000400 +#define DMA_INTR_BITS 0x0000ffff +#define DMA_INTR_RESET 0x00000000 +#define DMA_INTR_MSB 15 +#define DMA_INTR_LSB 0 +#define DMA_INTR_ACCESS "RO" +// ============================================================================= +// Register : DMA_INTE0 +// Description : Interrupt Enables for IRQ 0 +// Set bit n to pass interrupts from channel n to DMA IRQ 0. +#define DMA_INTE0_OFFSET 0x00000404 +#define DMA_INTE0_BITS 0x0000ffff +#define DMA_INTE0_RESET 0x00000000 +#define DMA_INTE0_MSB 15 +#define DMA_INTE0_LSB 0 +#define DMA_INTE0_ACCESS "RW" +// ============================================================================= +// Register : DMA_INTF0 +// Description : Force Interrupts +// Write 1s to force the corresponding bits in INTE0. The +// interrupt remains asserted until INTF0 is cleared. +#define DMA_INTF0_OFFSET 0x00000408 +#define DMA_INTF0_BITS 0x0000ffff +#define DMA_INTF0_RESET 0x00000000 +#define DMA_INTF0_MSB 15 +#define DMA_INTF0_LSB 0 +#define DMA_INTF0_ACCESS "RW" +// ============================================================================= +// Register : DMA_INTS0 +// Description : Interrupt Status for IRQ 0 +// Indicates active channel interrupt requests which are currently +// causing IRQ 0 to be asserted. +// Channel interrupts can be cleared by writing a bit mask here. +#define DMA_INTS0_OFFSET 0x0000040c +#define DMA_INTS0_BITS 0x0000ffff +#define DMA_INTS0_RESET 0x00000000 +#define DMA_INTS0_MSB 15 +#define DMA_INTS0_LSB 0 +#define DMA_INTS0_ACCESS "WC" +// ============================================================================= +// Register : DMA_INTE1 +// Description : Interrupt Enables for IRQ 1 +// Set bit n to pass interrupts from channel n to DMA IRQ 1. +#define DMA_INTE1_OFFSET 0x00000414 +#define DMA_INTE1_BITS 0x0000ffff +#define DMA_INTE1_RESET 0x00000000 +#define DMA_INTE1_MSB 15 +#define DMA_INTE1_LSB 0 +#define DMA_INTE1_ACCESS "RW" +// ============================================================================= +// Register : DMA_INTF1 +// Description : Force Interrupts for IRQ 1 +// Write 1s to force the corresponding bits in INTE0. The +// interrupt remains asserted until INTF0 is cleared. +#define DMA_INTF1_OFFSET 0x00000418 +#define DMA_INTF1_BITS 0x0000ffff +#define DMA_INTF1_RESET 0x00000000 +#define DMA_INTF1_MSB 15 +#define DMA_INTF1_LSB 0 +#define DMA_INTF1_ACCESS "RW" +// ============================================================================= +// Register : DMA_INTS1 +// Description : Interrupt Status (masked) for IRQ 1 +// Indicates active channel interrupt requests which are currently +// causing IRQ 1 to be asserted. +// Channel interrupts can be cleared by writing a bit mask here. +#define DMA_INTS1_OFFSET 0x0000041c +#define DMA_INTS1_BITS 0x0000ffff +#define DMA_INTS1_RESET 0x00000000 +#define DMA_INTS1_MSB 15 +#define DMA_INTS1_LSB 0 +#define DMA_INTS1_ACCESS "WC" +// ============================================================================= +// Register : DMA_TIMER0 +// Description : Pacing (X/Y) Fractional Timer +// The pacing timer produces TREQ assertions at a rate set by +// ((X/Y) * sys_clk). This equation is evaluated every sys_clk +// cycles and therefore can only generate TREQs at a rate of 1 per +// sys_clk (i.e. permanent TREQ) or less. +#define DMA_TIMER0_OFFSET 0x00000420 +#define DMA_TIMER0_BITS 0xffffffff +#define DMA_TIMER0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : DMA_TIMER0_X +// Description : Pacing Timer Dividend. Specifies the X value for the (X/Y) +// fractional timer. +#define DMA_TIMER0_X_RESET 0x0000 +#define DMA_TIMER0_X_BITS 0xffff0000 +#define DMA_TIMER0_X_MSB 31 +#define DMA_TIMER0_X_LSB 16 +#define DMA_TIMER0_X_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_TIMER0_Y +// Description : Pacing Timer Divisor. Specifies the Y value for the (X/Y) +// fractional timer. +#define DMA_TIMER0_Y_RESET 0x0000 +#define DMA_TIMER0_Y_BITS 0x0000ffff +#define DMA_TIMER0_Y_MSB 15 +#define DMA_TIMER0_Y_LSB 0 +#define DMA_TIMER0_Y_ACCESS "RW" +// ============================================================================= +// Register : DMA_TIMER1 +// Description : Pacing (X/Y) Fractional Timer +// The pacing timer produces TREQ assertions at a rate set by +// ((X/Y) * sys_clk). This equation is evaluated every sys_clk +// cycles and therefore can only generate TREQs at a rate of 1 per +// sys_clk (i.e. permanent TREQ) or less. +#define DMA_TIMER1_OFFSET 0x00000424 +#define DMA_TIMER1_BITS 0xffffffff +#define DMA_TIMER1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : DMA_TIMER1_X +// Description : Pacing Timer Dividend. Specifies the X value for the (X/Y) +// fractional timer. +#define DMA_TIMER1_X_RESET 0x0000 +#define DMA_TIMER1_X_BITS 0xffff0000 +#define DMA_TIMER1_X_MSB 31 +#define DMA_TIMER1_X_LSB 16 +#define DMA_TIMER1_X_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_TIMER1_Y +// Description : Pacing Timer Divisor. Specifies the Y value for the (X/Y) +// fractional timer. +#define DMA_TIMER1_Y_RESET 0x0000 +#define DMA_TIMER1_Y_BITS 0x0000ffff +#define DMA_TIMER1_Y_MSB 15 +#define DMA_TIMER1_Y_LSB 0 +#define DMA_TIMER1_Y_ACCESS "RW" +// ============================================================================= +// Register : DMA_MULTI_CHAN_TRIGGER +// Description : Trigger one or more channels simultaneously +// Each bit in this register corresponds to a DMA channel. Writing +// a 1 to the relevant bit is the same as writing to that +// channel's trigger register; the channel will start if it is +// currently enabled and not already busy. +#define DMA_MULTI_CHAN_TRIGGER_OFFSET 0x00000430 +#define DMA_MULTI_CHAN_TRIGGER_BITS 0x0000ffff +#define DMA_MULTI_CHAN_TRIGGER_RESET 0x00000000 +#define DMA_MULTI_CHAN_TRIGGER_MSB 15 +#define DMA_MULTI_CHAN_TRIGGER_LSB 0 +#define DMA_MULTI_CHAN_TRIGGER_ACCESS "SC" +// ============================================================================= +// Register : DMA_SNIFF_CTRL +// Description : Sniffer Control +#define DMA_SNIFF_CTRL_OFFSET 0x00000434 +#define DMA_SNIFF_CTRL_BITS 0x00000fff +#define DMA_SNIFF_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : DMA_SNIFF_CTRL_OUT_INV +// Description : If set, the result appears inverted (bitwise complement) when +// read. This does not affect the way the checksum is calculated; +// the result is transformed on-the-fly between the result +// register and the bus. +#define DMA_SNIFF_CTRL_OUT_INV_RESET 0x0 +#define DMA_SNIFF_CTRL_OUT_INV_BITS 0x00000800 +#define DMA_SNIFF_CTRL_OUT_INV_MSB 11 +#define DMA_SNIFF_CTRL_OUT_INV_LSB 11 +#define DMA_SNIFF_CTRL_OUT_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_SNIFF_CTRL_OUT_REV +// Description : If set, the result appears bit-reversed when read. This does +// not affect the way the checksum is calculated; the result is +// transformed on-the-fly between the result register and the bus. +#define DMA_SNIFF_CTRL_OUT_REV_RESET 0x0 +#define DMA_SNIFF_CTRL_OUT_REV_BITS 0x00000400 +#define DMA_SNIFF_CTRL_OUT_REV_MSB 10 +#define DMA_SNIFF_CTRL_OUT_REV_LSB 10 +#define DMA_SNIFF_CTRL_OUT_REV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_SNIFF_CTRL_BSWAP +// Description : Locally perform a byte reverse on the sniffed data, before +// feeding into checksum. +// +// Note that the sniff hardware is downstream of the DMA channel +// byteswap performed in the read master: if channel CTRL_BSWAP +// and SNIFF_CTRL_BSWAP are both enabled, their effects cancel +// from the sniffer's point of view. +#define DMA_SNIFF_CTRL_BSWAP_RESET 0x0 +#define DMA_SNIFF_CTRL_BSWAP_BITS 0x00000200 +#define DMA_SNIFF_CTRL_BSWAP_MSB 9 +#define DMA_SNIFF_CTRL_BSWAP_LSB 9 +#define DMA_SNIFF_CTRL_BSWAP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_SNIFF_CTRL_CALC +// Description : 0x0 -> Calculate a CRC-32 (IEEE802.3 polynomial) +// 0x1 -> Calculate a CRC-32 (IEEE802.3 polynomial) with bit +// reversed data +// 0x2 -> Calculate a CRC-16-CCITT +// 0x3 -> Calculate a CRC-16-CCITT with bit reversed data +// 0xe -> XOR reduction over all data. == 1 if the total 1 +// population count is odd. +// 0xf -> Calculate a simple 32-bit checksum (addition with a 32 +// bit accumulator) +#define DMA_SNIFF_CTRL_CALC_RESET 0x0 +#define DMA_SNIFF_CTRL_CALC_BITS 0x000001e0 +#define DMA_SNIFF_CTRL_CALC_MSB 8 +#define DMA_SNIFF_CTRL_CALC_LSB 5 +#define DMA_SNIFF_CTRL_CALC_ACCESS "RW" +#define DMA_SNIFF_CTRL_CALC_VALUE_CRC32 0x0 +#define DMA_SNIFF_CTRL_CALC_VALUE_CRC32R 0x1 +#define DMA_SNIFF_CTRL_CALC_VALUE_CRC16 0x2 +#define DMA_SNIFF_CTRL_CALC_VALUE_CRC16R 0x3 +#define DMA_SNIFF_CTRL_CALC_VALUE_EVEN 0xe +#define DMA_SNIFF_CTRL_CALC_VALUE_SUM 0xf +// ----------------------------------------------------------------------------- +// Field : DMA_SNIFF_CTRL_DMACH +// Description : DMA channel for Sniffer to observe +#define DMA_SNIFF_CTRL_DMACH_RESET 0x0 +#define DMA_SNIFF_CTRL_DMACH_BITS 0x0000001e +#define DMA_SNIFF_CTRL_DMACH_MSB 4 +#define DMA_SNIFF_CTRL_DMACH_LSB 1 +#define DMA_SNIFF_CTRL_DMACH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : DMA_SNIFF_CTRL_EN +// Description : Enable sniffer +#define DMA_SNIFF_CTRL_EN_RESET 0x0 +#define DMA_SNIFF_CTRL_EN_BITS 0x00000001 +#define DMA_SNIFF_CTRL_EN_MSB 0 +#define DMA_SNIFF_CTRL_EN_LSB 0 +#define DMA_SNIFF_CTRL_EN_ACCESS "RW" +// ============================================================================= +// Register : DMA_SNIFF_DATA +// Description : Data accumulator for sniff hardware +// Write an initial seed value here before starting a DMA transfer +// on the channel indicated by SNIFF_CTRL_DMACH. The hardware will +// update this register each time it observes a read from the +// indicated channel. Once the channel completes, the final result +// can be read from this register. +#define DMA_SNIFF_DATA_OFFSET 0x00000438 +#define DMA_SNIFF_DATA_BITS 0xffffffff +#define DMA_SNIFF_DATA_RESET 0x00000000 +#define DMA_SNIFF_DATA_MSB 31 +#define DMA_SNIFF_DATA_LSB 0 +#define DMA_SNIFF_DATA_ACCESS "RW" +// ============================================================================= +// Register : DMA_FIFO_LEVELS +// Description : Debug RAF, WAF, TDF levels +#define DMA_FIFO_LEVELS_OFFSET 0x00000440 +#define DMA_FIFO_LEVELS_BITS 0x00ffffff +#define DMA_FIFO_LEVELS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : DMA_FIFO_LEVELS_RAF_LVL +// Description : Current Read-Address-FIFO fill level +#define DMA_FIFO_LEVELS_RAF_LVL_RESET 0x00 +#define DMA_FIFO_LEVELS_RAF_LVL_BITS 0x00ff0000 +#define DMA_FIFO_LEVELS_RAF_LVL_MSB 23 +#define DMA_FIFO_LEVELS_RAF_LVL_LSB 16 +#define DMA_FIFO_LEVELS_RAF_LVL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_FIFO_LEVELS_WAF_LVL +// Description : Current Write-Address-FIFO fill level +#define DMA_FIFO_LEVELS_WAF_LVL_RESET 0x00 +#define DMA_FIFO_LEVELS_WAF_LVL_BITS 0x0000ff00 +#define DMA_FIFO_LEVELS_WAF_LVL_MSB 15 +#define DMA_FIFO_LEVELS_WAF_LVL_LSB 8 +#define DMA_FIFO_LEVELS_WAF_LVL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : DMA_FIFO_LEVELS_TDF_LVL +// Description : Current Transfer-Data-FIFO fill level +#define DMA_FIFO_LEVELS_TDF_LVL_RESET 0x00 +#define DMA_FIFO_LEVELS_TDF_LVL_BITS 0x000000ff +#define DMA_FIFO_LEVELS_TDF_LVL_MSB 7 +#define DMA_FIFO_LEVELS_TDF_LVL_LSB 0 +#define DMA_FIFO_LEVELS_TDF_LVL_ACCESS "RO" +// ============================================================================= +// Register : DMA_CHAN_ABORT +// Description : Abort an in-progress transfer sequence on one or more channels +// Each bit corresponds to a channel. Writing a 1 aborts whatever +// transfer sequence is in progress on that channel. The bit will +// remain high until any in-flight transfers have been flushed +// through the address and data FIFOs. +// +// After writing, this register must be polled until it returns +// all-zero. Until this point, it is unsafe to restart the +// channel. +#define DMA_CHAN_ABORT_OFFSET 0x00000444 +#define DMA_CHAN_ABORT_BITS 0x0000ffff +#define DMA_CHAN_ABORT_RESET 0x00000000 +#define DMA_CHAN_ABORT_MSB 15 +#define DMA_CHAN_ABORT_LSB 0 +#define DMA_CHAN_ABORT_ACCESS "SC" +// ============================================================================= +// Register : DMA_N_CHANNELS +// Description : The number of channels this DMA instance is equipped with. This +// DMA supports up to 16 hardware channels, but can be configured +// with as few as one, to minimise silicon area. +#define DMA_N_CHANNELS_OFFSET 0x00000448 +#define DMA_N_CHANNELS_BITS 0x0000001f +#define DMA_N_CHANNELS_RESET "-" +#define DMA_N_CHANNELS_MSB 4 +#define DMA_N_CHANNELS_LSB 0 +#define DMA_N_CHANNELS_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH0_DBG_CTDREQ_OFFSET 0x00000800 +#define DMA_CH0_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH0_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH0_DBG_CTDREQ_MSB 5 +#define DMA_CH0_DBG_CTDREQ_LSB 0 +#define DMA_CH0_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH0_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH0_DBG_TCR_OFFSET 0x00000804 +#define DMA_CH0_DBG_TCR_BITS 0xffffffff +#define DMA_CH0_DBG_TCR_RESET 0x00000000 +#define DMA_CH0_DBG_TCR_MSB 31 +#define DMA_CH0_DBG_TCR_LSB 0 +#define DMA_CH0_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH1_DBG_CTDREQ_OFFSET 0x00000840 +#define DMA_CH1_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH1_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH1_DBG_CTDREQ_MSB 5 +#define DMA_CH1_DBG_CTDREQ_LSB 0 +#define DMA_CH1_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH1_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH1_DBG_TCR_OFFSET 0x00000844 +#define DMA_CH1_DBG_TCR_BITS 0xffffffff +#define DMA_CH1_DBG_TCR_RESET 0x00000000 +#define DMA_CH1_DBG_TCR_MSB 31 +#define DMA_CH1_DBG_TCR_LSB 0 +#define DMA_CH1_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH2_DBG_CTDREQ_OFFSET 0x00000880 +#define DMA_CH2_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH2_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH2_DBG_CTDREQ_MSB 5 +#define DMA_CH2_DBG_CTDREQ_LSB 0 +#define DMA_CH2_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH2_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH2_DBG_TCR_OFFSET 0x00000884 +#define DMA_CH2_DBG_TCR_BITS 0xffffffff +#define DMA_CH2_DBG_TCR_RESET 0x00000000 +#define DMA_CH2_DBG_TCR_MSB 31 +#define DMA_CH2_DBG_TCR_LSB 0 +#define DMA_CH2_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH3_DBG_CTDREQ_OFFSET 0x000008c0 +#define DMA_CH3_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH3_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH3_DBG_CTDREQ_MSB 5 +#define DMA_CH3_DBG_CTDREQ_LSB 0 +#define DMA_CH3_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH3_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH3_DBG_TCR_OFFSET 0x000008c4 +#define DMA_CH3_DBG_TCR_BITS 0xffffffff +#define DMA_CH3_DBG_TCR_RESET 0x00000000 +#define DMA_CH3_DBG_TCR_MSB 31 +#define DMA_CH3_DBG_TCR_LSB 0 +#define DMA_CH3_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH4_DBG_CTDREQ_OFFSET 0x00000900 +#define DMA_CH4_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH4_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH4_DBG_CTDREQ_MSB 5 +#define DMA_CH4_DBG_CTDREQ_LSB 0 +#define DMA_CH4_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH4_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH4_DBG_TCR_OFFSET 0x00000904 +#define DMA_CH4_DBG_TCR_BITS 0xffffffff +#define DMA_CH4_DBG_TCR_RESET 0x00000000 +#define DMA_CH4_DBG_TCR_MSB 31 +#define DMA_CH4_DBG_TCR_LSB 0 +#define DMA_CH4_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH5_DBG_CTDREQ_OFFSET 0x00000940 +#define DMA_CH5_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH5_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH5_DBG_CTDREQ_MSB 5 +#define DMA_CH5_DBG_CTDREQ_LSB 0 +#define DMA_CH5_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH5_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH5_DBG_TCR_OFFSET 0x00000944 +#define DMA_CH5_DBG_TCR_BITS 0xffffffff +#define DMA_CH5_DBG_TCR_RESET 0x00000000 +#define DMA_CH5_DBG_TCR_MSB 31 +#define DMA_CH5_DBG_TCR_LSB 0 +#define DMA_CH5_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH6_DBG_CTDREQ_OFFSET 0x00000980 +#define DMA_CH6_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH6_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH6_DBG_CTDREQ_MSB 5 +#define DMA_CH6_DBG_CTDREQ_LSB 0 +#define DMA_CH6_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH6_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH6_DBG_TCR_OFFSET 0x00000984 +#define DMA_CH6_DBG_TCR_BITS 0xffffffff +#define DMA_CH6_DBG_TCR_RESET 0x00000000 +#define DMA_CH6_DBG_TCR_MSB 31 +#define DMA_CH6_DBG_TCR_LSB 0 +#define DMA_CH6_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH7_DBG_CTDREQ_OFFSET 0x000009c0 +#define DMA_CH7_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH7_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH7_DBG_CTDREQ_MSB 5 +#define DMA_CH7_DBG_CTDREQ_LSB 0 +#define DMA_CH7_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH7_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH7_DBG_TCR_OFFSET 0x000009c4 +#define DMA_CH7_DBG_TCR_BITS 0xffffffff +#define DMA_CH7_DBG_TCR_RESET 0x00000000 +#define DMA_CH7_DBG_TCR_MSB 31 +#define DMA_CH7_DBG_TCR_LSB 0 +#define DMA_CH7_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH8_DBG_CTDREQ_OFFSET 0x00000a00 +#define DMA_CH8_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH8_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH8_DBG_CTDREQ_MSB 5 +#define DMA_CH8_DBG_CTDREQ_LSB 0 +#define DMA_CH8_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH8_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH8_DBG_TCR_OFFSET 0x00000a04 +#define DMA_CH8_DBG_TCR_BITS 0xffffffff +#define DMA_CH8_DBG_TCR_RESET 0x00000000 +#define DMA_CH8_DBG_TCR_MSB 31 +#define DMA_CH8_DBG_TCR_LSB 0 +#define DMA_CH8_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH9_DBG_CTDREQ_OFFSET 0x00000a40 +#define DMA_CH9_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH9_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH9_DBG_CTDREQ_MSB 5 +#define DMA_CH9_DBG_CTDREQ_LSB 0 +#define DMA_CH9_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH9_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH9_DBG_TCR_OFFSET 0x00000a44 +#define DMA_CH9_DBG_TCR_BITS 0xffffffff +#define DMA_CH9_DBG_TCR_RESET 0x00000000 +#define DMA_CH9_DBG_TCR_MSB 31 +#define DMA_CH9_DBG_TCR_LSB 0 +#define DMA_CH9_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH10_DBG_CTDREQ_OFFSET 0x00000a80 +#define DMA_CH10_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH10_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH10_DBG_CTDREQ_MSB 5 +#define DMA_CH10_DBG_CTDREQ_LSB 0 +#define DMA_CH10_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH10_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH10_DBG_TCR_OFFSET 0x00000a84 +#define DMA_CH10_DBG_TCR_BITS 0xffffffff +#define DMA_CH10_DBG_TCR_RESET 0x00000000 +#define DMA_CH10_DBG_TCR_MSB 31 +#define DMA_CH10_DBG_TCR_LSB 0 +#define DMA_CH10_DBG_TCR_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_DBG_CTDREQ +// Description : Read: get channel DREQ counter (i.e. how many accesses the DMA +// expects it can perform on the peripheral without +// overflow/underflow. Write any value: clears the counter, and +// cause channel to re-initiate DREQ handshake. +#define DMA_CH11_DBG_CTDREQ_OFFSET 0x00000ac0 +#define DMA_CH11_DBG_CTDREQ_BITS 0x0000003f +#define DMA_CH11_DBG_CTDREQ_RESET 0x00000000 +#define DMA_CH11_DBG_CTDREQ_MSB 5 +#define DMA_CH11_DBG_CTDREQ_LSB 0 +#define DMA_CH11_DBG_CTDREQ_ACCESS "RO" +// ============================================================================= +// Register : DMA_CH11_DBG_TCR +// Description : Read to get channel TRANS_COUNT reload value, i.e. the length +// of the next transfer +#define DMA_CH11_DBG_TCR_OFFSET 0x00000ac4 +#define DMA_CH11_DBG_TCR_BITS 0xffffffff +#define DMA_CH11_DBG_TCR_RESET 0x00000000 +#define DMA_CH11_DBG_TCR_MSB 31 +#define DMA_CH11_DBG_TCR_LSB 0 +#define DMA_CH11_DBG_TCR_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_DMA_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dreq.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dreq.h new file mode 100644 index 0000000000..9de9dd5fde --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/dreq.h @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _DREQ_H_ +#define _DREQ_H_ + +#define DREQ_PIO0_TX0 0x0 +#define DREQ_PIO0_TX1 0x1 +#define DREQ_PIO0_TX2 0x2 +#define DREQ_PIO0_TX3 0x3 +#define DREQ_PIO0_RX0 0x4 +#define DREQ_PIO0_RX1 0x5 +#define DREQ_PIO0_RX2 0x6 +#define DREQ_PIO0_RX3 0x7 +#define DREQ_PIO1_TX0 0x8 +#define DREQ_PIO1_TX1 0x9 +#define DREQ_PIO1_TX2 0xa +#define DREQ_PIO1_TX3 0xb +#define DREQ_PIO1_RX0 0xc +#define DREQ_PIO1_RX1 0xd +#define DREQ_PIO1_RX2 0xe +#define DREQ_PIO1_RX3 0xf +#define DREQ_SPI0_TX 0x10 +#define DREQ_SPI0_RX 0x11 +#define DREQ_SPI1_TX 0x12 +#define DREQ_SPI1_RX 0x13 +#define DREQ_UART0_TX 0x14 +#define DREQ_UART0_RX 0x15 +#define DREQ_UART1_TX 0x16 +#define DREQ_UART1_RX 0x17 +#define DREQ_PWM_WRAP0 0x18 +#define DREQ_PWM_WRAP1 0x19 +#define DREQ_PWM_WRAP2 0x1a +#define DREQ_PWM_WRAP3 0x1b +#define DREQ_PWM_WRAP4 0x1c +#define DREQ_PWM_WRAP5 0x1d +#define DREQ_PWM_WRAP6 0x1e +#define DREQ_PWM_WRAP7 0x1f +#define DREQ_I2C0_TX 0x20 +#define DREQ_I2C0_RX 0x21 +#define DREQ_I2C1_TX 0x22 +#define DREQ_I2C1_RX 0x23 +#define DREQ_ADC 0x24 +#define DREQ_XIP_STREAM 0x25 +#define DREQ_XIP_SSITX 0x26 +#define DREQ_XIP_SSIRX 0x27 + +#endif // _DREQ_H_ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/i2c.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/i2c.h new file mode 100644 index 0000000000..c027119a8e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/i2c.h @@ -0,0 +1,2685 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : I2C +// Version : 1 +// Bus type : apb +// Description : DW_apb_i2c address block +// ============================================================================= +#ifndef HARDWARE_REGS_I2C_DEFINED +#define HARDWARE_REGS_I2C_DEFINED +// ============================================================================= +// Register : I2C_IC_CON +// Description : I2C Control Register. This register can be written only when +// the DW_apb_i2c is disabled, which corresponds to the +// IC_ENABLE[0] register being set to 0. Writes at other times +// have no effect. +// +// Read/Write Access: - bit 10 is read only. - bit 11 is read only +// - bit 16 is read only - bit 17 is read only - bits 18 and 19 +// are read only. +#define I2C_IC_CON_OFFSET 0x00000000 +#define I2C_IC_CON_BITS 0x000007ff +#define I2C_IC_CON_RESET 0x00000065 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE +// Description : Master issues the STOP_DET interrupt irrespective of whether +// master is active or not +#define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_RESET 0x0 +#define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_BITS 0x00000400 +#define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_MSB 10 +#define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_LSB 10 +#define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL +// Description : This bit controls whether DW_apb_i2c should hold the bus when +// the Rx FIFO is physically full to its RX_BUFFER_DEPTH, as +// described in the IC_RX_FULL_HLD_BUS_EN parameter. +// +// Reset value: 0x0. +// 0x0 -> Overflow when RX_FIFO is full +// 0x1 -> Hold bus when RX_FIFO is full +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_RESET 0x0 +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_BITS 0x00000200 +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_MSB 9 +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_LSB 9 +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_ACCESS "RW" +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_VALUE_DISABLED 0x0 +#define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_TX_EMPTY_CTRL +// Description : This bit controls the generation of the TX_EMPTY interrupt, as +// described in the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0. +// 0x0 -> Default behaviour of TX_EMPTY interrupt +// 0x1 -> Controlled generation of TX_EMPTY interrupt +#define I2C_IC_CON_TX_EMPTY_CTRL_RESET 0x0 +#define I2C_IC_CON_TX_EMPTY_CTRL_BITS 0x00000100 +#define I2C_IC_CON_TX_EMPTY_CTRL_MSB 8 +#define I2C_IC_CON_TX_EMPTY_CTRL_LSB 8 +#define I2C_IC_CON_TX_EMPTY_CTRL_ACCESS "RW" +#define I2C_IC_CON_TX_EMPTY_CTRL_VALUE_DISABLED 0x0 +#define I2C_IC_CON_TX_EMPTY_CTRL_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_STOP_DET_IFADDRESSED +// Description : In slave mode: - 1'b1: issues the STOP_DET interrupt only when +// it is addressed. - 1'b0: issues the STOP_DET irrespective of +// whether it's addressed or not. Reset value: 0x0 +// +// NOTE: During a general call address, this slave does not issue +// the STOP_DET interrupt if STOP_DET_IF_ADDRESSED = 1'b1, even if +// the slave responds to the general call address by generating +// ACK. The STOP_DET interrupt is generated only when the +// transmitted address matches the slave address (SAR). +// 0x0 -> slave issues STOP_DET intr always +// 0x1 -> slave issues STOP_DET intr only if addressed +#define I2C_IC_CON_STOP_DET_IFADDRESSED_RESET 0x0 +#define I2C_IC_CON_STOP_DET_IFADDRESSED_BITS 0x00000080 +#define I2C_IC_CON_STOP_DET_IFADDRESSED_MSB 7 +#define I2C_IC_CON_STOP_DET_IFADDRESSED_LSB 7 +#define I2C_IC_CON_STOP_DET_IFADDRESSED_ACCESS "RW" +#define I2C_IC_CON_STOP_DET_IFADDRESSED_VALUE_DISABLED 0x0 +#define I2C_IC_CON_STOP_DET_IFADDRESSED_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_IC_SLAVE_DISABLE +// Description : This bit controls whether I2C has its slave disabled, which +// means once the presetn signal is applied, then this bit is set +// and the slave is disabled. +// +// If this bit is set (slave is disabled), DW_apb_i2c functions +// only as a master and does not perform any action that requires +// a slave. +// +// NOTE: Software should ensure that if this bit is written with +// 0, then bit 0 should also be written with a 0. +// 0x0 -> Slave mode is enabled +// 0x1 -> Slave mode is disabled +#define I2C_IC_CON_IC_SLAVE_DISABLE_RESET 0x1 +#define I2C_IC_CON_IC_SLAVE_DISABLE_BITS 0x00000040 +#define I2C_IC_CON_IC_SLAVE_DISABLE_MSB 6 +#define I2C_IC_CON_IC_SLAVE_DISABLE_LSB 6 +#define I2C_IC_CON_IC_SLAVE_DISABLE_ACCESS "RW" +#define I2C_IC_CON_IC_SLAVE_DISABLE_VALUE_SLAVE_ENABLED 0x0 +#define I2C_IC_CON_IC_SLAVE_DISABLE_VALUE_SLAVE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_IC_RESTART_EN +// Description : Determines whether RESTART conditions may be sent when acting +// as a master. Some older slaves do not support handling RESTART +// conditions; however, RESTART conditions are used in several +// DW_apb_i2c operations. When RESTART is disabled, the master is +// prohibited from performing the following functions: - Sending a +// START BYTE - Performing any high-speed mode operation - +// High-speed mode operation - Performing direction changes in +// combined format mode - Performing a read operation with a +// 10-bit address By replacing RESTART condition followed by a +// STOP and a subsequent START condition, split operations are +// broken down into multiple DW_apb_i2c transfers. If the above +// operations are performed, it will result in setting bit 6 +// (TX_ABRT) of the IC_RAW_INTR_STAT register. +// +// Reset value: ENABLED +// 0x0 -> Master restart disabled +// 0x1 -> Master restart enabled +#define I2C_IC_CON_IC_RESTART_EN_RESET 0x1 +#define I2C_IC_CON_IC_RESTART_EN_BITS 0x00000020 +#define I2C_IC_CON_IC_RESTART_EN_MSB 5 +#define I2C_IC_CON_IC_RESTART_EN_LSB 5 +#define I2C_IC_CON_IC_RESTART_EN_ACCESS "RW" +#define I2C_IC_CON_IC_RESTART_EN_VALUE_DISABLED 0x0 +#define I2C_IC_CON_IC_RESTART_EN_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_IC_10BITADDR_MASTER +// Description : Controls whether the DW_apb_i2c starts its transfers in 7- or +// 10-bit addressing mode when acting as a master. - 0: 7-bit +// addressing - 1: 10-bit addressing +// 0x0 -> Master 7Bit addressing mode +// 0x1 -> Master 10Bit addressing mode +#define I2C_IC_CON_IC_10BITADDR_MASTER_RESET 0x0 +#define I2C_IC_CON_IC_10BITADDR_MASTER_BITS 0x00000010 +#define I2C_IC_CON_IC_10BITADDR_MASTER_MSB 4 +#define I2C_IC_CON_IC_10BITADDR_MASTER_LSB 4 +#define I2C_IC_CON_IC_10BITADDR_MASTER_ACCESS "RW" +#define I2C_IC_CON_IC_10BITADDR_MASTER_VALUE_ADDR_7BITS 0x0 +#define I2C_IC_CON_IC_10BITADDR_MASTER_VALUE_ADDR_10BITS 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_IC_10BITADDR_SLAVE +// Description : When acting as a slave, this bit controls whether the +// DW_apb_i2c responds to 7- or 10-bit addresses. - 0: 7-bit +// addressing. The DW_apb_i2c ignores transactions that involve +// 10-bit addressing; for 7-bit addressing, only the lower 7 bits +// of the IC_SAR register are compared. - 1: 10-bit addressing. +// The DW_apb_i2c responds to only 10-bit addressing transfers +// that match the full 10 bits of the IC_SAR register. +// 0x0 -> Slave 7Bit addressing +// 0x1 -> Slave 10Bit addressing +#define I2C_IC_CON_IC_10BITADDR_SLAVE_RESET 0x0 +#define I2C_IC_CON_IC_10BITADDR_SLAVE_BITS 0x00000008 +#define I2C_IC_CON_IC_10BITADDR_SLAVE_MSB 3 +#define I2C_IC_CON_IC_10BITADDR_SLAVE_LSB 3 +#define I2C_IC_CON_IC_10BITADDR_SLAVE_ACCESS "RW" +#define I2C_IC_CON_IC_10BITADDR_SLAVE_VALUE_ADDR_7BITS 0x0 +#define I2C_IC_CON_IC_10BITADDR_SLAVE_VALUE_ADDR_10BITS 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_SPEED +// Description : These bits control at which speed the DW_apb_i2c operates; its +// setting is relevant only if one is operating the DW_apb_i2c in +// master mode. Hardware protects against illegal values being +// programmed by software. These bits must be programmed +// appropriately for slave mode also, as it is used to capture +// correct value of spike filter as per the speed mode. +// +// This register should be programmed only with a value in the +// range of 1 to IC_MAX_SPEED_MODE; otherwise, hardware updates +// this register with the value of IC_MAX_SPEED_MODE. +// +// 1: standard mode (100 kbit/s) +// +// 2: fast mode (<=400 kbit/s) or fast mode plus (<=1000Kbit/s) +// +// 3: high speed mode (3.4 Mbit/s) +// +// Note: This field is not applicable when IC_ULTRA_FAST_MODE=1 +// 0x1 -> Standard Speed mode of operation +// 0x2 -> Fast or Fast Plus mode of operation +// 0x3 -> High Speed mode of operation +#define I2C_IC_CON_SPEED_RESET 0x2 +#define I2C_IC_CON_SPEED_BITS 0x00000006 +#define I2C_IC_CON_SPEED_MSB 2 +#define I2C_IC_CON_SPEED_LSB 1 +#define I2C_IC_CON_SPEED_ACCESS "RW" +#define I2C_IC_CON_SPEED_VALUE_STANDARD 0x1 +#define I2C_IC_CON_SPEED_VALUE_FAST 0x2 +#define I2C_IC_CON_SPEED_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CON_MASTER_MODE +// Description : This bit controls whether the DW_apb_i2c master is enabled. +// +// NOTE: Software should ensure that if this bit is written with +// '1' then bit 6 should also be written with a '1'. +// 0x0 -> Master mode is disabled +// 0x1 -> Master mode is enabled +#define I2C_IC_CON_MASTER_MODE_RESET 0x1 +#define I2C_IC_CON_MASTER_MODE_BITS 0x00000001 +#define I2C_IC_CON_MASTER_MODE_MSB 0 +#define I2C_IC_CON_MASTER_MODE_LSB 0 +#define I2C_IC_CON_MASTER_MODE_ACCESS "RW" +#define I2C_IC_CON_MASTER_MODE_VALUE_DISABLED 0x0 +#define I2C_IC_CON_MASTER_MODE_VALUE_ENABLED 0x1 +// ============================================================================= +// Register : I2C_IC_TAR +// Description : I2C Target Address Register +// +// This register is 12 bits wide, and bits 31:12 are reserved. +// This register can be written to only when IC_ENABLE[0] is set +// to 0. +// +// Note: If the software or application is aware that the +// DW_apb_i2c is not using the TAR address for the pending +// commands in the Tx FIFO, then it is possible to update the TAR +// address even while the Tx FIFO has entries (IC_STATUS[2]= 0). - +// It is not necessary to perform any write to this register if +// DW_apb_i2c is enabled as an I2C slave only. +#define I2C_IC_TAR_OFFSET 0x00000004 +#define I2C_IC_TAR_BITS 0x00000fff +#define I2C_IC_TAR_RESET 0x00000055 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TAR_SPECIAL +// Description : This bit indicates whether software performs a Device-ID or +// General Call or START BYTE command. - 0: ignore bit 10 +// GC_OR_START and use IC_TAR normally - 1: perform special I2C +// command as specified in Device_ID or GC_OR_START bit Reset +// value: 0x0 +// 0x0 -> Disables programming of GENERAL_CALL or START_BYTE +// transmission +// 0x1 -> Enables programming of GENERAL_CALL or START_BYTE +// transmission +#define I2C_IC_TAR_SPECIAL_RESET 0x0 +#define I2C_IC_TAR_SPECIAL_BITS 0x00000800 +#define I2C_IC_TAR_SPECIAL_MSB 11 +#define I2C_IC_TAR_SPECIAL_LSB 11 +#define I2C_IC_TAR_SPECIAL_ACCESS "RW" +#define I2C_IC_TAR_SPECIAL_VALUE_DISABLED 0x0 +#define I2C_IC_TAR_SPECIAL_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TAR_GC_OR_START +// Description : If bit 11 (SPECIAL) is set to 1 and bit 13(Device-ID) is set to +// 0, then this bit indicates whether a General Call or START byte +// command is to be performed by the DW_apb_i2c. - 0: General Call +// Address - after issuing a General Call, only writes may be +// performed. Attempting to issue a read command results in +// setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. The +// DW_apb_i2c remains in General Call mode until the SPECIAL bit +// value (bit 11) is cleared. - 1: START BYTE Reset value: 0x0 +// 0x0 -> GENERAL_CALL byte transmission +// 0x1 -> START byte transmission +#define I2C_IC_TAR_GC_OR_START_RESET 0x0 +#define I2C_IC_TAR_GC_OR_START_BITS 0x00000400 +#define I2C_IC_TAR_GC_OR_START_MSB 10 +#define I2C_IC_TAR_GC_OR_START_LSB 10 +#define I2C_IC_TAR_GC_OR_START_ACCESS "RW" +#define I2C_IC_TAR_GC_OR_START_VALUE_GENERAL_CALL 0x0 +#define I2C_IC_TAR_GC_OR_START_VALUE_START_BYTE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TAR_IC_TAR +// Description : This is the target address for any master transaction. When +// transmitting a General Call, these bits are ignored. To +// generate a START BYTE, the CPU needs to write only once into +// these bits. +// +// If the IC_TAR and IC_SAR are the same, loopback exists but the +// FIFOs are shared between master and slave, so full loopback is +// not feasible. Only one direction loopback mode is supported +// (simplex), not duplex. A master cannot transmit to itself; it +// can transmit to only a slave. +#define I2C_IC_TAR_IC_TAR_RESET 0x055 +#define I2C_IC_TAR_IC_TAR_BITS 0x000003ff +#define I2C_IC_TAR_IC_TAR_MSB 9 +#define I2C_IC_TAR_IC_TAR_LSB 0 +#define I2C_IC_TAR_IC_TAR_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_SAR +// Description : I2C Slave Address Register +#define I2C_IC_SAR_OFFSET 0x00000008 +#define I2C_IC_SAR_BITS 0x000003ff +#define I2C_IC_SAR_RESET 0x00000055 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SAR_IC_SAR +// Description : The IC_SAR holds the slave address when the I2C is operating as +// a slave. For 7-bit addressing, only IC_SAR[6:0] is used. +// +// This register can be written only when the I2C interface is +// disabled, which corresponds to the IC_ENABLE[0] register being +// set to 0. Writes at other times have no effect. +// +// Note: The default values cannot be any of the reserved address +// locations: that is, 0x00 to 0x07, or 0x78 to 0x7f. The correct +// operation of the device is not guaranteed if you program the +// IC_SAR or IC_TAR to a reserved value. Refer to +// <> for a complete list of these +// reserved values. +#define I2C_IC_SAR_IC_SAR_RESET 0x055 +#define I2C_IC_SAR_IC_SAR_BITS 0x000003ff +#define I2C_IC_SAR_IC_SAR_MSB 9 +#define I2C_IC_SAR_IC_SAR_LSB 0 +#define I2C_IC_SAR_IC_SAR_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_DATA_CMD +// Description : I2C Rx/Tx Data Buffer and Command Register; this is the +// register the CPU writes to when filling the TX FIFO and the CPU +// reads from when retrieving bytes from RX FIFO. +// +// The size of the register changes as follows: +// +// Write: - 11 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=1 - 9 bits +// when IC_EMPTYFIFO_HOLD_MASTER_EN=0 Read: - 12 bits when +// IC_FIRST_DATA_BYTE_STATUS = 1 - 8 bits when +// IC_FIRST_DATA_BYTE_STATUS = 0 Note: In order for the DW_apb_i2c +// to continue acknowledging reads, a read command should be +// written for every byte that is to be received; otherwise the +// DW_apb_i2c will stop acknowledging. +#define I2C_IC_DATA_CMD_OFFSET 0x00000010 +#define I2C_IC_DATA_CMD_BITS 0x00000fff +#define I2C_IC_DATA_CMD_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DATA_CMD_FIRST_DATA_BYTE +// Description : Indicates the first data byte received after the address phase +// for receive transfer in Master receiver or Slave receiver mode. +// +// Reset value : 0x0 +// +// NOTE: In case of APB_DATA_WIDTH=8, +// +// 1. The user has to perform two APB Reads to IC_DATA_CMD in +// order to get status on 11 bit. +// +// 2. In order to read the 11 bit, the user has to perform the +// first data byte read [7:0] (offset 0x10) and then perform the +// second read [15:8] (offset 0x11) in order to know the status of +// 11 bit (whether the data received in previous read is a first +// data byte or not). +// +// 3. The 11th bit is an optional read field, user can ignore 2nd +// byte read [15:8] (offset 0x11) if not interested in +// FIRST_DATA_BYTE status. +// 0x0 -> Sequential data byte received +// 0x1 -> Non sequential data byte received +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_RESET 0x0 +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_BITS 0x00000800 +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_MSB 11 +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_LSB 11 +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_ACCESS "RO" +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_VALUE_INACTIVE 0x0 +#define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DATA_CMD_RESTART +// Description : This bit controls whether a RESTART is issued before the byte +// is sent or received. +// +// 1 - If IC_RESTART_EN is 1, a RESTART is issued before the data +// is sent/received (according to the value of CMD), regardless of +// whether or not the transfer direction is changing from the +// previous command; if IC_RESTART_EN is 0, a STOP followed by a +// START is issued instead. +// +// 0 - If IC_RESTART_EN is 1, a RESTART is issued only if the +// transfer direction is changing from the previous command; if +// IC_RESTART_EN is 0, a STOP followed by a START is issued +// instead. +// +// Reset value: 0x0 +// 0x0 -> Don't Issue RESTART before this command +// 0x1 -> Issue RESTART before this command +#define I2C_IC_DATA_CMD_RESTART_RESET 0x0 +#define I2C_IC_DATA_CMD_RESTART_BITS 0x00000400 +#define I2C_IC_DATA_CMD_RESTART_MSB 10 +#define I2C_IC_DATA_CMD_RESTART_LSB 10 +#define I2C_IC_DATA_CMD_RESTART_ACCESS "SC" +#define I2C_IC_DATA_CMD_RESTART_VALUE_DISABLE 0x0 +#define I2C_IC_DATA_CMD_RESTART_VALUE_ENABLE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DATA_CMD_STOP +// Description : This bit controls whether a STOP is issued after the byte is +// sent or received. +// +// - 1 - STOP is issued after this byte, regardless of whether or +// not the Tx FIFO is empty. If the Tx FIFO is not empty, the +// master immediately tries to start a new transfer by issuing a +// START and arbitrating for the bus. - 0 - STOP is not issued +// after this byte, regardless of whether or not the Tx FIFO is +// empty. If the Tx FIFO is not empty, the master continues the +// current transfer by sending/receiving data bytes according to +// the value of the CMD bit. If the Tx FIFO is empty, the master +// holds the SCL line low and stalls the bus until a new command +// is available in the Tx FIFO. Reset value: 0x0 +// 0x0 -> Don't Issue STOP after this command +// 0x1 -> Issue STOP after this command +#define I2C_IC_DATA_CMD_STOP_RESET 0x0 +#define I2C_IC_DATA_CMD_STOP_BITS 0x00000200 +#define I2C_IC_DATA_CMD_STOP_MSB 9 +#define I2C_IC_DATA_CMD_STOP_LSB 9 +#define I2C_IC_DATA_CMD_STOP_ACCESS "SC" +#define I2C_IC_DATA_CMD_STOP_VALUE_DISABLE 0x0 +#define I2C_IC_DATA_CMD_STOP_VALUE_ENABLE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DATA_CMD_CMD +// Description : This bit controls whether a read or a write is performed. This +// bit does not control the direction when the DW_apb_i2con acts +// as a slave. It controls only the direction when it acts as a +// master. +// +// When a command is entered in the TX FIFO, this bit +// distinguishes the write and read commands. In slave-receiver +// mode, this bit is a 'don't care' because writes to this +// register are not required. In slave-transmitter mode, a '0' +// indicates that the data in IC_DATA_CMD is to be transmitted. +// +// When programming this bit, you should remember the following: +// attempting to perform a read operation after a General Call +// command has been sent results in a TX_ABRT interrupt (bit 6 of +// the IC_RAW_INTR_STAT register), unless bit 11 (SPECIAL) in the +// IC_TAR register has been cleared. If a '1' is written to this +// bit after receiving a RD_REQ interrupt, then a TX_ABRT +// interrupt occurs. +// +// Reset value: 0x0 +// 0x0 -> Master Write Command +// 0x1 -> Master Read Command +#define I2C_IC_DATA_CMD_CMD_RESET 0x0 +#define I2C_IC_DATA_CMD_CMD_BITS 0x00000100 +#define I2C_IC_DATA_CMD_CMD_MSB 8 +#define I2C_IC_DATA_CMD_CMD_LSB 8 +#define I2C_IC_DATA_CMD_CMD_ACCESS "SC" +#define I2C_IC_DATA_CMD_CMD_VALUE_WRITE 0x0 +#define I2C_IC_DATA_CMD_CMD_VALUE_READ 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DATA_CMD_DAT +// Description : This register contains the data to be transmitted or received +// on the I2C bus. If you are writing to this register and want to +// perform a read, bits 7:0 (DAT) are ignored by the DW_apb_i2c. +// However, when you read this register, these bits return the +// value of data received on the DW_apb_i2c interface. +// +// Reset value: 0x0 +#define I2C_IC_DATA_CMD_DAT_RESET 0x00 +#define I2C_IC_DATA_CMD_DAT_BITS 0x000000ff +#define I2C_IC_DATA_CMD_DAT_MSB 7 +#define I2C_IC_DATA_CMD_DAT_LSB 0 +#define I2C_IC_DATA_CMD_DAT_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_SS_SCL_HCNT +// Description : Standard Speed I2C Clock SCL High Count Register +#define I2C_IC_SS_SCL_HCNT_OFFSET 0x00000014 +#define I2C_IC_SS_SCL_HCNT_BITS 0x0000ffff +#define I2C_IC_SS_SCL_HCNT_RESET 0x00000028 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT +// Description : This register must be set before any I2C bus transaction can +// take place to ensure proper I/O timing. This register sets the +// SCL clock high-period count for standard speed. For more +// information, refer to 'IC_CLK Frequency Configuration'. +// +// This register can be written only when the I2C interface is +// disabled which corresponds to the IC_ENABLE[0] register being +// set to 0. Writes at other times have no effect. +// +// The minimum valid value is 6; hardware prevents values less +// than this being written, and if attempted results in 6 being +// set. For designs with APB_DATA_WIDTH = 8, the order of +// programming is important to ensure the correct operation of the +// DW_apb_i2c. The lower byte must be programmed first. Then the +// upper byte is programmed. +// +// NOTE: This register must not be programmed to a value higher +// than 65525, because DW_apb_i2c uses a 16-bit counter to flag an +// I2C bus idle condition when this counter reaches a value of +// IC_SS_SCL_HCNT + 10. +#define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_RESET 0x0028 +#define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_BITS 0x0000ffff +#define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_MSB 15 +#define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_LSB 0 +#define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_SS_SCL_LCNT +// Description : Standard Speed I2C Clock SCL Low Count Register +#define I2C_IC_SS_SCL_LCNT_OFFSET 0x00000018 +#define I2C_IC_SS_SCL_LCNT_BITS 0x0000ffff +#define I2C_IC_SS_SCL_LCNT_RESET 0x0000002f +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT +// Description : This register must be set before any I2C bus transaction can +// take place to ensure proper I/O timing. This register sets the +// SCL clock low period count for standard speed. For more +// information, refer to 'IC_CLK Frequency Configuration' +// +// This register can be written only when the I2C interface is +// disabled which corresponds to the IC_ENABLE[0] register being +// set to 0. Writes at other times have no effect. +// +// The minimum valid value is 8; hardware prevents values less +// than this being written, and if attempted, results in 8 being +// set. For designs with APB_DATA_WIDTH = 8, the order of +// programming is important to ensure the correct operation of +// DW_apb_i2c. The lower byte must be programmed first, and then +// the upper byte is programmed. +#define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_RESET 0x002f +#define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_BITS 0x0000ffff +#define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_MSB 15 +#define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_LSB 0 +#define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_FS_SCL_HCNT +// Description : Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register +#define I2C_IC_FS_SCL_HCNT_OFFSET 0x0000001c +#define I2C_IC_FS_SCL_HCNT_BITS 0x0000ffff +#define I2C_IC_FS_SCL_HCNT_RESET 0x00000006 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT +// Description : This register must be set before any I2C bus transaction can +// take place to ensure proper I/O timing. This register sets the +// SCL clock high-period count for fast mode or fast mode plus. It +// is used in high-speed mode to send the Master Code and START +// BYTE or General CALL. For more information, refer to 'IC_CLK +// Frequency Configuration'. +// +// This register goes away and becomes read-only returning 0s if +// IC_MAX_SPEED_MODE = standard. This register can be written only +// when the I2C interface is disabled, which corresponds to the +// IC_ENABLE[0] register being set to 0. Writes at other times +// have no effect. +// +// The minimum valid value is 6; hardware prevents values less +// than this being written, and if attempted results in 6 being +// set. For designs with APB_DATA_WIDTH == 8 the order of +// programming is important to ensure the correct operation of the +// DW_apb_i2c. The lower byte must be programmed first. Then the +// upper byte is programmed. +#define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_RESET 0x0006 +#define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_BITS 0x0000ffff +#define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_MSB 15 +#define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_LSB 0 +#define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_FS_SCL_LCNT +// Description : Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register +#define I2C_IC_FS_SCL_LCNT_OFFSET 0x00000020 +#define I2C_IC_FS_SCL_LCNT_BITS 0x0000ffff +#define I2C_IC_FS_SCL_LCNT_RESET 0x0000000d +// ----------------------------------------------------------------------------- +// Field : I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT +// Description : This register must be set before any I2C bus transaction can +// take place to ensure proper I/O timing. This register sets the +// SCL clock low period count for fast speed. It is used in +// high-speed mode to send the Master Code and START BYTE or +// General CALL. For more information, refer to 'IC_CLK Frequency +// Configuration'. +// +// This register goes away and becomes read-only returning 0s if +// IC_MAX_SPEED_MODE = standard. +// +// This register can be written only when the I2C interface is +// disabled, which corresponds to the IC_ENABLE[0] register being +// set to 0. Writes at other times have no effect. +// +// The minimum valid value is 8; hardware prevents values less +// than this being written, and if attempted results in 8 being +// set. For designs with APB_DATA_WIDTH = 8 the order of +// programming is important to ensure the correct operation of the +// DW_apb_i2c. The lower byte must be programmed first. Then the +// upper byte is programmed. If the value is less than 8 then the +// count value gets changed to 8. +#define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_RESET 0x000d +#define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_BITS 0x0000ffff +#define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_MSB 15 +#define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_LSB 0 +#define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_INTR_STAT +// Description : I2C Interrupt Status Register +// +// Each bit in this register has a corresponding mask bit in the +// IC_INTR_MASK register. These bits are cleared by reading the +// matching interrupt clear register. The unmasked raw versions of +// these bits are available in the IC_RAW_INTR_STAT register. +#define I2C_IC_INTR_STAT_OFFSET 0x0000002c +#define I2C_IC_INTR_STAT_BITS 0x00003fff +#define I2C_IC_INTR_STAT_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_MASTER_ON_HOLD +// Description : See IC_RAW_INTR_STAT for a detailed description of +// R_MASTER_ON_HOLD bit. +// +// Reset value: 0x0 +// 0x0 -> R_MASTER_ON_HOLD interrupt is inactive +// 0x1 -> R_MASTER_ON_HOLD interrupt is active +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_RESET 0x0 +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_BITS 0x00002000 +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_MSB 13 +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_LSB 13 +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_RESTART_DET +// Description : See IC_RAW_INTR_STAT for a detailed description of +// R_RESTART_DET bit. +// +// Reset value: 0x0 +// 0x0 -> R_RESTART_DET interrupt is inactive +// 0x1 -> R_RESTART_DET interrupt is active +#define I2C_IC_INTR_STAT_R_RESTART_DET_RESET 0x0 +#define I2C_IC_INTR_STAT_R_RESTART_DET_BITS 0x00001000 +#define I2C_IC_INTR_STAT_R_RESTART_DET_MSB 12 +#define I2C_IC_INTR_STAT_R_RESTART_DET_LSB 12 +#define I2C_IC_INTR_STAT_R_RESTART_DET_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_RESTART_DET_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_RESTART_DET_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_GEN_CALL +// Description : See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_GEN_CALL interrupt is inactive +// 0x1 -> R_GEN_CALL interrupt is active +#define I2C_IC_INTR_STAT_R_GEN_CALL_RESET 0x0 +#define I2C_IC_INTR_STAT_R_GEN_CALL_BITS 0x00000800 +#define I2C_IC_INTR_STAT_R_GEN_CALL_MSB 11 +#define I2C_IC_INTR_STAT_R_GEN_CALL_LSB 11 +#define I2C_IC_INTR_STAT_R_GEN_CALL_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_GEN_CALL_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_GEN_CALL_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_START_DET +// Description : See IC_RAW_INTR_STAT for a detailed description of R_START_DET +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_START_DET interrupt is inactive +// 0x1 -> R_START_DET interrupt is active +#define I2C_IC_INTR_STAT_R_START_DET_RESET 0x0 +#define I2C_IC_INTR_STAT_R_START_DET_BITS 0x00000400 +#define I2C_IC_INTR_STAT_R_START_DET_MSB 10 +#define I2C_IC_INTR_STAT_R_START_DET_LSB 10 +#define I2C_IC_INTR_STAT_R_START_DET_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_START_DET_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_START_DET_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_STOP_DET +// Description : See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_STOP_DET interrupt is inactive +// 0x1 -> R_STOP_DET interrupt is active +#define I2C_IC_INTR_STAT_R_STOP_DET_RESET 0x0 +#define I2C_IC_INTR_STAT_R_STOP_DET_BITS 0x00000200 +#define I2C_IC_INTR_STAT_R_STOP_DET_MSB 9 +#define I2C_IC_INTR_STAT_R_STOP_DET_LSB 9 +#define I2C_IC_INTR_STAT_R_STOP_DET_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_STOP_DET_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_STOP_DET_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_ACTIVITY +// Description : See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_ACTIVITY interrupt is inactive +// 0x1 -> R_ACTIVITY interrupt is active +#define I2C_IC_INTR_STAT_R_ACTIVITY_RESET 0x0 +#define I2C_IC_INTR_STAT_R_ACTIVITY_BITS 0x00000100 +#define I2C_IC_INTR_STAT_R_ACTIVITY_MSB 8 +#define I2C_IC_INTR_STAT_R_ACTIVITY_LSB 8 +#define I2C_IC_INTR_STAT_R_ACTIVITY_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_ACTIVITY_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_ACTIVITY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_RX_DONE +// Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_RX_DONE interrupt is inactive +// 0x1 -> R_RX_DONE interrupt is active +#define I2C_IC_INTR_STAT_R_RX_DONE_RESET 0x0 +#define I2C_IC_INTR_STAT_R_RX_DONE_BITS 0x00000080 +#define I2C_IC_INTR_STAT_R_RX_DONE_MSB 7 +#define I2C_IC_INTR_STAT_R_RX_DONE_LSB 7 +#define I2C_IC_INTR_STAT_R_RX_DONE_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_RX_DONE_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_RX_DONE_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_TX_ABRT +// Description : See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_TX_ABRT interrupt is inactive +// 0x1 -> R_TX_ABRT interrupt is active +#define I2C_IC_INTR_STAT_R_TX_ABRT_RESET 0x0 +#define I2C_IC_INTR_STAT_R_TX_ABRT_BITS 0x00000040 +#define I2C_IC_INTR_STAT_R_TX_ABRT_MSB 6 +#define I2C_IC_INTR_STAT_R_TX_ABRT_LSB 6 +#define I2C_IC_INTR_STAT_R_TX_ABRT_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_TX_ABRT_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_TX_ABRT_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_RD_REQ +// Description : See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_RD_REQ interrupt is inactive +// 0x1 -> R_RD_REQ interrupt is active +#define I2C_IC_INTR_STAT_R_RD_REQ_RESET 0x0 +#define I2C_IC_INTR_STAT_R_RD_REQ_BITS 0x00000020 +#define I2C_IC_INTR_STAT_R_RD_REQ_MSB 5 +#define I2C_IC_INTR_STAT_R_RD_REQ_LSB 5 +#define I2C_IC_INTR_STAT_R_RD_REQ_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_RD_REQ_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_RD_REQ_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_TX_EMPTY +// Description : See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_TX_EMPTY interrupt is inactive +// 0x1 -> R_TX_EMPTY interrupt is active +#define I2C_IC_INTR_STAT_R_TX_EMPTY_RESET 0x0 +#define I2C_IC_INTR_STAT_R_TX_EMPTY_BITS 0x00000010 +#define I2C_IC_INTR_STAT_R_TX_EMPTY_MSB 4 +#define I2C_IC_INTR_STAT_R_TX_EMPTY_LSB 4 +#define I2C_IC_INTR_STAT_R_TX_EMPTY_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_TX_EMPTY_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_TX_EMPTY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_TX_OVER +// Description : See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_TX_OVER interrupt is inactive +// 0x1 -> R_TX_OVER interrupt is active +#define I2C_IC_INTR_STAT_R_TX_OVER_RESET 0x0 +#define I2C_IC_INTR_STAT_R_TX_OVER_BITS 0x00000008 +#define I2C_IC_INTR_STAT_R_TX_OVER_MSB 3 +#define I2C_IC_INTR_STAT_R_TX_OVER_LSB 3 +#define I2C_IC_INTR_STAT_R_TX_OVER_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_TX_OVER_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_TX_OVER_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_RX_FULL +// Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_RX_FULL interrupt is inactive +// 0x1 -> R_RX_FULL interrupt is active +#define I2C_IC_INTR_STAT_R_RX_FULL_RESET 0x0 +#define I2C_IC_INTR_STAT_R_RX_FULL_BITS 0x00000004 +#define I2C_IC_INTR_STAT_R_RX_FULL_MSB 2 +#define I2C_IC_INTR_STAT_R_RX_FULL_LSB 2 +#define I2C_IC_INTR_STAT_R_RX_FULL_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_RX_FULL_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_RX_FULL_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_RX_OVER +// Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER +// bit. +// +// Reset value: 0x0 +// 0x0 -> R_RX_OVER interrupt is inactive +// 0x1 -> R_RX_OVER interrupt is active +#define I2C_IC_INTR_STAT_R_RX_OVER_RESET 0x0 +#define I2C_IC_INTR_STAT_R_RX_OVER_BITS 0x00000002 +#define I2C_IC_INTR_STAT_R_RX_OVER_MSB 1 +#define I2C_IC_INTR_STAT_R_RX_OVER_LSB 1 +#define I2C_IC_INTR_STAT_R_RX_OVER_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_RX_OVER_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_RX_OVER_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_STAT_R_RX_UNDER +// Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER +// bit. +// +// Reset value: 0x0 +// 0x0 -> RX_UNDER interrupt is inactive +// 0x1 -> RX_UNDER interrupt is active +#define I2C_IC_INTR_STAT_R_RX_UNDER_RESET 0x0 +#define I2C_IC_INTR_STAT_R_RX_UNDER_BITS 0x00000001 +#define I2C_IC_INTR_STAT_R_RX_UNDER_MSB 0 +#define I2C_IC_INTR_STAT_R_RX_UNDER_LSB 0 +#define I2C_IC_INTR_STAT_R_RX_UNDER_ACCESS "RO" +#define I2C_IC_INTR_STAT_R_RX_UNDER_VALUE_INACTIVE 0x0 +#define I2C_IC_INTR_STAT_R_RX_UNDER_VALUE_ACTIVE 0x1 +// ============================================================================= +// Register : I2C_IC_INTR_MASK +// Description : I2C Interrupt Mask Register. +// +// These bits mask their corresponding interrupt status bits. This +// register is active low; a value of 0 masks the interrupt, +// whereas a value of 1 unmasks the interrupt. +#define I2C_IC_INTR_MASK_OFFSET 0x00000030 +#define I2C_IC_INTR_MASK_BITS 0x00003fff +#define I2C_IC_INTR_MASK_RESET 0x000008ff +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY +// Description : This M_MASTER_ON_HOLD_read_only bit masks the R_MASTER_ON_HOLD +// interrupt in IC_INTR_STAT register. +// +// Reset value: 0x0 +// 0x0 -> MASTER_ON_HOLD interrupt is masked +// 0x1 -> MASTER_ON_HOLD interrupt is unmasked +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_RESET 0x0 +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_BITS 0x00002000 +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_MSB 13 +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_LSB 13 +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_ACCESS "RO" +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_RESTART_DET +// Description : This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x0 +// 0x0 -> RESTART_DET interrupt is masked +// 0x1 -> RESTART_DET interrupt is unmasked +#define I2C_IC_INTR_MASK_M_RESTART_DET_RESET 0x0 +#define I2C_IC_INTR_MASK_M_RESTART_DET_BITS 0x00001000 +#define I2C_IC_INTR_MASK_M_RESTART_DET_MSB 12 +#define I2C_IC_INTR_MASK_M_RESTART_DET_LSB 12 +#define I2C_IC_INTR_MASK_M_RESTART_DET_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_RESTART_DET_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_RESTART_DET_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_GEN_CALL +// Description : This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> GEN_CALL interrupt is masked +// 0x1 -> GEN_CALL interrupt is unmasked +#define I2C_IC_INTR_MASK_M_GEN_CALL_RESET 0x1 +#define I2C_IC_INTR_MASK_M_GEN_CALL_BITS 0x00000800 +#define I2C_IC_INTR_MASK_M_GEN_CALL_MSB 11 +#define I2C_IC_INTR_MASK_M_GEN_CALL_LSB 11 +#define I2C_IC_INTR_MASK_M_GEN_CALL_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_GEN_CALL_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_GEN_CALL_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_START_DET +// Description : This bit masks the R_START_DET interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x0 +// 0x0 -> START_DET interrupt is masked +// 0x1 -> START_DET interrupt is unmasked +#define I2C_IC_INTR_MASK_M_START_DET_RESET 0x0 +#define I2C_IC_INTR_MASK_M_START_DET_BITS 0x00000400 +#define I2C_IC_INTR_MASK_M_START_DET_MSB 10 +#define I2C_IC_INTR_MASK_M_START_DET_LSB 10 +#define I2C_IC_INTR_MASK_M_START_DET_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_START_DET_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_START_DET_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_STOP_DET +// Description : This bit masks the R_STOP_DET interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x0 +// 0x0 -> STOP_DET interrupt is masked +// 0x1 -> STOP_DET interrupt is unmasked +#define I2C_IC_INTR_MASK_M_STOP_DET_RESET 0x0 +#define I2C_IC_INTR_MASK_M_STOP_DET_BITS 0x00000200 +#define I2C_IC_INTR_MASK_M_STOP_DET_MSB 9 +#define I2C_IC_INTR_MASK_M_STOP_DET_LSB 9 +#define I2C_IC_INTR_MASK_M_STOP_DET_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_STOP_DET_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_STOP_DET_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_ACTIVITY +// Description : This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x0 +// 0x0 -> ACTIVITY interrupt is masked +// 0x1 -> ACTIVITY interrupt is unmasked +#define I2C_IC_INTR_MASK_M_ACTIVITY_RESET 0x0 +#define I2C_IC_INTR_MASK_M_ACTIVITY_BITS 0x00000100 +#define I2C_IC_INTR_MASK_M_ACTIVITY_MSB 8 +#define I2C_IC_INTR_MASK_M_ACTIVITY_LSB 8 +#define I2C_IC_INTR_MASK_M_ACTIVITY_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_ACTIVITY_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_ACTIVITY_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_RX_DONE +// Description : This bit masks the R_RX_DONE interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> RX_DONE interrupt is masked +// 0x1 -> RX_DONE interrupt is unmasked +#define I2C_IC_INTR_MASK_M_RX_DONE_RESET 0x1 +#define I2C_IC_INTR_MASK_M_RX_DONE_BITS 0x00000080 +#define I2C_IC_INTR_MASK_M_RX_DONE_MSB 7 +#define I2C_IC_INTR_MASK_M_RX_DONE_LSB 7 +#define I2C_IC_INTR_MASK_M_RX_DONE_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_RX_DONE_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_RX_DONE_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_TX_ABRT +// Description : This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> TX_ABORT interrupt is masked +// 0x1 -> TX_ABORT interrupt is unmasked +#define I2C_IC_INTR_MASK_M_TX_ABRT_RESET 0x1 +#define I2C_IC_INTR_MASK_M_TX_ABRT_BITS 0x00000040 +#define I2C_IC_INTR_MASK_M_TX_ABRT_MSB 6 +#define I2C_IC_INTR_MASK_M_TX_ABRT_LSB 6 +#define I2C_IC_INTR_MASK_M_TX_ABRT_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_TX_ABRT_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_TX_ABRT_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_RD_REQ +// Description : This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. +// +// Reset value: 0x1 +// 0x0 -> RD_REQ interrupt is masked +// 0x1 -> RD_REQ interrupt is unmasked +#define I2C_IC_INTR_MASK_M_RD_REQ_RESET 0x1 +#define I2C_IC_INTR_MASK_M_RD_REQ_BITS 0x00000020 +#define I2C_IC_INTR_MASK_M_RD_REQ_MSB 5 +#define I2C_IC_INTR_MASK_M_RD_REQ_LSB 5 +#define I2C_IC_INTR_MASK_M_RD_REQ_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_RD_REQ_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_RD_REQ_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_TX_EMPTY +// Description : This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> TX_EMPTY interrupt is masked +// 0x1 -> TX_EMPTY interrupt is unmasked +#define I2C_IC_INTR_MASK_M_TX_EMPTY_RESET 0x1 +#define I2C_IC_INTR_MASK_M_TX_EMPTY_BITS 0x00000010 +#define I2C_IC_INTR_MASK_M_TX_EMPTY_MSB 4 +#define I2C_IC_INTR_MASK_M_TX_EMPTY_LSB 4 +#define I2C_IC_INTR_MASK_M_TX_EMPTY_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_TX_EMPTY_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_TX_EMPTY_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_TX_OVER +// Description : This bit masks the R_TX_OVER interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> TX_OVER interrupt is masked +// 0x1 -> TX_OVER interrupt is unmasked +#define I2C_IC_INTR_MASK_M_TX_OVER_RESET 0x1 +#define I2C_IC_INTR_MASK_M_TX_OVER_BITS 0x00000008 +#define I2C_IC_INTR_MASK_M_TX_OVER_MSB 3 +#define I2C_IC_INTR_MASK_M_TX_OVER_LSB 3 +#define I2C_IC_INTR_MASK_M_TX_OVER_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_TX_OVER_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_TX_OVER_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_RX_FULL +// Description : This bit masks the R_RX_FULL interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> RX_FULL interrupt is masked +// 0x1 -> RX_FULL interrupt is unmasked +#define I2C_IC_INTR_MASK_M_RX_FULL_RESET 0x1 +#define I2C_IC_INTR_MASK_M_RX_FULL_BITS 0x00000004 +#define I2C_IC_INTR_MASK_M_RX_FULL_MSB 2 +#define I2C_IC_INTR_MASK_M_RX_FULL_LSB 2 +#define I2C_IC_INTR_MASK_M_RX_FULL_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_RX_FULL_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_RX_FULL_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_RX_OVER +// Description : This bit masks the R_RX_OVER interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> RX_OVER interrupt is masked +// 0x1 -> RX_OVER interrupt is unmasked +#define I2C_IC_INTR_MASK_M_RX_OVER_RESET 0x1 +#define I2C_IC_INTR_MASK_M_RX_OVER_BITS 0x00000002 +#define I2C_IC_INTR_MASK_M_RX_OVER_MSB 1 +#define I2C_IC_INTR_MASK_M_RX_OVER_LSB 1 +#define I2C_IC_INTR_MASK_M_RX_OVER_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_RX_OVER_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_RX_OVER_VALUE_DISABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_INTR_MASK_M_RX_UNDER +// Description : This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT +// register. +// +// Reset value: 0x1 +// 0x0 -> RX_UNDER interrupt is masked +// 0x1 -> RX_UNDER interrupt is unmasked +#define I2C_IC_INTR_MASK_M_RX_UNDER_RESET 0x1 +#define I2C_IC_INTR_MASK_M_RX_UNDER_BITS 0x00000001 +#define I2C_IC_INTR_MASK_M_RX_UNDER_MSB 0 +#define I2C_IC_INTR_MASK_M_RX_UNDER_LSB 0 +#define I2C_IC_INTR_MASK_M_RX_UNDER_ACCESS "RW" +#define I2C_IC_INTR_MASK_M_RX_UNDER_VALUE_ENABLED 0x0 +#define I2C_IC_INTR_MASK_M_RX_UNDER_VALUE_DISABLED 0x1 +// ============================================================================= +// Register : I2C_IC_RAW_INTR_STAT +// Description : I2C Raw Interrupt Status Register +// +// Unlike the IC_INTR_STAT register, these bits are not masked so +// they always show the true status of the DW_apb_i2c. +#define I2C_IC_RAW_INTR_STAT_OFFSET 0x00000034 +#define I2C_IC_RAW_INTR_STAT_BITS 0x00003fff +#define I2C_IC_RAW_INTR_STAT_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD +// Description : Indicates whether master is holding the bus and TX FIFO is +// empty. Enabled only when I2C_DYNAMIC_TAR_UPDATE=1 and +// IC_EMPTYFIFO_HOLD_MASTER_EN=1. +// +// Reset value: 0x0 +// 0x0 -> MASTER_ON_HOLD interrupt is inactive +// 0x1 -> MASTER_ON_HOLD interrupt is active +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_BITS 0x00002000 +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_MSB 13 +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_LSB 13 +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_RESTART_DET +// Description : Indicates whether a RESTART condition has occurred on the I2C +// interface when DW_apb_i2c is operating in Slave mode and the +// slave is being addressed. Enabled only when +// IC_SLV_RESTART_DET_EN=1. +// +// Note: However, in high-speed mode or during a START BYTE +// transfer, the RESTART comes before the address field as per the +// I2C protocol. In this case, the slave is not the addressed +// slave when the RESTART is issued, therefore DW_apb_i2c does not +// generate the RESTART_DET interrupt. +// +// Reset value: 0x0 +// 0x0 -> RESTART_DET interrupt is inactive +// 0x1 -> RESTART_DET interrupt is active +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_BITS 0x00001000 +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_MSB 12 +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_LSB 12 +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_RESTART_DET_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_GEN_CALL +// Description : Set only when a General Call address is received and it is +// acknowledged. It stays set until it is cleared either by +// disabling DW_apb_i2c or when the CPU reads bit 0 of the +// IC_CLR_GEN_CALL register. DW_apb_i2c stores the received data +// in the Rx buffer. +// +// Reset value: 0x0 +// 0x0 -> GEN_CALL interrupt is inactive +// 0x1 -> GEN_CALL interrupt is active +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_BITS 0x00000800 +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_MSB 11 +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_LSB 11 +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_GEN_CALL_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_START_DET +// Description : Indicates whether a START or RESTART condition has occurred on +// the I2C interface regardless of whether DW_apb_i2c is operating +// in slave or master mode. +// +// Reset value: 0x0 +// 0x0 -> START_DET interrupt is inactive +// 0x1 -> START_DET interrupt is active +#define I2C_IC_RAW_INTR_STAT_START_DET_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_START_DET_BITS 0x00000400 +#define I2C_IC_RAW_INTR_STAT_START_DET_MSB 10 +#define I2C_IC_RAW_INTR_STAT_START_DET_LSB 10 +#define I2C_IC_RAW_INTR_STAT_START_DET_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_START_DET_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_START_DET_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_STOP_DET +// Description : Indicates whether a STOP condition has occurred on the I2C +// interface regardless of whether DW_apb_i2c is operating in +// slave or master mode. +// +// In Slave Mode: - If IC_CON[7]=1'b1 (STOP_DET_IFADDRESSED), the +// STOP_DET interrupt will be issued only if slave is addressed. +// Note: During a general call address, this slave does not issue +// a STOP_DET interrupt if STOP_DET_IF_ADDRESSED=1'b1, even if the +// slave responds to the general call address by generating ACK. +// The STOP_DET interrupt is generated only when the transmitted +// address matches the slave address (SAR). - If IC_CON[7]=1'b0 +// (STOP_DET_IFADDRESSED), the STOP_DET interrupt is issued +// irrespective of whether it is being addressed. In Master Mode: +// - If IC_CON[10]=1'b1 (STOP_DET_IF_MASTER_ACTIVE),the STOP_DET +// interrupt will be issued only if Master is active. - If +// IC_CON[10]=1'b0 (STOP_DET_IFADDRESSED),the STOP_DET interrupt +// will be issued irrespective of whether master is active or not. +// Reset value: 0x0 +// 0x0 -> STOP_DET interrupt is inactive +// 0x1 -> STOP_DET interrupt is active +#define I2C_IC_RAW_INTR_STAT_STOP_DET_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_STOP_DET_BITS 0x00000200 +#define I2C_IC_RAW_INTR_STAT_STOP_DET_MSB 9 +#define I2C_IC_RAW_INTR_STAT_STOP_DET_LSB 9 +#define I2C_IC_RAW_INTR_STAT_STOP_DET_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_STOP_DET_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_STOP_DET_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_ACTIVITY +// Description : This bit captures DW_apb_i2c activity and stays set until it is +// cleared. There are four ways to clear it: - Disabling the +// DW_apb_i2c - Reading the IC_CLR_ACTIVITY register - Reading the +// IC_CLR_INTR register - System reset Once this bit is set, it +// stays set unless one of the four methods is used to clear it. +// Even if the DW_apb_i2c module is idle, this bit remains set +// until cleared, indicating that there was activity on the bus. +// +// Reset value: 0x0 +// 0x0 -> RAW_INTR_ACTIVITY interrupt is inactive +// 0x1 -> RAW_INTR_ACTIVITY interrupt is active +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_BITS 0x00000100 +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_MSB 8 +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_LSB 8 +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_ACTIVITY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_RX_DONE +// Description : When the DW_apb_i2c is acting as a slave-transmitter, this bit +// is set to 1 if the master does not acknowledge a transmitted +// byte. This occurs on the last byte of the transmission, +// indicating that the transmission is done. +// +// Reset value: 0x0 +// 0x0 -> RX_DONE interrupt is inactive +// 0x1 -> RX_DONE interrupt is active +#define I2C_IC_RAW_INTR_STAT_RX_DONE_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_DONE_BITS 0x00000080 +#define I2C_IC_RAW_INTR_STAT_RX_DONE_MSB 7 +#define I2C_IC_RAW_INTR_STAT_RX_DONE_LSB 7 +#define I2C_IC_RAW_INTR_STAT_RX_DONE_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_RX_DONE_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_DONE_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_TX_ABRT +// Description : This bit indicates if DW_apb_i2c, as an I2C transmitter, is +// unable to complete the intended actions on the contents of the +// transmit FIFO. This situation can occur both as an I2C master +// or an I2C slave, and is referred to as a 'transmit abort'. When +// this bit is set to 1, the IC_TX_ABRT_SOURCE register indicates +// the reason why the transmit abort takes places. +// +// Note: The DW_apb_i2c flushes/resets/empties the TX_FIFO and +// RX_FIFO whenever there is a transmit abort caused by any of the +// events tracked by the IC_TX_ABRT_SOURCE register. The FIFOs +// remains in this flushed state until the register IC_CLR_TX_ABRT +// is read. Once this read is performed, the Tx FIFO is then ready +// to accept more data bytes from the APB interface. +// +// Reset value: 0x0 +// 0x0 -> TX_ABRT interrupt is inactive +// 0x1 -> TX_ABRT interrupt is active +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_BITS 0x00000040 +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_MSB 6 +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_LSB 6 +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_TX_ABRT_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_RD_REQ +// Description : This bit is set to 1 when DW_apb_i2c is acting as a slave and +// another I2C master is attempting to read data from DW_apb_i2c. +// The DW_apb_i2c holds the I2C bus in a wait state (SCL=0) until +// this interrupt is serviced, which means that the slave has been +// addressed by a remote master that is asking for data to be +// transferred. The processor must respond to this interrupt and +// then write the requested data to the IC_DATA_CMD register. This +// bit is set to 0 just after the processor reads the +// IC_CLR_RD_REQ register. +// +// Reset value: 0x0 +// 0x0 -> RD_REQ interrupt is inactive +// 0x1 -> RD_REQ interrupt is active +#define I2C_IC_RAW_INTR_STAT_RD_REQ_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_RD_REQ_BITS 0x00000020 +#define I2C_IC_RAW_INTR_STAT_RD_REQ_MSB 5 +#define I2C_IC_RAW_INTR_STAT_RD_REQ_LSB 5 +#define I2C_IC_RAW_INTR_STAT_RD_REQ_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_RD_REQ_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_RD_REQ_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_TX_EMPTY +// Description : The behavior of the TX_EMPTY interrupt status differs based on +// the TX_EMPTY_CTRL selection in the IC_CON register. - When +// TX_EMPTY_CTRL = 0: This bit is set to 1 when the transmit +// buffer is at or below the threshold value set in the IC_TX_TL +// register. - When TX_EMPTY_CTRL = 1: This bit is set to 1 when +// the transmit buffer is at or below the threshold value set in +// the IC_TX_TL register and the transmission of the address/data +// from the internal shift register for the most recently popped +// command is completed. It is automatically cleared by hardware +// when the buffer level goes above the threshold. When +// IC_ENABLE[0] is set to 0, the TX FIFO is flushed and held in +// reset. There the TX FIFO looks like it has no data within it, +// so this bit is set to 1, provided there is activity in the +// master or slave state machines. When there is no longer any +// activity, then with ic_en=0, this bit is set to 0. +// +// Reset value: 0x0. +// 0x0 -> TX_EMPTY interrupt is inactive +// 0x1 -> TX_EMPTY interrupt is active +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_BITS 0x00000010 +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_MSB 4 +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_LSB 4 +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_TX_EMPTY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_TX_OVER +// Description : Set during transmit if the transmit buffer is filled to +// IC_TX_BUFFER_DEPTH and the processor attempts to issue another +// I2C command by writing to the IC_DATA_CMD register. When the +// module is disabled, this bit keeps its level until the master +// or slave state machines go into idle, and when ic_en goes to 0, +// this interrupt is cleared. +// +// Reset value: 0x0 +// 0x0 -> TX_OVER interrupt is inactive +// 0x1 -> TX_OVER interrupt is active +#define I2C_IC_RAW_INTR_STAT_TX_OVER_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_TX_OVER_BITS 0x00000008 +#define I2C_IC_RAW_INTR_STAT_TX_OVER_MSB 3 +#define I2C_IC_RAW_INTR_STAT_TX_OVER_LSB 3 +#define I2C_IC_RAW_INTR_STAT_TX_OVER_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_TX_OVER_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_TX_OVER_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_RX_FULL +// Description : Set when the receive buffer reaches or goes above the RX_TL +// threshold in the IC_RX_TL register. It is automatically cleared +// by hardware when buffer level goes below the threshold. If the +// module is disabled (IC_ENABLE[0]=0), the RX FIFO is flushed and +// held in reset; therefore the RX FIFO is not full. So this bit +// is cleared once the IC_ENABLE bit 0 is programmed with a 0, +// regardless of the activity that continues. +// +// Reset value: 0x0 +// 0x0 -> RX_FULL interrupt is inactive +// 0x1 -> RX_FULL interrupt is active +#define I2C_IC_RAW_INTR_STAT_RX_FULL_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_FULL_BITS 0x00000004 +#define I2C_IC_RAW_INTR_STAT_RX_FULL_MSB 2 +#define I2C_IC_RAW_INTR_STAT_RX_FULL_LSB 2 +#define I2C_IC_RAW_INTR_STAT_RX_FULL_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_RX_FULL_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_FULL_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_RX_OVER +// Description : Set if the receive buffer is completely filled to +// IC_RX_BUFFER_DEPTH and an additional byte is received from an +// external I2C device. The DW_apb_i2c acknowledges this, but any +// data bytes received after the FIFO is full are lost. If the +// module is disabled (IC_ENABLE[0]=0), this bit keeps its level +// until the master or slave state machines go into idle, and when +// ic_en goes to 0, this interrupt is cleared. +// +// Note: If bit 9 of the IC_CON register (RX_FIFO_FULL_HLD_CTRL) +// is programmed to HIGH, then the RX_OVER interrupt never occurs, +// because the Rx FIFO never overflows. +// +// Reset value: 0x0 +// 0x0 -> RX_OVER interrupt is inactive +// 0x1 -> RX_OVER interrupt is active +#define I2C_IC_RAW_INTR_STAT_RX_OVER_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_OVER_BITS 0x00000002 +#define I2C_IC_RAW_INTR_STAT_RX_OVER_MSB 1 +#define I2C_IC_RAW_INTR_STAT_RX_OVER_LSB 1 +#define I2C_IC_RAW_INTR_STAT_RX_OVER_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_RX_OVER_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_OVER_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RAW_INTR_STAT_RX_UNDER +// Description : Set if the processor attempts to read the receive buffer when +// it is empty by reading from the IC_DATA_CMD register. If the +// module is disabled (IC_ENABLE[0]=0), this bit keeps its level +// until the master or slave state machines go into idle, and when +// ic_en goes to 0, this interrupt is cleared. +// +// Reset value: 0x0 +// 0x0 -> RX_UNDER interrupt is inactive +// 0x1 -> RX_UNDER interrupt is active +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_RESET 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_BITS 0x00000001 +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_MSB 0 +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_LSB 0 +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_ACCESS "RO" +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_VALUE_INACTIVE 0x0 +#define I2C_IC_RAW_INTR_STAT_RX_UNDER_VALUE_ACTIVE 0x1 +// ============================================================================= +// Register : I2C_IC_RX_TL +// Description : I2C Receive FIFO Threshold Register +#define I2C_IC_RX_TL_OFFSET 0x00000038 +#define I2C_IC_RX_TL_BITS 0x000000ff +#define I2C_IC_RX_TL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RX_TL_RX_TL +// Description : Receive FIFO Threshold Level. +// +// Controls the level of entries (or above) that triggers the +// RX_FULL interrupt (bit 2 in IC_RAW_INTR_STAT register). The +// valid range is 0-255, with the additional restriction that +// hardware does not allow this value to be set to a value larger +// than the depth of the buffer. If an attempt is made to do that, +// the actual value set will be the maximum depth of the buffer. A +// value of 0 sets the threshold for 1 entry, and a value of 255 +// sets the threshold for 256 entries. +#define I2C_IC_RX_TL_RX_TL_RESET 0x00 +#define I2C_IC_RX_TL_RX_TL_BITS 0x000000ff +#define I2C_IC_RX_TL_RX_TL_MSB 7 +#define I2C_IC_RX_TL_RX_TL_LSB 0 +#define I2C_IC_RX_TL_RX_TL_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_TX_TL +// Description : I2C Transmit FIFO Threshold Register +#define I2C_IC_TX_TL_OFFSET 0x0000003c +#define I2C_IC_TX_TL_BITS 0x000000ff +#define I2C_IC_TX_TL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_TL_TX_TL +// Description : Transmit FIFO Threshold Level. +// +// Controls the level of entries (or below) that trigger the +// TX_EMPTY interrupt (bit 4 in IC_RAW_INTR_STAT register). The +// valid range is 0-255, with the additional restriction that it +// may not be set to value larger than the depth of the buffer. If +// an attempt is made to do that, the actual value set will be the +// maximum depth of the buffer. A value of 0 sets the threshold +// for 0 entries, and a value of 255 sets the threshold for 255 +// entries. +#define I2C_IC_TX_TL_TX_TL_RESET 0x00 +#define I2C_IC_TX_TL_TX_TL_BITS 0x000000ff +#define I2C_IC_TX_TL_TX_TL_MSB 7 +#define I2C_IC_TX_TL_TX_TL_LSB 0 +#define I2C_IC_TX_TL_TX_TL_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_CLR_INTR +// Description : Clear Combined and Individual Interrupt Register +#define I2C_IC_CLR_INTR_OFFSET 0x00000040 +#define I2C_IC_CLR_INTR_BITS 0x00000001 +#define I2C_IC_CLR_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_INTR_CLR_INTR +// Description : Read this register to clear the combined interrupt, all +// individual interrupts, and the IC_TX_ABRT_SOURCE register. This +// bit does not clear hardware clearable interrupts but software +// clearable interrupts. Refer to Bit 9 of the IC_TX_ABRT_SOURCE +// register for an exception to clearing IC_TX_ABRT_SOURCE. +// +// Reset value: 0x0 +#define I2C_IC_CLR_INTR_CLR_INTR_RESET 0x0 +#define I2C_IC_CLR_INTR_CLR_INTR_BITS 0x00000001 +#define I2C_IC_CLR_INTR_CLR_INTR_MSB 0 +#define I2C_IC_CLR_INTR_CLR_INTR_LSB 0 +#define I2C_IC_CLR_INTR_CLR_INTR_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_RX_UNDER +// Description : Clear RX_UNDER Interrupt Register +#define I2C_IC_CLR_RX_UNDER_OFFSET 0x00000044 +#define I2C_IC_CLR_RX_UNDER_BITS 0x00000001 +#define I2C_IC_CLR_RX_UNDER_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER +// Description : Read this register to clear the RX_UNDER interrupt (bit 0) of +// the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_RESET 0x0 +#define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_BITS 0x00000001 +#define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_MSB 0 +#define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_LSB 0 +#define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_RX_OVER +// Description : Clear RX_OVER Interrupt Register +#define I2C_IC_CLR_RX_OVER_OFFSET 0x00000048 +#define I2C_IC_CLR_RX_OVER_BITS 0x00000001 +#define I2C_IC_CLR_RX_OVER_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_RX_OVER_CLR_RX_OVER +// Description : Read this register to clear the RX_OVER interrupt (bit 1) of +// the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_RESET 0x0 +#define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_BITS 0x00000001 +#define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_MSB 0 +#define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_LSB 0 +#define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_TX_OVER +// Description : Clear TX_OVER Interrupt Register +#define I2C_IC_CLR_TX_OVER_OFFSET 0x0000004c +#define I2C_IC_CLR_TX_OVER_BITS 0x00000001 +#define I2C_IC_CLR_TX_OVER_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_TX_OVER_CLR_TX_OVER +// Description : Read this register to clear the TX_OVER interrupt (bit 3) of +// the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_RESET 0x0 +#define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_BITS 0x00000001 +#define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_MSB 0 +#define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_LSB 0 +#define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_RD_REQ +// Description : Clear RD_REQ Interrupt Register +#define I2C_IC_CLR_RD_REQ_OFFSET 0x00000050 +#define I2C_IC_CLR_RD_REQ_BITS 0x00000001 +#define I2C_IC_CLR_RD_REQ_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_RD_REQ_CLR_RD_REQ +// Description : Read this register to clear the RD_REQ interrupt (bit 5) of the +// IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_RESET 0x0 +#define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_BITS 0x00000001 +#define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_MSB 0 +#define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_LSB 0 +#define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_TX_ABRT +// Description : Clear TX_ABRT Interrupt Register +#define I2C_IC_CLR_TX_ABRT_OFFSET 0x00000054 +#define I2C_IC_CLR_TX_ABRT_BITS 0x00000001 +#define I2C_IC_CLR_TX_ABRT_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT +// Description : Read this register to clear the TX_ABRT interrupt (bit 6) of +// the IC_RAW_INTR_STAT register, and the IC_TX_ABRT_SOURCE +// register. This also releases the TX FIFO from the flushed/reset +// state, allowing more writes to the TX FIFO. Refer to Bit 9 of +// the IC_TX_ABRT_SOURCE register for an exception to clearing +// IC_TX_ABRT_SOURCE. +// +// Reset value: 0x0 +#define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_RESET 0x0 +#define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_BITS 0x00000001 +#define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_MSB 0 +#define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_LSB 0 +#define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_RX_DONE +// Description : Clear RX_DONE Interrupt Register +#define I2C_IC_CLR_RX_DONE_OFFSET 0x00000058 +#define I2C_IC_CLR_RX_DONE_BITS 0x00000001 +#define I2C_IC_CLR_RX_DONE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_RX_DONE_CLR_RX_DONE +// Description : Read this register to clear the RX_DONE interrupt (bit 7) of +// the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_RESET 0x0 +#define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_BITS 0x00000001 +#define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_MSB 0 +#define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_LSB 0 +#define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_ACTIVITY +// Description : Clear ACTIVITY Interrupt Register +#define I2C_IC_CLR_ACTIVITY_OFFSET 0x0000005c +#define I2C_IC_CLR_ACTIVITY_BITS 0x00000001 +#define I2C_IC_CLR_ACTIVITY_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY +// Description : Reading this register clears the ACTIVITY interrupt if the I2C +// is not active anymore. If the I2C module is still active on the +// bus, the ACTIVITY interrupt bit continues to be set. It is +// automatically cleared by hardware if the module is disabled and +// if there is no further activity on the bus. The value read from +// this register to get status of the ACTIVITY interrupt (bit 8) +// of the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_RESET 0x0 +#define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_BITS 0x00000001 +#define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_MSB 0 +#define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_LSB 0 +#define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_STOP_DET +// Description : Clear STOP_DET Interrupt Register +#define I2C_IC_CLR_STOP_DET_OFFSET 0x00000060 +#define I2C_IC_CLR_STOP_DET_BITS 0x00000001 +#define I2C_IC_CLR_STOP_DET_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_STOP_DET_CLR_STOP_DET +// Description : Read this register to clear the STOP_DET interrupt (bit 9) of +// the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_RESET 0x0 +#define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_BITS 0x00000001 +#define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_MSB 0 +#define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_LSB 0 +#define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_START_DET +// Description : Clear START_DET Interrupt Register +#define I2C_IC_CLR_START_DET_OFFSET 0x00000064 +#define I2C_IC_CLR_START_DET_BITS 0x00000001 +#define I2C_IC_CLR_START_DET_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_START_DET_CLR_START_DET +// Description : Read this register to clear the START_DET interrupt (bit 10) of +// the IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_START_DET_CLR_START_DET_RESET 0x0 +#define I2C_IC_CLR_START_DET_CLR_START_DET_BITS 0x00000001 +#define I2C_IC_CLR_START_DET_CLR_START_DET_MSB 0 +#define I2C_IC_CLR_START_DET_CLR_START_DET_LSB 0 +#define I2C_IC_CLR_START_DET_CLR_START_DET_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_CLR_GEN_CALL +// Description : Clear GEN_CALL Interrupt Register +#define I2C_IC_CLR_GEN_CALL_OFFSET 0x00000068 +#define I2C_IC_CLR_GEN_CALL_BITS 0x00000001 +#define I2C_IC_CLR_GEN_CALL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL +// Description : Read this register to clear the GEN_CALL interrupt (bit 11) of +// IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_RESET 0x0 +#define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_BITS 0x00000001 +#define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_MSB 0 +#define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_LSB 0 +#define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_ENABLE +// Description : I2C Enable Register +#define I2C_IC_ENABLE_OFFSET 0x0000006c +#define I2C_IC_ENABLE_BITS 0x00000007 +#define I2C_IC_ENABLE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ENABLE_TX_CMD_BLOCK +// Description : In Master mode: - 1'b1: Blocks the transmission of data on I2C +// bus even if Tx FIFO has data to transmit. - 1'b0: The +// transmission of data starts on I2C bus automatically, as soon +// as the first data is available in the Tx FIFO. Note: To block +// the execution of Master commands, set the TX_CMD_BLOCK bit only +// when Tx FIFO is empty (IC_STATUS[2]==1) and Master is in Idle +// state (IC_STATUS[5] == 0). Any further commands put in the Tx +// FIFO are not executed until TX_CMD_BLOCK bit is unset. Reset +// value: IC_TX_CMD_BLOCK_DEFAULT +// 0x0 -> Tx Command execution not blocked +// 0x1 -> Tx Command execution blocked +#define I2C_IC_ENABLE_TX_CMD_BLOCK_RESET 0x0 +#define I2C_IC_ENABLE_TX_CMD_BLOCK_BITS 0x00000004 +#define I2C_IC_ENABLE_TX_CMD_BLOCK_MSB 2 +#define I2C_IC_ENABLE_TX_CMD_BLOCK_LSB 2 +#define I2C_IC_ENABLE_TX_CMD_BLOCK_ACCESS "RW" +#define I2C_IC_ENABLE_TX_CMD_BLOCK_VALUE_NOT_BLOCKED 0x0 +#define I2C_IC_ENABLE_TX_CMD_BLOCK_VALUE_BLOCKED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ENABLE_ABORT +// Description : When set, the controller initiates the transfer abort. - 0: +// ABORT not initiated or ABORT done - 1: ABORT operation in +// progress The software can abort the I2C transfer in master mode +// by setting this bit. The software can set this bit only when +// ENABLE is already set; otherwise, the controller ignores any +// write to ABORT bit. The software cannot clear the ABORT bit +// once set. In response to an ABORT, the controller issues a STOP +// and flushes the Tx FIFO after completing the current transfer, +// then sets the TX_ABORT interrupt after the abort operation. The +// ABORT bit is cleared automatically after the abort operation. +// +// For a detailed description on how to abort I2C transfers, refer +// to 'Aborting I2C Transfers'. +// +// Reset value: 0x0 +// 0x0 -> ABORT operation not in progress +// 0x1 -> ABORT operation in progress +#define I2C_IC_ENABLE_ABORT_RESET 0x0 +#define I2C_IC_ENABLE_ABORT_BITS 0x00000002 +#define I2C_IC_ENABLE_ABORT_MSB 1 +#define I2C_IC_ENABLE_ABORT_LSB 1 +#define I2C_IC_ENABLE_ABORT_ACCESS "RW" +#define I2C_IC_ENABLE_ABORT_VALUE_DISABLE 0x0 +#define I2C_IC_ENABLE_ABORT_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ENABLE_ENABLE +// Description : Controls whether the DW_apb_i2c is enabled. - 0: Disables +// DW_apb_i2c (TX and RX FIFOs are held in an erased state) - 1: +// Enables DW_apb_i2c Software can disable DW_apb_i2c while it is +// active. However, it is important that care be taken to ensure +// that DW_apb_i2c is disabled properly. A recommended procedure +// is described in 'Disabling DW_apb_i2c'. +// +// When DW_apb_i2c is disabled, the following occurs: - The TX +// FIFO and RX FIFO get flushed. - Status bits in the IC_INTR_STAT +// register are still active until DW_apb_i2c goes into IDLE +// state. If the module is transmitting, it stops as well as +// deletes the contents of the transmit buffer after the current +// transfer is complete. If the module is receiving, the +// DW_apb_i2c stops the current transfer at the end of the current +// byte and does not acknowledge the transfer. +// +// In systems with asynchronous pclk and ic_clk when IC_CLK_TYPE +// parameter set to asynchronous (1), there is a two ic_clk delay +// when enabling or disabling the DW_apb_i2c. For a detailed +// description on how to disable DW_apb_i2c, refer to 'Disabling +// DW_apb_i2c' +// +// Reset value: 0x0 +// 0x0 -> I2C is disabled +// 0x1 -> I2C is enabled +#define I2C_IC_ENABLE_ENABLE_RESET 0x0 +#define I2C_IC_ENABLE_ENABLE_BITS 0x00000001 +#define I2C_IC_ENABLE_ENABLE_MSB 0 +#define I2C_IC_ENABLE_ENABLE_LSB 0 +#define I2C_IC_ENABLE_ENABLE_ACCESS "RW" +#define I2C_IC_ENABLE_ENABLE_VALUE_DISABLED 0x0 +#define I2C_IC_ENABLE_ENABLE_VALUE_ENABLED 0x1 +// ============================================================================= +// Register : I2C_IC_STATUS +// Description : I2C Status Register +// +// This is a read-only register used to indicate the current +// transfer status and FIFO status. The status register may be +// read at any time. None of the bits in this register request an +// interrupt. +// +// When the I2C is disabled by writing 0 in bit 0 of the IC_ENABLE +// register: - Bits 1 and 2 are set to 1 - Bits 3 and 10 are set +// to 0 When the master or slave state machines goes to idle and +// ic_en=0: - Bits 5 and 6 are set to 0 +#define I2C_IC_STATUS_OFFSET 0x00000070 +#define I2C_IC_STATUS_BITS 0x0000007f +#define I2C_IC_STATUS_RESET 0x00000006 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_SLV_ACTIVITY +// Description : Slave FSM Activity Status. When the Slave Finite State Machine +// (FSM) is not in the IDLE state, this bit is set. - 0: Slave FSM +// is in IDLE state so the Slave part of DW_apb_i2c is not Active +// - 1: Slave FSM is not in IDLE state so the Slave part of +// DW_apb_i2c is Active Reset value: 0x0 +// 0x0 -> Slave is idle +// 0x1 -> Slave not idle +#define I2C_IC_STATUS_SLV_ACTIVITY_RESET 0x0 +#define I2C_IC_STATUS_SLV_ACTIVITY_BITS 0x00000040 +#define I2C_IC_STATUS_SLV_ACTIVITY_MSB 6 +#define I2C_IC_STATUS_SLV_ACTIVITY_LSB 6 +#define I2C_IC_STATUS_SLV_ACTIVITY_ACCESS "RO" +#define I2C_IC_STATUS_SLV_ACTIVITY_VALUE_IDLE 0x0 +#define I2C_IC_STATUS_SLV_ACTIVITY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_MST_ACTIVITY +// Description : Master FSM Activity Status. When the Master Finite State +// Machine (FSM) is not in the IDLE state, this bit is set. - 0: +// Master FSM is in IDLE state so the Master part of DW_apb_i2c is +// not Active - 1: Master FSM is not in IDLE state so the Master +// part of DW_apb_i2c is Active Note: IC_STATUS[0]-that is, +// ACTIVITY bit-is the OR of SLV_ACTIVITY and MST_ACTIVITY bits. +// +// Reset value: 0x0 +// 0x0 -> Master is idle +// 0x1 -> Master not idle +#define I2C_IC_STATUS_MST_ACTIVITY_RESET 0x0 +#define I2C_IC_STATUS_MST_ACTIVITY_BITS 0x00000020 +#define I2C_IC_STATUS_MST_ACTIVITY_MSB 5 +#define I2C_IC_STATUS_MST_ACTIVITY_LSB 5 +#define I2C_IC_STATUS_MST_ACTIVITY_ACCESS "RO" +#define I2C_IC_STATUS_MST_ACTIVITY_VALUE_IDLE 0x0 +#define I2C_IC_STATUS_MST_ACTIVITY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_RFF +// Description : Receive FIFO Completely Full. When the receive FIFO is +// completely full, this bit is set. When the receive FIFO +// contains one or more empty location, this bit is cleared. - 0: +// Receive FIFO is not full - 1: Receive FIFO is full Reset value: +// 0x0 +// 0x0 -> Rx FIFO not full +// 0x1 -> Rx FIFO is full +#define I2C_IC_STATUS_RFF_RESET 0x0 +#define I2C_IC_STATUS_RFF_BITS 0x00000010 +#define I2C_IC_STATUS_RFF_MSB 4 +#define I2C_IC_STATUS_RFF_LSB 4 +#define I2C_IC_STATUS_RFF_ACCESS "RO" +#define I2C_IC_STATUS_RFF_VALUE_NOT_FULL 0x0 +#define I2C_IC_STATUS_RFF_VALUE_FULL 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_RFNE +// Description : Receive FIFO Not Empty. This bit is set when the receive FIFO +// contains one or more entries; it is cleared when the receive +// FIFO is empty. - 0: Receive FIFO is empty - 1: Receive FIFO is +// not empty Reset value: 0x0 +// 0x0 -> Rx FIFO is empty +// 0x1 -> Rx FIFO not empty +#define I2C_IC_STATUS_RFNE_RESET 0x0 +#define I2C_IC_STATUS_RFNE_BITS 0x00000008 +#define I2C_IC_STATUS_RFNE_MSB 3 +#define I2C_IC_STATUS_RFNE_LSB 3 +#define I2C_IC_STATUS_RFNE_ACCESS "RO" +#define I2C_IC_STATUS_RFNE_VALUE_EMPTY 0x0 +#define I2C_IC_STATUS_RFNE_VALUE_NOT_EMPTY 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_TFE +// Description : Transmit FIFO Completely Empty. When the transmit FIFO is +// completely empty, this bit is set. When it contains one or more +// valid entries, this bit is cleared. This bit field does not +// request an interrupt. - 0: Transmit FIFO is not empty - 1: +// Transmit FIFO is empty Reset value: 0x1 +// 0x0 -> Tx FIFO not empty +// 0x1 -> Tx FIFO is empty +#define I2C_IC_STATUS_TFE_RESET 0x1 +#define I2C_IC_STATUS_TFE_BITS 0x00000004 +#define I2C_IC_STATUS_TFE_MSB 2 +#define I2C_IC_STATUS_TFE_LSB 2 +#define I2C_IC_STATUS_TFE_ACCESS "RO" +#define I2C_IC_STATUS_TFE_VALUE_NON_EMPTY 0x0 +#define I2C_IC_STATUS_TFE_VALUE_EMPTY 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_TFNF +// Description : Transmit FIFO Not Full. Set when the transmit FIFO contains one +// or more empty locations, and is cleared when the FIFO is full. +// - 0: Transmit FIFO is full - 1: Transmit FIFO is not full Reset +// value: 0x1 +// 0x0 -> Tx FIFO is full +// 0x1 -> Tx FIFO not full +#define I2C_IC_STATUS_TFNF_RESET 0x1 +#define I2C_IC_STATUS_TFNF_BITS 0x00000002 +#define I2C_IC_STATUS_TFNF_MSB 1 +#define I2C_IC_STATUS_TFNF_LSB 1 +#define I2C_IC_STATUS_TFNF_ACCESS "RO" +#define I2C_IC_STATUS_TFNF_VALUE_FULL 0x0 +#define I2C_IC_STATUS_TFNF_VALUE_NOT_FULL 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_STATUS_ACTIVITY +// Description : I2C Activity Status. Reset value: 0x0 +// 0x0 -> I2C is idle +// 0x1 -> I2C is active +#define I2C_IC_STATUS_ACTIVITY_RESET 0x0 +#define I2C_IC_STATUS_ACTIVITY_BITS 0x00000001 +#define I2C_IC_STATUS_ACTIVITY_MSB 0 +#define I2C_IC_STATUS_ACTIVITY_LSB 0 +#define I2C_IC_STATUS_ACTIVITY_ACCESS "RO" +#define I2C_IC_STATUS_ACTIVITY_VALUE_INACTIVE 0x0 +#define I2C_IC_STATUS_ACTIVITY_VALUE_ACTIVE 0x1 +// ============================================================================= +// Register : I2C_IC_TXFLR +// Description : I2C Transmit FIFO Level Register This register contains the +// number of valid data entries in the transmit FIFO buffer. It is +// cleared whenever: - The I2C is disabled - There is a transmit +// abort - that is, TX_ABRT bit is set in the IC_RAW_INTR_STAT +// register - The slave bulk transmit mode is aborted The register +// increments whenever data is placed into the transmit FIFO and +// decrements when data is taken from the transmit FIFO. +#define I2C_IC_TXFLR_OFFSET 0x00000074 +#define I2C_IC_TXFLR_BITS 0x0000001f +#define I2C_IC_TXFLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TXFLR_TXFLR +// Description : Transmit FIFO Level. Contains the number of valid data entries +// in the transmit FIFO. +// +// Reset value: 0x0 +#define I2C_IC_TXFLR_TXFLR_RESET 0x00 +#define I2C_IC_TXFLR_TXFLR_BITS 0x0000001f +#define I2C_IC_TXFLR_TXFLR_MSB 4 +#define I2C_IC_TXFLR_TXFLR_LSB 0 +#define I2C_IC_TXFLR_TXFLR_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_RXFLR +// Description : I2C Receive FIFO Level Register This register contains the +// number of valid data entries in the receive FIFO buffer. It is +// cleared whenever: - The I2C is disabled - Whenever there is a +// transmit abort caused by any of the events tracked in +// IC_TX_ABRT_SOURCE The register increments whenever data is +// placed into the receive FIFO and decrements when data is taken +// from the receive FIFO. +#define I2C_IC_RXFLR_OFFSET 0x00000078 +#define I2C_IC_RXFLR_BITS 0x0000001f +#define I2C_IC_RXFLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_RXFLR_RXFLR +// Description : Receive FIFO Level. Contains the number of valid data entries +// in the receive FIFO. +// +// Reset value: 0x0 +#define I2C_IC_RXFLR_RXFLR_RESET 0x00 +#define I2C_IC_RXFLR_RXFLR_BITS 0x0000001f +#define I2C_IC_RXFLR_RXFLR_MSB 4 +#define I2C_IC_RXFLR_RXFLR_LSB 0 +#define I2C_IC_RXFLR_RXFLR_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_SDA_HOLD +// Description : I2C SDA Hold Time Length Register +// +// The bits [15:0] of this register are used to control the hold +// time of SDA during transmit in both slave and master mode +// (after SCL goes from HIGH to LOW). +// +// The bits [23:16] of this register are used to extend the SDA +// transition (if any) whenever SCL is HIGH in the receiver in +// either master or slave mode. +// +// Writes to this register succeed only when IC_ENABLE[0]=0. +// +// The values in this register are in units of ic_clk period. The +// value programmed in IC_SDA_TX_HOLD must be greater than the +// minimum hold time in each mode one cycle in master mode, seven +// cycles in slave mode for the value to be implemented. +// +// The programmed SDA hold time during transmit (IC_SDA_TX_HOLD) +// cannot exceed at any time the duration of the low part of scl. +// Therefore the programmed value cannot be larger than +// N_SCL_LOW-2, where N_SCL_LOW is the duration of the low part of +// the scl period measured in ic_clk cycles. +#define I2C_IC_SDA_HOLD_OFFSET 0x0000007c +#define I2C_IC_SDA_HOLD_BITS 0x00ffffff +#define I2C_IC_SDA_HOLD_RESET 0x00000001 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD +// Description : Sets the required SDA hold time in units of ic_clk period, when +// DW_apb_i2c acts as a receiver. +// +// Reset value: IC_DEFAULT_SDA_HOLD[23:16]. +#define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_RESET 0x00 +#define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_BITS 0x00ff0000 +#define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_MSB 23 +#define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_LSB 16 +#define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD +// Description : Sets the required SDA hold time in units of ic_clk period, when +// DW_apb_i2c acts as a transmitter. +// +// Reset value: IC_DEFAULT_SDA_HOLD[15:0]. +#define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_RESET 0x0001 +#define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_BITS 0x0000ffff +#define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_MSB 15 +#define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_LSB 0 +#define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_TX_ABRT_SOURCE +// Description : I2C Transmit Abort Source Register +// +// This register has 32 bits that indicate the source of the +// TX_ABRT bit. Except for Bit 9, this register is cleared +// whenever the IC_CLR_TX_ABRT register or the IC_CLR_INTR +// register is read. To clear Bit 9, the source of the +// ABRT_SBYTE_NORSTRT must be fixed first; RESTART must be enabled +// (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or +// the GC_OR_START bit must be cleared (IC_TAR[10]). +// +// Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this +// bit can be cleared in the same manner as other bits in this +// register. If the source of the ABRT_SBYTE_NORSTRT is not fixed +// before attempting to clear this bit, Bit 9 clears for one cycle +// and is then re-asserted. +#define I2C_IC_TX_ABRT_SOURCE_OFFSET 0x00000080 +#define I2C_IC_TX_ABRT_SOURCE_BITS 0xff81ffff +#define I2C_IC_TX_ABRT_SOURCE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT +// Description : This field indicates the number of Tx FIFO Data Commands which +// are flushed due to TX_ABRT interrupt. It is cleared whenever +// I2C is disabled. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter +#define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_RESET 0x000 +#define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_BITS 0xff800000 +#define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_MSB 31 +#define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_LSB 23 +#define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT +// Description : This is a master-mode-only bit. Master has detected the +// transfer abort (IC_ENABLE[1]) +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter +// 0x0 -> Transfer abort detected by master- scenario not present +// 0x1 -> Transfer abort detected by master +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_BITS 0x00010000 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_MSB 16 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_LSB 16 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_VALUE_ABRT_USER_ABRT_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_VALUE_ABRT_USER_ABRT_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX +// Description : 1: When the processor side responds to a slave mode request for +// data to be transmitted to a remote master and user writes a 1 +// in CMD (bit 8) of IC_DATA_CMD register. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Slave-Transmitter +// 0x0 -> Slave trying to transmit to remote master in read mode- +// scenario not present +// 0x1 -> Slave trying to transmit to remote master in read mode +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_BITS 0x00008000 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_MSB 15 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_LSB 15 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_VALUE_ABRT_SLVRD_INTX_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_VALUE_ABRT_SLVRD_INTX_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST +// Description : This field indicates that a Slave has lost the bus while +// transmitting data to a remote master. IC_TX_ABRT_SOURCE[12] is +// set at the same time. Note: Even though the slave never 'owns' +// the bus, something could go wrong on the bus. This is a fail +// safe check. For instance, during a data transmission at the +// low-to-high transition of SCL, if what is on the data bus is +// not what is supposed to be transmitted, then DW_apb_i2c no +// longer own the bus. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Slave-Transmitter +// 0x0 -> Slave lost arbitration to remote master- scenario not +// present +// 0x1 -> Slave lost arbitration to remote master +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_BITS 0x00004000 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_MSB 14 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_LSB 14 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_VALUE_ABRT_SLV_ARBLOST_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_VALUE_ABRT_SLV_ARBLOST_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO +// Description : This field specifies that the Slave has received a read command +// and some data exists in the TX FIFO, so the slave issues a +// TX_ABRT interrupt to flush old data in TX FIFO. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Slave-Transmitter +// 0x0 -> Slave flushes existing data in TX-FIFO upon getting read +// command- scenario not present +// 0x1 -> Slave flushes existing data in TX-FIFO upon getting read +// command +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_BITS 0x00002000 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_MSB 13 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_LSB 13 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_VALUE_ABRT_SLVFLUSH_TXFIFO_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_VALUE_ABRT_SLVFLUSH_TXFIFO_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ARB_LOST +// Description : This field specifies that the Master has lost arbitration, or +// if IC_TX_ABRT_SOURCE[14] is also set, then the slave +// transmitter has lost arbitration. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter +// 0x0 -> Master or Slave-Transmitter lost arbitration- scenario +// not present +// 0x1 -> Master or Slave-Transmitter lost arbitration +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_BITS 0x00001000 +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_MSB 12 +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_LSB 12 +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_VALUE_ABRT_LOST_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_VALUE_ABRT_LOST_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS +// Description : This field indicates that the User tries to initiate a Master +// operation with the Master mode disabled. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Master-Receiver +// 0x0 -> User initiating master operation when MASTER disabled- +// scenario not present +// 0x1 -> User initiating master operation when MASTER disabled +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_BITS 0x00000800 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_MSB 11 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_LSB 11 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_VALUE_ABRT_MASTER_DIS_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_VALUE_ABRT_MASTER_DIS_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT +// Description : This field indicates that the restart is disabled +// (IC_RESTART_EN bit (IC_CON[5]) =0) and the master sends a read +// command in 10-bit addressing mode. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Receiver +// 0x0 -> Master not trying to read in 10Bit addressing mode when +// RESTART disabled +// 0x1 -> Master trying to read in 10Bit addressing mode when +// RESTART disabled +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_BITS 0x00000400 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_MSB 10 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_LSB 10 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_VALUE_ABRT_10B_RD_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_VALUE_ABRT_10B_RD_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT +// Description : To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be +// fixed first; restart must be enabled (IC_CON[5]=1), the SPECIAL +// bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must +// be cleared (IC_TAR[10]). Once the source of the +// ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in +// the same manner as other bits in this register. If the source +// of the ABRT_SBYTE_NORSTRT is not fixed before attempting to +// clear this bit, bit 9 clears for one cycle and then gets +// reasserted. When this field is set to 1, the restart is +// disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is +// trying to send a START Byte. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master +// 0x0 -> User trying to send START byte when RESTART disabled- +// scenario not present +// 0x1 -> User trying to send START byte when RESTART disabled +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_BITS 0x00000200 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_MSB 9 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_LSB 9 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_VALUE_ABRT_SBYTE_NORSTRT_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_VALUE_ABRT_SBYTE_NORSTRT_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT +// Description : This field indicates that the restart is disabled +// (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to +// use the master to transfer data in High Speed mode. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Master-Receiver +// 0x0 -> User trying to switch Master to HS mode when RESTART +// disabled- scenario not present +// 0x1 -> User trying to switch Master to HS mode when RESTART +// disabled +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_BITS 0x00000100 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_MSB 8 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_LSB 8 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_VALUE_ABRT_HS_NORSTRT_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_VALUE_ABRT_HS_NORSTRT_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET +// Description : This field indicates that the Master has sent a START Byte and +// the START Byte was acknowledged (wrong behavior). +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master +// 0x0 -> ACK detected for START byte- scenario not present +// 0x1 -> ACK detected for START byte +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_BITS 0x00000080 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_MSB 7 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_LSB 7 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_VALUE_ABRT_SBYTE_ACKDET_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_VALUE_ABRT_SBYTE_ACKDET_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET +// Description : This field indicates that the Master is in High Speed mode and +// the High Speed Master code was acknowledged (wrong behavior). +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master +// 0x0 -> HS Master code ACKed in HS Mode- scenario not present +// 0x1 -> HS Master code ACKed in HS Mode +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_BITS 0x00000040 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_MSB 6 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_LSB 6 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_VALUE_ABRT_HS_ACK_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_VALUE_ABRT_HS_ACK_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ +// Description : This field indicates that DW_apb_i2c in the master mode has +// sent a General Call but the user programmed the byte following +// the General Call to be a read from the bus (IC_DATA_CMD[9] is +// set to 1). +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter +// 0x0 -> GCALL is followed by read from bus-scenario not present +// 0x1 -> GCALL is followed by read from bus +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_BITS 0x00000020 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_MSB 5 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_LSB 5 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_VALUE_ABRT_GCALL_READ_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_VALUE_ABRT_GCALL_READ_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK +// Description : This field indicates that DW_apb_i2c in master mode has sent a +// General Call and no slave on the bus acknowledged the General +// Call. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter +// 0x0 -> GCALL not ACKed by any slave-scenario not present +// 0x1 -> GCALL not ACKed by any slave +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_BITS 0x00000010 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_MSB 4 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_LSB 4 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_VALUE_ABRT_GCALL_NOACK_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_VALUE_ABRT_GCALL_NOACK_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK +// Description : This field indicates the master-mode only bit. When the master +// receives an acknowledgement for the address, but when it sends +// data byte(s) following the address, it did not receive an +// acknowledge from the remote slave(s). +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter +// 0x0 -> Transmitted data non-ACKed by addressed slave-scenario +// not present +// 0x1 -> Transmitted data not ACKed by addressed slave +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_BITS 0x00000008 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_MSB 3 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_LSB 3 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_VALUE_ABRT_TXDATA_NOACK_VOID 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_VALUE_ABRT_TXDATA_NOACK_GENERATED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK +// Description : This field indicates that the Master is in 10-bit address mode +// and that the second address byte of the 10-bit address was not +// acknowledged by any slave. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Master-Receiver +// 0x0 -> This abort is not generated +// 0x1 -> Byte 2 of 10Bit Address not ACKed by any slave +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_BITS 0x00000004 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_MSB 2 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_LSB 2 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_VALUE_INACTIVE 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK +// Description : This field indicates that the Master is in 10-bit address mode +// and the first 10-bit address byte was not acknowledged by any +// slave. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Master-Receiver +// 0x0 -> This abort is not generated +// 0x1 -> Byte 1 of 10Bit Address not ACKed by any slave +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_BITS 0x00000002 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_MSB 1 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_LSB 1 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_VALUE_INACTIVE 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK +// Description : This field indicates that the Master is in 7-bit addressing +// mode and the address sent was not acknowledged by any slave. +// +// Reset value: 0x0 +// +// Role of DW_apb_i2c: Master-Transmitter or Master-Receiver +// 0x0 -> This abort is not generated +// 0x1 -> This abort is generated because of NOACK for 7-bit +// address +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_RESET 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_BITS 0x00000001 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_MSB 0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_LSB 0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_ACCESS "RO" +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_VALUE_INACTIVE 0x0 +#define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_VALUE_ACTIVE 0x1 +// ============================================================================= +// Register : I2C_IC_SLV_DATA_NACK_ONLY +// Description : Generate Slave Data NACK Register +// +// The register is used to generate a NACK for the data part of a +// transfer when DW_apb_i2c is acting as a slave-receiver. This +// register only exists when the IC_SLV_DATA_NACK_ONLY parameter +// is set to 1. When this parameter disabled, this register does +// not exist and writing to the register's address has no effect. +// +// A write can occur on this register if both of the following +// conditions are met: - DW_apb_i2c is disabled (IC_ENABLE[0] = 0) +// - Slave part is inactive (IC_STATUS[6] = 0) Note: The +// IC_STATUS[6] is a register read-back location for the internal +// slv_activity signal; the user should poll this before writing +// the ic_slv_data_nack_only bit. +#define I2C_IC_SLV_DATA_NACK_ONLY_OFFSET 0x00000084 +#define I2C_IC_SLV_DATA_NACK_ONLY_BITS 0x00000001 +#define I2C_IC_SLV_DATA_NACK_ONLY_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SLV_DATA_NACK_ONLY_NACK +// Description : Generate NACK. This NACK generation only occurs when DW_apb_i2c +// is a slave-receiver. If this register is set to a value of 1, +// it can only generate a NACK after a data byte is received; +// hence, the data transfer is aborted and the data received is +// not pushed to the receive buffer. +// +// When the register is set to a value of 0, it generates +// NACK/ACK, depending on normal criteria. - 1: generate NACK +// after data byte received - 0: generate NACK/ACK normally Reset +// value: 0x0 +// 0x0 -> Slave receiver generates NACK normally +// 0x1 -> Slave receiver generates NACK upon data reception only +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_RESET 0x0 +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_BITS 0x00000001 +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_MSB 0 +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_LSB 0 +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_ACCESS "RW" +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_VALUE_DISABLED 0x0 +#define I2C_IC_SLV_DATA_NACK_ONLY_NACK_VALUE_ENABLED 0x1 +// ============================================================================= +// Register : I2C_IC_DMA_CR +// Description : DMA Control Register +// +// The register is used to enable the DMA Controller interface +// operation. There is a separate bit for transmit and receive. +// This can be programmed regardless of the state of IC_ENABLE. +#define I2C_IC_DMA_CR_OFFSET 0x00000088 +#define I2C_IC_DMA_CR_BITS 0x00000003 +#define I2C_IC_DMA_CR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DMA_CR_TDMAE +// Description : Transmit DMA Enable. This bit enables/disables the transmit +// FIFO DMA channel. Reset value: 0x0 +// 0x0 -> transmit FIFO DMA channel disabled +// 0x1 -> Transmit FIFO DMA channel enabled +#define I2C_IC_DMA_CR_TDMAE_RESET 0x0 +#define I2C_IC_DMA_CR_TDMAE_BITS 0x00000002 +#define I2C_IC_DMA_CR_TDMAE_MSB 1 +#define I2C_IC_DMA_CR_TDMAE_LSB 1 +#define I2C_IC_DMA_CR_TDMAE_ACCESS "RW" +#define I2C_IC_DMA_CR_TDMAE_VALUE_DISABLED 0x0 +#define I2C_IC_DMA_CR_TDMAE_VALUE_ENABLED 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DMA_CR_RDMAE +// Description : Receive DMA Enable. This bit enables/disables the receive FIFO +// DMA channel. Reset value: 0x0 +// 0x0 -> Receive FIFO DMA channel disabled +// 0x1 -> Receive FIFO DMA channel enabled +#define I2C_IC_DMA_CR_RDMAE_RESET 0x0 +#define I2C_IC_DMA_CR_RDMAE_BITS 0x00000001 +#define I2C_IC_DMA_CR_RDMAE_MSB 0 +#define I2C_IC_DMA_CR_RDMAE_LSB 0 +#define I2C_IC_DMA_CR_RDMAE_ACCESS "RW" +#define I2C_IC_DMA_CR_RDMAE_VALUE_DISABLED 0x0 +#define I2C_IC_DMA_CR_RDMAE_VALUE_ENABLED 0x1 +// ============================================================================= +// Register : I2C_IC_DMA_TDLR +// Description : DMA Transmit Data Level Register +#define I2C_IC_DMA_TDLR_OFFSET 0x0000008c +#define I2C_IC_DMA_TDLR_BITS 0x0000000f +#define I2C_IC_DMA_TDLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DMA_TDLR_DMATDL +// Description : Transmit Data Level. This bit field controls the level at which +// a DMA request is made by the transmit logic. It is equal to the +// watermark level; that is, the dma_tx_req signal is generated +// when the number of valid data entries in the transmit FIFO is +// equal to or below this field value, and TDMAE = 1. +// +// Reset value: 0x0 +#define I2C_IC_DMA_TDLR_DMATDL_RESET 0x0 +#define I2C_IC_DMA_TDLR_DMATDL_BITS 0x0000000f +#define I2C_IC_DMA_TDLR_DMATDL_MSB 3 +#define I2C_IC_DMA_TDLR_DMATDL_LSB 0 +#define I2C_IC_DMA_TDLR_DMATDL_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_DMA_RDLR +// Description : I2C Receive Data Level Register +#define I2C_IC_DMA_RDLR_OFFSET 0x00000090 +#define I2C_IC_DMA_RDLR_BITS 0x0000000f +#define I2C_IC_DMA_RDLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_DMA_RDLR_DMARDL +// Description : Receive Data Level. This bit field controls the level at which +// a DMA request is made by the receive logic. The watermark level +// = DMARDL+1; that is, dma_rx_req is generated when the number of +// valid data entries in the receive FIFO is equal to or more than +// this field value + 1, and RDMAE =1. For instance, when DMARDL +// is 0, then dma_rx_req is asserted when 1 or more data entries +// are present in the receive FIFO. +// +// Reset value: 0x0 +#define I2C_IC_DMA_RDLR_DMARDL_RESET 0x0 +#define I2C_IC_DMA_RDLR_DMARDL_BITS 0x0000000f +#define I2C_IC_DMA_RDLR_DMARDL_MSB 3 +#define I2C_IC_DMA_RDLR_DMARDL_LSB 0 +#define I2C_IC_DMA_RDLR_DMARDL_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_SDA_SETUP +// Description : I2C SDA Setup Register +// +// This register controls the amount of time delay (in terms of +// number of ic_clk clock periods) introduced in the rising edge +// of SCL - relative to SDA changing - when DW_apb_i2c services a +// read request in a slave-transmitter operation. The relevant I2C +// requirement is tSU:DAT (note 4) as detailed in the I2C Bus +// Specification. This register must be programmed with a value +// equal to or greater than 2. +// +// Writes to this register succeed only when IC_ENABLE[0] = 0. +// +// Note: The length of setup time is calculated using +// [(IC_SDA_SETUP - 1) * (ic_clk_period)], so if the user requires +// 10 ic_clk periods of setup time, they should program a value of +// 11. The IC_SDA_SETUP register is only used by the DW_apb_i2c +// when operating as a slave transmitter. +#define I2C_IC_SDA_SETUP_OFFSET 0x00000094 +#define I2C_IC_SDA_SETUP_BITS 0x000000ff +#define I2C_IC_SDA_SETUP_RESET 0x00000064 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_SDA_SETUP_SDA_SETUP +// Description : SDA Setup. It is recommended that if the required delay is +// 1000ns, then for an ic_clk frequency of 10 MHz, IC_SDA_SETUP +// should be programmed to a value of 11. IC_SDA_SETUP must be +// programmed with a minimum value of 2. +#define I2C_IC_SDA_SETUP_SDA_SETUP_RESET 0x64 +#define I2C_IC_SDA_SETUP_SDA_SETUP_BITS 0x000000ff +#define I2C_IC_SDA_SETUP_SDA_SETUP_MSB 7 +#define I2C_IC_SDA_SETUP_SDA_SETUP_LSB 0 +#define I2C_IC_SDA_SETUP_SDA_SETUP_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_ACK_GENERAL_CALL +// Description : I2C ACK General Call Register +// +// The register controls whether DW_apb_i2c responds with a ACK or +// NACK when it receives an I2C General Call address. +// +// This register is applicable only when the DW_apb_i2c is in +// slave mode. +#define I2C_IC_ACK_GENERAL_CALL_OFFSET 0x00000098 +#define I2C_IC_ACK_GENERAL_CALL_BITS 0x00000001 +#define I2C_IC_ACK_GENERAL_CALL_RESET 0x00000001 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL +// Description : ACK General Call. When set to 1, DW_apb_i2c responds with a ACK +// (by asserting ic_data_oe) when it receives a General Call. +// Otherwise, DW_apb_i2c responds with a NACK (by negating +// ic_data_oe). +// 0x0 -> Generate NACK for a General Call +// 0x1 -> Generate ACK for a General Call +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_RESET 0x1 +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_BITS 0x00000001 +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_MSB 0 +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_LSB 0 +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_ACCESS "RW" +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_VALUE_DISABLED 0x0 +#define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_VALUE_ENABLED 0x1 +// ============================================================================= +// Register : I2C_IC_ENABLE_STATUS +// Description : I2C Enable Status Register +// +// The register is used to report the DW_apb_i2c hardware status +// when the IC_ENABLE[0] register is set from 1 to 0; that is, +// when DW_apb_i2c is disabled. +// +// If IC_ENABLE[0] has been set to 1, bits 2:1 are forced to 0, +// and bit 0 is forced to 1. +// +// If IC_ENABLE[0] has been set to 0, bits 2:1 is only be valid as +// soon as bit 0 is read as '0'. +// +// Note: When IC_ENABLE[0] has been set to 0, a delay occurs for +// bit 0 to be read as 0 because disabling the DW_apb_i2c depends +// on I2C bus activities. +#define I2C_IC_ENABLE_STATUS_OFFSET 0x0000009c +#define I2C_IC_ENABLE_STATUS_BITS 0x00000007 +#define I2C_IC_ENABLE_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST +// Description : Slave Received Data Lost. This bit indicates if a +// Slave-Receiver operation has been aborted with at least one +// data byte received from an I2C transfer due to the setting bit +// 0 of IC_ENABLE from 1 to 0. When read as 1, DW_apb_i2c is +// deemed to have been actively engaged in an aborted I2C transfer +// (with matching address) and the data phase of the I2C transfer +// has been entered, even though a data byte has been responded +// with a NACK. +// +// Note: If the remote I2C master terminates the transfer with a +// STOP condition before the DW_apb_i2c has a chance to NACK a +// transfer, and IC_ENABLE[0] has been set to 0, then this bit is +// also set to 1. +// +// When read as 0, DW_apb_i2c is deemed to have been disabled +// without being actively involved in the data phase of a +// Slave-Receiver transfer. +// +// Note: The CPU can safely read this bit when IC_EN (bit 0) is +// read as 0. +// +// Reset value: 0x0 +// 0x0 -> Slave RX Data is not lost +// 0x1 -> Slave RX Data is lost +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_RESET 0x0 +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_BITS 0x00000004 +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_MSB 2 +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_LSB 2 +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_ACCESS "RO" +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_VALUE_INACTIVE 0x0 +#define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY +// Description : Slave Disabled While Busy (Transmit, Receive). This bit +// indicates if a potential or active Slave operation has been +// aborted due to the setting bit 0 of the IC_ENABLE register from +// 1 to 0. This bit is set when the CPU writes a 0 to the +// IC_ENABLE register while: +// +// (a) DW_apb_i2c is receiving the address byte of the +// Slave-Transmitter operation from a remote master; +// +// OR, +// +// (b) address and data bytes of the Slave-Receiver operation from +// a remote master. +// +// When read as 1, DW_apb_i2c is deemed to have forced a NACK +// during any part of an I2C transfer, irrespective of whether the +// I2C address matches the slave address set in DW_apb_i2c (IC_SAR +// register) OR if the transfer is completed before IC_ENABLE is +// set to 0 but has not taken effect. +// +// Note: If the remote I2C master terminates the transfer with a +// STOP condition before the DW_apb_i2c has a chance to NACK a +// transfer, and IC_ENABLE[0] has been set to 0, then this bit +// will also be set to 1. +// +// When read as 0, DW_apb_i2c is deemed to have been disabled when +// there is master activity, or when the I2C bus is idle. +// +// Note: The CPU can safely read this bit when IC_EN (bit 0) is +// read as 0. +// +// Reset value: 0x0 +// 0x0 -> Slave is disabled when it is idle +// 0x1 -> Slave is disabled when it is active +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_RESET 0x0 +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_BITS 0x00000002 +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_MSB 1 +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_LSB 1 +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_ACCESS "RO" +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_VALUE_INACTIVE 0x0 +#define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_VALUE_ACTIVE 0x1 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_ENABLE_STATUS_IC_EN +// Description : ic_en Status. This bit always reflects the value driven on the +// output port ic_en. - When read as 1, DW_apb_i2c is deemed to be +// in an enabled state. - When read as 0, DW_apb_i2c is deemed +// completely inactive. Note: The CPU can safely read this bit +// anytime. When this bit is read as 0, the CPU can safely read +// SLV_RX_DATA_LOST (bit 2) and SLV_DISABLED_WHILE_BUSY (bit 1). +// +// Reset value: 0x0 +// 0x0 -> I2C disabled +// 0x1 -> I2C enabled +#define I2C_IC_ENABLE_STATUS_IC_EN_RESET 0x0 +#define I2C_IC_ENABLE_STATUS_IC_EN_BITS 0x00000001 +#define I2C_IC_ENABLE_STATUS_IC_EN_MSB 0 +#define I2C_IC_ENABLE_STATUS_IC_EN_LSB 0 +#define I2C_IC_ENABLE_STATUS_IC_EN_ACCESS "RO" +#define I2C_IC_ENABLE_STATUS_IC_EN_VALUE_DISABLED 0x0 +#define I2C_IC_ENABLE_STATUS_IC_EN_VALUE_ENABLED 0x1 +// ============================================================================= +// Register : I2C_IC_FS_SPKLEN +// Description : I2C SS, FS or FM+ spike suppression limit +// +// This register is used to store the duration, measured in ic_clk +// cycles, of the longest spike that is filtered out by the spike +// suppression logic when the component is operating in SS, FS or +// FM+ modes. The relevant I2C requirement is tSP (table 4) as +// detailed in the I2C Bus Specification. This register must be +// programmed with a minimum value of 1. +#define I2C_IC_FS_SPKLEN_OFFSET 0x000000a0 +#define I2C_IC_FS_SPKLEN_BITS 0x000000ff +#define I2C_IC_FS_SPKLEN_RESET 0x00000007 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_FS_SPKLEN_IC_FS_SPKLEN +// Description : This register must be set before any I2C bus transaction can +// take place to ensure stable operation. This register sets the +// duration, measured in ic_clk cycles, of the longest spike in +// the SCL or SDA lines that will be filtered out by the spike +// suppression logic. This register can be written only when the +// I2C interface is disabled which corresponds to the IC_ENABLE[0] +// register being set to 0. Writes at other times have no effect. +// The minimum valid value is 1; hardware prevents values less +// than this being written, and if attempted results in 1 being +// set. or more information, refer to 'Spike Suppression'. +#define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_RESET 0x07 +#define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_BITS 0x000000ff +#define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_MSB 7 +#define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_LSB 0 +#define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_ACCESS "RW" +// ============================================================================= +// Register : I2C_IC_CLR_RESTART_DET +// Description : Clear RESTART_DET Interrupt Register +#define I2C_IC_CLR_RESTART_DET_OFFSET 0x000000a8 +#define I2C_IC_CLR_RESTART_DET_BITS 0x00000001 +#define I2C_IC_CLR_RESTART_DET_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET +// Description : Read this register to clear the RESTART_DET interrupt (bit 12) +// of IC_RAW_INTR_STAT register. +// +// Reset value: 0x0 +#define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_RESET 0x0 +#define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_BITS 0x00000001 +#define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_MSB 0 +#define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_LSB 0 +#define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_COMP_PARAM_1 +// Description : Component Parameter Register 1 +// +// Note This register is not implemented and therefore reads as 0. +// If it was implemented it would be a constant read-only register +// that contains encoded information about the component's +// parameter settings. Fields shown below are the settings for +// those parameters +#define I2C_IC_COMP_PARAM_1_OFFSET 0x000000f4 +#define I2C_IC_COMP_PARAM_1_BITS 0x00ffffff +#define I2C_IC_COMP_PARAM_1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH +// Description : TX Buffer Depth = 16 +#define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_RESET 0x00 +#define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_BITS 0x00ff0000 +#define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_MSB 23 +#define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_LSB 16 +#define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH +// Description : RX Buffer Depth = 16 +#define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_RESET 0x00 +#define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_BITS 0x0000ff00 +#define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_MSB 15 +#define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_LSB 8 +#define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS +// Description : Encoded parameters not visible +#define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_RESET 0x0 +#define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_BITS 0x00000080 +#define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_MSB 7 +#define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_LSB 7 +#define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_HAS_DMA +// Description : DMA handshaking signals are enabled +#define I2C_IC_COMP_PARAM_1_HAS_DMA_RESET 0x0 +#define I2C_IC_COMP_PARAM_1_HAS_DMA_BITS 0x00000040 +#define I2C_IC_COMP_PARAM_1_HAS_DMA_MSB 6 +#define I2C_IC_COMP_PARAM_1_HAS_DMA_LSB 6 +#define I2C_IC_COMP_PARAM_1_HAS_DMA_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_INTR_IO +// Description : COMBINED Interrupt outputs +#define I2C_IC_COMP_PARAM_1_INTR_IO_RESET 0x0 +#define I2C_IC_COMP_PARAM_1_INTR_IO_BITS 0x00000020 +#define I2C_IC_COMP_PARAM_1_INTR_IO_MSB 5 +#define I2C_IC_COMP_PARAM_1_INTR_IO_LSB 5 +#define I2C_IC_COMP_PARAM_1_INTR_IO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES +// Description : Programmable count values for each mode. +#define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_RESET 0x0 +#define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_BITS 0x00000010 +#define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_MSB 4 +#define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_LSB 4 +#define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE +// Description : MAX SPEED MODE = FAST MODE +#define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_RESET 0x0 +#define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_BITS 0x0000000c +#define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_MSB 3 +#define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_LSB 2 +#define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH +// Description : APB data bus width is 32 bits +#define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_RESET 0x0 +#define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_BITS 0x00000003 +#define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_MSB 1 +#define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_LSB 0 +#define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_COMP_VERSION +// Description : I2C Component Version Register +#define I2C_IC_COMP_VERSION_OFFSET 0x000000f8 +#define I2C_IC_COMP_VERSION_BITS 0xffffffff +#define I2C_IC_COMP_VERSION_RESET 0x3230312a +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_VERSION_IC_COMP_VERSION +// Description : None +#define I2C_IC_COMP_VERSION_IC_COMP_VERSION_RESET 0x3230312a +#define I2C_IC_COMP_VERSION_IC_COMP_VERSION_BITS 0xffffffff +#define I2C_IC_COMP_VERSION_IC_COMP_VERSION_MSB 31 +#define I2C_IC_COMP_VERSION_IC_COMP_VERSION_LSB 0 +#define I2C_IC_COMP_VERSION_IC_COMP_VERSION_ACCESS "RO" +// ============================================================================= +// Register : I2C_IC_COMP_TYPE +// Description : I2C Component Type Register +#define I2C_IC_COMP_TYPE_OFFSET 0x000000fc +#define I2C_IC_COMP_TYPE_BITS 0xffffffff +#define I2C_IC_COMP_TYPE_RESET 0x44570140 +// ----------------------------------------------------------------------------- +// Field : I2C_IC_COMP_TYPE_IC_COMP_TYPE +// Description : Designware Component Type number = 0x44_57_01_40. This assigned +// unique hex value is constant and is derived from the two ASCII +// letters 'DW' followed by a 16-bit unsigned number. +#define I2C_IC_COMP_TYPE_IC_COMP_TYPE_RESET 0x44570140 +#define I2C_IC_COMP_TYPE_IC_COMP_TYPE_BITS 0xffffffff +#define I2C_IC_COMP_TYPE_IC_COMP_TYPE_MSB 31 +#define I2C_IC_COMP_TYPE_IC_COMP_TYPE_LSB 0 +#define I2C_IC_COMP_TYPE_IC_COMP_TYPE_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_I2C_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/intctrl.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/intctrl.h new file mode 100644 index 0000000000..dec7e36eaf --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/intctrl.h @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _INTCTRL_H_ +#define _INTCTRL_H_ + +#define TIMER_IRQ_0 0 +#define TIMER_IRQ_1 1 +#define TIMER_IRQ_2 2 +#define TIMER_IRQ_3 3 +#define PWM_IRQ_WRAP 4 +#define USBCTRL_IRQ 5 +#define XIP_IRQ 6 +#define PIO0_IRQ_0 7 +#define PIO0_IRQ_1 8 +#define PIO1_IRQ_0 9 +#define PIO1_IRQ_1 10 +#define DMA_IRQ_0 11 +#define DMA_IRQ_1 12 +#define IO_IRQ_BANK0 13 +#define IO_IRQ_QSPI 14 +#define SIO_IRQ_PROC0 15 +#define SIO_IRQ_PROC1 16 +#define CLOCKS_IRQ 17 +#define SPI0_IRQ 18 +#define SPI1_IRQ 19 +#define UART0_IRQ 20 +#define UART1_IRQ 21 +#define ADC_IRQ_FIFO 22 +#define I2C0_IRQ 23 +#define I2C1_IRQ 24 +#define RTC_IRQ 25 + +#define isr_timer_0 isr_irq0 +#define isr_timer_1 isr_irq1 +#define isr_timer_2 isr_irq2 +#define isr_timer_3 isr_irq3 +#define isr_pwm_wrap isr_irq4 +#define isr_usbctrl isr_irq5 +#define isr_xip isr_irq6 +#define isr_pio0_0 isr_irq7 +#define isr_pio0_1 isr_irq8 +#define isr_pio1_0 isr_irq9 +#define isr_pio1_1 isr_irq10 +#define isr_dma_0 isr_irq11 +#define isr_dma_1 isr_irq12 +#define isr_io_bank0 isr_irq13 +#define isr_io_qspi isr_irq14 +#define isr_sio_proc0 isr_irq15 +#define isr_sio_proc1 isr_irq16 +#define isr_clocks isr_irq17 +#define isr_spi0 isr_irq18 +#define isr_spi1 isr_irq19 +#define isr_uart0 isr_irq20 +#define isr_uart1 isr_irq21 +#define isr_adc_fifo isr_irq22 +#define isr_i2c0 isr_irq23 +#define isr_i2c1 isr_irq24 +#define isr_rtc isr_irq25 + +#endif // _INTCTRL_H_ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h new file mode 100644 index 0000000000..f7b15610c3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_bank0.h @@ -0,0 +1,14937 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : IO_BANK0 +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_IO_BANK0_DEFINED +#define HARDWARE_REGS_IO_BANK0_DEFINED +// ============================================================================= +// Register : IO_BANK0_GPIO0_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO0_STATUS_OFFSET 0x00000000 +#define IO_BANK0_GPIO0_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO0_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO0_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO0_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO0_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO0_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO0_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO0_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO0_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO0_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO0_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO0_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO0_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO0_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO0_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO0_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO0_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO0_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO0_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO0_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO0_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO0_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO0_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO0_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO0_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO0_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO0_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO0_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO0_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO0_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO0_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO0_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO0_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO0_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO0_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO0_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO0_CTRL_OFFSET 0x00000004 +#define IO_BANK0_GPIO0_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO0_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO0_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO0_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO0_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO0_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO0_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO0_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO0_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO0_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO0_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO0_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO0_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO0_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO0_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO0_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO0_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO0_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO0_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO0_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO0_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO0_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO0_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO0_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO0_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO0_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO0_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> jtag_tck +// 0x01 -> spi0_rx +// 0x02 -> uart0_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_0 +// 0x05 -> sio_0 +// 0x06 -> pio0_0 +// 0x07 -> pio1_0 +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_JTAG_TCK 0x00 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_SPI0_RX 0x01 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_UART0_TX 0x02 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_PWM_A_0 0x04 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_SIO_0 0x05 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_PIO0_0 0x06 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_PIO1_0 0x07 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO0_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO1_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO1_STATUS_OFFSET 0x00000008 +#define IO_BANK0_GPIO1_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO1_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO1_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO1_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO1_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO1_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO1_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO1_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO1_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO1_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO1_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO1_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO1_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO1_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO1_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO1_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO1_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO1_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO1_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO1_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO1_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO1_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO1_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO1_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO1_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO1_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO1_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO1_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO1_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO1_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO1_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO1_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO1_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO1_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO1_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO1_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO1_CTRL_OFFSET 0x0000000c +#define IO_BANK0_GPIO1_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO1_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO1_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO1_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO1_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO1_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO1_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO1_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO1_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO1_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO1_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO1_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO1_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO1_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO1_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO1_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO1_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO1_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO1_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO1_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO1_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO1_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO1_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO1_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO1_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO1_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO1_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> jtag_tms +// 0x01 -> spi0_ss_n +// 0x02 -> uart0_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_0 +// 0x05 -> sio_1 +// 0x06 -> pio0_1 +// 0x07 -> pio1_1 +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_JTAG_TMS 0x00 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_SPI0_SS_N 0x01 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_UART0_RX 0x02 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_PWM_B_0 0x04 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_SIO_1 0x05 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_PIO0_1 0x06 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_PIO1_1 0x07 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO1_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO2_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO2_STATUS_OFFSET 0x00000010 +#define IO_BANK0_GPIO2_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO2_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO2_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO2_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO2_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO2_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO2_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO2_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO2_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO2_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO2_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO2_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO2_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO2_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO2_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO2_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO2_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO2_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO2_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO2_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO2_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO2_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO2_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO2_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO2_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO2_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO2_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO2_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO2_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO2_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO2_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO2_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO2_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO2_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO2_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO2_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO2_CTRL_OFFSET 0x00000014 +#define IO_BANK0_GPIO2_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO2_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO2_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO2_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO2_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO2_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO2_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO2_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO2_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO2_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO2_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO2_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO2_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO2_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO2_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO2_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO2_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO2_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO2_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO2_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO2_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO2_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO2_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO2_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO2_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO2_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO2_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> jtag_tdi +// 0x01 -> spi0_sclk +// 0x02 -> uart0_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_1 +// 0x05 -> sio_2 +// 0x06 -> pio0_2 +// 0x07 -> pio1_2 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_JTAG_TDI 0x00 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_SPI0_SCLK 0x01 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_UART0_CTS 0x02 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_PWM_A_1 0x04 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_SIO_2 0x05 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_PIO0_2 0x06 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_PIO1_2 0x07 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO2_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO3_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO3_STATUS_OFFSET 0x00000018 +#define IO_BANK0_GPIO3_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO3_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO3_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO3_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO3_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO3_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO3_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO3_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO3_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO3_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO3_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO3_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO3_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO3_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO3_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO3_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO3_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO3_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO3_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO3_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO3_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO3_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO3_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO3_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO3_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO3_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO3_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO3_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO3_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO3_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO3_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO3_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO3_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO3_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO3_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO3_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO3_CTRL_OFFSET 0x0000001c +#define IO_BANK0_GPIO3_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO3_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO3_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO3_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO3_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO3_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO3_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO3_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO3_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO3_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO3_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO3_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO3_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO3_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO3_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO3_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO3_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO3_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO3_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO3_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO3_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO3_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO3_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO3_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO3_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO3_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO3_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> jtag_tdo +// 0x01 -> spi0_tx +// 0x02 -> uart0_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_1 +// 0x05 -> sio_3 +// 0x06 -> pio0_3 +// 0x07 -> pio1_3 +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_JTAG_TDO 0x00 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_SPI0_TX 0x01 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_UART0_RTS 0x02 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_PWM_B_1 0x04 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_SIO_3 0x05 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_PIO0_3 0x06 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_PIO1_3 0x07 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO3_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO4_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO4_STATUS_OFFSET 0x00000020 +#define IO_BANK0_GPIO4_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO4_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO4_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO4_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO4_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO4_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO4_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO4_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO4_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO4_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO4_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO4_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO4_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO4_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO4_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO4_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO4_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO4_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO4_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO4_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO4_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO4_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO4_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO4_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO4_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO4_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO4_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO4_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO4_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO4_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO4_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO4_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO4_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO4_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO4_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO4_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO4_CTRL_OFFSET 0x00000024 +#define IO_BANK0_GPIO4_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO4_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO4_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO4_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO4_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO4_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO4_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO4_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO4_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO4_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO4_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO4_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO4_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO4_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO4_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO4_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO4_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO4_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO4_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO4_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO4_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO4_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO4_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO4_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO4_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO4_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO4_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_rx +// 0x02 -> uart1_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_2 +// 0x05 -> sio_4 +// 0x06 -> pio0_4 +// 0x07 -> pio1_4 +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_SPI0_RX 0x01 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_UART1_TX 0x02 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_PWM_A_2 0x04 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_SIO_4 0x05 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_PIO0_4 0x06 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_PIO1_4 0x07 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO4_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO5_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO5_STATUS_OFFSET 0x00000028 +#define IO_BANK0_GPIO5_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO5_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO5_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO5_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO5_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO5_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO5_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO5_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO5_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO5_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO5_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO5_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO5_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO5_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO5_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO5_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO5_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO5_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO5_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO5_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO5_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO5_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO5_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO5_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO5_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO5_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO5_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO5_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO5_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO5_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO5_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO5_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO5_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO5_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO5_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO5_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO5_CTRL_OFFSET 0x0000002c +#define IO_BANK0_GPIO5_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO5_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO5_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO5_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO5_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO5_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO5_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO5_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO5_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO5_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO5_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO5_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO5_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO5_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO5_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO5_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO5_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO5_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO5_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO5_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO5_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO5_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO5_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO5_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO5_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO5_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO5_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_ss_n +// 0x02 -> uart1_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_2 +// 0x05 -> sio_5 +// 0x06 -> pio0_5 +// 0x07 -> pio1_5 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_SPI0_SS_N 0x01 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_UART1_RX 0x02 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_PWM_B_2 0x04 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_SIO_5 0x05 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_PIO0_5 0x06 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_PIO1_5 0x07 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO5_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO6_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO6_STATUS_OFFSET 0x00000030 +#define IO_BANK0_GPIO6_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO6_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO6_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO6_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO6_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO6_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO6_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO6_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO6_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO6_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO6_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO6_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO6_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO6_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO6_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO6_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO6_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO6_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO6_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO6_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO6_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO6_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO6_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO6_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO6_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO6_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO6_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO6_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO6_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO6_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO6_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO6_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO6_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO6_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO6_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO6_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO6_CTRL_OFFSET 0x00000034 +#define IO_BANK0_GPIO6_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO6_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO6_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO6_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO6_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO6_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO6_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO6_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO6_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO6_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO6_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO6_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO6_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO6_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO6_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO6_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO6_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO6_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO6_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO6_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO6_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO6_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO6_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO6_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO6_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO6_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO6_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_sclk +// 0x02 -> uart1_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_3 +// 0x05 -> sio_6 +// 0x06 -> pio0_6 +// 0x07 -> pio1_6 +// 0x08 -> usb_muxing_extphy_softcon +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_SPI0_SCLK 0x01 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_UART1_CTS 0x02 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_PWM_A_3 0x04 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_SIO_6 0x05 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_PIO0_6 0x06 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_PIO1_6 0x07 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_SOFTCON 0x08 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO6_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO7_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO7_STATUS_OFFSET 0x00000038 +#define IO_BANK0_GPIO7_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO7_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO7_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO7_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO7_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO7_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO7_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO7_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO7_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO7_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO7_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO7_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO7_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO7_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO7_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO7_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO7_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO7_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO7_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO7_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO7_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO7_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO7_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO7_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO7_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO7_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO7_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO7_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO7_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO7_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO7_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO7_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO7_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO7_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO7_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO7_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO7_CTRL_OFFSET 0x0000003c +#define IO_BANK0_GPIO7_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO7_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO7_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO7_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO7_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO7_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO7_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO7_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO7_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO7_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO7_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO7_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO7_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO7_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO7_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO7_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO7_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO7_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO7_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO7_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO7_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO7_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO7_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO7_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO7_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO7_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO7_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_tx +// 0x02 -> uart1_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_3 +// 0x05 -> sio_7 +// 0x06 -> pio0_7 +// 0x07 -> pio1_7 +// 0x08 -> usb_muxing_extphy_oe_n +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_SPI0_TX 0x01 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_UART1_RTS 0x02 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_PWM_B_3 0x04 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_SIO_7 0x05 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_PIO0_7 0x06 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_PIO1_7 0x07 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_OE_N 0x08 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO7_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO8_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO8_STATUS_OFFSET 0x00000040 +#define IO_BANK0_GPIO8_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO8_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO8_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO8_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO8_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO8_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO8_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO8_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO8_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO8_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO8_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO8_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO8_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO8_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO8_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO8_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO8_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO8_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO8_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO8_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO8_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO8_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO8_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO8_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO8_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO8_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO8_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO8_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO8_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO8_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO8_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO8_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO8_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO8_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO8_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO8_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO8_CTRL_OFFSET 0x00000044 +#define IO_BANK0_GPIO8_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO8_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO8_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO8_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO8_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO8_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO8_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO8_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO8_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO8_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO8_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO8_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO8_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO8_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO8_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO8_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO8_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO8_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO8_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO8_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO8_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO8_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO8_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO8_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO8_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO8_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO8_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_rx +// 0x02 -> uart1_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_4 +// 0x05 -> sio_8 +// 0x06 -> pio0_8 +// 0x07 -> pio1_8 +// 0x08 -> usb_muxing_extphy_rcv +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_SPI1_RX 0x01 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_UART1_TX 0x02 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_PWM_A_4 0x04 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_SIO_8 0x05 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_PIO0_8 0x06 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_PIO1_8 0x07 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_RCV 0x08 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO8_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO9_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO9_STATUS_OFFSET 0x00000048 +#define IO_BANK0_GPIO9_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO9_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO9_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO9_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO9_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO9_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO9_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO9_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO9_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO9_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO9_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO9_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO9_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO9_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO9_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO9_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO9_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO9_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO9_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO9_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO9_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO9_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO9_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO9_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO9_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO9_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO9_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO9_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO9_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO9_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO9_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO9_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO9_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO9_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO9_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO9_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO9_CTRL_OFFSET 0x0000004c +#define IO_BANK0_GPIO9_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO9_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO9_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO9_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO9_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO9_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO9_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO9_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO9_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO9_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO9_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO9_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO9_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO9_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO9_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO9_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO9_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO9_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO9_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO9_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO9_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO9_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO9_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO9_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO9_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO9_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO9_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_ss_n +// 0x02 -> uart1_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_4 +// 0x05 -> sio_9 +// 0x06 -> pio0_9 +// 0x07 -> pio1_9 +// 0x08 -> usb_muxing_extphy_vp +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_SPI1_SS_N 0x01 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_UART1_RX 0x02 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_PWM_B_4 0x04 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_SIO_9 0x05 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_PIO0_9 0x06 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_PIO1_9 0x07 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_VP 0x08 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO9_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO10_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO10_STATUS_OFFSET 0x00000050 +#define IO_BANK0_GPIO10_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO10_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO10_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO10_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO10_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO10_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO10_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO10_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO10_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO10_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO10_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO10_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO10_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO10_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO10_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO10_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO10_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO10_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO10_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO10_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO10_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO10_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO10_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO10_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO10_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO10_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO10_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO10_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO10_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO10_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO10_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO10_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO10_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO10_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO10_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO10_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO10_CTRL_OFFSET 0x00000054 +#define IO_BANK0_GPIO10_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO10_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO10_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO10_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO10_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO10_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO10_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO10_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO10_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO10_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO10_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO10_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO10_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO10_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO10_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO10_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO10_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO10_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO10_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO10_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO10_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO10_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO10_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO10_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO10_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO10_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO10_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_sclk +// 0x02 -> uart1_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_5 +// 0x05 -> sio_10 +// 0x06 -> pio0_10 +// 0x07 -> pio1_10 +// 0x08 -> usb_muxing_extphy_vm +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_SPI1_SCLK 0x01 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_UART1_CTS 0x02 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_PWM_A_5 0x04 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_SIO_10 0x05 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_PIO0_10 0x06 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_PIO1_10 0x07 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_VM 0x08 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO10_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO11_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO11_STATUS_OFFSET 0x00000058 +#define IO_BANK0_GPIO11_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO11_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO11_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO11_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO11_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO11_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO11_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO11_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO11_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO11_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO11_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO11_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO11_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO11_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO11_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO11_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO11_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO11_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO11_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO11_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO11_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO11_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO11_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO11_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO11_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO11_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO11_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO11_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO11_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO11_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO11_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO11_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO11_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO11_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO11_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO11_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO11_CTRL_OFFSET 0x0000005c +#define IO_BANK0_GPIO11_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO11_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO11_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO11_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO11_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO11_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO11_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO11_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO11_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO11_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO11_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO11_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO11_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO11_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO11_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO11_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO11_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO11_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO11_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO11_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO11_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO11_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO11_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO11_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO11_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO11_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO11_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_tx +// 0x02 -> uart1_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_5 +// 0x05 -> sio_11 +// 0x06 -> pio0_11 +// 0x07 -> pio1_11 +// 0x08 -> usb_muxing_extphy_suspnd +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_SPI1_TX 0x01 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_UART1_RTS 0x02 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_PWM_B_5 0x04 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_SIO_11 0x05 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_PIO0_11 0x06 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_PIO1_11 0x07 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_SUSPND 0x08 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO11_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO12_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO12_STATUS_OFFSET 0x00000060 +#define IO_BANK0_GPIO12_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO12_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO12_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO12_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO12_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO12_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO12_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO12_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO12_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO12_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO12_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO12_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO12_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO12_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO12_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO12_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO12_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO12_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO12_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO12_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO12_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO12_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO12_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO12_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO12_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO12_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO12_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO12_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO12_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO12_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO12_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO12_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO12_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO12_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO12_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO12_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO12_CTRL_OFFSET 0x00000064 +#define IO_BANK0_GPIO12_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO12_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO12_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO12_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO12_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO12_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO12_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO12_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO12_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO12_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO12_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO12_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO12_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO12_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO12_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO12_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO12_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO12_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO12_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO12_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO12_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO12_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO12_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO12_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO12_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO12_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO12_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_rx +// 0x02 -> uart0_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_6 +// 0x05 -> sio_12 +// 0x06 -> pio0_12 +// 0x07 -> pio1_12 +// 0x08 -> usb_muxing_extphy_speed +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_SPI1_RX 0x01 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_UART0_TX 0x02 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_PWM_A_6 0x04 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_SIO_12 0x05 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_PIO0_12 0x06 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_PIO1_12 0x07 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_SPEED 0x08 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO12_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO13_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO13_STATUS_OFFSET 0x00000068 +#define IO_BANK0_GPIO13_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO13_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO13_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO13_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO13_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO13_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO13_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO13_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO13_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO13_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO13_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO13_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO13_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO13_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO13_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO13_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO13_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO13_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO13_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO13_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO13_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO13_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO13_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO13_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO13_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO13_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO13_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO13_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO13_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO13_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO13_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO13_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO13_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO13_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO13_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO13_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO13_CTRL_OFFSET 0x0000006c +#define IO_BANK0_GPIO13_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO13_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO13_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO13_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO13_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO13_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO13_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO13_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO13_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO13_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO13_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO13_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO13_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO13_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO13_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO13_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO13_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO13_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO13_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO13_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO13_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO13_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO13_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO13_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO13_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO13_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO13_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_ss_n +// 0x02 -> uart0_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_6 +// 0x05 -> sio_13 +// 0x06 -> pio0_13 +// 0x07 -> pio1_13 +// 0x08 -> usb_muxing_extphy_vpo +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_SPI1_SS_N 0x01 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_UART0_RX 0x02 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_PWM_B_6 0x04 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_SIO_13 0x05 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_PIO0_13 0x06 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_PIO1_13 0x07 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_VPO 0x08 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO13_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO14_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO14_STATUS_OFFSET 0x00000070 +#define IO_BANK0_GPIO14_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO14_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO14_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO14_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO14_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO14_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO14_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO14_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO14_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO14_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO14_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO14_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO14_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO14_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO14_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO14_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO14_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO14_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO14_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO14_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO14_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO14_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO14_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO14_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO14_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO14_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO14_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO14_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO14_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO14_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO14_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO14_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO14_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO14_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO14_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO14_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO14_CTRL_OFFSET 0x00000074 +#define IO_BANK0_GPIO14_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO14_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO14_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO14_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO14_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO14_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO14_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO14_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO14_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO14_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO14_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO14_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO14_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO14_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO14_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO14_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO14_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO14_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO14_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO14_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO14_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO14_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO14_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO14_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO14_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO14_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO14_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_sclk +// 0x02 -> uart0_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_7 +// 0x05 -> sio_14 +// 0x06 -> pio0_14 +// 0x07 -> pio1_14 +// 0x08 -> usb_muxing_extphy_vmo +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_SPI1_SCLK 0x01 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_UART0_CTS 0x02 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_PWM_A_7 0x04 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_SIO_14 0x05 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_PIO0_14 0x06 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_PIO1_14 0x07 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_USB_MUXING_EXTPHY_VMO 0x08 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO14_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO15_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO15_STATUS_OFFSET 0x00000078 +#define IO_BANK0_GPIO15_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO15_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO15_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO15_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO15_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO15_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO15_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO15_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO15_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO15_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO15_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO15_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO15_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO15_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO15_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO15_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO15_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO15_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO15_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO15_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO15_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO15_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO15_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO15_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO15_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO15_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO15_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO15_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO15_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO15_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO15_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO15_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO15_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO15_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO15_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO15_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO15_CTRL_OFFSET 0x0000007c +#define IO_BANK0_GPIO15_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO15_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO15_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO15_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO15_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO15_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO15_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO15_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO15_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO15_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO15_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO15_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO15_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO15_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO15_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO15_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO15_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO15_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO15_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO15_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO15_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO15_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO15_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO15_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO15_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO15_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO15_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_tx +// 0x02 -> uart0_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_7 +// 0x05 -> sio_15 +// 0x06 -> pio0_15 +// 0x07 -> pio1_15 +// 0x08 -> usb_muxing_digital_dp +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_SPI1_TX 0x01 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_UART0_RTS 0x02 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_PWM_B_7 0x04 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_SIO_15 0x05 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_PIO0_15 0x06 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_PIO1_15 0x07 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_USB_MUXING_DIGITAL_DP 0x08 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO15_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO16_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO16_STATUS_OFFSET 0x00000080 +#define IO_BANK0_GPIO16_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO16_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO16_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO16_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO16_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO16_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO16_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO16_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO16_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO16_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO16_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO16_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO16_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO16_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO16_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO16_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO16_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO16_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO16_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO16_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO16_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO16_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO16_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO16_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO16_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO16_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO16_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO16_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO16_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO16_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO16_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO16_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO16_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO16_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO16_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO16_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO16_CTRL_OFFSET 0x00000084 +#define IO_BANK0_GPIO16_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO16_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO16_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO16_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO16_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO16_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO16_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO16_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO16_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO16_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO16_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO16_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO16_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO16_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO16_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO16_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO16_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO16_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO16_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO16_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO16_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO16_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO16_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO16_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO16_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO16_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO16_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_rx +// 0x02 -> uart0_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_0 +// 0x05 -> sio_16 +// 0x06 -> pio0_16 +// 0x07 -> pio1_16 +// 0x08 -> usb_muxing_digital_dm +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_SPI0_RX 0x01 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_UART0_TX 0x02 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_PWM_A_0 0x04 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_SIO_16 0x05 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_PIO0_16 0x06 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_PIO1_16 0x07 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_USB_MUXING_DIGITAL_DM 0x08 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO16_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO17_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO17_STATUS_OFFSET 0x00000088 +#define IO_BANK0_GPIO17_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO17_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO17_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO17_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO17_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO17_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO17_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO17_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO17_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO17_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO17_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO17_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO17_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO17_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO17_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO17_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO17_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO17_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO17_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO17_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO17_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO17_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO17_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO17_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO17_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO17_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO17_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO17_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO17_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO17_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO17_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO17_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO17_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO17_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO17_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO17_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO17_CTRL_OFFSET 0x0000008c +#define IO_BANK0_GPIO17_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO17_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO17_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO17_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO17_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO17_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO17_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO17_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO17_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO17_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO17_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO17_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO17_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO17_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO17_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO17_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO17_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO17_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO17_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO17_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO17_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO17_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO17_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO17_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO17_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO17_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO17_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_ss_n +// 0x02 -> uart0_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_0 +// 0x05 -> sio_17 +// 0x06 -> pio0_17 +// 0x07 -> pio1_17 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_SPI0_SS_N 0x01 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_UART0_RX 0x02 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_PWM_B_0 0x04 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_SIO_17 0x05 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_PIO0_17 0x06 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_PIO1_17 0x07 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO17_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO18_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO18_STATUS_OFFSET 0x00000090 +#define IO_BANK0_GPIO18_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO18_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO18_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO18_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO18_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO18_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO18_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO18_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO18_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO18_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO18_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO18_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO18_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO18_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO18_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO18_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO18_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO18_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO18_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO18_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO18_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO18_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO18_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO18_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO18_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO18_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO18_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO18_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO18_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO18_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO18_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO18_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO18_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO18_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO18_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO18_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO18_CTRL_OFFSET 0x00000094 +#define IO_BANK0_GPIO18_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO18_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO18_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO18_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO18_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO18_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO18_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO18_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO18_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO18_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO18_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO18_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO18_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO18_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO18_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO18_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO18_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO18_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO18_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO18_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO18_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO18_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO18_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO18_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO18_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO18_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO18_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_sclk +// 0x02 -> uart0_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_1 +// 0x05 -> sio_18 +// 0x06 -> pio0_18 +// 0x07 -> pio1_18 +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_SPI0_SCLK 0x01 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_UART0_CTS 0x02 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_PWM_A_1 0x04 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_SIO_18 0x05 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_PIO0_18 0x06 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_PIO1_18 0x07 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO18_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO19_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO19_STATUS_OFFSET 0x00000098 +#define IO_BANK0_GPIO19_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO19_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO19_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO19_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO19_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO19_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO19_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO19_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO19_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO19_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO19_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO19_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO19_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO19_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO19_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO19_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO19_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO19_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO19_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO19_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO19_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO19_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO19_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO19_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO19_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO19_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO19_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO19_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO19_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO19_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO19_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO19_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO19_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO19_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO19_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO19_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO19_CTRL_OFFSET 0x0000009c +#define IO_BANK0_GPIO19_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO19_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO19_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO19_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO19_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO19_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO19_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO19_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO19_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO19_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO19_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO19_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO19_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO19_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO19_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO19_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO19_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO19_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO19_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO19_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO19_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO19_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO19_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO19_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO19_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO19_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO19_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_tx +// 0x02 -> uart0_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_1 +// 0x05 -> sio_19 +// 0x06 -> pio0_19 +// 0x07 -> pio1_19 +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_SPI0_TX 0x01 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_UART0_RTS 0x02 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_PWM_B_1 0x04 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_SIO_19 0x05 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_PIO0_19 0x06 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_PIO1_19 0x07 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO19_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO20_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO20_STATUS_OFFSET 0x000000a0 +#define IO_BANK0_GPIO20_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO20_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO20_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO20_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO20_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO20_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO20_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO20_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO20_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO20_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO20_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO20_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO20_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO20_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO20_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO20_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO20_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO20_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO20_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO20_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO20_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO20_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO20_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO20_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO20_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO20_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO20_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO20_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO20_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO20_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO20_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO20_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO20_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO20_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO20_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO20_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO20_CTRL_OFFSET 0x000000a4 +#define IO_BANK0_GPIO20_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO20_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO20_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO20_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO20_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO20_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO20_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO20_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO20_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO20_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO20_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO20_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO20_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO20_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO20_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO20_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO20_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO20_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO20_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO20_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO20_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO20_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO20_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO20_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO20_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO20_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO20_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_rx +// 0x02 -> uart1_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_2 +// 0x05 -> sio_20 +// 0x06 -> pio0_20 +// 0x07 -> pio1_20 +// 0x08 -> clocks_gpin_0 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_SPI0_RX 0x01 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_UART1_TX 0x02 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_PWM_A_2 0x04 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_SIO_20 0x05 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_PIO0_20 0x06 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_PIO1_20 0x07 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_CLOCKS_GPIN_0 0x08 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO20_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO21_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO21_STATUS_OFFSET 0x000000a8 +#define IO_BANK0_GPIO21_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO21_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO21_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO21_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO21_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO21_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO21_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO21_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO21_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO21_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO21_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO21_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO21_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO21_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO21_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO21_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO21_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO21_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO21_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO21_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO21_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO21_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO21_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO21_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO21_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO21_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO21_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO21_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO21_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO21_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO21_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO21_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO21_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO21_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO21_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO21_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO21_CTRL_OFFSET 0x000000ac +#define IO_BANK0_GPIO21_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO21_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO21_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO21_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO21_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO21_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO21_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO21_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO21_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO21_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO21_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO21_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO21_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO21_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO21_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO21_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO21_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO21_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO21_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO21_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO21_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO21_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO21_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO21_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO21_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO21_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO21_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_ss_n +// 0x02 -> uart1_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_2 +// 0x05 -> sio_21 +// 0x06 -> pio0_21 +// 0x07 -> pio1_21 +// 0x08 -> clocks_gpout_0 +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_SPI0_SS_N 0x01 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_UART1_RX 0x02 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_PWM_B_2 0x04 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_SIO_21 0x05 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_PIO0_21 0x06 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_PIO1_21 0x07 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_CLOCKS_GPOUT_0 0x08 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO21_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO22_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO22_STATUS_OFFSET 0x000000b0 +#define IO_BANK0_GPIO22_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO22_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO22_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO22_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO22_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO22_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO22_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO22_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO22_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO22_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO22_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO22_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO22_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO22_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO22_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO22_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO22_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO22_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO22_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO22_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO22_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO22_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO22_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO22_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO22_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO22_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO22_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO22_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO22_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO22_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO22_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO22_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO22_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO22_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO22_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO22_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO22_CTRL_OFFSET 0x000000b4 +#define IO_BANK0_GPIO22_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO22_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO22_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO22_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO22_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO22_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO22_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO22_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO22_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO22_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO22_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO22_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO22_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO22_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO22_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO22_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO22_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO22_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO22_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO22_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO22_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO22_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO22_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO22_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO22_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO22_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO22_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_sclk +// 0x02 -> uart1_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_3 +// 0x05 -> sio_22 +// 0x06 -> pio0_22 +// 0x07 -> pio1_22 +// 0x08 -> clocks_gpin_1 +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_SPI0_SCLK 0x01 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_UART1_CTS 0x02 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_PWM_A_3 0x04 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_SIO_22 0x05 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_PIO0_22 0x06 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_PIO1_22 0x07 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_CLOCKS_GPIN_1 0x08 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO22_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO23_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO23_STATUS_OFFSET 0x000000b8 +#define IO_BANK0_GPIO23_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO23_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO23_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO23_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO23_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO23_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO23_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO23_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO23_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO23_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO23_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO23_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO23_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO23_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO23_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO23_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO23_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO23_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO23_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO23_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO23_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO23_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO23_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO23_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO23_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO23_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO23_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO23_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO23_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO23_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO23_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO23_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO23_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO23_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO23_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO23_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO23_CTRL_OFFSET 0x000000bc +#define IO_BANK0_GPIO23_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO23_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO23_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO23_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO23_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO23_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO23_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO23_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO23_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO23_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO23_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO23_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO23_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO23_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO23_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO23_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO23_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO23_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO23_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO23_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO23_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO23_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO23_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO23_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO23_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO23_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO23_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi0_tx +// 0x02 -> uart1_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_3 +// 0x05 -> sio_23 +// 0x06 -> pio0_23 +// 0x07 -> pio1_23 +// 0x08 -> clocks_gpout_1 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_SPI0_TX 0x01 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_UART1_RTS 0x02 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_PWM_B_3 0x04 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_SIO_23 0x05 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_PIO0_23 0x06 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_PIO1_23 0x07 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_CLOCKS_GPOUT_1 0x08 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO23_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO24_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO24_STATUS_OFFSET 0x000000c0 +#define IO_BANK0_GPIO24_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO24_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO24_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO24_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO24_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO24_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO24_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO24_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO24_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO24_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO24_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO24_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO24_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO24_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO24_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO24_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO24_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO24_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO24_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO24_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO24_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO24_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO24_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO24_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO24_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO24_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO24_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO24_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO24_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO24_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO24_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO24_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO24_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO24_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO24_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO24_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO24_CTRL_OFFSET 0x000000c4 +#define IO_BANK0_GPIO24_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO24_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO24_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO24_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO24_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO24_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO24_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO24_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO24_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO24_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO24_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO24_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO24_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO24_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO24_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO24_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO24_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO24_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO24_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO24_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO24_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO24_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO24_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO24_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO24_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO24_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO24_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_rx +// 0x02 -> uart1_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_4 +// 0x05 -> sio_24 +// 0x06 -> pio0_24 +// 0x07 -> pio1_24 +// 0x08 -> clocks_gpout_2 +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_SPI1_RX 0x01 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_UART1_TX 0x02 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_PWM_A_4 0x04 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_SIO_24 0x05 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_PIO0_24 0x06 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_PIO1_24 0x07 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_CLOCKS_GPOUT_2 0x08 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO24_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO25_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO25_STATUS_OFFSET 0x000000c8 +#define IO_BANK0_GPIO25_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO25_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO25_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO25_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO25_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO25_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO25_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO25_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO25_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO25_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO25_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO25_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO25_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO25_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO25_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO25_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO25_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO25_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO25_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO25_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO25_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO25_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO25_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO25_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO25_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO25_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO25_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO25_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO25_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO25_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO25_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO25_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO25_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO25_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO25_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO25_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO25_CTRL_OFFSET 0x000000cc +#define IO_BANK0_GPIO25_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO25_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO25_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO25_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO25_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO25_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO25_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO25_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO25_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO25_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO25_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO25_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO25_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO25_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO25_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO25_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO25_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO25_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO25_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO25_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO25_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO25_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO25_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO25_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO25_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO25_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO25_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_ss_n +// 0x02 -> uart1_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_4 +// 0x05 -> sio_25 +// 0x06 -> pio0_25 +// 0x07 -> pio1_25 +// 0x08 -> clocks_gpout_3 +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_SPI1_SS_N 0x01 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_UART1_RX 0x02 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_PWM_B_4 0x04 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_SIO_25 0x05 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_PIO0_25 0x06 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_PIO1_25 0x07 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_CLOCKS_GPOUT_3 0x08 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO25_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO26_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO26_STATUS_OFFSET 0x000000d0 +#define IO_BANK0_GPIO26_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO26_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO26_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO26_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO26_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO26_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO26_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO26_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO26_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO26_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO26_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO26_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO26_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO26_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO26_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO26_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO26_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO26_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO26_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO26_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO26_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO26_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO26_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO26_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO26_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO26_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO26_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO26_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO26_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO26_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO26_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO26_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO26_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO26_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO26_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO26_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO26_CTRL_OFFSET 0x000000d4 +#define IO_BANK0_GPIO26_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO26_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO26_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO26_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO26_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO26_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO26_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO26_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO26_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO26_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO26_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO26_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO26_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO26_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO26_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO26_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO26_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO26_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO26_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO26_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO26_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO26_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO26_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO26_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO26_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO26_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO26_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_sclk +// 0x02 -> uart1_cts +// 0x03 -> i2c1_sda +// 0x04 -> pwm_a_5 +// 0x05 -> sio_26 +// 0x06 -> pio0_26 +// 0x07 -> pio1_26 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_SPI1_SCLK 0x01 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_UART1_CTS 0x02 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_I2C1_SDA 0x03 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_PWM_A_5 0x04 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_SIO_26 0x05 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_PIO0_26 0x06 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_PIO1_26 0x07 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO26_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO27_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO27_STATUS_OFFSET 0x000000d8 +#define IO_BANK0_GPIO27_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO27_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO27_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO27_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO27_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO27_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO27_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO27_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO27_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO27_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO27_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO27_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO27_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO27_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO27_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO27_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO27_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO27_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO27_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO27_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO27_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO27_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO27_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO27_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO27_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO27_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO27_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO27_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO27_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO27_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO27_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO27_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO27_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO27_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO27_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO27_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO27_CTRL_OFFSET 0x000000dc +#define IO_BANK0_GPIO27_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO27_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO27_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO27_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO27_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO27_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO27_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO27_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO27_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO27_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO27_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO27_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO27_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO27_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO27_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO27_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO27_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO27_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO27_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO27_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO27_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO27_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO27_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO27_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO27_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO27_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO27_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_tx +// 0x02 -> uart1_rts +// 0x03 -> i2c1_scl +// 0x04 -> pwm_b_5 +// 0x05 -> sio_27 +// 0x06 -> pio0_27 +// 0x07 -> pio1_27 +// 0x09 -> usb_muxing_overcurr_detect +// 0x1f -> null +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_SPI1_TX 0x01 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_UART1_RTS 0x02 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_I2C1_SCL 0x03 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_PWM_B_5 0x04 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_SIO_27 0x05 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_PIO0_27 0x06 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_PIO1_27 0x07 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_USB_MUXING_OVERCURR_DETECT 0x09 +#define IO_BANK0_GPIO27_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO28_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO28_STATUS_OFFSET 0x000000e0 +#define IO_BANK0_GPIO28_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO28_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO28_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO28_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO28_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO28_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO28_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO28_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO28_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO28_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO28_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO28_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO28_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO28_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO28_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO28_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO28_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO28_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO28_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO28_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO28_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO28_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO28_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO28_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO28_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO28_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO28_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO28_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO28_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO28_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO28_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO28_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO28_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO28_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO28_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO28_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO28_CTRL_OFFSET 0x000000e4 +#define IO_BANK0_GPIO28_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO28_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO28_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO28_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO28_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO28_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO28_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO28_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO28_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO28_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO28_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO28_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO28_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO28_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO28_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO28_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO28_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO28_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO28_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO28_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO28_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO28_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO28_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO28_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO28_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO28_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO28_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_rx +// 0x02 -> uart0_tx +// 0x03 -> i2c0_sda +// 0x04 -> pwm_a_6 +// 0x05 -> sio_28 +// 0x06 -> pio0_28 +// 0x07 -> pio1_28 +// 0x09 -> usb_muxing_vbus_detect +// 0x1f -> null +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_SPI1_RX 0x01 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_UART0_TX 0x02 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_I2C0_SDA 0x03 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_PWM_A_6 0x04 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_SIO_28 0x05 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_PIO0_28 0x06 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_PIO1_28 0x07 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_DETECT 0x09 +#define IO_BANK0_GPIO28_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_GPIO29_STATUS +// Description : GPIO status +#define IO_BANK0_GPIO29_STATUS_OFFSET 0x000000e8 +#define IO_BANK0_GPIO29_STATUS_BITS 0x050a3300 +#define IO_BANK0_GPIO29_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_BANK0_GPIO29_STATUS_IRQTOPROC_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_BANK0_GPIO29_STATUS_IRQTOPROC_MSB 26 +#define IO_BANK0_GPIO29_STATUS_IRQTOPROC_LSB 26 +#define IO_BANK0_GPIO29_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_BANK0_GPIO29_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_BANK0_GPIO29_STATUS_IRQFROMPAD_MSB 24 +#define IO_BANK0_GPIO29_STATUS_IRQFROMPAD_LSB 24 +#define IO_BANK0_GPIO29_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_BANK0_GPIO29_STATUS_INTOPERI_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_INTOPERI_BITS 0x00080000 +#define IO_BANK0_GPIO29_STATUS_INTOPERI_MSB 19 +#define IO_BANK0_GPIO29_STATUS_INTOPERI_LSB 19 +#define IO_BANK0_GPIO29_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_BANK0_GPIO29_STATUS_INFROMPAD_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_BANK0_GPIO29_STATUS_INFROMPAD_MSB 17 +#define IO_BANK0_GPIO29_STATUS_INFROMPAD_LSB 17 +#define IO_BANK0_GPIO29_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_BANK0_GPIO29_STATUS_OETOPAD_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_OETOPAD_BITS 0x00002000 +#define IO_BANK0_GPIO29_STATUS_OETOPAD_MSB 13 +#define IO_BANK0_GPIO29_STATUS_OETOPAD_LSB 13 +#define IO_BANK0_GPIO29_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO29_STATUS_OEFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_BANK0_GPIO29_STATUS_OEFROMPERI_MSB 12 +#define IO_BANK0_GPIO29_STATUS_OEFROMPERI_LSB 12 +#define IO_BANK0_GPIO29_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_BANK0_GPIO29_STATUS_OUTTOPAD_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_BANK0_GPIO29_STATUS_OUTTOPAD_MSB 9 +#define IO_BANK0_GPIO29_STATUS_OUTTOPAD_LSB 9 +#define IO_BANK0_GPIO29_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_BANK0_GPIO29_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_BANK0_GPIO29_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_BANK0_GPIO29_STATUS_OUTFROMPERI_MSB 8 +#define IO_BANK0_GPIO29_STATUS_OUTFROMPERI_LSB 8 +#define IO_BANK0_GPIO29_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_GPIO29_CTRL +// Description : GPIO control including function select and overrides. +#define IO_BANK0_GPIO29_CTRL_OFFSET 0x000000ec +#define IO_BANK0_GPIO29_CTRL_BITS 0x3003331f +#define IO_BANK0_GPIO29_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_BANK0_GPIO29_CTRL_IRQOVER_RESET 0x0 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_BITS 0x30000000 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_MSB 29 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_LSB 28 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_ACCESS "RW" +#define IO_BANK0_GPIO29_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO29_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_BANK0_GPIO29_CTRL_INOVER_RESET 0x0 +#define IO_BANK0_GPIO29_CTRL_INOVER_BITS 0x00030000 +#define IO_BANK0_GPIO29_CTRL_INOVER_MSB 17 +#define IO_BANK0_GPIO29_CTRL_INOVER_LSB 16 +#define IO_BANK0_GPIO29_CTRL_INOVER_ACCESS "RW" +#define IO_BANK0_GPIO29_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO29_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO29_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO29_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_BANK0_GPIO29_CTRL_OEOVER_RESET 0x0 +#define IO_BANK0_GPIO29_CTRL_OEOVER_BITS 0x00003000 +#define IO_BANK0_GPIO29_CTRL_OEOVER_MSB 13 +#define IO_BANK0_GPIO29_CTRL_OEOVER_LSB 12 +#define IO_BANK0_GPIO29_CTRL_OEOVER_ACCESS "RW" +#define IO_BANK0_GPIO29_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO29_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO29_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_BANK0_GPIO29_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_BANK0_GPIO29_CTRL_OUTOVER_RESET 0x0 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_BITS 0x00000300 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_MSB 9 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_LSB 8 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_ACCESS "RW" +#define IO_BANK0_GPIO29_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_BANK0_GPIO29_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_GPIO29_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x01 -> spi1_ss_n +// 0x02 -> uart0_rx +// 0x03 -> i2c0_scl +// 0x04 -> pwm_b_6 +// 0x05 -> sio_29 +// 0x06 -> pio0_29 +// 0x07 -> pio1_29 +// 0x09 -> usb_muxing_vbus_en +// 0x1f -> null +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_RESET 0x1f +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_MSB 4 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_LSB 0 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_ACCESS "RW" +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_SPI1_SS_N 0x01 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_UART0_RX 0x02 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_I2C0_SCL 0x03 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_PWM_B_6 0x04 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_SIO_29 0x05 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_PIO0_29 0x06 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_PIO1_29 0x07 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_USB_MUXING_VBUS_EN 0x09 +#define IO_BANK0_GPIO29_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_BANK0_INTR0 +// Description : Raw Interrupts +#define IO_BANK0_INTR0_OFFSET 0x000000f0 +#define IO_BANK0_INTR0_BITS 0xffffffff +#define IO_BANK0_INTR0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_INTR0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_INTR0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_INTR0_GPIO7_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_INTR0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_INTR0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_INTR0_GPIO7_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_INTR0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_INTR0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_INTR0_GPIO7_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_INTR0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_INTR0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_INTR0_GPIO7_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_INTR0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_INTR0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_INTR0_GPIO6_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_INTR0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_INTR0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_INTR0_GPIO6_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_INTR0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_INTR0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_INTR0_GPIO6_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_INTR0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_INTR0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_INTR0_GPIO6_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_INTR0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_INTR0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_INTR0_GPIO5_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_INTR0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_INTR0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_INTR0_GPIO5_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_INTR0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_INTR0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_INTR0_GPIO5_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_INTR0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_INTR0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_INTR0_GPIO5_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_INTR0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_INTR0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_INTR0_GPIO4_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_INTR0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_INTR0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_INTR0_GPIO4_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_INTR0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_INTR0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_INTR0_GPIO4_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_INTR0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_INTR0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_INTR0_GPIO4_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_INTR0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_INTR0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_INTR0_GPIO3_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_INTR0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_INTR0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_INTR0_GPIO3_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_INTR0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_INTR0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_INTR0_GPIO3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_INTR0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_INTR0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_INTR0_GPIO3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_INTR0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_INTR0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_INTR0_GPIO2_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_INTR0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_INTR0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_INTR0_GPIO2_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_INTR0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_INTR0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_INTR0_GPIO2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_INTR0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_INTR0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_INTR0_GPIO2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_INTR0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_INTR0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_INTR0_GPIO1_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_INTR0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_INTR0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_INTR0_GPIO1_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_INTR0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_INTR0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_INTR0_GPIO1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_INTR0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_INTR0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_INTR0_GPIO1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_INTR0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_INTR0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_INTR0_GPIO0_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_INTR0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_INTR0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_INTR0_GPIO0_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_INTR0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_INTR0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_INTR0_GPIO0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_INTR0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_INTR0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_INTR0_GPIO0_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_INTR1 +// Description : Raw Interrupts +#define IO_BANK0_INTR1_OFFSET 0x000000f4 +#define IO_BANK0_INTR1_BITS 0xffffffff +#define IO_BANK0_INTR1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_INTR1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_INTR1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_INTR1_GPIO15_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_INTR1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_INTR1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_INTR1_GPIO15_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_INTR1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_INTR1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_INTR1_GPIO15_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_INTR1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_INTR1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_INTR1_GPIO15_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_INTR1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_INTR1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_INTR1_GPIO14_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_INTR1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_INTR1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_INTR1_GPIO14_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_INTR1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_INTR1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_INTR1_GPIO14_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_INTR1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_INTR1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_INTR1_GPIO14_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_INTR1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_INTR1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_INTR1_GPIO13_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_INTR1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_INTR1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_INTR1_GPIO13_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_INTR1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_INTR1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_INTR1_GPIO13_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_INTR1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_INTR1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_INTR1_GPIO13_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_INTR1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_INTR1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_INTR1_GPIO12_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_INTR1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_INTR1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_INTR1_GPIO12_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_INTR1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_INTR1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_INTR1_GPIO12_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_INTR1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_INTR1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_INTR1_GPIO12_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_INTR1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_INTR1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_INTR1_GPIO11_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_INTR1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_INTR1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_INTR1_GPIO11_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_INTR1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_INTR1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_INTR1_GPIO11_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_INTR1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_INTR1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_INTR1_GPIO11_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_INTR1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_INTR1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_INTR1_GPIO10_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_INTR1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_INTR1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_INTR1_GPIO10_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_INTR1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_INTR1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_INTR1_GPIO10_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_INTR1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_INTR1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_INTR1_GPIO10_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_INTR1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_INTR1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_INTR1_GPIO9_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_INTR1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_INTR1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_INTR1_GPIO9_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_INTR1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_INTR1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_INTR1_GPIO9_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_INTR1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_INTR1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_INTR1_GPIO9_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_INTR1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_INTR1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_INTR1_GPIO8_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_INTR1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_INTR1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_INTR1_GPIO8_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_INTR1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_INTR1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_INTR1_GPIO8_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_INTR1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_INTR1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_INTR1_GPIO8_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_INTR2 +// Description : Raw Interrupts +#define IO_BANK0_INTR2_OFFSET 0x000000f8 +#define IO_BANK0_INTR2_BITS 0xffffffff +#define IO_BANK0_INTR2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_INTR2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_INTR2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_INTR2_GPIO23_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_INTR2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_INTR2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_INTR2_GPIO23_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_INTR2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_INTR2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_INTR2_GPIO23_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_INTR2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_INTR2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_INTR2_GPIO23_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_INTR2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_INTR2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_INTR2_GPIO22_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_INTR2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_INTR2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_INTR2_GPIO22_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_INTR2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_INTR2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_INTR2_GPIO22_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_INTR2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_INTR2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_INTR2_GPIO22_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_INTR2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_INTR2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_INTR2_GPIO21_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_INTR2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_INTR2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_INTR2_GPIO21_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_INTR2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_INTR2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_INTR2_GPIO21_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_INTR2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_INTR2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_INTR2_GPIO21_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_INTR2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_INTR2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_INTR2_GPIO20_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_INTR2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_INTR2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_INTR2_GPIO20_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_INTR2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_INTR2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_INTR2_GPIO20_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_INTR2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_INTR2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_INTR2_GPIO20_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_INTR2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_INTR2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_INTR2_GPIO19_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_INTR2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_INTR2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_INTR2_GPIO19_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_INTR2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_INTR2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_INTR2_GPIO19_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_INTR2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_INTR2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_INTR2_GPIO19_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_INTR2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_INTR2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_INTR2_GPIO18_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_INTR2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_INTR2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_INTR2_GPIO18_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_INTR2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_INTR2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_INTR2_GPIO18_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_INTR2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_INTR2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_INTR2_GPIO18_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_INTR2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_INTR2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_INTR2_GPIO17_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_INTR2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_INTR2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_INTR2_GPIO17_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_INTR2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_INTR2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_INTR2_GPIO17_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_INTR2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_INTR2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_INTR2_GPIO17_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_INTR2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_INTR2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_INTR2_GPIO16_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_INTR2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_INTR2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_INTR2_GPIO16_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_INTR2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_INTR2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_INTR2_GPIO16_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_INTR2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_INTR2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_INTR2_GPIO16_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_INTR3 +// Description : Raw Interrupts +#define IO_BANK0_INTR3_OFFSET 0x000000fc +#define IO_BANK0_INTR3_BITS 0x00ffffff +#define IO_BANK0_INTR3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_INTR3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_INTR3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_INTR3_GPIO29_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_INTR3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_INTR3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_INTR3_GPIO29_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_INTR3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_INTR3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_INTR3_GPIO29_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_INTR3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_INTR3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_INTR3_GPIO29_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_INTR3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_INTR3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_INTR3_GPIO28_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_INTR3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_INTR3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_INTR3_GPIO28_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_INTR3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_INTR3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_INTR3_GPIO28_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_INTR3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_INTR3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_INTR3_GPIO28_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_INTR3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_INTR3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_INTR3_GPIO27_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_INTR3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_INTR3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_INTR3_GPIO27_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_INTR3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_INTR3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_INTR3_GPIO27_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_INTR3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_INTR3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_INTR3_GPIO27_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_INTR3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_INTR3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_INTR3_GPIO26_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_INTR3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_INTR3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_INTR3_GPIO26_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_INTR3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_INTR3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_INTR3_GPIO26_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_INTR3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_INTR3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_INTR3_GPIO26_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_INTR3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_INTR3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_INTR3_GPIO25_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_INTR3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_INTR3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_INTR3_GPIO25_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_INTR3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_INTR3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_INTR3_GPIO25_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_INTR3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_INTR3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_INTR3_GPIO25_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_INTR3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_INTR3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_INTR3_GPIO24_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_INTR3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_INTR3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_INTR3_GPIO24_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_INTR3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_INTR3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_INTR3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_INTR3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_INTR3_GPIO24_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_INTR3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_INTR3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_INTR3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_INTR3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_INTR3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_INTR3_GPIO24_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTE0 +// Description : Interrupt Enable for proc0 +#define IO_BANK0_PROC0_INTE0_OFFSET 0x00000100 +#define IO_BANK0_PROC0_INTE0_BITS 0xffffffff +#define IO_BANK0_PROC0_INTE0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTE0_GPIO7_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTE0_GPIO7_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTE0_GPIO6_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTE0_GPIO6_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTE0_GPIO5_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTE0_GPIO5_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTE0_GPIO4_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTE0_GPIO4_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTE0_GPIO3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTE0_GPIO3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTE0_GPIO2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTE0_GPIO2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTE0_GPIO1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTE0_GPIO1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTE0_GPIO0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTE0_GPIO0_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTE1 +// Description : Interrupt Enable for proc0 +#define IO_BANK0_PROC0_INTE1_OFFSET 0x00000104 +#define IO_BANK0_PROC0_INTE1_BITS 0xffffffff +#define IO_BANK0_PROC0_INTE1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTE1_GPIO15_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTE1_GPIO15_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTE1_GPIO14_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTE1_GPIO14_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTE1_GPIO13_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTE1_GPIO13_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTE1_GPIO12_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTE1_GPIO12_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTE1_GPIO11_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTE1_GPIO11_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTE1_GPIO10_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTE1_GPIO10_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTE1_GPIO9_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTE1_GPIO9_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTE1_GPIO8_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTE1_GPIO8_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTE2 +// Description : Interrupt Enable for proc0 +#define IO_BANK0_PROC0_INTE2_OFFSET 0x00000108 +#define IO_BANK0_PROC0_INTE2_BITS 0xffffffff +#define IO_BANK0_PROC0_INTE2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTE2_GPIO23_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTE2_GPIO23_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTE2_GPIO22_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTE2_GPIO22_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTE2_GPIO21_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTE2_GPIO21_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTE2_GPIO20_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTE2_GPIO20_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTE2_GPIO19_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTE2_GPIO19_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTE2_GPIO18_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTE2_GPIO18_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTE2_GPIO17_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTE2_GPIO17_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTE2_GPIO16_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTE2_GPIO16_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTE3 +// Description : Interrupt Enable for proc0 +#define IO_BANK0_PROC0_INTE3_OFFSET 0x0000010c +#define IO_BANK0_PROC0_INTE3_BITS 0x00ffffff +#define IO_BANK0_PROC0_INTE3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTE3_GPIO29_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTE3_GPIO29_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTE3_GPIO28_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTE3_GPIO28_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTE3_GPIO27_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTE3_GPIO27_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTE3_GPIO26_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTE3_GPIO26_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTE3_GPIO25_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTE3_GPIO25_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTE3_GPIO24_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTE3_GPIO24_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTF0 +// Description : Interrupt Force for proc0 +#define IO_BANK0_PROC0_INTF0_OFFSET 0x00000110 +#define IO_BANK0_PROC0_INTF0_BITS 0xffffffff +#define IO_BANK0_PROC0_INTF0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTF0_GPIO7_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTF0_GPIO7_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTF0_GPIO6_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTF0_GPIO6_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTF0_GPIO5_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTF0_GPIO5_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTF0_GPIO4_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTF0_GPIO4_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTF0_GPIO3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTF0_GPIO3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTF0_GPIO2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTF0_GPIO2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTF0_GPIO1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTF0_GPIO1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTF0_GPIO0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTF0_GPIO0_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTF1 +// Description : Interrupt Force for proc0 +#define IO_BANK0_PROC0_INTF1_OFFSET 0x00000114 +#define IO_BANK0_PROC0_INTF1_BITS 0xffffffff +#define IO_BANK0_PROC0_INTF1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTF1_GPIO15_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTF1_GPIO15_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTF1_GPIO14_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTF1_GPIO14_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTF1_GPIO13_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTF1_GPIO13_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTF1_GPIO12_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTF1_GPIO12_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTF1_GPIO11_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTF1_GPIO11_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTF1_GPIO10_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTF1_GPIO10_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTF1_GPIO9_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTF1_GPIO9_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTF1_GPIO8_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTF1_GPIO8_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTF2 +// Description : Interrupt Force for proc0 +#define IO_BANK0_PROC0_INTF2_OFFSET 0x00000118 +#define IO_BANK0_PROC0_INTF2_BITS 0xffffffff +#define IO_BANK0_PROC0_INTF2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTF2_GPIO23_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTF2_GPIO23_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTF2_GPIO22_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTF2_GPIO22_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTF2_GPIO21_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTF2_GPIO21_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTF2_GPIO20_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTF2_GPIO20_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTF2_GPIO19_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTF2_GPIO19_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTF2_GPIO18_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTF2_GPIO18_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTF2_GPIO17_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTF2_GPIO17_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTF2_GPIO16_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTF2_GPIO16_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTF3 +// Description : Interrupt Force for proc0 +#define IO_BANK0_PROC0_INTF3_OFFSET 0x0000011c +#define IO_BANK0_PROC0_INTF3_BITS 0x00ffffff +#define IO_BANK0_PROC0_INTF3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTF3_GPIO29_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTF3_GPIO29_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTF3_GPIO28_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTF3_GPIO28_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTF3_GPIO27_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTF3_GPIO27_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTF3_GPIO26_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTF3_GPIO26_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTF3_GPIO25_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTF3_GPIO25_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTF3_GPIO24_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTF3_GPIO24_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTS0 +// Description : Interrupt status after masking & forcing for proc0 +#define IO_BANK0_PROC0_INTS0_OFFSET 0x00000120 +#define IO_BANK0_PROC0_INTS0_BITS 0xffffffff +#define IO_BANK0_PROC0_INTS0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTS0_GPIO7_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTS0_GPIO7_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTS0_GPIO6_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTS0_GPIO6_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTS0_GPIO5_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTS0_GPIO5_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTS0_GPIO4_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTS0_GPIO4_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTS0_GPIO3_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTS0_GPIO3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTS0_GPIO2_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTS0_GPIO2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTS0_GPIO1_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTS0_GPIO1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTS0_GPIO0_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTS0_GPIO0_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTS1 +// Description : Interrupt status after masking & forcing for proc0 +#define IO_BANK0_PROC0_INTS1_OFFSET 0x00000124 +#define IO_BANK0_PROC0_INTS1_BITS 0xffffffff +#define IO_BANK0_PROC0_INTS1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTS1_GPIO15_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTS1_GPIO15_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTS1_GPIO14_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTS1_GPIO14_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTS1_GPIO13_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTS1_GPIO13_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTS1_GPIO12_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTS1_GPIO12_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTS1_GPIO11_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTS1_GPIO11_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTS1_GPIO10_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTS1_GPIO10_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTS1_GPIO9_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTS1_GPIO9_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTS1_GPIO8_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTS1_GPIO8_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTS2 +// Description : Interrupt status after masking & forcing for proc0 +#define IO_BANK0_PROC0_INTS2_OFFSET 0x00000128 +#define IO_BANK0_PROC0_INTS2_BITS 0xffffffff +#define IO_BANK0_PROC0_INTS2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC0_INTS2_GPIO23_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC0_INTS2_GPIO23_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC0_INTS2_GPIO22_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC0_INTS2_GPIO22_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTS2_GPIO21_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTS2_GPIO21_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTS2_GPIO20_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTS2_GPIO20_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTS2_GPIO19_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTS2_GPIO19_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTS2_GPIO18_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTS2_GPIO18_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTS2_GPIO17_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTS2_GPIO17_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTS2_GPIO16_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTS2_GPIO16_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC0_INTS3 +// Description : Interrupt status after masking & forcing for proc0 +#define IO_BANK0_PROC0_INTS3_OFFSET 0x0000012c +#define IO_BANK0_PROC0_INTS3_BITS 0x00ffffff +#define IO_BANK0_PROC0_INTS3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC0_INTS3_GPIO29_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC0_INTS3_GPIO29_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC0_INTS3_GPIO28_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC0_INTS3_GPIO28_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC0_INTS3_GPIO27_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC0_INTS3_GPIO27_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC0_INTS3_GPIO26_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC0_INTS3_GPIO26_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC0_INTS3_GPIO25_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC0_INTS3_GPIO25_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC0_INTS3_GPIO24_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC0_INTS3_GPIO24_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTE0 +// Description : Interrupt Enable for proc1 +#define IO_BANK0_PROC1_INTE0_OFFSET 0x00000130 +#define IO_BANK0_PROC1_INTE0_BITS 0xffffffff +#define IO_BANK0_PROC1_INTE0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTE0_GPIO7_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTE0_GPIO7_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTE0_GPIO6_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTE0_GPIO6_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTE0_GPIO5_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTE0_GPIO5_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTE0_GPIO4_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTE0_GPIO4_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTE0_GPIO3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTE0_GPIO3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTE0_GPIO2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTE0_GPIO2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTE0_GPIO1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTE0_GPIO1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTE0_GPIO0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTE0_GPIO0_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTE1 +// Description : Interrupt Enable for proc1 +#define IO_BANK0_PROC1_INTE1_OFFSET 0x00000134 +#define IO_BANK0_PROC1_INTE1_BITS 0xffffffff +#define IO_BANK0_PROC1_INTE1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTE1_GPIO15_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTE1_GPIO15_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTE1_GPIO14_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTE1_GPIO14_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTE1_GPIO13_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTE1_GPIO13_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTE1_GPIO12_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTE1_GPIO12_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTE1_GPIO11_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTE1_GPIO11_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTE1_GPIO10_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTE1_GPIO10_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTE1_GPIO9_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTE1_GPIO9_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTE1_GPIO8_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTE1_GPIO8_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTE2 +// Description : Interrupt Enable for proc1 +#define IO_BANK0_PROC1_INTE2_OFFSET 0x00000138 +#define IO_BANK0_PROC1_INTE2_BITS 0xffffffff +#define IO_BANK0_PROC1_INTE2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTE2_GPIO23_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTE2_GPIO23_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTE2_GPIO22_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTE2_GPIO22_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTE2_GPIO21_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTE2_GPIO21_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTE2_GPIO20_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTE2_GPIO20_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTE2_GPIO19_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTE2_GPIO19_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTE2_GPIO18_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTE2_GPIO18_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTE2_GPIO17_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTE2_GPIO17_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTE2_GPIO16_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTE2_GPIO16_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTE3 +// Description : Interrupt Enable for proc1 +#define IO_BANK0_PROC1_INTE3_OFFSET 0x0000013c +#define IO_BANK0_PROC1_INTE3_BITS 0x00ffffff +#define IO_BANK0_PROC1_INTE3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTE3_GPIO29_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTE3_GPIO29_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTE3_GPIO28_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTE3_GPIO28_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTE3_GPIO27_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTE3_GPIO27_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTE3_GPIO26_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTE3_GPIO26_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTE3_GPIO25_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTE3_GPIO25_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTE3_GPIO24_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTE3_GPIO24_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTF0 +// Description : Interrupt Force for proc1 +#define IO_BANK0_PROC1_INTF0_OFFSET 0x00000140 +#define IO_BANK0_PROC1_INTF0_BITS 0xffffffff +#define IO_BANK0_PROC1_INTF0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTF0_GPIO7_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTF0_GPIO7_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTF0_GPIO6_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTF0_GPIO6_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTF0_GPIO5_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTF0_GPIO5_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTF0_GPIO4_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTF0_GPIO4_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTF0_GPIO3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTF0_GPIO3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTF0_GPIO2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTF0_GPIO2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTF0_GPIO1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTF0_GPIO1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTF0_GPIO0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTF0_GPIO0_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTF1 +// Description : Interrupt Force for proc1 +#define IO_BANK0_PROC1_INTF1_OFFSET 0x00000144 +#define IO_BANK0_PROC1_INTF1_BITS 0xffffffff +#define IO_BANK0_PROC1_INTF1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTF1_GPIO15_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTF1_GPIO15_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTF1_GPIO14_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTF1_GPIO14_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTF1_GPIO13_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTF1_GPIO13_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTF1_GPIO12_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTF1_GPIO12_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTF1_GPIO11_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTF1_GPIO11_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTF1_GPIO10_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTF1_GPIO10_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTF1_GPIO9_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTF1_GPIO9_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTF1_GPIO8_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTF1_GPIO8_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTF2 +// Description : Interrupt Force for proc1 +#define IO_BANK0_PROC1_INTF2_OFFSET 0x00000148 +#define IO_BANK0_PROC1_INTF2_BITS 0xffffffff +#define IO_BANK0_PROC1_INTF2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTF2_GPIO23_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTF2_GPIO23_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTF2_GPIO22_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTF2_GPIO22_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTF2_GPIO21_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTF2_GPIO21_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTF2_GPIO20_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTF2_GPIO20_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTF2_GPIO19_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTF2_GPIO19_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTF2_GPIO18_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTF2_GPIO18_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTF2_GPIO17_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTF2_GPIO17_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTF2_GPIO16_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTF2_GPIO16_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTF3 +// Description : Interrupt Force for proc1 +#define IO_BANK0_PROC1_INTF3_OFFSET 0x0000014c +#define IO_BANK0_PROC1_INTF3_BITS 0x00ffffff +#define IO_BANK0_PROC1_INTF3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTF3_GPIO29_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTF3_GPIO29_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTF3_GPIO28_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTF3_GPIO28_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTF3_GPIO27_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTF3_GPIO27_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTF3_GPIO26_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTF3_GPIO26_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTF3_GPIO25_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTF3_GPIO25_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTF3_GPIO24_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTF3_GPIO24_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTS0 +// Description : Interrupt status after masking & forcing for proc1 +#define IO_BANK0_PROC1_INTS0_OFFSET 0x00000150 +#define IO_BANK0_PROC1_INTS0_BITS 0xffffffff +#define IO_BANK0_PROC1_INTS0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTS0_GPIO7_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTS0_GPIO7_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTS0_GPIO6_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTS0_GPIO6_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTS0_GPIO5_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTS0_GPIO5_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTS0_GPIO4_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTS0_GPIO4_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTS0_GPIO3_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTS0_GPIO3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTS0_GPIO2_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTS0_GPIO2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTS0_GPIO1_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTS0_GPIO1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTS0_GPIO0_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTS0_GPIO0_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTS1 +// Description : Interrupt status after masking & forcing for proc1 +#define IO_BANK0_PROC1_INTS1_OFFSET 0x00000154 +#define IO_BANK0_PROC1_INTS1_BITS 0xffffffff +#define IO_BANK0_PROC1_INTS1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTS1_GPIO15_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTS1_GPIO15_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTS1_GPIO14_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTS1_GPIO14_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTS1_GPIO13_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTS1_GPIO13_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTS1_GPIO12_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTS1_GPIO12_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTS1_GPIO11_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTS1_GPIO11_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTS1_GPIO10_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTS1_GPIO10_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTS1_GPIO9_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTS1_GPIO9_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTS1_GPIO8_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTS1_GPIO8_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTS2 +// Description : Interrupt status after masking & forcing for proc1 +#define IO_BANK0_PROC1_INTS2_OFFSET 0x00000158 +#define IO_BANK0_PROC1_INTS2_BITS 0xffffffff +#define IO_BANK0_PROC1_INTS2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_PROC1_INTS2_GPIO23_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_PROC1_INTS2_GPIO23_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_PROC1_INTS2_GPIO22_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_PROC1_INTS2_GPIO22_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTS2_GPIO21_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTS2_GPIO21_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTS2_GPIO20_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTS2_GPIO20_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTS2_GPIO19_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTS2_GPIO19_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTS2_GPIO18_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTS2_GPIO18_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTS2_GPIO17_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTS2_GPIO17_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTS2_GPIO16_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTS2_GPIO16_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_PROC1_INTS3 +// Description : Interrupt status after masking & forcing for proc1 +#define IO_BANK0_PROC1_INTS3_OFFSET 0x0000015c +#define IO_BANK0_PROC1_INTS3_BITS 0x00ffffff +#define IO_BANK0_PROC1_INTS3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_PROC1_INTS3_GPIO29_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_PROC1_INTS3_GPIO29_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_PROC1_INTS3_GPIO28_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_PROC1_INTS3_GPIO28_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_PROC1_INTS3_GPIO27_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_PROC1_INTS3_GPIO27_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_PROC1_INTS3_GPIO26_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_PROC1_INTS3_GPIO26_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_PROC1_INTS3_GPIO25_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_PROC1_INTS3_GPIO25_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_PROC1_INTS3_GPIO24_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_PROC1_INTS3_GPIO24_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTE0 +// Description : Interrupt Enable for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTE0_OFFSET 0x00000160 +#define IO_BANK0_DORMANT_WAKE_INTE0_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTE0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO7_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO6_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO5_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO4_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTE1 +// Description : Interrupt Enable for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTE1_OFFSET 0x00000164 +#define IO_BANK0_DORMANT_WAKE_INTE1_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTE1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO15_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO14_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO13_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO12_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO11_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO10_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO9_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE1_GPIO8_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTE2 +// Description : Interrupt Enable for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTE2_OFFSET 0x00000168 +#define IO_BANK0_DORMANT_WAKE_INTE2_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTE2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO23_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO22_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO21_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO20_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO19_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO18_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO17_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE2_GPIO16_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTE3 +// Description : Interrupt Enable for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTE3_OFFSET 0x0000016c +#define IO_BANK0_DORMANT_WAKE_INTE3_BITS 0x00ffffff +#define IO_BANK0_DORMANT_WAKE_INTE3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO29_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO28_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO27_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO26_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO25_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTE3_GPIO24_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTF0 +// Description : Interrupt Force for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTF0_OFFSET 0x00000170 +#define IO_BANK0_DORMANT_WAKE_INTF0_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTF0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO7_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO6_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO5_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO4_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF0_GPIO0_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTF1 +// Description : Interrupt Force for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTF1_OFFSET 0x00000174 +#define IO_BANK0_DORMANT_WAKE_INTF1_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTF1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO15_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO14_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO13_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO12_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO11_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO10_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO9_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF1_GPIO8_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTF2 +// Description : Interrupt Force for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTF2_OFFSET 0x00000178 +#define IO_BANK0_DORMANT_WAKE_INTF2_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTF2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO23_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO22_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO21_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO20_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO19_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO18_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO17_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF2_GPIO16_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTF3 +// Description : Interrupt Force for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTF3_OFFSET 0x0000017c +#define IO_BANK0_DORMANT_WAKE_INTF3_BITS 0x00ffffff +#define IO_BANK0_DORMANT_WAKE_INTF3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO29_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO28_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO27_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO26_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO25_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTF3_GPIO24_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTS0 +// Description : Interrupt status after masking & forcing for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTS0_OFFSET 0x00000180 +#define IO_BANK0_DORMANT_WAKE_INTS0_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTS0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO7_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO6_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO5_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO4_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS0_GPIO0_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTS1 +// Description : Interrupt status after masking & forcing for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTS1_OFFSET 0x00000184 +#define IO_BANK0_DORMANT_WAKE_INTS1_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTS1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO15_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO14_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO13_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO12_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO11_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO10_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO9_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS1_GPIO8_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTS2 +// Description : Interrupt status after masking & forcing for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTS2_OFFSET 0x00000188 +#define IO_BANK0_DORMANT_WAKE_INTS2_BITS 0xffffffff +#define IO_BANK0_DORMANT_WAKE_INTS2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_HIGH_BITS 0x80000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_HIGH_MSB 31 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_HIGH_LSB 31 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_LOW_BITS 0x40000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_LOW_MSB 30 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_LOW_LSB 30 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_HIGH_BITS 0x20000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_HIGH_MSB 29 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_HIGH_LSB 29 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_LOW_BITS 0x10000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_LOW_MSB 28 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_LOW_LSB 28 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO23_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_HIGH_BITS 0x08000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_HIGH_MSB 27 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_HIGH_LSB 27 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_LOW_BITS 0x04000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_LOW_MSB 26 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_LOW_LSB 26 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_HIGH_BITS 0x02000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_HIGH_MSB 25 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_HIGH_LSB 25 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_LOW_BITS 0x01000000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_LOW_MSB 24 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_LOW_LSB 24 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO22_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO21_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO20_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO19_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO18_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO17_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS2_GPIO16_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_BANK0_DORMANT_WAKE_INTS3 +// Description : Interrupt status after masking & forcing for dormant_wake +#define IO_BANK0_DORMANT_WAKE_INTS3_OFFSET 0x0000018c +#define IO_BANK0_DORMANT_WAKE_INTS3_BITS 0x00ffffff +#define IO_BANK0_DORMANT_WAKE_INTS3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_HIGH_BITS 0x00800000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_HIGH_MSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_HIGH_LSB 23 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_LOW_BITS 0x00400000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_LOW_MSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_LOW_LSB 22 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_HIGH_BITS 0x00200000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_HIGH_MSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_HIGH_LSB 21 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_LOW_BITS 0x00100000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_LOW_MSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_LOW_LSB 20 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO29_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_HIGH_BITS 0x00080000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_HIGH_MSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_HIGH_LSB 19 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_LOW_BITS 0x00040000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_LOW_MSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_LOW_LSB 18 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_HIGH_BITS 0x00020000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_HIGH_MSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_HIGH_LSB 17 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_LOW_BITS 0x00010000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_LOW_MSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_LOW_LSB 16 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO28_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_HIGH_BITS 0x00008000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_HIGH_MSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_HIGH_LSB 15 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_LOW_BITS 0x00004000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_LOW_MSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_LOW_LSB 14 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_HIGH_BITS 0x00002000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_HIGH_MSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_HIGH_LSB 13 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_LOW_BITS 0x00001000 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_LOW_MSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_LOW_LSB 12 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO27_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_HIGH_BITS 0x00000800 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_HIGH_MSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_HIGH_LSB 11 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_LOW_BITS 0x00000400 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_LOW_MSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_LOW_LSB 10 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_HIGH_BITS 0x00000200 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_HIGH_MSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_HIGH_LSB 9 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_LOW_BITS 0x00000100 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_LOW_MSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_LOW_LSB 8 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO26_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_HIGH_BITS 0x00000080 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_HIGH_MSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_HIGH_LSB 7 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_LOW_BITS 0x00000040 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_LOW_MSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_LOW_LSB 6 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_HIGH_BITS 0x00000020 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_HIGH_MSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_HIGH_LSB 5 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_LOW_BITS 0x00000010 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_LOW_MSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_LOW_LSB 4 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO25_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_HIGH_BITS 0x00000008 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_HIGH_MSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_HIGH_LSB 3 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_LOW_BITS 0x00000004 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_LOW_MSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_LOW_LSB 2 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_HIGH +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_HIGH_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_HIGH_BITS 0x00000002 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_HIGH_MSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_HIGH_LSB 1 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_LOW +// Description : None +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_LOW_RESET 0x0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_LOW_BITS 0x00000001 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_LOW_MSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_LOW_LSB 0 +#define IO_BANK0_DORMANT_WAKE_INTS3_GPIO24_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_IO_BANK0_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_qspi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_qspi.h new file mode 100644 index 0000000000..0c7c88d532 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/io_qspi.h @@ -0,0 +1,2931 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : IO_QSPI +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_IO_QSPI_DEFINED +#define HARDWARE_REGS_IO_QSPI_DEFINED +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SCLK_STATUS +// Description : GPIO status +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OFFSET 0x00000000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_BITS 0x050a3300 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQTOPROC_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQTOPROC_MSB 26 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQTOPROC_LSB 26 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQFROMPAD_MSB 24 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQFROMPAD_LSB 24 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INTOPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INTOPERI_BITS 0x00080000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INTOPERI_MSB 19 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INTOPERI_LSB 19 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INFROMPAD_MSB 17 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INFROMPAD_LSB 17 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OETOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OETOPAD_BITS 0x00002000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OETOPAD_MSB 13 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OETOPAD_LSB 13 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OEFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OEFROMPERI_MSB 12 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OEFROMPERI_LSB 12 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTTOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTTOPAD_MSB 9 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTTOPAD_LSB 9 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTFROMPERI_MSB 8 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTFROMPERI_LSB 8 +#define IO_QSPI_GPIO_QSPI_SCLK_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SCLK_CTRL +// Description : GPIO control including function select and overrides. +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OFFSET 0x00000004 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_BITS 0x3003331f +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_BITS 0x30000000 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_MSB 29 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_LSB 28 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_BITS 0x00030000 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_MSB 17 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_LSB 16 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_BITS 0x00003000 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_MSB 13 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_LSB 12 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_BITS 0x00000300 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_MSB 9 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_LSB 8 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> xip_sclk +// 0x05 -> sio_30 +// 0x1f -> null +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_RESET 0x1f +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_MSB 4 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_LSB 0 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_VALUE_XIP_SCLK 0x00 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_VALUE_SIO_30 0x05 +#define IO_QSPI_GPIO_QSPI_SCLK_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SS_STATUS +// Description : GPIO status +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OFFSET 0x00000008 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_BITS 0x050a3300 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQTOPROC_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQTOPROC_MSB 26 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQTOPROC_LSB 26 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQFROMPAD_MSB 24 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQFROMPAD_LSB 24 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INTOPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INTOPERI_BITS 0x00080000 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INTOPERI_MSB 19 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INTOPERI_LSB 19 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INFROMPAD_MSB 17 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INFROMPAD_LSB 17 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OETOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OETOPAD_BITS 0x00002000 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OETOPAD_MSB 13 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OETOPAD_LSB 13 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OEFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OEFROMPERI_MSB 12 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OEFROMPERI_LSB 12 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTTOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTTOPAD_MSB 9 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTTOPAD_LSB 9 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTFROMPERI_MSB 8 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTFROMPERI_LSB 8 +#define IO_QSPI_GPIO_QSPI_SS_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SS_CTRL +// Description : GPIO control including function select and overrides. +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OFFSET 0x0000000c +#define IO_QSPI_GPIO_QSPI_SS_CTRL_BITS 0x3003331f +#define IO_QSPI_GPIO_QSPI_SS_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_BITS 0x30000000 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_MSB 29 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_LSB 28 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_BITS 0x00030000 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_MSB 17 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_LSB 16 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_BITS 0x00003000 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_MSB 13 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_LSB 12 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_BITS 0x00000300 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_MSB 9 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_LSB 8 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> xip_ss_n +// 0x05 -> sio_31 +// 0x1f -> null +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_RESET 0x1f +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_MSB 4 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_LSB 0 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_VALUE_XIP_SS_N 0x00 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_VALUE_SIO_31 0x05 +#define IO_QSPI_GPIO_QSPI_SS_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD0_STATUS +// Description : GPIO status +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OFFSET 0x00000010 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_BITS 0x050a3300 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQTOPROC_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQTOPROC_MSB 26 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQTOPROC_LSB 26 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQFROMPAD_MSB 24 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQFROMPAD_LSB 24 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INTOPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INTOPERI_BITS 0x00080000 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INTOPERI_MSB 19 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INTOPERI_LSB 19 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INFROMPAD_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INFROMPAD_LSB 17 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OETOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OETOPAD_BITS 0x00002000 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OETOPAD_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OETOPAD_LSB 13 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OEFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OEFROMPERI_MSB 12 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OEFROMPERI_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTTOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTTOPAD_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTTOPAD_LSB 9 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTFROMPERI_MSB 8 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTFROMPERI_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD0_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD0_CTRL +// Description : GPIO control including function select and overrides. +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OFFSET 0x00000014 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_BITS 0x3003331f +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_BITS 0x30000000 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_MSB 29 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_LSB 28 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_BITS 0x00030000 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_LSB 16 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_BITS 0x00003000 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_BITS 0x00000300 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> xip_sd0 +// 0x05 -> sio_32 +// 0x1f -> null +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_RESET 0x1f +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_MSB 4 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_LSB 0 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_VALUE_XIP_SD0 0x00 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_VALUE_SIO_32 0x05 +#define IO_QSPI_GPIO_QSPI_SD0_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD1_STATUS +// Description : GPIO status +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OFFSET 0x00000018 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_BITS 0x050a3300 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQTOPROC_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQTOPROC_MSB 26 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQTOPROC_LSB 26 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQFROMPAD_MSB 24 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQFROMPAD_LSB 24 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INTOPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INTOPERI_BITS 0x00080000 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INTOPERI_MSB 19 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INTOPERI_LSB 19 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INFROMPAD_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INFROMPAD_LSB 17 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OETOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OETOPAD_BITS 0x00002000 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OETOPAD_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OETOPAD_LSB 13 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OEFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OEFROMPERI_MSB 12 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OEFROMPERI_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTTOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTTOPAD_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTTOPAD_LSB 9 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTFROMPERI_MSB 8 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTFROMPERI_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD1_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD1_CTRL +// Description : GPIO control including function select and overrides. +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OFFSET 0x0000001c +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_BITS 0x3003331f +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_BITS 0x30000000 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_MSB 29 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_LSB 28 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_BITS 0x00030000 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_LSB 16 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_BITS 0x00003000 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_BITS 0x00000300 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> xip_sd1 +// 0x05 -> sio_33 +// 0x1f -> null +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_RESET 0x1f +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_MSB 4 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_LSB 0 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_VALUE_XIP_SD1 0x00 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_VALUE_SIO_33 0x05 +#define IO_QSPI_GPIO_QSPI_SD1_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD2_STATUS +// Description : GPIO status +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OFFSET 0x00000020 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_BITS 0x050a3300 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQTOPROC_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQTOPROC_MSB 26 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQTOPROC_LSB 26 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQFROMPAD_MSB 24 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQFROMPAD_LSB 24 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INTOPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INTOPERI_BITS 0x00080000 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INTOPERI_MSB 19 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INTOPERI_LSB 19 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INFROMPAD_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INFROMPAD_LSB 17 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OETOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OETOPAD_BITS 0x00002000 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OETOPAD_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OETOPAD_LSB 13 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OEFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OEFROMPERI_MSB 12 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OEFROMPERI_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTTOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTTOPAD_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTTOPAD_LSB 9 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTFROMPERI_MSB 8 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTFROMPERI_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD2_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD2_CTRL +// Description : GPIO control including function select and overrides. +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OFFSET 0x00000024 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_BITS 0x3003331f +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_BITS 0x30000000 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_MSB 29 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_LSB 28 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_BITS 0x00030000 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_LSB 16 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_BITS 0x00003000 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_BITS 0x00000300 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> xip_sd2 +// 0x05 -> sio_34 +// 0x1f -> null +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_RESET 0x1f +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_MSB 4 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_LSB 0 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_VALUE_XIP_SD2 0x00 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_VALUE_SIO_34 0x05 +#define IO_QSPI_GPIO_QSPI_SD2_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD3_STATUS +// Description : GPIO status +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OFFSET 0x00000028 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_BITS 0x050a3300 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQTOPROC +// Description : interrupt to processors, after override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQTOPROC_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQTOPROC_BITS 0x04000000 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQTOPROC_MSB 26 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQTOPROC_LSB 26 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQTOPROC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQFROMPAD +// Description : interrupt from pad before override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQFROMPAD_BITS 0x01000000 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQFROMPAD_MSB 24 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQFROMPAD_LSB 24 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_IRQFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_INTOPERI +// Description : input signal to peripheral, after override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INTOPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INTOPERI_BITS 0x00080000 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INTOPERI_MSB 19 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INTOPERI_LSB 19 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INTOPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_INFROMPAD +// Description : input signal from pad, before override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INFROMPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INFROMPAD_BITS 0x00020000 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INFROMPAD_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INFROMPAD_LSB 17 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_INFROMPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_OETOPAD +// Description : output enable to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OETOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OETOPAD_BITS 0x00002000 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OETOPAD_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OETOPAD_LSB 13 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OETOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_OEFROMPERI +// Description : output enable from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OEFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OEFROMPERI_BITS 0x00001000 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OEFROMPERI_MSB 12 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OEFROMPERI_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OEFROMPERI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTTOPAD +// Description : output signal to pad after register override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTTOPAD_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTTOPAD_BITS 0x00000200 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTTOPAD_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTTOPAD_LSB 9 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTTOPAD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTFROMPERI +// Description : output signal from selected peripheral, before register +// override is applied +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTFROMPERI_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTFROMPERI_BITS 0x00000100 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTFROMPERI_MSB 8 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTFROMPERI_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD3_STATUS_OUTFROMPERI_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_GPIO_QSPI_SD3_CTRL +// Description : GPIO control including function select and overrides. +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OFFSET 0x0000002c +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_BITS 0x3003331f +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_RESET 0x0000001f +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER +// Description : 0x0 -> don't invert the interrupt +// 0x1 -> invert the interrupt +// 0x2 -> drive interrupt low +// 0x3 -> drive interrupt high +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_BITS 0x30000000 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_MSB 29 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_LSB 28 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_IRQOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER +// Description : 0x0 -> don't invert the peri input +// 0x1 -> invert the peri input +// 0x2 -> drive peri input low +// 0x3 -> drive peri input high +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_BITS 0x00030000 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_MSB 17 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_LSB 16 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_INOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER +// Description : 0x0 -> drive output enable from peripheral signal selected by +// funcsel +// 0x1 -> drive output enable from inverse of peripheral signal +// selected by funcsel +// 0x2 -> disable output +// 0x3 -> enable output +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_BITS 0x00003000 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_MSB 13 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_LSB 12 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_VALUE_DISABLE 0x2 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OEOVER_VALUE_ENABLE 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER +// Description : 0x0 -> drive output from peripheral signal selected by funcsel +// 0x1 -> drive output from inverse of peripheral signal selected +// by funcsel +// 0x2 -> drive output low +// 0x3 -> drive output high +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_RESET 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_BITS 0x00000300 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_MSB 9 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_LSB 8 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_VALUE_NORMAL 0x0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_VALUE_INVERT 0x1 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_VALUE_LOW 0x2 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_OUTOVER_VALUE_HIGH 0x3 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL +// Description : 0-31 -> selects pin function according to the gpio table +// 31 == NULL +// 0x00 -> xip_sd3 +// 0x05 -> sio_35 +// 0x1f -> null +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_RESET 0x1f +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_BITS 0x0000001f +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_MSB 4 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_LSB 0 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_ACCESS "RW" +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_VALUE_XIP_SD3 0x00 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_VALUE_SIO_35 0x05 +#define IO_QSPI_GPIO_QSPI_SD3_CTRL_FUNCSEL_VALUE_NULL 0x1f +// ============================================================================= +// Register : IO_QSPI_INTR +// Description : Raw Interrupts +#define IO_QSPI_INTR_OFFSET 0x00000030 +#define IO_QSPI_INTR_BITS 0x00ffffff +#define IO_QSPI_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_INTR_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_INTR_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_INTR_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_INTR_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_INTR_GPIO_QSPI_SS_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_INTR_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_INTR_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_PROC0_INTE +// Description : Interrupt Enable for proc0 +#define IO_QSPI_PROC0_INTE_OFFSET 0x00000034 +#define IO_QSPI_PROC0_INTE_BITS 0x00ffffff +#define IO_QSPI_PROC0_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_PROC0_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_QSPI_PROC0_INTF +// Description : Interrupt Force for proc0 +#define IO_QSPI_PROC0_INTF_OFFSET 0x00000038 +#define IO_QSPI_PROC0_INTF_BITS 0x00ffffff +#define IO_QSPI_PROC0_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_PROC0_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_QSPI_PROC0_INTS +// Description : Interrupt status after masking & forcing for proc0 +#define IO_QSPI_PROC0_INTS_OFFSET 0x0000003c +#define IO_QSPI_PROC0_INTS_BITS 0x00ffffff +#define IO_QSPI_PROC0_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_PROC0_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_PROC1_INTE +// Description : Interrupt Enable for proc1 +#define IO_QSPI_PROC1_INTE_OFFSET 0x00000040 +#define IO_QSPI_PROC1_INTE_BITS 0x00ffffff +#define IO_QSPI_PROC1_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_PROC1_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_QSPI_PROC1_INTF +// Description : Interrupt Force for proc1 +#define IO_QSPI_PROC1_INTF_OFFSET 0x00000044 +#define IO_QSPI_PROC1_INTF_BITS 0x00ffffff +#define IO_QSPI_PROC1_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_PROC1_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_QSPI_PROC1_INTS +// Description : Interrupt status after masking & forcing for proc1 +#define IO_QSPI_PROC1_INTS_OFFSET 0x00000048 +#define IO_QSPI_PROC1_INTS_BITS 0x00ffffff +#define IO_QSPI_PROC1_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_PROC1_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +// Register : IO_QSPI_DORMANT_WAKE_INTE +// Description : Interrupt Enable for dormant_wake +#define IO_QSPI_DORMANT_WAKE_INTE_OFFSET 0x0000004c +#define IO_QSPI_DORMANT_WAKE_INTE_BITS 0x00ffffff +#define IO_QSPI_DORMANT_WAKE_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_DORMANT_WAKE_INTE_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_QSPI_DORMANT_WAKE_INTF +// Description : Interrupt Force for dormant_wake +#define IO_QSPI_DORMANT_WAKE_INTF_OFFSET 0x00000050 +#define IO_QSPI_DORMANT_WAKE_INTF_BITS 0x00ffffff +#define IO_QSPI_DORMANT_WAKE_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_DORMANT_WAKE_INTF_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RW" +// ============================================================================= +// Register : IO_QSPI_DORMANT_WAKE_INTS +// Description : Interrupt status after masking & forcing for dormant_wake +#define IO_QSPI_DORMANT_WAKE_INTS_OFFSET 0x00000054 +#define IO_QSPI_DORMANT_WAKE_INTS_BITS 0x00ffffff +#define IO_QSPI_DORMANT_WAKE_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_HIGH_BITS 0x00800000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_HIGH_MSB 23 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_HIGH_LSB 23 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_LOW_BITS 0x00400000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_LOW_MSB 22 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_LOW_LSB 22 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_BITS 0x00200000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_MSB 21 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_LSB 21 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_LOW_BITS 0x00100000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_LOW_MSB 20 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_LOW_LSB 20 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD3_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_HIGH_BITS 0x00080000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_HIGH_MSB 19 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_HIGH_LSB 19 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_LOW_BITS 0x00040000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_LOW_MSB 18 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_LOW_LSB 18 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_BITS 0x00020000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_MSB 17 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_LSB 17 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_LOW_BITS 0x00010000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_LOW_MSB 16 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_LOW_LSB 16 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD2_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_HIGH_BITS 0x00008000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_HIGH_MSB 15 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_HIGH_LSB 15 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_LOW_BITS 0x00004000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_LOW_MSB 14 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_LOW_LSB 14 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_BITS 0x00002000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_MSB 13 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_LSB 13 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_LOW_BITS 0x00001000 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_LOW_MSB 12 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_LOW_LSB 12 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD1_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_HIGH_BITS 0x00000800 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_HIGH_MSB 11 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_HIGH_LSB 11 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_LOW_BITS 0x00000400 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_LOW_MSB 10 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_LOW_LSB 10 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_BITS 0x00000200 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_MSB 9 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_LSB 9 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_LOW_BITS 0x00000100 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_LOW_MSB 8 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_LOW_LSB 8 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SD0_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_HIGH_BITS 0x00000080 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_HIGH_MSB 7 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_HIGH_LSB 7 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_LOW_BITS 0x00000040 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_LOW_MSB 6 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_LOW_LSB 6 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_HIGH_BITS 0x00000020 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_HIGH_MSB 5 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_HIGH_LSB 5 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_LOW_BITS 0x00000010 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_LOW_MSB 4 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_LOW_LSB 4 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SS_LEVEL_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_BITS 0x00000008 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_MSB 3 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_LSB 3 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_LOW_BITS 0x00000004 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_LOW_MSB 2 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_LOW_LSB 2 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_EDGE_LOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_BITS 0x00000002 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_MSB 1 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_LSB 1 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_HIGH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_LOW +// Description : None +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_RESET 0x0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_BITS 0x00000001 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_MSB 0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_LSB 0 +#define IO_QSPI_DORMANT_WAKE_INTS_GPIO_QSPI_SCLK_LEVEL_LOW_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_IO_QSPI_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h new file mode 100644 index 0000000000..fac8e8b55b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/m0plus.h @@ -0,0 +1,1149 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : M0PLUS +// Version : 1 +// Bus type : ahbl +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_M0PLUS_DEFINED +#define HARDWARE_REGS_M0PLUS_DEFINED +// ============================================================================= +// Register : M0PLUS_SYST_CSR +// Description : Use the SysTick Control and Status Register to enable the +// SysTick features. +#define M0PLUS_SYST_CSR_OFFSET 0x0000e010 +#define M0PLUS_SYST_CSR_BITS 0x00010007 +#define M0PLUS_SYST_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CSR_COUNTFLAG +// Description : Returns 1 if timer counted to 0 since last time this was read. +// Clears on read by application or debugger. +#define M0PLUS_SYST_CSR_COUNTFLAG_RESET 0x0 +#define M0PLUS_SYST_CSR_COUNTFLAG_BITS 0x00010000 +#define M0PLUS_SYST_CSR_COUNTFLAG_MSB 16 +#define M0PLUS_SYST_CSR_COUNTFLAG_LSB 16 +#define M0PLUS_SYST_CSR_COUNTFLAG_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CSR_CLKSOURCE +// Description : SysTick clock source. Always reads as one if SYST_CALIB reports +// NOREF. +// Selects the SysTick timer clock source: +// 0 = External reference clock. +// 1 = Processor clock. +#define M0PLUS_SYST_CSR_CLKSOURCE_RESET 0x0 +#define M0PLUS_SYST_CSR_CLKSOURCE_BITS 0x00000004 +#define M0PLUS_SYST_CSR_CLKSOURCE_MSB 2 +#define M0PLUS_SYST_CSR_CLKSOURCE_LSB 2 +#define M0PLUS_SYST_CSR_CLKSOURCE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CSR_TICKINT +// Description : Enables SysTick exception request: +// 0 = Counting down to zero does not assert the SysTick exception +// request. +// 1 = Counting down to zero to asserts the SysTick exception +// request. +#define M0PLUS_SYST_CSR_TICKINT_RESET 0x0 +#define M0PLUS_SYST_CSR_TICKINT_BITS 0x00000002 +#define M0PLUS_SYST_CSR_TICKINT_MSB 1 +#define M0PLUS_SYST_CSR_TICKINT_LSB 1 +#define M0PLUS_SYST_CSR_TICKINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CSR_ENABLE +// Description : Enable SysTick counter: +// 0 = Counter disabled. +// 1 = Counter enabled. +#define M0PLUS_SYST_CSR_ENABLE_RESET 0x0 +#define M0PLUS_SYST_CSR_ENABLE_BITS 0x00000001 +#define M0PLUS_SYST_CSR_ENABLE_MSB 0 +#define M0PLUS_SYST_CSR_ENABLE_LSB 0 +#define M0PLUS_SYST_CSR_ENABLE_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_SYST_RVR +// Description : Use the SysTick Reload Value Register to specify the start +// value to load into the current value register when the counter +// reaches 0. It can be any value between 0 and 0x00FFFFFF. A +// start value of 0 is possible, but has no effect because the +// SysTick interrupt and COUNTFLAG are activated when counting +// from 1 to 0. The reset value of this register is UNKNOWN. +// To generate a multi-shot timer with a period of N processor +// clock cycles, use a RELOAD value of N-1. For example, if the +// SysTick interrupt is required every 100 clock pulses, set +// RELOAD to 99. +#define M0PLUS_SYST_RVR_OFFSET 0x0000e014 +#define M0PLUS_SYST_RVR_BITS 0x00ffffff +#define M0PLUS_SYST_RVR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_RVR_RELOAD +// Description : Value to load into the SysTick Current Value Register when the +// counter reaches 0. +#define M0PLUS_SYST_RVR_RELOAD_RESET 0x000000 +#define M0PLUS_SYST_RVR_RELOAD_BITS 0x00ffffff +#define M0PLUS_SYST_RVR_RELOAD_MSB 23 +#define M0PLUS_SYST_RVR_RELOAD_LSB 0 +#define M0PLUS_SYST_RVR_RELOAD_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_SYST_CVR +// Description : Use the SysTick Current Value Register to find the current +// value in the register. The reset value of this register is +// UNKNOWN. +#define M0PLUS_SYST_CVR_OFFSET 0x0000e018 +#define M0PLUS_SYST_CVR_BITS 0x00ffffff +#define M0PLUS_SYST_CVR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CVR_CURRENT +// Description : Reads return the current value of the SysTick counter. This +// register is write-clear. Writing to it with any value clears +// the register to 0. Clearing this register also clears the +// COUNTFLAG bit of the SysTick Control and Status Register. +#define M0PLUS_SYST_CVR_CURRENT_RESET 0x000000 +#define M0PLUS_SYST_CVR_CURRENT_BITS 0x00ffffff +#define M0PLUS_SYST_CVR_CURRENT_MSB 23 +#define M0PLUS_SYST_CVR_CURRENT_LSB 0 +#define M0PLUS_SYST_CVR_CURRENT_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_SYST_CALIB +// Description : Use the SysTick Calibration Value Register to enable software +// to scale to any required speed using divide and multiply. +#define M0PLUS_SYST_CALIB_OFFSET 0x0000e01c +#define M0PLUS_SYST_CALIB_BITS 0xc0ffffff +#define M0PLUS_SYST_CALIB_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CALIB_NOREF +// Description : If reads as 1, the Reference clock is not provided - the +// CLKSOURCE bit of the SysTick Control and Status register will +// be forced to 1 and cannot be cleared to 0. +#define M0PLUS_SYST_CALIB_NOREF_RESET 0x0 +#define M0PLUS_SYST_CALIB_NOREF_BITS 0x80000000 +#define M0PLUS_SYST_CALIB_NOREF_MSB 31 +#define M0PLUS_SYST_CALIB_NOREF_LSB 31 +#define M0PLUS_SYST_CALIB_NOREF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CALIB_SKEW +// Description : If reads as 1, the calibration value for 10ms is inexact (due +// to clock frequency). +#define M0PLUS_SYST_CALIB_SKEW_RESET 0x0 +#define M0PLUS_SYST_CALIB_SKEW_BITS 0x40000000 +#define M0PLUS_SYST_CALIB_SKEW_MSB 30 +#define M0PLUS_SYST_CALIB_SKEW_LSB 30 +#define M0PLUS_SYST_CALIB_SKEW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SYST_CALIB_TENMS +// Description : An optional Reload value to be used for 10ms (100Hz) timing, +// subject to system clock skew errors. If the value reads as 0, +// the calibration value is not known. +#define M0PLUS_SYST_CALIB_TENMS_RESET 0x000000 +#define M0PLUS_SYST_CALIB_TENMS_BITS 0x00ffffff +#define M0PLUS_SYST_CALIB_TENMS_MSB 23 +#define M0PLUS_SYST_CALIB_TENMS_LSB 0 +#define M0PLUS_SYST_CALIB_TENMS_ACCESS "RO" +// ============================================================================= +// Register : M0PLUS_NVIC_ISER +// Description : Use the Interrupt Set-Enable Register to enable interrupts and +// determine which interrupts are currently enabled. +// If a pending interrupt is enabled, the NVIC activates the +// interrupt based on its priority. If an interrupt is not +// enabled, asserting its interrupt signal changes the interrupt +// state to pending, but the NVIC never activates the interrupt, +// regardless of its priority. +#define M0PLUS_NVIC_ISER_OFFSET 0x0000e100 +#define M0PLUS_NVIC_ISER_BITS 0xffffffff +#define M0PLUS_NVIC_ISER_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_ISER_SETENA +// Description : Interrupt set-enable bits. +// Write: +// 0 = No effect. +// 1 = Enable interrupt. +// Read: +// 0 = Interrupt disabled. +// 1 = Interrupt enabled. +#define M0PLUS_NVIC_ISER_SETENA_RESET 0x00000000 +#define M0PLUS_NVIC_ISER_SETENA_BITS 0xffffffff +#define M0PLUS_NVIC_ISER_SETENA_MSB 31 +#define M0PLUS_NVIC_ISER_SETENA_LSB 0 +#define M0PLUS_NVIC_ISER_SETENA_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_ICER +// Description : Use the Interrupt Clear-Enable Registers to disable interrupts +// and determine which interrupts are currently enabled. +#define M0PLUS_NVIC_ICER_OFFSET 0x0000e180 +#define M0PLUS_NVIC_ICER_BITS 0xffffffff +#define M0PLUS_NVIC_ICER_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_ICER_CLRENA +// Description : Interrupt clear-enable bits. +// Write: +// 0 = No effect. +// 1 = Disable interrupt. +// Read: +// 0 = Interrupt disabled. +// 1 = Interrupt enabled. +#define M0PLUS_NVIC_ICER_CLRENA_RESET 0x00000000 +#define M0PLUS_NVIC_ICER_CLRENA_BITS 0xffffffff +#define M0PLUS_NVIC_ICER_CLRENA_MSB 31 +#define M0PLUS_NVIC_ICER_CLRENA_LSB 0 +#define M0PLUS_NVIC_ICER_CLRENA_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_ISPR +// Description : The NVIC_ISPR forces interrupts into the pending state, and +// shows which interrupts are pending. +#define M0PLUS_NVIC_ISPR_OFFSET 0x0000e200 +#define M0PLUS_NVIC_ISPR_BITS 0xffffffff +#define M0PLUS_NVIC_ISPR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_ISPR_SETPEND +// Description : Interrupt set-pending bits. +// Write: +// 0 = No effect. +// 1 = Changes interrupt state to pending. +// Read: +// 0 = Interrupt is not pending. +// 1 = Interrupt is pending. +// Note: Writing 1 to the NVIC_ISPR bit corresponding to: +// An interrupt that is pending has no effect. +// A disabled interrupt sets the state of that interrupt to +// pending. +#define M0PLUS_NVIC_ISPR_SETPEND_RESET 0x00000000 +#define M0PLUS_NVIC_ISPR_SETPEND_BITS 0xffffffff +#define M0PLUS_NVIC_ISPR_SETPEND_MSB 31 +#define M0PLUS_NVIC_ISPR_SETPEND_LSB 0 +#define M0PLUS_NVIC_ISPR_SETPEND_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_ICPR +// Description : Use the Interrupt Clear-Pending Register to clear pending +// interrupts and determine which interrupts are currently +// pending. +#define M0PLUS_NVIC_ICPR_OFFSET 0x0000e280 +#define M0PLUS_NVIC_ICPR_BITS 0xffffffff +#define M0PLUS_NVIC_ICPR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_ICPR_CLRPEND +// Description : Interrupt clear-pending bits. +// Write: +// 0 = No effect. +// 1 = Removes pending state and interrupt. +// Read: +// 0 = Interrupt is not pending. +// 1 = Interrupt is pending. +#define M0PLUS_NVIC_ICPR_CLRPEND_RESET 0x00000000 +#define M0PLUS_NVIC_ICPR_CLRPEND_BITS 0xffffffff +#define M0PLUS_NVIC_ICPR_CLRPEND_MSB 31 +#define M0PLUS_NVIC_ICPR_CLRPEND_LSB 0 +#define M0PLUS_NVIC_ICPR_CLRPEND_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR0 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +// Note: Writing 1 to an NVIC_ICPR bit does not affect the active +// state of the corresponding interrupt. +// These registers are only word-accessible +#define M0PLUS_NVIC_IPR0_OFFSET 0x0000e400 +#define M0PLUS_NVIC_IPR0_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR0_IP_3 +// Description : Priority of interrupt 3 +#define M0PLUS_NVIC_IPR0_IP_3_RESET 0x0 +#define M0PLUS_NVIC_IPR0_IP_3_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR0_IP_3_MSB 31 +#define M0PLUS_NVIC_IPR0_IP_3_LSB 30 +#define M0PLUS_NVIC_IPR0_IP_3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR0_IP_2 +// Description : Priority of interrupt 2 +#define M0PLUS_NVIC_IPR0_IP_2_RESET 0x0 +#define M0PLUS_NVIC_IPR0_IP_2_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR0_IP_2_MSB 23 +#define M0PLUS_NVIC_IPR0_IP_2_LSB 22 +#define M0PLUS_NVIC_IPR0_IP_2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR0_IP_1 +// Description : Priority of interrupt 1 +#define M0PLUS_NVIC_IPR0_IP_1_RESET 0x0 +#define M0PLUS_NVIC_IPR0_IP_1_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR0_IP_1_MSB 15 +#define M0PLUS_NVIC_IPR0_IP_1_LSB 14 +#define M0PLUS_NVIC_IPR0_IP_1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR0_IP_0 +// Description : Priority of interrupt 0 +#define M0PLUS_NVIC_IPR0_IP_0_RESET 0x0 +#define M0PLUS_NVIC_IPR0_IP_0_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR0_IP_0_MSB 7 +#define M0PLUS_NVIC_IPR0_IP_0_LSB 6 +#define M0PLUS_NVIC_IPR0_IP_0_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR1 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR1_OFFSET 0x0000e404 +#define M0PLUS_NVIC_IPR1_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR1_IP_7 +// Description : Priority of interrupt 7 +#define M0PLUS_NVIC_IPR1_IP_7_RESET 0x0 +#define M0PLUS_NVIC_IPR1_IP_7_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR1_IP_7_MSB 31 +#define M0PLUS_NVIC_IPR1_IP_7_LSB 30 +#define M0PLUS_NVIC_IPR1_IP_7_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR1_IP_6 +// Description : Priority of interrupt 6 +#define M0PLUS_NVIC_IPR1_IP_6_RESET 0x0 +#define M0PLUS_NVIC_IPR1_IP_6_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR1_IP_6_MSB 23 +#define M0PLUS_NVIC_IPR1_IP_6_LSB 22 +#define M0PLUS_NVIC_IPR1_IP_6_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR1_IP_5 +// Description : Priority of interrupt 5 +#define M0PLUS_NVIC_IPR1_IP_5_RESET 0x0 +#define M0PLUS_NVIC_IPR1_IP_5_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR1_IP_5_MSB 15 +#define M0PLUS_NVIC_IPR1_IP_5_LSB 14 +#define M0PLUS_NVIC_IPR1_IP_5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR1_IP_4 +// Description : Priority of interrupt 4 +#define M0PLUS_NVIC_IPR1_IP_4_RESET 0x0 +#define M0PLUS_NVIC_IPR1_IP_4_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR1_IP_4_MSB 7 +#define M0PLUS_NVIC_IPR1_IP_4_LSB 6 +#define M0PLUS_NVIC_IPR1_IP_4_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR2 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR2_OFFSET 0x0000e408 +#define M0PLUS_NVIC_IPR2_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR2_IP_11 +// Description : Priority of interrupt 11 +#define M0PLUS_NVIC_IPR2_IP_11_RESET 0x0 +#define M0PLUS_NVIC_IPR2_IP_11_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR2_IP_11_MSB 31 +#define M0PLUS_NVIC_IPR2_IP_11_LSB 30 +#define M0PLUS_NVIC_IPR2_IP_11_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR2_IP_10 +// Description : Priority of interrupt 10 +#define M0PLUS_NVIC_IPR2_IP_10_RESET 0x0 +#define M0PLUS_NVIC_IPR2_IP_10_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR2_IP_10_MSB 23 +#define M0PLUS_NVIC_IPR2_IP_10_LSB 22 +#define M0PLUS_NVIC_IPR2_IP_10_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR2_IP_9 +// Description : Priority of interrupt 9 +#define M0PLUS_NVIC_IPR2_IP_9_RESET 0x0 +#define M0PLUS_NVIC_IPR2_IP_9_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR2_IP_9_MSB 15 +#define M0PLUS_NVIC_IPR2_IP_9_LSB 14 +#define M0PLUS_NVIC_IPR2_IP_9_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR2_IP_8 +// Description : Priority of interrupt 8 +#define M0PLUS_NVIC_IPR2_IP_8_RESET 0x0 +#define M0PLUS_NVIC_IPR2_IP_8_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR2_IP_8_MSB 7 +#define M0PLUS_NVIC_IPR2_IP_8_LSB 6 +#define M0PLUS_NVIC_IPR2_IP_8_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR3 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR3_OFFSET 0x0000e40c +#define M0PLUS_NVIC_IPR3_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR3_IP_15 +// Description : Priority of interrupt 15 +#define M0PLUS_NVIC_IPR3_IP_15_RESET 0x0 +#define M0PLUS_NVIC_IPR3_IP_15_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR3_IP_15_MSB 31 +#define M0PLUS_NVIC_IPR3_IP_15_LSB 30 +#define M0PLUS_NVIC_IPR3_IP_15_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR3_IP_14 +// Description : Priority of interrupt 14 +#define M0PLUS_NVIC_IPR3_IP_14_RESET 0x0 +#define M0PLUS_NVIC_IPR3_IP_14_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR3_IP_14_MSB 23 +#define M0PLUS_NVIC_IPR3_IP_14_LSB 22 +#define M0PLUS_NVIC_IPR3_IP_14_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR3_IP_13 +// Description : Priority of interrupt 13 +#define M0PLUS_NVIC_IPR3_IP_13_RESET 0x0 +#define M0PLUS_NVIC_IPR3_IP_13_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR3_IP_13_MSB 15 +#define M0PLUS_NVIC_IPR3_IP_13_LSB 14 +#define M0PLUS_NVIC_IPR3_IP_13_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR3_IP_12 +// Description : Priority of interrupt 12 +#define M0PLUS_NVIC_IPR3_IP_12_RESET 0x0 +#define M0PLUS_NVIC_IPR3_IP_12_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR3_IP_12_MSB 7 +#define M0PLUS_NVIC_IPR3_IP_12_LSB 6 +#define M0PLUS_NVIC_IPR3_IP_12_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR4 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR4_OFFSET 0x0000e410 +#define M0PLUS_NVIC_IPR4_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR4_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR4_IP_19 +// Description : Priority of interrupt 19 +#define M0PLUS_NVIC_IPR4_IP_19_RESET 0x0 +#define M0PLUS_NVIC_IPR4_IP_19_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR4_IP_19_MSB 31 +#define M0PLUS_NVIC_IPR4_IP_19_LSB 30 +#define M0PLUS_NVIC_IPR4_IP_19_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR4_IP_18 +// Description : Priority of interrupt 18 +#define M0PLUS_NVIC_IPR4_IP_18_RESET 0x0 +#define M0PLUS_NVIC_IPR4_IP_18_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR4_IP_18_MSB 23 +#define M0PLUS_NVIC_IPR4_IP_18_LSB 22 +#define M0PLUS_NVIC_IPR4_IP_18_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR4_IP_17 +// Description : Priority of interrupt 17 +#define M0PLUS_NVIC_IPR4_IP_17_RESET 0x0 +#define M0PLUS_NVIC_IPR4_IP_17_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR4_IP_17_MSB 15 +#define M0PLUS_NVIC_IPR4_IP_17_LSB 14 +#define M0PLUS_NVIC_IPR4_IP_17_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR4_IP_16 +// Description : Priority of interrupt 16 +#define M0PLUS_NVIC_IPR4_IP_16_RESET 0x0 +#define M0PLUS_NVIC_IPR4_IP_16_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR4_IP_16_MSB 7 +#define M0PLUS_NVIC_IPR4_IP_16_LSB 6 +#define M0PLUS_NVIC_IPR4_IP_16_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR5 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR5_OFFSET 0x0000e414 +#define M0PLUS_NVIC_IPR5_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR5_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR5_IP_23 +// Description : Priority of interrupt 23 +#define M0PLUS_NVIC_IPR5_IP_23_RESET 0x0 +#define M0PLUS_NVIC_IPR5_IP_23_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR5_IP_23_MSB 31 +#define M0PLUS_NVIC_IPR5_IP_23_LSB 30 +#define M0PLUS_NVIC_IPR5_IP_23_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR5_IP_22 +// Description : Priority of interrupt 22 +#define M0PLUS_NVIC_IPR5_IP_22_RESET 0x0 +#define M0PLUS_NVIC_IPR5_IP_22_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR5_IP_22_MSB 23 +#define M0PLUS_NVIC_IPR5_IP_22_LSB 22 +#define M0PLUS_NVIC_IPR5_IP_22_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR5_IP_21 +// Description : Priority of interrupt 21 +#define M0PLUS_NVIC_IPR5_IP_21_RESET 0x0 +#define M0PLUS_NVIC_IPR5_IP_21_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR5_IP_21_MSB 15 +#define M0PLUS_NVIC_IPR5_IP_21_LSB 14 +#define M0PLUS_NVIC_IPR5_IP_21_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR5_IP_20 +// Description : Priority of interrupt 20 +#define M0PLUS_NVIC_IPR5_IP_20_RESET 0x0 +#define M0PLUS_NVIC_IPR5_IP_20_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR5_IP_20_MSB 7 +#define M0PLUS_NVIC_IPR5_IP_20_LSB 6 +#define M0PLUS_NVIC_IPR5_IP_20_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR6 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR6_OFFSET 0x0000e418 +#define M0PLUS_NVIC_IPR6_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR6_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR6_IP_27 +// Description : Priority of interrupt 27 +#define M0PLUS_NVIC_IPR6_IP_27_RESET 0x0 +#define M0PLUS_NVIC_IPR6_IP_27_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR6_IP_27_MSB 31 +#define M0PLUS_NVIC_IPR6_IP_27_LSB 30 +#define M0PLUS_NVIC_IPR6_IP_27_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR6_IP_26 +// Description : Priority of interrupt 26 +#define M0PLUS_NVIC_IPR6_IP_26_RESET 0x0 +#define M0PLUS_NVIC_IPR6_IP_26_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR6_IP_26_MSB 23 +#define M0PLUS_NVIC_IPR6_IP_26_LSB 22 +#define M0PLUS_NVIC_IPR6_IP_26_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR6_IP_25 +// Description : Priority of interrupt 25 +#define M0PLUS_NVIC_IPR6_IP_25_RESET 0x0 +#define M0PLUS_NVIC_IPR6_IP_25_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR6_IP_25_MSB 15 +#define M0PLUS_NVIC_IPR6_IP_25_LSB 14 +#define M0PLUS_NVIC_IPR6_IP_25_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR6_IP_24 +// Description : Priority of interrupt 24 +#define M0PLUS_NVIC_IPR6_IP_24_RESET 0x0 +#define M0PLUS_NVIC_IPR6_IP_24_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR6_IP_24_MSB 7 +#define M0PLUS_NVIC_IPR6_IP_24_LSB 6 +#define M0PLUS_NVIC_IPR6_IP_24_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_NVIC_IPR7 +// Description : Use the Interrupt Priority Registers to assign a priority from +// 0 to 3 to each of the available interrupts. 0 is the highest +// priority, and 3 is the lowest. +#define M0PLUS_NVIC_IPR7_OFFSET 0x0000e41c +#define M0PLUS_NVIC_IPR7_BITS 0xc0c0c0c0 +#define M0PLUS_NVIC_IPR7_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR7_IP_31 +// Description : Priority of interrupt 31 +#define M0PLUS_NVIC_IPR7_IP_31_RESET 0x0 +#define M0PLUS_NVIC_IPR7_IP_31_BITS 0xc0000000 +#define M0PLUS_NVIC_IPR7_IP_31_MSB 31 +#define M0PLUS_NVIC_IPR7_IP_31_LSB 30 +#define M0PLUS_NVIC_IPR7_IP_31_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR7_IP_30 +// Description : Priority of interrupt 30 +#define M0PLUS_NVIC_IPR7_IP_30_RESET 0x0 +#define M0PLUS_NVIC_IPR7_IP_30_BITS 0x00c00000 +#define M0PLUS_NVIC_IPR7_IP_30_MSB 23 +#define M0PLUS_NVIC_IPR7_IP_30_LSB 22 +#define M0PLUS_NVIC_IPR7_IP_30_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR7_IP_29 +// Description : Priority of interrupt 29 +#define M0PLUS_NVIC_IPR7_IP_29_RESET 0x0 +#define M0PLUS_NVIC_IPR7_IP_29_BITS 0x0000c000 +#define M0PLUS_NVIC_IPR7_IP_29_MSB 15 +#define M0PLUS_NVIC_IPR7_IP_29_LSB 14 +#define M0PLUS_NVIC_IPR7_IP_29_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_NVIC_IPR7_IP_28 +// Description : Priority of interrupt 28 +#define M0PLUS_NVIC_IPR7_IP_28_RESET 0x0 +#define M0PLUS_NVIC_IPR7_IP_28_BITS 0x000000c0 +#define M0PLUS_NVIC_IPR7_IP_28_MSB 7 +#define M0PLUS_NVIC_IPR7_IP_28_LSB 6 +#define M0PLUS_NVIC_IPR7_IP_28_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_CPUID +// Description : Read the CPU ID Base Register to determine: the ID number of +// the processor core, the version number of the processor core, +// the implementation details of the processor core. +#define M0PLUS_CPUID_OFFSET 0x0000ed00 +#define M0PLUS_CPUID_BITS 0xffffffff +#define M0PLUS_CPUID_RESET 0x410cc601 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CPUID_IMPLEMENTER +// Description : Implementor code: 0x41 = ARM +#define M0PLUS_CPUID_IMPLEMENTER_RESET 0x41 +#define M0PLUS_CPUID_IMPLEMENTER_BITS 0xff000000 +#define M0PLUS_CPUID_IMPLEMENTER_MSB 31 +#define M0PLUS_CPUID_IMPLEMENTER_LSB 24 +#define M0PLUS_CPUID_IMPLEMENTER_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CPUID_VARIANT +// Description : Major revision number n in the rnpm revision status: +// 0x0 = Revision 0. +#define M0PLUS_CPUID_VARIANT_RESET 0x0 +#define M0PLUS_CPUID_VARIANT_BITS 0x00f00000 +#define M0PLUS_CPUID_VARIANT_MSB 23 +#define M0PLUS_CPUID_VARIANT_LSB 20 +#define M0PLUS_CPUID_VARIANT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CPUID_ARCHITECTURE +// Description : Constant that defines the architecture of the processor: +// 0xC = ARMv6-M architecture. +#define M0PLUS_CPUID_ARCHITECTURE_RESET 0xc +#define M0PLUS_CPUID_ARCHITECTURE_BITS 0x000f0000 +#define M0PLUS_CPUID_ARCHITECTURE_MSB 19 +#define M0PLUS_CPUID_ARCHITECTURE_LSB 16 +#define M0PLUS_CPUID_ARCHITECTURE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CPUID_PARTNO +// Description : Number of processor within family: 0xC60 = Cortex-M0+ +#define M0PLUS_CPUID_PARTNO_RESET 0xc60 +#define M0PLUS_CPUID_PARTNO_BITS 0x0000fff0 +#define M0PLUS_CPUID_PARTNO_MSB 15 +#define M0PLUS_CPUID_PARTNO_LSB 4 +#define M0PLUS_CPUID_PARTNO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CPUID_REVISION +// Description : Minor revision number m in the rnpm revision status: +// 0x1 = Patch 1. +#define M0PLUS_CPUID_REVISION_RESET 0x1 +#define M0PLUS_CPUID_REVISION_BITS 0x0000000f +#define M0PLUS_CPUID_REVISION_MSB 3 +#define M0PLUS_CPUID_REVISION_LSB 0 +#define M0PLUS_CPUID_REVISION_ACCESS "RO" +// ============================================================================= +// Register : M0PLUS_ICSR +// Description : Use the Interrupt Control State Register to set a pending +// Non-Maskable Interrupt (NMI), set or clear a pending PendSV, +// set or clear a pending SysTick, check for pending exceptions, +// check the vector number of the highest priority pended +// exception, check the vector number of the active exception. +#define M0PLUS_ICSR_OFFSET 0x0000ed04 +#define M0PLUS_ICSR_BITS 0x9edff1ff +#define M0PLUS_ICSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_NMIPENDSET +// Description : Setting this bit will activate an NMI. Since NMI is the highest +// priority exception, it will activate as soon as it is +// registered. +// NMI set-pending bit. +// Write: +// 0 = No effect. +// 1 = Changes NMI exception state to pending. +// Read: +// 0 = NMI exception is not pending. +// 1 = NMI exception is pending. +// Because NMI is the highest-priority exception, normally the +// processor enters the NMI +// exception handler as soon as it detects a write of 1 to this +// bit. Entering the handler then clears +// this bit to 0. This means a read of this bit by the NMI +// exception handler returns 1 only if the +// NMI signal is reasserted while the processor is executing that +// handler. +#define M0PLUS_ICSR_NMIPENDSET_RESET 0x0 +#define M0PLUS_ICSR_NMIPENDSET_BITS 0x80000000 +#define M0PLUS_ICSR_NMIPENDSET_MSB 31 +#define M0PLUS_ICSR_NMIPENDSET_LSB 31 +#define M0PLUS_ICSR_NMIPENDSET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_PENDSVSET +// Description : PendSV set-pending bit. +// Write: +// 0 = No effect. +// 1 = Changes PendSV exception state to pending. +// Read: +// 0 = PendSV exception is not pending. +// 1 = PendSV exception is pending. +// Writing 1 to this bit is the only way to set the PendSV +// exception state to pending. +#define M0PLUS_ICSR_PENDSVSET_RESET 0x0 +#define M0PLUS_ICSR_PENDSVSET_BITS 0x10000000 +#define M0PLUS_ICSR_PENDSVSET_MSB 28 +#define M0PLUS_ICSR_PENDSVSET_LSB 28 +#define M0PLUS_ICSR_PENDSVSET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_PENDSVCLR +// Description : PendSV clear-pending bit. +// Write: +// 0 = No effect. +// 1 = Removes the pending state from the PendSV exception. +#define M0PLUS_ICSR_PENDSVCLR_RESET 0x0 +#define M0PLUS_ICSR_PENDSVCLR_BITS 0x08000000 +#define M0PLUS_ICSR_PENDSVCLR_MSB 27 +#define M0PLUS_ICSR_PENDSVCLR_LSB 27 +#define M0PLUS_ICSR_PENDSVCLR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_PENDSTSET +// Description : SysTick exception set-pending bit. +// Write: +// 0 = No effect. +// 1 = Changes SysTick exception state to pending. +// Read: +// 0 = SysTick exception is not pending. +// 1 = SysTick exception is pending. +#define M0PLUS_ICSR_PENDSTSET_RESET 0x0 +#define M0PLUS_ICSR_PENDSTSET_BITS 0x04000000 +#define M0PLUS_ICSR_PENDSTSET_MSB 26 +#define M0PLUS_ICSR_PENDSTSET_LSB 26 +#define M0PLUS_ICSR_PENDSTSET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_PENDSTCLR +// Description : SysTick exception clear-pending bit. +// Write: +// 0 = No effect. +// 1 = Removes the pending state from the SysTick exception. +// This bit is WO. On a register read its value is Unknown. +#define M0PLUS_ICSR_PENDSTCLR_RESET 0x0 +#define M0PLUS_ICSR_PENDSTCLR_BITS 0x02000000 +#define M0PLUS_ICSR_PENDSTCLR_MSB 25 +#define M0PLUS_ICSR_PENDSTCLR_LSB 25 +#define M0PLUS_ICSR_PENDSTCLR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_ISRPREEMPT +// Description : The system can only access this bit when the core is halted. It +// indicates that a pending interrupt is to be taken in the next +// running cycle. If C_MASKINTS is clear in the Debug Halting +// Control and Status Register, the interrupt is serviced. +#define M0PLUS_ICSR_ISRPREEMPT_RESET 0x0 +#define M0PLUS_ICSR_ISRPREEMPT_BITS 0x00800000 +#define M0PLUS_ICSR_ISRPREEMPT_MSB 23 +#define M0PLUS_ICSR_ISRPREEMPT_LSB 23 +#define M0PLUS_ICSR_ISRPREEMPT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_ISRPENDING +// Description : External interrupt pending flag +#define M0PLUS_ICSR_ISRPENDING_RESET 0x0 +#define M0PLUS_ICSR_ISRPENDING_BITS 0x00400000 +#define M0PLUS_ICSR_ISRPENDING_MSB 22 +#define M0PLUS_ICSR_ISRPENDING_LSB 22 +#define M0PLUS_ICSR_ISRPENDING_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_VECTPENDING +// Description : Indicates the exception number for the highest priority pending +// exception: 0 = no pending exceptions. Non zero = The pending +// state includes the effect of memory-mapped enable and mask +// registers. It does not include the PRIMASK special-purpose +// register qualifier. +#define M0PLUS_ICSR_VECTPENDING_RESET 0x000 +#define M0PLUS_ICSR_VECTPENDING_BITS 0x001ff000 +#define M0PLUS_ICSR_VECTPENDING_MSB 20 +#define M0PLUS_ICSR_VECTPENDING_LSB 12 +#define M0PLUS_ICSR_VECTPENDING_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_ICSR_VECTACTIVE +// Description : Active exception number field. Reset clears the VECTACTIVE +// field. +#define M0PLUS_ICSR_VECTACTIVE_RESET 0x000 +#define M0PLUS_ICSR_VECTACTIVE_BITS 0x000001ff +#define M0PLUS_ICSR_VECTACTIVE_MSB 8 +#define M0PLUS_ICSR_VECTACTIVE_LSB 0 +#define M0PLUS_ICSR_VECTACTIVE_ACCESS "RO" +// ============================================================================= +// Register : M0PLUS_VTOR +// Description : The VTOR holds the vector table offset address. +#define M0PLUS_VTOR_OFFSET 0x0000ed08 +#define M0PLUS_VTOR_BITS 0xffffff00 +#define M0PLUS_VTOR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_VTOR_TBLOFF +// Description : Bits [31:8] of the indicate the vector table offset address. +#define M0PLUS_VTOR_TBLOFF_RESET 0x000000 +#define M0PLUS_VTOR_TBLOFF_BITS 0xffffff00 +#define M0PLUS_VTOR_TBLOFF_MSB 31 +#define M0PLUS_VTOR_TBLOFF_LSB 8 +#define M0PLUS_VTOR_TBLOFF_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_AIRCR +// Description : Use the Application Interrupt and Reset Control Register to: +// determine data endianness, clear all active state information +// from debug halt mode, request a system reset. +#define M0PLUS_AIRCR_OFFSET 0x0000ed0c +#define M0PLUS_AIRCR_BITS 0xffff8006 +#define M0PLUS_AIRCR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_AIRCR_VECTKEY +// Description : Register key: +// Reads as Unknown +// On writes, write 0x05FA to VECTKEY, otherwise the write is +// ignored. +#define M0PLUS_AIRCR_VECTKEY_RESET 0x0000 +#define M0PLUS_AIRCR_VECTKEY_BITS 0xffff0000 +#define M0PLUS_AIRCR_VECTKEY_MSB 31 +#define M0PLUS_AIRCR_VECTKEY_LSB 16 +#define M0PLUS_AIRCR_VECTKEY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_AIRCR_ENDIANESS +// Description : Data endianness implemented: +// 0 = Little-endian. +#define M0PLUS_AIRCR_ENDIANESS_RESET 0x0 +#define M0PLUS_AIRCR_ENDIANESS_BITS 0x00008000 +#define M0PLUS_AIRCR_ENDIANESS_MSB 15 +#define M0PLUS_AIRCR_ENDIANESS_LSB 15 +#define M0PLUS_AIRCR_ENDIANESS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_AIRCR_SYSRESETREQ +// Description : Writing 1 to this bit causes the SYSRESETREQ signal to the +// outer system to be asserted to request a reset. The intention +// is to force a large system reset of all major components except +// for debug. The C_HALT bit in the DHCSR is cleared as a result +// of the system reset requested. The debugger does not lose +// contact with the device. +#define M0PLUS_AIRCR_SYSRESETREQ_RESET 0x0 +#define M0PLUS_AIRCR_SYSRESETREQ_BITS 0x00000004 +#define M0PLUS_AIRCR_SYSRESETREQ_MSB 2 +#define M0PLUS_AIRCR_SYSRESETREQ_LSB 2 +#define M0PLUS_AIRCR_SYSRESETREQ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_AIRCR_VECTCLRACTIVE +// Description : Clears all active state information for fixed and configurable +// exceptions. This bit: is self-clearing, can only be set by the +// DAP when the core is halted. When set: clears all active +// exception status of the processor, forces a return to Thread +// mode, forces an IPSR of 0. A debugger must re-initialize the +// stack. +#define M0PLUS_AIRCR_VECTCLRACTIVE_RESET 0x0 +#define M0PLUS_AIRCR_VECTCLRACTIVE_BITS 0x00000002 +#define M0PLUS_AIRCR_VECTCLRACTIVE_MSB 1 +#define M0PLUS_AIRCR_VECTCLRACTIVE_LSB 1 +#define M0PLUS_AIRCR_VECTCLRACTIVE_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_SCR +// Description : System Control Register. Use the System Control Register for +// power-management functions: signal to the system when the +// processor can enter a low power state, control how the +// processor enters and exits low power states. +#define M0PLUS_SCR_OFFSET 0x0000ed10 +#define M0PLUS_SCR_BITS 0x00000016 +#define M0PLUS_SCR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SCR_SEVONPEND +// Description : Send Event on Pending bit: +// 0 = Only enabled interrupts or events can wakeup the processor, +// disabled interrupts are excluded. +// 1 = Enabled events and all interrupts, including disabled +// interrupts, can wakeup the processor. +// When an event or interrupt becomes pending, the event signal +// wakes up the processor from WFE. If the +// processor is not waiting for an event, the event is registered +// and affects the next WFE. +// The processor also wakes up on execution of an SEV instruction +// or an external event. +#define M0PLUS_SCR_SEVONPEND_RESET 0x0 +#define M0PLUS_SCR_SEVONPEND_BITS 0x00000010 +#define M0PLUS_SCR_SEVONPEND_MSB 4 +#define M0PLUS_SCR_SEVONPEND_LSB 4 +#define M0PLUS_SCR_SEVONPEND_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SCR_SLEEPDEEP +// Description : Controls whether the processor uses sleep or deep sleep as its +// low power mode: +// 0 = Sleep. +// 1 = Deep sleep. +#define M0PLUS_SCR_SLEEPDEEP_RESET 0x0 +#define M0PLUS_SCR_SLEEPDEEP_BITS 0x00000004 +#define M0PLUS_SCR_SLEEPDEEP_MSB 2 +#define M0PLUS_SCR_SLEEPDEEP_LSB 2 +#define M0PLUS_SCR_SLEEPDEEP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SCR_SLEEPONEXIT +// Description : Indicates sleep-on-exit when returning from Handler mode to +// Thread mode: +// 0 = Do not sleep when returning to Thread mode. +// 1 = Enter sleep, or deep sleep, on return from an ISR to Thread +// mode. +// Setting this bit to 1 enables an interrupt driven application +// to avoid returning to an empty main application. +#define M0PLUS_SCR_SLEEPONEXIT_RESET 0x0 +#define M0PLUS_SCR_SLEEPONEXIT_BITS 0x00000002 +#define M0PLUS_SCR_SLEEPONEXIT_MSB 1 +#define M0PLUS_SCR_SLEEPONEXIT_LSB 1 +#define M0PLUS_SCR_SLEEPONEXIT_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_CCR +// Description : The Configuration and Control Register permanently enables +// stack alignment and causes unaligned accesses to result in a +// Hard Fault. +#define M0PLUS_CCR_OFFSET 0x0000ed14 +#define M0PLUS_CCR_BITS 0x00000208 +#define M0PLUS_CCR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CCR_STKALIGN +// Description : Always reads as one, indicates 8-byte stack alignment on +// exception entry. On exception entry, the processor uses bit[9] +// of the stacked PSR to indicate the stack alignment. On return +// from the exception it uses this stacked bit to restore the +// correct stack alignment. +#define M0PLUS_CCR_STKALIGN_RESET 0x0 +#define M0PLUS_CCR_STKALIGN_BITS 0x00000200 +#define M0PLUS_CCR_STKALIGN_MSB 9 +#define M0PLUS_CCR_STKALIGN_LSB 9 +#define M0PLUS_CCR_STKALIGN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_CCR_UNALIGN_TRP +// Description : Always reads as one, indicates that all unaligned accesses +// generate a HardFault. +#define M0PLUS_CCR_UNALIGN_TRP_RESET 0x0 +#define M0PLUS_CCR_UNALIGN_TRP_BITS 0x00000008 +#define M0PLUS_CCR_UNALIGN_TRP_MSB 3 +#define M0PLUS_CCR_UNALIGN_TRP_LSB 3 +#define M0PLUS_CCR_UNALIGN_TRP_ACCESS "RO" +// ============================================================================= +// Register : M0PLUS_SHPR2 +// Description : System handlers are a special class of exception handler that +// can have their priority set to any of the priority levels. Use +// the System Handler Priority Register 2 to set the priority of +// SVCall. +#define M0PLUS_SHPR2_OFFSET 0x0000ed1c +#define M0PLUS_SHPR2_BITS 0xc0000000 +#define M0PLUS_SHPR2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SHPR2_PRI_11 +// Description : Priority of system handler 11, SVCall +#define M0PLUS_SHPR2_PRI_11_RESET 0x0 +#define M0PLUS_SHPR2_PRI_11_BITS 0xc0000000 +#define M0PLUS_SHPR2_PRI_11_MSB 31 +#define M0PLUS_SHPR2_PRI_11_LSB 30 +#define M0PLUS_SHPR2_PRI_11_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_SHPR3 +// Description : System handlers are a special class of exception handler that +// can have their priority set to any of the priority levels. Use +// the System Handler Priority Register 3 to set the priority of +// PendSV and SysTick. +#define M0PLUS_SHPR3_OFFSET 0x0000ed20 +#define M0PLUS_SHPR3_BITS 0xc0c00000 +#define M0PLUS_SHPR3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SHPR3_PRI_15 +// Description : Priority of system handler 15, SysTick +#define M0PLUS_SHPR3_PRI_15_RESET 0x0 +#define M0PLUS_SHPR3_PRI_15_BITS 0xc0000000 +#define M0PLUS_SHPR3_PRI_15_MSB 31 +#define M0PLUS_SHPR3_PRI_15_LSB 30 +#define M0PLUS_SHPR3_PRI_15_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SHPR3_PRI_14 +// Description : Priority of system handler 14, PendSV +#define M0PLUS_SHPR3_PRI_14_RESET 0x0 +#define M0PLUS_SHPR3_PRI_14_BITS 0x00c00000 +#define M0PLUS_SHPR3_PRI_14_MSB 23 +#define M0PLUS_SHPR3_PRI_14_LSB 22 +#define M0PLUS_SHPR3_PRI_14_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_SHCSR +// Description : Use the System Handler Control and State Register to determine +// or clear the pending status of SVCall. +#define M0PLUS_SHCSR_OFFSET 0x0000ed24 +#define M0PLUS_SHCSR_BITS 0x00008000 +#define M0PLUS_SHCSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_SHCSR_SVCALLPENDED +// Description : Reads as 1 if SVCall is Pending. Write 1 to set pending +// SVCall, write 0 to clear pending SVCall. +#define M0PLUS_SHCSR_SVCALLPENDED_RESET 0x0 +#define M0PLUS_SHCSR_SVCALLPENDED_BITS 0x00008000 +#define M0PLUS_SHCSR_SVCALLPENDED_MSB 15 +#define M0PLUS_SHCSR_SVCALLPENDED_LSB 15 +#define M0PLUS_SHCSR_SVCALLPENDED_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_MPU_TYPE +// Description : Read the MPU Type Register to determine if the processor +// implements an MPU, and how many regions the MPU supports. +#define M0PLUS_MPU_TYPE_OFFSET 0x0000ed90 +#define M0PLUS_MPU_TYPE_BITS 0x00ffff01 +#define M0PLUS_MPU_TYPE_RESET 0x00000800 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_TYPE_IREGION +// Description : Instruction region. Reads as zero as ARMv6-M only supports a +// unified MPU. +#define M0PLUS_MPU_TYPE_IREGION_RESET 0x00 +#define M0PLUS_MPU_TYPE_IREGION_BITS 0x00ff0000 +#define M0PLUS_MPU_TYPE_IREGION_MSB 23 +#define M0PLUS_MPU_TYPE_IREGION_LSB 16 +#define M0PLUS_MPU_TYPE_IREGION_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_TYPE_DREGION +// Description : Number of regions supported by the MPU. +#define M0PLUS_MPU_TYPE_DREGION_RESET 0x08 +#define M0PLUS_MPU_TYPE_DREGION_BITS 0x0000ff00 +#define M0PLUS_MPU_TYPE_DREGION_MSB 15 +#define M0PLUS_MPU_TYPE_DREGION_LSB 8 +#define M0PLUS_MPU_TYPE_DREGION_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_TYPE_SEPARATE +// Description : Indicates support for separate instruction and data address +// maps. Reads as 0 as ARMv6-M only supports a unified MPU. +#define M0PLUS_MPU_TYPE_SEPARATE_RESET 0x0 +#define M0PLUS_MPU_TYPE_SEPARATE_BITS 0x00000001 +#define M0PLUS_MPU_TYPE_SEPARATE_MSB 0 +#define M0PLUS_MPU_TYPE_SEPARATE_LSB 0 +#define M0PLUS_MPU_TYPE_SEPARATE_ACCESS "RO" +// ============================================================================= +// Register : M0PLUS_MPU_CTRL +// Description : Use the MPU Control Register to enable and disable the MPU, and +// to control whether the default memory map is enabled as a +// background region for privileged accesses, and whether the MPU +// is enabled for HardFaults and NMIs. +#define M0PLUS_MPU_CTRL_OFFSET 0x0000ed94 +#define M0PLUS_MPU_CTRL_BITS 0x00000007 +#define M0PLUS_MPU_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_CTRL_PRIVDEFENA +// Description : Controls whether the default memory map is enabled as a +// background region for privileged accesses. This bit is ignored +// when ENABLE is clear. +// 0 = If the MPU is enabled, disables use of the default memory +// map. Any memory access to a location not +// covered by any enabled region causes a fault. +// 1 = If the MPU is enabled, enables use of the default memory +// map as a background region for privileged software accesses. +// When enabled, the background region acts as if it is region +// number -1. Any region that is defined and enabled has priority +// over this default map. +#define M0PLUS_MPU_CTRL_PRIVDEFENA_RESET 0x0 +#define M0PLUS_MPU_CTRL_PRIVDEFENA_BITS 0x00000004 +#define M0PLUS_MPU_CTRL_PRIVDEFENA_MSB 2 +#define M0PLUS_MPU_CTRL_PRIVDEFENA_LSB 2 +#define M0PLUS_MPU_CTRL_PRIVDEFENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_CTRL_HFNMIENA +// Description : Controls the use of the MPU for HardFaults and NMIs. Setting +// this bit when ENABLE is clear results in UNPREDICTABLE +// behaviour. +// When the MPU is enabled: +// 0 = MPU is disabled during HardFault and NMI handlers, +// regardless of the value of the ENABLE bit. +// 1 = the MPU is enabled during HardFault and NMI handlers. +#define M0PLUS_MPU_CTRL_HFNMIENA_RESET 0x0 +#define M0PLUS_MPU_CTRL_HFNMIENA_BITS 0x00000002 +#define M0PLUS_MPU_CTRL_HFNMIENA_MSB 1 +#define M0PLUS_MPU_CTRL_HFNMIENA_LSB 1 +#define M0PLUS_MPU_CTRL_HFNMIENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_CTRL_ENABLE +// Description : Enables the MPU. If the MPU is disabled, privileged and +// unprivileged accesses use the default memory map. +// 0 = MPU disabled. +// 1 = MPU enabled. +#define M0PLUS_MPU_CTRL_ENABLE_RESET 0x0 +#define M0PLUS_MPU_CTRL_ENABLE_BITS 0x00000001 +#define M0PLUS_MPU_CTRL_ENABLE_MSB 0 +#define M0PLUS_MPU_CTRL_ENABLE_LSB 0 +#define M0PLUS_MPU_CTRL_ENABLE_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_MPU_RNR +// Description : Use the MPU Region Number Register to select the region +// currently accessed by MPU_RBAR and MPU_RASR. +#define M0PLUS_MPU_RNR_OFFSET 0x0000ed98 +#define M0PLUS_MPU_RNR_BITS 0x0000000f +#define M0PLUS_MPU_RNR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RNR_REGION +// Description : Indicates the MPU region referenced by the MPU_RBAR and +// MPU_RASR registers. +// The MPU supports 8 memory regions, so the permitted values of +// this field are 0-7. +#define M0PLUS_MPU_RNR_REGION_RESET 0x0 +#define M0PLUS_MPU_RNR_REGION_BITS 0x0000000f +#define M0PLUS_MPU_RNR_REGION_MSB 3 +#define M0PLUS_MPU_RNR_REGION_LSB 0 +#define M0PLUS_MPU_RNR_REGION_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_MPU_RBAR +// Description : Read the MPU Region Base Address Register to determine the base +// address of the region identified by MPU_RNR. Write to update +// the base address of said region or that of a specified region, +// with whose number MPU_RNR will also be updated. +#define M0PLUS_MPU_RBAR_OFFSET 0x0000ed9c +#define M0PLUS_MPU_RBAR_BITS 0xffffff1f +#define M0PLUS_MPU_RBAR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RBAR_ADDR +// Description : Base address of the region. +#define M0PLUS_MPU_RBAR_ADDR_RESET 0x000000 +#define M0PLUS_MPU_RBAR_ADDR_BITS 0xffffff00 +#define M0PLUS_MPU_RBAR_ADDR_MSB 31 +#define M0PLUS_MPU_RBAR_ADDR_LSB 8 +#define M0PLUS_MPU_RBAR_ADDR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RBAR_VALID +// Description : On writes, indicates whether the write must update the base +// address of the region identified by the REGION field, updating +// the MPU_RNR to indicate this new region. +// Write: +// 0 = MPU_RNR not changed, and the processor: +// Updates the base address for the region specified in the +// MPU_RNR. +// Ignores the value of the REGION field. +// 1 = The processor: +// Updates the value of the MPU_RNR to the value of the REGION +// field. +// Updates the base address for the region specified in the REGION +// field. +// Always reads as zero. +#define M0PLUS_MPU_RBAR_VALID_RESET 0x0 +#define M0PLUS_MPU_RBAR_VALID_BITS 0x00000010 +#define M0PLUS_MPU_RBAR_VALID_MSB 4 +#define M0PLUS_MPU_RBAR_VALID_LSB 4 +#define M0PLUS_MPU_RBAR_VALID_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RBAR_REGION +// Description : On writes, specifies the number of the region whose base +// address to update provided VALID is set written as 1. On reads, +// returns bits [3:0] of MPU_RNR. +#define M0PLUS_MPU_RBAR_REGION_RESET 0x0 +#define M0PLUS_MPU_RBAR_REGION_BITS 0x0000000f +#define M0PLUS_MPU_RBAR_REGION_MSB 3 +#define M0PLUS_MPU_RBAR_REGION_LSB 0 +#define M0PLUS_MPU_RBAR_REGION_ACCESS "RW" +// ============================================================================= +// Register : M0PLUS_MPU_RASR +// Description : Use the MPU Region Attribute and Size Register to define the +// size, access behaviour and memory type of the region identified +// by MPU_RNR, and enable that region. +#define M0PLUS_MPU_RASR_OFFSET 0x0000eda0 +#define M0PLUS_MPU_RASR_BITS 0xffffff3f +#define M0PLUS_MPU_RASR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RASR_ATTRS +// Description : The MPU Region Attribute field. Use to define the region +// attribute control. +// 28 = XN: Instruction access disable bit: +// 0 = Instruction fetches enabled. +// 1 = Instruction fetches disabled. +// 26:24 = AP: Access permission field +// 18 = S: Shareable bit +// 17 = C: Cacheable bit +// 16 = B: Bufferable bit +#define M0PLUS_MPU_RASR_ATTRS_RESET 0x0000 +#define M0PLUS_MPU_RASR_ATTRS_BITS 0xffff0000 +#define M0PLUS_MPU_RASR_ATTRS_MSB 31 +#define M0PLUS_MPU_RASR_ATTRS_LSB 16 +#define M0PLUS_MPU_RASR_ATTRS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RASR_SRD +// Description : Subregion Disable. For regions of 256 bytes or larger, each bit +// of this field controls whether one of the eight equal +// subregions is enabled. +#define M0PLUS_MPU_RASR_SRD_RESET 0x00 +#define M0PLUS_MPU_RASR_SRD_BITS 0x0000ff00 +#define M0PLUS_MPU_RASR_SRD_MSB 15 +#define M0PLUS_MPU_RASR_SRD_LSB 8 +#define M0PLUS_MPU_RASR_SRD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RASR_SIZE +// Description : Indicates the region size. Region size in bytes = 2^(SIZE+1). +// The minimum permitted value is 7 (b00111) = 256Bytes +#define M0PLUS_MPU_RASR_SIZE_RESET 0x00 +#define M0PLUS_MPU_RASR_SIZE_BITS 0x0000003e +#define M0PLUS_MPU_RASR_SIZE_MSB 5 +#define M0PLUS_MPU_RASR_SIZE_LSB 1 +#define M0PLUS_MPU_RASR_SIZE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : M0PLUS_MPU_RASR_ENABLE +// Description : Enables the region. +#define M0PLUS_MPU_RASR_ENABLE_RESET 0x0 +#define M0PLUS_MPU_RASR_ENABLE_BITS 0x00000001 +#define M0PLUS_MPU_RASR_ENABLE_MSB 0 +#define M0PLUS_MPU_RASR_ENABLE_LSB 0 +#define M0PLUS_MPU_RASR_ENABLE_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_M0PLUS_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h new file mode 100644 index 0000000000..92242bd44d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_bank0.h @@ -0,0 +1,2300 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : PADS_BANK0 +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_PADS_BANK0_DEFINED +#define HARDWARE_REGS_PADS_BANK0_DEFINED +// ============================================================================= +// Register : PADS_BANK0_VOLTAGE_SELECT +// Description : Voltage select. Per bank control +// 0x0 -> Set voltage to 3.3V (DVDD >= 2V5) +// 0x1 -> Set voltage to 1.8V (DVDD <= 1V8) +#define PADS_BANK0_VOLTAGE_SELECT_OFFSET 0x00000000 +#define PADS_BANK0_VOLTAGE_SELECT_BITS 0x00000001 +#define PADS_BANK0_VOLTAGE_SELECT_RESET 0x00000000 +#define PADS_BANK0_VOLTAGE_SELECT_MSB 0 +#define PADS_BANK0_VOLTAGE_SELECT_LSB 0 +#define PADS_BANK0_VOLTAGE_SELECT_ACCESS "RW" +#define PADS_BANK0_VOLTAGE_SELECT_VALUE_3V3 0x0 +#define PADS_BANK0_VOLTAGE_SELECT_VALUE_1V8 0x1 +// ============================================================================= +// Register : PADS_BANK0_GPIO0 +// Description : Pad control register +#define PADS_BANK0_GPIO0_OFFSET 0x00000004 +#define PADS_BANK0_GPIO0_BITS 0x000000ff +#define PADS_BANK0_GPIO0_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO0_OD_RESET 0x0 +#define PADS_BANK0_GPIO0_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO0_OD_MSB 7 +#define PADS_BANK0_GPIO0_OD_LSB 7 +#define PADS_BANK0_GPIO0_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_IE +// Description : Input enable +#define PADS_BANK0_GPIO0_IE_RESET 0x1 +#define PADS_BANK0_GPIO0_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO0_IE_MSB 6 +#define PADS_BANK0_GPIO0_IE_LSB 6 +#define PADS_BANK0_GPIO0_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO0_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO0_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO0_DRIVE_MSB 5 +#define PADS_BANK0_GPIO0_DRIVE_LSB 4 +#define PADS_BANK0_GPIO0_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO0_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO0_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO0_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO0_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO0_PUE_RESET 0x0 +#define PADS_BANK0_GPIO0_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO0_PUE_MSB 3 +#define PADS_BANK0_GPIO0_PUE_LSB 3 +#define PADS_BANK0_GPIO0_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO0_PDE_RESET 0x1 +#define PADS_BANK0_GPIO0_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO0_PDE_MSB 2 +#define PADS_BANK0_GPIO0_PDE_LSB 2 +#define PADS_BANK0_GPIO0_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO0_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO0_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO0_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO0_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO0_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO0_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO0_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO0_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO0_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO0_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO0_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO1 +// Description : Pad control register +#define PADS_BANK0_GPIO1_OFFSET 0x00000008 +#define PADS_BANK0_GPIO1_BITS 0x000000ff +#define PADS_BANK0_GPIO1_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO1_OD_RESET 0x0 +#define PADS_BANK0_GPIO1_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO1_OD_MSB 7 +#define PADS_BANK0_GPIO1_OD_LSB 7 +#define PADS_BANK0_GPIO1_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_IE +// Description : Input enable +#define PADS_BANK0_GPIO1_IE_RESET 0x1 +#define PADS_BANK0_GPIO1_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO1_IE_MSB 6 +#define PADS_BANK0_GPIO1_IE_LSB 6 +#define PADS_BANK0_GPIO1_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO1_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO1_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO1_DRIVE_MSB 5 +#define PADS_BANK0_GPIO1_DRIVE_LSB 4 +#define PADS_BANK0_GPIO1_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO1_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO1_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO1_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO1_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO1_PUE_RESET 0x0 +#define PADS_BANK0_GPIO1_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO1_PUE_MSB 3 +#define PADS_BANK0_GPIO1_PUE_LSB 3 +#define PADS_BANK0_GPIO1_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO1_PDE_RESET 0x1 +#define PADS_BANK0_GPIO1_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO1_PDE_MSB 2 +#define PADS_BANK0_GPIO1_PDE_LSB 2 +#define PADS_BANK0_GPIO1_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO1_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO1_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO1_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO1_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO1_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO1_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO1_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO1_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO1_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO1_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO1_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO2 +// Description : Pad control register +#define PADS_BANK0_GPIO2_OFFSET 0x0000000c +#define PADS_BANK0_GPIO2_BITS 0x000000ff +#define PADS_BANK0_GPIO2_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO2_OD_RESET 0x0 +#define PADS_BANK0_GPIO2_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO2_OD_MSB 7 +#define PADS_BANK0_GPIO2_OD_LSB 7 +#define PADS_BANK0_GPIO2_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_IE +// Description : Input enable +#define PADS_BANK0_GPIO2_IE_RESET 0x1 +#define PADS_BANK0_GPIO2_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO2_IE_MSB 6 +#define PADS_BANK0_GPIO2_IE_LSB 6 +#define PADS_BANK0_GPIO2_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO2_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO2_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO2_DRIVE_MSB 5 +#define PADS_BANK0_GPIO2_DRIVE_LSB 4 +#define PADS_BANK0_GPIO2_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO2_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO2_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO2_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO2_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO2_PUE_RESET 0x0 +#define PADS_BANK0_GPIO2_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO2_PUE_MSB 3 +#define PADS_BANK0_GPIO2_PUE_LSB 3 +#define PADS_BANK0_GPIO2_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO2_PDE_RESET 0x1 +#define PADS_BANK0_GPIO2_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO2_PDE_MSB 2 +#define PADS_BANK0_GPIO2_PDE_LSB 2 +#define PADS_BANK0_GPIO2_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO2_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO2_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO2_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO2_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO2_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO2_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO2_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO2_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO2_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO2_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO2_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO3 +// Description : Pad control register +#define PADS_BANK0_GPIO3_OFFSET 0x00000010 +#define PADS_BANK0_GPIO3_BITS 0x000000ff +#define PADS_BANK0_GPIO3_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO3_OD_RESET 0x0 +#define PADS_BANK0_GPIO3_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO3_OD_MSB 7 +#define PADS_BANK0_GPIO3_OD_LSB 7 +#define PADS_BANK0_GPIO3_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_IE +// Description : Input enable +#define PADS_BANK0_GPIO3_IE_RESET 0x1 +#define PADS_BANK0_GPIO3_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO3_IE_MSB 6 +#define PADS_BANK0_GPIO3_IE_LSB 6 +#define PADS_BANK0_GPIO3_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO3_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO3_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO3_DRIVE_MSB 5 +#define PADS_BANK0_GPIO3_DRIVE_LSB 4 +#define PADS_BANK0_GPIO3_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO3_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO3_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO3_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO3_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO3_PUE_RESET 0x0 +#define PADS_BANK0_GPIO3_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO3_PUE_MSB 3 +#define PADS_BANK0_GPIO3_PUE_LSB 3 +#define PADS_BANK0_GPIO3_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO3_PDE_RESET 0x1 +#define PADS_BANK0_GPIO3_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO3_PDE_MSB 2 +#define PADS_BANK0_GPIO3_PDE_LSB 2 +#define PADS_BANK0_GPIO3_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO3_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO3_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO3_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO3_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO3_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO3_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO3_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO3_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO3_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO3_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO3_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO4 +// Description : Pad control register +#define PADS_BANK0_GPIO4_OFFSET 0x00000014 +#define PADS_BANK0_GPIO4_BITS 0x000000ff +#define PADS_BANK0_GPIO4_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO4_OD_RESET 0x0 +#define PADS_BANK0_GPIO4_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO4_OD_MSB 7 +#define PADS_BANK0_GPIO4_OD_LSB 7 +#define PADS_BANK0_GPIO4_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_IE +// Description : Input enable +#define PADS_BANK0_GPIO4_IE_RESET 0x1 +#define PADS_BANK0_GPIO4_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO4_IE_MSB 6 +#define PADS_BANK0_GPIO4_IE_LSB 6 +#define PADS_BANK0_GPIO4_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO4_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO4_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO4_DRIVE_MSB 5 +#define PADS_BANK0_GPIO4_DRIVE_LSB 4 +#define PADS_BANK0_GPIO4_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO4_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO4_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO4_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO4_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO4_PUE_RESET 0x0 +#define PADS_BANK0_GPIO4_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO4_PUE_MSB 3 +#define PADS_BANK0_GPIO4_PUE_LSB 3 +#define PADS_BANK0_GPIO4_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO4_PDE_RESET 0x1 +#define PADS_BANK0_GPIO4_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO4_PDE_MSB 2 +#define PADS_BANK0_GPIO4_PDE_LSB 2 +#define PADS_BANK0_GPIO4_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO4_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO4_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO4_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO4_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO4_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO4_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO4_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO4_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO4_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO4_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO4_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO5 +// Description : Pad control register +#define PADS_BANK0_GPIO5_OFFSET 0x00000018 +#define PADS_BANK0_GPIO5_BITS 0x000000ff +#define PADS_BANK0_GPIO5_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO5_OD_RESET 0x0 +#define PADS_BANK0_GPIO5_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO5_OD_MSB 7 +#define PADS_BANK0_GPIO5_OD_LSB 7 +#define PADS_BANK0_GPIO5_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_IE +// Description : Input enable +#define PADS_BANK0_GPIO5_IE_RESET 0x1 +#define PADS_BANK0_GPIO5_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO5_IE_MSB 6 +#define PADS_BANK0_GPIO5_IE_LSB 6 +#define PADS_BANK0_GPIO5_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO5_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO5_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO5_DRIVE_MSB 5 +#define PADS_BANK0_GPIO5_DRIVE_LSB 4 +#define PADS_BANK0_GPIO5_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO5_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO5_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO5_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO5_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO5_PUE_RESET 0x0 +#define PADS_BANK0_GPIO5_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO5_PUE_MSB 3 +#define PADS_BANK0_GPIO5_PUE_LSB 3 +#define PADS_BANK0_GPIO5_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO5_PDE_RESET 0x1 +#define PADS_BANK0_GPIO5_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO5_PDE_MSB 2 +#define PADS_BANK0_GPIO5_PDE_LSB 2 +#define PADS_BANK0_GPIO5_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO5_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO5_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO5_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO5_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO5_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO5_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO5_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO5_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO5_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO5_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO5_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO6 +// Description : Pad control register +#define PADS_BANK0_GPIO6_OFFSET 0x0000001c +#define PADS_BANK0_GPIO6_BITS 0x000000ff +#define PADS_BANK0_GPIO6_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO6_OD_RESET 0x0 +#define PADS_BANK0_GPIO6_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO6_OD_MSB 7 +#define PADS_BANK0_GPIO6_OD_LSB 7 +#define PADS_BANK0_GPIO6_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_IE +// Description : Input enable +#define PADS_BANK0_GPIO6_IE_RESET 0x1 +#define PADS_BANK0_GPIO6_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO6_IE_MSB 6 +#define PADS_BANK0_GPIO6_IE_LSB 6 +#define PADS_BANK0_GPIO6_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO6_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO6_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO6_DRIVE_MSB 5 +#define PADS_BANK0_GPIO6_DRIVE_LSB 4 +#define PADS_BANK0_GPIO6_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO6_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO6_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO6_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO6_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO6_PUE_RESET 0x0 +#define PADS_BANK0_GPIO6_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO6_PUE_MSB 3 +#define PADS_BANK0_GPIO6_PUE_LSB 3 +#define PADS_BANK0_GPIO6_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO6_PDE_RESET 0x1 +#define PADS_BANK0_GPIO6_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO6_PDE_MSB 2 +#define PADS_BANK0_GPIO6_PDE_LSB 2 +#define PADS_BANK0_GPIO6_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO6_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO6_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO6_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO6_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO6_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO6_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO6_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO6_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO6_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO6_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO6_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO7 +// Description : Pad control register +#define PADS_BANK0_GPIO7_OFFSET 0x00000020 +#define PADS_BANK0_GPIO7_BITS 0x000000ff +#define PADS_BANK0_GPIO7_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO7_OD_RESET 0x0 +#define PADS_BANK0_GPIO7_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO7_OD_MSB 7 +#define PADS_BANK0_GPIO7_OD_LSB 7 +#define PADS_BANK0_GPIO7_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_IE +// Description : Input enable +#define PADS_BANK0_GPIO7_IE_RESET 0x1 +#define PADS_BANK0_GPIO7_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO7_IE_MSB 6 +#define PADS_BANK0_GPIO7_IE_LSB 6 +#define PADS_BANK0_GPIO7_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO7_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO7_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO7_DRIVE_MSB 5 +#define PADS_BANK0_GPIO7_DRIVE_LSB 4 +#define PADS_BANK0_GPIO7_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO7_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO7_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO7_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO7_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO7_PUE_RESET 0x0 +#define PADS_BANK0_GPIO7_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO7_PUE_MSB 3 +#define PADS_BANK0_GPIO7_PUE_LSB 3 +#define PADS_BANK0_GPIO7_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO7_PDE_RESET 0x1 +#define PADS_BANK0_GPIO7_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO7_PDE_MSB 2 +#define PADS_BANK0_GPIO7_PDE_LSB 2 +#define PADS_BANK0_GPIO7_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO7_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO7_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO7_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO7_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO7_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO7_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO7_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO7_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO7_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO7_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO7_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO8 +// Description : Pad control register +#define PADS_BANK0_GPIO8_OFFSET 0x00000024 +#define PADS_BANK0_GPIO8_BITS 0x000000ff +#define PADS_BANK0_GPIO8_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO8_OD_RESET 0x0 +#define PADS_BANK0_GPIO8_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO8_OD_MSB 7 +#define PADS_BANK0_GPIO8_OD_LSB 7 +#define PADS_BANK0_GPIO8_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_IE +// Description : Input enable +#define PADS_BANK0_GPIO8_IE_RESET 0x1 +#define PADS_BANK0_GPIO8_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO8_IE_MSB 6 +#define PADS_BANK0_GPIO8_IE_LSB 6 +#define PADS_BANK0_GPIO8_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO8_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO8_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO8_DRIVE_MSB 5 +#define PADS_BANK0_GPIO8_DRIVE_LSB 4 +#define PADS_BANK0_GPIO8_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO8_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO8_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO8_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO8_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO8_PUE_RESET 0x0 +#define PADS_BANK0_GPIO8_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO8_PUE_MSB 3 +#define PADS_BANK0_GPIO8_PUE_LSB 3 +#define PADS_BANK0_GPIO8_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO8_PDE_RESET 0x1 +#define PADS_BANK0_GPIO8_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO8_PDE_MSB 2 +#define PADS_BANK0_GPIO8_PDE_LSB 2 +#define PADS_BANK0_GPIO8_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO8_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO8_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO8_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO8_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO8_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO8_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO8_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO8_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO8_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO8_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO8_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO9 +// Description : Pad control register +#define PADS_BANK0_GPIO9_OFFSET 0x00000028 +#define PADS_BANK0_GPIO9_BITS 0x000000ff +#define PADS_BANK0_GPIO9_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO9_OD_RESET 0x0 +#define PADS_BANK0_GPIO9_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO9_OD_MSB 7 +#define PADS_BANK0_GPIO9_OD_LSB 7 +#define PADS_BANK0_GPIO9_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_IE +// Description : Input enable +#define PADS_BANK0_GPIO9_IE_RESET 0x1 +#define PADS_BANK0_GPIO9_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO9_IE_MSB 6 +#define PADS_BANK0_GPIO9_IE_LSB 6 +#define PADS_BANK0_GPIO9_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO9_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO9_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO9_DRIVE_MSB 5 +#define PADS_BANK0_GPIO9_DRIVE_LSB 4 +#define PADS_BANK0_GPIO9_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO9_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO9_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO9_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO9_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO9_PUE_RESET 0x0 +#define PADS_BANK0_GPIO9_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO9_PUE_MSB 3 +#define PADS_BANK0_GPIO9_PUE_LSB 3 +#define PADS_BANK0_GPIO9_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO9_PDE_RESET 0x1 +#define PADS_BANK0_GPIO9_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO9_PDE_MSB 2 +#define PADS_BANK0_GPIO9_PDE_LSB 2 +#define PADS_BANK0_GPIO9_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO9_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO9_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO9_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO9_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO9_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO9_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO9_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO9_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO9_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO9_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO9_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO10 +// Description : Pad control register +#define PADS_BANK0_GPIO10_OFFSET 0x0000002c +#define PADS_BANK0_GPIO10_BITS 0x000000ff +#define PADS_BANK0_GPIO10_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO10_OD_RESET 0x0 +#define PADS_BANK0_GPIO10_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO10_OD_MSB 7 +#define PADS_BANK0_GPIO10_OD_LSB 7 +#define PADS_BANK0_GPIO10_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_IE +// Description : Input enable +#define PADS_BANK0_GPIO10_IE_RESET 0x1 +#define PADS_BANK0_GPIO10_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO10_IE_MSB 6 +#define PADS_BANK0_GPIO10_IE_LSB 6 +#define PADS_BANK0_GPIO10_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO10_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO10_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO10_DRIVE_MSB 5 +#define PADS_BANK0_GPIO10_DRIVE_LSB 4 +#define PADS_BANK0_GPIO10_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO10_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO10_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO10_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO10_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO10_PUE_RESET 0x0 +#define PADS_BANK0_GPIO10_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO10_PUE_MSB 3 +#define PADS_BANK0_GPIO10_PUE_LSB 3 +#define PADS_BANK0_GPIO10_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO10_PDE_RESET 0x1 +#define PADS_BANK0_GPIO10_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO10_PDE_MSB 2 +#define PADS_BANK0_GPIO10_PDE_LSB 2 +#define PADS_BANK0_GPIO10_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO10_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO10_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO10_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO10_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO10_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO10_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO10_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO10_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO10_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO10_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO10_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO11 +// Description : Pad control register +#define PADS_BANK0_GPIO11_OFFSET 0x00000030 +#define PADS_BANK0_GPIO11_BITS 0x000000ff +#define PADS_BANK0_GPIO11_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO11_OD_RESET 0x0 +#define PADS_BANK0_GPIO11_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO11_OD_MSB 7 +#define PADS_BANK0_GPIO11_OD_LSB 7 +#define PADS_BANK0_GPIO11_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_IE +// Description : Input enable +#define PADS_BANK0_GPIO11_IE_RESET 0x1 +#define PADS_BANK0_GPIO11_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO11_IE_MSB 6 +#define PADS_BANK0_GPIO11_IE_LSB 6 +#define PADS_BANK0_GPIO11_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO11_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO11_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO11_DRIVE_MSB 5 +#define PADS_BANK0_GPIO11_DRIVE_LSB 4 +#define PADS_BANK0_GPIO11_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO11_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO11_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO11_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO11_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO11_PUE_RESET 0x0 +#define PADS_BANK0_GPIO11_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO11_PUE_MSB 3 +#define PADS_BANK0_GPIO11_PUE_LSB 3 +#define PADS_BANK0_GPIO11_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO11_PDE_RESET 0x1 +#define PADS_BANK0_GPIO11_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO11_PDE_MSB 2 +#define PADS_BANK0_GPIO11_PDE_LSB 2 +#define PADS_BANK0_GPIO11_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO11_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO11_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO11_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO11_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO11_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO11_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO11_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO11_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO11_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO11_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO11_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO12 +// Description : Pad control register +#define PADS_BANK0_GPIO12_OFFSET 0x00000034 +#define PADS_BANK0_GPIO12_BITS 0x000000ff +#define PADS_BANK0_GPIO12_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO12_OD_RESET 0x0 +#define PADS_BANK0_GPIO12_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO12_OD_MSB 7 +#define PADS_BANK0_GPIO12_OD_LSB 7 +#define PADS_BANK0_GPIO12_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_IE +// Description : Input enable +#define PADS_BANK0_GPIO12_IE_RESET 0x1 +#define PADS_BANK0_GPIO12_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO12_IE_MSB 6 +#define PADS_BANK0_GPIO12_IE_LSB 6 +#define PADS_BANK0_GPIO12_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO12_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO12_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO12_DRIVE_MSB 5 +#define PADS_BANK0_GPIO12_DRIVE_LSB 4 +#define PADS_BANK0_GPIO12_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO12_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO12_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO12_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO12_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO12_PUE_RESET 0x0 +#define PADS_BANK0_GPIO12_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO12_PUE_MSB 3 +#define PADS_BANK0_GPIO12_PUE_LSB 3 +#define PADS_BANK0_GPIO12_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO12_PDE_RESET 0x1 +#define PADS_BANK0_GPIO12_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO12_PDE_MSB 2 +#define PADS_BANK0_GPIO12_PDE_LSB 2 +#define PADS_BANK0_GPIO12_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO12_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO12_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO12_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO12_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO12_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO12_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO12_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO12_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO12_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO12_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO12_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO13 +// Description : Pad control register +#define PADS_BANK0_GPIO13_OFFSET 0x00000038 +#define PADS_BANK0_GPIO13_BITS 0x000000ff +#define PADS_BANK0_GPIO13_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO13_OD_RESET 0x0 +#define PADS_BANK0_GPIO13_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO13_OD_MSB 7 +#define PADS_BANK0_GPIO13_OD_LSB 7 +#define PADS_BANK0_GPIO13_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_IE +// Description : Input enable +#define PADS_BANK0_GPIO13_IE_RESET 0x1 +#define PADS_BANK0_GPIO13_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO13_IE_MSB 6 +#define PADS_BANK0_GPIO13_IE_LSB 6 +#define PADS_BANK0_GPIO13_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO13_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO13_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO13_DRIVE_MSB 5 +#define PADS_BANK0_GPIO13_DRIVE_LSB 4 +#define PADS_BANK0_GPIO13_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO13_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO13_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO13_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO13_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO13_PUE_RESET 0x0 +#define PADS_BANK0_GPIO13_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO13_PUE_MSB 3 +#define PADS_BANK0_GPIO13_PUE_LSB 3 +#define PADS_BANK0_GPIO13_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO13_PDE_RESET 0x1 +#define PADS_BANK0_GPIO13_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO13_PDE_MSB 2 +#define PADS_BANK0_GPIO13_PDE_LSB 2 +#define PADS_BANK0_GPIO13_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO13_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO13_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO13_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO13_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO13_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO13_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO13_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO13_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO13_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO13_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO13_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO14 +// Description : Pad control register +#define PADS_BANK0_GPIO14_OFFSET 0x0000003c +#define PADS_BANK0_GPIO14_BITS 0x000000ff +#define PADS_BANK0_GPIO14_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO14_OD_RESET 0x0 +#define PADS_BANK0_GPIO14_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO14_OD_MSB 7 +#define PADS_BANK0_GPIO14_OD_LSB 7 +#define PADS_BANK0_GPIO14_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_IE +// Description : Input enable +#define PADS_BANK0_GPIO14_IE_RESET 0x1 +#define PADS_BANK0_GPIO14_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO14_IE_MSB 6 +#define PADS_BANK0_GPIO14_IE_LSB 6 +#define PADS_BANK0_GPIO14_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO14_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO14_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO14_DRIVE_MSB 5 +#define PADS_BANK0_GPIO14_DRIVE_LSB 4 +#define PADS_BANK0_GPIO14_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO14_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO14_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO14_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO14_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO14_PUE_RESET 0x0 +#define PADS_BANK0_GPIO14_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO14_PUE_MSB 3 +#define PADS_BANK0_GPIO14_PUE_LSB 3 +#define PADS_BANK0_GPIO14_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO14_PDE_RESET 0x1 +#define PADS_BANK0_GPIO14_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO14_PDE_MSB 2 +#define PADS_BANK0_GPIO14_PDE_LSB 2 +#define PADS_BANK0_GPIO14_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO14_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO14_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO14_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO14_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO14_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO14_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO14_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO14_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO14_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO14_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO14_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO15 +// Description : Pad control register +#define PADS_BANK0_GPIO15_OFFSET 0x00000040 +#define PADS_BANK0_GPIO15_BITS 0x000000ff +#define PADS_BANK0_GPIO15_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO15_OD_RESET 0x0 +#define PADS_BANK0_GPIO15_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO15_OD_MSB 7 +#define PADS_BANK0_GPIO15_OD_LSB 7 +#define PADS_BANK0_GPIO15_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_IE +// Description : Input enable +#define PADS_BANK0_GPIO15_IE_RESET 0x1 +#define PADS_BANK0_GPIO15_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO15_IE_MSB 6 +#define PADS_BANK0_GPIO15_IE_LSB 6 +#define PADS_BANK0_GPIO15_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO15_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO15_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO15_DRIVE_MSB 5 +#define PADS_BANK0_GPIO15_DRIVE_LSB 4 +#define PADS_BANK0_GPIO15_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO15_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO15_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO15_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO15_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO15_PUE_RESET 0x0 +#define PADS_BANK0_GPIO15_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO15_PUE_MSB 3 +#define PADS_BANK0_GPIO15_PUE_LSB 3 +#define PADS_BANK0_GPIO15_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO15_PDE_RESET 0x1 +#define PADS_BANK0_GPIO15_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO15_PDE_MSB 2 +#define PADS_BANK0_GPIO15_PDE_LSB 2 +#define PADS_BANK0_GPIO15_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO15_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO15_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO15_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO15_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO15_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO15_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO15_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO15_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO15_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO15_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO15_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO16 +// Description : Pad control register +#define PADS_BANK0_GPIO16_OFFSET 0x00000044 +#define PADS_BANK0_GPIO16_BITS 0x000000ff +#define PADS_BANK0_GPIO16_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO16_OD_RESET 0x0 +#define PADS_BANK0_GPIO16_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO16_OD_MSB 7 +#define PADS_BANK0_GPIO16_OD_LSB 7 +#define PADS_BANK0_GPIO16_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_IE +// Description : Input enable +#define PADS_BANK0_GPIO16_IE_RESET 0x1 +#define PADS_BANK0_GPIO16_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO16_IE_MSB 6 +#define PADS_BANK0_GPIO16_IE_LSB 6 +#define PADS_BANK0_GPIO16_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO16_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO16_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO16_DRIVE_MSB 5 +#define PADS_BANK0_GPIO16_DRIVE_LSB 4 +#define PADS_BANK0_GPIO16_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO16_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO16_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO16_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO16_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO16_PUE_RESET 0x0 +#define PADS_BANK0_GPIO16_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO16_PUE_MSB 3 +#define PADS_BANK0_GPIO16_PUE_LSB 3 +#define PADS_BANK0_GPIO16_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO16_PDE_RESET 0x1 +#define PADS_BANK0_GPIO16_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO16_PDE_MSB 2 +#define PADS_BANK0_GPIO16_PDE_LSB 2 +#define PADS_BANK0_GPIO16_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO16_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO16_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO16_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO16_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO16_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO16_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO16_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO16_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO16_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO16_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO16_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO17 +// Description : Pad control register +#define PADS_BANK0_GPIO17_OFFSET 0x00000048 +#define PADS_BANK0_GPIO17_BITS 0x000000ff +#define PADS_BANK0_GPIO17_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO17_OD_RESET 0x0 +#define PADS_BANK0_GPIO17_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO17_OD_MSB 7 +#define PADS_BANK0_GPIO17_OD_LSB 7 +#define PADS_BANK0_GPIO17_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_IE +// Description : Input enable +#define PADS_BANK0_GPIO17_IE_RESET 0x1 +#define PADS_BANK0_GPIO17_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO17_IE_MSB 6 +#define PADS_BANK0_GPIO17_IE_LSB 6 +#define PADS_BANK0_GPIO17_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO17_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO17_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO17_DRIVE_MSB 5 +#define PADS_BANK0_GPIO17_DRIVE_LSB 4 +#define PADS_BANK0_GPIO17_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO17_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO17_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO17_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO17_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO17_PUE_RESET 0x0 +#define PADS_BANK0_GPIO17_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO17_PUE_MSB 3 +#define PADS_BANK0_GPIO17_PUE_LSB 3 +#define PADS_BANK0_GPIO17_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO17_PDE_RESET 0x1 +#define PADS_BANK0_GPIO17_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO17_PDE_MSB 2 +#define PADS_BANK0_GPIO17_PDE_LSB 2 +#define PADS_BANK0_GPIO17_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO17_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO17_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO17_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO17_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO17_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO17_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO17_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO17_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO17_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO17_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO17_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO18 +// Description : Pad control register +#define PADS_BANK0_GPIO18_OFFSET 0x0000004c +#define PADS_BANK0_GPIO18_BITS 0x000000ff +#define PADS_BANK0_GPIO18_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO18_OD_RESET 0x0 +#define PADS_BANK0_GPIO18_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO18_OD_MSB 7 +#define PADS_BANK0_GPIO18_OD_LSB 7 +#define PADS_BANK0_GPIO18_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_IE +// Description : Input enable +#define PADS_BANK0_GPIO18_IE_RESET 0x1 +#define PADS_BANK0_GPIO18_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO18_IE_MSB 6 +#define PADS_BANK0_GPIO18_IE_LSB 6 +#define PADS_BANK0_GPIO18_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO18_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO18_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO18_DRIVE_MSB 5 +#define PADS_BANK0_GPIO18_DRIVE_LSB 4 +#define PADS_BANK0_GPIO18_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO18_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO18_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO18_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO18_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO18_PUE_RESET 0x0 +#define PADS_BANK0_GPIO18_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO18_PUE_MSB 3 +#define PADS_BANK0_GPIO18_PUE_LSB 3 +#define PADS_BANK0_GPIO18_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO18_PDE_RESET 0x1 +#define PADS_BANK0_GPIO18_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO18_PDE_MSB 2 +#define PADS_BANK0_GPIO18_PDE_LSB 2 +#define PADS_BANK0_GPIO18_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO18_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO18_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO18_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO18_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO18_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO18_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO18_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO18_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO18_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO18_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO18_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO19 +// Description : Pad control register +#define PADS_BANK0_GPIO19_OFFSET 0x00000050 +#define PADS_BANK0_GPIO19_BITS 0x000000ff +#define PADS_BANK0_GPIO19_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO19_OD_RESET 0x0 +#define PADS_BANK0_GPIO19_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO19_OD_MSB 7 +#define PADS_BANK0_GPIO19_OD_LSB 7 +#define PADS_BANK0_GPIO19_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_IE +// Description : Input enable +#define PADS_BANK0_GPIO19_IE_RESET 0x1 +#define PADS_BANK0_GPIO19_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO19_IE_MSB 6 +#define PADS_BANK0_GPIO19_IE_LSB 6 +#define PADS_BANK0_GPIO19_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO19_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO19_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO19_DRIVE_MSB 5 +#define PADS_BANK0_GPIO19_DRIVE_LSB 4 +#define PADS_BANK0_GPIO19_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO19_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO19_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO19_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO19_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO19_PUE_RESET 0x0 +#define PADS_BANK0_GPIO19_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO19_PUE_MSB 3 +#define PADS_BANK0_GPIO19_PUE_LSB 3 +#define PADS_BANK0_GPIO19_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO19_PDE_RESET 0x1 +#define PADS_BANK0_GPIO19_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO19_PDE_MSB 2 +#define PADS_BANK0_GPIO19_PDE_LSB 2 +#define PADS_BANK0_GPIO19_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO19_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO19_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO19_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO19_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO19_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO19_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO19_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO19_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO19_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO19_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO19_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO20 +// Description : Pad control register +#define PADS_BANK0_GPIO20_OFFSET 0x00000054 +#define PADS_BANK0_GPIO20_BITS 0x000000ff +#define PADS_BANK0_GPIO20_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO20_OD_RESET 0x0 +#define PADS_BANK0_GPIO20_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO20_OD_MSB 7 +#define PADS_BANK0_GPIO20_OD_LSB 7 +#define PADS_BANK0_GPIO20_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_IE +// Description : Input enable +#define PADS_BANK0_GPIO20_IE_RESET 0x1 +#define PADS_BANK0_GPIO20_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO20_IE_MSB 6 +#define PADS_BANK0_GPIO20_IE_LSB 6 +#define PADS_BANK0_GPIO20_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO20_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO20_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO20_DRIVE_MSB 5 +#define PADS_BANK0_GPIO20_DRIVE_LSB 4 +#define PADS_BANK0_GPIO20_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO20_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO20_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO20_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO20_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO20_PUE_RESET 0x0 +#define PADS_BANK0_GPIO20_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO20_PUE_MSB 3 +#define PADS_BANK0_GPIO20_PUE_LSB 3 +#define PADS_BANK0_GPIO20_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO20_PDE_RESET 0x1 +#define PADS_BANK0_GPIO20_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO20_PDE_MSB 2 +#define PADS_BANK0_GPIO20_PDE_LSB 2 +#define PADS_BANK0_GPIO20_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO20_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO20_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO20_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO20_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO20_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO20_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO20_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO20_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO20_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO20_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO20_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO21 +// Description : Pad control register +#define PADS_BANK0_GPIO21_OFFSET 0x00000058 +#define PADS_BANK0_GPIO21_BITS 0x000000ff +#define PADS_BANK0_GPIO21_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO21_OD_RESET 0x0 +#define PADS_BANK0_GPIO21_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO21_OD_MSB 7 +#define PADS_BANK0_GPIO21_OD_LSB 7 +#define PADS_BANK0_GPIO21_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_IE +// Description : Input enable +#define PADS_BANK0_GPIO21_IE_RESET 0x1 +#define PADS_BANK0_GPIO21_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO21_IE_MSB 6 +#define PADS_BANK0_GPIO21_IE_LSB 6 +#define PADS_BANK0_GPIO21_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO21_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO21_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO21_DRIVE_MSB 5 +#define PADS_BANK0_GPIO21_DRIVE_LSB 4 +#define PADS_BANK0_GPIO21_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO21_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO21_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO21_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO21_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO21_PUE_RESET 0x0 +#define PADS_BANK0_GPIO21_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO21_PUE_MSB 3 +#define PADS_BANK0_GPIO21_PUE_LSB 3 +#define PADS_BANK0_GPIO21_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO21_PDE_RESET 0x1 +#define PADS_BANK0_GPIO21_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO21_PDE_MSB 2 +#define PADS_BANK0_GPIO21_PDE_LSB 2 +#define PADS_BANK0_GPIO21_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO21_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO21_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO21_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO21_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO21_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO21_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO21_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO21_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO21_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO21_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO21_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO22 +// Description : Pad control register +#define PADS_BANK0_GPIO22_OFFSET 0x0000005c +#define PADS_BANK0_GPIO22_BITS 0x000000ff +#define PADS_BANK0_GPIO22_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO22_OD_RESET 0x0 +#define PADS_BANK0_GPIO22_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO22_OD_MSB 7 +#define PADS_BANK0_GPIO22_OD_LSB 7 +#define PADS_BANK0_GPIO22_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_IE +// Description : Input enable +#define PADS_BANK0_GPIO22_IE_RESET 0x1 +#define PADS_BANK0_GPIO22_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO22_IE_MSB 6 +#define PADS_BANK0_GPIO22_IE_LSB 6 +#define PADS_BANK0_GPIO22_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO22_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO22_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO22_DRIVE_MSB 5 +#define PADS_BANK0_GPIO22_DRIVE_LSB 4 +#define PADS_BANK0_GPIO22_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO22_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO22_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO22_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO22_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO22_PUE_RESET 0x0 +#define PADS_BANK0_GPIO22_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO22_PUE_MSB 3 +#define PADS_BANK0_GPIO22_PUE_LSB 3 +#define PADS_BANK0_GPIO22_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO22_PDE_RESET 0x1 +#define PADS_BANK0_GPIO22_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO22_PDE_MSB 2 +#define PADS_BANK0_GPIO22_PDE_LSB 2 +#define PADS_BANK0_GPIO22_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO22_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO22_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO22_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO22_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO22_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO22_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO22_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO22_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO22_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO22_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO22_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO23 +// Description : Pad control register +#define PADS_BANK0_GPIO23_OFFSET 0x00000060 +#define PADS_BANK0_GPIO23_BITS 0x000000ff +#define PADS_BANK0_GPIO23_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO23_OD_RESET 0x0 +#define PADS_BANK0_GPIO23_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO23_OD_MSB 7 +#define PADS_BANK0_GPIO23_OD_LSB 7 +#define PADS_BANK0_GPIO23_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_IE +// Description : Input enable +#define PADS_BANK0_GPIO23_IE_RESET 0x1 +#define PADS_BANK0_GPIO23_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO23_IE_MSB 6 +#define PADS_BANK0_GPIO23_IE_LSB 6 +#define PADS_BANK0_GPIO23_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO23_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO23_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO23_DRIVE_MSB 5 +#define PADS_BANK0_GPIO23_DRIVE_LSB 4 +#define PADS_BANK0_GPIO23_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO23_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO23_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO23_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO23_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO23_PUE_RESET 0x0 +#define PADS_BANK0_GPIO23_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO23_PUE_MSB 3 +#define PADS_BANK0_GPIO23_PUE_LSB 3 +#define PADS_BANK0_GPIO23_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO23_PDE_RESET 0x1 +#define PADS_BANK0_GPIO23_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO23_PDE_MSB 2 +#define PADS_BANK0_GPIO23_PDE_LSB 2 +#define PADS_BANK0_GPIO23_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO23_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO23_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO23_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO23_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO23_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO23_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO23_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO23_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO23_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO23_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO23_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO24 +// Description : Pad control register +#define PADS_BANK0_GPIO24_OFFSET 0x00000064 +#define PADS_BANK0_GPIO24_BITS 0x000000ff +#define PADS_BANK0_GPIO24_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO24_OD_RESET 0x0 +#define PADS_BANK0_GPIO24_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO24_OD_MSB 7 +#define PADS_BANK0_GPIO24_OD_LSB 7 +#define PADS_BANK0_GPIO24_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_IE +// Description : Input enable +#define PADS_BANK0_GPIO24_IE_RESET 0x1 +#define PADS_BANK0_GPIO24_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO24_IE_MSB 6 +#define PADS_BANK0_GPIO24_IE_LSB 6 +#define PADS_BANK0_GPIO24_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO24_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO24_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO24_DRIVE_MSB 5 +#define PADS_BANK0_GPIO24_DRIVE_LSB 4 +#define PADS_BANK0_GPIO24_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO24_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO24_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO24_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO24_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO24_PUE_RESET 0x0 +#define PADS_BANK0_GPIO24_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO24_PUE_MSB 3 +#define PADS_BANK0_GPIO24_PUE_LSB 3 +#define PADS_BANK0_GPIO24_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO24_PDE_RESET 0x1 +#define PADS_BANK0_GPIO24_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO24_PDE_MSB 2 +#define PADS_BANK0_GPIO24_PDE_LSB 2 +#define PADS_BANK0_GPIO24_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO24_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO24_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO24_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO24_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO24_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO24_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO24_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO24_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO24_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO24_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO24_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO25 +// Description : Pad control register +#define PADS_BANK0_GPIO25_OFFSET 0x00000068 +#define PADS_BANK0_GPIO25_BITS 0x000000ff +#define PADS_BANK0_GPIO25_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO25_OD_RESET 0x0 +#define PADS_BANK0_GPIO25_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO25_OD_MSB 7 +#define PADS_BANK0_GPIO25_OD_LSB 7 +#define PADS_BANK0_GPIO25_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_IE +// Description : Input enable +#define PADS_BANK0_GPIO25_IE_RESET 0x1 +#define PADS_BANK0_GPIO25_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO25_IE_MSB 6 +#define PADS_BANK0_GPIO25_IE_LSB 6 +#define PADS_BANK0_GPIO25_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO25_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO25_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO25_DRIVE_MSB 5 +#define PADS_BANK0_GPIO25_DRIVE_LSB 4 +#define PADS_BANK0_GPIO25_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO25_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO25_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO25_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO25_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO25_PUE_RESET 0x0 +#define PADS_BANK0_GPIO25_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO25_PUE_MSB 3 +#define PADS_BANK0_GPIO25_PUE_LSB 3 +#define PADS_BANK0_GPIO25_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO25_PDE_RESET 0x1 +#define PADS_BANK0_GPIO25_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO25_PDE_MSB 2 +#define PADS_BANK0_GPIO25_PDE_LSB 2 +#define PADS_BANK0_GPIO25_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO25_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO25_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO25_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO25_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO25_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO25_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO25_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO25_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO25_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO25_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO25_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO26 +// Description : Pad control register +#define PADS_BANK0_GPIO26_OFFSET 0x0000006c +#define PADS_BANK0_GPIO26_BITS 0x000000ff +#define PADS_BANK0_GPIO26_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO26_OD_RESET 0x0 +#define PADS_BANK0_GPIO26_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO26_OD_MSB 7 +#define PADS_BANK0_GPIO26_OD_LSB 7 +#define PADS_BANK0_GPIO26_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_IE +// Description : Input enable +#define PADS_BANK0_GPIO26_IE_RESET 0x1 +#define PADS_BANK0_GPIO26_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO26_IE_MSB 6 +#define PADS_BANK0_GPIO26_IE_LSB 6 +#define PADS_BANK0_GPIO26_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO26_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO26_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO26_DRIVE_MSB 5 +#define PADS_BANK0_GPIO26_DRIVE_LSB 4 +#define PADS_BANK0_GPIO26_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO26_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO26_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO26_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO26_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO26_PUE_RESET 0x0 +#define PADS_BANK0_GPIO26_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO26_PUE_MSB 3 +#define PADS_BANK0_GPIO26_PUE_LSB 3 +#define PADS_BANK0_GPIO26_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO26_PDE_RESET 0x1 +#define PADS_BANK0_GPIO26_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO26_PDE_MSB 2 +#define PADS_BANK0_GPIO26_PDE_LSB 2 +#define PADS_BANK0_GPIO26_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO26_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO26_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO26_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO26_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO26_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO26_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO26_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO26_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO26_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO26_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO26_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO27 +// Description : Pad control register +#define PADS_BANK0_GPIO27_OFFSET 0x00000070 +#define PADS_BANK0_GPIO27_BITS 0x000000ff +#define PADS_BANK0_GPIO27_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO27_OD_RESET 0x0 +#define PADS_BANK0_GPIO27_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO27_OD_MSB 7 +#define PADS_BANK0_GPIO27_OD_LSB 7 +#define PADS_BANK0_GPIO27_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_IE +// Description : Input enable +#define PADS_BANK0_GPIO27_IE_RESET 0x1 +#define PADS_BANK0_GPIO27_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO27_IE_MSB 6 +#define PADS_BANK0_GPIO27_IE_LSB 6 +#define PADS_BANK0_GPIO27_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO27_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO27_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO27_DRIVE_MSB 5 +#define PADS_BANK0_GPIO27_DRIVE_LSB 4 +#define PADS_BANK0_GPIO27_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO27_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO27_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO27_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO27_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO27_PUE_RESET 0x0 +#define PADS_BANK0_GPIO27_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO27_PUE_MSB 3 +#define PADS_BANK0_GPIO27_PUE_LSB 3 +#define PADS_BANK0_GPIO27_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO27_PDE_RESET 0x1 +#define PADS_BANK0_GPIO27_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO27_PDE_MSB 2 +#define PADS_BANK0_GPIO27_PDE_LSB 2 +#define PADS_BANK0_GPIO27_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO27_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO27_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO27_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO27_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO27_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO27_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO27_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO27_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO27_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO27_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO27_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO28 +// Description : Pad control register +#define PADS_BANK0_GPIO28_OFFSET 0x00000074 +#define PADS_BANK0_GPIO28_BITS 0x000000ff +#define PADS_BANK0_GPIO28_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO28_OD_RESET 0x0 +#define PADS_BANK0_GPIO28_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO28_OD_MSB 7 +#define PADS_BANK0_GPIO28_OD_LSB 7 +#define PADS_BANK0_GPIO28_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_IE +// Description : Input enable +#define PADS_BANK0_GPIO28_IE_RESET 0x1 +#define PADS_BANK0_GPIO28_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO28_IE_MSB 6 +#define PADS_BANK0_GPIO28_IE_LSB 6 +#define PADS_BANK0_GPIO28_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO28_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO28_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO28_DRIVE_MSB 5 +#define PADS_BANK0_GPIO28_DRIVE_LSB 4 +#define PADS_BANK0_GPIO28_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO28_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO28_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO28_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO28_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO28_PUE_RESET 0x0 +#define PADS_BANK0_GPIO28_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO28_PUE_MSB 3 +#define PADS_BANK0_GPIO28_PUE_LSB 3 +#define PADS_BANK0_GPIO28_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO28_PDE_RESET 0x1 +#define PADS_BANK0_GPIO28_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO28_PDE_MSB 2 +#define PADS_BANK0_GPIO28_PDE_LSB 2 +#define PADS_BANK0_GPIO28_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO28_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO28_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO28_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO28_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO28_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO28_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO28_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO28_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO28_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO28_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO28_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_GPIO29 +// Description : Pad control register +#define PADS_BANK0_GPIO29_OFFSET 0x00000078 +#define PADS_BANK0_GPIO29_BITS 0x000000ff +#define PADS_BANK0_GPIO29_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_GPIO29_OD_RESET 0x0 +#define PADS_BANK0_GPIO29_OD_BITS 0x00000080 +#define PADS_BANK0_GPIO29_OD_MSB 7 +#define PADS_BANK0_GPIO29_OD_LSB 7 +#define PADS_BANK0_GPIO29_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_IE +// Description : Input enable +#define PADS_BANK0_GPIO29_IE_RESET 0x1 +#define PADS_BANK0_GPIO29_IE_BITS 0x00000040 +#define PADS_BANK0_GPIO29_IE_MSB 6 +#define PADS_BANK0_GPIO29_IE_LSB 6 +#define PADS_BANK0_GPIO29_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_GPIO29_DRIVE_RESET 0x1 +#define PADS_BANK0_GPIO29_DRIVE_BITS 0x00000030 +#define PADS_BANK0_GPIO29_DRIVE_MSB 5 +#define PADS_BANK0_GPIO29_DRIVE_LSB 4 +#define PADS_BANK0_GPIO29_DRIVE_ACCESS "RW" +#define PADS_BANK0_GPIO29_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_GPIO29_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_GPIO29_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_GPIO29_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_PUE +// Description : Pull up enable +#define PADS_BANK0_GPIO29_PUE_RESET 0x0 +#define PADS_BANK0_GPIO29_PUE_BITS 0x00000008 +#define PADS_BANK0_GPIO29_PUE_MSB 3 +#define PADS_BANK0_GPIO29_PUE_LSB 3 +#define PADS_BANK0_GPIO29_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_PDE +// Description : Pull down enable +#define PADS_BANK0_GPIO29_PDE_RESET 0x1 +#define PADS_BANK0_GPIO29_PDE_BITS 0x00000004 +#define PADS_BANK0_GPIO29_PDE_MSB 2 +#define PADS_BANK0_GPIO29_PDE_LSB 2 +#define PADS_BANK0_GPIO29_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_GPIO29_SCHMITT_RESET 0x1 +#define PADS_BANK0_GPIO29_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_GPIO29_SCHMITT_MSB 1 +#define PADS_BANK0_GPIO29_SCHMITT_LSB 1 +#define PADS_BANK0_GPIO29_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_GPIO29_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_GPIO29_SLEWFAST_RESET 0x0 +#define PADS_BANK0_GPIO29_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_GPIO29_SLEWFAST_MSB 0 +#define PADS_BANK0_GPIO29_SLEWFAST_LSB 0 +#define PADS_BANK0_GPIO29_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_SWCLK +// Description : Pad control register +#define PADS_BANK0_SWCLK_OFFSET 0x0000007c +#define PADS_BANK0_SWCLK_BITS 0x000000ff +#define PADS_BANK0_SWCLK_RESET 0x000000da +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_SWCLK_OD_RESET 0x1 +#define PADS_BANK0_SWCLK_OD_BITS 0x00000080 +#define PADS_BANK0_SWCLK_OD_MSB 7 +#define PADS_BANK0_SWCLK_OD_LSB 7 +#define PADS_BANK0_SWCLK_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_IE +// Description : Input enable +#define PADS_BANK0_SWCLK_IE_RESET 0x1 +#define PADS_BANK0_SWCLK_IE_BITS 0x00000040 +#define PADS_BANK0_SWCLK_IE_MSB 6 +#define PADS_BANK0_SWCLK_IE_LSB 6 +#define PADS_BANK0_SWCLK_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_SWCLK_DRIVE_RESET 0x1 +#define PADS_BANK0_SWCLK_DRIVE_BITS 0x00000030 +#define PADS_BANK0_SWCLK_DRIVE_MSB 5 +#define PADS_BANK0_SWCLK_DRIVE_LSB 4 +#define PADS_BANK0_SWCLK_DRIVE_ACCESS "RW" +#define PADS_BANK0_SWCLK_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_SWCLK_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_SWCLK_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_SWCLK_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_PUE +// Description : Pull up enable +#define PADS_BANK0_SWCLK_PUE_RESET 0x1 +#define PADS_BANK0_SWCLK_PUE_BITS 0x00000008 +#define PADS_BANK0_SWCLK_PUE_MSB 3 +#define PADS_BANK0_SWCLK_PUE_LSB 3 +#define PADS_BANK0_SWCLK_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_PDE +// Description : Pull down enable +#define PADS_BANK0_SWCLK_PDE_RESET 0x0 +#define PADS_BANK0_SWCLK_PDE_BITS 0x00000004 +#define PADS_BANK0_SWCLK_PDE_MSB 2 +#define PADS_BANK0_SWCLK_PDE_LSB 2 +#define PADS_BANK0_SWCLK_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_SWCLK_SCHMITT_RESET 0x1 +#define PADS_BANK0_SWCLK_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_SWCLK_SCHMITT_MSB 1 +#define PADS_BANK0_SWCLK_SCHMITT_LSB 1 +#define PADS_BANK0_SWCLK_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWCLK_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_SWCLK_SLEWFAST_RESET 0x0 +#define PADS_BANK0_SWCLK_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_SWCLK_SLEWFAST_MSB 0 +#define PADS_BANK0_SWCLK_SLEWFAST_LSB 0 +#define PADS_BANK0_SWCLK_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_BANK0_SWD +// Description : Pad control register +#define PADS_BANK0_SWD_OFFSET 0x00000080 +#define PADS_BANK0_SWD_BITS 0x000000ff +#define PADS_BANK0_SWD_RESET 0x0000005a +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_BANK0_SWD_OD_RESET 0x0 +#define PADS_BANK0_SWD_OD_BITS 0x00000080 +#define PADS_BANK0_SWD_OD_MSB 7 +#define PADS_BANK0_SWD_OD_LSB 7 +#define PADS_BANK0_SWD_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_IE +// Description : Input enable +#define PADS_BANK0_SWD_IE_RESET 0x1 +#define PADS_BANK0_SWD_IE_BITS 0x00000040 +#define PADS_BANK0_SWD_IE_MSB 6 +#define PADS_BANK0_SWD_IE_LSB 6 +#define PADS_BANK0_SWD_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_BANK0_SWD_DRIVE_RESET 0x1 +#define PADS_BANK0_SWD_DRIVE_BITS 0x00000030 +#define PADS_BANK0_SWD_DRIVE_MSB 5 +#define PADS_BANK0_SWD_DRIVE_LSB 4 +#define PADS_BANK0_SWD_DRIVE_ACCESS "RW" +#define PADS_BANK0_SWD_DRIVE_VALUE_2MA 0x0 +#define PADS_BANK0_SWD_DRIVE_VALUE_4MA 0x1 +#define PADS_BANK0_SWD_DRIVE_VALUE_8MA 0x2 +#define PADS_BANK0_SWD_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_PUE +// Description : Pull up enable +#define PADS_BANK0_SWD_PUE_RESET 0x1 +#define PADS_BANK0_SWD_PUE_BITS 0x00000008 +#define PADS_BANK0_SWD_PUE_MSB 3 +#define PADS_BANK0_SWD_PUE_LSB 3 +#define PADS_BANK0_SWD_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_PDE +// Description : Pull down enable +#define PADS_BANK0_SWD_PDE_RESET 0x0 +#define PADS_BANK0_SWD_PDE_BITS 0x00000004 +#define PADS_BANK0_SWD_PDE_MSB 2 +#define PADS_BANK0_SWD_PDE_LSB 2 +#define PADS_BANK0_SWD_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_SCHMITT +// Description : Enable schmitt trigger +#define PADS_BANK0_SWD_SCHMITT_RESET 0x1 +#define PADS_BANK0_SWD_SCHMITT_BITS 0x00000002 +#define PADS_BANK0_SWD_SCHMITT_MSB 1 +#define PADS_BANK0_SWD_SCHMITT_LSB 1 +#define PADS_BANK0_SWD_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_BANK0_SWD_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_BANK0_SWD_SLEWFAST_RESET 0x0 +#define PADS_BANK0_SWD_SLEWFAST_BITS 0x00000001 +#define PADS_BANK0_SWD_SLEWFAST_MSB 0 +#define PADS_BANK0_SWD_SLEWFAST_LSB 0 +#define PADS_BANK0_SWD_SLEWFAST_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_PADS_BANK0_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_qspi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_qspi.h new file mode 100644 index 0000000000..7aba5e856a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pads_qspi.h @@ -0,0 +1,454 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : PADS_QSPI +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_PADS_QSPI_DEFINED +#define HARDWARE_REGS_PADS_QSPI_DEFINED +// ============================================================================= +// Register : PADS_QSPI_VOLTAGE_SELECT +// Description : Voltage select. Per bank control +// 0x0 -> Set voltage to 3.3V (DVDD >= 2V5) +// 0x1 -> Set voltage to 1.8V (DVDD <= 1V8) +#define PADS_QSPI_VOLTAGE_SELECT_OFFSET 0x00000000 +#define PADS_QSPI_VOLTAGE_SELECT_BITS 0x00000001 +#define PADS_QSPI_VOLTAGE_SELECT_RESET 0x00000000 +#define PADS_QSPI_VOLTAGE_SELECT_MSB 0 +#define PADS_QSPI_VOLTAGE_SELECT_LSB 0 +#define PADS_QSPI_VOLTAGE_SELECT_ACCESS "RW" +#define PADS_QSPI_VOLTAGE_SELECT_VALUE_3V3 0x0 +#define PADS_QSPI_VOLTAGE_SELECT_VALUE_1V8 0x1 +// ============================================================================= +// Register : PADS_QSPI_GPIO_QSPI_SCLK +// Description : Pad control register +#define PADS_QSPI_GPIO_QSPI_SCLK_OFFSET 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SCLK_BITS 0x000000ff +#define PADS_QSPI_GPIO_QSPI_SCLK_RESET 0x00000056 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_QSPI_GPIO_QSPI_SCLK_OD_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SCLK_OD_BITS 0x00000080 +#define PADS_QSPI_GPIO_QSPI_SCLK_OD_MSB 7 +#define PADS_QSPI_GPIO_QSPI_SCLK_OD_LSB 7 +#define PADS_QSPI_GPIO_QSPI_SCLK_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_IE +// Description : Input enable +#define PADS_QSPI_GPIO_QSPI_SCLK_IE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SCLK_IE_BITS 0x00000040 +#define PADS_QSPI_GPIO_QSPI_SCLK_IE_MSB 6 +#define PADS_QSPI_GPIO_QSPI_SCLK_IE_LSB 6 +#define PADS_QSPI_GPIO_QSPI_SCLK_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_BITS 0x00000030 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_MSB 5 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_LSB 4 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_ACCESS "RW" +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_VALUE_2MA 0x0 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_VALUE_4MA 0x1 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_VALUE_8MA 0x2 +#define PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_PUE +// Description : Pull up enable +#define PADS_QSPI_GPIO_QSPI_SCLK_PUE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SCLK_PUE_BITS 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SCLK_PUE_MSB 3 +#define PADS_QSPI_GPIO_QSPI_SCLK_PUE_LSB 3 +#define PADS_QSPI_GPIO_QSPI_SCLK_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_PDE +// Description : Pull down enable +#define PADS_QSPI_GPIO_QSPI_SCLK_PDE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SCLK_PDE_BITS 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SCLK_PDE_MSB 2 +#define PADS_QSPI_GPIO_QSPI_SCLK_PDE_LSB 2 +#define PADS_QSPI_GPIO_QSPI_SCLK_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT +// Description : Enable schmitt trigger +#define PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT_BITS 0x00000002 +#define PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT_MSB 1 +#define PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT_LSB 1 +#define PADS_QSPI_GPIO_QSPI_SCLK_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_BITS 0x00000001 +#define PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_MSB 0 +#define PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_LSB 0 +#define PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_QSPI_GPIO_QSPI_SD0 +// Description : Pad control register +#define PADS_QSPI_GPIO_QSPI_SD0_OFFSET 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SD0_BITS 0x000000ff +#define PADS_QSPI_GPIO_QSPI_SD0_RESET 0x00000052 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_QSPI_GPIO_QSPI_SD0_OD_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD0_OD_BITS 0x00000080 +#define PADS_QSPI_GPIO_QSPI_SD0_OD_MSB 7 +#define PADS_QSPI_GPIO_QSPI_SD0_OD_LSB 7 +#define PADS_QSPI_GPIO_QSPI_SD0_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_IE +// Description : Input enable +#define PADS_QSPI_GPIO_QSPI_SD0_IE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD0_IE_BITS 0x00000040 +#define PADS_QSPI_GPIO_QSPI_SD0_IE_MSB 6 +#define PADS_QSPI_GPIO_QSPI_SD0_IE_LSB 6 +#define PADS_QSPI_GPIO_QSPI_SD0_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_BITS 0x00000030 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_MSB 5 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_LSB 4 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_ACCESS "RW" +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_VALUE_2MA 0x0 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_VALUE_4MA 0x1 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_VALUE_8MA 0x2 +#define PADS_QSPI_GPIO_QSPI_SD0_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_PUE +// Description : Pull up enable +#define PADS_QSPI_GPIO_QSPI_SD0_PUE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD0_PUE_BITS 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SD0_PUE_MSB 3 +#define PADS_QSPI_GPIO_QSPI_SD0_PUE_LSB 3 +#define PADS_QSPI_GPIO_QSPI_SD0_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_PDE +// Description : Pull down enable +#define PADS_QSPI_GPIO_QSPI_SD0_PDE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD0_PDE_BITS 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SD0_PDE_MSB 2 +#define PADS_QSPI_GPIO_QSPI_SD0_PDE_LSB 2 +#define PADS_QSPI_GPIO_QSPI_SD0_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_SCHMITT +// Description : Enable schmitt trigger +#define PADS_QSPI_GPIO_QSPI_SD0_SCHMITT_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD0_SCHMITT_BITS 0x00000002 +#define PADS_QSPI_GPIO_QSPI_SD0_SCHMITT_MSB 1 +#define PADS_QSPI_GPIO_QSPI_SD0_SCHMITT_LSB 1 +#define PADS_QSPI_GPIO_QSPI_SD0_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD0_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_QSPI_GPIO_QSPI_SD0_SLEWFAST_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD0_SLEWFAST_BITS 0x00000001 +#define PADS_QSPI_GPIO_QSPI_SD0_SLEWFAST_MSB 0 +#define PADS_QSPI_GPIO_QSPI_SD0_SLEWFAST_LSB 0 +#define PADS_QSPI_GPIO_QSPI_SD0_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_QSPI_GPIO_QSPI_SD1 +// Description : Pad control register +#define PADS_QSPI_GPIO_QSPI_SD1_OFFSET 0x0000000c +#define PADS_QSPI_GPIO_QSPI_SD1_BITS 0x000000ff +#define PADS_QSPI_GPIO_QSPI_SD1_RESET 0x00000052 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_QSPI_GPIO_QSPI_SD1_OD_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD1_OD_BITS 0x00000080 +#define PADS_QSPI_GPIO_QSPI_SD1_OD_MSB 7 +#define PADS_QSPI_GPIO_QSPI_SD1_OD_LSB 7 +#define PADS_QSPI_GPIO_QSPI_SD1_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_IE +// Description : Input enable +#define PADS_QSPI_GPIO_QSPI_SD1_IE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD1_IE_BITS 0x00000040 +#define PADS_QSPI_GPIO_QSPI_SD1_IE_MSB 6 +#define PADS_QSPI_GPIO_QSPI_SD1_IE_LSB 6 +#define PADS_QSPI_GPIO_QSPI_SD1_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_BITS 0x00000030 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_MSB 5 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_LSB 4 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_ACCESS "RW" +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_VALUE_2MA 0x0 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_VALUE_4MA 0x1 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_VALUE_8MA 0x2 +#define PADS_QSPI_GPIO_QSPI_SD1_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_PUE +// Description : Pull up enable +#define PADS_QSPI_GPIO_QSPI_SD1_PUE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD1_PUE_BITS 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SD1_PUE_MSB 3 +#define PADS_QSPI_GPIO_QSPI_SD1_PUE_LSB 3 +#define PADS_QSPI_GPIO_QSPI_SD1_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_PDE +// Description : Pull down enable +#define PADS_QSPI_GPIO_QSPI_SD1_PDE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD1_PDE_BITS 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SD1_PDE_MSB 2 +#define PADS_QSPI_GPIO_QSPI_SD1_PDE_LSB 2 +#define PADS_QSPI_GPIO_QSPI_SD1_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_SCHMITT +// Description : Enable schmitt trigger +#define PADS_QSPI_GPIO_QSPI_SD1_SCHMITT_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD1_SCHMITT_BITS 0x00000002 +#define PADS_QSPI_GPIO_QSPI_SD1_SCHMITT_MSB 1 +#define PADS_QSPI_GPIO_QSPI_SD1_SCHMITT_LSB 1 +#define PADS_QSPI_GPIO_QSPI_SD1_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD1_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_QSPI_GPIO_QSPI_SD1_SLEWFAST_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD1_SLEWFAST_BITS 0x00000001 +#define PADS_QSPI_GPIO_QSPI_SD1_SLEWFAST_MSB 0 +#define PADS_QSPI_GPIO_QSPI_SD1_SLEWFAST_LSB 0 +#define PADS_QSPI_GPIO_QSPI_SD1_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_QSPI_GPIO_QSPI_SD2 +// Description : Pad control register +#define PADS_QSPI_GPIO_QSPI_SD2_OFFSET 0x00000010 +#define PADS_QSPI_GPIO_QSPI_SD2_BITS 0x000000ff +#define PADS_QSPI_GPIO_QSPI_SD2_RESET 0x00000052 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_QSPI_GPIO_QSPI_SD2_OD_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD2_OD_BITS 0x00000080 +#define PADS_QSPI_GPIO_QSPI_SD2_OD_MSB 7 +#define PADS_QSPI_GPIO_QSPI_SD2_OD_LSB 7 +#define PADS_QSPI_GPIO_QSPI_SD2_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_IE +// Description : Input enable +#define PADS_QSPI_GPIO_QSPI_SD2_IE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD2_IE_BITS 0x00000040 +#define PADS_QSPI_GPIO_QSPI_SD2_IE_MSB 6 +#define PADS_QSPI_GPIO_QSPI_SD2_IE_LSB 6 +#define PADS_QSPI_GPIO_QSPI_SD2_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_BITS 0x00000030 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_MSB 5 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_LSB 4 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_ACCESS "RW" +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_VALUE_2MA 0x0 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_VALUE_4MA 0x1 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_VALUE_8MA 0x2 +#define PADS_QSPI_GPIO_QSPI_SD2_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_PUE +// Description : Pull up enable +#define PADS_QSPI_GPIO_QSPI_SD2_PUE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD2_PUE_BITS 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SD2_PUE_MSB 3 +#define PADS_QSPI_GPIO_QSPI_SD2_PUE_LSB 3 +#define PADS_QSPI_GPIO_QSPI_SD2_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_PDE +// Description : Pull down enable +#define PADS_QSPI_GPIO_QSPI_SD2_PDE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD2_PDE_BITS 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SD2_PDE_MSB 2 +#define PADS_QSPI_GPIO_QSPI_SD2_PDE_LSB 2 +#define PADS_QSPI_GPIO_QSPI_SD2_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_SCHMITT +// Description : Enable schmitt trigger +#define PADS_QSPI_GPIO_QSPI_SD2_SCHMITT_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD2_SCHMITT_BITS 0x00000002 +#define PADS_QSPI_GPIO_QSPI_SD2_SCHMITT_MSB 1 +#define PADS_QSPI_GPIO_QSPI_SD2_SCHMITT_LSB 1 +#define PADS_QSPI_GPIO_QSPI_SD2_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD2_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_QSPI_GPIO_QSPI_SD2_SLEWFAST_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD2_SLEWFAST_BITS 0x00000001 +#define PADS_QSPI_GPIO_QSPI_SD2_SLEWFAST_MSB 0 +#define PADS_QSPI_GPIO_QSPI_SD2_SLEWFAST_LSB 0 +#define PADS_QSPI_GPIO_QSPI_SD2_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_QSPI_GPIO_QSPI_SD3 +// Description : Pad control register +#define PADS_QSPI_GPIO_QSPI_SD3_OFFSET 0x00000014 +#define PADS_QSPI_GPIO_QSPI_SD3_BITS 0x000000ff +#define PADS_QSPI_GPIO_QSPI_SD3_RESET 0x00000052 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_QSPI_GPIO_QSPI_SD3_OD_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD3_OD_BITS 0x00000080 +#define PADS_QSPI_GPIO_QSPI_SD3_OD_MSB 7 +#define PADS_QSPI_GPIO_QSPI_SD3_OD_LSB 7 +#define PADS_QSPI_GPIO_QSPI_SD3_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_IE +// Description : Input enable +#define PADS_QSPI_GPIO_QSPI_SD3_IE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD3_IE_BITS 0x00000040 +#define PADS_QSPI_GPIO_QSPI_SD3_IE_MSB 6 +#define PADS_QSPI_GPIO_QSPI_SD3_IE_LSB 6 +#define PADS_QSPI_GPIO_QSPI_SD3_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_BITS 0x00000030 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_MSB 5 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_LSB 4 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_ACCESS "RW" +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_VALUE_2MA 0x0 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_VALUE_4MA 0x1 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_VALUE_8MA 0x2 +#define PADS_QSPI_GPIO_QSPI_SD3_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_PUE +// Description : Pull up enable +#define PADS_QSPI_GPIO_QSPI_SD3_PUE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD3_PUE_BITS 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SD3_PUE_MSB 3 +#define PADS_QSPI_GPIO_QSPI_SD3_PUE_LSB 3 +#define PADS_QSPI_GPIO_QSPI_SD3_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_PDE +// Description : Pull down enable +#define PADS_QSPI_GPIO_QSPI_SD3_PDE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD3_PDE_BITS 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SD3_PDE_MSB 2 +#define PADS_QSPI_GPIO_QSPI_SD3_PDE_LSB 2 +#define PADS_QSPI_GPIO_QSPI_SD3_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_SCHMITT +// Description : Enable schmitt trigger +#define PADS_QSPI_GPIO_QSPI_SD3_SCHMITT_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SD3_SCHMITT_BITS 0x00000002 +#define PADS_QSPI_GPIO_QSPI_SD3_SCHMITT_MSB 1 +#define PADS_QSPI_GPIO_QSPI_SD3_SCHMITT_LSB 1 +#define PADS_QSPI_GPIO_QSPI_SD3_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SD3_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_QSPI_GPIO_QSPI_SD3_SLEWFAST_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SD3_SLEWFAST_BITS 0x00000001 +#define PADS_QSPI_GPIO_QSPI_SD3_SLEWFAST_MSB 0 +#define PADS_QSPI_GPIO_QSPI_SD3_SLEWFAST_LSB 0 +#define PADS_QSPI_GPIO_QSPI_SD3_SLEWFAST_ACCESS "RW" +// ============================================================================= +// Register : PADS_QSPI_GPIO_QSPI_SS +// Description : Pad control register +#define PADS_QSPI_GPIO_QSPI_SS_OFFSET 0x00000018 +#define PADS_QSPI_GPIO_QSPI_SS_BITS 0x000000ff +#define PADS_QSPI_GPIO_QSPI_SS_RESET 0x0000005a +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_OD +// Description : Output disable. Has priority over output enable from +// peripherals +#define PADS_QSPI_GPIO_QSPI_SS_OD_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SS_OD_BITS 0x00000080 +#define PADS_QSPI_GPIO_QSPI_SS_OD_MSB 7 +#define PADS_QSPI_GPIO_QSPI_SS_OD_LSB 7 +#define PADS_QSPI_GPIO_QSPI_SS_OD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_IE +// Description : Input enable +#define PADS_QSPI_GPIO_QSPI_SS_IE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SS_IE_BITS 0x00000040 +#define PADS_QSPI_GPIO_QSPI_SS_IE_MSB 6 +#define PADS_QSPI_GPIO_QSPI_SS_IE_LSB 6 +#define PADS_QSPI_GPIO_QSPI_SS_IE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_DRIVE +// Description : Drive strength. +// 0x0 -> 2mA +// 0x1 -> 4mA +// 0x2 -> 8mA +// 0x3 -> 12mA +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_BITS 0x00000030 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_MSB 5 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_LSB 4 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_ACCESS "RW" +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_VALUE_2MA 0x0 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_VALUE_4MA 0x1 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_VALUE_8MA 0x2 +#define PADS_QSPI_GPIO_QSPI_SS_DRIVE_VALUE_12MA 0x3 +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_PUE +// Description : Pull up enable +#define PADS_QSPI_GPIO_QSPI_SS_PUE_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SS_PUE_BITS 0x00000008 +#define PADS_QSPI_GPIO_QSPI_SS_PUE_MSB 3 +#define PADS_QSPI_GPIO_QSPI_SS_PUE_LSB 3 +#define PADS_QSPI_GPIO_QSPI_SS_PUE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_PDE +// Description : Pull down enable +#define PADS_QSPI_GPIO_QSPI_SS_PDE_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SS_PDE_BITS 0x00000004 +#define PADS_QSPI_GPIO_QSPI_SS_PDE_MSB 2 +#define PADS_QSPI_GPIO_QSPI_SS_PDE_LSB 2 +#define PADS_QSPI_GPIO_QSPI_SS_PDE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_SCHMITT +// Description : Enable schmitt trigger +#define PADS_QSPI_GPIO_QSPI_SS_SCHMITT_RESET 0x1 +#define PADS_QSPI_GPIO_QSPI_SS_SCHMITT_BITS 0x00000002 +#define PADS_QSPI_GPIO_QSPI_SS_SCHMITT_MSB 1 +#define PADS_QSPI_GPIO_QSPI_SS_SCHMITT_LSB 1 +#define PADS_QSPI_GPIO_QSPI_SS_SCHMITT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PADS_QSPI_GPIO_QSPI_SS_SLEWFAST +// Description : Slew rate control. 1 = Fast, 0 = Slow +#define PADS_QSPI_GPIO_QSPI_SS_SLEWFAST_RESET 0x0 +#define PADS_QSPI_GPIO_QSPI_SS_SLEWFAST_BITS 0x00000001 +#define PADS_QSPI_GPIO_QSPI_SS_SLEWFAST_MSB 0 +#define PADS_QSPI_GPIO_QSPI_SS_SLEWFAST_LSB 0 +#define PADS_QSPI_GPIO_QSPI_SS_SLEWFAST_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_PADS_QSPI_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pio.h new file mode 100644 index 0000000000..503aa09409 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pio.h @@ -0,0 +1,2591 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : PIO +// Version : 1 +// Bus type : ahbl +// Description : Programmable IO block +// ============================================================================= +#ifndef HARDWARE_REGS_PIO_DEFINED +#define HARDWARE_REGS_PIO_DEFINED +// ============================================================================= +// Register : PIO_CTRL +// Description : PIO control register +#define PIO_CTRL_OFFSET 0x00000000 +#define PIO_CTRL_BITS 0x00000fff +#define PIO_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_CTRL_CLKDIV_RESTART +// Description : Force clock dividers to restart their count and clear +// fractional +// accumulators. Restart multiple dividers to synchronise them. +#define PIO_CTRL_CLKDIV_RESTART_RESET 0x0 +#define PIO_CTRL_CLKDIV_RESTART_BITS 0x00000f00 +#define PIO_CTRL_CLKDIV_RESTART_MSB 11 +#define PIO_CTRL_CLKDIV_RESTART_LSB 8 +#define PIO_CTRL_CLKDIV_RESTART_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PIO_CTRL_SM_RESTART +// Description : Clear internal SM state which is otherwise difficult to access +// (e.g. shift counters). Self-clearing. +#define PIO_CTRL_SM_RESTART_RESET 0x0 +#define PIO_CTRL_SM_RESTART_BITS 0x000000f0 +#define PIO_CTRL_SM_RESTART_MSB 7 +#define PIO_CTRL_SM_RESTART_LSB 4 +#define PIO_CTRL_SM_RESTART_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PIO_CTRL_SM_ENABLE +// Description : Enable state machine +#define PIO_CTRL_SM_ENABLE_RESET 0x0 +#define PIO_CTRL_SM_ENABLE_BITS 0x0000000f +#define PIO_CTRL_SM_ENABLE_MSB 3 +#define PIO_CTRL_SM_ENABLE_LSB 0 +#define PIO_CTRL_SM_ENABLE_ACCESS "RW" +// ============================================================================= +// Register : PIO_FSTAT +// Description : FIFO status register +#define PIO_FSTAT_OFFSET 0x00000004 +#define PIO_FSTAT_BITS 0x0f0f0f0f +#define PIO_FSTAT_RESET 0x0f000f00 +// ----------------------------------------------------------------------------- +// Field : PIO_FSTAT_TXEMPTY +// Description : State machine TX FIFO is empty +#define PIO_FSTAT_TXEMPTY_RESET 0xf +#define PIO_FSTAT_TXEMPTY_BITS 0x0f000000 +#define PIO_FSTAT_TXEMPTY_MSB 27 +#define PIO_FSTAT_TXEMPTY_LSB 24 +#define PIO_FSTAT_TXEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FSTAT_TXFULL +// Description : State machine TX FIFO is full +#define PIO_FSTAT_TXFULL_RESET 0x0 +#define PIO_FSTAT_TXFULL_BITS 0x000f0000 +#define PIO_FSTAT_TXFULL_MSB 19 +#define PIO_FSTAT_TXFULL_LSB 16 +#define PIO_FSTAT_TXFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FSTAT_RXEMPTY +// Description : State machine RX FIFO is empty +#define PIO_FSTAT_RXEMPTY_RESET 0xf +#define PIO_FSTAT_RXEMPTY_BITS 0x00000f00 +#define PIO_FSTAT_RXEMPTY_MSB 11 +#define PIO_FSTAT_RXEMPTY_LSB 8 +#define PIO_FSTAT_RXEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FSTAT_RXFULL +// Description : State machine RX FIFO is full +#define PIO_FSTAT_RXFULL_RESET 0x0 +#define PIO_FSTAT_RXFULL_BITS 0x0000000f +#define PIO_FSTAT_RXFULL_MSB 3 +#define PIO_FSTAT_RXFULL_LSB 0 +#define PIO_FSTAT_RXFULL_ACCESS "RO" +// ============================================================================= +// Register : PIO_FDEBUG +// Description : FIFO debug register +#define PIO_FDEBUG_OFFSET 0x00000008 +#define PIO_FDEBUG_BITS 0x0f0f0f0f +#define PIO_FDEBUG_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_FDEBUG_TXSTALL +// Description : State machine has stalled on empty TX FIFO. Write 1 to clear. +#define PIO_FDEBUG_TXSTALL_RESET 0x0 +#define PIO_FDEBUG_TXSTALL_BITS 0x0f000000 +#define PIO_FDEBUG_TXSTALL_MSB 27 +#define PIO_FDEBUG_TXSTALL_LSB 24 +#define PIO_FDEBUG_TXSTALL_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PIO_FDEBUG_TXOVER +// Description : TX FIFO overflow has occurred. Write 1 to clear. +#define PIO_FDEBUG_TXOVER_RESET 0x0 +#define PIO_FDEBUG_TXOVER_BITS 0x000f0000 +#define PIO_FDEBUG_TXOVER_MSB 19 +#define PIO_FDEBUG_TXOVER_LSB 16 +#define PIO_FDEBUG_TXOVER_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PIO_FDEBUG_RXUNDER +// Description : RX FIFO underflow has occurred. Write 1 to clear. +#define PIO_FDEBUG_RXUNDER_RESET 0x0 +#define PIO_FDEBUG_RXUNDER_BITS 0x00000f00 +#define PIO_FDEBUG_RXUNDER_MSB 11 +#define PIO_FDEBUG_RXUNDER_LSB 8 +#define PIO_FDEBUG_RXUNDER_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PIO_FDEBUG_RXSTALL +// Description : State machine has stalled on full RX FIFO. Write 1 to clear. +#define PIO_FDEBUG_RXSTALL_RESET 0x0 +#define PIO_FDEBUG_RXSTALL_BITS 0x0000000f +#define PIO_FDEBUG_RXSTALL_MSB 3 +#define PIO_FDEBUG_RXSTALL_LSB 0 +#define PIO_FDEBUG_RXSTALL_ACCESS "WC" +// ============================================================================= +// Register : PIO_FLEVEL +// Description : FIFO levels +#define PIO_FLEVEL_OFFSET 0x0000000c +#define PIO_FLEVEL_BITS 0xffffffff +#define PIO_FLEVEL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_RX3 +// Description : None +#define PIO_FLEVEL_RX3_RESET 0x0 +#define PIO_FLEVEL_RX3_BITS 0xf0000000 +#define PIO_FLEVEL_RX3_MSB 31 +#define PIO_FLEVEL_RX3_LSB 28 +#define PIO_FLEVEL_RX3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_TX3 +// Description : None +#define PIO_FLEVEL_TX3_RESET 0x0 +#define PIO_FLEVEL_TX3_BITS 0x0f000000 +#define PIO_FLEVEL_TX3_MSB 27 +#define PIO_FLEVEL_TX3_LSB 24 +#define PIO_FLEVEL_TX3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_RX2 +// Description : None +#define PIO_FLEVEL_RX2_RESET 0x0 +#define PIO_FLEVEL_RX2_BITS 0x00f00000 +#define PIO_FLEVEL_RX2_MSB 23 +#define PIO_FLEVEL_RX2_LSB 20 +#define PIO_FLEVEL_RX2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_TX2 +// Description : None +#define PIO_FLEVEL_TX2_RESET 0x0 +#define PIO_FLEVEL_TX2_BITS 0x000f0000 +#define PIO_FLEVEL_TX2_MSB 19 +#define PIO_FLEVEL_TX2_LSB 16 +#define PIO_FLEVEL_TX2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_RX1 +// Description : None +#define PIO_FLEVEL_RX1_RESET 0x0 +#define PIO_FLEVEL_RX1_BITS 0x0000f000 +#define PIO_FLEVEL_RX1_MSB 15 +#define PIO_FLEVEL_RX1_LSB 12 +#define PIO_FLEVEL_RX1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_TX1 +// Description : None +#define PIO_FLEVEL_TX1_RESET 0x0 +#define PIO_FLEVEL_TX1_BITS 0x00000f00 +#define PIO_FLEVEL_TX1_MSB 11 +#define PIO_FLEVEL_TX1_LSB 8 +#define PIO_FLEVEL_TX1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_RX0 +// Description : None +#define PIO_FLEVEL_RX0_RESET 0x0 +#define PIO_FLEVEL_RX0_BITS 0x000000f0 +#define PIO_FLEVEL_RX0_MSB 7 +#define PIO_FLEVEL_RX0_LSB 4 +#define PIO_FLEVEL_RX0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_FLEVEL_TX0 +// Description : None +#define PIO_FLEVEL_TX0_RESET 0x0 +#define PIO_FLEVEL_TX0_BITS 0x0000000f +#define PIO_FLEVEL_TX0_MSB 3 +#define PIO_FLEVEL_TX0_LSB 0 +#define PIO_FLEVEL_TX0_ACCESS "RO" +// ============================================================================= +// Register : PIO_TXF0 +// Description : Direct write access to the TX FIFO for this state machine. Each +// write pushes one word to the FIFO. +#define PIO_TXF0_OFFSET 0x00000010 +#define PIO_TXF0_BITS 0xffffffff +#define PIO_TXF0_RESET 0x00000000 +#define PIO_TXF0_MSB 31 +#define PIO_TXF0_LSB 0 +#define PIO_TXF0_ACCESS "WF" +// ============================================================================= +// Register : PIO_TXF1 +// Description : Direct write access to the TX FIFO for this state machine. Each +// write pushes one word to the FIFO. +#define PIO_TXF1_OFFSET 0x00000014 +#define PIO_TXF1_BITS 0xffffffff +#define PIO_TXF1_RESET 0x00000000 +#define PIO_TXF1_MSB 31 +#define PIO_TXF1_LSB 0 +#define PIO_TXF1_ACCESS "WF" +// ============================================================================= +// Register : PIO_TXF2 +// Description : Direct write access to the TX FIFO for this state machine. Each +// write pushes one word to the FIFO. +#define PIO_TXF2_OFFSET 0x00000018 +#define PIO_TXF2_BITS 0xffffffff +#define PIO_TXF2_RESET 0x00000000 +#define PIO_TXF2_MSB 31 +#define PIO_TXF2_LSB 0 +#define PIO_TXF2_ACCESS "WF" +// ============================================================================= +// Register : PIO_TXF3 +// Description : Direct write access to the TX FIFO for this state machine. Each +// write pushes one word to the FIFO. +#define PIO_TXF3_OFFSET 0x0000001c +#define PIO_TXF3_BITS 0xffffffff +#define PIO_TXF3_RESET 0x00000000 +#define PIO_TXF3_MSB 31 +#define PIO_TXF3_LSB 0 +#define PIO_TXF3_ACCESS "WF" +// ============================================================================= +// Register : PIO_RXF0 +// Description : Direct read access to the RX FIFO for this state machine. Each +// read pops one word from the FIFO. +#define PIO_RXF0_OFFSET 0x00000020 +#define PIO_RXF0_BITS 0xffffffff +#define PIO_RXF0_RESET "-" +#define PIO_RXF0_MSB 31 +#define PIO_RXF0_LSB 0 +#define PIO_RXF0_ACCESS "RF" +// ============================================================================= +// Register : PIO_RXF1 +// Description : Direct read access to the RX FIFO for this state machine. Each +// read pops one word from the FIFO. +#define PIO_RXF1_OFFSET 0x00000024 +#define PIO_RXF1_BITS 0xffffffff +#define PIO_RXF1_RESET "-" +#define PIO_RXF1_MSB 31 +#define PIO_RXF1_LSB 0 +#define PIO_RXF1_ACCESS "RF" +// ============================================================================= +// Register : PIO_RXF2 +// Description : Direct read access to the RX FIFO for this state machine. Each +// read pops one word from the FIFO. +#define PIO_RXF2_OFFSET 0x00000028 +#define PIO_RXF2_BITS 0xffffffff +#define PIO_RXF2_RESET "-" +#define PIO_RXF2_MSB 31 +#define PIO_RXF2_LSB 0 +#define PIO_RXF2_ACCESS "RF" +// ============================================================================= +// Register : PIO_RXF3 +// Description : Direct read access to the RX FIFO for this state machine. Each +// read pops one word from the FIFO. +#define PIO_RXF3_OFFSET 0x0000002c +#define PIO_RXF3_BITS 0xffffffff +#define PIO_RXF3_RESET "-" +#define PIO_RXF3_MSB 31 +#define PIO_RXF3_LSB 0 +#define PIO_RXF3_ACCESS "RF" +// ============================================================================= +// Register : PIO_IRQ +// Description : Interrupt request register. Write 1 to clear +#define PIO_IRQ_OFFSET 0x00000030 +#define PIO_IRQ_BITS 0x000000ff +#define PIO_IRQ_RESET 0x00000000 +#define PIO_IRQ_MSB 7 +#define PIO_IRQ_LSB 0 +#define PIO_IRQ_ACCESS "WC" +// ============================================================================= +// Register : PIO_IRQ_FORCE +// Description : Writing a 1 to each of these bits will forcibly assert the +// corresponding IRQ. +// Note this is different to the INTF register: writing here +// affects PIO internal +// state. INTF just asserts the processor-facing IRQ signal for +// testing ISRs, +// and is not visible to the state machines. +#define PIO_IRQ_FORCE_OFFSET 0x00000034 +#define PIO_IRQ_FORCE_BITS 0x000000ff +#define PIO_IRQ_FORCE_RESET 0x00000000 +#define PIO_IRQ_FORCE_MSB 7 +#define PIO_IRQ_FORCE_LSB 0 +#define PIO_IRQ_FORCE_ACCESS "WF" +// ============================================================================= +// Register : PIO_INPUT_SYNC_BYPASS +// Description : There is a 2-flipflop synchronizer on each GPIO input, which +// protects +// PIO logic from metastabilities. This increases input delay, and +// for fast +// synchronous IO (e.g. SPI) these synchronizers may need to be +// bypassed. +// Each bit in this register corresponds to one GPIO. +// 0 -> input is synchronized (default) +// 1 -> synchronizer is bypassed +// If in doubt, leave this register as all zeroes. +#define PIO_INPUT_SYNC_BYPASS_OFFSET 0x00000038 +#define PIO_INPUT_SYNC_BYPASS_BITS 0xffffffff +#define PIO_INPUT_SYNC_BYPASS_RESET 0x00000000 +#define PIO_INPUT_SYNC_BYPASS_MSB 31 +#define PIO_INPUT_SYNC_BYPASS_LSB 0 +#define PIO_INPUT_SYNC_BYPASS_ACCESS "RW" +// ============================================================================= +// Register : PIO_DBG_PADOUT +// Description : Read to sample the pad output values PIO is currently driving +// to the GPIOs. +#define PIO_DBG_PADOUT_OFFSET 0x0000003c +#define PIO_DBG_PADOUT_BITS 0xffffffff +#define PIO_DBG_PADOUT_RESET 0x00000000 +#define PIO_DBG_PADOUT_MSB 31 +#define PIO_DBG_PADOUT_LSB 0 +#define PIO_DBG_PADOUT_ACCESS "RO" +// ============================================================================= +// Register : PIO_DBG_PADOE +// Description : Read to sample the pad output enables (direction) PIO is +// currently driving to the GPIOs. +#define PIO_DBG_PADOE_OFFSET 0x00000040 +#define PIO_DBG_PADOE_BITS 0xffffffff +#define PIO_DBG_PADOE_RESET 0x00000000 +#define PIO_DBG_PADOE_MSB 31 +#define PIO_DBG_PADOE_LSB 0 +#define PIO_DBG_PADOE_ACCESS "RO" +// ============================================================================= +// Register : PIO_DBG_CFGINFO +// Description : The PIO hardware has some free parameters that may vary between +// chip products. +// These should be provided in the chip datasheet, but are also +// exposed here. +#define PIO_DBG_CFGINFO_OFFSET 0x00000044 +#define PIO_DBG_CFGINFO_BITS 0x003f0f3f +#define PIO_DBG_CFGINFO_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_DBG_CFGINFO_IMEM_SIZE +// Description : The size of the instruction memory, measured in units of one +// instruction +#define PIO_DBG_CFGINFO_IMEM_SIZE_RESET "-" +#define PIO_DBG_CFGINFO_IMEM_SIZE_BITS 0x003f0000 +#define PIO_DBG_CFGINFO_IMEM_SIZE_MSB 21 +#define PIO_DBG_CFGINFO_IMEM_SIZE_LSB 16 +#define PIO_DBG_CFGINFO_IMEM_SIZE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_DBG_CFGINFO_SM_COUNT +// Description : The number of state machines this PIO instance is equipped +// with. +#define PIO_DBG_CFGINFO_SM_COUNT_RESET "-" +#define PIO_DBG_CFGINFO_SM_COUNT_BITS 0x00000f00 +#define PIO_DBG_CFGINFO_SM_COUNT_MSB 11 +#define PIO_DBG_CFGINFO_SM_COUNT_LSB 8 +#define PIO_DBG_CFGINFO_SM_COUNT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_DBG_CFGINFO_FIFO_DEPTH +// Description : The depth of the state machine TX/RX FIFOs, measured in words. +// Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double +// this depth. +#define PIO_DBG_CFGINFO_FIFO_DEPTH_RESET "-" +#define PIO_DBG_CFGINFO_FIFO_DEPTH_BITS 0x0000003f +#define PIO_DBG_CFGINFO_FIFO_DEPTH_MSB 5 +#define PIO_DBG_CFGINFO_FIFO_DEPTH_LSB 0 +#define PIO_DBG_CFGINFO_FIFO_DEPTH_ACCESS "RO" +// ============================================================================= +// Register : PIO_INSTR_MEM0 +// Description : Write-only access to instruction memory location 0 +#define PIO_INSTR_MEM0_OFFSET 0x00000048 +#define PIO_INSTR_MEM0_BITS 0x0000ffff +#define PIO_INSTR_MEM0_RESET 0x00000000 +#define PIO_INSTR_MEM0_MSB 15 +#define PIO_INSTR_MEM0_LSB 0 +#define PIO_INSTR_MEM0_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM1 +// Description : Write-only access to instruction memory location 1 +#define PIO_INSTR_MEM1_OFFSET 0x0000004c +#define PIO_INSTR_MEM1_BITS 0x0000ffff +#define PIO_INSTR_MEM1_RESET 0x00000000 +#define PIO_INSTR_MEM1_MSB 15 +#define PIO_INSTR_MEM1_LSB 0 +#define PIO_INSTR_MEM1_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM2 +// Description : Write-only access to instruction memory location 2 +#define PIO_INSTR_MEM2_OFFSET 0x00000050 +#define PIO_INSTR_MEM2_BITS 0x0000ffff +#define PIO_INSTR_MEM2_RESET 0x00000000 +#define PIO_INSTR_MEM2_MSB 15 +#define PIO_INSTR_MEM2_LSB 0 +#define PIO_INSTR_MEM2_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM3 +// Description : Write-only access to instruction memory location 3 +#define PIO_INSTR_MEM3_OFFSET 0x00000054 +#define PIO_INSTR_MEM3_BITS 0x0000ffff +#define PIO_INSTR_MEM3_RESET 0x00000000 +#define PIO_INSTR_MEM3_MSB 15 +#define PIO_INSTR_MEM3_LSB 0 +#define PIO_INSTR_MEM3_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM4 +// Description : Write-only access to instruction memory location 4 +#define PIO_INSTR_MEM4_OFFSET 0x00000058 +#define PIO_INSTR_MEM4_BITS 0x0000ffff +#define PIO_INSTR_MEM4_RESET 0x00000000 +#define PIO_INSTR_MEM4_MSB 15 +#define PIO_INSTR_MEM4_LSB 0 +#define PIO_INSTR_MEM4_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM5 +// Description : Write-only access to instruction memory location 5 +#define PIO_INSTR_MEM5_OFFSET 0x0000005c +#define PIO_INSTR_MEM5_BITS 0x0000ffff +#define PIO_INSTR_MEM5_RESET 0x00000000 +#define PIO_INSTR_MEM5_MSB 15 +#define PIO_INSTR_MEM5_LSB 0 +#define PIO_INSTR_MEM5_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM6 +// Description : Write-only access to instruction memory location 6 +#define PIO_INSTR_MEM6_OFFSET 0x00000060 +#define PIO_INSTR_MEM6_BITS 0x0000ffff +#define PIO_INSTR_MEM6_RESET 0x00000000 +#define PIO_INSTR_MEM6_MSB 15 +#define PIO_INSTR_MEM6_LSB 0 +#define PIO_INSTR_MEM6_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM7 +// Description : Write-only access to instruction memory location 7 +#define PIO_INSTR_MEM7_OFFSET 0x00000064 +#define PIO_INSTR_MEM7_BITS 0x0000ffff +#define PIO_INSTR_MEM7_RESET 0x00000000 +#define PIO_INSTR_MEM7_MSB 15 +#define PIO_INSTR_MEM7_LSB 0 +#define PIO_INSTR_MEM7_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM8 +// Description : Write-only access to instruction memory location 8 +#define PIO_INSTR_MEM8_OFFSET 0x00000068 +#define PIO_INSTR_MEM8_BITS 0x0000ffff +#define PIO_INSTR_MEM8_RESET 0x00000000 +#define PIO_INSTR_MEM8_MSB 15 +#define PIO_INSTR_MEM8_LSB 0 +#define PIO_INSTR_MEM8_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM9 +// Description : Write-only access to instruction memory location 9 +#define PIO_INSTR_MEM9_OFFSET 0x0000006c +#define PIO_INSTR_MEM9_BITS 0x0000ffff +#define PIO_INSTR_MEM9_RESET 0x00000000 +#define PIO_INSTR_MEM9_MSB 15 +#define PIO_INSTR_MEM9_LSB 0 +#define PIO_INSTR_MEM9_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM10 +// Description : Write-only access to instruction memory location 10 +#define PIO_INSTR_MEM10_OFFSET 0x00000070 +#define PIO_INSTR_MEM10_BITS 0x0000ffff +#define PIO_INSTR_MEM10_RESET 0x00000000 +#define PIO_INSTR_MEM10_MSB 15 +#define PIO_INSTR_MEM10_LSB 0 +#define PIO_INSTR_MEM10_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM11 +// Description : Write-only access to instruction memory location 11 +#define PIO_INSTR_MEM11_OFFSET 0x00000074 +#define PIO_INSTR_MEM11_BITS 0x0000ffff +#define PIO_INSTR_MEM11_RESET 0x00000000 +#define PIO_INSTR_MEM11_MSB 15 +#define PIO_INSTR_MEM11_LSB 0 +#define PIO_INSTR_MEM11_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM12 +// Description : Write-only access to instruction memory location 12 +#define PIO_INSTR_MEM12_OFFSET 0x00000078 +#define PIO_INSTR_MEM12_BITS 0x0000ffff +#define PIO_INSTR_MEM12_RESET 0x00000000 +#define PIO_INSTR_MEM12_MSB 15 +#define PIO_INSTR_MEM12_LSB 0 +#define PIO_INSTR_MEM12_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM13 +// Description : Write-only access to instruction memory location 13 +#define PIO_INSTR_MEM13_OFFSET 0x0000007c +#define PIO_INSTR_MEM13_BITS 0x0000ffff +#define PIO_INSTR_MEM13_RESET 0x00000000 +#define PIO_INSTR_MEM13_MSB 15 +#define PIO_INSTR_MEM13_LSB 0 +#define PIO_INSTR_MEM13_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM14 +// Description : Write-only access to instruction memory location 14 +#define PIO_INSTR_MEM14_OFFSET 0x00000080 +#define PIO_INSTR_MEM14_BITS 0x0000ffff +#define PIO_INSTR_MEM14_RESET 0x00000000 +#define PIO_INSTR_MEM14_MSB 15 +#define PIO_INSTR_MEM14_LSB 0 +#define PIO_INSTR_MEM14_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM15 +// Description : Write-only access to instruction memory location 15 +#define PIO_INSTR_MEM15_OFFSET 0x00000084 +#define PIO_INSTR_MEM15_BITS 0x0000ffff +#define PIO_INSTR_MEM15_RESET 0x00000000 +#define PIO_INSTR_MEM15_MSB 15 +#define PIO_INSTR_MEM15_LSB 0 +#define PIO_INSTR_MEM15_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM16 +// Description : Write-only access to instruction memory location 16 +#define PIO_INSTR_MEM16_OFFSET 0x00000088 +#define PIO_INSTR_MEM16_BITS 0x0000ffff +#define PIO_INSTR_MEM16_RESET 0x00000000 +#define PIO_INSTR_MEM16_MSB 15 +#define PIO_INSTR_MEM16_LSB 0 +#define PIO_INSTR_MEM16_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM17 +// Description : Write-only access to instruction memory location 17 +#define PIO_INSTR_MEM17_OFFSET 0x0000008c +#define PIO_INSTR_MEM17_BITS 0x0000ffff +#define PIO_INSTR_MEM17_RESET 0x00000000 +#define PIO_INSTR_MEM17_MSB 15 +#define PIO_INSTR_MEM17_LSB 0 +#define PIO_INSTR_MEM17_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM18 +// Description : Write-only access to instruction memory location 18 +#define PIO_INSTR_MEM18_OFFSET 0x00000090 +#define PIO_INSTR_MEM18_BITS 0x0000ffff +#define PIO_INSTR_MEM18_RESET 0x00000000 +#define PIO_INSTR_MEM18_MSB 15 +#define PIO_INSTR_MEM18_LSB 0 +#define PIO_INSTR_MEM18_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM19 +// Description : Write-only access to instruction memory location 19 +#define PIO_INSTR_MEM19_OFFSET 0x00000094 +#define PIO_INSTR_MEM19_BITS 0x0000ffff +#define PIO_INSTR_MEM19_RESET 0x00000000 +#define PIO_INSTR_MEM19_MSB 15 +#define PIO_INSTR_MEM19_LSB 0 +#define PIO_INSTR_MEM19_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM20 +// Description : Write-only access to instruction memory location 20 +#define PIO_INSTR_MEM20_OFFSET 0x00000098 +#define PIO_INSTR_MEM20_BITS 0x0000ffff +#define PIO_INSTR_MEM20_RESET 0x00000000 +#define PIO_INSTR_MEM20_MSB 15 +#define PIO_INSTR_MEM20_LSB 0 +#define PIO_INSTR_MEM20_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM21 +// Description : Write-only access to instruction memory location 21 +#define PIO_INSTR_MEM21_OFFSET 0x0000009c +#define PIO_INSTR_MEM21_BITS 0x0000ffff +#define PIO_INSTR_MEM21_RESET 0x00000000 +#define PIO_INSTR_MEM21_MSB 15 +#define PIO_INSTR_MEM21_LSB 0 +#define PIO_INSTR_MEM21_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM22 +// Description : Write-only access to instruction memory location 22 +#define PIO_INSTR_MEM22_OFFSET 0x000000a0 +#define PIO_INSTR_MEM22_BITS 0x0000ffff +#define PIO_INSTR_MEM22_RESET 0x00000000 +#define PIO_INSTR_MEM22_MSB 15 +#define PIO_INSTR_MEM22_LSB 0 +#define PIO_INSTR_MEM22_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM23 +// Description : Write-only access to instruction memory location 23 +#define PIO_INSTR_MEM23_OFFSET 0x000000a4 +#define PIO_INSTR_MEM23_BITS 0x0000ffff +#define PIO_INSTR_MEM23_RESET 0x00000000 +#define PIO_INSTR_MEM23_MSB 15 +#define PIO_INSTR_MEM23_LSB 0 +#define PIO_INSTR_MEM23_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM24 +// Description : Write-only access to instruction memory location 24 +#define PIO_INSTR_MEM24_OFFSET 0x000000a8 +#define PIO_INSTR_MEM24_BITS 0x0000ffff +#define PIO_INSTR_MEM24_RESET 0x00000000 +#define PIO_INSTR_MEM24_MSB 15 +#define PIO_INSTR_MEM24_LSB 0 +#define PIO_INSTR_MEM24_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM25 +// Description : Write-only access to instruction memory location 25 +#define PIO_INSTR_MEM25_OFFSET 0x000000ac +#define PIO_INSTR_MEM25_BITS 0x0000ffff +#define PIO_INSTR_MEM25_RESET 0x00000000 +#define PIO_INSTR_MEM25_MSB 15 +#define PIO_INSTR_MEM25_LSB 0 +#define PIO_INSTR_MEM25_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM26 +// Description : Write-only access to instruction memory location 26 +#define PIO_INSTR_MEM26_OFFSET 0x000000b0 +#define PIO_INSTR_MEM26_BITS 0x0000ffff +#define PIO_INSTR_MEM26_RESET 0x00000000 +#define PIO_INSTR_MEM26_MSB 15 +#define PIO_INSTR_MEM26_LSB 0 +#define PIO_INSTR_MEM26_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM27 +// Description : Write-only access to instruction memory location 27 +#define PIO_INSTR_MEM27_OFFSET 0x000000b4 +#define PIO_INSTR_MEM27_BITS 0x0000ffff +#define PIO_INSTR_MEM27_RESET 0x00000000 +#define PIO_INSTR_MEM27_MSB 15 +#define PIO_INSTR_MEM27_LSB 0 +#define PIO_INSTR_MEM27_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM28 +// Description : Write-only access to instruction memory location 28 +#define PIO_INSTR_MEM28_OFFSET 0x000000b8 +#define PIO_INSTR_MEM28_BITS 0x0000ffff +#define PIO_INSTR_MEM28_RESET 0x00000000 +#define PIO_INSTR_MEM28_MSB 15 +#define PIO_INSTR_MEM28_LSB 0 +#define PIO_INSTR_MEM28_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM29 +// Description : Write-only access to instruction memory location 29 +#define PIO_INSTR_MEM29_OFFSET 0x000000bc +#define PIO_INSTR_MEM29_BITS 0x0000ffff +#define PIO_INSTR_MEM29_RESET 0x00000000 +#define PIO_INSTR_MEM29_MSB 15 +#define PIO_INSTR_MEM29_LSB 0 +#define PIO_INSTR_MEM29_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM30 +// Description : Write-only access to instruction memory location 30 +#define PIO_INSTR_MEM30_OFFSET 0x000000c0 +#define PIO_INSTR_MEM30_BITS 0x0000ffff +#define PIO_INSTR_MEM30_RESET 0x00000000 +#define PIO_INSTR_MEM30_MSB 15 +#define PIO_INSTR_MEM30_LSB 0 +#define PIO_INSTR_MEM30_ACCESS "WO" +// ============================================================================= +// Register : PIO_INSTR_MEM31 +// Description : Write-only access to instruction memory location 31 +#define PIO_INSTR_MEM31_OFFSET 0x000000c4 +#define PIO_INSTR_MEM31_BITS 0x0000ffff +#define PIO_INSTR_MEM31_RESET 0x00000000 +#define PIO_INSTR_MEM31_MSB 15 +#define PIO_INSTR_MEM31_LSB 0 +#define PIO_INSTR_MEM31_ACCESS "WO" +// ============================================================================= +// Register : PIO_SM0_CLKDIV +// Description : Clock divider register for state machine 0 +// Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) +#define PIO_SM0_CLKDIV_OFFSET 0x000000c8 +#define PIO_SM0_CLKDIV_BITS 0xffffff00 +#define PIO_SM0_CLKDIV_RESET 0x00010000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_CLKDIV_INT +// Description : Effective frequency is sysclk/int. +// Value of 0 is interpreted as max possible value +#define PIO_SM0_CLKDIV_INT_RESET 0x0001 +#define PIO_SM0_CLKDIV_INT_BITS 0xffff0000 +#define PIO_SM0_CLKDIV_INT_MSB 31 +#define PIO_SM0_CLKDIV_INT_LSB 16 +#define PIO_SM0_CLKDIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_CLKDIV_FRAC +// Description : Fractional part of clock divider +#define PIO_SM0_CLKDIV_FRAC_RESET 0x00 +#define PIO_SM0_CLKDIV_FRAC_BITS 0x0000ff00 +#define PIO_SM0_CLKDIV_FRAC_MSB 15 +#define PIO_SM0_CLKDIV_FRAC_LSB 8 +#define PIO_SM0_CLKDIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM0_EXECCTRL +// Description : Execution/behavioural settings for state machine 0 +#define PIO_SM0_EXECCTRL_OFFSET 0x000000cc +#define PIO_SM0_EXECCTRL_BITS 0xffffff9f +#define PIO_SM0_EXECCTRL_RESET 0x0001f000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_EXEC_STALLED +// Description : An instruction written to SMx_INSTR is stalled, and latched by +// the +// state machine. Will clear once the instruction completes. +#define PIO_SM0_EXECCTRL_EXEC_STALLED_RESET 0x0 +#define PIO_SM0_EXECCTRL_EXEC_STALLED_BITS 0x80000000 +#define PIO_SM0_EXECCTRL_EXEC_STALLED_MSB 31 +#define PIO_SM0_EXECCTRL_EXEC_STALLED_LSB 31 +#define PIO_SM0_EXECCTRL_EXEC_STALLED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_SIDE_EN +// Description : If 1, the delay MSB is used as side-set enable, rather than a +// side-set data bit. This allows instructions to perform side-set +// optionally, +// rather than on every instruction. +#define PIO_SM0_EXECCTRL_SIDE_EN_RESET 0x0 +#define PIO_SM0_EXECCTRL_SIDE_EN_BITS 0x40000000 +#define PIO_SM0_EXECCTRL_SIDE_EN_MSB 30 +#define PIO_SM0_EXECCTRL_SIDE_EN_LSB 30 +#define PIO_SM0_EXECCTRL_SIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_SIDE_PINDIR +// Description : Side-set data is asserted to pin OEs instead of pin values +#define PIO_SM0_EXECCTRL_SIDE_PINDIR_RESET 0x0 +#define PIO_SM0_EXECCTRL_SIDE_PINDIR_BITS 0x20000000 +#define PIO_SM0_EXECCTRL_SIDE_PINDIR_MSB 29 +#define PIO_SM0_EXECCTRL_SIDE_PINDIR_LSB 29 +#define PIO_SM0_EXECCTRL_SIDE_PINDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_JMP_PIN +// Description : The GPIO number to use as condition for JMP PIN. Unaffected by +// input mapping. +#define PIO_SM0_EXECCTRL_JMP_PIN_RESET 0x00 +#define PIO_SM0_EXECCTRL_JMP_PIN_BITS 0x1f000000 +#define PIO_SM0_EXECCTRL_JMP_PIN_MSB 28 +#define PIO_SM0_EXECCTRL_JMP_PIN_LSB 24 +#define PIO_SM0_EXECCTRL_JMP_PIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_OUT_EN_SEL +// Description : Which data bit to use for inline OUT enable +#define PIO_SM0_EXECCTRL_OUT_EN_SEL_RESET 0x00 +#define PIO_SM0_EXECCTRL_OUT_EN_SEL_BITS 0x00f80000 +#define PIO_SM0_EXECCTRL_OUT_EN_SEL_MSB 23 +#define PIO_SM0_EXECCTRL_OUT_EN_SEL_LSB 19 +#define PIO_SM0_EXECCTRL_OUT_EN_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_INLINE_OUT_EN +// Description : If 1, use a bit of OUT data as an auxiliary write enable +// When used in conjunction with OUT_STICKY, writes with an enable +// of 0 will +// deassert the latest pin write. This can create useful +// masking/override behaviour +// due to the priority ordering of state machine pin writes (SM0 < +// SM1 < ...) +#define PIO_SM0_EXECCTRL_INLINE_OUT_EN_RESET 0x0 +#define PIO_SM0_EXECCTRL_INLINE_OUT_EN_BITS 0x00040000 +#define PIO_SM0_EXECCTRL_INLINE_OUT_EN_MSB 18 +#define PIO_SM0_EXECCTRL_INLINE_OUT_EN_LSB 18 +#define PIO_SM0_EXECCTRL_INLINE_OUT_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_OUT_STICKY +// Description : Continuously assert the most recent OUT/SET to the pins +#define PIO_SM0_EXECCTRL_OUT_STICKY_RESET 0x0 +#define PIO_SM0_EXECCTRL_OUT_STICKY_BITS 0x00020000 +#define PIO_SM0_EXECCTRL_OUT_STICKY_MSB 17 +#define PIO_SM0_EXECCTRL_OUT_STICKY_LSB 17 +#define PIO_SM0_EXECCTRL_OUT_STICKY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_WRAP_TOP +// Description : After reaching this address, execution is wrapped to +// wrap_bottom. +// If the instruction is a jump, and the jump condition is true, +// the jump takes priority. +#define PIO_SM0_EXECCTRL_WRAP_TOP_RESET 0x1f +#define PIO_SM0_EXECCTRL_WRAP_TOP_BITS 0x0001f000 +#define PIO_SM0_EXECCTRL_WRAP_TOP_MSB 16 +#define PIO_SM0_EXECCTRL_WRAP_TOP_LSB 12 +#define PIO_SM0_EXECCTRL_WRAP_TOP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_WRAP_BOTTOM +// Description : After reaching wrap_top, execution is wrapped to this address. +#define PIO_SM0_EXECCTRL_WRAP_BOTTOM_RESET 0x00 +#define PIO_SM0_EXECCTRL_WRAP_BOTTOM_BITS 0x00000f80 +#define PIO_SM0_EXECCTRL_WRAP_BOTTOM_MSB 11 +#define PIO_SM0_EXECCTRL_WRAP_BOTTOM_LSB 7 +#define PIO_SM0_EXECCTRL_WRAP_BOTTOM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_STATUS_SEL +// Description : Comparison used for the MOV x, STATUS instruction. +// 0x0 -> All-ones if TX FIFO level < N, otherwise all-zeroes +// 0x1 -> All-ones if RX FIFO level < N, otherwise all-zeroes +#define PIO_SM0_EXECCTRL_STATUS_SEL_RESET 0x0 +#define PIO_SM0_EXECCTRL_STATUS_SEL_BITS 0x00000010 +#define PIO_SM0_EXECCTRL_STATUS_SEL_MSB 4 +#define PIO_SM0_EXECCTRL_STATUS_SEL_LSB 4 +#define PIO_SM0_EXECCTRL_STATUS_SEL_ACCESS "RW" +#define PIO_SM0_EXECCTRL_STATUS_SEL_VALUE_TXLEVEL 0x0 +#define PIO_SM0_EXECCTRL_STATUS_SEL_VALUE_RXLEVEL 0x1 +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_EXECCTRL_STATUS_N +// Description : Comparison level for the MOV x, STATUS instruction +#define PIO_SM0_EXECCTRL_STATUS_N_RESET 0x0 +#define PIO_SM0_EXECCTRL_STATUS_N_BITS 0x0000000f +#define PIO_SM0_EXECCTRL_STATUS_N_MSB 3 +#define PIO_SM0_EXECCTRL_STATUS_N_LSB 0 +#define PIO_SM0_EXECCTRL_STATUS_N_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM0_SHIFTCTRL +// Description : Control behaviour of the input/output shift registers for state +// machine 0 +#define PIO_SM0_SHIFTCTRL_OFFSET 0x000000d0 +#define PIO_SM0_SHIFTCTRL_BITS 0xffff0000 +#define PIO_SM0_SHIFTCTRL_RESET 0x000c0000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_FJOIN_RX +// Description : When 1, RX FIFO steals the TX FIFO's storage, and becomes twice +// as deep. +// TX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM0_SHIFTCTRL_FJOIN_RX_RESET 0x0 +#define PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS 0x80000000 +#define PIO_SM0_SHIFTCTRL_FJOIN_RX_MSB 31 +#define PIO_SM0_SHIFTCTRL_FJOIN_RX_LSB 31 +#define PIO_SM0_SHIFTCTRL_FJOIN_RX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_FJOIN_TX +// Description : When 1, TX FIFO steals the RX FIFO's storage, and becomes twice +// as deep. +// RX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM0_SHIFTCTRL_FJOIN_TX_RESET 0x0 +#define PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS 0x40000000 +#define PIO_SM0_SHIFTCTRL_FJOIN_TX_MSB 30 +#define PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB 30 +#define PIO_SM0_SHIFTCTRL_FJOIN_TX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_PULL_THRESH +// Description : Number of bits shifted out of TXSR before autopull or +// conditional pull. +// Write 0 for value of 32. +#define PIO_SM0_SHIFTCTRL_PULL_THRESH_RESET 0x00 +#define PIO_SM0_SHIFTCTRL_PULL_THRESH_BITS 0x3e000000 +#define PIO_SM0_SHIFTCTRL_PULL_THRESH_MSB 29 +#define PIO_SM0_SHIFTCTRL_PULL_THRESH_LSB 25 +#define PIO_SM0_SHIFTCTRL_PULL_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_PUSH_THRESH +// Description : Number of bits shifted into RXSR before autopush or conditional +// push. +// Write 0 for value of 32. +#define PIO_SM0_SHIFTCTRL_PUSH_THRESH_RESET 0x00 +#define PIO_SM0_SHIFTCTRL_PUSH_THRESH_BITS 0x01f00000 +#define PIO_SM0_SHIFTCTRL_PUSH_THRESH_MSB 24 +#define PIO_SM0_SHIFTCTRL_PUSH_THRESH_LSB 20 +#define PIO_SM0_SHIFTCTRL_PUSH_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR +// Description : 1 = shift out of output shift register to right. 0 = to left. +#define PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_RESET 0x1 +#define PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_BITS 0x00080000 +#define PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_MSB 19 +#define PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_LSB 19 +#define PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_IN_SHIFTDIR +// Description : 1 = shift input shift register to right (data enters from +// left). 0 = to left. +#define PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_RESET 0x1 +#define PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_BITS 0x00040000 +#define PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_MSB 18 +#define PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_LSB 18 +#define PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_AUTOPULL +// Description : Pull automatically when the output shift register is emptied +#define PIO_SM0_SHIFTCTRL_AUTOPULL_RESET 0x0 +#define PIO_SM0_SHIFTCTRL_AUTOPULL_BITS 0x00020000 +#define PIO_SM0_SHIFTCTRL_AUTOPULL_MSB 17 +#define PIO_SM0_SHIFTCTRL_AUTOPULL_LSB 17 +#define PIO_SM0_SHIFTCTRL_AUTOPULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_SHIFTCTRL_AUTOPUSH +// Description : Push automatically when the input shift register is filled +#define PIO_SM0_SHIFTCTRL_AUTOPUSH_RESET 0x0 +#define PIO_SM0_SHIFTCTRL_AUTOPUSH_BITS 0x00010000 +#define PIO_SM0_SHIFTCTRL_AUTOPUSH_MSB 16 +#define PIO_SM0_SHIFTCTRL_AUTOPUSH_LSB 16 +#define PIO_SM0_SHIFTCTRL_AUTOPUSH_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM0_ADDR +// Description : Current instruction address of state machine 0 +#define PIO_SM0_ADDR_OFFSET 0x000000d4 +#define PIO_SM0_ADDR_BITS 0x0000001f +#define PIO_SM0_ADDR_RESET 0x00000000 +#define PIO_SM0_ADDR_MSB 4 +#define PIO_SM0_ADDR_LSB 0 +#define PIO_SM0_ADDR_ACCESS "RO" +// ============================================================================= +// Register : PIO_SM0_INSTR +// Description : Instruction currently being executed by state machine 0 +// Write to execute an instruction immediately (including jumps) +// and then resume execution. +#define PIO_SM0_INSTR_OFFSET 0x000000d8 +#define PIO_SM0_INSTR_BITS 0x0000ffff +#define PIO_SM0_INSTR_RESET "-" +#define PIO_SM0_INSTR_MSB 15 +#define PIO_SM0_INSTR_LSB 0 +#define PIO_SM0_INSTR_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM0_PINCTRL +// Description : State machine pin control +#define PIO_SM0_PINCTRL_OFFSET 0x000000dc +#define PIO_SM0_PINCTRL_BITS 0xffffffff +#define PIO_SM0_PINCTRL_RESET 0x14000000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_SIDESET_COUNT +// Description : The number of delay bits co-opted for side-set. Inclusive of +// the enable bit, if present. +#define PIO_SM0_PINCTRL_SIDESET_COUNT_RESET 0x0 +#define PIO_SM0_PINCTRL_SIDESET_COUNT_BITS 0xe0000000 +#define PIO_SM0_PINCTRL_SIDESET_COUNT_MSB 31 +#define PIO_SM0_PINCTRL_SIDESET_COUNT_LSB 29 +#define PIO_SM0_PINCTRL_SIDESET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_SET_COUNT +// Description : The number of pins asserted by a SET. Max of 5 +#define PIO_SM0_PINCTRL_SET_COUNT_RESET 0x5 +#define PIO_SM0_PINCTRL_SET_COUNT_BITS 0x1c000000 +#define PIO_SM0_PINCTRL_SET_COUNT_MSB 28 +#define PIO_SM0_PINCTRL_SET_COUNT_LSB 26 +#define PIO_SM0_PINCTRL_SET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_OUT_COUNT +// Description : The number of pins asserted by an OUT. Value of 0 -> 32 pins +#define PIO_SM0_PINCTRL_OUT_COUNT_RESET 0x00 +#define PIO_SM0_PINCTRL_OUT_COUNT_BITS 0x03f00000 +#define PIO_SM0_PINCTRL_OUT_COUNT_MSB 25 +#define PIO_SM0_PINCTRL_OUT_COUNT_LSB 20 +#define PIO_SM0_PINCTRL_OUT_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_IN_BASE +// Description : The virtual pin corresponding to IN bit 0 +#define PIO_SM0_PINCTRL_IN_BASE_RESET 0x00 +#define PIO_SM0_PINCTRL_IN_BASE_BITS 0x000f8000 +#define PIO_SM0_PINCTRL_IN_BASE_MSB 19 +#define PIO_SM0_PINCTRL_IN_BASE_LSB 15 +#define PIO_SM0_PINCTRL_IN_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_SIDESET_BASE +// Description : The virtual pin corresponding to delay field bit 0 +#define PIO_SM0_PINCTRL_SIDESET_BASE_RESET 0x00 +#define PIO_SM0_PINCTRL_SIDESET_BASE_BITS 0x00007c00 +#define PIO_SM0_PINCTRL_SIDESET_BASE_MSB 14 +#define PIO_SM0_PINCTRL_SIDESET_BASE_LSB 10 +#define PIO_SM0_PINCTRL_SIDESET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_SET_BASE +// Description : The virtual pin corresponding to SET bit 0 +#define PIO_SM0_PINCTRL_SET_BASE_RESET 0x00 +#define PIO_SM0_PINCTRL_SET_BASE_BITS 0x000003e0 +#define PIO_SM0_PINCTRL_SET_BASE_MSB 9 +#define PIO_SM0_PINCTRL_SET_BASE_LSB 5 +#define PIO_SM0_PINCTRL_SET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM0_PINCTRL_OUT_BASE +// Description : The virtual pin corresponding to OUT bit 0 +#define PIO_SM0_PINCTRL_OUT_BASE_RESET 0x00 +#define PIO_SM0_PINCTRL_OUT_BASE_BITS 0x0000001f +#define PIO_SM0_PINCTRL_OUT_BASE_MSB 4 +#define PIO_SM0_PINCTRL_OUT_BASE_LSB 0 +#define PIO_SM0_PINCTRL_OUT_BASE_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM1_CLKDIV +// Description : Clock divider register for state machine 1 +// Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) +#define PIO_SM1_CLKDIV_OFFSET 0x000000e0 +#define PIO_SM1_CLKDIV_BITS 0xffffff00 +#define PIO_SM1_CLKDIV_RESET 0x00010000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_CLKDIV_INT +// Description : Effective frequency is sysclk/int. +// Value of 0 is interpreted as max possible value +#define PIO_SM1_CLKDIV_INT_RESET 0x0001 +#define PIO_SM1_CLKDIV_INT_BITS 0xffff0000 +#define PIO_SM1_CLKDIV_INT_MSB 31 +#define PIO_SM1_CLKDIV_INT_LSB 16 +#define PIO_SM1_CLKDIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_CLKDIV_FRAC +// Description : Fractional part of clock divider +#define PIO_SM1_CLKDIV_FRAC_RESET 0x00 +#define PIO_SM1_CLKDIV_FRAC_BITS 0x0000ff00 +#define PIO_SM1_CLKDIV_FRAC_MSB 15 +#define PIO_SM1_CLKDIV_FRAC_LSB 8 +#define PIO_SM1_CLKDIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM1_EXECCTRL +// Description : Execution/behavioural settings for state machine 1 +#define PIO_SM1_EXECCTRL_OFFSET 0x000000e4 +#define PIO_SM1_EXECCTRL_BITS 0xffffff9f +#define PIO_SM1_EXECCTRL_RESET 0x0001f000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_EXEC_STALLED +// Description : An instruction written to SMx_INSTR is stalled, and latched by +// the +// state machine. Will clear once the instruction completes. +#define PIO_SM1_EXECCTRL_EXEC_STALLED_RESET 0x0 +#define PIO_SM1_EXECCTRL_EXEC_STALLED_BITS 0x80000000 +#define PIO_SM1_EXECCTRL_EXEC_STALLED_MSB 31 +#define PIO_SM1_EXECCTRL_EXEC_STALLED_LSB 31 +#define PIO_SM1_EXECCTRL_EXEC_STALLED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_SIDE_EN +// Description : If 1, the delay MSB is used as side-set enable, rather than a +// side-set data bit. This allows instructions to perform side-set +// optionally, +// rather than on every instruction. +#define PIO_SM1_EXECCTRL_SIDE_EN_RESET 0x0 +#define PIO_SM1_EXECCTRL_SIDE_EN_BITS 0x40000000 +#define PIO_SM1_EXECCTRL_SIDE_EN_MSB 30 +#define PIO_SM1_EXECCTRL_SIDE_EN_LSB 30 +#define PIO_SM1_EXECCTRL_SIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_SIDE_PINDIR +// Description : Side-set data is asserted to pin OEs instead of pin values +#define PIO_SM1_EXECCTRL_SIDE_PINDIR_RESET 0x0 +#define PIO_SM1_EXECCTRL_SIDE_PINDIR_BITS 0x20000000 +#define PIO_SM1_EXECCTRL_SIDE_PINDIR_MSB 29 +#define PIO_SM1_EXECCTRL_SIDE_PINDIR_LSB 29 +#define PIO_SM1_EXECCTRL_SIDE_PINDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_JMP_PIN +// Description : The GPIO number to use as condition for JMP PIN. Unaffected by +// input mapping. +#define PIO_SM1_EXECCTRL_JMP_PIN_RESET 0x00 +#define PIO_SM1_EXECCTRL_JMP_PIN_BITS 0x1f000000 +#define PIO_SM1_EXECCTRL_JMP_PIN_MSB 28 +#define PIO_SM1_EXECCTRL_JMP_PIN_LSB 24 +#define PIO_SM1_EXECCTRL_JMP_PIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_OUT_EN_SEL +// Description : Which data bit to use for inline OUT enable +#define PIO_SM1_EXECCTRL_OUT_EN_SEL_RESET 0x00 +#define PIO_SM1_EXECCTRL_OUT_EN_SEL_BITS 0x00f80000 +#define PIO_SM1_EXECCTRL_OUT_EN_SEL_MSB 23 +#define PIO_SM1_EXECCTRL_OUT_EN_SEL_LSB 19 +#define PIO_SM1_EXECCTRL_OUT_EN_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_INLINE_OUT_EN +// Description : If 1, use a bit of OUT data as an auxiliary write enable +// When used in conjunction with OUT_STICKY, writes with an enable +// of 0 will +// deassert the latest pin write. This can create useful +// masking/override behaviour +// due to the priority ordering of state machine pin writes (SM0 < +// SM1 < ...) +#define PIO_SM1_EXECCTRL_INLINE_OUT_EN_RESET 0x0 +#define PIO_SM1_EXECCTRL_INLINE_OUT_EN_BITS 0x00040000 +#define PIO_SM1_EXECCTRL_INLINE_OUT_EN_MSB 18 +#define PIO_SM1_EXECCTRL_INLINE_OUT_EN_LSB 18 +#define PIO_SM1_EXECCTRL_INLINE_OUT_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_OUT_STICKY +// Description : Continuously assert the most recent OUT/SET to the pins +#define PIO_SM1_EXECCTRL_OUT_STICKY_RESET 0x0 +#define PIO_SM1_EXECCTRL_OUT_STICKY_BITS 0x00020000 +#define PIO_SM1_EXECCTRL_OUT_STICKY_MSB 17 +#define PIO_SM1_EXECCTRL_OUT_STICKY_LSB 17 +#define PIO_SM1_EXECCTRL_OUT_STICKY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_WRAP_TOP +// Description : After reaching this address, execution is wrapped to +// wrap_bottom. +// If the instruction is a jump, and the jump condition is true, +// the jump takes priority. +#define PIO_SM1_EXECCTRL_WRAP_TOP_RESET 0x1f +#define PIO_SM1_EXECCTRL_WRAP_TOP_BITS 0x0001f000 +#define PIO_SM1_EXECCTRL_WRAP_TOP_MSB 16 +#define PIO_SM1_EXECCTRL_WRAP_TOP_LSB 12 +#define PIO_SM1_EXECCTRL_WRAP_TOP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_WRAP_BOTTOM +// Description : After reaching wrap_top, execution is wrapped to this address. +#define PIO_SM1_EXECCTRL_WRAP_BOTTOM_RESET 0x00 +#define PIO_SM1_EXECCTRL_WRAP_BOTTOM_BITS 0x00000f80 +#define PIO_SM1_EXECCTRL_WRAP_BOTTOM_MSB 11 +#define PIO_SM1_EXECCTRL_WRAP_BOTTOM_LSB 7 +#define PIO_SM1_EXECCTRL_WRAP_BOTTOM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_STATUS_SEL +// Description : Comparison used for the MOV x, STATUS instruction. +// 0x0 -> All-ones if TX FIFO level < N, otherwise all-zeroes +// 0x1 -> All-ones if RX FIFO level < N, otherwise all-zeroes +#define PIO_SM1_EXECCTRL_STATUS_SEL_RESET 0x0 +#define PIO_SM1_EXECCTRL_STATUS_SEL_BITS 0x00000010 +#define PIO_SM1_EXECCTRL_STATUS_SEL_MSB 4 +#define PIO_SM1_EXECCTRL_STATUS_SEL_LSB 4 +#define PIO_SM1_EXECCTRL_STATUS_SEL_ACCESS "RW" +#define PIO_SM1_EXECCTRL_STATUS_SEL_VALUE_TXLEVEL 0x0 +#define PIO_SM1_EXECCTRL_STATUS_SEL_VALUE_RXLEVEL 0x1 +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_EXECCTRL_STATUS_N +// Description : Comparison level for the MOV x, STATUS instruction +#define PIO_SM1_EXECCTRL_STATUS_N_RESET 0x0 +#define PIO_SM1_EXECCTRL_STATUS_N_BITS 0x0000000f +#define PIO_SM1_EXECCTRL_STATUS_N_MSB 3 +#define PIO_SM1_EXECCTRL_STATUS_N_LSB 0 +#define PIO_SM1_EXECCTRL_STATUS_N_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM1_SHIFTCTRL +// Description : Control behaviour of the input/output shift registers for state +// machine 1 +#define PIO_SM1_SHIFTCTRL_OFFSET 0x000000e8 +#define PIO_SM1_SHIFTCTRL_BITS 0xffff0000 +#define PIO_SM1_SHIFTCTRL_RESET 0x000c0000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_FJOIN_RX +// Description : When 1, RX FIFO steals the TX FIFO's storage, and becomes twice +// as deep. +// TX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM1_SHIFTCTRL_FJOIN_RX_RESET 0x0 +#define PIO_SM1_SHIFTCTRL_FJOIN_RX_BITS 0x80000000 +#define PIO_SM1_SHIFTCTRL_FJOIN_RX_MSB 31 +#define PIO_SM1_SHIFTCTRL_FJOIN_RX_LSB 31 +#define PIO_SM1_SHIFTCTRL_FJOIN_RX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_FJOIN_TX +// Description : When 1, TX FIFO steals the RX FIFO's storage, and becomes twice +// as deep. +// RX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM1_SHIFTCTRL_FJOIN_TX_RESET 0x0 +#define PIO_SM1_SHIFTCTRL_FJOIN_TX_BITS 0x40000000 +#define PIO_SM1_SHIFTCTRL_FJOIN_TX_MSB 30 +#define PIO_SM1_SHIFTCTRL_FJOIN_TX_LSB 30 +#define PIO_SM1_SHIFTCTRL_FJOIN_TX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_PULL_THRESH +// Description : Number of bits shifted out of TXSR before autopull or +// conditional pull. +// Write 0 for value of 32. +#define PIO_SM1_SHIFTCTRL_PULL_THRESH_RESET 0x00 +#define PIO_SM1_SHIFTCTRL_PULL_THRESH_BITS 0x3e000000 +#define PIO_SM1_SHIFTCTRL_PULL_THRESH_MSB 29 +#define PIO_SM1_SHIFTCTRL_PULL_THRESH_LSB 25 +#define PIO_SM1_SHIFTCTRL_PULL_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_PUSH_THRESH +// Description : Number of bits shifted into RXSR before autopush or conditional +// push. +// Write 0 for value of 32. +#define PIO_SM1_SHIFTCTRL_PUSH_THRESH_RESET 0x00 +#define PIO_SM1_SHIFTCTRL_PUSH_THRESH_BITS 0x01f00000 +#define PIO_SM1_SHIFTCTRL_PUSH_THRESH_MSB 24 +#define PIO_SM1_SHIFTCTRL_PUSH_THRESH_LSB 20 +#define PIO_SM1_SHIFTCTRL_PUSH_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_OUT_SHIFTDIR +// Description : 1 = shift out of output shift register to right. 0 = to left. +#define PIO_SM1_SHIFTCTRL_OUT_SHIFTDIR_RESET 0x1 +#define PIO_SM1_SHIFTCTRL_OUT_SHIFTDIR_BITS 0x00080000 +#define PIO_SM1_SHIFTCTRL_OUT_SHIFTDIR_MSB 19 +#define PIO_SM1_SHIFTCTRL_OUT_SHIFTDIR_LSB 19 +#define PIO_SM1_SHIFTCTRL_OUT_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_IN_SHIFTDIR +// Description : 1 = shift input shift register to right (data enters from +// left). 0 = to left. +#define PIO_SM1_SHIFTCTRL_IN_SHIFTDIR_RESET 0x1 +#define PIO_SM1_SHIFTCTRL_IN_SHIFTDIR_BITS 0x00040000 +#define PIO_SM1_SHIFTCTRL_IN_SHIFTDIR_MSB 18 +#define PIO_SM1_SHIFTCTRL_IN_SHIFTDIR_LSB 18 +#define PIO_SM1_SHIFTCTRL_IN_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_AUTOPULL +// Description : Pull automatically when the output shift register is emptied +#define PIO_SM1_SHIFTCTRL_AUTOPULL_RESET 0x0 +#define PIO_SM1_SHIFTCTRL_AUTOPULL_BITS 0x00020000 +#define PIO_SM1_SHIFTCTRL_AUTOPULL_MSB 17 +#define PIO_SM1_SHIFTCTRL_AUTOPULL_LSB 17 +#define PIO_SM1_SHIFTCTRL_AUTOPULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_SHIFTCTRL_AUTOPUSH +// Description : Push automatically when the input shift register is filled +#define PIO_SM1_SHIFTCTRL_AUTOPUSH_RESET 0x0 +#define PIO_SM1_SHIFTCTRL_AUTOPUSH_BITS 0x00010000 +#define PIO_SM1_SHIFTCTRL_AUTOPUSH_MSB 16 +#define PIO_SM1_SHIFTCTRL_AUTOPUSH_LSB 16 +#define PIO_SM1_SHIFTCTRL_AUTOPUSH_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM1_ADDR +// Description : Current instruction address of state machine 1 +#define PIO_SM1_ADDR_OFFSET 0x000000ec +#define PIO_SM1_ADDR_BITS 0x0000001f +#define PIO_SM1_ADDR_RESET 0x00000000 +#define PIO_SM1_ADDR_MSB 4 +#define PIO_SM1_ADDR_LSB 0 +#define PIO_SM1_ADDR_ACCESS "RO" +// ============================================================================= +// Register : PIO_SM1_INSTR +// Description : Instruction currently being executed by state machine 1 +// Write to execute an instruction immediately (including jumps) +// and then resume execution. +#define PIO_SM1_INSTR_OFFSET 0x000000f0 +#define PIO_SM1_INSTR_BITS 0x0000ffff +#define PIO_SM1_INSTR_RESET "-" +#define PIO_SM1_INSTR_MSB 15 +#define PIO_SM1_INSTR_LSB 0 +#define PIO_SM1_INSTR_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM1_PINCTRL +// Description : State machine pin control +#define PIO_SM1_PINCTRL_OFFSET 0x000000f4 +#define PIO_SM1_PINCTRL_BITS 0xffffffff +#define PIO_SM1_PINCTRL_RESET 0x14000000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_SIDESET_COUNT +// Description : The number of delay bits co-opted for side-set. Inclusive of +// the enable bit, if present. +#define PIO_SM1_PINCTRL_SIDESET_COUNT_RESET 0x0 +#define PIO_SM1_PINCTRL_SIDESET_COUNT_BITS 0xe0000000 +#define PIO_SM1_PINCTRL_SIDESET_COUNT_MSB 31 +#define PIO_SM1_PINCTRL_SIDESET_COUNT_LSB 29 +#define PIO_SM1_PINCTRL_SIDESET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_SET_COUNT +// Description : The number of pins asserted by a SET. Max of 5 +#define PIO_SM1_PINCTRL_SET_COUNT_RESET 0x5 +#define PIO_SM1_PINCTRL_SET_COUNT_BITS 0x1c000000 +#define PIO_SM1_PINCTRL_SET_COUNT_MSB 28 +#define PIO_SM1_PINCTRL_SET_COUNT_LSB 26 +#define PIO_SM1_PINCTRL_SET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_OUT_COUNT +// Description : The number of pins asserted by an OUT. Value of 0 -> 32 pins +#define PIO_SM1_PINCTRL_OUT_COUNT_RESET 0x00 +#define PIO_SM1_PINCTRL_OUT_COUNT_BITS 0x03f00000 +#define PIO_SM1_PINCTRL_OUT_COUNT_MSB 25 +#define PIO_SM1_PINCTRL_OUT_COUNT_LSB 20 +#define PIO_SM1_PINCTRL_OUT_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_IN_BASE +// Description : The virtual pin corresponding to IN bit 0 +#define PIO_SM1_PINCTRL_IN_BASE_RESET 0x00 +#define PIO_SM1_PINCTRL_IN_BASE_BITS 0x000f8000 +#define PIO_SM1_PINCTRL_IN_BASE_MSB 19 +#define PIO_SM1_PINCTRL_IN_BASE_LSB 15 +#define PIO_SM1_PINCTRL_IN_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_SIDESET_BASE +// Description : The virtual pin corresponding to delay field bit 0 +#define PIO_SM1_PINCTRL_SIDESET_BASE_RESET 0x00 +#define PIO_SM1_PINCTRL_SIDESET_BASE_BITS 0x00007c00 +#define PIO_SM1_PINCTRL_SIDESET_BASE_MSB 14 +#define PIO_SM1_PINCTRL_SIDESET_BASE_LSB 10 +#define PIO_SM1_PINCTRL_SIDESET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_SET_BASE +// Description : The virtual pin corresponding to SET bit 0 +#define PIO_SM1_PINCTRL_SET_BASE_RESET 0x00 +#define PIO_SM1_PINCTRL_SET_BASE_BITS 0x000003e0 +#define PIO_SM1_PINCTRL_SET_BASE_MSB 9 +#define PIO_SM1_PINCTRL_SET_BASE_LSB 5 +#define PIO_SM1_PINCTRL_SET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM1_PINCTRL_OUT_BASE +// Description : The virtual pin corresponding to OUT bit 0 +#define PIO_SM1_PINCTRL_OUT_BASE_RESET 0x00 +#define PIO_SM1_PINCTRL_OUT_BASE_BITS 0x0000001f +#define PIO_SM1_PINCTRL_OUT_BASE_MSB 4 +#define PIO_SM1_PINCTRL_OUT_BASE_LSB 0 +#define PIO_SM1_PINCTRL_OUT_BASE_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM2_CLKDIV +// Description : Clock divider register for state machine 2 +// Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) +#define PIO_SM2_CLKDIV_OFFSET 0x000000f8 +#define PIO_SM2_CLKDIV_BITS 0xffffff00 +#define PIO_SM2_CLKDIV_RESET 0x00010000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_CLKDIV_INT +// Description : Effective frequency is sysclk/int. +// Value of 0 is interpreted as max possible value +#define PIO_SM2_CLKDIV_INT_RESET 0x0001 +#define PIO_SM2_CLKDIV_INT_BITS 0xffff0000 +#define PIO_SM2_CLKDIV_INT_MSB 31 +#define PIO_SM2_CLKDIV_INT_LSB 16 +#define PIO_SM2_CLKDIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_CLKDIV_FRAC +// Description : Fractional part of clock divider +#define PIO_SM2_CLKDIV_FRAC_RESET 0x00 +#define PIO_SM2_CLKDIV_FRAC_BITS 0x0000ff00 +#define PIO_SM2_CLKDIV_FRAC_MSB 15 +#define PIO_SM2_CLKDIV_FRAC_LSB 8 +#define PIO_SM2_CLKDIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM2_EXECCTRL +// Description : Execution/behavioural settings for state machine 2 +#define PIO_SM2_EXECCTRL_OFFSET 0x000000fc +#define PIO_SM2_EXECCTRL_BITS 0xffffff9f +#define PIO_SM2_EXECCTRL_RESET 0x0001f000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_EXEC_STALLED +// Description : An instruction written to SMx_INSTR is stalled, and latched by +// the +// state machine. Will clear once the instruction completes. +#define PIO_SM2_EXECCTRL_EXEC_STALLED_RESET 0x0 +#define PIO_SM2_EXECCTRL_EXEC_STALLED_BITS 0x80000000 +#define PIO_SM2_EXECCTRL_EXEC_STALLED_MSB 31 +#define PIO_SM2_EXECCTRL_EXEC_STALLED_LSB 31 +#define PIO_SM2_EXECCTRL_EXEC_STALLED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_SIDE_EN +// Description : If 1, the delay MSB is used as side-set enable, rather than a +// side-set data bit. This allows instructions to perform side-set +// optionally, +// rather than on every instruction. +#define PIO_SM2_EXECCTRL_SIDE_EN_RESET 0x0 +#define PIO_SM2_EXECCTRL_SIDE_EN_BITS 0x40000000 +#define PIO_SM2_EXECCTRL_SIDE_EN_MSB 30 +#define PIO_SM2_EXECCTRL_SIDE_EN_LSB 30 +#define PIO_SM2_EXECCTRL_SIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_SIDE_PINDIR +// Description : Side-set data is asserted to pin OEs instead of pin values +#define PIO_SM2_EXECCTRL_SIDE_PINDIR_RESET 0x0 +#define PIO_SM2_EXECCTRL_SIDE_PINDIR_BITS 0x20000000 +#define PIO_SM2_EXECCTRL_SIDE_PINDIR_MSB 29 +#define PIO_SM2_EXECCTRL_SIDE_PINDIR_LSB 29 +#define PIO_SM2_EXECCTRL_SIDE_PINDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_JMP_PIN +// Description : The GPIO number to use as condition for JMP PIN. Unaffected by +// input mapping. +#define PIO_SM2_EXECCTRL_JMP_PIN_RESET 0x00 +#define PIO_SM2_EXECCTRL_JMP_PIN_BITS 0x1f000000 +#define PIO_SM2_EXECCTRL_JMP_PIN_MSB 28 +#define PIO_SM2_EXECCTRL_JMP_PIN_LSB 24 +#define PIO_SM2_EXECCTRL_JMP_PIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_OUT_EN_SEL +// Description : Which data bit to use for inline OUT enable +#define PIO_SM2_EXECCTRL_OUT_EN_SEL_RESET 0x00 +#define PIO_SM2_EXECCTRL_OUT_EN_SEL_BITS 0x00f80000 +#define PIO_SM2_EXECCTRL_OUT_EN_SEL_MSB 23 +#define PIO_SM2_EXECCTRL_OUT_EN_SEL_LSB 19 +#define PIO_SM2_EXECCTRL_OUT_EN_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_INLINE_OUT_EN +// Description : If 1, use a bit of OUT data as an auxiliary write enable +// When used in conjunction with OUT_STICKY, writes with an enable +// of 0 will +// deassert the latest pin write. This can create useful +// masking/override behaviour +// due to the priority ordering of state machine pin writes (SM0 < +// SM1 < ...) +#define PIO_SM2_EXECCTRL_INLINE_OUT_EN_RESET 0x0 +#define PIO_SM2_EXECCTRL_INLINE_OUT_EN_BITS 0x00040000 +#define PIO_SM2_EXECCTRL_INLINE_OUT_EN_MSB 18 +#define PIO_SM2_EXECCTRL_INLINE_OUT_EN_LSB 18 +#define PIO_SM2_EXECCTRL_INLINE_OUT_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_OUT_STICKY +// Description : Continuously assert the most recent OUT/SET to the pins +#define PIO_SM2_EXECCTRL_OUT_STICKY_RESET 0x0 +#define PIO_SM2_EXECCTRL_OUT_STICKY_BITS 0x00020000 +#define PIO_SM2_EXECCTRL_OUT_STICKY_MSB 17 +#define PIO_SM2_EXECCTRL_OUT_STICKY_LSB 17 +#define PIO_SM2_EXECCTRL_OUT_STICKY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_WRAP_TOP +// Description : After reaching this address, execution is wrapped to +// wrap_bottom. +// If the instruction is a jump, and the jump condition is true, +// the jump takes priority. +#define PIO_SM2_EXECCTRL_WRAP_TOP_RESET 0x1f +#define PIO_SM2_EXECCTRL_WRAP_TOP_BITS 0x0001f000 +#define PIO_SM2_EXECCTRL_WRAP_TOP_MSB 16 +#define PIO_SM2_EXECCTRL_WRAP_TOP_LSB 12 +#define PIO_SM2_EXECCTRL_WRAP_TOP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_WRAP_BOTTOM +// Description : After reaching wrap_top, execution is wrapped to this address. +#define PIO_SM2_EXECCTRL_WRAP_BOTTOM_RESET 0x00 +#define PIO_SM2_EXECCTRL_WRAP_BOTTOM_BITS 0x00000f80 +#define PIO_SM2_EXECCTRL_WRAP_BOTTOM_MSB 11 +#define PIO_SM2_EXECCTRL_WRAP_BOTTOM_LSB 7 +#define PIO_SM2_EXECCTRL_WRAP_BOTTOM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_STATUS_SEL +// Description : Comparison used for the MOV x, STATUS instruction. +// 0x0 -> All-ones if TX FIFO level < N, otherwise all-zeroes +// 0x1 -> All-ones if RX FIFO level < N, otherwise all-zeroes +#define PIO_SM2_EXECCTRL_STATUS_SEL_RESET 0x0 +#define PIO_SM2_EXECCTRL_STATUS_SEL_BITS 0x00000010 +#define PIO_SM2_EXECCTRL_STATUS_SEL_MSB 4 +#define PIO_SM2_EXECCTRL_STATUS_SEL_LSB 4 +#define PIO_SM2_EXECCTRL_STATUS_SEL_ACCESS "RW" +#define PIO_SM2_EXECCTRL_STATUS_SEL_VALUE_TXLEVEL 0x0 +#define PIO_SM2_EXECCTRL_STATUS_SEL_VALUE_RXLEVEL 0x1 +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_EXECCTRL_STATUS_N +// Description : Comparison level for the MOV x, STATUS instruction +#define PIO_SM2_EXECCTRL_STATUS_N_RESET 0x0 +#define PIO_SM2_EXECCTRL_STATUS_N_BITS 0x0000000f +#define PIO_SM2_EXECCTRL_STATUS_N_MSB 3 +#define PIO_SM2_EXECCTRL_STATUS_N_LSB 0 +#define PIO_SM2_EXECCTRL_STATUS_N_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM2_SHIFTCTRL +// Description : Control behaviour of the input/output shift registers for state +// machine 2 +#define PIO_SM2_SHIFTCTRL_OFFSET 0x00000100 +#define PIO_SM2_SHIFTCTRL_BITS 0xffff0000 +#define PIO_SM2_SHIFTCTRL_RESET 0x000c0000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_FJOIN_RX +// Description : When 1, RX FIFO steals the TX FIFO's storage, and becomes twice +// as deep. +// TX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM2_SHIFTCTRL_FJOIN_RX_RESET 0x0 +#define PIO_SM2_SHIFTCTRL_FJOIN_RX_BITS 0x80000000 +#define PIO_SM2_SHIFTCTRL_FJOIN_RX_MSB 31 +#define PIO_SM2_SHIFTCTRL_FJOIN_RX_LSB 31 +#define PIO_SM2_SHIFTCTRL_FJOIN_RX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_FJOIN_TX +// Description : When 1, TX FIFO steals the RX FIFO's storage, and becomes twice +// as deep. +// RX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM2_SHIFTCTRL_FJOIN_TX_RESET 0x0 +#define PIO_SM2_SHIFTCTRL_FJOIN_TX_BITS 0x40000000 +#define PIO_SM2_SHIFTCTRL_FJOIN_TX_MSB 30 +#define PIO_SM2_SHIFTCTRL_FJOIN_TX_LSB 30 +#define PIO_SM2_SHIFTCTRL_FJOIN_TX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_PULL_THRESH +// Description : Number of bits shifted out of TXSR before autopull or +// conditional pull. +// Write 0 for value of 32. +#define PIO_SM2_SHIFTCTRL_PULL_THRESH_RESET 0x00 +#define PIO_SM2_SHIFTCTRL_PULL_THRESH_BITS 0x3e000000 +#define PIO_SM2_SHIFTCTRL_PULL_THRESH_MSB 29 +#define PIO_SM2_SHIFTCTRL_PULL_THRESH_LSB 25 +#define PIO_SM2_SHIFTCTRL_PULL_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_PUSH_THRESH +// Description : Number of bits shifted into RXSR before autopush or conditional +// push. +// Write 0 for value of 32. +#define PIO_SM2_SHIFTCTRL_PUSH_THRESH_RESET 0x00 +#define PIO_SM2_SHIFTCTRL_PUSH_THRESH_BITS 0x01f00000 +#define PIO_SM2_SHIFTCTRL_PUSH_THRESH_MSB 24 +#define PIO_SM2_SHIFTCTRL_PUSH_THRESH_LSB 20 +#define PIO_SM2_SHIFTCTRL_PUSH_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_OUT_SHIFTDIR +// Description : 1 = shift out of output shift register to right. 0 = to left. +#define PIO_SM2_SHIFTCTRL_OUT_SHIFTDIR_RESET 0x1 +#define PIO_SM2_SHIFTCTRL_OUT_SHIFTDIR_BITS 0x00080000 +#define PIO_SM2_SHIFTCTRL_OUT_SHIFTDIR_MSB 19 +#define PIO_SM2_SHIFTCTRL_OUT_SHIFTDIR_LSB 19 +#define PIO_SM2_SHIFTCTRL_OUT_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_IN_SHIFTDIR +// Description : 1 = shift input shift register to right (data enters from +// left). 0 = to left. +#define PIO_SM2_SHIFTCTRL_IN_SHIFTDIR_RESET 0x1 +#define PIO_SM2_SHIFTCTRL_IN_SHIFTDIR_BITS 0x00040000 +#define PIO_SM2_SHIFTCTRL_IN_SHIFTDIR_MSB 18 +#define PIO_SM2_SHIFTCTRL_IN_SHIFTDIR_LSB 18 +#define PIO_SM2_SHIFTCTRL_IN_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_AUTOPULL +// Description : Pull automatically when the output shift register is emptied +#define PIO_SM2_SHIFTCTRL_AUTOPULL_RESET 0x0 +#define PIO_SM2_SHIFTCTRL_AUTOPULL_BITS 0x00020000 +#define PIO_SM2_SHIFTCTRL_AUTOPULL_MSB 17 +#define PIO_SM2_SHIFTCTRL_AUTOPULL_LSB 17 +#define PIO_SM2_SHIFTCTRL_AUTOPULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_SHIFTCTRL_AUTOPUSH +// Description : Push automatically when the input shift register is filled +#define PIO_SM2_SHIFTCTRL_AUTOPUSH_RESET 0x0 +#define PIO_SM2_SHIFTCTRL_AUTOPUSH_BITS 0x00010000 +#define PIO_SM2_SHIFTCTRL_AUTOPUSH_MSB 16 +#define PIO_SM2_SHIFTCTRL_AUTOPUSH_LSB 16 +#define PIO_SM2_SHIFTCTRL_AUTOPUSH_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM2_ADDR +// Description : Current instruction address of state machine 2 +#define PIO_SM2_ADDR_OFFSET 0x00000104 +#define PIO_SM2_ADDR_BITS 0x0000001f +#define PIO_SM2_ADDR_RESET 0x00000000 +#define PIO_SM2_ADDR_MSB 4 +#define PIO_SM2_ADDR_LSB 0 +#define PIO_SM2_ADDR_ACCESS "RO" +// ============================================================================= +// Register : PIO_SM2_INSTR +// Description : Instruction currently being executed by state machine 2 +// Write to execute an instruction immediately (including jumps) +// and then resume execution. +#define PIO_SM2_INSTR_OFFSET 0x00000108 +#define PIO_SM2_INSTR_BITS 0x0000ffff +#define PIO_SM2_INSTR_RESET "-" +#define PIO_SM2_INSTR_MSB 15 +#define PIO_SM2_INSTR_LSB 0 +#define PIO_SM2_INSTR_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM2_PINCTRL +// Description : State machine pin control +#define PIO_SM2_PINCTRL_OFFSET 0x0000010c +#define PIO_SM2_PINCTRL_BITS 0xffffffff +#define PIO_SM2_PINCTRL_RESET 0x14000000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_SIDESET_COUNT +// Description : The number of delay bits co-opted for side-set. Inclusive of +// the enable bit, if present. +#define PIO_SM2_PINCTRL_SIDESET_COUNT_RESET 0x0 +#define PIO_SM2_PINCTRL_SIDESET_COUNT_BITS 0xe0000000 +#define PIO_SM2_PINCTRL_SIDESET_COUNT_MSB 31 +#define PIO_SM2_PINCTRL_SIDESET_COUNT_LSB 29 +#define PIO_SM2_PINCTRL_SIDESET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_SET_COUNT +// Description : The number of pins asserted by a SET. Max of 5 +#define PIO_SM2_PINCTRL_SET_COUNT_RESET 0x5 +#define PIO_SM2_PINCTRL_SET_COUNT_BITS 0x1c000000 +#define PIO_SM2_PINCTRL_SET_COUNT_MSB 28 +#define PIO_SM2_PINCTRL_SET_COUNT_LSB 26 +#define PIO_SM2_PINCTRL_SET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_OUT_COUNT +// Description : The number of pins asserted by an OUT. Value of 0 -> 32 pins +#define PIO_SM2_PINCTRL_OUT_COUNT_RESET 0x00 +#define PIO_SM2_PINCTRL_OUT_COUNT_BITS 0x03f00000 +#define PIO_SM2_PINCTRL_OUT_COUNT_MSB 25 +#define PIO_SM2_PINCTRL_OUT_COUNT_LSB 20 +#define PIO_SM2_PINCTRL_OUT_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_IN_BASE +// Description : The virtual pin corresponding to IN bit 0 +#define PIO_SM2_PINCTRL_IN_BASE_RESET 0x00 +#define PIO_SM2_PINCTRL_IN_BASE_BITS 0x000f8000 +#define PIO_SM2_PINCTRL_IN_BASE_MSB 19 +#define PIO_SM2_PINCTRL_IN_BASE_LSB 15 +#define PIO_SM2_PINCTRL_IN_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_SIDESET_BASE +// Description : The virtual pin corresponding to delay field bit 0 +#define PIO_SM2_PINCTRL_SIDESET_BASE_RESET 0x00 +#define PIO_SM2_PINCTRL_SIDESET_BASE_BITS 0x00007c00 +#define PIO_SM2_PINCTRL_SIDESET_BASE_MSB 14 +#define PIO_SM2_PINCTRL_SIDESET_BASE_LSB 10 +#define PIO_SM2_PINCTRL_SIDESET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_SET_BASE +// Description : The virtual pin corresponding to SET bit 0 +#define PIO_SM2_PINCTRL_SET_BASE_RESET 0x00 +#define PIO_SM2_PINCTRL_SET_BASE_BITS 0x000003e0 +#define PIO_SM2_PINCTRL_SET_BASE_MSB 9 +#define PIO_SM2_PINCTRL_SET_BASE_LSB 5 +#define PIO_SM2_PINCTRL_SET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM2_PINCTRL_OUT_BASE +// Description : The virtual pin corresponding to OUT bit 0 +#define PIO_SM2_PINCTRL_OUT_BASE_RESET 0x00 +#define PIO_SM2_PINCTRL_OUT_BASE_BITS 0x0000001f +#define PIO_SM2_PINCTRL_OUT_BASE_MSB 4 +#define PIO_SM2_PINCTRL_OUT_BASE_LSB 0 +#define PIO_SM2_PINCTRL_OUT_BASE_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM3_CLKDIV +// Description : Clock divider register for state machine 3 +// Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) +#define PIO_SM3_CLKDIV_OFFSET 0x00000110 +#define PIO_SM3_CLKDIV_BITS 0xffffff00 +#define PIO_SM3_CLKDIV_RESET 0x00010000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_CLKDIV_INT +// Description : Effective frequency is sysclk/int. +// Value of 0 is interpreted as max possible value +#define PIO_SM3_CLKDIV_INT_RESET 0x0001 +#define PIO_SM3_CLKDIV_INT_BITS 0xffff0000 +#define PIO_SM3_CLKDIV_INT_MSB 31 +#define PIO_SM3_CLKDIV_INT_LSB 16 +#define PIO_SM3_CLKDIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_CLKDIV_FRAC +// Description : Fractional part of clock divider +#define PIO_SM3_CLKDIV_FRAC_RESET 0x00 +#define PIO_SM3_CLKDIV_FRAC_BITS 0x0000ff00 +#define PIO_SM3_CLKDIV_FRAC_MSB 15 +#define PIO_SM3_CLKDIV_FRAC_LSB 8 +#define PIO_SM3_CLKDIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM3_EXECCTRL +// Description : Execution/behavioural settings for state machine 3 +#define PIO_SM3_EXECCTRL_OFFSET 0x00000114 +#define PIO_SM3_EXECCTRL_BITS 0xffffff9f +#define PIO_SM3_EXECCTRL_RESET 0x0001f000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_EXEC_STALLED +// Description : An instruction written to SMx_INSTR is stalled, and latched by +// the +// state machine. Will clear once the instruction completes. +#define PIO_SM3_EXECCTRL_EXEC_STALLED_RESET 0x0 +#define PIO_SM3_EXECCTRL_EXEC_STALLED_BITS 0x80000000 +#define PIO_SM3_EXECCTRL_EXEC_STALLED_MSB 31 +#define PIO_SM3_EXECCTRL_EXEC_STALLED_LSB 31 +#define PIO_SM3_EXECCTRL_EXEC_STALLED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_SIDE_EN +// Description : If 1, the delay MSB is used as side-set enable, rather than a +// side-set data bit. This allows instructions to perform side-set +// optionally, +// rather than on every instruction. +#define PIO_SM3_EXECCTRL_SIDE_EN_RESET 0x0 +#define PIO_SM3_EXECCTRL_SIDE_EN_BITS 0x40000000 +#define PIO_SM3_EXECCTRL_SIDE_EN_MSB 30 +#define PIO_SM3_EXECCTRL_SIDE_EN_LSB 30 +#define PIO_SM3_EXECCTRL_SIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_SIDE_PINDIR +// Description : Side-set data is asserted to pin OEs instead of pin values +#define PIO_SM3_EXECCTRL_SIDE_PINDIR_RESET 0x0 +#define PIO_SM3_EXECCTRL_SIDE_PINDIR_BITS 0x20000000 +#define PIO_SM3_EXECCTRL_SIDE_PINDIR_MSB 29 +#define PIO_SM3_EXECCTRL_SIDE_PINDIR_LSB 29 +#define PIO_SM3_EXECCTRL_SIDE_PINDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_JMP_PIN +// Description : The GPIO number to use as condition for JMP PIN. Unaffected by +// input mapping. +#define PIO_SM3_EXECCTRL_JMP_PIN_RESET 0x00 +#define PIO_SM3_EXECCTRL_JMP_PIN_BITS 0x1f000000 +#define PIO_SM3_EXECCTRL_JMP_PIN_MSB 28 +#define PIO_SM3_EXECCTRL_JMP_PIN_LSB 24 +#define PIO_SM3_EXECCTRL_JMP_PIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_OUT_EN_SEL +// Description : Which data bit to use for inline OUT enable +#define PIO_SM3_EXECCTRL_OUT_EN_SEL_RESET 0x00 +#define PIO_SM3_EXECCTRL_OUT_EN_SEL_BITS 0x00f80000 +#define PIO_SM3_EXECCTRL_OUT_EN_SEL_MSB 23 +#define PIO_SM3_EXECCTRL_OUT_EN_SEL_LSB 19 +#define PIO_SM3_EXECCTRL_OUT_EN_SEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_INLINE_OUT_EN +// Description : If 1, use a bit of OUT data as an auxiliary write enable +// When used in conjunction with OUT_STICKY, writes with an enable +// of 0 will +// deassert the latest pin write. This can create useful +// masking/override behaviour +// due to the priority ordering of state machine pin writes (SM0 < +// SM1 < ...) +#define PIO_SM3_EXECCTRL_INLINE_OUT_EN_RESET 0x0 +#define PIO_SM3_EXECCTRL_INLINE_OUT_EN_BITS 0x00040000 +#define PIO_SM3_EXECCTRL_INLINE_OUT_EN_MSB 18 +#define PIO_SM3_EXECCTRL_INLINE_OUT_EN_LSB 18 +#define PIO_SM3_EXECCTRL_INLINE_OUT_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_OUT_STICKY +// Description : Continuously assert the most recent OUT/SET to the pins +#define PIO_SM3_EXECCTRL_OUT_STICKY_RESET 0x0 +#define PIO_SM3_EXECCTRL_OUT_STICKY_BITS 0x00020000 +#define PIO_SM3_EXECCTRL_OUT_STICKY_MSB 17 +#define PIO_SM3_EXECCTRL_OUT_STICKY_LSB 17 +#define PIO_SM3_EXECCTRL_OUT_STICKY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_WRAP_TOP +// Description : After reaching this address, execution is wrapped to +// wrap_bottom. +// If the instruction is a jump, and the jump condition is true, +// the jump takes priority. +#define PIO_SM3_EXECCTRL_WRAP_TOP_RESET 0x1f +#define PIO_SM3_EXECCTRL_WRAP_TOP_BITS 0x0001f000 +#define PIO_SM3_EXECCTRL_WRAP_TOP_MSB 16 +#define PIO_SM3_EXECCTRL_WRAP_TOP_LSB 12 +#define PIO_SM3_EXECCTRL_WRAP_TOP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_WRAP_BOTTOM +// Description : After reaching wrap_top, execution is wrapped to this address. +#define PIO_SM3_EXECCTRL_WRAP_BOTTOM_RESET 0x00 +#define PIO_SM3_EXECCTRL_WRAP_BOTTOM_BITS 0x00000f80 +#define PIO_SM3_EXECCTRL_WRAP_BOTTOM_MSB 11 +#define PIO_SM3_EXECCTRL_WRAP_BOTTOM_LSB 7 +#define PIO_SM3_EXECCTRL_WRAP_BOTTOM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_STATUS_SEL +// Description : Comparison used for the MOV x, STATUS instruction. +// 0x0 -> All-ones if TX FIFO level < N, otherwise all-zeroes +// 0x1 -> All-ones if RX FIFO level < N, otherwise all-zeroes +#define PIO_SM3_EXECCTRL_STATUS_SEL_RESET 0x0 +#define PIO_SM3_EXECCTRL_STATUS_SEL_BITS 0x00000010 +#define PIO_SM3_EXECCTRL_STATUS_SEL_MSB 4 +#define PIO_SM3_EXECCTRL_STATUS_SEL_LSB 4 +#define PIO_SM3_EXECCTRL_STATUS_SEL_ACCESS "RW" +#define PIO_SM3_EXECCTRL_STATUS_SEL_VALUE_TXLEVEL 0x0 +#define PIO_SM3_EXECCTRL_STATUS_SEL_VALUE_RXLEVEL 0x1 +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_EXECCTRL_STATUS_N +// Description : Comparison level for the MOV x, STATUS instruction +#define PIO_SM3_EXECCTRL_STATUS_N_RESET 0x0 +#define PIO_SM3_EXECCTRL_STATUS_N_BITS 0x0000000f +#define PIO_SM3_EXECCTRL_STATUS_N_MSB 3 +#define PIO_SM3_EXECCTRL_STATUS_N_LSB 0 +#define PIO_SM3_EXECCTRL_STATUS_N_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM3_SHIFTCTRL +// Description : Control behaviour of the input/output shift registers for state +// machine 3 +#define PIO_SM3_SHIFTCTRL_OFFSET 0x00000118 +#define PIO_SM3_SHIFTCTRL_BITS 0xffff0000 +#define PIO_SM3_SHIFTCTRL_RESET 0x000c0000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_FJOIN_RX +// Description : When 1, RX FIFO steals the TX FIFO's storage, and becomes twice +// as deep. +// TX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM3_SHIFTCTRL_FJOIN_RX_RESET 0x0 +#define PIO_SM3_SHIFTCTRL_FJOIN_RX_BITS 0x80000000 +#define PIO_SM3_SHIFTCTRL_FJOIN_RX_MSB 31 +#define PIO_SM3_SHIFTCTRL_FJOIN_RX_LSB 31 +#define PIO_SM3_SHIFTCTRL_FJOIN_RX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_FJOIN_TX +// Description : When 1, TX FIFO steals the RX FIFO's storage, and becomes twice +// as deep. +// RX FIFO is disabled as a result (always reads as both full and +// empty). +// FIFOs are flushed when this bit is changed. +#define PIO_SM3_SHIFTCTRL_FJOIN_TX_RESET 0x0 +#define PIO_SM3_SHIFTCTRL_FJOIN_TX_BITS 0x40000000 +#define PIO_SM3_SHIFTCTRL_FJOIN_TX_MSB 30 +#define PIO_SM3_SHIFTCTRL_FJOIN_TX_LSB 30 +#define PIO_SM3_SHIFTCTRL_FJOIN_TX_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_PULL_THRESH +// Description : Number of bits shifted out of TXSR before autopull or +// conditional pull. +// Write 0 for value of 32. +#define PIO_SM3_SHIFTCTRL_PULL_THRESH_RESET 0x00 +#define PIO_SM3_SHIFTCTRL_PULL_THRESH_BITS 0x3e000000 +#define PIO_SM3_SHIFTCTRL_PULL_THRESH_MSB 29 +#define PIO_SM3_SHIFTCTRL_PULL_THRESH_LSB 25 +#define PIO_SM3_SHIFTCTRL_PULL_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_PUSH_THRESH +// Description : Number of bits shifted into RXSR before autopush or conditional +// push. +// Write 0 for value of 32. +#define PIO_SM3_SHIFTCTRL_PUSH_THRESH_RESET 0x00 +#define PIO_SM3_SHIFTCTRL_PUSH_THRESH_BITS 0x01f00000 +#define PIO_SM3_SHIFTCTRL_PUSH_THRESH_MSB 24 +#define PIO_SM3_SHIFTCTRL_PUSH_THRESH_LSB 20 +#define PIO_SM3_SHIFTCTRL_PUSH_THRESH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_OUT_SHIFTDIR +// Description : 1 = shift out of output shift register to right. 0 = to left. +#define PIO_SM3_SHIFTCTRL_OUT_SHIFTDIR_RESET 0x1 +#define PIO_SM3_SHIFTCTRL_OUT_SHIFTDIR_BITS 0x00080000 +#define PIO_SM3_SHIFTCTRL_OUT_SHIFTDIR_MSB 19 +#define PIO_SM3_SHIFTCTRL_OUT_SHIFTDIR_LSB 19 +#define PIO_SM3_SHIFTCTRL_OUT_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_IN_SHIFTDIR +// Description : 1 = shift input shift register to right (data enters from +// left). 0 = to left. +#define PIO_SM3_SHIFTCTRL_IN_SHIFTDIR_RESET 0x1 +#define PIO_SM3_SHIFTCTRL_IN_SHIFTDIR_BITS 0x00040000 +#define PIO_SM3_SHIFTCTRL_IN_SHIFTDIR_MSB 18 +#define PIO_SM3_SHIFTCTRL_IN_SHIFTDIR_LSB 18 +#define PIO_SM3_SHIFTCTRL_IN_SHIFTDIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_AUTOPULL +// Description : Pull automatically when the output shift register is emptied +#define PIO_SM3_SHIFTCTRL_AUTOPULL_RESET 0x0 +#define PIO_SM3_SHIFTCTRL_AUTOPULL_BITS 0x00020000 +#define PIO_SM3_SHIFTCTRL_AUTOPULL_MSB 17 +#define PIO_SM3_SHIFTCTRL_AUTOPULL_LSB 17 +#define PIO_SM3_SHIFTCTRL_AUTOPULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_SHIFTCTRL_AUTOPUSH +// Description : Push automatically when the input shift register is filled +#define PIO_SM3_SHIFTCTRL_AUTOPUSH_RESET 0x0 +#define PIO_SM3_SHIFTCTRL_AUTOPUSH_BITS 0x00010000 +#define PIO_SM3_SHIFTCTRL_AUTOPUSH_MSB 16 +#define PIO_SM3_SHIFTCTRL_AUTOPUSH_LSB 16 +#define PIO_SM3_SHIFTCTRL_AUTOPUSH_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM3_ADDR +// Description : Current instruction address of state machine 3 +#define PIO_SM3_ADDR_OFFSET 0x0000011c +#define PIO_SM3_ADDR_BITS 0x0000001f +#define PIO_SM3_ADDR_RESET 0x00000000 +#define PIO_SM3_ADDR_MSB 4 +#define PIO_SM3_ADDR_LSB 0 +#define PIO_SM3_ADDR_ACCESS "RO" +// ============================================================================= +// Register : PIO_SM3_INSTR +// Description : Instruction currently being executed by state machine 3 +// Write to execute an instruction immediately (including jumps) +// and then resume execution. +#define PIO_SM3_INSTR_OFFSET 0x00000120 +#define PIO_SM3_INSTR_BITS 0x0000ffff +#define PIO_SM3_INSTR_RESET "-" +#define PIO_SM3_INSTR_MSB 15 +#define PIO_SM3_INSTR_LSB 0 +#define PIO_SM3_INSTR_ACCESS "RW" +// ============================================================================= +// Register : PIO_SM3_PINCTRL +// Description : State machine pin control +#define PIO_SM3_PINCTRL_OFFSET 0x00000124 +#define PIO_SM3_PINCTRL_BITS 0xffffffff +#define PIO_SM3_PINCTRL_RESET 0x14000000 +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_SIDESET_COUNT +// Description : The number of delay bits co-opted for side-set. Inclusive of +// the enable bit, if present. +#define PIO_SM3_PINCTRL_SIDESET_COUNT_RESET 0x0 +#define PIO_SM3_PINCTRL_SIDESET_COUNT_BITS 0xe0000000 +#define PIO_SM3_PINCTRL_SIDESET_COUNT_MSB 31 +#define PIO_SM3_PINCTRL_SIDESET_COUNT_LSB 29 +#define PIO_SM3_PINCTRL_SIDESET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_SET_COUNT +// Description : The number of pins asserted by a SET. Max of 5 +#define PIO_SM3_PINCTRL_SET_COUNT_RESET 0x5 +#define PIO_SM3_PINCTRL_SET_COUNT_BITS 0x1c000000 +#define PIO_SM3_PINCTRL_SET_COUNT_MSB 28 +#define PIO_SM3_PINCTRL_SET_COUNT_LSB 26 +#define PIO_SM3_PINCTRL_SET_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_OUT_COUNT +// Description : The number of pins asserted by an OUT. Value of 0 -> 32 pins +#define PIO_SM3_PINCTRL_OUT_COUNT_RESET 0x00 +#define PIO_SM3_PINCTRL_OUT_COUNT_BITS 0x03f00000 +#define PIO_SM3_PINCTRL_OUT_COUNT_MSB 25 +#define PIO_SM3_PINCTRL_OUT_COUNT_LSB 20 +#define PIO_SM3_PINCTRL_OUT_COUNT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_IN_BASE +// Description : The virtual pin corresponding to IN bit 0 +#define PIO_SM3_PINCTRL_IN_BASE_RESET 0x00 +#define PIO_SM3_PINCTRL_IN_BASE_BITS 0x000f8000 +#define PIO_SM3_PINCTRL_IN_BASE_MSB 19 +#define PIO_SM3_PINCTRL_IN_BASE_LSB 15 +#define PIO_SM3_PINCTRL_IN_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_SIDESET_BASE +// Description : The virtual pin corresponding to delay field bit 0 +#define PIO_SM3_PINCTRL_SIDESET_BASE_RESET 0x00 +#define PIO_SM3_PINCTRL_SIDESET_BASE_BITS 0x00007c00 +#define PIO_SM3_PINCTRL_SIDESET_BASE_MSB 14 +#define PIO_SM3_PINCTRL_SIDESET_BASE_LSB 10 +#define PIO_SM3_PINCTRL_SIDESET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_SET_BASE +// Description : The virtual pin corresponding to SET bit 0 +#define PIO_SM3_PINCTRL_SET_BASE_RESET 0x00 +#define PIO_SM3_PINCTRL_SET_BASE_BITS 0x000003e0 +#define PIO_SM3_PINCTRL_SET_BASE_MSB 9 +#define PIO_SM3_PINCTRL_SET_BASE_LSB 5 +#define PIO_SM3_PINCTRL_SET_BASE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_SM3_PINCTRL_OUT_BASE +// Description : The virtual pin corresponding to OUT bit 0 +#define PIO_SM3_PINCTRL_OUT_BASE_RESET 0x00 +#define PIO_SM3_PINCTRL_OUT_BASE_BITS 0x0000001f +#define PIO_SM3_PINCTRL_OUT_BASE_MSB 4 +#define PIO_SM3_PINCTRL_OUT_BASE_LSB 0 +#define PIO_SM3_PINCTRL_OUT_BASE_ACCESS "RW" +// ============================================================================= +// Register : PIO_INTR +// Description : Raw Interrupts +#define PIO_INTR_OFFSET 0x00000128 +#define PIO_INTR_BITS 0x00000fff +#define PIO_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM3 +// Description : None +#define PIO_INTR_SM3_RESET 0x0 +#define PIO_INTR_SM3_BITS 0x00000800 +#define PIO_INTR_SM3_MSB 11 +#define PIO_INTR_SM3_LSB 11 +#define PIO_INTR_SM3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM2 +// Description : None +#define PIO_INTR_SM2_RESET 0x0 +#define PIO_INTR_SM2_BITS 0x00000400 +#define PIO_INTR_SM2_MSB 10 +#define PIO_INTR_SM2_LSB 10 +#define PIO_INTR_SM2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM1 +// Description : None +#define PIO_INTR_SM1_RESET 0x0 +#define PIO_INTR_SM1_BITS 0x00000200 +#define PIO_INTR_SM1_MSB 9 +#define PIO_INTR_SM1_LSB 9 +#define PIO_INTR_SM1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM0 +// Description : None +#define PIO_INTR_SM0_RESET 0x0 +#define PIO_INTR_SM0_BITS 0x00000100 +#define PIO_INTR_SM0_MSB 8 +#define PIO_INTR_SM0_LSB 8 +#define PIO_INTR_SM0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM3_TXNFULL +// Description : None +#define PIO_INTR_SM3_TXNFULL_RESET 0x0 +#define PIO_INTR_SM3_TXNFULL_BITS 0x00000080 +#define PIO_INTR_SM3_TXNFULL_MSB 7 +#define PIO_INTR_SM3_TXNFULL_LSB 7 +#define PIO_INTR_SM3_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM2_TXNFULL +// Description : None +#define PIO_INTR_SM2_TXNFULL_RESET 0x0 +#define PIO_INTR_SM2_TXNFULL_BITS 0x00000040 +#define PIO_INTR_SM2_TXNFULL_MSB 6 +#define PIO_INTR_SM2_TXNFULL_LSB 6 +#define PIO_INTR_SM2_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM1_TXNFULL +// Description : None +#define PIO_INTR_SM1_TXNFULL_RESET 0x0 +#define PIO_INTR_SM1_TXNFULL_BITS 0x00000020 +#define PIO_INTR_SM1_TXNFULL_MSB 5 +#define PIO_INTR_SM1_TXNFULL_LSB 5 +#define PIO_INTR_SM1_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM0_TXNFULL +// Description : None +#define PIO_INTR_SM0_TXNFULL_RESET 0x0 +#define PIO_INTR_SM0_TXNFULL_BITS 0x00000010 +#define PIO_INTR_SM0_TXNFULL_MSB 4 +#define PIO_INTR_SM0_TXNFULL_LSB 4 +#define PIO_INTR_SM0_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM3_RXNEMPTY +// Description : None +#define PIO_INTR_SM3_RXNEMPTY_RESET 0x0 +#define PIO_INTR_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_INTR_SM3_RXNEMPTY_MSB 3 +#define PIO_INTR_SM3_RXNEMPTY_LSB 3 +#define PIO_INTR_SM3_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM2_RXNEMPTY +// Description : None +#define PIO_INTR_SM2_RXNEMPTY_RESET 0x0 +#define PIO_INTR_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_INTR_SM2_RXNEMPTY_MSB 2 +#define PIO_INTR_SM2_RXNEMPTY_LSB 2 +#define PIO_INTR_SM2_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM1_RXNEMPTY +// Description : None +#define PIO_INTR_SM1_RXNEMPTY_RESET 0x0 +#define PIO_INTR_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_INTR_SM1_RXNEMPTY_MSB 1 +#define PIO_INTR_SM1_RXNEMPTY_LSB 1 +#define PIO_INTR_SM1_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_INTR_SM0_RXNEMPTY +// Description : None +#define PIO_INTR_SM0_RXNEMPTY_RESET 0x0 +#define PIO_INTR_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_INTR_SM0_RXNEMPTY_MSB 0 +#define PIO_INTR_SM0_RXNEMPTY_LSB 0 +#define PIO_INTR_SM0_RXNEMPTY_ACCESS "RO" +// ============================================================================= +// Register : PIO_IRQ0_INTE +// Description : Interrupt Enable for irq0 +#define PIO_IRQ0_INTE_OFFSET 0x0000012c +#define PIO_IRQ0_INTE_BITS 0x00000fff +#define PIO_IRQ0_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM3 +// Description : None +#define PIO_IRQ0_INTE_SM3_RESET 0x0 +#define PIO_IRQ0_INTE_SM3_BITS 0x00000800 +#define PIO_IRQ0_INTE_SM3_MSB 11 +#define PIO_IRQ0_INTE_SM3_LSB 11 +#define PIO_IRQ0_INTE_SM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM2 +// Description : None +#define PIO_IRQ0_INTE_SM2_RESET 0x0 +#define PIO_IRQ0_INTE_SM2_BITS 0x00000400 +#define PIO_IRQ0_INTE_SM2_MSB 10 +#define PIO_IRQ0_INTE_SM2_LSB 10 +#define PIO_IRQ0_INTE_SM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM1 +// Description : None +#define PIO_IRQ0_INTE_SM1_RESET 0x0 +#define PIO_IRQ0_INTE_SM1_BITS 0x00000200 +#define PIO_IRQ0_INTE_SM1_MSB 9 +#define PIO_IRQ0_INTE_SM1_LSB 9 +#define PIO_IRQ0_INTE_SM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM0 +// Description : None +#define PIO_IRQ0_INTE_SM0_RESET 0x0 +#define PIO_IRQ0_INTE_SM0_BITS 0x00000100 +#define PIO_IRQ0_INTE_SM0_MSB 8 +#define PIO_IRQ0_INTE_SM0_LSB 8 +#define PIO_IRQ0_INTE_SM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM3_TXNFULL +// Description : None +#define PIO_IRQ0_INTE_SM3_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTE_SM3_TXNFULL_BITS 0x00000080 +#define PIO_IRQ0_INTE_SM3_TXNFULL_MSB 7 +#define PIO_IRQ0_INTE_SM3_TXNFULL_LSB 7 +#define PIO_IRQ0_INTE_SM3_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM2_TXNFULL +// Description : None +#define PIO_IRQ0_INTE_SM2_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTE_SM2_TXNFULL_BITS 0x00000040 +#define PIO_IRQ0_INTE_SM2_TXNFULL_MSB 6 +#define PIO_IRQ0_INTE_SM2_TXNFULL_LSB 6 +#define PIO_IRQ0_INTE_SM2_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM1_TXNFULL +// Description : None +#define PIO_IRQ0_INTE_SM1_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTE_SM1_TXNFULL_BITS 0x00000020 +#define PIO_IRQ0_INTE_SM1_TXNFULL_MSB 5 +#define PIO_IRQ0_INTE_SM1_TXNFULL_LSB 5 +#define PIO_IRQ0_INTE_SM1_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM0_TXNFULL +// Description : None +#define PIO_IRQ0_INTE_SM0_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTE_SM0_TXNFULL_BITS 0x00000010 +#define PIO_IRQ0_INTE_SM0_TXNFULL_MSB 4 +#define PIO_IRQ0_INTE_SM0_TXNFULL_LSB 4 +#define PIO_IRQ0_INTE_SM0_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM3_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTE_SM3_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTE_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_IRQ0_INTE_SM3_RXNEMPTY_MSB 3 +#define PIO_IRQ0_INTE_SM3_RXNEMPTY_LSB 3 +#define PIO_IRQ0_INTE_SM3_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM2_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTE_SM2_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTE_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_IRQ0_INTE_SM2_RXNEMPTY_MSB 2 +#define PIO_IRQ0_INTE_SM2_RXNEMPTY_LSB 2 +#define PIO_IRQ0_INTE_SM2_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM1_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTE_SM1_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTE_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_IRQ0_INTE_SM1_RXNEMPTY_MSB 1 +#define PIO_IRQ0_INTE_SM1_RXNEMPTY_LSB 1 +#define PIO_IRQ0_INTE_SM1_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTE_SM0_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTE_SM0_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTE_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_IRQ0_INTE_SM0_RXNEMPTY_MSB 0 +#define PIO_IRQ0_INTE_SM0_RXNEMPTY_LSB 0 +#define PIO_IRQ0_INTE_SM0_RXNEMPTY_ACCESS "RW" +// ============================================================================= +// Register : PIO_IRQ0_INTF +// Description : Interrupt Force for irq0 +#define PIO_IRQ0_INTF_OFFSET 0x00000130 +#define PIO_IRQ0_INTF_BITS 0x00000fff +#define PIO_IRQ0_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM3 +// Description : None +#define PIO_IRQ0_INTF_SM3_RESET 0x0 +#define PIO_IRQ0_INTF_SM3_BITS 0x00000800 +#define PIO_IRQ0_INTF_SM3_MSB 11 +#define PIO_IRQ0_INTF_SM3_LSB 11 +#define PIO_IRQ0_INTF_SM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM2 +// Description : None +#define PIO_IRQ0_INTF_SM2_RESET 0x0 +#define PIO_IRQ0_INTF_SM2_BITS 0x00000400 +#define PIO_IRQ0_INTF_SM2_MSB 10 +#define PIO_IRQ0_INTF_SM2_LSB 10 +#define PIO_IRQ0_INTF_SM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM1 +// Description : None +#define PIO_IRQ0_INTF_SM1_RESET 0x0 +#define PIO_IRQ0_INTF_SM1_BITS 0x00000200 +#define PIO_IRQ0_INTF_SM1_MSB 9 +#define PIO_IRQ0_INTF_SM1_LSB 9 +#define PIO_IRQ0_INTF_SM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM0 +// Description : None +#define PIO_IRQ0_INTF_SM0_RESET 0x0 +#define PIO_IRQ0_INTF_SM0_BITS 0x00000100 +#define PIO_IRQ0_INTF_SM0_MSB 8 +#define PIO_IRQ0_INTF_SM0_LSB 8 +#define PIO_IRQ0_INTF_SM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM3_TXNFULL +// Description : None +#define PIO_IRQ0_INTF_SM3_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTF_SM3_TXNFULL_BITS 0x00000080 +#define PIO_IRQ0_INTF_SM3_TXNFULL_MSB 7 +#define PIO_IRQ0_INTF_SM3_TXNFULL_LSB 7 +#define PIO_IRQ0_INTF_SM3_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM2_TXNFULL +// Description : None +#define PIO_IRQ0_INTF_SM2_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTF_SM2_TXNFULL_BITS 0x00000040 +#define PIO_IRQ0_INTF_SM2_TXNFULL_MSB 6 +#define PIO_IRQ0_INTF_SM2_TXNFULL_LSB 6 +#define PIO_IRQ0_INTF_SM2_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM1_TXNFULL +// Description : None +#define PIO_IRQ0_INTF_SM1_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTF_SM1_TXNFULL_BITS 0x00000020 +#define PIO_IRQ0_INTF_SM1_TXNFULL_MSB 5 +#define PIO_IRQ0_INTF_SM1_TXNFULL_LSB 5 +#define PIO_IRQ0_INTF_SM1_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM0_TXNFULL +// Description : None +#define PIO_IRQ0_INTF_SM0_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTF_SM0_TXNFULL_BITS 0x00000010 +#define PIO_IRQ0_INTF_SM0_TXNFULL_MSB 4 +#define PIO_IRQ0_INTF_SM0_TXNFULL_LSB 4 +#define PIO_IRQ0_INTF_SM0_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM3_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTF_SM3_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTF_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_IRQ0_INTF_SM3_RXNEMPTY_MSB 3 +#define PIO_IRQ0_INTF_SM3_RXNEMPTY_LSB 3 +#define PIO_IRQ0_INTF_SM3_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM2_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTF_SM2_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTF_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_IRQ0_INTF_SM2_RXNEMPTY_MSB 2 +#define PIO_IRQ0_INTF_SM2_RXNEMPTY_LSB 2 +#define PIO_IRQ0_INTF_SM2_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM1_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTF_SM1_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTF_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_IRQ0_INTF_SM1_RXNEMPTY_MSB 1 +#define PIO_IRQ0_INTF_SM1_RXNEMPTY_LSB 1 +#define PIO_IRQ0_INTF_SM1_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTF_SM0_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTF_SM0_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTF_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_IRQ0_INTF_SM0_RXNEMPTY_MSB 0 +#define PIO_IRQ0_INTF_SM0_RXNEMPTY_LSB 0 +#define PIO_IRQ0_INTF_SM0_RXNEMPTY_ACCESS "RW" +// ============================================================================= +// Register : PIO_IRQ0_INTS +// Description : Interrupt status after masking & forcing for irq0 +#define PIO_IRQ0_INTS_OFFSET 0x00000134 +#define PIO_IRQ0_INTS_BITS 0x00000fff +#define PIO_IRQ0_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM3 +// Description : None +#define PIO_IRQ0_INTS_SM3_RESET 0x0 +#define PIO_IRQ0_INTS_SM3_BITS 0x00000800 +#define PIO_IRQ0_INTS_SM3_MSB 11 +#define PIO_IRQ0_INTS_SM3_LSB 11 +#define PIO_IRQ0_INTS_SM3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM2 +// Description : None +#define PIO_IRQ0_INTS_SM2_RESET 0x0 +#define PIO_IRQ0_INTS_SM2_BITS 0x00000400 +#define PIO_IRQ0_INTS_SM2_MSB 10 +#define PIO_IRQ0_INTS_SM2_LSB 10 +#define PIO_IRQ0_INTS_SM2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM1 +// Description : None +#define PIO_IRQ0_INTS_SM1_RESET 0x0 +#define PIO_IRQ0_INTS_SM1_BITS 0x00000200 +#define PIO_IRQ0_INTS_SM1_MSB 9 +#define PIO_IRQ0_INTS_SM1_LSB 9 +#define PIO_IRQ0_INTS_SM1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM0 +// Description : None +#define PIO_IRQ0_INTS_SM0_RESET 0x0 +#define PIO_IRQ0_INTS_SM0_BITS 0x00000100 +#define PIO_IRQ0_INTS_SM0_MSB 8 +#define PIO_IRQ0_INTS_SM0_LSB 8 +#define PIO_IRQ0_INTS_SM0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM3_TXNFULL +// Description : None +#define PIO_IRQ0_INTS_SM3_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTS_SM3_TXNFULL_BITS 0x00000080 +#define PIO_IRQ0_INTS_SM3_TXNFULL_MSB 7 +#define PIO_IRQ0_INTS_SM3_TXNFULL_LSB 7 +#define PIO_IRQ0_INTS_SM3_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM2_TXNFULL +// Description : None +#define PIO_IRQ0_INTS_SM2_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTS_SM2_TXNFULL_BITS 0x00000040 +#define PIO_IRQ0_INTS_SM2_TXNFULL_MSB 6 +#define PIO_IRQ0_INTS_SM2_TXNFULL_LSB 6 +#define PIO_IRQ0_INTS_SM2_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM1_TXNFULL +// Description : None +#define PIO_IRQ0_INTS_SM1_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTS_SM1_TXNFULL_BITS 0x00000020 +#define PIO_IRQ0_INTS_SM1_TXNFULL_MSB 5 +#define PIO_IRQ0_INTS_SM1_TXNFULL_LSB 5 +#define PIO_IRQ0_INTS_SM1_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM0_TXNFULL +// Description : None +#define PIO_IRQ0_INTS_SM0_TXNFULL_RESET 0x0 +#define PIO_IRQ0_INTS_SM0_TXNFULL_BITS 0x00000010 +#define PIO_IRQ0_INTS_SM0_TXNFULL_MSB 4 +#define PIO_IRQ0_INTS_SM0_TXNFULL_LSB 4 +#define PIO_IRQ0_INTS_SM0_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM3_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTS_SM3_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTS_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_IRQ0_INTS_SM3_RXNEMPTY_MSB 3 +#define PIO_IRQ0_INTS_SM3_RXNEMPTY_LSB 3 +#define PIO_IRQ0_INTS_SM3_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM2_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTS_SM2_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTS_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_IRQ0_INTS_SM2_RXNEMPTY_MSB 2 +#define PIO_IRQ0_INTS_SM2_RXNEMPTY_LSB 2 +#define PIO_IRQ0_INTS_SM2_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM1_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTS_SM1_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTS_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_IRQ0_INTS_SM1_RXNEMPTY_MSB 1 +#define PIO_IRQ0_INTS_SM1_RXNEMPTY_LSB 1 +#define PIO_IRQ0_INTS_SM1_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ0_INTS_SM0_RXNEMPTY +// Description : None +#define PIO_IRQ0_INTS_SM0_RXNEMPTY_RESET 0x0 +#define PIO_IRQ0_INTS_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_IRQ0_INTS_SM0_RXNEMPTY_MSB 0 +#define PIO_IRQ0_INTS_SM0_RXNEMPTY_LSB 0 +#define PIO_IRQ0_INTS_SM0_RXNEMPTY_ACCESS "RO" +// ============================================================================= +// Register : PIO_IRQ1_INTE +// Description : Interrupt Enable for irq1 +#define PIO_IRQ1_INTE_OFFSET 0x00000138 +#define PIO_IRQ1_INTE_BITS 0x00000fff +#define PIO_IRQ1_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM3 +// Description : None +#define PIO_IRQ1_INTE_SM3_RESET 0x0 +#define PIO_IRQ1_INTE_SM3_BITS 0x00000800 +#define PIO_IRQ1_INTE_SM3_MSB 11 +#define PIO_IRQ1_INTE_SM3_LSB 11 +#define PIO_IRQ1_INTE_SM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM2 +// Description : None +#define PIO_IRQ1_INTE_SM2_RESET 0x0 +#define PIO_IRQ1_INTE_SM2_BITS 0x00000400 +#define PIO_IRQ1_INTE_SM2_MSB 10 +#define PIO_IRQ1_INTE_SM2_LSB 10 +#define PIO_IRQ1_INTE_SM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM1 +// Description : None +#define PIO_IRQ1_INTE_SM1_RESET 0x0 +#define PIO_IRQ1_INTE_SM1_BITS 0x00000200 +#define PIO_IRQ1_INTE_SM1_MSB 9 +#define PIO_IRQ1_INTE_SM1_LSB 9 +#define PIO_IRQ1_INTE_SM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM0 +// Description : None +#define PIO_IRQ1_INTE_SM0_RESET 0x0 +#define PIO_IRQ1_INTE_SM0_BITS 0x00000100 +#define PIO_IRQ1_INTE_SM0_MSB 8 +#define PIO_IRQ1_INTE_SM0_LSB 8 +#define PIO_IRQ1_INTE_SM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM3_TXNFULL +// Description : None +#define PIO_IRQ1_INTE_SM3_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTE_SM3_TXNFULL_BITS 0x00000080 +#define PIO_IRQ1_INTE_SM3_TXNFULL_MSB 7 +#define PIO_IRQ1_INTE_SM3_TXNFULL_LSB 7 +#define PIO_IRQ1_INTE_SM3_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM2_TXNFULL +// Description : None +#define PIO_IRQ1_INTE_SM2_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTE_SM2_TXNFULL_BITS 0x00000040 +#define PIO_IRQ1_INTE_SM2_TXNFULL_MSB 6 +#define PIO_IRQ1_INTE_SM2_TXNFULL_LSB 6 +#define PIO_IRQ1_INTE_SM2_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM1_TXNFULL +// Description : None +#define PIO_IRQ1_INTE_SM1_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTE_SM1_TXNFULL_BITS 0x00000020 +#define PIO_IRQ1_INTE_SM1_TXNFULL_MSB 5 +#define PIO_IRQ1_INTE_SM1_TXNFULL_LSB 5 +#define PIO_IRQ1_INTE_SM1_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM0_TXNFULL +// Description : None +#define PIO_IRQ1_INTE_SM0_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTE_SM0_TXNFULL_BITS 0x00000010 +#define PIO_IRQ1_INTE_SM0_TXNFULL_MSB 4 +#define PIO_IRQ1_INTE_SM0_TXNFULL_LSB 4 +#define PIO_IRQ1_INTE_SM0_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM3_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTE_SM3_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTE_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_IRQ1_INTE_SM3_RXNEMPTY_MSB 3 +#define PIO_IRQ1_INTE_SM3_RXNEMPTY_LSB 3 +#define PIO_IRQ1_INTE_SM3_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM2_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTE_SM2_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTE_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_IRQ1_INTE_SM2_RXNEMPTY_MSB 2 +#define PIO_IRQ1_INTE_SM2_RXNEMPTY_LSB 2 +#define PIO_IRQ1_INTE_SM2_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM1_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTE_SM1_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTE_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_IRQ1_INTE_SM1_RXNEMPTY_MSB 1 +#define PIO_IRQ1_INTE_SM1_RXNEMPTY_LSB 1 +#define PIO_IRQ1_INTE_SM1_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTE_SM0_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTE_SM0_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTE_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_IRQ1_INTE_SM0_RXNEMPTY_MSB 0 +#define PIO_IRQ1_INTE_SM0_RXNEMPTY_LSB 0 +#define PIO_IRQ1_INTE_SM0_RXNEMPTY_ACCESS "RW" +// ============================================================================= +// Register : PIO_IRQ1_INTF +// Description : Interrupt Force for irq1 +#define PIO_IRQ1_INTF_OFFSET 0x0000013c +#define PIO_IRQ1_INTF_BITS 0x00000fff +#define PIO_IRQ1_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM3 +// Description : None +#define PIO_IRQ1_INTF_SM3_RESET 0x0 +#define PIO_IRQ1_INTF_SM3_BITS 0x00000800 +#define PIO_IRQ1_INTF_SM3_MSB 11 +#define PIO_IRQ1_INTF_SM3_LSB 11 +#define PIO_IRQ1_INTF_SM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM2 +// Description : None +#define PIO_IRQ1_INTF_SM2_RESET 0x0 +#define PIO_IRQ1_INTF_SM2_BITS 0x00000400 +#define PIO_IRQ1_INTF_SM2_MSB 10 +#define PIO_IRQ1_INTF_SM2_LSB 10 +#define PIO_IRQ1_INTF_SM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM1 +// Description : None +#define PIO_IRQ1_INTF_SM1_RESET 0x0 +#define PIO_IRQ1_INTF_SM1_BITS 0x00000200 +#define PIO_IRQ1_INTF_SM1_MSB 9 +#define PIO_IRQ1_INTF_SM1_LSB 9 +#define PIO_IRQ1_INTF_SM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM0 +// Description : None +#define PIO_IRQ1_INTF_SM0_RESET 0x0 +#define PIO_IRQ1_INTF_SM0_BITS 0x00000100 +#define PIO_IRQ1_INTF_SM0_MSB 8 +#define PIO_IRQ1_INTF_SM0_LSB 8 +#define PIO_IRQ1_INTF_SM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM3_TXNFULL +// Description : None +#define PIO_IRQ1_INTF_SM3_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTF_SM3_TXNFULL_BITS 0x00000080 +#define PIO_IRQ1_INTF_SM3_TXNFULL_MSB 7 +#define PIO_IRQ1_INTF_SM3_TXNFULL_LSB 7 +#define PIO_IRQ1_INTF_SM3_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM2_TXNFULL +// Description : None +#define PIO_IRQ1_INTF_SM2_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTF_SM2_TXNFULL_BITS 0x00000040 +#define PIO_IRQ1_INTF_SM2_TXNFULL_MSB 6 +#define PIO_IRQ1_INTF_SM2_TXNFULL_LSB 6 +#define PIO_IRQ1_INTF_SM2_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM1_TXNFULL +// Description : None +#define PIO_IRQ1_INTF_SM1_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTF_SM1_TXNFULL_BITS 0x00000020 +#define PIO_IRQ1_INTF_SM1_TXNFULL_MSB 5 +#define PIO_IRQ1_INTF_SM1_TXNFULL_LSB 5 +#define PIO_IRQ1_INTF_SM1_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM0_TXNFULL +// Description : None +#define PIO_IRQ1_INTF_SM0_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTF_SM0_TXNFULL_BITS 0x00000010 +#define PIO_IRQ1_INTF_SM0_TXNFULL_MSB 4 +#define PIO_IRQ1_INTF_SM0_TXNFULL_LSB 4 +#define PIO_IRQ1_INTF_SM0_TXNFULL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM3_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTF_SM3_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTF_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_IRQ1_INTF_SM3_RXNEMPTY_MSB 3 +#define PIO_IRQ1_INTF_SM3_RXNEMPTY_LSB 3 +#define PIO_IRQ1_INTF_SM3_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM2_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTF_SM2_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTF_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_IRQ1_INTF_SM2_RXNEMPTY_MSB 2 +#define PIO_IRQ1_INTF_SM2_RXNEMPTY_LSB 2 +#define PIO_IRQ1_INTF_SM2_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM1_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTF_SM1_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTF_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_IRQ1_INTF_SM1_RXNEMPTY_MSB 1 +#define PIO_IRQ1_INTF_SM1_RXNEMPTY_LSB 1 +#define PIO_IRQ1_INTF_SM1_RXNEMPTY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTF_SM0_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTF_SM0_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTF_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_IRQ1_INTF_SM0_RXNEMPTY_MSB 0 +#define PIO_IRQ1_INTF_SM0_RXNEMPTY_LSB 0 +#define PIO_IRQ1_INTF_SM0_RXNEMPTY_ACCESS "RW" +// ============================================================================= +// Register : PIO_IRQ1_INTS +// Description : Interrupt status after masking & forcing for irq1 +#define PIO_IRQ1_INTS_OFFSET 0x00000140 +#define PIO_IRQ1_INTS_BITS 0x00000fff +#define PIO_IRQ1_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM3 +// Description : None +#define PIO_IRQ1_INTS_SM3_RESET 0x0 +#define PIO_IRQ1_INTS_SM3_BITS 0x00000800 +#define PIO_IRQ1_INTS_SM3_MSB 11 +#define PIO_IRQ1_INTS_SM3_LSB 11 +#define PIO_IRQ1_INTS_SM3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM2 +// Description : None +#define PIO_IRQ1_INTS_SM2_RESET 0x0 +#define PIO_IRQ1_INTS_SM2_BITS 0x00000400 +#define PIO_IRQ1_INTS_SM2_MSB 10 +#define PIO_IRQ1_INTS_SM2_LSB 10 +#define PIO_IRQ1_INTS_SM2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM1 +// Description : None +#define PIO_IRQ1_INTS_SM1_RESET 0x0 +#define PIO_IRQ1_INTS_SM1_BITS 0x00000200 +#define PIO_IRQ1_INTS_SM1_MSB 9 +#define PIO_IRQ1_INTS_SM1_LSB 9 +#define PIO_IRQ1_INTS_SM1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM0 +// Description : None +#define PIO_IRQ1_INTS_SM0_RESET 0x0 +#define PIO_IRQ1_INTS_SM0_BITS 0x00000100 +#define PIO_IRQ1_INTS_SM0_MSB 8 +#define PIO_IRQ1_INTS_SM0_LSB 8 +#define PIO_IRQ1_INTS_SM0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM3_TXNFULL +// Description : None +#define PIO_IRQ1_INTS_SM3_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTS_SM3_TXNFULL_BITS 0x00000080 +#define PIO_IRQ1_INTS_SM3_TXNFULL_MSB 7 +#define PIO_IRQ1_INTS_SM3_TXNFULL_LSB 7 +#define PIO_IRQ1_INTS_SM3_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM2_TXNFULL +// Description : None +#define PIO_IRQ1_INTS_SM2_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTS_SM2_TXNFULL_BITS 0x00000040 +#define PIO_IRQ1_INTS_SM2_TXNFULL_MSB 6 +#define PIO_IRQ1_INTS_SM2_TXNFULL_LSB 6 +#define PIO_IRQ1_INTS_SM2_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM1_TXNFULL +// Description : None +#define PIO_IRQ1_INTS_SM1_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTS_SM1_TXNFULL_BITS 0x00000020 +#define PIO_IRQ1_INTS_SM1_TXNFULL_MSB 5 +#define PIO_IRQ1_INTS_SM1_TXNFULL_LSB 5 +#define PIO_IRQ1_INTS_SM1_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM0_TXNFULL +// Description : None +#define PIO_IRQ1_INTS_SM0_TXNFULL_RESET 0x0 +#define PIO_IRQ1_INTS_SM0_TXNFULL_BITS 0x00000010 +#define PIO_IRQ1_INTS_SM0_TXNFULL_MSB 4 +#define PIO_IRQ1_INTS_SM0_TXNFULL_LSB 4 +#define PIO_IRQ1_INTS_SM0_TXNFULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM3_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTS_SM3_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTS_SM3_RXNEMPTY_BITS 0x00000008 +#define PIO_IRQ1_INTS_SM3_RXNEMPTY_MSB 3 +#define PIO_IRQ1_INTS_SM3_RXNEMPTY_LSB 3 +#define PIO_IRQ1_INTS_SM3_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM2_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTS_SM2_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTS_SM2_RXNEMPTY_BITS 0x00000004 +#define PIO_IRQ1_INTS_SM2_RXNEMPTY_MSB 2 +#define PIO_IRQ1_INTS_SM2_RXNEMPTY_LSB 2 +#define PIO_IRQ1_INTS_SM2_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM1_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTS_SM1_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTS_SM1_RXNEMPTY_BITS 0x00000002 +#define PIO_IRQ1_INTS_SM1_RXNEMPTY_MSB 1 +#define PIO_IRQ1_INTS_SM1_RXNEMPTY_LSB 1 +#define PIO_IRQ1_INTS_SM1_RXNEMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PIO_IRQ1_INTS_SM0_RXNEMPTY +// Description : None +#define PIO_IRQ1_INTS_SM0_RXNEMPTY_RESET 0x0 +#define PIO_IRQ1_INTS_SM0_RXNEMPTY_BITS 0x00000001 +#define PIO_IRQ1_INTS_SM0_RXNEMPTY_MSB 0 +#define PIO_IRQ1_INTS_SM0_RXNEMPTY_LSB 0 +#define PIO_IRQ1_INTS_SM0_RXNEMPTY_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_PIO_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pll.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pll.h new file mode 100644 index 0000000000..6a21d5603f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pll.h @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : PLL +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_PLL_DEFINED +#define HARDWARE_REGS_PLL_DEFINED +// ============================================================================= +// Register : PLL_CS +// Description : Control and Status +// GENERAL CONSTRAINTS: +// Reference clock frequency min=5MHz, max=800MHz +// Feedback divider min=16, max=320 +// VCO frequency min=400MHz, max=1600MHz +#define PLL_CS_OFFSET 0x00000000 +#define PLL_CS_BITS 0x8000013f +#define PLL_CS_RESET 0x00000001 +// ----------------------------------------------------------------------------- +// Field : PLL_CS_LOCK +// Description : PLL is locked +#define PLL_CS_LOCK_RESET 0x0 +#define PLL_CS_LOCK_BITS 0x80000000 +#define PLL_CS_LOCK_MSB 31 +#define PLL_CS_LOCK_LSB 31 +#define PLL_CS_LOCK_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PLL_CS_BYPASS +// Description : Passes the reference clock to the output instead of the divided +// VCO. The VCO continues to run so the user can switch between +// the reference clock and the divided VCO but the output will +// glitch when doing so. +#define PLL_CS_BYPASS_RESET 0x0 +#define PLL_CS_BYPASS_BITS 0x00000100 +#define PLL_CS_BYPASS_MSB 8 +#define PLL_CS_BYPASS_LSB 8 +#define PLL_CS_BYPASS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PLL_CS_REFDIV +// Description : Divides the PLL input reference clock. +// Behaviour is undefined for div=0. +// PLL output will be unpredictable during refdiv changes, wait +// for lock=1 before using it. +#define PLL_CS_REFDIV_RESET 0x01 +#define PLL_CS_REFDIV_BITS 0x0000003f +#define PLL_CS_REFDIV_MSB 5 +#define PLL_CS_REFDIV_LSB 0 +#define PLL_CS_REFDIV_ACCESS "RW" +// ============================================================================= +// Register : PLL_PWR +// Description : Controls the PLL power modes. +#define PLL_PWR_OFFSET 0x00000004 +#define PLL_PWR_BITS 0x0000002d +#define PLL_PWR_RESET 0x0000002d +// ----------------------------------------------------------------------------- +// Field : PLL_PWR_VCOPD +// Description : PLL VCO powerdown +// To save power set high when PLL output not required or +// bypass=1. +#define PLL_PWR_VCOPD_RESET 0x1 +#define PLL_PWR_VCOPD_BITS 0x00000020 +#define PLL_PWR_VCOPD_MSB 5 +#define PLL_PWR_VCOPD_LSB 5 +#define PLL_PWR_VCOPD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PLL_PWR_POSTDIVPD +// Description : PLL post divider powerdown +// To save power set high when PLL output not required or +// bypass=1. +#define PLL_PWR_POSTDIVPD_RESET 0x1 +#define PLL_PWR_POSTDIVPD_BITS 0x00000008 +#define PLL_PWR_POSTDIVPD_MSB 3 +#define PLL_PWR_POSTDIVPD_LSB 3 +#define PLL_PWR_POSTDIVPD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PLL_PWR_DSMPD +// Description : PLL DSM powerdown +// Nothing is achieved by setting this low. +#define PLL_PWR_DSMPD_RESET 0x1 +#define PLL_PWR_DSMPD_BITS 0x00000004 +#define PLL_PWR_DSMPD_MSB 2 +#define PLL_PWR_DSMPD_LSB 2 +#define PLL_PWR_DSMPD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PLL_PWR_PD +// Description : PLL powerdown +// To save power set high when PLL output not required. +#define PLL_PWR_PD_RESET 0x1 +#define PLL_PWR_PD_BITS 0x00000001 +#define PLL_PWR_PD_MSB 0 +#define PLL_PWR_PD_LSB 0 +#define PLL_PWR_PD_ACCESS "RW" +// ============================================================================= +// Register : PLL_FBDIV_INT +// Description : Feedback divisor +// (note: this PLL does not support fractional division) +// see ctrl reg description for constraints +#define PLL_FBDIV_INT_OFFSET 0x00000008 +#define PLL_FBDIV_INT_BITS 0x00000fff +#define PLL_FBDIV_INT_RESET 0x00000000 +#define PLL_FBDIV_INT_MSB 11 +#define PLL_FBDIV_INT_LSB 0 +#define PLL_FBDIV_INT_ACCESS "RW" +// ============================================================================= +// Register : PLL_PRIM +// Description : Controls the PLL post dividers for the primary output +// (note: this PLL does not have a secondary output) +// the primary output is driven from VCO divided by +// postdiv1*postdiv2 +#define PLL_PRIM_OFFSET 0x0000000c +#define PLL_PRIM_BITS 0x00077000 +#define PLL_PRIM_RESET 0x00077000 +// ----------------------------------------------------------------------------- +// Field : PLL_PRIM_POSTDIV1 +// Description : divide by 1-7 +#define PLL_PRIM_POSTDIV1_RESET 0x7 +#define PLL_PRIM_POSTDIV1_BITS 0x00070000 +#define PLL_PRIM_POSTDIV1_MSB 18 +#define PLL_PRIM_POSTDIV1_LSB 16 +#define PLL_PRIM_POSTDIV1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PLL_PRIM_POSTDIV2 +// Description : divide by 1-7 +#define PLL_PRIM_POSTDIV2_RESET 0x7 +#define PLL_PRIM_POSTDIV2_BITS 0x00007000 +#define PLL_PRIM_POSTDIV2_MSB 14 +#define PLL_PRIM_POSTDIV2_LSB 12 +#define PLL_PRIM_POSTDIV2_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_PLL_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/psm.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/psm.h new file mode 100644 index 0000000000..dacf36394e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/psm.h @@ -0,0 +1,584 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : PSM +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_PSM_DEFINED +#define HARDWARE_REGS_PSM_DEFINED +// ============================================================================= +// Register : PSM_FRCE_ON +// Description : Force block out of reset (i.e. power it on) +#define PSM_FRCE_ON_OFFSET 0x00000000 +#define PSM_FRCE_ON_BITS 0x0001ffff +#define PSM_FRCE_ON_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_PROC1 +// Description : None +#define PSM_FRCE_ON_PROC1_RESET 0x0 +#define PSM_FRCE_ON_PROC1_BITS 0x00010000 +#define PSM_FRCE_ON_PROC1_MSB 16 +#define PSM_FRCE_ON_PROC1_LSB 16 +#define PSM_FRCE_ON_PROC1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_PROC0 +// Description : None +#define PSM_FRCE_ON_PROC0_RESET 0x0 +#define PSM_FRCE_ON_PROC0_BITS 0x00008000 +#define PSM_FRCE_ON_PROC0_MSB 15 +#define PSM_FRCE_ON_PROC0_LSB 15 +#define PSM_FRCE_ON_PROC0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SIO +// Description : None +#define PSM_FRCE_ON_SIO_RESET 0x0 +#define PSM_FRCE_ON_SIO_BITS 0x00004000 +#define PSM_FRCE_ON_SIO_MSB 14 +#define PSM_FRCE_ON_SIO_LSB 14 +#define PSM_FRCE_ON_SIO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_VREG_AND_CHIP_RESET +// Description : None +#define PSM_FRCE_ON_VREG_AND_CHIP_RESET_RESET 0x0 +#define PSM_FRCE_ON_VREG_AND_CHIP_RESET_BITS 0x00002000 +#define PSM_FRCE_ON_VREG_AND_CHIP_RESET_MSB 13 +#define PSM_FRCE_ON_VREG_AND_CHIP_RESET_LSB 13 +#define PSM_FRCE_ON_VREG_AND_CHIP_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_XIP +// Description : None +#define PSM_FRCE_ON_XIP_RESET 0x0 +#define PSM_FRCE_ON_XIP_BITS 0x00001000 +#define PSM_FRCE_ON_XIP_MSB 12 +#define PSM_FRCE_ON_XIP_LSB 12 +#define PSM_FRCE_ON_XIP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SRAM5 +// Description : None +#define PSM_FRCE_ON_SRAM5_RESET 0x0 +#define PSM_FRCE_ON_SRAM5_BITS 0x00000800 +#define PSM_FRCE_ON_SRAM5_MSB 11 +#define PSM_FRCE_ON_SRAM5_LSB 11 +#define PSM_FRCE_ON_SRAM5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SRAM4 +// Description : None +#define PSM_FRCE_ON_SRAM4_RESET 0x0 +#define PSM_FRCE_ON_SRAM4_BITS 0x00000400 +#define PSM_FRCE_ON_SRAM4_MSB 10 +#define PSM_FRCE_ON_SRAM4_LSB 10 +#define PSM_FRCE_ON_SRAM4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SRAM3 +// Description : None +#define PSM_FRCE_ON_SRAM3_RESET 0x0 +#define PSM_FRCE_ON_SRAM3_BITS 0x00000200 +#define PSM_FRCE_ON_SRAM3_MSB 9 +#define PSM_FRCE_ON_SRAM3_LSB 9 +#define PSM_FRCE_ON_SRAM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SRAM2 +// Description : None +#define PSM_FRCE_ON_SRAM2_RESET 0x0 +#define PSM_FRCE_ON_SRAM2_BITS 0x00000100 +#define PSM_FRCE_ON_SRAM2_MSB 8 +#define PSM_FRCE_ON_SRAM2_LSB 8 +#define PSM_FRCE_ON_SRAM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SRAM1 +// Description : None +#define PSM_FRCE_ON_SRAM1_RESET 0x0 +#define PSM_FRCE_ON_SRAM1_BITS 0x00000080 +#define PSM_FRCE_ON_SRAM1_MSB 7 +#define PSM_FRCE_ON_SRAM1_LSB 7 +#define PSM_FRCE_ON_SRAM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_SRAM0 +// Description : None +#define PSM_FRCE_ON_SRAM0_RESET 0x0 +#define PSM_FRCE_ON_SRAM0_BITS 0x00000040 +#define PSM_FRCE_ON_SRAM0_MSB 6 +#define PSM_FRCE_ON_SRAM0_LSB 6 +#define PSM_FRCE_ON_SRAM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_ROM +// Description : None +#define PSM_FRCE_ON_ROM_RESET 0x0 +#define PSM_FRCE_ON_ROM_BITS 0x00000020 +#define PSM_FRCE_ON_ROM_MSB 5 +#define PSM_FRCE_ON_ROM_LSB 5 +#define PSM_FRCE_ON_ROM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_BUSFABRIC +// Description : None +#define PSM_FRCE_ON_BUSFABRIC_RESET 0x0 +#define PSM_FRCE_ON_BUSFABRIC_BITS 0x00000010 +#define PSM_FRCE_ON_BUSFABRIC_MSB 4 +#define PSM_FRCE_ON_BUSFABRIC_LSB 4 +#define PSM_FRCE_ON_BUSFABRIC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_RESETS +// Description : None +#define PSM_FRCE_ON_RESETS_RESET 0x0 +#define PSM_FRCE_ON_RESETS_BITS 0x00000008 +#define PSM_FRCE_ON_RESETS_MSB 3 +#define PSM_FRCE_ON_RESETS_LSB 3 +#define PSM_FRCE_ON_RESETS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_CLOCKS +// Description : None +#define PSM_FRCE_ON_CLOCKS_RESET 0x0 +#define PSM_FRCE_ON_CLOCKS_BITS 0x00000004 +#define PSM_FRCE_ON_CLOCKS_MSB 2 +#define PSM_FRCE_ON_CLOCKS_LSB 2 +#define PSM_FRCE_ON_CLOCKS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_XOSC +// Description : None +#define PSM_FRCE_ON_XOSC_RESET 0x0 +#define PSM_FRCE_ON_XOSC_BITS 0x00000002 +#define PSM_FRCE_ON_XOSC_MSB 1 +#define PSM_FRCE_ON_XOSC_LSB 1 +#define PSM_FRCE_ON_XOSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_ON_ROSC +// Description : None +#define PSM_FRCE_ON_ROSC_RESET 0x0 +#define PSM_FRCE_ON_ROSC_BITS 0x00000001 +#define PSM_FRCE_ON_ROSC_MSB 0 +#define PSM_FRCE_ON_ROSC_LSB 0 +#define PSM_FRCE_ON_ROSC_ACCESS "RW" +// ============================================================================= +// Register : PSM_FRCE_OFF +// Description : Force into reset (i.e. power it off) +#define PSM_FRCE_OFF_OFFSET 0x00000004 +#define PSM_FRCE_OFF_BITS 0x0001ffff +#define PSM_FRCE_OFF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_PROC1 +// Description : None +#define PSM_FRCE_OFF_PROC1_RESET 0x0 +#define PSM_FRCE_OFF_PROC1_BITS 0x00010000 +#define PSM_FRCE_OFF_PROC1_MSB 16 +#define PSM_FRCE_OFF_PROC1_LSB 16 +#define PSM_FRCE_OFF_PROC1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_PROC0 +// Description : None +#define PSM_FRCE_OFF_PROC0_RESET 0x0 +#define PSM_FRCE_OFF_PROC0_BITS 0x00008000 +#define PSM_FRCE_OFF_PROC0_MSB 15 +#define PSM_FRCE_OFF_PROC0_LSB 15 +#define PSM_FRCE_OFF_PROC0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SIO +// Description : None +#define PSM_FRCE_OFF_SIO_RESET 0x0 +#define PSM_FRCE_OFF_SIO_BITS 0x00004000 +#define PSM_FRCE_OFF_SIO_MSB 14 +#define PSM_FRCE_OFF_SIO_LSB 14 +#define PSM_FRCE_OFF_SIO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_VREG_AND_CHIP_RESET +// Description : None +#define PSM_FRCE_OFF_VREG_AND_CHIP_RESET_RESET 0x0 +#define PSM_FRCE_OFF_VREG_AND_CHIP_RESET_BITS 0x00002000 +#define PSM_FRCE_OFF_VREG_AND_CHIP_RESET_MSB 13 +#define PSM_FRCE_OFF_VREG_AND_CHIP_RESET_LSB 13 +#define PSM_FRCE_OFF_VREG_AND_CHIP_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_XIP +// Description : None +#define PSM_FRCE_OFF_XIP_RESET 0x0 +#define PSM_FRCE_OFF_XIP_BITS 0x00001000 +#define PSM_FRCE_OFF_XIP_MSB 12 +#define PSM_FRCE_OFF_XIP_LSB 12 +#define PSM_FRCE_OFF_XIP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SRAM5 +// Description : None +#define PSM_FRCE_OFF_SRAM5_RESET 0x0 +#define PSM_FRCE_OFF_SRAM5_BITS 0x00000800 +#define PSM_FRCE_OFF_SRAM5_MSB 11 +#define PSM_FRCE_OFF_SRAM5_LSB 11 +#define PSM_FRCE_OFF_SRAM5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SRAM4 +// Description : None +#define PSM_FRCE_OFF_SRAM4_RESET 0x0 +#define PSM_FRCE_OFF_SRAM4_BITS 0x00000400 +#define PSM_FRCE_OFF_SRAM4_MSB 10 +#define PSM_FRCE_OFF_SRAM4_LSB 10 +#define PSM_FRCE_OFF_SRAM4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SRAM3 +// Description : None +#define PSM_FRCE_OFF_SRAM3_RESET 0x0 +#define PSM_FRCE_OFF_SRAM3_BITS 0x00000200 +#define PSM_FRCE_OFF_SRAM3_MSB 9 +#define PSM_FRCE_OFF_SRAM3_LSB 9 +#define PSM_FRCE_OFF_SRAM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SRAM2 +// Description : None +#define PSM_FRCE_OFF_SRAM2_RESET 0x0 +#define PSM_FRCE_OFF_SRAM2_BITS 0x00000100 +#define PSM_FRCE_OFF_SRAM2_MSB 8 +#define PSM_FRCE_OFF_SRAM2_LSB 8 +#define PSM_FRCE_OFF_SRAM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SRAM1 +// Description : None +#define PSM_FRCE_OFF_SRAM1_RESET 0x0 +#define PSM_FRCE_OFF_SRAM1_BITS 0x00000080 +#define PSM_FRCE_OFF_SRAM1_MSB 7 +#define PSM_FRCE_OFF_SRAM1_LSB 7 +#define PSM_FRCE_OFF_SRAM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_SRAM0 +// Description : None +#define PSM_FRCE_OFF_SRAM0_RESET 0x0 +#define PSM_FRCE_OFF_SRAM0_BITS 0x00000040 +#define PSM_FRCE_OFF_SRAM0_MSB 6 +#define PSM_FRCE_OFF_SRAM0_LSB 6 +#define PSM_FRCE_OFF_SRAM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_ROM +// Description : None +#define PSM_FRCE_OFF_ROM_RESET 0x0 +#define PSM_FRCE_OFF_ROM_BITS 0x00000020 +#define PSM_FRCE_OFF_ROM_MSB 5 +#define PSM_FRCE_OFF_ROM_LSB 5 +#define PSM_FRCE_OFF_ROM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_BUSFABRIC +// Description : None +#define PSM_FRCE_OFF_BUSFABRIC_RESET 0x0 +#define PSM_FRCE_OFF_BUSFABRIC_BITS 0x00000010 +#define PSM_FRCE_OFF_BUSFABRIC_MSB 4 +#define PSM_FRCE_OFF_BUSFABRIC_LSB 4 +#define PSM_FRCE_OFF_BUSFABRIC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_RESETS +// Description : None +#define PSM_FRCE_OFF_RESETS_RESET 0x0 +#define PSM_FRCE_OFF_RESETS_BITS 0x00000008 +#define PSM_FRCE_OFF_RESETS_MSB 3 +#define PSM_FRCE_OFF_RESETS_LSB 3 +#define PSM_FRCE_OFF_RESETS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_CLOCKS +// Description : None +#define PSM_FRCE_OFF_CLOCKS_RESET 0x0 +#define PSM_FRCE_OFF_CLOCKS_BITS 0x00000004 +#define PSM_FRCE_OFF_CLOCKS_MSB 2 +#define PSM_FRCE_OFF_CLOCKS_LSB 2 +#define PSM_FRCE_OFF_CLOCKS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_XOSC +// Description : None +#define PSM_FRCE_OFF_XOSC_RESET 0x0 +#define PSM_FRCE_OFF_XOSC_BITS 0x00000002 +#define PSM_FRCE_OFF_XOSC_MSB 1 +#define PSM_FRCE_OFF_XOSC_LSB 1 +#define PSM_FRCE_OFF_XOSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_FRCE_OFF_ROSC +// Description : None +#define PSM_FRCE_OFF_ROSC_RESET 0x0 +#define PSM_FRCE_OFF_ROSC_BITS 0x00000001 +#define PSM_FRCE_OFF_ROSC_MSB 0 +#define PSM_FRCE_OFF_ROSC_LSB 0 +#define PSM_FRCE_OFF_ROSC_ACCESS "RW" +// ============================================================================= +// Register : PSM_WDSEL +// Description : Set to 1 if this peripheral should be reset when the watchdog +// fires. +#define PSM_WDSEL_OFFSET 0x00000008 +#define PSM_WDSEL_BITS 0x0001ffff +#define PSM_WDSEL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_PROC1 +// Description : None +#define PSM_WDSEL_PROC1_RESET 0x0 +#define PSM_WDSEL_PROC1_BITS 0x00010000 +#define PSM_WDSEL_PROC1_MSB 16 +#define PSM_WDSEL_PROC1_LSB 16 +#define PSM_WDSEL_PROC1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_PROC0 +// Description : None +#define PSM_WDSEL_PROC0_RESET 0x0 +#define PSM_WDSEL_PROC0_BITS 0x00008000 +#define PSM_WDSEL_PROC0_MSB 15 +#define PSM_WDSEL_PROC0_LSB 15 +#define PSM_WDSEL_PROC0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SIO +// Description : None +#define PSM_WDSEL_SIO_RESET 0x0 +#define PSM_WDSEL_SIO_BITS 0x00004000 +#define PSM_WDSEL_SIO_MSB 14 +#define PSM_WDSEL_SIO_LSB 14 +#define PSM_WDSEL_SIO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_VREG_AND_CHIP_RESET +// Description : None +#define PSM_WDSEL_VREG_AND_CHIP_RESET_RESET 0x0 +#define PSM_WDSEL_VREG_AND_CHIP_RESET_BITS 0x00002000 +#define PSM_WDSEL_VREG_AND_CHIP_RESET_MSB 13 +#define PSM_WDSEL_VREG_AND_CHIP_RESET_LSB 13 +#define PSM_WDSEL_VREG_AND_CHIP_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_XIP +// Description : None +#define PSM_WDSEL_XIP_RESET 0x0 +#define PSM_WDSEL_XIP_BITS 0x00001000 +#define PSM_WDSEL_XIP_MSB 12 +#define PSM_WDSEL_XIP_LSB 12 +#define PSM_WDSEL_XIP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SRAM5 +// Description : None +#define PSM_WDSEL_SRAM5_RESET 0x0 +#define PSM_WDSEL_SRAM5_BITS 0x00000800 +#define PSM_WDSEL_SRAM5_MSB 11 +#define PSM_WDSEL_SRAM5_LSB 11 +#define PSM_WDSEL_SRAM5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SRAM4 +// Description : None +#define PSM_WDSEL_SRAM4_RESET 0x0 +#define PSM_WDSEL_SRAM4_BITS 0x00000400 +#define PSM_WDSEL_SRAM4_MSB 10 +#define PSM_WDSEL_SRAM4_LSB 10 +#define PSM_WDSEL_SRAM4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SRAM3 +// Description : None +#define PSM_WDSEL_SRAM3_RESET 0x0 +#define PSM_WDSEL_SRAM3_BITS 0x00000200 +#define PSM_WDSEL_SRAM3_MSB 9 +#define PSM_WDSEL_SRAM3_LSB 9 +#define PSM_WDSEL_SRAM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SRAM2 +// Description : None +#define PSM_WDSEL_SRAM2_RESET 0x0 +#define PSM_WDSEL_SRAM2_BITS 0x00000100 +#define PSM_WDSEL_SRAM2_MSB 8 +#define PSM_WDSEL_SRAM2_LSB 8 +#define PSM_WDSEL_SRAM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SRAM1 +// Description : None +#define PSM_WDSEL_SRAM1_RESET 0x0 +#define PSM_WDSEL_SRAM1_BITS 0x00000080 +#define PSM_WDSEL_SRAM1_MSB 7 +#define PSM_WDSEL_SRAM1_LSB 7 +#define PSM_WDSEL_SRAM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_SRAM0 +// Description : None +#define PSM_WDSEL_SRAM0_RESET 0x0 +#define PSM_WDSEL_SRAM0_BITS 0x00000040 +#define PSM_WDSEL_SRAM0_MSB 6 +#define PSM_WDSEL_SRAM0_LSB 6 +#define PSM_WDSEL_SRAM0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_ROM +// Description : None +#define PSM_WDSEL_ROM_RESET 0x0 +#define PSM_WDSEL_ROM_BITS 0x00000020 +#define PSM_WDSEL_ROM_MSB 5 +#define PSM_WDSEL_ROM_LSB 5 +#define PSM_WDSEL_ROM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_BUSFABRIC +// Description : None +#define PSM_WDSEL_BUSFABRIC_RESET 0x0 +#define PSM_WDSEL_BUSFABRIC_BITS 0x00000010 +#define PSM_WDSEL_BUSFABRIC_MSB 4 +#define PSM_WDSEL_BUSFABRIC_LSB 4 +#define PSM_WDSEL_BUSFABRIC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_RESETS +// Description : None +#define PSM_WDSEL_RESETS_RESET 0x0 +#define PSM_WDSEL_RESETS_BITS 0x00000008 +#define PSM_WDSEL_RESETS_MSB 3 +#define PSM_WDSEL_RESETS_LSB 3 +#define PSM_WDSEL_RESETS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_CLOCKS +// Description : None +#define PSM_WDSEL_CLOCKS_RESET 0x0 +#define PSM_WDSEL_CLOCKS_BITS 0x00000004 +#define PSM_WDSEL_CLOCKS_MSB 2 +#define PSM_WDSEL_CLOCKS_LSB 2 +#define PSM_WDSEL_CLOCKS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_XOSC +// Description : None +#define PSM_WDSEL_XOSC_RESET 0x0 +#define PSM_WDSEL_XOSC_BITS 0x00000002 +#define PSM_WDSEL_XOSC_MSB 1 +#define PSM_WDSEL_XOSC_LSB 1 +#define PSM_WDSEL_XOSC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PSM_WDSEL_ROSC +// Description : None +#define PSM_WDSEL_ROSC_RESET 0x0 +#define PSM_WDSEL_ROSC_BITS 0x00000001 +#define PSM_WDSEL_ROSC_MSB 0 +#define PSM_WDSEL_ROSC_LSB 0 +#define PSM_WDSEL_ROSC_ACCESS "RW" +// ============================================================================= +// Register : PSM_DONE +// Description : Indicates the peripheral's registers are ready to access. +#define PSM_DONE_OFFSET 0x0000000c +#define PSM_DONE_BITS 0x0001ffff +#define PSM_DONE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_PROC1 +// Description : None +#define PSM_DONE_PROC1_RESET 0x0 +#define PSM_DONE_PROC1_BITS 0x00010000 +#define PSM_DONE_PROC1_MSB 16 +#define PSM_DONE_PROC1_LSB 16 +#define PSM_DONE_PROC1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_PROC0 +// Description : None +#define PSM_DONE_PROC0_RESET 0x0 +#define PSM_DONE_PROC0_BITS 0x00008000 +#define PSM_DONE_PROC0_MSB 15 +#define PSM_DONE_PROC0_LSB 15 +#define PSM_DONE_PROC0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SIO +// Description : None +#define PSM_DONE_SIO_RESET 0x0 +#define PSM_DONE_SIO_BITS 0x00004000 +#define PSM_DONE_SIO_MSB 14 +#define PSM_DONE_SIO_LSB 14 +#define PSM_DONE_SIO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_VREG_AND_CHIP_RESET +// Description : None +#define PSM_DONE_VREG_AND_CHIP_RESET_RESET 0x0 +#define PSM_DONE_VREG_AND_CHIP_RESET_BITS 0x00002000 +#define PSM_DONE_VREG_AND_CHIP_RESET_MSB 13 +#define PSM_DONE_VREG_AND_CHIP_RESET_LSB 13 +#define PSM_DONE_VREG_AND_CHIP_RESET_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_XIP +// Description : None +#define PSM_DONE_XIP_RESET 0x0 +#define PSM_DONE_XIP_BITS 0x00001000 +#define PSM_DONE_XIP_MSB 12 +#define PSM_DONE_XIP_LSB 12 +#define PSM_DONE_XIP_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SRAM5 +// Description : None +#define PSM_DONE_SRAM5_RESET 0x0 +#define PSM_DONE_SRAM5_BITS 0x00000800 +#define PSM_DONE_SRAM5_MSB 11 +#define PSM_DONE_SRAM5_LSB 11 +#define PSM_DONE_SRAM5_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SRAM4 +// Description : None +#define PSM_DONE_SRAM4_RESET 0x0 +#define PSM_DONE_SRAM4_BITS 0x00000400 +#define PSM_DONE_SRAM4_MSB 10 +#define PSM_DONE_SRAM4_LSB 10 +#define PSM_DONE_SRAM4_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SRAM3 +// Description : None +#define PSM_DONE_SRAM3_RESET 0x0 +#define PSM_DONE_SRAM3_BITS 0x00000200 +#define PSM_DONE_SRAM3_MSB 9 +#define PSM_DONE_SRAM3_LSB 9 +#define PSM_DONE_SRAM3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SRAM2 +// Description : None +#define PSM_DONE_SRAM2_RESET 0x0 +#define PSM_DONE_SRAM2_BITS 0x00000100 +#define PSM_DONE_SRAM2_MSB 8 +#define PSM_DONE_SRAM2_LSB 8 +#define PSM_DONE_SRAM2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SRAM1 +// Description : None +#define PSM_DONE_SRAM1_RESET 0x0 +#define PSM_DONE_SRAM1_BITS 0x00000080 +#define PSM_DONE_SRAM1_MSB 7 +#define PSM_DONE_SRAM1_LSB 7 +#define PSM_DONE_SRAM1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_SRAM0 +// Description : None +#define PSM_DONE_SRAM0_RESET 0x0 +#define PSM_DONE_SRAM0_BITS 0x00000040 +#define PSM_DONE_SRAM0_MSB 6 +#define PSM_DONE_SRAM0_LSB 6 +#define PSM_DONE_SRAM0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_ROM +// Description : None +#define PSM_DONE_ROM_RESET 0x0 +#define PSM_DONE_ROM_BITS 0x00000020 +#define PSM_DONE_ROM_MSB 5 +#define PSM_DONE_ROM_LSB 5 +#define PSM_DONE_ROM_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_BUSFABRIC +// Description : None +#define PSM_DONE_BUSFABRIC_RESET 0x0 +#define PSM_DONE_BUSFABRIC_BITS 0x00000010 +#define PSM_DONE_BUSFABRIC_MSB 4 +#define PSM_DONE_BUSFABRIC_LSB 4 +#define PSM_DONE_BUSFABRIC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_RESETS +// Description : None +#define PSM_DONE_RESETS_RESET 0x0 +#define PSM_DONE_RESETS_BITS 0x00000008 +#define PSM_DONE_RESETS_MSB 3 +#define PSM_DONE_RESETS_LSB 3 +#define PSM_DONE_RESETS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_CLOCKS +// Description : None +#define PSM_DONE_CLOCKS_RESET 0x0 +#define PSM_DONE_CLOCKS_BITS 0x00000004 +#define PSM_DONE_CLOCKS_MSB 2 +#define PSM_DONE_CLOCKS_LSB 2 +#define PSM_DONE_CLOCKS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_XOSC +// Description : None +#define PSM_DONE_XOSC_RESET 0x0 +#define PSM_DONE_XOSC_BITS 0x00000002 +#define PSM_DONE_XOSC_MSB 1 +#define PSM_DONE_XOSC_LSB 1 +#define PSM_DONE_XOSC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PSM_DONE_ROSC +// Description : None +#define PSM_DONE_ROSC_RESET 0x0 +#define PSM_DONE_ROSC_BITS 0x00000001 +#define PSM_DONE_ROSC_MSB 0 +#define PSM_DONE_ROSC_LSB 0 +#define PSM_DONE_ROSC_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_PSM_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pwm.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pwm.h new file mode 100644 index 0000000000..01e2e5c21f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/pwm.h @@ -0,0 +1,1505 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : PWM +// Version : 1 +// Bus type : apb +// Description : Simple PWM +// ============================================================================= +#ifndef HARDWARE_REGS_PWM_DEFINED +#define HARDWARE_REGS_PWM_DEFINED +// ============================================================================= +// Register : PWM_CH0_CSR +// Description : Control and status register +#define PWM_CH0_CSR_OFFSET 0x00000000 +#define PWM_CH0_CSR_BITS 0x000000ff +#define PWM_CH0_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH0_CSR_PH_ADV_RESET 0x0 +#define PWM_CH0_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH0_CSR_PH_ADV_MSB 7 +#define PWM_CH0_CSR_PH_ADV_LSB 7 +#define PWM_CH0_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH0_CSR_PH_RET_RESET 0x0 +#define PWM_CH0_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH0_CSR_PH_RET_MSB 6 +#define PWM_CH0_CSR_PH_RET_LSB 6 +#define PWM_CH0_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH0_CSR_DIVMODE_RESET 0x0 +#define PWM_CH0_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH0_CSR_DIVMODE_MSB 5 +#define PWM_CH0_CSR_DIVMODE_LSB 4 +#define PWM_CH0_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH0_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH0_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH0_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH0_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_B_INV +// Description : Invert output B +#define PWM_CH0_CSR_B_INV_RESET 0x0 +#define PWM_CH0_CSR_B_INV_BITS 0x00000008 +#define PWM_CH0_CSR_B_INV_MSB 3 +#define PWM_CH0_CSR_B_INV_LSB 3 +#define PWM_CH0_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_A_INV +// Description : Invert output A +#define PWM_CH0_CSR_A_INV_RESET 0x0 +#define PWM_CH0_CSR_A_INV_BITS 0x00000004 +#define PWM_CH0_CSR_A_INV_MSB 2 +#define PWM_CH0_CSR_A_INV_LSB 2 +#define PWM_CH0_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH0_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH0_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH0_CSR_PH_CORRECT_MSB 1 +#define PWM_CH0_CSR_PH_CORRECT_LSB 1 +#define PWM_CH0_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH0_CSR_EN_RESET 0x0 +#define PWM_CH0_CSR_EN_BITS 0x00000001 +#define PWM_CH0_CSR_EN_MSB 0 +#define PWM_CH0_CSR_EN_LSB 0 +#define PWM_CH0_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH0_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH0_DIV_OFFSET 0x00000004 +#define PWM_CH0_DIV_BITS 0x00000fff +#define PWM_CH0_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_DIV_INT +// Description : None +#define PWM_CH0_DIV_INT_RESET 0x01 +#define PWM_CH0_DIV_INT_BITS 0x00000ff0 +#define PWM_CH0_DIV_INT_MSB 11 +#define PWM_CH0_DIV_INT_LSB 4 +#define PWM_CH0_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_DIV_FRAC +// Description : None +#define PWM_CH0_DIV_FRAC_RESET 0x0 +#define PWM_CH0_DIV_FRAC_BITS 0x0000000f +#define PWM_CH0_DIV_FRAC_MSB 3 +#define PWM_CH0_DIV_FRAC_LSB 0 +#define PWM_CH0_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH0_CTR +// Description : Direct access to the PWM counter +#define PWM_CH0_CTR_OFFSET 0x00000008 +#define PWM_CH0_CTR_BITS 0x0000ffff +#define PWM_CH0_CTR_RESET 0x00000000 +#define PWM_CH0_CTR_MSB 15 +#define PWM_CH0_CTR_LSB 0 +#define PWM_CH0_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH0_CC +// Description : Counter compare values +#define PWM_CH0_CC_OFFSET 0x0000000c +#define PWM_CH0_CC_BITS 0xffffffff +#define PWM_CH0_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CC_B +// Description : None +#define PWM_CH0_CC_B_RESET 0x0000 +#define PWM_CH0_CC_B_BITS 0xffff0000 +#define PWM_CH0_CC_B_MSB 31 +#define PWM_CH0_CC_B_LSB 16 +#define PWM_CH0_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH0_CC_A +// Description : None +#define PWM_CH0_CC_A_RESET 0x0000 +#define PWM_CH0_CC_A_BITS 0x0000ffff +#define PWM_CH0_CC_A_MSB 15 +#define PWM_CH0_CC_A_LSB 0 +#define PWM_CH0_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH0_TOP +// Description : Counter wrap value +#define PWM_CH0_TOP_OFFSET 0x00000010 +#define PWM_CH0_TOP_BITS 0x0000ffff +#define PWM_CH0_TOP_RESET 0x0000ffff +#define PWM_CH0_TOP_MSB 15 +#define PWM_CH0_TOP_LSB 0 +#define PWM_CH0_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH1_CSR +// Description : Control and status register +#define PWM_CH1_CSR_OFFSET 0x00000014 +#define PWM_CH1_CSR_BITS 0x000000ff +#define PWM_CH1_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH1_CSR_PH_ADV_RESET 0x0 +#define PWM_CH1_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH1_CSR_PH_ADV_MSB 7 +#define PWM_CH1_CSR_PH_ADV_LSB 7 +#define PWM_CH1_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH1_CSR_PH_RET_RESET 0x0 +#define PWM_CH1_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH1_CSR_PH_RET_MSB 6 +#define PWM_CH1_CSR_PH_RET_LSB 6 +#define PWM_CH1_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH1_CSR_DIVMODE_RESET 0x0 +#define PWM_CH1_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH1_CSR_DIVMODE_MSB 5 +#define PWM_CH1_CSR_DIVMODE_LSB 4 +#define PWM_CH1_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH1_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH1_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH1_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH1_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_B_INV +// Description : Invert output B +#define PWM_CH1_CSR_B_INV_RESET 0x0 +#define PWM_CH1_CSR_B_INV_BITS 0x00000008 +#define PWM_CH1_CSR_B_INV_MSB 3 +#define PWM_CH1_CSR_B_INV_LSB 3 +#define PWM_CH1_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_A_INV +// Description : Invert output A +#define PWM_CH1_CSR_A_INV_RESET 0x0 +#define PWM_CH1_CSR_A_INV_BITS 0x00000004 +#define PWM_CH1_CSR_A_INV_MSB 2 +#define PWM_CH1_CSR_A_INV_LSB 2 +#define PWM_CH1_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH1_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH1_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH1_CSR_PH_CORRECT_MSB 1 +#define PWM_CH1_CSR_PH_CORRECT_LSB 1 +#define PWM_CH1_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH1_CSR_EN_RESET 0x0 +#define PWM_CH1_CSR_EN_BITS 0x00000001 +#define PWM_CH1_CSR_EN_MSB 0 +#define PWM_CH1_CSR_EN_LSB 0 +#define PWM_CH1_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH1_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH1_DIV_OFFSET 0x00000018 +#define PWM_CH1_DIV_BITS 0x00000fff +#define PWM_CH1_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_DIV_INT +// Description : None +#define PWM_CH1_DIV_INT_RESET 0x01 +#define PWM_CH1_DIV_INT_BITS 0x00000ff0 +#define PWM_CH1_DIV_INT_MSB 11 +#define PWM_CH1_DIV_INT_LSB 4 +#define PWM_CH1_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_DIV_FRAC +// Description : None +#define PWM_CH1_DIV_FRAC_RESET 0x0 +#define PWM_CH1_DIV_FRAC_BITS 0x0000000f +#define PWM_CH1_DIV_FRAC_MSB 3 +#define PWM_CH1_DIV_FRAC_LSB 0 +#define PWM_CH1_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH1_CTR +// Description : Direct access to the PWM counter +#define PWM_CH1_CTR_OFFSET 0x0000001c +#define PWM_CH1_CTR_BITS 0x0000ffff +#define PWM_CH1_CTR_RESET 0x00000000 +#define PWM_CH1_CTR_MSB 15 +#define PWM_CH1_CTR_LSB 0 +#define PWM_CH1_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH1_CC +// Description : Counter compare values +#define PWM_CH1_CC_OFFSET 0x00000020 +#define PWM_CH1_CC_BITS 0xffffffff +#define PWM_CH1_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CC_B +// Description : None +#define PWM_CH1_CC_B_RESET 0x0000 +#define PWM_CH1_CC_B_BITS 0xffff0000 +#define PWM_CH1_CC_B_MSB 31 +#define PWM_CH1_CC_B_LSB 16 +#define PWM_CH1_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH1_CC_A +// Description : None +#define PWM_CH1_CC_A_RESET 0x0000 +#define PWM_CH1_CC_A_BITS 0x0000ffff +#define PWM_CH1_CC_A_MSB 15 +#define PWM_CH1_CC_A_LSB 0 +#define PWM_CH1_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH1_TOP +// Description : Counter wrap value +#define PWM_CH1_TOP_OFFSET 0x00000024 +#define PWM_CH1_TOP_BITS 0x0000ffff +#define PWM_CH1_TOP_RESET 0x0000ffff +#define PWM_CH1_TOP_MSB 15 +#define PWM_CH1_TOP_LSB 0 +#define PWM_CH1_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH2_CSR +// Description : Control and status register +#define PWM_CH2_CSR_OFFSET 0x00000028 +#define PWM_CH2_CSR_BITS 0x000000ff +#define PWM_CH2_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH2_CSR_PH_ADV_RESET 0x0 +#define PWM_CH2_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH2_CSR_PH_ADV_MSB 7 +#define PWM_CH2_CSR_PH_ADV_LSB 7 +#define PWM_CH2_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH2_CSR_PH_RET_RESET 0x0 +#define PWM_CH2_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH2_CSR_PH_RET_MSB 6 +#define PWM_CH2_CSR_PH_RET_LSB 6 +#define PWM_CH2_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH2_CSR_DIVMODE_RESET 0x0 +#define PWM_CH2_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH2_CSR_DIVMODE_MSB 5 +#define PWM_CH2_CSR_DIVMODE_LSB 4 +#define PWM_CH2_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH2_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH2_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH2_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH2_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_B_INV +// Description : Invert output B +#define PWM_CH2_CSR_B_INV_RESET 0x0 +#define PWM_CH2_CSR_B_INV_BITS 0x00000008 +#define PWM_CH2_CSR_B_INV_MSB 3 +#define PWM_CH2_CSR_B_INV_LSB 3 +#define PWM_CH2_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_A_INV +// Description : Invert output A +#define PWM_CH2_CSR_A_INV_RESET 0x0 +#define PWM_CH2_CSR_A_INV_BITS 0x00000004 +#define PWM_CH2_CSR_A_INV_MSB 2 +#define PWM_CH2_CSR_A_INV_LSB 2 +#define PWM_CH2_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH2_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH2_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH2_CSR_PH_CORRECT_MSB 1 +#define PWM_CH2_CSR_PH_CORRECT_LSB 1 +#define PWM_CH2_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH2_CSR_EN_RESET 0x0 +#define PWM_CH2_CSR_EN_BITS 0x00000001 +#define PWM_CH2_CSR_EN_MSB 0 +#define PWM_CH2_CSR_EN_LSB 0 +#define PWM_CH2_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH2_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH2_DIV_OFFSET 0x0000002c +#define PWM_CH2_DIV_BITS 0x00000fff +#define PWM_CH2_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_DIV_INT +// Description : None +#define PWM_CH2_DIV_INT_RESET 0x01 +#define PWM_CH2_DIV_INT_BITS 0x00000ff0 +#define PWM_CH2_DIV_INT_MSB 11 +#define PWM_CH2_DIV_INT_LSB 4 +#define PWM_CH2_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_DIV_FRAC +// Description : None +#define PWM_CH2_DIV_FRAC_RESET 0x0 +#define PWM_CH2_DIV_FRAC_BITS 0x0000000f +#define PWM_CH2_DIV_FRAC_MSB 3 +#define PWM_CH2_DIV_FRAC_LSB 0 +#define PWM_CH2_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH2_CTR +// Description : Direct access to the PWM counter +#define PWM_CH2_CTR_OFFSET 0x00000030 +#define PWM_CH2_CTR_BITS 0x0000ffff +#define PWM_CH2_CTR_RESET 0x00000000 +#define PWM_CH2_CTR_MSB 15 +#define PWM_CH2_CTR_LSB 0 +#define PWM_CH2_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH2_CC +// Description : Counter compare values +#define PWM_CH2_CC_OFFSET 0x00000034 +#define PWM_CH2_CC_BITS 0xffffffff +#define PWM_CH2_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CC_B +// Description : None +#define PWM_CH2_CC_B_RESET 0x0000 +#define PWM_CH2_CC_B_BITS 0xffff0000 +#define PWM_CH2_CC_B_MSB 31 +#define PWM_CH2_CC_B_LSB 16 +#define PWM_CH2_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH2_CC_A +// Description : None +#define PWM_CH2_CC_A_RESET 0x0000 +#define PWM_CH2_CC_A_BITS 0x0000ffff +#define PWM_CH2_CC_A_MSB 15 +#define PWM_CH2_CC_A_LSB 0 +#define PWM_CH2_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH2_TOP +// Description : Counter wrap value +#define PWM_CH2_TOP_OFFSET 0x00000038 +#define PWM_CH2_TOP_BITS 0x0000ffff +#define PWM_CH2_TOP_RESET 0x0000ffff +#define PWM_CH2_TOP_MSB 15 +#define PWM_CH2_TOP_LSB 0 +#define PWM_CH2_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH3_CSR +// Description : Control and status register +#define PWM_CH3_CSR_OFFSET 0x0000003c +#define PWM_CH3_CSR_BITS 0x000000ff +#define PWM_CH3_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH3_CSR_PH_ADV_RESET 0x0 +#define PWM_CH3_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH3_CSR_PH_ADV_MSB 7 +#define PWM_CH3_CSR_PH_ADV_LSB 7 +#define PWM_CH3_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH3_CSR_PH_RET_RESET 0x0 +#define PWM_CH3_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH3_CSR_PH_RET_MSB 6 +#define PWM_CH3_CSR_PH_RET_LSB 6 +#define PWM_CH3_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH3_CSR_DIVMODE_RESET 0x0 +#define PWM_CH3_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH3_CSR_DIVMODE_MSB 5 +#define PWM_CH3_CSR_DIVMODE_LSB 4 +#define PWM_CH3_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH3_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH3_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH3_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH3_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_B_INV +// Description : Invert output B +#define PWM_CH3_CSR_B_INV_RESET 0x0 +#define PWM_CH3_CSR_B_INV_BITS 0x00000008 +#define PWM_CH3_CSR_B_INV_MSB 3 +#define PWM_CH3_CSR_B_INV_LSB 3 +#define PWM_CH3_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_A_INV +// Description : Invert output A +#define PWM_CH3_CSR_A_INV_RESET 0x0 +#define PWM_CH3_CSR_A_INV_BITS 0x00000004 +#define PWM_CH3_CSR_A_INV_MSB 2 +#define PWM_CH3_CSR_A_INV_LSB 2 +#define PWM_CH3_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH3_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH3_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH3_CSR_PH_CORRECT_MSB 1 +#define PWM_CH3_CSR_PH_CORRECT_LSB 1 +#define PWM_CH3_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH3_CSR_EN_RESET 0x0 +#define PWM_CH3_CSR_EN_BITS 0x00000001 +#define PWM_CH3_CSR_EN_MSB 0 +#define PWM_CH3_CSR_EN_LSB 0 +#define PWM_CH3_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH3_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH3_DIV_OFFSET 0x00000040 +#define PWM_CH3_DIV_BITS 0x00000fff +#define PWM_CH3_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_DIV_INT +// Description : None +#define PWM_CH3_DIV_INT_RESET 0x01 +#define PWM_CH3_DIV_INT_BITS 0x00000ff0 +#define PWM_CH3_DIV_INT_MSB 11 +#define PWM_CH3_DIV_INT_LSB 4 +#define PWM_CH3_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_DIV_FRAC +// Description : None +#define PWM_CH3_DIV_FRAC_RESET 0x0 +#define PWM_CH3_DIV_FRAC_BITS 0x0000000f +#define PWM_CH3_DIV_FRAC_MSB 3 +#define PWM_CH3_DIV_FRAC_LSB 0 +#define PWM_CH3_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH3_CTR +// Description : Direct access to the PWM counter +#define PWM_CH3_CTR_OFFSET 0x00000044 +#define PWM_CH3_CTR_BITS 0x0000ffff +#define PWM_CH3_CTR_RESET 0x00000000 +#define PWM_CH3_CTR_MSB 15 +#define PWM_CH3_CTR_LSB 0 +#define PWM_CH3_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH3_CC +// Description : Counter compare values +#define PWM_CH3_CC_OFFSET 0x00000048 +#define PWM_CH3_CC_BITS 0xffffffff +#define PWM_CH3_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CC_B +// Description : None +#define PWM_CH3_CC_B_RESET 0x0000 +#define PWM_CH3_CC_B_BITS 0xffff0000 +#define PWM_CH3_CC_B_MSB 31 +#define PWM_CH3_CC_B_LSB 16 +#define PWM_CH3_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH3_CC_A +// Description : None +#define PWM_CH3_CC_A_RESET 0x0000 +#define PWM_CH3_CC_A_BITS 0x0000ffff +#define PWM_CH3_CC_A_MSB 15 +#define PWM_CH3_CC_A_LSB 0 +#define PWM_CH3_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH3_TOP +// Description : Counter wrap value +#define PWM_CH3_TOP_OFFSET 0x0000004c +#define PWM_CH3_TOP_BITS 0x0000ffff +#define PWM_CH3_TOP_RESET 0x0000ffff +#define PWM_CH3_TOP_MSB 15 +#define PWM_CH3_TOP_LSB 0 +#define PWM_CH3_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH4_CSR +// Description : Control and status register +#define PWM_CH4_CSR_OFFSET 0x00000050 +#define PWM_CH4_CSR_BITS 0x000000ff +#define PWM_CH4_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH4_CSR_PH_ADV_RESET 0x0 +#define PWM_CH4_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH4_CSR_PH_ADV_MSB 7 +#define PWM_CH4_CSR_PH_ADV_LSB 7 +#define PWM_CH4_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH4_CSR_PH_RET_RESET 0x0 +#define PWM_CH4_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH4_CSR_PH_RET_MSB 6 +#define PWM_CH4_CSR_PH_RET_LSB 6 +#define PWM_CH4_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH4_CSR_DIVMODE_RESET 0x0 +#define PWM_CH4_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH4_CSR_DIVMODE_MSB 5 +#define PWM_CH4_CSR_DIVMODE_LSB 4 +#define PWM_CH4_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH4_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH4_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH4_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH4_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_B_INV +// Description : Invert output B +#define PWM_CH4_CSR_B_INV_RESET 0x0 +#define PWM_CH4_CSR_B_INV_BITS 0x00000008 +#define PWM_CH4_CSR_B_INV_MSB 3 +#define PWM_CH4_CSR_B_INV_LSB 3 +#define PWM_CH4_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_A_INV +// Description : Invert output A +#define PWM_CH4_CSR_A_INV_RESET 0x0 +#define PWM_CH4_CSR_A_INV_BITS 0x00000004 +#define PWM_CH4_CSR_A_INV_MSB 2 +#define PWM_CH4_CSR_A_INV_LSB 2 +#define PWM_CH4_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH4_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH4_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH4_CSR_PH_CORRECT_MSB 1 +#define PWM_CH4_CSR_PH_CORRECT_LSB 1 +#define PWM_CH4_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH4_CSR_EN_RESET 0x0 +#define PWM_CH4_CSR_EN_BITS 0x00000001 +#define PWM_CH4_CSR_EN_MSB 0 +#define PWM_CH4_CSR_EN_LSB 0 +#define PWM_CH4_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH4_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH4_DIV_OFFSET 0x00000054 +#define PWM_CH4_DIV_BITS 0x00000fff +#define PWM_CH4_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_DIV_INT +// Description : None +#define PWM_CH4_DIV_INT_RESET 0x01 +#define PWM_CH4_DIV_INT_BITS 0x00000ff0 +#define PWM_CH4_DIV_INT_MSB 11 +#define PWM_CH4_DIV_INT_LSB 4 +#define PWM_CH4_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_DIV_FRAC +// Description : None +#define PWM_CH4_DIV_FRAC_RESET 0x0 +#define PWM_CH4_DIV_FRAC_BITS 0x0000000f +#define PWM_CH4_DIV_FRAC_MSB 3 +#define PWM_CH4_DIV_FRAC_LSB 0 +#define PWM_CH4_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH4_CTR +// Description : Direct access to the PWM counter +#define PWM_CH4_CTR_OFFSET 0x00000058 +#define PWM_CH4_CTR_BITS 0x0000ffff +#define PWM_CH4_CTR_RESET 0x00000000 +#define PWM_CH4_CTR_MSB 15 +#define PWM_CH4_CTR_LSB 0 +#define PWM_CH4_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH4_CC +// Description : Counter compare values +#define PWM_CH4_CC_OFFSET 0x0000005c +#define PWM_CH4_CC_BITS 0xffffffff +#define PWM_CH4_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CC_B +// Description : None +#define PWM_CH4_CC_B_RESET 0x0000 +#define PWM_CH4_CC_B_BITS 0xffff0000 +#define PWM_CH4_CC_B_MSB 31 +#define PWM_CH4_CC_B_LSB 16 +#define PWM_CH4_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH4_CC_A +// Description : None +#define PWM_CH4_CC_A_RESET 0x0000 +#define PWM_CH4_CC_A_BITS 0x0000ffff +#define PWM_CH4_CC_A_MSB 15 +#define PWM_CH4_CC_A_LSB 0 +#define PWM_CH4_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH4_TOP +// Description : Counter wrap value +#define PWM_CH4_TOP_OFFSET 0x00000060 +#define PWM_CH4_TOP_BITS 0x0000ffff +#define PWM_CH4_TOP_RESET 0x0000ffff +#define PWM_CH4_TOP_MSB 15 +#define PWM_CH4_TOP_LSB 0 +#define PWM_CH4_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH5_CSR +// Description : Control and status register +#define PWM_CH5_CSR_OFFSET 0x00000064 +#define PWM_CH5_CSR_BITS 0x000000ff +#define PWM_CH5_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH5_CSR_PH_ADV_RESET 0x0 +#define PWM_CH5_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH5_CSR_PH_ADV_MSB 7 +#define PWM_CH5_CSR_PH_ADV_LSB 7 +#define PWM_CH5_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH5_CSR_PH_RET_RESET 0x0 +#define PWM_CH5_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH5_CSR_PH_RET_MSB 6 +#define PWM_CH5_CSR_PH_RET_LSB 6 +#define PWM_CH5_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH5_CSR_DIVMODE_RESET 0x0 +#define PWM_CH5_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH5_CSR_DIVMODE_MSB 5 +#define PWM_CH5_CSR_DIVMODE_LSB 4 +#define PWM_CH5_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH5_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH5_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH5_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH5_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_B_INV +// Description : Invert output B +#define PWM_CH5_CSR_B_INV_RESET 0x0 +#define PWM_CH5_CSR_B_INV_BITS 0x00000008 +#define PWM_CH5_CSR_B_INV_MSB 3 +#define PWM_CH5_CSR_B_INV_LSB 3 +#define PWM_CH5_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_A_INV +// Description : Invert output A +#define PWM_CH5_CSR_A_INV_RESET 0x0 +#define PWM_CH5_CSR_A_INV_BITS 0x00000004 +#define PWM_CH5_CSR_A_INV_MSB 2 +#define PWM_CH5_CSR_A_INV_LSB 2 +#define PWM_CH5_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH5_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH5_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH5_CSR_PH_CORRECT_MSB 1 +#define PWM_CH5_CSR_PH_CORRECT_LSB 1 +#define PWM_CH5_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH5_CSR_EN_RESET 0x0 +#define PWM_CH5_CSR_EN_BITS 0x00000001 +#define PWM_CH5_CSR_EN_MSB 0 +#define PWM_CH5_CSR_EN_LSB 0 +#define PWM_CH5_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH5_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH5_DIV_OFFSET 0x00000068 +#define PWM_CH5_DIV_BITS 0x00000fff +#define PWM_CH5_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_DIV_INT +// Description : None +#define PWM_CH5_DIV_INT_RESET 0x01 +#define PWM_CH5_DIV_INT_BITS 0x00000ff0 +#define PWM_CH5_DIV_INT_MSB 11 +#define PWM_CH5_DIV_INT_LSB 4 +#define PWM_CH5_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_DIV_FRAC +// Description : None +#define PWM_CH5_DIV_FRAC_RESET 0x0 +#define PWM_CH5_DIV_FRAC_BITS 0x0000000f +#define PWM_CH5_DIV_FRAC_MSB 3 +#define PWM_CH5_DIV_FRAC_LSB 0 +#define PWM_CH5_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH5_CTR +// Description : Direct access to the PWM counter +#define PWM_CH5_CTR_OFFSET 0x0000006c +#define PWM_CH5_CTR_BITS 0x0000ffff +#define PWM_CH5_CTR_RESET 0x00000000 +#define PWM_CH5_CTR_MSB 15 +#define PWM_CH5_CTR_LSB 0 +#define PWM_CH5_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH5_CC +// Description : Counter compare values +#define PWM_CH5_CC_OFFSET 0x00000070 +#define PWM_CH5_CC_BITS 0xffffffff +#define PWM_CH5_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CC_B +// Description : None +#define PWM_CH5_CC_B_RESET 0x0000 +#define PWM_CH5_CC_B_BITS 0xffff0000 +#define PWM_CH5_CC_B_MSB 31 +#define PWM_CH5_CC_B_LSB 16 +#define PWM_CH5_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH5_CC_A +// Description : None +#define PWM_CH5_CC_A_RESET 0x0000 +#define PWM_CH5_CC_A_BITS 0x0000ffff +#define PWM_CH5_CC_A_MSB 15 +#define PWM_CH5_CC_A_LSB 0 +#define PWM_CH5_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH5_TOP +// Description : Counter wrap value +#define PWM_CH5_TOP_OFFSET 0x00000074 +#define PWM_CH5_TOP_BITS 0x0000ffff +#define PWM_CH5_TOP_RESET 0x0000ffff +#define PWM_CH5_TOP_MSB 15 +#define PWM_CH5_TOP_LSB 0 +#define PWM_CH5_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH6_CSR +// Description : Control and status register +#define PWM_CH6_CSR_OFFSET 0x00000078 +#define PWM_CH6_CSR_BITS 0x000000ff +#define PWM_CH6_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH6_CSR_PH_ADV_RESET 0x0 +#define PWM_CH6_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH6_CSR_PH_ADV_MSB 7 +#define PWM_CH6_CSR_PH_ADV_LSB 7 +#define PWM_CH6_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH6_CSR_PH_RET_RESET 0x0 +#define PWM_CH6_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH6_CSR_PH_RET_MSB 6 +#define PWM_CH6_CSR_PH_RET_LSB 6 +#define PWM_CH6_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH6_CSR_DIVMODE_RESET 0x0 +#define PWM_CH6_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH6_CSR_DIVMODE_MSB 5 +#define PWM_CH6_CSR_DIVMODE_LSB 4 +#define PWM_CH6_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH6_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH6_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH6_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH6_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_B_INV +// Description : Invert output B +#define PWM_CH6_CSR_B_INV_RESET 0x0 +#define PWM_CH6_CSR_B_INV_BITS 0x00000008 +#define PWM_CH6_CSR_B_INV_MSB 3 +#define PWM_CH6_CSR_B_INV_LSB 3 +#define PWM_CH6_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_A_INV +// Description : Invert output A +#define PWM_CH6_CSR_A_INV_RESET 0x0 +#define PWM_CH6_CSR_A_INV_BITS 0x00000004 +#define PWM_CH6_CSR_A_INV_MSB 2 +#define PWM_CH6_CSR_A_INV_LSB 2 +#define PWM_CH6_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH6_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH6_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH6_CSR_PH_CORRECT_MSB 1 +#define PWM_CH6_CSR_PH_CORRECT_LSB 1 +#define PWM_CH6_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH6_CSR_EN_RESET 0x0 +#define PWM_CH6_CSR_EN_BITS 0x00000001 +#define PWM_CH6_CSR_EN_MSB 0 +#define PWM_CH6_CSR_EN_LSB 0 +#define PWM_CH6_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH6_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH6_DIV_OFFSET 0x0000007c +#define PWM_CH6_DIV_BITS 0x00000fff +#define PWM_CH6_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_DIV_INT +// Description : None +#define PWM_CH6_DIV_INT_RESET 0x01 +#define PWM_CH6_DIV_INT_BITS 0x00000ff0 +#define PWM_CH6_DIV_INT_MSB 11 +#define PWM_CH6_DIV_INT_LSB 4 +#define PWM_CH6_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_DIV_FRAC +// Description : None +#define PWM_CH6_DIV_FRAC_RESET 0x0 +#define PWM_CH6_DIV_FRAC_BITS 0x0000000f +#define PWM_CH6_DIV_FRAC_MSB 3 +#define PWM_CH6_DIV_FRAC_LSB 0 +#define PWM_CH6_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH6_CTR +// Description : Direct access to the PWM counter +#define PWM_CH6_CTR_OFFSET 0x00000080 +#define PWM_CH6_CTR_BITS 0x0000ffff +#define PWM_CH6_CTR_RESET 0x00000000 +#define PWM_CH6_CTR_MSB 15 +#define PWM_CH6_CTR_LSB 0 +#define PWM_CH6_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH6_CC +// Description : Counter compare values +#define PWM_CH6_CC_OFFSET 0x00000084 +#define PWM_CH6_CC_BITS 0xffffffff +#define PWM_CH6_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CC_B +// Description : None +#define PWM_CH6_CC_B_RESET 0x0000 +#define PWM_CH6_CC_B_BITS 0xffff0000 +#define PWM_CH6_CC_B_MSB 31 +#define PWM_CH6_CC_B_LSB 16 +#define PWM_CH6_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH6_CC_A +// Description : None +#define PWM_CH6_CC_A_RESET 0x0000 +#define PWM_CH6_CC_A_BITS 0x0000ffff +#define PWM_CH6_CC_A_MSB 15 +#define PWM_CH6_CC_A_LSB 0 +#define PWM_CH6_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH6_TOP +// Description : Counter wrap value +#define PWM_CH6_TOP_OFFSET 0x00000088 +#define PWM_CH6_TOP_BITS 0x0000ffff +#define PWM_CH6_TOP_RESET 0x0000ffff +#define PWM_CH6_TOP_MSB 15 +#define PWM_CH6_TOP_LSB 0 +#define PWM_CH6_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH7_CSR +// Description : Control and status register +#define PWM_CH7_CSR_OFFSET 0x0000008c +#define PWM_CH7_CSR_BITS 0x000000ff +#define PWM_CH7_CSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_PH_ADV +// Description : Advance the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running +// at less than full speed (div_int + div_frac / 16 > 1) +#define PWM_CH7_CSR_PH_ADV_RESET 0x0 +#define PWM_CH7_CSR_PH_ADV_BITS 0x00000080 +#define PWM_CH7_CSR_PH_ADV_MSB 7 +#define PWM_CH7_CSR_PH_ADV_LSB 7 +#define PWM_CH7_CSR_PH_ADV_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_PH_RET +// Description : Retard the phase of the counter by 1 count, while it is +// running. +// Self-clearing. Write a 1, and poll until low. Counter must be +// running. +#define PWM_CH7_CSR_PH_RET_RESET 0x0 +#define PWM_CH7_CSR_PH_RET_BITS 0x00000040 +#define PWM_CH7_CSR_PH_RET_MSB 6 +#define PWM_CH7_CSR_PH_RET_LSB 6 +#define PWM_CH7_CSR_PH_RET_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_DIVMODE +// Description : 0x0 -> Free-running counting at rate dictated by fractional +// divider +// 0x1 -> Fractional divider operation is gated by the PWM B pin. +// 0x2 -> Counter advances with each rising edge of the PWM B pin. +// 0x3 -> Counter advances with each falling edge of the PWM B +// pin. +#define PWM_CH7_CSR_DIVMODE_RESET 0x0 +#define PWM_CH7_CSR_DIVMODE_BITS 0x00000030 +#define PWM_CH7_CSR_DIVMODE_MSB 5 +#define PWM_CH7_CSR_DIVMODE_LSB 4 +#define PWM_CH7_CSR_DIVMODE_ACCESS "RW" +#define PWM_CH7_CSR_DIVMODE_VALUE_DIV 0x0 +#define PWM_CH7_CSR_DIVMODE_VALUE_LEVEL 0x1 +#define PWM_CH7_CSR_DIVMODE_VALUE_RISE 0x2 +#define PWM_CH7_CSR_DIVMODE_VALUE_FALL 0x3 +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_B_INV +// Description : Invert output B +#define PWM_CH7_CSR_B_INV_RESET 0x0 +#define PWM_CH7_CSR_B_INV_BITS 0x00000008 +#define PWM_CH7_CSR_B_INV_MSB 3 +#define PWM_CH7_CSR_B_INV_LSB 3 +#define PWM_CH7_CSR_B_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_A_INV +// Description : Invert output A +#define PWM_CH7_CSR_A_INV_RESET 0x0 +#define PWM_CH7_CSR_A_INV_BITS 0x00000004 +#define PWM_CH7_CSR_A_INV_MSB 2 +#define PWM_CH7_CSR_A_INV_LSB 2 +#define PWM_CH7_CSR_A_INV_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_PH_CORRECT +// Description : 1: Enable phase-correct modulation. 0: Trailing-edge +#define PWM_CH7_CSR_PH_CORRECT_RESET 0x0 +#define PWM_CH7_CSR_PH_CORRECT_BITS 0x00000002 +#define PWM_CH7_CSR_PH_CORRECT_MSB 1 +#define PWM_CH7_CSR_PH_CORRECT_LSB 1 +#define PWM_CH7_CSR_PH_CORRECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CSR_EN +// Description : Enable the PWM channel. +#define PWM_CH7_CSR_EN_RESET 0x0 +#define PWM_CH7_CSR_EN_BITS 0x00000001 +#define PWM_CH7_CSR_EN_MSB 0 +#define PWM_CH7_CSR_EN_LSB 0 +#define PWM_CH7_CSR_EN_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH7_DIV +// Description : INT and FRAC form a fixed-point fractional number. +// Counting rate is system clock frequency divided by this number. +// Fractional division uses simple 1st-order sigma-delta. +#define PWM_CH7_DIV_OFFSET 0x00000090 +#define PWM_CH7_DIV_BITS 0x00000fff +#define PWM_CH7_DIV_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_DIV_INT +// Description : None +#define PWM_CH7_DIV_INT_RESET 0x01 +#define PWM_CH7_DIV_INT_BITS 0x00000ff0 +#define PWM_CH7_DIV_INT_MSB 11 +#define PWM_CH7_DIV_INT_LSB 4 +#define PWM_CH7_DIV_INT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_DIV_FRAC +// Description : None +#define PWM_CH7_DIV_FRAC_RESET 0x0 +#define PWM_CH7_DIV_FRAC_BITS 0x0000000f +#define PWM_CH7_DIV_FRAC_MSB 3 +#define PWM_CH7_DIV_FRAC_LSB 0 +#define PWM_CH7_DIV_FRAC_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH7_CTR +// Description : Direct access to the PWM counter +#define PWM_CH7_CTR_OFFSET 0x00000094 +#define PWM_CH7_CTR_BITS 0x0000ffff +#define PWM_CH7_CTR_RESET 0x00000000 +#define PWM_CH7_CTR_MSB 15 +#define PWM_CH7_CTR_LSB 0 +#define PWM_CH7_CTR_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH7_CC +// Description : Counter compare values +#define PWM_CH7_CC_OFFSET 0x00000098 +#define PWM_CH7_CC_BITS 0xffffffff +#define PWM_CH7_CC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CC_B +// Description : None +#define PWM_CH7_CC_B_RESET 0x0000 +#define PWM_CH7_CC_B_BITS 0xffff0000 +#define PWM_CH7_CC_B_MSB 31 +#define PWM_CH7_CC_B_LSB 16 +#define PWM_CH7_CC_B_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_CH7_CC_A +// Description : None +#define PWM_CH7_CC_A_RESET 0x0000 +#define PWM_CH7_CC_A_BITS 0x0000ffff +#define PWM_CH7_CC_A_MSB 15 +#define PWM_CH7_CC_A_LSB 0 +#define PWM_CH7_CC_A_ACCESS "RW" +// ============================================================================= +// Register : PWM_CH7_TOP +// Description : Counter wrap value +#define PWM_CH7_TOP_OFFSET 0x0000009c +#define PWM_CH7_TOP_BITS 0x0000ffff +#define PWM_CH7_TOP_RESET 0x0000ffff +#define PWM_CH7_TOP_MSB 15 +#define PWM_CH7_TOP_LSB 0 +#define PWM_CH7_TOP_ACCESS "RW" +// ============================================================================= +// Register : PWM_EN +// Description : This register aliases the CSR_EN bits for all channels. +// Writing to this register allows multiple channels to be enabled +// or disabled simultaneously, so they can run in perfect sync. +// For each channel, there is only one physical EN register bit, +// which can be accessed through here or CHx_CSR. +#define PWM_EN_OFFSET 0x000000a0 +#define PWM_EN_BITS 0x000000ff +#define PWM_EN_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH7 +// Description : None +#define PWM_EN_CH7_RESET 0x0 +#define PWM_EN_CH7_BITS 0x00000080 +#define PWM_EN_CH7_MSB 7 +#define PWM_EN_CH7_LSB 7 +#define PWM_EN_CH7_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH6 +// Description : None +#define PWM_EN_CH6_RESET 0x0 +#define PWM_EN_CH6_BITS 0x00000040 +#define PWM_EN_CH6_MSB 6 +#define PWM_EN_CH6_LSB 6 +#define PWM_EN_CH6_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH5 +// Description : None +#define PWM_EN_CH5_RESET 0x0 +#define PWM_EN_CH5_BITS 0x00000020 +#define PWM_EN_CH5_MSB 5 +#define PWM_EN_CH5_LSB 5 +#define PWM_EN_CH5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH4 +// Description : None +#define PWM_EN_CH4_RESET 0x0 +#define PWM_EN_CH4_BITS 0x00000010 +#define PWM_EN_CH4_MSB 4 +#define PWM_EN_CH4_LSB 4 +#define PWM_EN_CH4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH3 +// Description : None +#define PWM_EN_CH3_RESET 0x0 +#define PWM_EN_CH3_BITS 0x00000008 +#define PWM_EN_CH3_MSB 3 +#define PWM_EN_CH3_LSB 3 +#define PWM_EN_CH3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH2 +// Description : None +#define PWM_EN_CH2_RESET 0x0 +#define PWM_EN_CH2_BITS 0x00000004 +#define PWM_EN_CH2_MSB 2 +#define PWM_EN_CH2_LSB 2 +#define PWM_EN_CH2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH1 +// Description : None +#define PWM_EN_CH1_RESET 0x0 +#define PWM_EN_CH1_BITS 0x00000002 +#define PWM_EN_CH1_MSB 1 +#define PWM_EN_CH1_LSB 1 +#define PWM_EN_CH1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_EN_CH0 +// Description : None +#define PWM_EN_CH0_RESET 0x0 +#define PWM_EN_CH0_BITS 0x00000001 +#define PWM_EN_CH0_MSB 0 +#define PWM_EN_CH0_LSB 0 +#define PWM_EN_CH0_ACCESS "RW" +// ============================================================================= +// Register : PWM_INTR +// Description : Raw Interrupts +#define PWM_INTR_OFFSET 0x000000a4 +#define PWM_INTR_BITS 0x000000ff +#define PWM_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH7 +// Description : None +#define PWM_INTR_CH7_RESET 0x0 +#define PWM_INTR_CH7_BITS 0x00000080 +#define PWM_INTR_CH7_MSB 7 +#define PWM_INTR_CH7_LSB 7 +#define PWM_INTR_CH7_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH6 +// Description : None +#define PWM_INTR_CH6_RESET 0x0 +#define PWM_INTR_CH6_BITS 0x00000040 +#define PWM_INTR_CH6_MSB 6 +#define PWM_INTR_CH6_LSB 6 +#define PWM_INTR_CH6_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH5 +// Description : None +#define PWM_INTR_CH5_RESET 0x0 +#define PWM_INTR_CH5_BITS 0x00000020 +#define PWM_INTR_CH5_MSB 5 +#define PWM_INTR_CH5_LSB 5 +#define PWM_INTR_CH5_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH4 +// Description : None +#define PWM_INTR_CH4_RESET 0x0 +#define PWM_INTR_CH4_BITS 0x00000010 +#define PWM_INTR_CH4_MSB 4 +#define PWM_INTR_CH4_LSB 4 +#define PWM_INTR_CH4_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH3 +// Description : None +#define PWM_INTR_CH3_RESET 0x0 +#define PWM_INTR_CH3_BITS 0x00000008 +#define PWM_INTR_CH3_MSB 3 +#define PWM_INTR_CH3_LSB 3 +#define PWM_INTR_CH3_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH2 +// Description : None +#define PWM_INTR_CH2_RESET 0x0 +#define PWM_INTR_CH2_BITS 0x00000004 +#define PWM_INTR_CH2_MSB 2 +#define PWM_INTR_CH2_LSB 2 +#define PWM_INTR_CH2_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH1 +// Description : None +#define PWM_INTR_CH1_RESET 0x0 +#define PWM_INTR_CH1_BITS 0x00000002 +#define PWM_INTR_CH1_MSB 1 +#define PWM_INTR_CH1_LSB 1 +#define PWM_INTR_CH1_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : PWM_INTR_CH0 +// Description : None +#define PWM_INTR_CH0_RESET 0x0 +#define PWM_INTR_CH0_BITS 0x00000001 +#define PWM_INTR_CH0_MSB 0 +#define PWM_INTR_CH0_LSB 0 +#define PWM_INTR_CH0_ACCESS "WC" +// ============================================================================= +// Register : PWM_INTE +// Description : Interrupt Enable +#define PWM_INTE_OFFSET 0x000000a8 +#define PWM_INTE_BITS 0x000000ff +#define PWM_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH7 +// Description : None +#define PWM_INTE_CH7_RESET 0x0 +#define PWM_INTE_CH7_BITS 0x00000080 +#define PWM_INTE_CH7_MSB 7 +#define PWM_INTE_CH7_LSB 7 +#define PWM_INTE_CH7_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH6 +// Description : None +#define PWM_INTE_CH6_RESET 0x0 +#define PWM_INTE_CH6_BITS 0x00000040 +#define PWM_INTE_CH6_MSB 6 +#define PWM_INTE_CH6_LSB 6 +#define PWM_INTE_CH6_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH5 +// Description : None +#define PWM_INTE_CH5_RESET 0x0 +#define PWM_INTE_CH5_BITS 0x00000020 +#define PWM_INTE_CH5_MSB 5 +#define PWM_INTE_CH5_LSB 5 +#define PWM_INTE_CH5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH4 +// Description : None +#define PWM_INTE_CH4_RESET 0x0 +#define PWM_INTE_CH4_BITS 0x00000010 +#define PWM_INTE_CH4_MSB 4 +#define PWM_INTE_CH4_LSB 4 +#define PWM_INTE_CH4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH3 +// Description : None +#define PWM_INTE_CH3_RESET 0x0 +#define PWM_INTE_CH3_BITS 0x00000008 +#define PWM_INTE_CH3_MSB 3 +#define PWM_INTE_CH3_LSB 3 +#define PWM_INTE_CH3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH2 +// Description : None +#define PWM_INTE_CH2_RESET 0x0 +#define PWM_INTE_CH2_BITS 0x00000004 +#define PWM_INTE_CH2_MSB 2 +#define PWM_INTE_CH2_LSB 2 +#define PWM_INTE_CH2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH1 +// Description : None +#define PWM_INTE_CH1_RESET 0x0 +#define PWM_INTE_CH1_BITS 0x00000002 +#define PWM_INTE_CH1_MSB 1 +#define PWM_INTE_CH1_LSB 1 +#define PWM_INTE_CH1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTE_CH0 +// Description : None +#define PWM_INTE_CH0_RESET 0x0 +#define PWM_INTE_CH0_BITS 0x00000001 +#define PWM_INTE_CH0_MSB 0 +#define PWM_INTE_CH0_LSB 0 +#define PWM_INTE_CH0_ACCESS "RW" +// ============================================================================= +// Register : PWM_INTF +// Description : Interrupt Force +#define PWM_INTF_OFFSET 0x000000ac +#define PWM_INTF_BITS 0x000000ff +#define PWM_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH7 +// Description : None +#define PWM_INTF_CH7_RESET 0x0 +#define PWM_INTF_CH7_BITS 0x00000080 +#define PWM_INTF_CH7_MSB 7 +#define PWM_INTF_CH7_LSB 7 +#define PWM_INTF_CH7_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH6 +// Description : None +#define PWM_INTF_CH6_RESET 0x0 +#define PWM_INTF_CH6_BITS 0x00000040 +#define PWM_INTF_CH6_MSB 6 +#define PWM_INTF_CH6_LSB 6 +#define PWM_INTF_CH6_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH5 +// Description : None +#define PWM_INTF_CH5_RESET 0x0 +#define PWM_INTF_CH5_BITS 0x00000020 +#define PWM_INTF_CH5_MSB 5 +#define PWM_INTF_CH5_LSB 5 +#define PWM_INTF_CH5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH4 +// Description : None +#define PWM_INTF_CH4_RESET 0x0 +#define PWM_INTF_CH4_BITS 0x00000010 +#define PWM_INTF_CH4_MSB 4 +#define PWM_INTF_CH4_LSB 4 +#define PWM_INTF_CH4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH3 +// Description : None +#define PWM_INTF_CH3_RESET 0x0 +#define PWM_INTF_CH3_BITS 0x00000008 +#define PWM_INTF_CH3_MSB 3 +#define PWM_INTF_CH3_LSB 3 +#define PWM_INTF_CH3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH2 +// Description : None +#define PWM_INTF_CH2_RESET 0x0 +#define PWM_INTF_CH2_BITS 0x00000004 +#define PWM_INTF_CH2_MSB 2 +#define PWM_INTF_CH2_LSB 2 +#define PWM_INTF_CH2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH1 +// Description : None +#define PWM_INTF_CH1_RESET 0x0 +#define PWM_INTF_CH1_BITS 0x00000002 +#define PWM_INTF_CH1_MSB 1 +#define PWM_INTF_CH1_LSB 1 +#define PWM_INTF_CH1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : PWM_INTF_CH0 +// Description : None +#define PWM_INTF_CH0_RESET 0x0 +#define PWM_INTF_CH0_BITS 0x00000001 +#define PWM_INTF_CH0_MSB 0 +#define PWM_INTF_CH0_LSB 0 +#define PWM_INTF_CH0_ACCESS "RW" +// ============================================================================= +// Register : PWM_INTS +// Description : Interrupt status after masking & forcing +#define PWM_INTS_OFFSET 0x000000b0 +#define PWM_INTS_BITS 0x000000ff +#define PWM_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH7 +// Description : None +#define PWM_INTS_CH7_RESET 0x0 +#define PWM_INTS_CH7_BITS 0x00000080 +#define PWM_INTS_CH7_MSB 7 +#define PWM_INTS_CH7_LSB 7 +#define PWM_INTS_CH7_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH6 +// Description : None +#define PWM_INTS_CH6_RESET 0x0 +#define PWM_INTS_CH6_BITS 0x00000040 +#define PWM_INTS_CH6_MSB 6 +#define PWM_INTS_CH6_LSB 6 +#define PWM_INTS_CH6_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH5 +// Description : None +#define PWM_INTS_CH5_RESET 0x0 +#define PWM_INTS_CH5_BITS 0x00000020 +#define PWM_INTS_CH5_MSB 5 +#define PWM_INTS_CH5_LSB 5 +#define PWM_INTS_CH5_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH4 +// Description : None +#define PWM_INTS_CH4_RESET 0x0 +#define PWM_INTS_CH4_BITS 0x00000010 +#define PWM_INTS_CH4_MSB 4 +#define PWM_INTS_CH4_LSB 4 +#define PWM_INTS_CH4_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH3 +// Description : None +#define PWM_INTS_CH3_RESET 0x0 +#define PWM_INTS_CH3_BITS 0x00000008 +#define PWM_INTS_CH3_MSB 3 +#define PWM_INTS_CH3_LSB 3 +#define PWM_INTS_CH3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH2 +// Description : None +#define PWM_INTS_CH2_RESET 0x0 +#define PWM_INTS_CH2_BITS 0x00000004 +#define PWM_INTS_CH2_MSB 2 +#define PWM_INTS_CH2_LSB 2 +#define PWM_INTS_CH2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH1 +// Description : None +#define PWM_INTS_CH1_RESET 0x0 +#define PWM_INTS_CH1_BITS 0x00000002 +#define PWM_INTS_CH1_MSB 1 +#define PWM_INTS_CH1_LSB 1 +#define PWM_INTS_CH1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : PWM_INTS_CH0 +// Description : None +#define PWM_INTS_CH0_RESET 0x0 +#define PWM_INTS_CH0_BITS 0x00000001 +#define PWM_INTS_CH0_MSB 0 +#define PWM_INTS_CH0_LSB 0 +#define PWM_INTS_CH0_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_PWM_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/resets.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/resets.h new file mode 100644 index 0000000000..b512350376 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/resets.h @@ -0,0 +1,637 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : RESETS +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_RESETS_DEFINED +#define HARDWARE_REGS_RESETS_DEFINED +// ============================================================================= +// Register : RESETS_RESET +// Description : Reset control. If a bit is set it means the peripheral is in +// reset. 0 means the peripheral's reset is deasserted. +#define RESETS_RESET_OFFSET 0x00000000 +#define RESETS_RESET_BITS 0x01ffffff +#define RESETS_RESET_RESET 0x01ffffff +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_USBCTRL +// Description : None +#define RESETS_RESET_USBCTRL_RESET 0x1 +#define RESETS_RESET_USBCTRL_BITS 0x01000000 +#define RESETS_RESET_USBCTRL_MSB 24 +#define RESETS_RESET_USBCTRL_LSB 24 +#define RESETS_RESET_USBCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_UART1 +// Description : None +#define RESETS_RESET_UART1_RESET 0x1 +#define RESETS_RESET_UART1_BITS 0x00800000 +#define RESETS_RESET_UART1_MSB 23 +#define RESETS_RESET_UART1_LSB 23 +#define RESETS_RESET_UART1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_UART0 +// Description : None +#define RESETS_RESET_UART0_RESET 0x1 +#define RESETS_RESET_UART0_BITS 0x00400000 +#define RESETS_RESET_UART0_MSB 22 +#define RESETS_RESET_UART0_LSB 22 +#define RESETS_RESET_UART0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_TIMER +// Description : None +#define RESETS_RESET_TIMER_RESET 0x1 +#define RESETS_RESET_TIMER_BITS 0x00200000 +#define RESETS_RESET_TIMER_MSB 21 +#define RESETS_RESET_TIMER_LSB 21 +#define RESETS_RESET_TIMER_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_TBMAN +// Description : None +#define RESETS_RESET_TBMAN_RESET 0x1 +#define RESETS_RESET_TBMAN_BITS 0x00100000 +#define RESETS_RESET_TBMAN_MSB 20 +#define RESETS_RESET_TBMAN_LSB 20 +#define RESETS_RESET_TBMAN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_SYSINFO +// Description : None +#define RESETS_RESET_SYSINFO_RESET 0x1 +#define RESETS_RESET_SYSINFO_BITS 0x00080000 +#define RESETS_RESET_SYSINFO_MSB 19 +#define RESETS_RESET_SYSINFO_LSB 19 +#define RESETS_RESET_SYSINFO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_SYSCFG +// Description : None +#define RESETS_RESET_SYSCFG_RESET 0x1 +#define RESETS_RESET_SYSCFG_BITS 0x00040000 +#define RESETS_RESET_SYSCFG_MSB 18 +#define RESETS_RESET_SYSCFG_LSB 18 +#define RESETS_RESET_SYSCFG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_SPI1 +// Description : None +#define RESETS_RESET_SPI1_RESET 0x1 +#define RESETS_RESET_SPI1_BITS 0x00020000 +#define RESETS_RESET_SPI1_MSB 17 +#define RESETS_RESET_SPI1_LSB 17 +#define RESETS_RESET_SPI1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_SPI0 +// Description : None +#define RESETS_RESET_SPI0_RESET 0x1 +#define RESETS_RESET_SPI0_BITS 0x00010000 +#define RESETS_RESET_SPI0_MSB 16 +#define RESETS_RESET_SPI0_LSB 16 +#define RESETS_RESET_SPI0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_RTC +// Description : None +#define RESETS_RESET_RTC_RESET 0x1 +#define RESETS_RESET_RTC_BITS 0x00008000 +#define RESETS_RESET_RTC_MSB 15 +#define RESETS_RESET_RTC_LSB 15 +#define RESETS_RESET_RTC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PWM +// Description : None +#define RESETS_RESET_PWM_RESET 0x1 +#define RESETS_RESET_PWM_BITS 0x00004000 +#define RESETS_RESET_PWM_MSB 14 +#define RESETS_RESET_PWM_LSB 14 +#define RESETS_RESET_PWM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PLL_USB +// Description : None +#define RESETS_RESET_PLL_USB_RESET 0x1 +#define RESETS_RESET_PLL_USB_BITS 0x00002000 +#define RESETS_RESET_PLL_USB_MSB 13 +#define RESETS_RESET_PLL_USB_LSB 13 +#define RESETS_RESET_PLL_USB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PLL_SYS +// Description : None +#define RESETS_RESET_PLL_SYS_RESET 0x1 +#define RESETS_RESET_PLL_SYS_BITS 0x00001000 +#define RESETS_RESET_PLL_SYS_MSB 12 +#define RESETS_RESET_PLL_SYS_LSB 12 +#define RESETS_RESET_PLL_SYS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PIO1 +// Description : None +#define RESETS_RESET_PIO1_RESET 0x1 +#define RESETS_RESET_PIO1_BITS 0x00000800 +#define RESETS_RESET_PIO1_MSB 11 +#define RESETS_RESET_PIO1_LSB 11 +#define RESETS_RESET_PIO1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PIO0 +// Description : None +#define RESETS_RESET_PIO0_RESET 0x1 +#define RESETS_RESET_PIO0_BITS 0x00000400 +#define RESETS_RESET_PIO0_MSB 10 +#define RESETS_RESET_PIO0_LSB 10 +#define RESETS_RESET_PIO0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PADS_QSPI +// Description : None +#define RESETS_RESET_PADS_QSPI_RESET 0x1 +#define RESETS_RESET_PADS_QSPI_BITS 0x00000200 +#define RESETS_RESET_PADS_QSPI_MSB 9 +#define RESETS_RESET_PADS_QSPI_LSB 9 +#define RESETS_RESET_PADS_QSPI_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_PADS_BANK0 +// Description : None +#define RESETS_RESET_PADS_BANK0_RESET 0x1 +#define RESETS_RESET_PADS_BANK0_BITS 0x00000100 +#define RESETS_RESET_PADS_BANK0_MSB 8 +#define RESETS_RESET_PADS_BANK0_LSB 8 +#define RESETS_RESET_PADS_BANK0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_JTAG +// Description : None +#define RESETS_RESET_JTAG_RESET 0x1 +#define RESETS_RESET_JTAG_BITS 0x00000080 +#define RESETS_RESET_JTAG_MSB 7 +#define RESETS_RESET_JTAG_LSB 7 +#define RESETS_RESET_JTAG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_IO_QSPI +// Description : None +#define RESETS_RESET_IO_QSPI_RESET 0x1 +#define RESETS_RESET_IO_QSPI_BITS 0x00000040 +#define RESETS_RESET_IO_QSPI_MSB 6 +#define RESETS_RESET_IO_QSPI_LSB 6 +#define RESETS_RESET_IO_QSPI_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_IO_BANK0 +// Description : None +#define RESETS_RESET_IO_BANK0_RESET 0x1 +#define RESETS_RESET_IO_BANK0_BITS 0x00000020 +#define RESETS_RESET_IO_BANK0_MSB 5 +#define RESETS_RESET_IO_BANK0_LSB 5 +#define RESETS_RESET_IO_BANK0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_I2C1 +// Description : None +#define RESETS_RESET_I2C1_RESET 0x1 +#define RESETS_RESET_I2C1_BITS 0x00000010 +#define RESETS_RESET_I2C1_MSB 4 +#define RESETS_RESET_I2C1_LSB 4 +#define RESETS_RESET_I2C1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_I2C0 +// Description : None +#define RESETS_RESET_I2C0_RESET 0x1 +#define RESETS_RESET_I2C0_BITS 0x00000008 +#define RESETS_RESET_I2C0_MSB 3 +#define RESETS_RESET_I2C0_LSB 3 +#define RESETS_RESET_I2C0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DMA +// Description : None +#define RESETS_RESET_DMA_RESET 0x1 +#define RESETS_RESET_DMA_BITS 0x00000004 +#define RESETS_RESET_DMA_MSB 2 +#define RESETS_RESET_DMA_LSB 2 +#define RESETS_RESET_DMA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_BUSCTRL +// Description : None +#define RESETS_RESET_BUSCTRL_RESET 0x1 +#define RESETS_RESET_BUSCTRL_BITS 0x00000002 +#define RESETS_RESET_BUSCTRL_MSB 1 +#define RESETS_RESET_BUSCTRL_LSB 1 +#define RESETS_RESET_BUSCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_ADC +// Description : None +#define RESETS_RESET_ADC_RESET 0x1 +#define RESETS_RESET_ADC_BITS 0x00000001 +#define RESETS_RESET_ADC_MSB 0 +#define RESETS_RESET_ADC_LSB 0 +#define RESETS_RESET_ADC_ACCESS "RW" +// ============================================================================= +// Register : RESETS_WDSEL +// Description : Watchdog select. If a bit is set then the watchdog will reset +// this peripheral when the watchdog fires. +#define RESETS_WDSEL_OFFSET 0x00000004 +#define RESETS_WDSEL_BITS 0x01ffffff +#define RESETS_WDSEL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_USBCTRL +// Description : None +#define RESETS_WDSEL_USBCTRL_RESET 0x0 +#define RESETS_WDSEL_USBCTRL_BITS 0x01000000 +#define RESETS_WDSEL_USBCTRL_MSB 24 +#define RESETS_WDSEL_USBCTRL_LSB 24 +#define RESETS_WDSEL_USBCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_UART1 +// Description : None +#define RESETS_WDSEL_UART1_RESET 0x0 +#define RESETS_WDSEL_UART1_BITS 0x00800000 +#define RESETS_WDSEL_UART1_MSB 23 +#define RESETS_WDSEL_UART1_LSB 23 +#define RESETS_WDSEL_UART1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_UART0 +// Description : None +#define RESETS_WDSEL_UART0_RESET 0x0 +#define RESETS_WDSEL_UART0_BITS 0x00400000 +#define RESETS_WDSEL_UART0_MSB 22 +#define RESETS_WDSEL_UART0_LSB 22 +#define RESETS_WDSEL_UART0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_TIMER +// Description : None +#define RESETS_WDSEL_TIMER_RESET 0x0 +#define RESETS_WDSEL_TIMER_BITS 0x00200000 +#define RESETS_WDSEL_TIMER_MSB 21 +#define RESETS_WDSEL_TIMER_LSB 21 +#define RESETS_WDSEL_TIMER_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_TBMAN +// Description : None +#define RESETS_WDSEL_TBMAN_RESET 0x0 +#define RESETS_WDSEL_TBMAN_BITS 0x00100000 +#define RESETS_WDSEL_TBMAN_MSB 20 +#define RESETS_WDSEL_TBMAN_LSB 20 +#define RESETS_WDSEL_TBMAN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_SYSINFO +// Description : None +#define RESETS_WDSEL_SYSINFO_RESET 0x0 +#define RESETS_WDSEL_SYSINFO_BITS 0x00080000 +#define RESETS_WDSEL_SYSINFO_MSB 19 +#define RESETS_WDSEL_SYSINFO_LSB 19 +#define RESETS_WDSEL_SYSINFO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_SYSCFG +// Description : None +#define RESETS_WDSEL_SYSCFG_RESET 0x0 +#define RESETS_WDSEL_SYSCFG_BITS 0x00040000 +#define RESETS_WDSEL_SYSCFG_MSB 18 +#define RESETS_WDSEL_SYSCFG_LSB 18 +#define RESETS_WDSEL_SYSCFG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_SPI1 +// Description : None +#define RESETS_WDSEL_SPI1_RESET 0x0 +#define RESETS_WDSEL_SPI1_BITS 0x00020000 +#define RESETS_WDSEL_SPI1_MSB 17 +#define RESETS_WDSEL_SPI1_LSB 17 +#define RESETS_WDSEL_SPI1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_SPI0 +// Description : None +#define RESETS_WDSEL_SPI0_RESET 0x0 +#define RESETS_WDSEL_SPI0_BITS 0x00010000 +#define RESETS_WDSEL_SPI0_MSB 16 +#define RESETS_WDSEL_SPI0_LSB 16 +#define RESETS_WDSEL_SPI0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_RTC +// Description : None +#define RESETS_WDSEL_RTC_RESET 0x0 +#define RESETS_WDSEL_RTC_BITS 0x00008000 +#define RESETS_WDSEL_RTC_MSB 15 +#define RESETS_WDSEL_RTC_LSB 15 +#define RESETS_WDSEL_RTC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PWM +// Description : None +#define RESETS_WDSEL_PWM_RESET 0x0 +#define RESETS_WDSEL_PWM_BITS 0x00004000 +#define RESETS_WDSEL_PWM_MSB 14 +#define RESETS_WDSEL_PWM_LSB 14 +#define RESETS_WDSEL_PWM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PLL_USB +// Description : None +#define RESETS_WDSEL_PLL_USB_RESET 0x0 +#define RESETS_WDSEL_PLL_USB_BITS 0x00002000 +#define RESETS_WDSEL_PLL_USB_MSB 13 +#define RESETS_WDSEL_PLL_USB_LSB 13 +#define RESETS_WDSEL_PLL_USB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PLL_SYS +// Description : None +#define RESETS_WDSEL_PLL_SYS_RESET 0x0 +#define RESETS_WDSEL_PLL_SYS_BITS 0x00001000 +#define RESETS_WDSEL_PLL_SYS_MSB 12 +#define RESETS_WDSEL_PLL_SYS_LSB 12 +#define RESETS_WDSEL_PLL_SYS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PIO1 +// Description : None +#define RESETS_WDSEL_PIO1_RESET 0x0 +#define RESETS_WDSEL_PIO1_BITS 0x00000800 +#define RESETS_WDSEL_PIO1_MSB 11 +#define RESETS_WDSEL_PIO1_LSB 11 +#define RESETS_WDSEL_PIO1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PIO0 +// Description : None +#define RESETS_WDSEL_PIO0_RESET 0x0 +#define RESETS_WDSEL_PIO0_BITS 0x00000400 +#define RESETS_WDSEL_PIO0_MSB 10 +#define RESETS_WDSEL_PIO0_LSB 10 +#define RESETS_WDSEL_PIO0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PADS_QSPI +// Description : None +#define RESETS_WDSEL_PADS_QSPI_RESET 0x0 +#define RESETS_WDSEL_PADS_QSPI_BITS 0x00000200 +#define RESETS_WDSEL_PADS_QSPI_MSB 9 +#define RESETS_WDSEL_PADS_QSPI_LSB 9 +#define RESETS_WDSEL_PADS_QSPI_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_PADS_BANK0 +// Description : None +#define RESETS_WDSEL_PADS_BANK0_RESET 0x0 +#define RESETS_WDSEL_PADS_BANK0_BITS 0x00000100 +#define RESETS_WDSEL_PADS_BANK0_MSB 8 +#define RESETS_WDSEL_PADS_BANK0_LSB 8 +#define RESETS_WDSEL_PADS_BANK0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_JTAG +// Description : None +#define RESETS_WDSEL_JTAG_RESET 0x0 +#define RESETS_WDSEL_JTAG_BITS 0x00000080 +#define RESETS_WDSEL_JTAG_MSB 7 +#define RESETS_WDSEL_JTAG_LSB 7 +#define RESETS_WDSEL_JTAG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_IO_QSPI +// Description : None +#define RESETS_WDSEL_IO_QSPI_RESET 0x0 +#define RESETS_WDSEL_IO_QSPI_BITS 0x00000040 +#define RESETS_WDSEL_IO_QSPI_MSB 6 +#define RESETS_WDSEL_IO_QSPI_LSB 6 +#define RESETS_WDSEL_IO_QSPI_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_IO_BANK0 +// Description : None +#define RESETS_WDSEL_IO_BANK0_RESET 0x0 +#define RESETS_WDSEL_IO_BANK0_BITS 0x00000020 +#define RESETS_WDSEL_IO_BANK0_MSB 5 +#define RESETS_WDSEL_IO_BANK0_LSB 5 +#define RESETS_WDSEL_IO_BANK0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_I2C1 +// Description : None +#define RESETS_WDSEL_I2C1_RESET 0x0 +#define RESETS_WDSEL_I2C1_BITS 0x00000010 +#define RESETS_WDSEL_I2C1_MSB 4 +#define RESETS_WDSEL_I2C1_LSB 4 +#define RESETS_WDSEL_I2C1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_I2C0 +// Description : None +#define RESETS_WDSEL_I2C0_RESET 0x0 +#define RESETS_WDSEL_I2C0_BITS 0x00000008 +#define RESETS_WDSEL_I2C0_MSB 3 +#define RESETS_WDSEL_I2C0_LSB 3 +#define RESETS_WDSEL_I2C0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_DMA +// Description : None +#define RESETS_WDSEL_DMA_RESET 0x0 +#define RESETS_WDSEL_DMA_BITS 0x00000004 +#define RESETS_WDSEL_DMA_MSB 2 +#define RESETS_WDSEL_DMA_LSB 2 +#define RESETS_WDSEL_DMA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_BUSCTRL +// Description : None +#define RESETS_WDSEL_BUSCTRL_RESET 0x0 +#define RESETS_WDSEL_BUSCTRL_BITS 0x00000002 +#define RESETS_WDSEL_BUSCTRL_MSB 1 +#define RESETS_WDSEL_BUSCTRL_LSB 1 +#define RESETS_WDSEL_BUSCTRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RESETS_WDSEL_ADC +// Description : None +#define RESETS_WDSEL_ADC_RESET 0x0 +#define RESETS_WDSEL_ADC_BITS 0x00000001 +#define RESETS_WDSEL_ADC_MSB 0 +#define RESETS_WDSEL_ADC_LSB 0 +#define RESETS_WDSEL_ADC_ACCESS "RW" +// ============================================================================= +// Register : RESETS_RESET_DONE +// Description : Reset done. If a bit is set then a reset done signal has been +// returned by the peripheral. This indicates that the +// peripheral's registers are ready to be accessed. +#define RESETS_RESET_DONE_OFFSET 0x00000008 +#define RESETS_RESET_DONE_BITS 0x01ffffff +#define RESETS_RESET_DONE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_USBCTRL +// Description : None +#define RESETS_RESET_DONE_USBCTRL_RESET 0x0 +#define RESETS_RESET_DONE_USBCTRL_BITS 0x01000000 +#define RESETS_RESET_DONE_USBCTRL_MSB 24 +#define RESETS_RESET_DONE_USBCTRL_LSB 24 +#define RESETS_RESET_DONE_USBCTRL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_UART1 +// Description : None +#define RESETS_RESET_DONE_UART1_RESET 0x0 +#define RESETS_RESET_DONE_UART1_BITS 0x00800000 +#define RESETS_RESET_DONE_UART1_MSB 23 +#define RESETS_RESET_DONE_UART1_LSB 23 +#define RESETS_RESET_DONE_UART1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_UART0 +// Description : None +#define RESETS_RESET_DONE_UART0_RESET 0x0 +#define RESETS_RESET_DONE_UART0_BITS 0x00400000 +#define RESETS_RESET_DONE_UART0_MSB 22 +#define RESETS_RESET_DONE_UART0_LSB 22 +#define RESETS_RESET_DONE_UART0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_TIMER +// Description : None +#define RESETS_RESET_DONE_TIMER_RESET 0x0 +#define RESETS_RESET_DONE_TIMER_BITS 0x00200000 +#define RESETS_RESET_DONE_TIMER_MSB 21 +#define RESETS_RESET_DONE_TIMER_LSB 21 +#define RESETS_RESET_DONE_TIMER_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_TBMAN +// Description : None +#define RESETS_RESET_DONE_TBMAN_RESET 0x0 +#define RESETS_RESET_DONE_TBMAN_BITS 0x00100000 +#define RESETS_RESET_DONE_TBMAN_MSB 20 +#define RESETS_RESET_DONE_TBMAN_LSB 20 +#define RESETS_RESET_DONE_TBMAN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_SYSINFO +// Description : None +#define RESETS_RESET_DONE_SYSINFO_RESET 0x0 +#define RESETS_RESET_DONE_SYSINFO_BITS 0x00080000 +#define RESETS_RESET_DONE_SYSINFO_MSB 19 +#define RESETS_RESET_DONE_SYSINFO_LSB 19 +#define RESETS_RESET_DONE_SYSINFO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_SYSCFG +// Description : None +#define RESETS_RESET_DONE_SYSCFG_RESET 0x0 +#define RESETS_RESET_DONE_SYSCFG_BITS 0x00040000 +#define RESETS_RESET_DONE_SYSCFG_MSB 18 +#define RESETS_RESET_DONE_SYSCFG_LSB 18 +#define RESETS_RESET_DONE_SYSCFG_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_SPI1 +// Description : None +#define RESETS_RESET_DONE_SPI1_RESET 0x0 +#define RESETS_RESET_DONE_SPI1_BITS 0x00020000 +#define RESETS_RESET_DONE_SPI1_MSB 17 +#define RESETS_RESET_DONE_SPI1_LSB 17 +#define RESETS_RESET_DONE_SPI1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_SPI0 +// Description : None +#define RESETS_RESET_DONE_SPI0_RESET 0x0 +#define RESETS_RESET_DONE_SPI0_BITS 0x00010000 +#define RESETS_RESET_DONE_SPI0_MSB 16 +#define RESETS_RESET_DONE_SPI0_LSB 16 +#define RESETS_RESET_DONE_SPI0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_RTC +// Description : None +#define RESETS_RESET_DONE_RTC_RESET 0x0 +#define RESETS_RESET_DONE_RTC_BITS 0x00008000 +#define RESETS_RESET_DONE_RTC_MSB 15 +#define RESETS_RESET_DONE_RTC_LSB 15 +#define RESETS_RESET_DONE_RTC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PWM +// Description : None +#define RESETS_RESET_DONE_PWM_RESET 0x0 +#define RESETS_RESET_DONE_PWM_BITS 0x00004000 +#define RESETS_RESET_DONE_PWM_MSB 14 +#define RESETS_RESET_DONE_PWM_LSB 14 +#define RESETS_RESET_DONE_PWM_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PLL_USB +// Description : None +#define RESETS_RESET_DONE_PLL_USB_RESET 0x0 +#define RESETS_RESET_DONE_PLL_USB_BITS 0x00002000 +#define RESETS_RESET_DONE_PLL_USB_MSB 13 +#define RESETS_RESET_DONE_PLL_USB_LSB 13 +#define RESETS_RESET_DONE_PLL_USB_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PLL_SYS +// Description : None +#define RESETS_RESET_DONE_PLL_SYS_RESET 0x0 +#define RESETS_RESET_DONE_PLL_SYS_BITS 0x00001000 +#define RESETS_RESET_DONE_PLL_SYS_MSB 12 +#define RESETS_RESET_DONE_PLL_SYS_LSB 12 +#define RESETS_RESET_DONE_PLL_SYS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PIO1 +// Description : None +#define RESETS_RESET_DONE_PIO1_RESET 0x0 +#define RESETS_RESET_DONE_PIO1_BITS 0x00000800 +#define RESETS_RESET_DONE_PIO1_MSB 11 +#define RESETS_RESET_DONE_PIO1_LSB 11 +#define RESETS_RESET_DONE_PIO1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PIO0 +// Description : None +#define RESETS_RESET_DONE_PIO0_RESET 0x0 +#define RESETS_RESET_DONE_PIO0_BITS 0x00000400 +#define RESETS_RESET_DONE_PIO0_MSB 10 +#define RESETS_RESET_DONE_PIO0_LSB 10 +#define RESETS_RESET_DONE_PIO0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PADS_QSPI +// Description : None +#define RESETS_RESET_DONE_PADS_QSPI_RESET 0x0 +#define RESETS_RESET_DONE_PADS_QSPI_BITS 0x00000200 +#define RESETS_RESET_DONE_PADS_QSPI_MSB 9 +#define RESETS_RESET_DONE_PADS_QSPI_LSB 9 +#define RESETS_RESET_DONE_PADS_QSPI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_PADS_BANK0 +// Description : None +#define RESETS_RESET_DONE_PADS_BANK0_RESET 0x0 +#define RESETS_RESET_DONE_PADS_BANK0_BITS 0x00000100 +#define RESETS_RESET_DONE_PADS_BANK0_MSB 8 +#define RESETS_RESET_DONE_PADS_BANK0_LSB 8 +#define RESETS_RESET_DONE_PADS_BANK0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_JTAG +// Description : None +#define RESETS_RESET_DONE_JTAG_RESET 0x0 +#define RESETS_RESET_DONE_JTAG_BITS 0x00000080 +#define RESETS_RESET_DONE_JTAG_MSB 7 +#define RESETS_RESET_DONE_JTAG_LSB 7 +#define RESETS_RESET_DONE_JTAG_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_IO_QSPI +// Description : None +#define RESETS_RESET_DONE_IO_QSPI_RESET 0x0 +#define RESETS_RESET_DONE_IO_QSPI_BITS 0x00000040 +#define RESETS_RESET_DONE_IO_QSPI_MSB 6 +#define RESETS_RESET_DONE_IO_QSPI_LSB 6 +#define RESETS_RESET_DONE_IO_QSPI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_IO_BANK0 +// Description : None +#define RESETS_RESET_DONE_IO_BANK0_RESET 0x0 +#define RESETS_RESET_DONE_IO_BANK0_BITS 0x00000020 +#define RESETS_RESET_DONE_IO_BANK0_MSB 5 +#define RESETS_RESET_DONE_IO_BANK0_LSB 5 +#define RESETS_RESET_DONE_IO_BANK0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_I2C1 +// Description : None +#define RESETS_RESET_DONE_I2C1_RESET 0x0 +#define RESETS_RESET_DONE_I2C1_BITS 0x00000010 +#define RESETS_RESET_DONE_I2C1_MSB 4 +#define RESETS_RESET_DONE_I2C1_LSB 4 +#define RESETS_RESET_DONE_I2C1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_I2C0 +// Description : None +#define RESETS_RESET_DONE_I2C0_RESET 0x0 +#define RESETS_RESET_DONE_I2C0_BITS 0x00000008 +#define RESETS_RESET_DONE_I2C0_MSB 3 +#define RESETS_RESET_DONE_I2C0_LSB 3 +#define RESETS_RESET_DONE_I2C0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_DMA +// Description : None +#define RESETS_RESET_DONE_DMA_RESET 0x0 +#define RESETS_RESET_DONE_DMA_BITS 0x00000004 +#define RESETS_RESET_DONE_DMA_MSB 2 +#define RESETS_RESET_DONE_DMA_LSB 2 +#define RESETS_RESET_DONE_DMA_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_BUSCTRL +// Description : None +#define RESETS_RESET_DONE_BUSCTRL_RESET 0x0 +#define RESETS_RESET_DONE_BUSCTRL_BITS 0x00000002 +#define RESETS_RESET_DONE_BUSCTRL_MSB 1 +#define RESETS_RESET_DONE_BUSCTRL_LSB 1 +#define RESETS_RESET_DONE_BUSCTRL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RESETS_RESET_DONE_ADC +// Description : None +#define RESETS_RESET_DONE_ADC_RESET 0x0 +#define RESETS_RESET_DONE_ADC_BITS 0x00000001 +#define RESETS_RESET_DONE_ADC_MSB 0 +#define RESETS_RESET_DONE_ADC_LSB 0 +#define RESETS_RESET_DONE_ADC_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_RESETS_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rosc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rosc.h new file mode 100644 index 0000000000..1f9e8ccc5e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rosc.h @@ -0,0 +1,312 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : ROSC +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_ROSC_DEFINED +#define HARDWARE_REGS_ROSC_DEFINED +// ============================================================================= +// Register : ROSC_CTRL +// Description : Ring Oscillator control +#define ROSC_CTRL_OFFSET 0x00000000 +#define ROSC_CTRL_BITS 0x00ffffff +#define ROSC_CTRL_RESET 0x00000aa0 +// ----------------------------------------------------------------------------- +// Field : ROSC_CTRL_ENABLE +// Description : On power-up this field is initialised to ENABLE +// The system clock must be switched to another source before +// setting this field to DISABLE otherwise the chip will lock up +// The 12-bit code is intended to give some protection against +// accidental writes. An invalid setting will enable the +// oscillator. +// 0xd1e -> DISABLE +// 0xfab -> ENABLE +#define ROSC_CTRL_ENABLE_RESET "-" +#define ROSC_CTRL_ENABLE_BITS 0x00fff000 +#define ROSC_CTRL_ENABLE_MSB 23 +#define ROSC_CTRL_ENABLE_LSB 12 +#define ROSC_CTRL_ENABLE_ACCESS "RW" +#define ROSC_CTRL_ENABLE_VALUE_DISABLE 0xd1e +#define ROSC_CTRL_ENABLE_VALUE_ENABLE 0xfab +// ----------------------------------------------------------------------------- +// Field : ROSC_CTRL_FREQ_RANGE +// Description : Controls the number of delay stages in the ROSC ring +// LOW uses stages 0 to 7 +// MEDIUM uses stages 0 to 5 +// HIGH uses stages 0 to 3 +// TOOHIGH uses stages 0 to 1 and should not be used because its +// frequency exceeds design specifications +// The clock output will not glitch when changing the range up one +// step at a time +// The clock output will glitch when changing the range down +// Note: the values here are gray coded which is why HIGH comes +// before TOOHIGH +// 0xfa4 -> LOW +// 0xfa5 -> MEDIUM +// 0xfa7 -> HIGH +// 0xfa6 -> TOOHIGH +#define ROSC_CTRL_FREQ_RANGE_RESET 0xaa0 +#define ROSC_CTRL_FREQ_RANGE_BITS 0x00000fff +#define ROSC_CTRL_FREQ_RANGE_MSB 11 +#define ROSC_CTRL_FREQ_RANGE_LSB 0 +#define ROSC_CTRL_FREQ_RANGE_ACCESS "RW" +#define ROSC_CTRL_FREQ_RANGE_VALUE_LOW 0xfa4 +#define ROSC_CTRL_FREQ_RANGE_VALUE_MEDIUM 0xfa5 +#define ROSC_CTRL_FREQ_RANGE_VALUE_HIGH 0xfa7 +#define ROSC_CTRL_FREQ_RANGE_VALUE_TOOHIGH 0xfa6 +// ============================================================================= +// Register : ROSC_FREQA +// Description : The FREQA & FREQB registers control the frequency by +// controlling the drive strength of each stage +// The drive strength has 4 levels determined by the number of +// bits set +// Increasing the number of bits set increases the drive strength +// and increases the oscillation frequency +// 0 bits set is the default drive strength +// 1 bit set doubles the drive strength +// 2 bits set triples drive strength +// 3 bits set quadruples drive strength +#define ROSC_FREQA_OFFSET 0x00000004 +#define ROSC_FREQA_BITS 0xffff7777 +#define ROSC_FREQA_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQA_PASSWD +// Description : Set to 0x9696 to apply the settings +// Any other value in this field will set all drive strengths to 0 +// 0x9696 -> PASS +#define ROSC_FREQA_PASSWD_RESET 0x0000 +#define ROSC_FREQA_PASSWD_BITS 0xffff0000 +#define ROSC_FREQA_PASSWD_MSB 31 +#define ROSC_FREQA_PASSWD_LSB 16 +#define ROSC_FREQA_PASSWD_ACCESS "RW" +#define ROSC_FREQA_PASSWD_VALUE_PASS 0x9696 +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQA_DS3 +// Description : Stage 3 drive strength +#define ROSC_FREQA_DS3_RESET 0x0 +#define ROSC_FREQA_DS3_BITS 0x00007000 +#define ROSC_FREQA_DS3_MSB 14 +#define ROSC_FREQA_DS3_LSB 12 +#define ROSC_FREQA_DS3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQA_DS2 +// Description : Stage 2 drive strength +#define ROSC_FREQA_DS2_RESET 0x0 +#define ROSC_FREQA_DS2_BITS 0x00000700 +#define ROSC_FREQA_DS2_MSB 10 +#define ROSC_FREQA_DS2_LSB 8 +#define ROSC_FREQA_DS2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQA_DS1 +// Description : Stage 1 drive strength +#define ROSC_FREQA_DS1_RESET 0x0 +#define ROSC_FREQA_DS1_BITS 0x00000070 +#define ROSC_FREQA_DS1_MSB 6 +#define ROSC_FREQA_DS1_LSB 4 +#define ROSC_FREQA_DS1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQA_DS0 +// Description : Stage 0 drive strength +#define ROSC_FREQA_DS0_RESET 0x0 +#define ROSC_FREQA_DS0_BITS 0x00000007 +#define ROSC_FREQA_DS0_MSB 2 +#define ROSC_FREQA_DS0_LSB 0 +#define ROSC_FREQA_DS0_ACCESS "RW" +// ============================================================================= +// Register : ROSC_FREQB +// Description : For a detailed description see freqa register +#define ROSC_FREQB_OFFSET 0x00000008 +#define ROSC_FREQB_BITS 0xffff7777 +#define ROSC_FREQB_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQB_PASSWD +// Description : Set to 0x9696 to apply the settings +// Any other value in this field will set all drive strengths to 0 +// 0x9696 -> PASS +#define ROSC_FREQB_PASSWD_RESET 0x0000 +#define ROSC_FREQB_PASSWD_BITS 0xffff0000 +#define ROSC_FREQB_PASSWD_MSB 31 +#define ROSC_FREQB_PASSWD_LSB 16 +#define ROSC_FREQB_PASSWD_ACCESS "RW" +#define ROSC_FREQB_PASSWD_VALUE_PASS 0x9696 +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQB_DS7 +// Description : Stage 7 drive strength +#define ROSC_FREQB_DS7_RESET 0x0 +#define ROSC_FREQB_DS7_BITS 0x00007000 +#define ROSC_FREQB_DS7_MSB 14 +#define ROSC_FREQB_DS7_LSB 12 +#define ROSC_FREQB_DS7_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQB_DS6 +// Description : Stage 6 drive strength +#define ROSC_FREQB_DS6_RESET 0x0 +#define ROSC_FREQB_DS6_BITS 0x00000700 +#define ROSC_FREQB_DS6_MSB 10 +#define ROSC_FREQB_DS6_LSB 8 +#define ROSC_FREQB_DS6_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQB_DS5 +// Description : Stage 5 drive strength +#define ROSC_FREQB_DS5_RESET 0x0 +#define ROSC_FREQB_DS5_BITS 0x00000070 +#define ROSC_FREQB_DS5_MSB 6 +#define ROSC_FREQB_DS5_LSB 4 +#define ROSC_FREQB_DS5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_FREQB_DS4 +// Description : Stage 4 drive strength +#define ROSC_FREQB_DS4_RESET 0x0 +#define ROSC_FREQB_DS4_BITS 0x00000007 +#define ROSC_FREQB_DS4_MSB 2 +#define ROSC_FREQB_DS4_LSB 0 +#define ROSC_FREQB_DS4_ACCESS "RW" +// ============================================================================= +// Register : ROSC_DORMANT +// Description : Ring Oscillator pause control +// This is used to save power by pausing the ROSC +// On power-up this field is initialised to WAKE +// An invalid write will also select WAKE +// Warning: setup the irq before selecting dormant mode +// 0x636f6d61 -> DORMANT +// 0x77616b65 -> WAKE +#define ROSC_DORMANT_OFFSET 0x0000000c +#define ROSC_DORMANT_BITS 0xffffffff +#define ROSC_DORMANT_RESET "-" +#define ROSC_DORMANT_MSB 31 +#define ROSC_DORMANT_LSB 0 +#define ROSC_DORMANT_ACCESS "RW" +#define ROSC_DORMANT_VALUE_DORMANT 0x636f6d61 +#define ROSC_DORMANT_VALUE_WAKE 0x77616b65 +// ============================================================================= +// Register : ROSC_DIV +// Description : Controls the output divider +// set to 0xaa0 + div where +// div = 0 divides by 32 +// div = 1-31 divides by div +// any other value sets div=0 and therefore divides by 32 +// this register resets to div=16 +// 0xaa0 -> PASS +#define ROSC_DIV_OFFSET 0x00000010 +#define ROSC_DIV_BITS 0x00000fff +#define ROSC_DIV_RESET "-" +#define ROSC_DIV_MSB 11 +#define ROSC_DIV_LSB 0 +#define ROSC_DIV_ACCESS "RW" +#define ROSC_DIV_VALUE_PASS 0xaa0 +// ============================================================================= +// Register : ROSC_PHASE +// Description : Controls the phase shifted output +#define ROSC_PHASE_OFFSET 0x00000014 +#define ROSC_PHASE_BITS 0x00000fff +#define ROSC_PHASE_RESET 0x00000008 +// ----------------------------------------------------------------------------- +// Field : ROSC_PHASE_PASSWD +// Description : set to 0xaa0 +// any other value enables the output with shift=0 +#define ROSC_PHASE_PASSWD_RESET 0x00 +#define ROSC_PHASE_PASSWD_BITS 0x00000ff0 +#define ROSC_PHASE_PASSWD_MSB 11 +#define ROSC_PHASE_PASSWD_LSB 4 +#define ROSC_PHASE_PASSWD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_PHASE_ENABLE +// Description : enable the phase-shifted output +// this can be changed on-the-fly +#define ROSC_PHASE_ENABLE_RESET 0x1 +#define ROSC_PHASE_ENABLE_BITS 0x00000008 +#define ROSC_PHASE_ENABLE_MSB 3 +#define ROSC_PHASE_ENABLE_LSB 3 +#define ROSC_PHASE_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_PHASE_FLIP +// Description : invert the phase-shifted output +// this is ignored when div=1 +#define ROSC_PHASE_FLIP_RESET 0x0 +#define ROSC_PHASE_FLIP_BITS 0x00000004 +#define ROSC_PHASE_FLIP_MSB 2 +#define ROSC_PHASE_FLIP_LSB 2 +#define ROSC_PHASE_FLIP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : ROSC_PHASE_SHIFT +// Description : phase shift the phase-shifted output by SHIFT input clocks +// this can be changed on-the-fly +// must be set to 0 before setting div=1 +#define ROSC_PHASE_SHIFT_RESET 0x0 +#define ROSC_PHASE_SHIFT_BITS 0x00000003 +#define ROSC_PHASE_SHIFT_MSB 1 +#define ROSC_PHASE_SHIFT_LSB 0 +#define ROSC_PHASE_SHIFT_ACCESS "RW" +// ============================================================================= +// Register : ROSC_STATUS +// Description : Ring Oscillator Status +#define ROSC_STATUS_OFFSET 0x00000018 +#define ROSC_STATUS_BITS 0x81011000 +#define ROSC_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : ROSC_STATUS_STABLE +// Description : Oscillator is running and stable +#define ROSC_STATUS_STABLE_RESET 0x0 +#define ROSC_STATUS_STABLE_BITS 0x80000000 +#define ROSC_STATUS_STABLE_MSB 31 +#define ROSC_STATUS_STABLE_LSB 31 +#define ROSC_STATUS_STABLE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ROSC_STATUS_BADWRITE +// Description : An invalid value has been written to CTRL_ENABLE or +// CTRL_FREQ_RANGE or FRFEQA or FREQB or DORMANT +#define ROSC_STATUS_BADWRITE_RESET 0x0 +#define ROSC_STATUS_BADWRITE_BITS 0x01000000 +#define ROSC_STATUS_BADWRITE_MSB 24 +#define ROSC_STATUS_BADWRITE_LSB 24 +#define ROSC_STATUS_BADWRITE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : ROSC_STATUS_DIV_RUNNING +// Description : post-divider is running +// this resets to 0 but transitions to 1 during chip startup +#define ROSC_STATUS_DIV_RUNNING_RESET "-" +#define ROSC_STATUS_DIV_RUNNING_BITS 0x00010000 +#define ROSC_STATUS_DIV_RUNNING_MSB 16 +#define ROSC_STATUS_DIV_RUNNING_LSB 16 +#define ROSC_STATUS_DIV_RUNNING_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : ROSC_STATUS_ENABLED +// Description : Oscillator is enabled but not necessarily running and stable +// this resets to 0 but transitions to 1 during chip startup +#define ROSC_STATUS_ENABLED_RESET "-" +#define ROSC_STATUS_ENABLED_BITS 0x00001000 +#define ROSC_STATUS_ENABLED_MSB 12 +#define ROSC_STATUS_ENABLED_LSB 12 +#define ROSC_STATUS_ENABLED_ACCESS "RO" +// ============================================================================= +// Register : ROSC_RANDOMBIT +// Description : This just reads the state of the oscillator output so +// randomness is compromised if the ring oscillator is stopped or +// run at a harmonic of the bus frequency +#define ROSC_RANDOMBIT_OFFSET 0x0000001c +#define ROSC_RANDOMBIT_BITS 0x00000001 +#define ROSC_RANDOMBIT_RESET 0x00000001 +#define ROSC_RANDOMBIT_MSB 0 +#define ROSC_RANDOMBIT_LSB 0 +#define ROSC_RANDOMBIT_ACCESS "RO" +// ============================================================================= +// Register : ROSC_COUNT +// Description : A down counter running at the ROSC frequency which counts to +// zero and stops. +// To start the counter write a non-zero value. +// Can be used for short software pauses when setting up time +// sensitive hardware. +#define ROSC_COUNT_OFFSET 0x00000020 +#define ROSC_COUNT_BITS 0x000000ff +#define ROSC_COUNT_RESET 0x00000000 +#define ROSC_COUNT_MSB 7 +#define ROSC_COUNT_LSB 0 +#define ROSC_COUNT_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_ROSC_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rtc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rtc.h new file mode 100644 index 0000000000..1287d9023b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/rtc.h @@ -0,0 +1,398 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : RTC +// Version : 1 +// Bus type : apb +// Description : Register block to control RTC +// ============================================================================= +#ifndef HARDWARE_REGS_RTC_DEFINED +#define HARDWARE_REGS_RTC_DEFINED +// ============================================================================= +// Register : RTC_CLKDIV_M1 +// Description : Divider minus 1 for the 1 second counter. Safe to change the +// value when RTC is not enabled. +#define RTC_CLKDIV_M1_OFFSET 0x00000000 +#define RTC_CLKDIV_M1_BITS 0x0000ffff +#define RTC_CLKDIV_M1_RESET 0x00000000 +#define RTC_CLKDIV_M1_MSB 15 +#define RTC_CLKDIV_M1_LSB 0 +#define RTC_CLKDIV_M1_ACCESS "RW" +// ============================================================================= +// Register : RTC_SETUP_0 +// Description : RTC setup register 0 +#define RTC_SETUP_0_OFFSET 0x00000004 +#define RTC_SETUP_0_BITS 0x00ffff1f +#define RTC_SETUP_0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_0_YEAR +// Description : Year +#define RTC_SETUP_0_YEAR_RESET 0x000 +#define RTC_SETUP_0_YEAR_BITS 0x00fff000 +#define RTC_SETUP_0_YEAR_MSB 23 +#define RTC_SETUP_0_YEAR_LSB 12 +#define RTC_SETUP_0_YEAR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_0_MONTH +// Description : Month (1..12) +#define RTC_SETUP_0_MONTH_RESET 0x0 +#define RTC_SETUP_0_MONTH_BITS 0x00000f00 +#define RTC_SETUP_0_MONTH_MSB 11 +#define RTC_SETUP_0_MONTH_LSB 8 +#define RTC_SETUP_0_MONTH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_0_DAY +// Description : Day of the month (1..31) +#define RTC_SETUP_0_DAY_RESET 0x00 +#define RTC_SETUP_0_DAY_BITS 0x0000001f +#define RTC_SETUP_0_DAY_MSB 4 +#define RTC_SETUP_0_DAY_LSB 0 +#define RTC_SETUP_0_DAY_ACCESS "RW" +// ============================================================================= +// Register : RTC_SETUP_1 +// Description : RTC setup register 1 +#define RTC_SETUP_1_OFFSET 0x00000008 +#define RTC_SETUP_1_BITS 0x071f3f3f +#define RTC_SETUP_1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_1_DOTW +// Description : Day of the week: 1-Monday...0-Sunday ISO 8601 mod 7 +#define RTC_SETUP_1_DOTW_RESET 0x0 +#define RTC_SETUP_1_DOTW_BITS 0x07000000 +#define RTC_SETUP_1_DOTW_MSB 26 +#define RTC_SETUP_1_DOTW_LSB 24 +#define RTC_SETUP_1_DOTW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_1_HOUR +// Description : Hours +#define RTC_SETUP_1_HOUR_RESET 0x00 +#define RTC_SETUP_1_HOUR_BITS 0x001f0000 +#define RTC_SETUP_1_HOUR_MSB 20 +#define RTC_SETUP_1_HOUR_LSB 16 +#define RTC_SETUP_1_HOUR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_1_MIN +// Description : Minutes +#define RTC_SETUP_1_MIN_RESET 0x00 +#define RTC_SETUP_1_MIN_BITS 0x00003f00 +#define RTC_SETUP_1_MIN_MSB 13 +#define RTC_SETUP_1_MIN_LSB 8 +#define RTC_SETUP_1_MIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_SETUP_1_SEC +// Description : Seconds +#define RTC_SETUP_1_SEC_RESET 0x00 +#define RTC_SETUP_1_SEC_BITS 0x0000003f +#define RTC_SETUP_1_SEC_MSB 5 +#define RTC_SETUP_1_SEC_LSB 0 +#define RTC_SETUP_1_SEC_ACCESS "RW" +// ============================================================================= +// Register : RTC_CTRL +// Description : RTC Control and status +#define RTC_CTRL_OFFSET 0x0000000c +#define RTC_CTRL_BITS 0x00000113 +#define RTC_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_CTRL_FORCE_NOTLEAPYEAR +// Description : If set, leapyear is forced off. +// Useful for years divisible by 100 but not by 400 +#define RTC_CTRL_FORCE_NOTLEAPYEAR_RESET 0x0 +#define RTC_CTRL_FORCE_NOTLEAPYEAR_BITS 0x00000100 +#define RTC_CTRL_FORCE_NOTLEAPYEAR_MSB 8 +#define RTC_CTRL_FORCE_NOTLEAPYEAR_LSB 8 +#define RTC_CTRL_FORCE_NOTLEAPYEAR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_CTRL_LOAD +// Description : Load RTC +#define RTC_CTRL_LOAD_RESET 0x0 +#define RTC_CTRL_LOAD_BITS 0x00000010 +#define RTC_CTRL_LOAD_MSB 4 +#define RTC_CTRL_LOAD_LSB 4 +#define RTC_CTRL_LOAD_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : RTC_CTRL_RTC_ACTIVE +// Description : RTC enabled (running) +#define RTC_CTRL_RTC_ACTIVE_RESET "-" +#define RTC_CTRL_RTC_ACTIVE_BITS 0x00000002 +#define RTC_CTRL_RTC_ACTIVE_MSB 1 +#define RTC_CTRL_RTC_ACTIVE_LSB 1 +#define RTC_CTRL_RTC_ACTIVE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RTC_CTRL_RTC_ENABLE +// Description : Enable RTC +#define RTC_CTRL_RTC_ENABLE_RESET 0x0 +#define RTC_CTRL_RTC_ENABLE_BITS 0x00000001 +#define RTC_CTRL_RTC_ENABLE_MSB 0 +#define RTC_CTRL_RTC_ENABLE_LSB 0 +#define RTC_CTRL_RTC_ENABLE_ACCESS "RW" +// ============================================================================= +// Register : RTC_IRQ_SETUP_0 +// Description : Interrupt setup register 0 +#define RTC_IRQ_SETUP_0_OFFSET 0x00000010 +#define RTC_IRQ_SETUP_0_BITS 0x37ffff1f +#define RTC_IRQ_SETUP_0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_MATCH_ACTIVE +// Description : None +#define RTC_IRQ_SETUP_0_MATCH_ACTIVE_RESET "-" +#define RTC_IRQ_SETUP_0_MATCH_ACTIVE_BITS 0x20000000 +#define RTC_IRQ_SETUP_0_MATCH_ACTIVE_MSB 29 +#define RTC_IRQ_SETUP_0_MATCH_ACTIVE_LSB 29 +#define RTC_IRQ_SETUP_0_MATCH_ACTIVE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_MATCH_ENA +// Description : Global match enable. Don't change any other value while this +// one is enabled +#define RTC_IRQ_SETUP_0_MATCH_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_0_MATCH_ENA_BITS 0x10000000 +#define RTC_IRQ_SETUP_0_MATCH_ENA_MSB 28 +#define RTC_IRQ_SETUP_0_MATCH_ENA_LSB 28 +#define RTC_IRQ_SETUP_0_MATCH_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_YEAR_ENA +// Description : Enable year matching +#define RTC_IRQ_SETUP_0_YEAR_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_0_YEAR_ENA_BITS 0x04000000 +#define RTC_IRQ_SETUP_0_YEAR_ENA_MSB 26 +#define RTC_IRQ_SETUP_0_YEAR_ENA_LSB 26 +#define RTC_IRQ_SETUP_0_YEAR_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_MONTH_ENA +// Description : Enable month matching +#define RTC_IRQ_SETUP_0_MONTH_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_0_MONTH_ENA_BITS 0x02000000 +#define RTC_IRQ_SETUP_0_MONTH_ENA_MSB 25 +#define RTC_IRQ_SETUP_0_MONTH_ENA_LSB 25 +#define RTC_IRQ_SETUP_0_MONTH_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_DAY_ENA +// Description : Enable day matching +#define RTC_IRQ_SETUP_0_DAY_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_0_DAY_ENA_BITS 0x01000000 +#define RTC_IRQ_SETUP_0_DAY_ENA_MSB 24 +#define RTC_IRQ_SETUP_0_DAY_ENA_LSB 24 +#define RTC_IRQ_SETUP_0_DAY_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_YEAR +// Description : Year +#define RTC_IRQ_SETUP_0_YEAR_RESET 0x000 +#define RTC_IRQ_SETUP_0_YEAR_BITS 0x00fff000 +#define RTC_IRQ_SETUP_0_YEAR_MSB 23 +#define RTC_IRQ_SETUP_0_YEAR_LSB 12 +#define RTC_IRQ_SETUP_0_YEAR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_MONTH +// Description : Month (1..12) +#define RTC_IRQ_SETUP_0_MONTH_RESET 0x0 +#define RTC_IRQ_SETUP_0_MONTH_BITS 0x00000f00 +#define RTC_IRQ_SETUP_0_MONTH_MSB 11 +#define RTC_IRQ_SETUP_0_MONTH_LSB 8 +#define RTC_IRQ_SETUP_0_MONTH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_0_DAY +// Description : Day of the month (1..31) +#define RTC_IRQ_SETUP_0_DAY_RESET 0x00 +#define RTC_IRQ_SETUP_0_DAY_BITS 0x0000001f +#define RTC_IRQ_SETUP_0_DAY_MSB 4 +#define RTC_IRQ_SETUP_0_DAY_LSB 0 +#define RTC_IRQ_SETUP_0_DAY_ACCESS "RW" +// ============================================================================= +// Register : RTC_IRQ_SETUP_1 +// Description : Interrupt setup register 1 +#define RTC_IRQ_SETUP_1_OFFSET 0x00000014 +#define RTC_IRQ_SETUP_1_BITS 0xf71f3f3f +#define RTC_IRQ_SETUP_1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_DOTW_ENA +// Description : Enable day of the week matching +#define RTC_IRQ_SETUP_1_DOTW_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_1_DOTW_ENA_BITS 0x80000000 +#define RTC_IRQ_SETUP_1_DOTW_ENA_MSB 31 +#define RTC_IRQ_SETUP_1_DOTW_ENA_LSB 31 +#define RTC_IRQ_SETUP_1_DOTW_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_HOUR_ENA +// Description : Enable hour matching +#define RTC_IRQ_SETUP_1_HOUR_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_1_HOUR_ENA_BITS 0x40000000 +#define RTC_IRQ_SETUP_1_HOUR_ENA_MSB 30 +#define RTC_IRQ_SETUP_1_HOUR_ENA_LSB 30 +#define RTC_IRQ_SETUP_1_HOUR_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_MIN_ENA +// Description : Enable minute matching +#define RTC_IRQ_SETUP_1_MIN_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_1_MIN_ENA_BITS 0x20000000 +#define RTC_IRQ_SETUP_1_MIN_ENA_MSB 29 +#define RTC_IRQ_SETUP_1_MIN_ENA_LSB 29 +#define RTC_IRQ_SETUP_1_MIN_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_SEC_ENA +// Description : Enable second matching +#define RTC_IRQ_SETUP_1_SEC_ENA_RESET 0x0 +#define RTC_IRQ_SETUP_1_SEC_ENA_BITS 0x10000000 +#define RTC_IRQ_SETUP_1_SEC_ENA_MSB 28 +#define RTC_IRQ_SETUP_1_SEC_ENA_LSB 28 +#define RTC_IRQ_SETUP_1_SEC_ENA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_DOTW +// Description : Day of the week +#define RTC_IRQ_SETUP_1_DOTW_RESET 0x0 +#define RTC_IRQ_SETUP_1_DOTW_BITS 0x07000000 +#define RTC_IRQ_SETUP_1_DOTW_MSB 26 +#define RTC_IRQ_SETUP_1_DOTW_LSB 24 +#define RTC_IRQ_SETUP_1_DOTW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_HOUR +// Description : Hours +#define RTC_IRQ_SETUP_1_HOUR_RESET 0x00 +#define RTC_IRQ_SETUP_1_HOUR_BITS 0x001f0000 +#define RTC_IRQ_SETUP_1_HOUR_MSB 20 +#define RTC_IRQ_SETUP_1_HOUR_LSB 16 +#define RTC_IRQ_SETUP_1_HOUR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_MIN +// Description : Minutes +#define RTC_IRQ_SETUP_1_MIN_RESET 0x00 +#define RTC_IRQ_SETUP_1_MIN_BITS 0x00003f00 +#define RTC_IRQ_SETUP_1_MIN_MSB 13 +#define RTC_IRQ_SETUP_1_MIN_LSB 8 +#define RTC_IRQ_SETUP_1_MIN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : RTC_IRQ_SETUP_1_SEC +// Description : Seconds +#define RTC_IRQ_SETUP_1_SEC_RESET 0x00 +#define RTC_IRQ_SETUP_1_SEC_BITS 0x0000003f +#define RTC_IRQ_SETUP_1_SEC_MSB 5 +#define RTC_IRQ_SETUP_1_SEC_LSB 0 +#define RTC_IRQ_SETUP_1_SEC_ACCESS "RW" +// ============================================================================= +// Register : RTC_RTC_1 +// Description : RTC register 1. +#define RTC_RTC_1_OFFSET 0x00000018 +#define RTC_RTC_1_BITS 0x00ffff1f +#define RTC_RTC_1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_1_YEAR +// Description : Year +#define RTC_RTC_1_YEAR_RESET "-" +#define RTC_RTC_1_YEAR_BITS 0x00fff000 +#define RTC_RTC_1_YEAR_MSB 23 +#define RTC_RTC_1_YEAR_LSB 12 +#define RTC_RTC_1_YEAR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_1_MONTH +// Description : Month (1..12) +#define RTC_RTC_1_MONTH_RESET "-" +#define RTC_RTC_1_MONTH_BITS 0x00000f00 +#define RTC_RTC_1_MONTH_MSB 11 +#define RTC_RTC_1_MONTH_LSB 8 +#define RTC_RTC_1_MONTH_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_1_DAY +// Description : Day of the month (1..31) +#define RTC_RTC_1_DAY_RESET "-" +#define RTC_RTC_1_DAY_BITS 0x0000001f +#define RTC_RTC_1_DAY_MSB 4 +#define RTC_RTC_1_DAY_LSB 0 +#define RTC_RTC_1_DAY_ACCESS "RO" +// ============================================================================= +// Register : RTC_RTC_0 +// Description : RTC register 0 +// Read this before RTC 1! +#define RTC_RTC_0_OFFSET 0x0000001c +#define RTC_RTC_0_BITS 0x071f3f3f +#define RTC_RTC_0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_0_DOTW +// Description : Day of the week +#define RTC_RTC_0_DOTW_RESET "-" +#define RTC_RTC_0_DOTW_BITS 0x07000000 +#define RTC_RTC_0_DOTW_MSB 26 +#define RTC_RTC_0_DOTW_LSB 24 +#define RTC_RTC_0_DOTW_ACCESS "RF" +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_0_HOUR +// Description : Hours +#define RTC_RTC_0_HOUR_RESET "-" +#define RTC_RTC_0_HOUR_BITS 0x001f0000 +#define RTC_RTC_0_HOUR_MSB 20 +#define RTC_RTC_0_HOUR_LSB 16 +#define RTC_RTC_0_HOUR_ACCESS "RF" +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_0_MIN +// Description : Minutes +#define RTC_RTC_0_MIN_RESET "-" +#define RTC_RTC_0_MIN_BITS 0x00003f00 +#define RTC_RTC_0_MIN_MSB 13 +#define RTC_RTC_0_MIN_LSB 8 +#define RTC_RTC_0_MIN_ACCESS "RF" +// ----------------------------------------------------------------------------- +// Field : RTC_RTC_0_SEC +// Description : Seconds +#define RTC_RTC_0_SEC_RESET "-" +#define RTC_RTC_0_SEC_BITS 0x0000003f +#define RTC_RTC_0_SEC_MSB 5 +#define RTC_RTC_0_SEC_LSB 0 +#define RTC_RTC_0_SEC_ACCESS "RF" +// ============================================================================= +// Register : RTC_INTR +// Description : Raw Interrupts +#define RTC_INTR_OFFSET 0x00000020 +#define RTC_INTR_BITS 0x00000001 +#define RTC_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_INTR_RTC +// Description : None +#define RTC_INTR_RTC_RESET 0x0 +#define RTC_INTR_RTC_BITS 0x00000001 +#define RTC_INTR_RTC_MSB 0 +#define RTC_INTR_RTC_LSB 0 +#define RTC_INTR_RTC_ACCESS "RO" +// ============================================================================= +// Register : RTC_INTE +// Description : Interrupt Enable +#define RTC_INTE_OFFSET 0x00000024 +#define RTC_INTE_BITS 0x00000001 +#define RTC_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_INTE_RTC +// Description : None +#define RTC_INTE_RTC_RESET 0x0 +#define RTC_INTE_RTC_BITS 0x00000001 +#define RTC_INTE_RTC_MSB 0 +#define RTC_INTE_RTC_LSB 0 +#define RTC_INTE_RTC_ACCESS "RW" +// ============================================================================= +// Register : RTC_INTF +// Description : Interrupt Force +#define RTC_INTF_OFFSET 0x00000028 +#define RTC_INTF_BITS 0x00000001 +#define RTC_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_INTF_RTC +// Description : None +#define RTC_INTF_RTC_RESET 0x0 +#define RTC_INTF_RTC_BITS 0x00000001 +#define RTC_INTF_RTC_MSB 0 +#define RTC_INTF_RTC_LSB 0 +#define RTC_INTF_RTC_ACCESS "RW" +// ============================================================================= +// Register : RTC_INTS +// Description : Interrupt status after masking & forcing +#define RTC_INTS_OFFSET 0x0000002c +#define RTC_INTS_BITS 0x00000001 +#define RTC_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : RTC_INTS_RTC +// Description : None +#define RTC_INTS_RTC_RESET 0x0 +#define RTC_INTS_RTC_BITS 0x00000001 +#define RTC_INTS_RTC_MSB 0 +#define RTC_INTS_RTC_LSB 0 +#define RTC_INTS_RTC_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_RTC_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sio.h new file mode 100644 index 0000000000..4480d76f08 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sio.h @@ -0,0 +1,1656 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : SIO +// Version : 1 +// Bus type : apb +// Description : Single-cycle IO block +// Provides core-local and inter-core hardware for the two +// processors, with single-cycle access. +// ============================================================================= +#ifndef HARDWARE_REGS_SIO_DEFINED +#define HARDWARE_REGS_SIO_DEFINED +// ============================================================================= +// Register : SIO_CPUID +// Description : Processor core identifier +// Value is 0 when read from processor core 0, and 1 when read +// from processor core 1. +#define SIO_CPUID_OFFSET 0x00000000 +#define SIO_CPUID_BITS 0xffffffff +#define SIO_CPUID_RESET "-" +#define SIO_CPUID_MSB 31 +#define SIO_CPUID_LSB 0 +#define SIO_CPUID_ACCESS "RO" +// ============================================================================= +// Register : SIO_GPIO_IN +// Description : Input value for GPIO pins +// Input value for GPIO0...29 +#define SIO_GPIO_IN_OFFSET 0x00000004 +#define SIO_GPIO_IN_BITS 0x3fffffff +#define SIO_GPIO_IN_RESET 0x00000000 +#define SIO_GPIO_IN_MSB 29 +#define SIO_GPIO_IN_LSB 0 +#define SIO_GPIO_IN_ACCESS "RO" +// ============================================================================= +// Register : SIO_GPIO_HI_IN +// Description : Input value for QSPI pins +// Input value on QSPI IO in order 0..5: SCLK, SSn, SD0, SD1, SD2, +// SD3 +#define SIO_GPIO_HI_IN_OFFSET 0x00000008 +#define SIO_GPIO_HI_IN_BITS 0x0000003f +#define SIO_GPIO_HI_IN_RESET 0x00000000 +#define SIO_GPIO_HI_IN_MSB 5 +#define SIO_GPIO_HI_IN_LSB 0 +#define SIO_GPIO_HI_IN_ACCESS "RO" +// ============================================================================= +// Register : SIO_GPIO_OUT +// Description : GPIO output value +// Set output level (1/0 -> high/low) for GPIO0...29. +// Reading back gives the last value written, NOT the input value +// from the pins. +// If core 0 and core 1 both write to GPIO_OUT simultaneously (or +// to a SET/CLR/XOR alias), +// the result is as though the write from core 0 took place first, +// and the write from core 1 was then applied to that intermediate +// result. +#define SIO_GPIO_OUT_OFFSET 0x00000010 +#define SIO_GPIO_OUT_BITS 0x3fffffff +#define SIO_GPIO_OUT_RESET 0x00000000 +#define SIO_GPIO_OUT_MSB 29 +#define SIO_GPIO_OUT_LSB 0 +#define SIO_GPIO_OUT_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OUT_SET +// Description : GPIO output value set +// Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata` +#define SIO_GPIO_OUT_SET_OFFSET 0x00000014 +#define SIO_GPIO_OUT_SET_BITS 0x3fffffff +#define SIO_GPIO_OUT_SET_RESET 0x00000000 +#define SIO_GPIO_OUT_SET_MSB 29 +#define SIO_GPIO_OUT_SET_LSB 0 +#define SIO_GPIO_OUT_SET_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OUT_CLR +// Description : GPIO output value clear +// Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= +// ~wdata` +#define SIO_GPIO_OUT_CLR_OFFSET 0x00000018 +#define SIO_GPIO_OUT_CLR_BITS 0x3fffffff +#define SIO_GPIO_OUT_CLR_RESET 0x00000000 +#define SIO_GPIO_OUT_CLR_MSB 29 +#define SIO_GPIO_OUT_CLR_LSB 0 +#define SIO_GPIO_OUT_CLR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OUT_XOR +// Description : GPIO output value XOR +// Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= +// wdata` +#define SIO_GPIO_OUT_XOR_OFFSET 0x0000001c +#define SIO_GPIO_OUT_XOR_BITS 0x3fffffff +#define SIO_GPIO_OUT_XOR_RESET 0x00000000 +#define SIO_GPIO_OUT_XOR_MSB 29 +#define SIO_GPIO_OUT_XOR_LSB 0 +#define SIO_GPIO_OUT_XOR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OE +// Description : GPIO output enable +// Set output enable (1/0 -> output/input) for GPIO0...29. +// Reading back gives the last value written. +// If core 0 and core 1 both write to GPIO_OE simultaneously (or +// to a SET/CLR/XOR alias), +// the result is as though the write from core 0 took place first, +// and the write from core 1 was then applied to that intermediate +// result. +#define SIO_GPIO_OE_OFFSET 0x00000020 +#define SIO_GPIO_OE_BITS 0x3fffffff +#define SIO_GPIO_OE_RESET 0x00000000 +#define SIO_GPIO_OE_MSB 29 +#define SIO_GPIO_OE_LSB 0 +#define SIO_GPIO_OE_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OE_SET +// Description : GPIO output enable set +// Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata` +#define SIO_GPIO_OE_SET_OFFSET 0x00000024 +#define SIO_GPIO_OE_SET_BITS 0x3fffffff +#define SIO_GPIO_OE_SET_RESET 0x00000000 +#define SIO_GPIO_OE_SET_MSB 29 +#define SIO_GPIO_OE_SET_LSB 0 +#define SIO_GPIO_OE_SET_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OE_CLR +// Description : GPIO output enable clear +// Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= +// ~wdata` +#define SIO_GPIO_OE_CLR_OFFSET 0x00000028 +#define SIO_GPIO_OE_CLR_BITS 0x3fffffff +#define SIO_GPIO_OE_CLR_RESET 0x00000000 +#define SIO_GPIO_OE_CLR_MSB 29 +#define SIO_GPIO_OE_CLR_LSB 0 +#define SIO_GPIO_OE_CLR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_OE_XOR +// Description : GPIO output enable XOR +// Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= +// wdata` +#define SIO_GPIO_OE_XOR_OFFSET 0x0000002c +#define SIO_GPIO_OE_XOR_BITS 0x3fffffff +#define SIO_GPIO_OE_XOR_RESET 0x00000000 +#define SIO_GPIO_OE_XOR_MSB 29 +#define SIO_GPIO_OE_XOR_LSB 0 +#define SIO_GPIO_OE_XOR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OUT +// Description : QSPI output value +// Set output level (1/0 -> high/low) for QSPI IO0...5. +// Reading back gives the last value written, NOT the input value +// from the pins. +// If core 0 and core 1 both write to GPIO_HI_OUT simultaneously +// (or to a SET/CLR/XOR alias), +// the result is as though the write from core 0 took place first, +// and the write from core 1 was then applied to that intermediate +// result. +#define SIO_GPIO_HI_OUT_OFFSET 0x00000030 +#define SIO_GPIO_HI_OUT_BITS 0x0000003f +#define SIO_GPIO_HI_OUT_RESET 0x00000000 +#define SIO_GPIO_HI_OUT_MSB 5 +#define SIO_GPIO_HI_OUT_LSB 0 +#define SIO_GPIO_HI_OUT_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OUT_SET +// Description : QSPI output value set +// Perform an atomic bit-set on GPIO_HI_OUT, i.e. `GPIO_HI_OUT |= +// wdata` +#define SIO_GPIO_HI_OUT_SET_OFFSET 0x00000034 +#define SIO_GPIO_HI_OUT_SET_BITS 0x0000003f +#define SIO_GPIO_HI_OUT_SET_RESET 0x00000000 +#define SIO_GPIO_HI_OUT_SET_MSB 5 +#define SIO_GPIO_HI_OUT_SET_LSB 0 +#define SIO_GPIO_HI_OUT_SET_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OUT_CLR +// Description : QSPI output value clear +// Perform an atomic bit-clear on GPIO_HI_OUT, i.e. `GPIO_HI_OUT +// &= ~wdata` +#define SIO_GPIO_HI_OUT_CLR_OFFSET 0x00000038 +#define SIO_GPIO_HI_OUT_CLR_BITS 0x0000003f +#define SIO_GPIO_HI_OUT_CLR_RESET 0x00000000 +#define SIO_GPIO_HI_OUT_CLR_MSB 5 +#define SIO_GPIO_HI_OUT_CLR_LSB 0 +#define SIO_GPIO_HI_OUT_CLR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OUT_XOR +// Description : QSPI output value XOR +// Perform an atomic bitwise XOR on GPIO_HI_OUT, i.e. `GPIO_HI_OUT +// ^= wdata` +#define SIO_GPIO_HI_OUT_XOR_OFFSET 0x0000003c +#define SIO_GPIO_HI_OUT_XOR_BITS 0x0000003f +#define SIO_GPIO_HI_OUT_XOR_RESET 0x00000000 +#define SIO_GPIO_HI_OUT_XOR_MSB 5 +#define SIO_GPIO_HI_OUT_XOR_LSB 0 +#define SIO_GPIO_HI_OUT_XOR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OE +// Description : QSPI output enable +// Set output enable (1/0 -> output/input) for QSPI IO0...5. +// Reading back gives the last value written. +// If core 0 and core 1 both write to GPIO_HI_OE simultaneously +// (or to a SET/CLR/XOR alias), +// the result is as though the write from core 0 took place first, +// and the write from core 1 was then applied to that intermediate +// result. +#define SIO_GPIO_HI_OE_OFFSET 0x00000040 +#define SIO_GPIO_HI_OE_BITS 0x0000003f +#define SIO_GPIO_HI_OE_RESET 0x00000000 +#define SIO_GPIO_HI_OE_MSB 5 +#define SIO_GPIO_HI_OE_LSB 0 +#define SIO_GPIO_HI_OE_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OE_SET +// Description : QSPI output enable set +// Perform an atomic bit-set on GPIO_HI_OE, i.e. `GPIO_HI_OE |= +// wdata` +#define SIO_GPIO_HI_OE_SET_OFFSET 0x00000044 +#define SIO_GPIO_HI_OE_SET_BITS 0x0000003f +#define SIO_GPIO_HI_OE_SET_RESET 0x00000000 +#define SIO_GPIO_HI_OE_SET_MSB 5 +#define SIO_GPIO_HI_OE_SET_LSB 0 +#define SIO_GPIO_HI_OE_SET_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OE_CLR +// Description : QSPI output enable clear +// Perform an atomic bit-clear on GPIO_HI_OE, i.e. `GPIO_HI_OE &= +// ~wdata` +#define SIO_GPIO_HI_OE_CLR_OFFSET 0x00000048 +#define SIO_GPIO_HI_OE_CLR_BITS 0x0000003f +#define SIO_GPIO_HI_OE_CLR_RESET 0x00000000 +#define SIO_GPIO_HI_OE_CLR_MSB 5 +#define SIO_GPIO_HI_OE_CLR_LSB 0 +#define SIO_GPIO_HI_OE_CLR_ACCESS "RW" +// ============================================================================= +// Register : SIO_GPIO_HI_OE_XOR +// Description : QSPI output enable XOR +// Perform an atomic bitwise XOR on GPIO_HI_OE, i.e. `GPIO_HI_OE +// ^= wdata` +#define SIO_GPIO_HI_OE_XOR_OFFSET 0x0000004c +#define SIO_GPIO_HI_OE_XOR_BITS 0x0000003f +#define SIO_GPIO_HI_OE_XOR_RESET 0x00000000 +#define SIO_GPIO_HI_OE_XOR_MSB 5 +#define SIO_GPIO_HI_OE_XOR_LSB 0 +#define SIO_GPIO_HI_OE_XOR_ACCESS "RW" +// ============================================================================= +// Register : SIO_FIFO_ST +// Description : Status register for inter-core FIFOs (mailboxes). +// There is one FIFO in the core 0 -> core 1 direction, and one +// core 1 -> core 0. Both are 32 bits wide and 8 words deep. +// Core 0 can see the read side of the 1->0 FIFO (RX), and the +// write side of 0->1 FIFO (TX). +// Core 1 can see the read side of the 0->1 FIFO (RX), and the +// write side of 1->0 FIFO (TX). +// The SIO IRQ for each core is the logical OR of the VLD, WOF and +// ROE fields of its FIFO_ST register. +#define SIO_FIFO_ST_OFFSET 0x00000050 +#define SIO_FIFO_ST_BITS 0x0000000f +#define SIO_FIFO_ST_RESET 0x00000002 +// ----------------------------------------------------------------------------- +// Field : SIO_FIFO_ST_ROE +// Description : Sticky flag indicating the RX FIFO was read when empty. This +// read was ignored by the FIFO. +#define SIO_FIFO_ST_ROE_RESET 0x0 +#define SIO_FIFO_ST_ROE_BITS 0x00000008 +#define SIO_FIFO_ST_ROE_MSB 3 +#define SIO_FIFO_ST_ROE_LSB 3 +#define SIO_FIFO_ST_ROE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : SIO_FIFO_ST_WOF +// Description : Sticky flag indicating the TX FIFO was written when full. This +// write was ignored by the FIFO. +#define SIO_FIFO_ST_WOF_RESET 0x0 +#define SIO_FIFO_ST_WOF_BITS 0x00000004 +#define SIO_FIFO_ST_WOF_MSB 2 +#define SIO_FIFO_ST_WOF_LSB 2 +#define SIO_FIFO_ST_WOF_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : SIO_FIFO_ST_RDY +// Description : Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR +// is ready for more data) +#define SIO_FIFO_ST_RDY_RESET 0x1 +#define SIO_FIFO_ST_RDY_BITS 0x00000002 +#define SIO_FIFO_ST_RDY_MSB 1 +#define SIO_FIFO_ST_RDY_LSB 1 +#define SIO_FIFO_ST_RDY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_FIFO_ST_VLD +// Description : Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD +// is valid) +#define SIO_FIFO_ST_VLD_RESET 0x0 +#define SIO_FIFO_ST_VLD_BITS 0x00000001 +#define SIO_FIFO_ST_VLD_MSB 0 +#define SIO_FIFO_ST_VLD_LSB 0 +#define SIO_FIFO_ST_VLD_ACCESS "RO" +// ============================================================================= +// Register : SIO_FIFO_WR +// Description : Write access to this core's TX FIFO +#define SIO_FIFO_WR_OFFSET 0x00000054 +#define SIO_FIFO_WR_BITS 0xffffffff +#define SIO_FIFO_WR_RESET 0x00000000 +#define SIO_FIFO_WR_MSB 31 +#define SIO_FIFO_WR_LSB 0 +#define SIO_FIFO_WR_ACCESS "WF" +// ============================================================================= +// Register : SIO_FIFO_RD +// Description : Read access to this core's RX FIFO +#define SIO_FIFO_RD_OFFSET 0x00000058 +#define SIO_FIFO_RD_BITS 0xffffffff +#define SIO_FIFO_RD_RESET "-" +#define SIO_FIFO_RD_MSB 31 +#define SIO_FIFO_RD_LSB 0 +#define SIO_FIFO_RD_ACCESS "RF" +// ============================================================================= +// Register : SIO_SPINLOCK_ST +// Description : Spinlock state +// A bitmap containing the state of all 32 spinlocks (1=locked). +// Mainly intended for debugging. +#define SIO_SPINLOCK_ST_OFFSET 0x0000005c +#define SIO_SPINLOCK_ST_BITS 0xffffffff +#define SIO_SPINLOCK_ST_RESET 0x00000000 +#define SIO_SPINLOCK_ST_MSB 31 +#define SIO_SPINLOCK_ST_LSB 0 +#define SIO_SPINLOCK_ST_ACCESS "RO" +// ============================================================================= +// Register : SIO_DIV_UDIVIDEND +// Description : Divider unsigned dividend +// Write to the DIVIDEND operand of the divider, i.e. the p in `p +// / q`. +// Any operand write starts a new calculation. The results appear +// in QUOTIENT, REMAINDER. +// UDIVIDEND/SDIVIDEND are aliases of the same internal register. +// The U alias starts an +// unsigned calculation, and the S alias starts a signed +// calculation. +#define SIO_DIV_UDIVIDEND_OFFSET 0x00000060 +#define SIO_DIV_UDIVIDEND_BITS 0xffffffff +#define SIO_DIV_UDIVIDEND_RESET 0x00000000 +#define SIO_DIV_UDIVIDEND_MSB 31 +#define SIO_DIV_UDIVIDEND_LSB 0 +#define SIO_DIV_UDIVIDEND_ACCESS "RW" +// ============================================================================= +// Register : SIO_DIV_UDIVISOR +// Description : Divider unsigned divisor +// Write to the DIVISOR operand of the divider, i.e. the q in `p / +// q`. +// Any operand write starts a new calculation. The results appear +// in QUOTIENT, REMAINDER. +// UDIVIDEND/SDIVIDEND are aliases of the same internal register. +// The U alias starts an +// unsigned calculation, and the S alias starts a signed +// calculation. +#define SIO_DIV_UDIVISOR_OFFSET 0x00000064 +#define SIO_DIV_UDIVISOR_BITS 0xffffffff +#define SIO_DIV_UDIVISOR_RESET 0x00000000 +#define SIO_DIV_UDIVISOR_MSB 31 +#define SIO_DIV_UDIVISOR_LSB 0 +#define SIO_DIV_UDIVISOR_ACCESS "RW" +// ============================================================================= +// Register : SIO_DIV_SDIVIDEND +// Description : Divider signed dividend +// The same as UDIVIDEND, but starts a signed calculation, rather +// than unsigned. +#define SIO_DIV_SDIVIDEND_OFFSET 0x00000068 +#define SIO_DIV_SDIVIDEND_BITS 0xffffffff +#define SIO_DIV_SDIVIDEND_RESET 0x00000000 +#define SIO_DIV_SDIVIDEND_MSB 31 +#define SIO_DIV_SDIVIDEND_LSB 0 +#define SIO_DIV_SDIVIDEND_ACCESS "RW" +// ============================================================================= +// Register : SIO_DIV_SDIVISOR +// Description : Divider signed divisor +// The same as UDIVISOR, but starts a signed calculation, rather +// than unsigned. +#define SIO_DIV_SDIVISOR_OFFSET 0x0000006c +#define SIO_DIV_SDIVISOR_BITS 0xffffffff +#define SIO_DIV_SDIVISOR_RESET 0x00000000 +#define SIO_DIV_SDIVISOR_MSB 31 +#define SIO_DIV_SDIVISOR_LSB 0 +#define SIO_DIV_SDIVISOR_ACCESS "RW" +// ============================================================================= +// Register : SIO_DIV_QUOTIENT +// Description : Divider result quotient +// The result of `DIVIDEND / DIVISOR` (division). Contents +// undefined while CSR_READY is low. +// For signed calculations, QUOTIENT is negative when the signs of +// DIVIDEND and DIVISOR differ. +// This register can be written to directly, for context +// save/restore purposes. This halts any +// in-progress calculation and sets the CSR_READY and CSR_DIRTY +// flags. +// Reading from QUOTIENT clears the CSR_DIRTY flag, so should read +// results in the order +// REMAINDER, QUOTIENT if CSR_DIRTY is used. +#define SIO_DIV_QUOTIENT_OFFSET 0x00000070 +#define SIO_DIV_QUOTIENT_BITS 0xffffffff +#define SIO_DIV_QUOTIENT_RESET 0x00000000 +#define SIO_DIV_QUOTIENT_MSB 31 +#define SIO_DIV_QUOTIENT_LSB 0 +#define SIO_DIV_QUOTIENT_ACCESS "RW" +// ============================================================================= +// Register : SIO_DIV_REMAINDER +// Description : Divider result remainder +// The result of `DIVIDEND % DIVISOR` (modulo). Contents undefined +// while CSR_READY is low. +// For signed calculations, REMAINDER is negative only when +// DIVIDEND is negative. +// This register can be written to directly, for context +// save/restore purposes. This halts any +// in-progress calculation and sets the CSR_READY and CSR_DIRTY +// flags. +#define SIO_DIV_REMAINDER_OFFSET 0x00000074 +#define SIO_DIV_REMAINDER_BITS 0xffffffff +#define SIO_DIV_REMAINDER_RESET 0x00000000 +#define SIO_DIV_REMAINDER_MSB 31 +#define SIO_DIV_REMAINDER_LSB 0 +#define SIO_DIV_REMAINDER_ACCESS "RW" +// ============================================================================= +// Register : SIO_DIV_CSR +// Description : Control and status register for divider. +#define SIO_DIV_CSR_OFFSET 0x00000078 +#define SIO_DIV_CSR_BITS 0x00000003 +#define SIO_DIV_CSR_RESET 0x00000001 +// ----------------------------------------------------------------------------- +// Field : SIO_DIV_CSR_DIRTY +// Description : Changes to 1 when any register is written, and back to 0 when +// QUOTIENT is read. +// Software can use this flag to make save/restore more efficient +// (skip if not DIRTY). +// If the flag is used in this way, it's recommended to either +// read QUOTIENT only, +// or REMAINDER and then QUOTIENT, to prevent data loss on context +// switch. +#define SIO_DIV_CSR_DIRTY_RESET 0x0 +#define SIO_DIV_CSR_DIRTY_BITS 0x00000002 +#define SIO_DIV_CSR_DIRTY_MSB 1 +#define SIO_DIV_CSR_DIRTY_LSB 1 +#define SIO_DIV_CSR_DIRTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_DIV_CSR_READY +// Description : Reads as 0 when a calculation is in progress, 1 otherwise. +// Writing an operand (xDIVIDEND, xDIVISOR) will immediately start +// a new calculation, no +// matter if one is already in progress. +// Writing to a result register will immediately terminate any +// in-progress calculation +// and set the READY and DIRTY flags. +#define SIO_DIV_CSR_READY_RESET 0x1 +#define SIO_DIV_CSR_READY_BITS 0x00000001 +#define SIO_DIV_CSR_READY_MSB 0 +#define SIO_DIV_CSR_READY_LSB 0 +#define SIO_DIV_CSR_READY_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_ACCUM0 +// Description : Read/write access to accumulator 0 +#define SIO_INTERP0_ACCUM0_OFFSET 0x00000080 +#define SIO_INTERP0_ACCUM0_BITS 0xffffffff +#define SIO_INTERP0_ACCUM0_RESET 0x00000000 +#define SIO_INTERP0_ACCUM0_MSB 31 +#define SIO_INTERP0_ACCUM0_LSB 0 +#define SIO_INTERP0_ACCUM0_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_ACCUM1 +// Description : Read/write access to accumulator 1 +#define SIO_INTERP0_ACCUM1_OFFSET 0x00000084 +#define SIO_INTERP0_ACCUM1_BITS 0xffffffff +#define SIO_INTERP0_ACCUM1_RESET 0x00000000 +#define SIO_INTERP0_ACCUM1_MSB 31 +#define SIO_INTERP0_ACCUM1_LSB 0 +#define SIO_INTERP0_ACCUM1_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_BASE0 +// Description : Read/write access to BASE0 register. +#define SIO_INTERP0_BASE0_OFFSET 0x00000088 +#define SIO_INTERP0_BASE0_BITS 0xffffffff +#define SIO_INTERP0_BASE0_RESET 0x00000000 +#define SIO_INTERP0_BASE0_MSB 31 +#define SIO_INTERP0_BASE0_LSB 0 +#define SIO_INTERP0_BASE0_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_BASE1 +// Description : Read/write access to BASE1 register. +#define SIO_INTERP0_BASE1_OFFSET 0x0000008c +#define SIO_INTERP0_BASE1_BITS 0xffffffff +#define SIO_INTERP0_BASE1_RESET 0x00000000 +#define SIO_INTERP0_BASE1_MSB 31 +#define SIO_INTERP0_BASE1_LSB 0 +#define SIO_INTERP0_BASE1_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_BASE2 +// Description : Read/write access to BASE2 register. +#define SIO_INTERP0_BASE2_OFFSET 0x00000090 +#define SIO_INTERP0_BASE2_BITS 0xffffffff +#define SIO_INTERP0_BASE2_RESET 0x00000000 +#define SIO_INTERP0_BASE2_MSB 31 +#define SIO_INTERP0_BASE2_LSB 0 +#define SIO_INTERP0_BASE2_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_POP_LANE0 +// Description : Read LANE0 result, and simultaneously write lane results to +// both accumulators (POP). +#define SIO_INTERP0_POP_LANE0_OFFSET 0x00000094 +#define SIO_INTERP0_POP_LANE0_BITS 0xffffffff +#define SIO_INTERP0_POP_LANE0_RESET 0x00000000 +#define SIO_INTERP0_POP_LANE0_MSB 31 +#define SIO_INTERP0_POP_LANE0_LSB 0 +#define SIO_INTERP0_POP_LANE0_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_POP_LANE1 +// Description : Read LANE1 result, and simultaneously write lane results to +// both accumulators (POP). +#define SIO_INTERP0_POP_LANE1_OFFSET 0x00000098 +#define SIO_INTERP0_POP_LANE1_BITS 0xffffffff +#define SIO_INTERP0_POP_LANE1_RESET 0x00000000 +#define SIO_INTERP0_POP_LANE1_MSB 31 +#define SIO_INTERP0_POP_LANE1_LSB 0 +#define SIO_INTERP0_POP_LANE1_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_POP_FULL +// Description : Read FULL result, and simultaneously write lane results to both +// accumulators (POP). +#define SIO_INTERP0_POP_FULL_OFFSET 0x0000009c +#define SIO_INTERP0_POP_FULL_BITS 0xffffffff +#define SIO_INTERP0_POP_FULL_RESET 0x00000000 +#define SIO_INTERP0_POP_FULL_MSB 31 +#define SIO_INTERP0_POP_FULL_LSB 0 +#define SIO_INTERP0_POP_FULL_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_PEEK_LANE0 +// Description : Read LANE0 result, without altering any internal state (PEEK). +#define SIO_INTERP0_PEEK_LANE0_OFFSET 0x000000a0 +#define SIO_INTERP0_PEEK_LANE0_BITS 0xffffffff +#define SIO_INTERP0_PEEK_LANE0_RESET 0x00000000 +#define SIO_INTERP0_PEEK_LANE0_MSB 31 +#define SIO_INTERP0_PEEK_LANE0_LSB 0 +#define SIO_INTERP0_PEEK_LANE0_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_PEEK_LANE1 +// Description : Read LANE1 result, without altering any internal state (PEEK). +#define SIO_INTERP0_PEEK_LANE1_OFFSET 0x000000a4 +#define SIO_INTERP0_PEEK_LANE1_BITS 0xffffffff +#define SIO_INTERP0_PEEK_LANE1_RESET 0x00000000 +#define SIO_INTERP0_PEEK_LANE1_MSB 31 +#define SIO_INTERP0_PEEK_LANE1_LSB 0 +#define SIO_INTERP0_PEEK_LANE1_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_PEEK_FULL +// Description : Read FULL result, without altering any internal state (PEEK). +#define SIO_INTERP0_PEEK_FULL_OFFSET 0x000000a8 +#define SIO_INTERP0_PEEK_FULL_BITS 0xffffffff +#define SIO_INTERP0_PEEK_FULL_RESET 0x00000000 +#define SIO_INTERP0_PEEK_FULL_MSB 31 +#define SIO_INTERP0_PEEK_FULL_LSB 0 +#define SIO_INTERP0_PEEK_FULL_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP0_CTRL_LANE0 +// Description : Control register for lane 0 +#define SIO_INTERP0_CTRL_LANE0_OFFSET 0x000000ac +#define SIO_INTERP0_CTRL_LANE0_BITS 0x03bfffff +#define SIO_INTERP0_CTRL_LANE0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_OVERF +// Description : Set if either OVERF0 or OVERF1 is set. +#define SIO_INTERP0_CTRL_LANE0_OVERF_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_OVERF_BITS 0x02000000 +#define SIO_INTERP0_CTRL_LANE0_OVERF_MSB 25 +#define SIO_INTERP0_CTRL_LANE0_OVERF_LSB 25 +#define SIO_INTERP0_CTRL_LANE0_OVERF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_OVERF1 +// Description : Indicates if any masked-off MSBs in ACCUM1 are set. +#define SIO_INTERP0_CTRL_LANE0_OVERF1_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_OVERF1_BITS 0x01000000 +#define SIO_INTERP0_CTRL_LANE0_OVERF1_MSB 24 +#define SIO_INTERP0_CTRL_LANE0_OVERF1_LSB 24 +#define SIO_INTERP0_CTRL_LANE0_OVERF1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_OVERF0 +// Description : Indicates if any masked-off MSBs in ACCUM0 are set. +#define SIO_INTERP0_CTRL_LANE0_OVERF0_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_OVERF0_BITS 0x00800000 +#define SIO_INTERP0_CTRL_LANE0_OVERF0_MSB 23 +#define SIO_INTERP0_CTRL_LANE0_OVERF0_LSB 23 +#define SIO_INTERP0_CTRL_LANE0_OVERF0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_BLEND +// Description : Only present on INTERP0 on each core. If BLEND mode is enabled: +// - LANE1 result is a linear interpolation between BASE0 and +// BASE1, controlled +// by the 8 LSBs of lane 1 shift and mask value (a fractional +// number between +// 0 and 255/256ths) +// - LANE0 result does not have BASE0 added (yields only the 8 +// LSBs of lane 1 shift+mask value) +// - FULL result does not have lane 1 shift+mask value added +// (BASE2 + lane 0 shift+mask) +// LANE1 SIGNED flag controls whether the interpolation is signed +// or unsigned. +#define SIO_INTERP0_CTRL_LANE0_BLEND_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_BLEND_BITS 0x00200000 +#define SIO_INTERP0_CTRL_LANE0_BLEND_MSB 21 +#define SIO_INTERP0_CTRL_LANE0_BLEND_LSB 21 +#define SIO_INTERP0_CTRL_LANE0_BLEND_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_FORCE_MSB +// Description : ORed into bits 29:28 of the lane result presented to the +// processor on the bus. +// No effect on the internal 32-bit datapath. Handy for using a +// lane to generate sequence +// of pointers into flash or SRAM. +#define SIO_INTERP0_CTRL_LANE0_FORCE_MSB_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_FORCE_MSB_BITS 0x00180000 +#define SIO_INTERP0_CTRL_LANE0_FORCE_MSB_MSB 20 +#define SIO_INTERP0_CTRL_LANE0_FORCE_MSB_LSB 19 +#define SIO_INTERP0_CTRL_LANE0_FORCE_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_ADD_RAW +// Description : If 1, mask + shift is bypassed for LANE0 result. This does not +// affect FULL result. +#define SIO_INTERP0_CTRL_LANE0_ADD_RAW_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_ADD_RAW_BITS 0x00040000 +#define SIO_INTERP0_CTRL_LANE0_ADD_RAW_MSB 18 +#define SIO_INTERP0_CTRL_LANE0_ADD_RAW_LSB 18 +#define SIO_INTERP0_CTRL_LANE0_ADD_RAW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_CROSS_RESULT +// Description : If 1, feed the opposite lane's result into this lane's +// accumulator on POP. +#define SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_BITS 0x00020000 +#define SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_MSB 17 +#define SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_LSB 17 +#define SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_CROSS_INPUT +// Description : If 1, feed the opposite lane's accumulator into this lane's +// shift + mask hardware. +// Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is +// before the shift+mask bypass) +#define SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_BITS 0x00010000 +#define SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_MSB 16 +#define SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_LSB 16 +#define SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_SIGNED +// Description : If SIGNED is set, the shifted and masked accumulator value is +// sign-extended to 32 bits +// before adding to BASE0, and LANE0 PEEK/POP appear extended to +// 32 bits when read by processor. +#define SIO_INTERP0_CTRL_LANE0_SIGNED_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE0_SIGNED_BITS 0x00008000 +#define SIO_INTERP0_CTRL_LANE0_SIGNED_MSB 15 +#define SIO_INTERP0_CTRL_LANE0_SIGNED_LSB 15 +#define SIO_INTERP0_CTRL_LANE0_SIGNED_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_MASK_MSB +// Description : The most-significant bit allowed to pass by the mask +// (inclusive) +// Setting MSB < LSB may cause chip to turn inside-out +#define SIO_INTERP0_CTRL_LANE0_MASK_MSB_RESET 0x00 +#define SIO_INTERP0_CTRL_LANE0_MASK_MSB_BITS 0x00007c00 +#define SIO_INTERP0_CTRL_LANE0_MASK_MSB_MSB 14 +#define SIO_INTERP0_CTRL_LANE0_MASK_MSB_LSB 10 +#define SIO_INTERP0_CTRL_LANE0_MASK_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_MASK_LSB +// Description : The least-significant bit allowed to pass by the mask +// (inclusive) +#define SIO_INTERP0_CTRL_LANE0_MASK_LSB_RESET 0x00 +#define SIO_INTERP0_CTRL_LANE0_MASK_LSB_BITS 0x000003e0 +#define SIO_INTERP0_CTRL_LANE0_MASK_LSB_MSB 9 +#define SIO_INTERP0_CTRL_LANE0_MASK_LSB_LSB 5 +#define SIO_INTERP0_CTRL_LANE0_MASK_LSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE0_SHIFT +// Description : Logical right-shift applied to accumulator before masking +#define SIO_INTERP0_CTRL_LANE0_SHIFT_RESET 0x00 +#define SIO_INTERP0_CTRL_LANE0_SHIFT_BITS 0x0000001f +#define SIO_INTERP0_CTRL_LANE0_SHIFT_MSB 4 +#define SIO_INTERP0_CTRL_LANE0_SHIFT_LSB 0 +#define SIO_INTERP0_CTRL_LANE0_SHIFT_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_CTRL_LANE1 +// Description : Control register for lane 1 +#define SIO_INTERP0_CTRL_LANE1_OFFSET 0x000000b0 +#define SIO_INTERP0_CTRL_LANE1_BITS 0x001fffff +#define SIO_INTERP0_CTRL_LANE1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_FORCE_MSB +// Description : ORed into bits 29:28 of the lane result presented to the +// processor on the bus. +// No effect on the internal 32-bit datapath. Handy for using a +// lane to generate sequence +// of pointers into flash or SRAM. +#define SIO_INTERP0_CTRL_LANE1_FORCE_MSB_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE1_FORCE_MSB_BITS 0x00180000 +#define SIO_INTERP0_CTRL_LANE1_FORCE_MSB_MSB 20 +#define SIO_INTERP0_CTRL_LANE1_FORCE_MSB_LSB 19 +#define SIO_INTERP0_CTRL_LANE1_FORCE_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_ADD_RAW +// Description : If 1, mask + shift is bypassed for LANE1 result. This does not +// affect FULL result. +#define SIO_INTERP0_CTRL_LANE1_ADD_RAW_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE1_ADD_RAW_BITS 0x00040000 +#define SIO_INTERP0_CTRL_LANE1_ADD_RAW_MSB 18 +#define SIO_INTERP0_CTRL_LANE1_ADD_RAW_LSB 18 +#define SIO_INTERP0_CTRL_LANE1_ADD_RAW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_CROSS_RESULT +// Description : If 1, feed the opposite lane's result into this lane's +// accumulator on POP. +#define SIO_INTERP0_CTRL_LANE1_CROSS_RESULT_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE1_CROSS_RESULT_BITS 0x00020000 +#define SIO_INTERP0_CTRL_LANE1_CROSS_RESULT_MSB 17 +#define SIO_INTERP0_CTRL_LANE1_CROSS_RESULT_LSB 17 +#define SIO_INTERP0_CTRL_LANE1_CROSS_RESULT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_CROSS_INPUT +// Description : If 1, feed the opposite lane's accumulator into this lane's +// shift + mask hardware. +// Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is +// before the shift+mask bypass) +#define SIO_INTERP0_CTRL_LANE1_CROSS_INPUT_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE1_CROSS_INPUT_BITS 0x00010000 +#define SIO_INTERP0_CTRL_LANE1_CROSS_INPUT_MSB 16 +#define SIO_INTERP0_CTRL_LANE1_CROSS_INPUT_LSB 16 +#define SIO_INTERP0_CTRL_LANE1_CROSS_INPUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_SIGNED +// Description : If SIGNED is set, the shifted and masked accumulator value is +// sign-extended to 32 bits +// before adding to BASE1, and LANE1 PEEK/POP appear extended to +// 32 bits when read by processor. +#define SIO_INTERP0_CTRL_LANE1_SIGNED_RESET 0x0 +#define SIO_INTERP0_CTRL_LANE1_SIGNED_BITS 0x00008000 +#define SIO_INTERP0_CTRL_LANE1_SIGNED_MSB 15 +#define SIO_INTERP0_CTRL_LANE1_SIGNED_LSB 15 +#define SIO_INTERP0_CTRL_LANE1_SIGNED_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_MASK_MSB +// Description : The most-significant bit allowed to pass by the mask +// (inclusive) +// Setting MSB < LSB may cause chip to turn inside-out +#define SIO_INTERP0_CTRL_LANE1_MASK_MSB_RESET 0x00 +#define SIO_INTERP0_CTRL_LANE1_MASK_MSB_BITS 0x00007c00 +#define SIO_INTERP0_CTRL_LANE1_MASK_MSB_MSB 14 +#define SIO_INTERP0_CTRL_LANE1_MASK_MSB_LSB 10 +#define SIO_INTERP0_CTRL_LANE1_MASK_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_MASK_LSB +// Description : The least-significant bit allowed to pass by the mask +// (inclusive) +#define SIO_INTERP0_CTRL_LANE1_MASK_LSB_RESET 0x00 +#define SIO_INTERP0_CTRL_LANE1_MASK_LSB_BITS 0x000003e0 +#define SIO_INTERP0_CTRL_LANE1_MASK_LSB_MSB 9 +#define SIO_INTERP0_CTRL_LANE1_MASK_LSB_LSB 5 +#define SIO_INTERP0_CTRL_LANE1_MASK_LSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP0_CTRL_LANE1_SHIFT +// Description : Logical right-shift applied to accumulator before masking +#define SIO_INTERP0_CTRL_LANE1_SHIFT_RESET 0x00 +#define SIO_INTERP0_CTRL_LANE1_SHIFT_BITS 0x0000001f +#define SIO_INTERP0_CTRL_LANE1_SHIFT_MSB 4 +#define SIO_INTERP0_CTRL_LANE1_SHIFT_LSB 0 +#define SIO_INTERP0_CTRL_LANE1_SHIFT_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_ACCUM0_ADD +// Description : Values written here are atomically added to ACCUM0 +// Reading yields lane 0's raw shift and mask value (BASE0 not +// added). +#define SIO_INTERP0_ACCUM0_ADD_OFFSET 0x000000b4 +#define SIO_INTERP0_ACCUM0_ADD_BITS 0x00ffffff +#define SIO_INTERP0_ACCUM0_ADD_RESET 0x00000000 +#define SIO_INTERP0_ACCUM0_ADD_MSB 23 +#define SIO_INTERP0_ACCUM0_ADD_LSB 0 +#define SIO_INTERP0_ACCUM0_ADD_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_ACCUM1_ADD +// Description : Values written here are atomically added to ACCUM1 +// Reading yields lane 1's raw shift and mask value (BASE1 not +// added). +#define SIO_INTERP0_ACCUM1_ADD_OFFSET 0x000000b8 +#define SIO_INTERP0_ACCUM1_ADD_BITS 0x00ffffff +#define SIO_INTERP0_ACCUM1_ADD_RESET 0x00000000 +#define SIO_INTERP0_ACCUM1_ADD_MSB 23 +#define SIO_INTERP0_ACCUM1_ADD_LSB 0 +#define SIO_INTERP0_ACCUM1_ADD_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP0_BASE_1AND0 +// Description : On write, the lower 16 bits go to BASE0, upper bits to BASE1 +// simultaneously. +// Each half is sign-extended to 32 bits if that lane's SIGNED +// flag is set. +#define SIO_INTERP0_BASE_1AND0_OFFSET 0x000000bc +#define SIO_INTERP0_BASE_1AND0_BITS 0xffffffff +#define SIO_INTERP0_BASE_1AND0_RESET 0x00000000 +#define SIO_INTERP0_BASE_1AND0_MSB 31 +#define SIO_INTERP0_BASE_1AND0_LSB 0 +#define SIO_INTERP0_BASE_1AND0_ACCESS "WO" +// ============================================================================= +// Register : SIO_INTERP1_ACCUM0 +// Description : Read/write access to accumulator 0 +#define SIO_INTERP1_ACCUM0_OFFSET 0x000000c0 +#define SIO_INTERP1_ACCUM0_BITS 0xffffffff +#define SIO_INTERP1_ACCUM0_RESET 0x00000000 +#define SIO_INTERP1_ACCUM0_MSB 31 +#define SIO_INTERP1_ACCUM0_LSB 0 +#define SIO_INTERP1_ACCUM0_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_ACCUM1 +// Description : Read/write access to accumulator 1 +#define SIO_INTERP1_ACCUM1_OFFSET 0x000000c4 +#define SIO_INTERP1_ACCUM1_BITS 0xffffffff +#define SIO_INTERP1_ACCUM1_RESET 0x00000000 +#define SIO_INTERP1_ACCUM1_MSB 31 +#define SIO_INTERP1_ACCUM1_LSB 0 +#define SIO_INTERP1_ACCUM1_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_BASE0 +// Description : Read/write access to BASE0 register. +#define SIO_INTERP1_BASE0_OFFSET 0x000000c8 +#define SIO_INTERP1_BASE0_BITS 0xffffffff +#define SIO_INTERP1_BASE0_RESET 0x00000000 +#define SIO_INTERP1_BASE0_MSB 31 +#define SIO_INTERP1_BASE0_LSB 0 +#define SIO_INTERP1_BASE0_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_BASE1 +// Description : Read/write access to BASE1 register. +#define SIO_INTERP1_BASE1_OFFSET 0x000000cc +#define SIO_INTERP1_BASE1_BITS 0xffffffff +#define SIO_INTERP1_BASE1_RESET 0x00000000 +#define SIO_INTERP1_BASE1_MSB 31 +#define SIO_INTERP1_BASE1_LSB 0 +#define SIO_INTERP1_BASE1_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_BASE2 +// Description : Read/write access to BASE2 register. +#define SIO_INTERP1_BASE2_OFFSET 0x000000d0 +#define SIO_INTERP1_BASE2_BITS 0xffffffff +#define SIO_INTERP1_BASE2_RESET 0x00000000 +#define SIO_INTERP1_BASE2_MSB 31 +#define SIO_INTERP1_BASE2_LSB 0 +#define SIO_INTERP1_BASE2_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_POP_LANE0 +// Description : Read LANE0 result, and simultaneously write lane results to +// both accumulators (POP). +#define SIO_INTERP1_POP_LANE0_OFFSET 0x000000d4 +#define SIO_INTERP1_POP_LANE0_BITS 0xffffffff +#define SIO_INTERP1_POP_LANE0_RESET 0x00000000 +#define SIO_INTERP1_POP_LANE0_MSB 31 +#define SIO_INTERP1_POP_LANE0_LSB 0 +#define SIO_INTERP1_POP_LANE0_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP1_POP_LANE1 +// Description : Read LANE1 result, and simultaneously write lane results to +// both accumulators (POP). +#define SIO_INTERP1_POP_LANE1_OFFSET 0x000000d8 +#define SIO_INTERP1_POP_LANE1_BITS 0xffffffff +#define SIO_INTERP1_POP_LANE1_RESET 0x00000000 +#define SIO_INTERP1_POP_LANE1_MSB 31 +#define SIO_INTERP1_POP_LANE1_LSB 0 +#define SIO_INTERP1_POP_LANE1_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP1_POP_FULL +// Description : Read FULL result, and simultaneously write lane results to both +// accumulators (POP). +#define SIO_INTERP1_POP_FULL_OFFSET 0x000000dc +#define SIO_INTERP1_POP_FULL_BITS 0xffffffff +#define SIO_INTERP1_POP_FULL_RESET 0x00000000 +#define SIO_INTERP1_POP_FULL_MSB 31 +#define SIO_INTERP1_POP_FULL_LSB 0 +#define SIO_INTERP1_POP_FULL_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP1_PEEK_LANE0 +// Description : Read LANE0 result, without altering any internal state (PEEK). +#define SIO_INTERP1_PEEK_LANE0_OFFSET 0x000000e0 +#define SIO_INTERP1_PEEK_LANE0_BITS 0xffffffff +#define SIO_INTERP1_PEEK_LANE0_RESET 0x00000000 +#define SIO_INTERP1_PEEK_LANE0_MSB 31 +#define SIO_INTERP1_PEEK_LANE0_LSB 0 +#define SIO_INTERP1_PEEK_LANE0_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP1_PEEK_LANE1 +// Description : Read LANE1 result, without altering any internal state (PEEK). +#define SIO_INTERP1_PEEK_LANE1_OFFSET 0x000000e4 +#define SIO_INTERP1_PEEK_LANE1_BITS 0xffffffff +#define SIO_INTERP1_PEEK_LANE1_RESET 0x00000000 +#define SIO_INTERP1_PEEK_LANE1_MSB 31 +#define SIO_INTERP1_PEEK_LANE1_LSB 0 +#define SIO_INTERP1_PEEK_LANE1_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP1_PEEK_FULL +// Description : Read FULL result, without altering any internal state (PEEK). +#define SIO_INTERP1_PEEK_FULL_OFFSET 0x000000e8 +#define SIO_INTERP1_PEEK_FULL_BITS 0xffffffff +#define SIO_INTERP1_PEEK_FULL_RESET 0x00000000 +#define SIO_INTERP1_PEEK_FULL_MSB 31 +#define SIO_INTERP1_PEEK_FULL_LSB 0 +#define SIO_INTERP1_PEEK_FULL_ACCESS "RO" +// ============================================================================= +// Register : SIO_INTERP1_CTRL_LANE0 +// Description : Control register for lane 0 +#define SIO_INTERP1_CTRL_LANE0_OFFSET 0x000000ec +#define SIO_INTERP1_CTRL_LANE0_BITS 0x03dfffff +#define SIO_INTERP1_CTRL_LANE0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_OVERF +// Description : Set if either OVERF0 or OVERF1 is set. +#define SIO_INTERP1_CTRL_LANE0_OVERF_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_OVERF_BITS 0x02000000 +#define SIO_INTERP1_CTRL_LANE0_OVERF_MSB 25 +#define SIO_INTERP1_CTRL_LANE0_OVERF_LSB 25 +#define SIO_INTERP1_CTRL_LANE0_OVERF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_OVERF1 +// Description : Indicates if any masked-off MSBs in ACCUM1 are set. +#define SIO_INTERP1_CTRL_LANE0_OVERF1_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_OVERF1_BITS 0x01000000 +#define SIO_INTERP1_CTRL_LANE0_OVERF1_MSB 24 +#define SIO_INTERP1_CTRL_LANE0_OVERF1_LSB 24 +#define SIO_INTERP1_CTRL_LANE0_OVERF1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_OVERF0 +// Description : Indicates if any masked-off MSBs in ACCUM0 are set. +#define SIO_INTERP1_CTRL_LANE0_OVERF0_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_OVERF0_BITS 0x00800000 +#define SIO_INTERP1_CTRL_LANE0_OVERF0_MSB 23 +#define SIO_INTERP1_CTRL_LANE0_OVERF0_LSB 23 +#define SIO_INTERP1_CTRL_LANE0_OVERF0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_CLAMP +// Description : Only present on INTERP1 on each core. If CLAMP mode is enabled: +// - LANE0 result is shifted and masked ACCUM0, clamped by a lower +// bound of +// BASE0 and an upper bound of BASE1. +// - Signedness of these comparisons is determined by +// LANE0_CTRL_SIGNED +#define SIO_INTERP1_CTRL_LANE0_CLAMP_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_CLAMP_BITS 0x00400000 +#define SIO_INTERP1_CTRL_LANE0_CLAMP_MSB 22 +#define SIO_INTERP1_CTRL_LANE0_CLAMP_LSB 22 +#define SIO_INTERP1_CTRL_LANE0_CLAMP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_FORCE_MSB +// Description : ORed into bits 29:28 of the lane result presented to the +// processor on the bus. +// No effect on the internal 32-bit datapath. Handy for using a +// lane to generate sequence +// of pointers into flash or SRAM. +#define SIO_INTERP1_CTRL_LANE0_FORCE_MSB_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_FORCE_MSB_BITS 0x00180000 +#define SIO_INTERP1_CTRL_LANE0_FORCE_MSB_MSB 20 +#define SIO_INTERP1_CTRL_LANE0_FORCE_MSB_LSB 19 +#define SIO_INTERP1_CTRL_LANE0_FORCE_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_ADD_RAW +// Description : If 1, mask + shift is bypassed for LANE0 result. This does not +// affect FULL result. +#define SIO_INTERP1_CTRL_LANE0_ADD_RAW_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_ADD_RAW_BITS 0x00040000 +#define SIO_INTERP1_CTRL_LANE0_ADD_RAW_MSB 18 +#define SIO_INTERP1_CTRL_LANE0_ADD_RAW_LSB 18 +#define SIO_INTERP1_CTRL_LANE0_ADD_RAW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_CROSS_RESULT +// Description : If 1, feed the opposite lane's result into this lane's +// accumulator on POP. +#define SIO_INTERP1_CTRL_LANE0_CROSS_RESULT_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_CROSS_RESULT_BITS 0x00020000 +#define SIO_INTERP1_CTRL_LANE0_CROSS_RESULT_MSB 17 +#define SIO_INTERP1_CTRL_LANE0_CROSS_RESULT_LSB 17 +#define SIO_INTERP1_CTRL_LANE0_CROSS_RESULT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_CROSS_INPUT +// Description : If 1, feed the opposite lane's accumulator into this lane's +// shift + mask hardware. +// Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is +// before the shift+mask bypass) +#define SIO_INTERP1_CTRL_LANE0_CROSS_INPUT_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_CROSS_INPUT_BITS 0x00010000 +#define SIO_INTERP1_CTRL_LANE0_CROSS_INPUT_MSB 16 +#define SIO_INTERP1_CTRL_LANE0_CROSS_INPUT_LSB 16 +#define SIO_INTERP1_CTRL_LANE0_CROSS_INPUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_SIGNED +// Description : If SIGNED is set, the shifted and masked accumulator value is +// sign-extended to 32 bits +// before adding to BASE0, and LANE0 PEEK/POP appear extended to +// 32 bits when read by processor. +#define SIO_INTERP1_CTRL_LANE0_SIGNED_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE0_SIGNED_BITS 0x00008000 +#define SIO_INTERP1_CTRL_LANE0_SIGNED_MSB 15 +#define SIO_INTERP1_CTRL_LANE0_SIGNED_LSB 15 +#define SIO_INTERP1_CTRL_LANE0_SIGNED_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_MASK_MSB +// Description : The most-significant bit allowed to pass by the mask +// (inclusive) +// Setting MSB < LSB may cause chip to turn inside-out +#define SIO_INTERP1_CTRL_LANE0_MASK_MSB_RESET 0x00 +#define SIO_INTERP1_CTRL_LANE0_MASK_MSB_BITS 0x00007c00 +#define SIO_INTERP1_CTRL_LANE0_MASK_MSB_MSB 14 +#define SIO_INTERP1_CTRL_LANE0_MASK_MSB_LSB 10 +#define SIO_INTERP1_CTRL_LANE0_MASK_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_MASK_LSB +// Description : The least-significant bit allowed to pass by the mask +// (inclusive) +#define SIO_INTERP1_CTRL_LANE0_MASK_LSB_RESET 0x00 +#define SIO_INTERP1_CTRL_LANE0_MASK_LSB_BITS 0x000003e0 +#define SIO_INTERP1_CTRL_LANE0_MASK_LSB_MSB 9 +#define SIO_INTERP1_CTRL_LANE0_MASK_LSB_LSB 5 +#define SIO_INTERP1_CTRL_LANE0_MASK_LSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE0_SHIFT +// Description : Logical right-shift applied to accumulator before masking +#define SIO_INTERP1_CTRL_LANE0_SHIFT_RESET 0x00 +#define SIO_INTERP1_CTRL_LANE0_SHIFT_BITS 0x0000001f +#define SIO_INTERP1_CTRL_LANE0_SHIFT_MSB 4 +#define SIO_INTERP1_CTRL_LANE0_SHIFT_LSB 0 +#define SIO_INTERP1_CTRL_LANE0_SHIFT_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_CTRL_LANE1 +// Description : Control register for lane 1 +#define SIO_INTERP1_CTRL_LANE1_OFFSET 0x000000f0 +#define SIO_INTERP1_CTRL_LANE1_BITS 0x001fffff +#define SIO_INTERP1_CTRL_LANE1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_FORCE_MSB +// Description : ORed into bits 29:28 of the lane result presented to the +// processor on the bus. +// No effect on the internal 32-bit datapath. Handy for using a +// lane to generate sequence +// of pointers into flash or SRAM. +#define SIO_INTERP1_CTRL_LANE1_FORCE_MSB_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE1_FORCE_MSB_BITS 0x00180000 +#define SIO_INTERP1_CTRL_LANE1_FORCE_MSB_MSB 20 +#define SIO_INTERP1_CTRL_LANE1_FORCE_MSB_LSB 19 +#define SIO_INTERP1_CTRL_LANE1_FORCE_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_ADD_RAW +// Description : If 1, mask + shift is bypassed for LANE1 result. This does not +// affect FULL result. +#define SIO_INTERP1_CTRL_LANE1_ADD_RAW_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE1_ADD_RAW_BITS 0x00040000 +#define SIO_INTERP1_CTRL_LANE1_ADD_RAW_MSB 18 +#define SIO_INTERP1_CTRL_LANE1_ADD_RAW_LSB 18 +#define SIO_INTERP1_CTRL_LANE1_ADD_RAW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_CROSS_RESULT +// Description : If 1, feed the opposite lane's result into this lane's +// accumulator on POP. +#define SIO_INTERP1_CTRL_LANE1_CROSS_RESULT_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE1_CROSS_RESULT_BITS 0x00020000 +#define SIO_INTERP1_CTRL_LANE1_CROSS_RESULT_MSB 17 +#define SIO_INTERP1_CTRL_LANE1_CROSS_RESULT_LSB 17 +#define SIO_INTERP1_CTRL_LANE1_CROSS_RESULT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_CROSS_INPUT +// Description : If 1, feed the opposite lane's accumulator into this lane's +// shift + mask hardware. +// Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is +// before the shift+mask bypass) +#define SIO_INTERP1_CTRL_LANE1_CROSS_INPUT_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE1_CROSS_INPUT_BITS 0x00010000 +#define SIO_INTERP1_CTRL_LANE1_CROSS_INPUT_MSB 16 +#define SIO_INTERP1_CTRL_LANE1_CROSS_INPUT_LSB 16 +#define SIO_INTERP1_CTRL_LANE1_CROSS_INPUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_SIGNED +// Description : If SIGNED is set, the shifted and masked accumulator value is +// sign-extended to 32 bits +// before adding to BASE1, and LANE1 PEEK/POP appear extended to +// 32 bits when read by processor. +#define SIO_INTERP1_CTRL_LANE1_SIGNED_RESET 0x0 +#define SIO_INTERP1_CTRL_LANE1_SIGNED_BITS 0x00008000 +#define SIO_INTERP1_CTRL_LANE1_SIGNED_MSB 15 +#define SIO_INTERP1_CTRL_LANE1_SIGNED_LSB 15 +#define SIO_INTERP1_CTRL_LANE1_SIGNED_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_MASK_MSB +// Description : The most-significant bit allowed to pass by the mask +// (inclusive) +// Setting MSB < LSB may cause chip to turn inside-out +#define SIO_INTERP1_CTRL_LANE1_MASK_MSB_RESET 0x00 +#define SIO_INTERP1_CTRL_LANE1_MASK_MSB_BITS 0x00007c00 +#define SIO_INTERP1_CTRL_LANE1_MASK_MSB_MSB 14 +#define SIO_INTERP1_CTRL_LANE1_MASK_MSB_LSB 10 +#define SIO_INTERP1_CTRL_LANE1_MASK_MSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_MASK_LSB +// Description : The least-significant bit allowed to pass by the mask +// (inclusive) +#define SIO_INTERP1_CTRL_LANE1_MASK_LSB_RESET 0x00 +#define SIO_INTERP1_CTRL_LANE1_MASK_LSB_BITS 0x000003e0 +#define SIO_INTERP1_CTRL_LANE1_MASK_LSB_MSB 9 +#define SIO_INTERP1_CTRL_LANE1_MASK_LSB_LSB 5 +#define SIO_INTERP1_CTRL_LANE1_MASK_LSB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SIO_INTERP1_CTRL_LANE1_SHIFT +// Description : Logical right-shift applied to accumulator before masking +#define SIO_INTERP1_CTRL_LANE1_SHIFT_RESET 0x00 +#define SIO_INTERP1_CTRL_LANE1_SHIFT_BITS 0x0000001f +#define SIO_INTERP1_CTRL_LANE1_SHIFT_MSB 4 +#define SIO_INTERP1_CTRL_LANE1_SHIFT_LSB 0 +#define SIO_INTERP1_CTRL_LANE1_SHIFT_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_ACCUM0_ADD +// Description : Values written here are atomically added to ACCUM0 +// Reading yields lane 0's raw shift and mask value (BASE0 not +// added). +#define SIO_INTERP1_ACCUM0_ADD_OFFSET 0x000000f4 +#define SIO_INTERP1_ACCUM0_ADD_BITS 0x00ffffff +#define SIO_INTERP1_ACCUM0_ADD_RESET 0x00000000 +#define SIO_INTERP1_ACCUM0_ADD_MSB 23 +#define SIO_INTERP1_ACCUM0_ADD_LSB 0 +#define SIO_INTERP1_ACCUM0_ADD_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_ACCUM1_ADD +// Description : Values written here are atomically added to ACCUM1 +// Reading yields lane 1's raw shift and mask value (BASE1 not +// added). +#define SIO_INTERP1_ACCUM1_ADD_OFFSET 0x000000f8 +#define SIO_INTERP1_ACCUM1_ADD_BITS 0x00ffffff +#define SIO_INTERP1_ACCUM1_ADD_RESET 0x00000000 +#define SIO_INTERP1_ACCUM1_ADD_MSB 23 +#define SIO_INTERP1_ACCUM1_ADD_LSB 0 +#define SIO_INTERP1_ACCUM1_ADD_ACCESS "RW" +// ============================================================================= +// Register : SIO_INTERP1_BASE_1AND0 +// Description : On write, the lower 16 bits go to BASE0, upper bits to BASE1 +// simultaneously. +// Each half is sign-extended to 32 bits if that lane's SIGNED +// flag is set. +#define SIO_INTERP1_BASE_1AND0_OFFSET 0x000000fc +#define SIO_INTERP1_BASE_1AND0_BITS 0xffffffff +#define SIO_INTERP1_BASE_1AND0_RESET 0x00000000 +#define SIO_INTERP1_BASE_1AND0_MSB 31 +#define SIO_INTERP1_BASE_1AND0_LSB 0 +#define SIO_INTERP1_BASE_1AND0_ACCESS "WO" +// ============================================================================= +// Register : SIO_SPINLOCK0 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK0_OFFSET 0x00000100 +#define SIO_SPINLOCK0_BITS 0xffffffff +#define SIO_SPINLOCK0_RESET 0x00000000 +#define SIO_SPINLOCK0_MSB 31 +#define SIO_SPINLOCK0_LSB 0 +#define SIO_SPINLOCK0_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK1 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK1_OFFSET 0x00000104 +#define SIO_SPINLOCK1_BITS 0xffffffff +#define SIO_SPINLOCK1_RESET 0x00000000 +#define SIO_SPINLOCK1_MSB 31 +#define SIO_SPINLOCK1_LSB 0 +#define SIO_SPINLOCK1_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK2 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK2_OFFSET 0x00000108 +#define SIO_SPINLOCK2_BITS 0xffffffff +#define SIO_SPINLOCK2_RESET 0x00000000 +#define SIO_SPINLOCK2_MSB 31 +#define SIO_SPINLOCK2_LSB 0 +#define SIO_SPINLOCK2_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK3 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK3_OFFSET 0x0000010c +#define SIO_SPINLOCK3_BITS 0xffffffff +#define SIO_SPINLOCK3_RESET 0x00000000 +#define SIO_SPINLOCK3_MSB 31 +#define SIO_SPINLOCK3_LSB 0 +#define SIO_SPINLOCK3_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK4 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK4_OFFSET 0x00000110 +#define SIO_SPINLOCK4_BITS 0xffffffff +#define SIO_SPINLOCK4_RESET 0x00000000 +#define SIO_SPINLOCK4_MSB 31 +#define SIO_SPINLOCK4_LSB 0 +#define SIO_SPINLOCK4_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK5 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK5_OFFSET 0x00000114 +#define SIO_SPINLOCK5_BITS 0xffffffff +#define SIO_SPINLOCK5_RESET 0x00000000 +#define SIO_SPINLOCK5_MSB 31 +#define SIO_SPINLOCK5_LSB 0 +#define SIO_SPINLOCK5_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK6 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK6_OFFSET 0x00000118 +#define SIO_SPINLOCK6_BITS 0xffffffff +#define SIO_SPINLOCK6_RESET 0x00000000 +#define SIO_SPINLOCK6_MSB 31 +#define SIO_SPINLOCK6_LSB 0 +#define SIO_SPINLOCK6_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK7 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK7_OFFSET 0x0000011c +#define SIO_SPINLOCK7_BITS 0xffffffff +#define SIO_SPINLOCK7_RESET 0x00000000 +#define SIO_SPINLOCK7_MSB 31 +#define SIO_SPINLOCK7_LSB 0 +#define SIO_SPINLOCK7_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK8 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK8_OFFSET 0x00000120 +#define SIO_SPINLOCK8_BITS 0xffffffff +#define SIO_SPINLOCK8_RESET 0x00000000 +#define SIO_SPINLOCK8_MSB 31 +#define SIO_SPINLOCK8_LSB 0 +#define SIO_SPINLOCK8_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK9 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK9_OFFSET 0x00000124 +#define SIO_SPINLOCK9_BITS 0xffffffff +#define SIO_SPINLOCK9_RESET 0x00000000 +#define SIO_SPINLOCK9_MSB 31 +#define SIO_SPINLOCK9_LSB 0 +#define SIO_SPINLOCK9_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK10 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK10_OFFSET 0x00000128 +#define SIO_SPINLOCK10_BITS 0xffffffff +#define SIO_SPINLOCK10_RESET 0x00000000 +#define SIO_SPINLOCK10_MSB 31 +#define SIO_SPINLOCK10_LSB 0 +#define SIO_SPINLOCK10_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK11 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK11_OFFSET 0x0000012c +#define SIO_SPINLOCK11_BITS 0xffffffff +#define SIO_SPINLOCK11_RESET 0x00000000 +#define SIO_SPINLOCK11_MSB 31 +#define SIO_SPINLOCK11_LSB 0 +#define SIO_SPINLOCK11_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK12 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK12_OFFSET 0x00000130 +#define SIO_SPINLOCK12_BITS 0xffffffff +#define SIO_SPINLOCK12_RESET 0x00000000 +#define SIO_SPINLOCK12_MSB 31 +#define SIO_SPINLOCK12_LSB 0 +#define SIO_SPINLOCK12_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK13 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK13_OFFSET 0x00000134 +#define SIO_SPINLOCK13_BITS 0xffffffff +#define SIO_SPINLOCK13_RESET 0x00000000 +#define SIO_SPINLOCK13_MSB 31 +#define SIO_SPINLOCK13_LSB 0 +#define SIO_SPINLOCK13_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK14 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK14_OFFSET 0x00000138 +#define SIO_SPINLOCK14_BITS 0xffffffff +#define SIO_SPINLOCK14_RESET 0x00000000 +#define SIO_SPINLOCK14_MSB 31 +#define SIO_SPINLOCK14_LSB 0 +#define SIO_SPINLOCK14_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK15 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK15_OFFSET 0x0000013c +#define SIO_SPINLOCK15_BITS 0xffffffff +#define SIO_SPINLOCK15_RESET 0x00000000 +#define SIO_SPINLOCK15_MSB 31 +#define SIO_SPINLOCK15_LSB 0 +#define SIO_SPINLOCK15_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK16 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK16_OFFSET 0x00000140 +#define SIO_SPINLOCK16_BITS 0xffffffff +#define SIO_SPINLOCK16_RESET 0x00000000 +#define SIO_SPINLOCK16_MSB 31 +#define SIO_SPINLOCK16_LSB 0 +#define SIO_SPINLOCK16_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK17 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK17_OFFSET 0x00000144 +#define SIO_SPINLOCK17_BITS 0xffffffff +#define SIO_SPINLOCK17_RESET 0x00000000 +#define SIO_SPINLOCK17_MSB 31 +#define SIO_SPINLOCK17_LSB 0 +#define SIO_SPINLOCK17_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK18 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK18_OFFSET 0x00000148 +#define SIO_SPINLOCK18_BITS 0xffffffff +#define SIO_SPINLOCK18_RESET 0x00000000 +#define SIO_SPINLOCK18_MSB 31 +#define SIO_SPINLOCK18_LSB 0 +#define SIO_SPINLOCK18_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK19 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK19_OFFSET 0x0000014c +#define SIO_SPINLOCK19_BITS 0xffffffff +#define SIO_SPINLOCK19_RESET 0x00000000 +#define SIO_SPINLOCK19_MSB 31 +#define SIO_SPINLOCK19_LSB 0 +#define SIO_SPINLOCK19_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK20 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK20_OFFSET 0x00000150 +#define SIO_SPINLOCK20_BITS 0xffffffff +#define SIO_SPINLOCK20_RESET 0x00000000 +#define SIO_SPINLOCK20_MSB 31 +#define SIO_SPINLOCK20_LSB 0 +#define SIO_SPINLOCK20_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK21 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK21_OFFSET 0x00000154 +#define SIO_SPINLOCK21_BITS 0xffffffff +#define SIO_SPINLOCK21_RESET 0x00000000 +#define SIO_SPINLOCK21_MSB 31 +#define SIO_SPINLOCK21_LSB 0 +#define SIO_SPINLOCK21_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK22 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK22_OFFSET 0x00000158 +#define SIO_SPINLOCK22_BITS 0xffffffff +#define SIO_SPINLOCK22_RESET 0x00000000 +#define SIO_SPINLOCK22_MSB 31 +#define SIO_SPINLOCK22_LSB 0 +#define SIO_SPINLOCK22_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK23 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK23_OFFSET 0x0000015c +#define SIO_SPINLOCK23_BITS 0xffffffff +#define SIO_SPINLOCK23_RESET 0x00000000 +#define SIO_SPINLOCK23_MSB 31 +#define SIO_SPINLOCK23_LSB 0 +#define SIO_SPINLOCK23_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK24 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK24_OFFSET 0x00000160 +#define SIO_SPINLOCK24_BITS 0xffffffff +#define SIO_SPINLOCK24_RESET 0x00000000 +#define SIO_SPINLOCK24_MSB 31 +#define SIO_SPINLOCK24_LSB 0 +#define SIO_SPINLOCK24_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK25 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK25_OFFSET 0x00000164 +#define SIO_SPINLOCK25_BITS 0xffffffff +#define SIO_SPINLOCK25_RESET 0x00000000 +#define SIO_SPINLOCK25_MSB 31 +#define SIO_SPINLOCK25_LSB 0 +#define SIO_SPINLOCK25_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK26 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK26_OFFSET 0x00000168 +#define SIO_SPINLOCK26_BITS 0xffffffff +#define SIO_SPINLOCK26_RESET 0x00000000 +#define SIO_SPINLOCK26_MSB 31 +#define SIO_SPINLOCK26_LSB 0 +#define SIO_SPINLOCK26_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK27 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK27_OFFSET 0x0000016c +#define SIO_SPINLOCK27_BITS 0xffffffff +#define SIO_SPINLOCK27_RESET 0x00000000 +#define SIO_SPINLOCK27_MSB 31 +#define SIO_SPINLOCK27_LSB 0 +#define SIO_SPINLOCK27_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK28 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK28_OFFSET 0x00000170 +#define SIO_SPINLOCK28_BITS 0xffffffff +#define SIO_SPINLOCK28_RESET 0x00000000 +#define SIO_SPINLOCK28_MSB 31 +#define SIO_SPINLOCK28_LSB 0 +#define SIO_SPINLOCK28_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK29 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK29_OFFSET 0x00000174 +#define SIO_SPINLOCK29_BITS 0xffffffff +#define SIO_SPINLOCK29_RESET 0x00000000 +#define SIO_SPINLOCK29_MSB 31 +#define SIO_SPINLOCK29_LSB 0 +#define SIO_SPINLOCK29_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK30 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK30_OFFSET 0x00000178 +#define SIO_SPINLOCK30_BITS 0xffffffff +#define SIO_SPINLOCK30_RESET 0x00000000 +#define SIO_SPINLOCK30_MSB 31 +#define SIO_SPINLOCK30_LSB 0 +#define SIO_SPINLOCK30_ACCESS "RO" +// ============================================================================= +// Register : SIO_SPINLOCK31 +// Description : Reading from a spinlock address will: +// - Return 0 if lock is already locked +// - Otherwise return nonzero, and simultaneously claim the lock +// +// Writing (any value) releases the lock. +// If core 0 and core 1 attempt to claim the same lock +// simultaneously, core 0 wins. +// The value returned on success is 0x1 << lock number. +#define SIO_SPINLOCK31_OFFSET 0x0000017c +#define SIO_SPINLOCK31_BITS 0xffffffff +#define SIO_SPINLOCK31_RESET 0x00000000 +#define SIO_SPINLOCK31_MSB 31 +#define SIO_SPINLOCK31_LSB 0 +#define SIO_SPINLOCK31_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_SIO_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/spi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/spi.h new file mode 100644 index 0000000000..9670b83097 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/spi.h @@ -0,0 +1,521 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : SPI +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_SPI_DEFINED +#define HARDWARE_REGS_SPI_DEFINED +// ============================================================================= +// Register : SPI_SSPCR0 +// Description : Control register 0, SSPCR0 on page 3-4 +#define SPI_SSPCR0_OFFSET 0x00000000 +#define SPI_SSPCR0_BITS 0x0000ffff +#define SPI_SSPCR0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR0_SCR +// Description : Serial clock rate. The value SCR is used to generate the +// transmit and receive bit rate of the PrimeCell SSP. The bit +// rate is: F SSPCLK CPSDVSR x (1+SCR) where CPSDVSR is an even +// value from 2-254, programmed through the SSPCPSR register and +// SCR is a value from 0-255. +#define SPI_SSPCR0_SCR_RESET 0x00 +#define SPI_SSPCR0_SCR_BITS 0x0000ff00 +#define SPI_SSPCR0_SCR_MSB 15 +#define SPI_SSPCR0_SCR_LSB 8 +#define SPI_SSPCR0_SCR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR0_SPH +// Description : SSPCLKOUT phase, applicable to Motorola SPI frame format only. +// See Motorola SPI frame format on page 2-10. +#define SPI_SSPCR0_SPH_RESET 0x0 +#define SPI_SSPCR0_SPH_BITS 0x00000080 +#define SPI_SSPCR0_SPH_MSB 7 +#define SPI_SSPCR0_SPH_LSB 7 +#define SPI_SSPCR0_SPH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR0_SPO +// Description : SSPCLKOUT polarity, applicable to Motorola SPI frame format +// only. See Motorola SPI frame format on page 2-10. +#define SPI_SSPCR0_SPO_RESET 0x0 +#define SPI_SSPCR0_SPO_BITS 0x00000040 +#define SPI_SSPCR0_SPO_MSB 6 +#define SPI_SSPCR0_SPO_LSB 6 +#define SPI_SSPCR0_SPO_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR0_FRF +// Description : Frame format: 00 Motorola SPI frame format. 01 TI synchronous +// serial frame format. 10 National Microwire frame format. 11 +// Reserved, undefined operation. +#define SPI_SSPCR0_FRF_RESET 0x0 +#define SPI_SSPCR0_FRF_BITS 0x00000030 +#define SPI_SSPCR0_FRF_MSB 5 +#define SPI_SSPCR0_FRF_LSB 4 +#define SPI_SSPCR0_FRF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR0_DSS +// Description : Data Size Select: 0000 Reserved, undefined operation. 0001 +// Reserved, undefined operation. 0010 Reserved, undefined +// operation. 0011 4-bit data. 0100 5-bit data. 0101 6-bit data. +// 0110 7-bit data. 0111 8-bit data. 1000 9-bit data. 1001 10-bit +// data. 1010 11-bit data. 1011 12-bit data. 1100 13-bit data. +// 1101 14-bit data. 1110 15-bit data. 1111 16-bit data. +#define SPI_SSPCR0_DSS_RESET 0x0 +#define SPI_SSPCR0_DSS_BITS 0x0000000f +#define SPI_SSPCR0_DSS_MSB 3 +#define SPI_SSPCR0_DSS_LSB 0 +#define SPI_SSPCR0_DSS_ACCESS "RW" +// ============================================================================= +// Register : SPI_SSPCR1 +// Description : Control register 1, SSPCR1 on page 3-5 +#define SPI_SSPCR1_OFFSET 0x00000004 +#define SPI_SSPCR1_BITS 0x0000000f +#define SPI_SSPCR1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR1_SOD +// Description : Slave-mode output disable. This bit is relevant only in the +// slave mode, MS=1. In multiple-slave systems, it is possible for +// an PrimeCell SSP master to broadcast a message to all slaves in +// the system while ensuring that only one slave drives data onto +// its serial output line. In such systems the RXD lines from +// multiple slaves could be tied together. To operate in such +// systems, the SOD bit can be set if the PrimeCell SSP slave is +// not supposed to drive the SSPTXD line: 0 SSP can drive the +// SSPTXD output in slave mode. 1 SSP must not drive the SSPTXD +// output in slave mode. +#define SPI_SSPCR1_SOD_RESET 0x0 +#define SPI_SSPCR1_SOD_BITS 0x00000008 +#define SPI_SSPCR1_SOD_MSB 3 +#define SPI_SSPCR1_SOD_LSB 3 +#define SPI_SSPCR1_SOD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR1_MS +// Description : Master or slave mode select. This bit can be modified only when +// the PrimeCell SSP is disabled, SSE=0: 0 Device configured as +// master, default. 1 Device configured as slave. +#define SPI_SSPCR1_MS_RESET 0x0 +#define SPI_SSPCR1_MS_BITS 0x00000004 +#define SPI_SSPCR1_MS_MSB 2 +#define SPI_SSPCR1_MS_LSB 2 +#define SPI_SSPCR1_MS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR1_SSE +// Description : Synchronous serial port enable: 0 SSP operation disabled. 1 SSP +// operation enabled. +#define SPI_SSPCR1_SSE_RESET 0x0 +#define SPI_SSPCR1_SSE_BITS 0x00000002 +#define SPI_SSPCR1_SSE_MSB 1 +#define SPI_SSPCR1_SSE_LSB 1 +#define SPI_SSPCR1_SSE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCR1_LBM +// Description : Loop back mode: 0 Normal serial port operation enabled. 1 +// Output of transmit serial shifter is connected to input of +// receive serial shifter internally. +#define SPI_SSPCR1_LBM_RESET 0x0 +#define SPI_SSPCR1_LBM_BITS 0x00000001 +#define SPI_SSPCR1_LBM_MSB 0 +#define SPI_SSPCR1_LBM_LSB 0 +#define SPI_SSPCR1_LBM_ACCESS "RW" +// ============================================================================= +// Register : SPI_SSPDR +// Description : Data register, SSPDR on page 3-6 +#define SPI_SSPDR_OFFSET 0x00000008 +#define SPI_SSPDR_BITS 0x0000ffff +#define SPI_SSPDR_RESET "-" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPDR_DATA +// Description : Transmit/Receive FIFO: Read Receive FIFO. Write Transmit FIFO. +// You must right-justify data when the PrimeCell SSP is +// programmed for a data size that is less than 16 bits. Unused +// bits at the top are ignored by transmit logic. The receive +// logic automatically right-justifies. +#define SPI_SSPDR_DATA_RESET "-" +#define SPI_SSPDR_DATA_BITS 0x0000ffff +#define SPI_SSPDR_DATA_MSB 15 +#define SPI_SSPDR_DATA_LSB 0 +#define SPI_SSPDR_DATA_ACCESS "RWF" +// ============================================================================= +// Register : SPI_SSPSR +// Description : Status register, SSPSR on page 3-7 +#define SPI_SSPSR_OFFSET 0x0000000c +#define SPI_SSPSR_BITS 0x0000001f +#define SPI_SSPSR_RESET 0x00000003 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPSR_BSY +// Description : PrimeCell SSP busy flag, RO: 0 SSP is idle. 1 SSP is currently +// transmitting and/or receiving a frame or the transmit FIFO is +// not empty. +#define SPI_SSPSR_BSY_RESET 0x0 +#define SPI_SSPSR_BSY_BITS 0x00000010 +#define SPI_SSPSR_BSY_MSB 4 +#define SPI_SSPSR_BSY_LSB 4 +#define SPI_SSPSR_BSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPSR_RFF +// Description : Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive +// FIFO is full. +#define SPI_SSPSR_RFF_RESET 0x0 +#define SPI_SSPSR_RFF_BITS 0x00000008 +#define SPI_SSPSR_RFF_MSB 3 +#define SPI_SSPSR_RFF_LSB 3 +#define SPI_SSPSR_RFF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPSR_RNE +// Description : Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive +// FIFO is not empty. +#define SPI_SSPSR_RNE_RESET 0x0 +#define SPI_SSPSR_RNE_BITS 0x00000004 +#define SPI_SSPSR_RNE_MSB 2 +#define SPI_SSPSR_RNE_LSB 2 +#define SPI_SSPSR_RNE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPSR_TNF +// Description : Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit +// FIFO is not full. +#define SPI_SSPSR_TNF_RESET 0x1 +#define SPI_SSPSR_TNF_BITS 0x00000002 +#define SPI_SSPSR_TNF_MSB 1 +#define SPI_SSPSR_TNF_LSB 1 +#define SPI_SSPSR_TNF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPSR_TFE +// Description : Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 +// Transmit FIFO is empty. +#define SPI_SSPSR_TFE_RESET 0x1 +#define SPI_SSPSR_TFE_BITS 0x00000001 +#define SPI_SSPSR_TFE_MSB 0 +#define SPI_SSPSR_TFE_LSB 0 +#define SPI_SSPSR_TFE_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPCPSR +// Description : Clock prescale register, SSPCPSR on page 3-8 +#define SPI_SSPCPSR_OFFSET 0x00000010 +#define SPI_SSPCPSR_BITS 0x000000ff +#define SPI_SSPCPSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPCPSR_CPSDVSR +// Description : Clock prescale divisor. Must be an even number from 2-254, +// depending on the frequency of SSPCLK. The least significant bit +// always returns zero on reads. +#define SPI_SSPCPSR_CPSDVSR_RESET 0x00 +#define SPI_SSPCPSR_CPSDVSR_BITS 0x000000ff +#define SPI_SSPCPSR_CPSDVSR_MSB 7 +#define SPI_SSPCPSR_CPSDVSR_LSB 0 +#define SPI_SSPCPSR_CPSDVSR_ACCESS "RW" +// ============================================================================= +// Register : SPI_SSPIMSC +// Description : Interrupt mask set or clear register, SSPIMSC on page 3-9 +#define SPI_SSPIMSC_OFFSET 0x00000014 +#define SPI_SSPIMSC_BITS 0x0000000f +#define SPI_SSPIMSC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPIMSC_TXIM +// Description : Transmit FIFO interrupt mask: 0 Transmit FIFO half empty or +// less condition interrupt is masked. 1 Transmit FIFO half empty +// or less condition interrupt is not masked. +#define SPI_SSPIMSC_TXIM_RESET 0x0 +#define SPI_SSPIMSC_TXIM_BITS 0x00000008 +#define SPI_SSPIMSC_TXIM_MSB 3 +#define SPI_SSPIMSC_TXIM_LSB 3 +#define SPI_SSPIMSC_TXIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPIMSC_RXIM +// Description : Receive FIFO interrupt mask: 0 Receive FIFO half full or less +// condition interrupt is masked. 1 Receive FIFO half full or less +// condition interrupt is not masked. +#define SPI_SSPIMSC_RXIM_RESET 0x0 +#define SPI_SSPIMSC_RXIM_BITS 0x00000004 +#define SPI_SSPIMSC_RXIM_MSB 2 +#define SPI_SSPIMSC_RXIM_LSB 2 +#define SPI_SSPIMSC_RXIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPIMSC_RTIM +// Description : Receive timeout interrupt mask: 0 Receive FIFO not empty and no +// read prior to timeout period interrupt is masked. 1 Receive +// FIFO not empty and no read prior to timeout period interrupt is +// not masked. +#define SPI_SSPIMSC_RTIM_RESET 0x0 +#define SPI_SSPIMSC_RTIM_BITS 0x00000002 +#define SPI_SSPIMSC_RTIM_MSB 1 +#define SPI_SSPIMSC_RTIM_LSB 1 +#define SPI_SSPIMSC_RTIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPIMSC_RORIM +// Description : Receive overrun interrupt mask: 0 Receive FIFO written to while +// full condition interrupt is masked. 1 Receive FIFO written to +// while full condition interrupt is not masked. +#define SPI_SSPIMSC_RORIM_RESET 0x0 +#define SPI_SSPIMSC_RORIM_BITS 0x00000001 +#define SPI_SSPIMSC_RORIM_MSB 0 +#define SPI_SSPIMSC_RORIM_LSB 0 +#define SPI_SSPIMSC_RORIM_ACCESS "RW" +// ============================================================================= +// Register : SPI_SSPRIS +// Description : Raw interrupt status register, SSPRIS on page 3-10 +#define SPI_SSPRIS_OFFSET 0x00000018 +#define SPI_SSPRIS_BITS 0x0000000f +#define SPI_SSPRIS_RESET 0x00000008 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPRIS_TXRIS +// Description : Gives the raw interrupt state, prior to masking, of the +// SSPTXINTR interrupt +#define SPI_SSPRIS_TXRIS_RESET 0x1 +#define SPI_SSPRIS_TXRIS_BITS 0x00000008 +#define SPI_SSPRIS_TXRIS_MSB 3 +#define SPI_SSPRIS_TXRIS_LSB 3 +#define SPI_SSPRIS_TXRIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPRIS_RXRIS +// Description : Gives the raw interrupt state, prior to masking, of the +// SSPRXINTR interrupt +#define SPI_SSPRIS_RXRIS_RESET 0x0 +#define SPI_SSPRIS_RXRIS_BITS 0x00000004 +#define SPI_SSPRIS_RXRIS_MSB 2 +#define SPI_SSPRIS_RXRIS_LSB 2 +#define SPI_SSPRIS_RXRIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPRIS_RTRIS +// Description : Gives the raw interrupt state, prior to masking, of the +// SSPRTINTR interrupt +#define SPI_SSPRIS_RTRIS_RESET 0x0 +#define SPI_SSPRIS_RTRIS_BITS 0x00000002 +#define SPI_SSPRIS_RTRIS_MSB 1 +#define SPI_SSPRIS_RTRIS_LSB 1 +#define SPI_SSPRIS_RTRIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPRIS_RORRIS +// Description : Gives the raw interrupt state, prior to masking, of the +// SSPRORINTR interrupt +#define SPI_SSPRIS_RORRIS_RESET 0x0 +#define SPI_SSPRIS_RORRIS_BITS 0x00000001 +#define SPI_SSPRIS_RORRIS_MSB 0 +#define SPI_SSPRIS_RORRIS_LSB 0 +#define SPI_SSPRIS_RORRIS_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPMIS +// Description : Masked interrupt status register, SSPMIS on page 3-11 +#define SPI_SSPMIS_OFFSET 0x0000001c +#define SPI_SSPMIS_BITS 0x0000000f +#define SPI_SSPMIS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPMIS_TXMIS +// Description : Gives the transmit FIFO masked interrupt state, after masking, +// of the SSPTXINTR interrupt +#define SPI_SSPMIS_TXMIS_RESET 0x0 +#define SPI_SSPMIS_TXMIS_BITS 0x00000008 +#define SPI_SSPMIS_TXMIS_MSB 3 +#define SPI_SSPMIS_TXMIS_LSB 3 +#define SPI_SSPMIS_TXMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPMIS_RXMIS +// Description : Gives the receive FIFO masked interrupt state, after masking, +// of the SSPRXINTR interrupt +#define SPI_SSPMIS_RXMIS_RESET 0x0 +#define SPI_SSPMIS_RXMIS_BITS 0x00000004 +#define SPI_SSPMIS_RXMIS_MSB 2 +#define SPI_SSPMIS_RXMIS_LSB 2 +#define SPI_SSPMIS_RXMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPMIS_RTMIS +// Description : Gives the receive timeout masked interrupt state, after +// masking, of the SSPRTINTR interrupt +#define SPI_SSPMIS_RTMIS_RESET 0x0 +#define SPI_SSPMIS_RTMIS_BITS 0x00000002 +#define SPI_SSPMIS_RTMIS_MSB 1 +#define SPI_SSPMIS_RTMIS_LSB 1 +#define SPI_SSPMIS_RTMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPMIS_RORMIS +// Description : Gives the receive over run masked interrupt status, after +// masking, of the SSPRORINTR interrupt +#define SPI_SSPMIS_RORMIS_RESET 0x0 +#define SPI_SSPMIS_RORMIS_BITS 0x00000001 +#define SPI_SSPMIS_RORMIS_MSB 0 +#define SPI_SSPMIS_RORMIS_LSB 0 +#define SPI_SSPMIS_RORMIS_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPICR +// Description : Interrupt clear register, SSPICR on page 3-11 +#define SPI_SSPICR_OFFSET 0x00000020 +#define SPI_SSPICR_BITS 0x00000003 +#define SPI_SSPICR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPICR_RTIC +// Description : Clears the SSPRTINTR interrupt +#define SPI_SSPICR_RTIC_RESET 0x0 +#define SPI_SSPICR_RTIC_BITS 0x00000002 +#define SPI_SSPICR_RTIC_MSB 1 +#define SPI_SSPICR_RTIC_LSB 1 +#define SPI_SSPICR_RTIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPICR_RORIC +// Description : Clears the SSPRORINTR interrupt +#define SPI_SSPICR_RORIC_RESET 0x0 +#define SPI_SSPICR_RORIC_BITS 0x00000001 +#define SPI_SSPICR_RORIC_MSB 0 +#define SPI_SSPICR_RORIC_LSB 0 +#define SPI_SSPICR_RORIC_ACCESS "WC" +// ============================================================================= +// Register : SPI_SSPDMACR +// Description : DMA control register, SSPDMACR on page 3-12 +#define SPI_SSPDMACR_OFFSET 0x00000024 +#define SPI_SSPDMACR_BITS 0x00000003 +#define SPI_SSPDMACR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPDMACR_TXDMAE +// Description : Transmit DMA Enable. If this bit is set to 1, DMA for the +// transmit FIFO is enabled. +#define SPI_SSPDMACR_TXDMAE_RESET 0x0 +#define SPI_SSPDMACR_TXDMAE_BITS 0x00000002 +#define SPI_SSPDMACR_TXDMAE_MSB 1 +#define SPI_SSPDMACR_TXDMAE_LSB 1 +#define SPI_SSPDMACR_TXDMAE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPDMACR_RXDMAE +// Description : Receive DMA Enable. If this bit is set to 1, DMA for the +// receive FIFO is enabled. +#define SPI_SSPDMACR_RXDMAE_RESET 0x0 +#define SPI_SSPDMACR_RXDMAE_BITS 0x00000001 +#define SPI_SSPDMACR_RXDMAE_MSB 0 +#define SPI_SSPDMACR_RXDMAE_LSB 0 +#define SPI_SSPDMACR_RXDMAE_ACCESS "RW" +// ============================================================================= +// Register : SPI_SSPPERIPHID0 +// Description : Peripheral identification registers, SSPPeriphID0-3 on page +// 3-13 +#define SPI_SSPPERIPHID0_OFFSET 0x00000fe0 +#define SPI_SSPPERIPHID0_BITS 0x000000ff +#define SPI_SSPPERIPHID0_RESET 0x00000022 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPERIPHID0_PARTNUMBER0 +// Description : These bits read back as 0x22 +#define SPI_SSPPERIPHID0_PARTNUMBER0_RESET 0x22 +#define SPI_SSPPERIPHID0_PARTNUMBER0_BITS 0x000000ff +#define SPI_SSPPERIPHID0_PARTNUMBER0_MSB 7 +#define SPI_SSPPERIPHID0_PARTNUMBER0_LSB 0 +#define SPI_SSPPERIPHID0_PARTNUMBER0_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPERIPHID1 +// Description : Peripheral identification registers, SSPPeriphID0-3 on page +// 3-13 +#define SPI_SSPPERIPHID1_OFFSET 0x00000fe4 +#define SPI_SSPPERIPHID1_BITS 0x000000ff +#define SPI_SSPPERIPHID1_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPERIPHID1_DESIGNER0 +// Description : These bits read back as 0x1 +#define SPI_SSPPERIPHID1_DESIGNER0_RESET 0x1 +#define SPI_SSPPERIPHID1_DESIGNER0_BITS 0x000000f0 +#define SPI_SSPPERIPHID1_DESIGNER0_MSB 7 +#define SPI_SSPPERIPHID1_DESIGNER0_LSB 4 +#define SPI_SSPPERIPHID1_DESIGNER0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPERIPHID1_PARTNUMBER1 +// Description : These bits read back as 0x0 +#define SPI_SSPPERIPHID1_PARTNUMBER1_RESET 0x0 +#define SPI_SSPPERIPHID1_PARTNUMBER1_BITS 0x0000000f +#define SPI_SSPPERIPHID1_PARTNUMBER1_MSB 3 +#define SPI_SSPPERIPHID1_PARTNUMBER1_LSB 0 +#define SPI_SSPPERIPHID1_PARTNUMBER1_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPERIPHID2 +// Description : Peripheral identification registers, SSPPeriphID0-3 on page +// 3-13 +#define SPI_SSPPERIPHID2_OFFSET 0x00000fe8 +#define SPI_SSPPERIPHID2_BITS 0x000000ff +#define SPI_SSPPERIPHID2_RESET 0x00000034 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPERIPHID2_REVISION +// Description : These bits return the peripheral revision +#define SPI_SSPPERIPHID2_REVISION_RESET 0x3 +#define SPI_SSPPERIPHID2_REVISION_BITS 0x000000f0 +#define SPI_SSPPERIPHID2_REVISION_MSB 7 +#define SPI_SSPPERIPHID2_REVISION_LSB 4 +#define SPI_SSPPERIPHID2_REVISION_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPERIPHID2_DESIGNER1 +// Description : These bits read back as 0x4 +#define SPI_SSPPERIPHID2_DESIGNER1_RESET 0x4 +#define SPI_SSPPERIPHID2_DESIGNER1_BITS 0x0000000f +#define SPI_SSPPERIPHID2_DESIGNER1_MSB 3 +#define SPI_SSPPERIPHID2_DESIGNER1_LSB 0 +#define SPI_SSPPERIPHID2_DESIGNER1_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPERIPHID3 +// Description : Peripheral identification registers, SSPPeriphID0-3 on page +// 3-13 +#define SPI_SSPPERIPHID3_OFFSET 0x00000fec +#define SPI_SSPPERIPHID3_BITS 0x000000ff +#define SPI_SSPPERIPHID3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPERIPHID3_CONFIGURATION +// Description : These bits read back as 0x00 +#define SPI_SSPPERIPHID3_CONFIGURATION_RESET 0x00 +#define SPI_SSPPERIPHID3_CONFIGURATION_BITS 0x000000ff +#define SPI_SSPPERIPHID3_CONFIGURATION_MSB 7 +#define SPI_SSPPERIPHID3_CONFIGURATION_LSB 0 +#define SPI_SSPPERIPHID3_CONFIGURATION_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPCELLID0 +// Description : PrimeCell identification registers, SSPPCellID0-3 on page 3-16 +#define SPI_SSPPCELLID0_OFFSET 0x00000ff0 +#define SPI_SSPPCELLID0_BITS 0x000000ff +#define SPI_SSPPCELLID0_RESET 0x0000000d +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPCELLID0_SSPPCELLID0 +// Description : These bits read back as 0x0D +#define SPI_SSPPCELLID0_SSPPCELLID0_RESET 0x0d +#define SPI_SSPPCELLID0_SSPPCELLID0_BITS 0x000000ff +#define SPI_SSPPCELLID0_SSPPCELLID0_MSB 7 +#define SPI_SSPPCELLID0_SSPPCELLID0_LSB 0 +#define SPI_SSPPCELLID0_SSPPCELLID0_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPCELLID1 +// Description : PrimeCell identification registers, SSPPCellID0-3 on page 3-16 +#define SPI_SSPPCELLID1_OFFSET 0x00000ff4 +#define SPI_SSPPCELLID1_BITS 0x000000ff +#define SPI_SSPPCELLID1_RESET 0x000000f0 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPCELLID1_SSPPCELLID1 +// Description : These bits read back as 0xF0 +#define SPI_SSPPCELLID1_SSPPCELLID1_RESET 0xf0 +#define SPI_SSPPCELLID1_SSPPCELLID1_BITS 0x000000ff +#define SPI_SSPPCELLID1_SSPPCELLID1_MSB 7 +#define SPI_SSPPCELLID1_SSPPCELLID1_LSB 0 +#define SPI_SSPPCELLID1_SSPPCELLID1_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPCELLID2 +// Description : PrimeCell identification registers, SSPPCellID0-3 on page 3-16 +#define SPI_SSPPCELLID2_OFFSET 0x00000ff8 +#define SPI_SSPPCELLID2_BITS 0x000000ff +#define SPI_SSPPCELLID2_RESET 0x00000005 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPCELLID2_SSPPCELLID2 +// Description : These bits read back as 0x05 +#define SPI_SSPPCELLID2_SSPPCELLID2_RESET 0x05 +#define SPI_SSPPCELLID2_SSPPCELLID2_BITS 0x000000ff +#define SPI_SSPPCELLID2_SSPPCELLID2_MSB 7 +#define SPI_SSPPCELLID2_SSPPCELLID2_LSB 0 +#define SPI_SSPPCELLID2_SSPPCELLID2_ACCESS "RO" +// ============================================================================= +// Register : SPI_SSPPCELLID3 +// Description : PrimeCell identification registers, SSPPCellID0-3 on page 3-16 +#define SPI_SSPPCELLID3_OFFSET 0x00000ffc +#define SPI_SSPPCELLID3_BITS 0x000000ff +#define SPI_SSPPCELLID3_RESET 0x000000b1 +// ----------------------------------------------------------------------------- +// Field : SPI_SSPPCELLID3_SSPPCELLID3 +// Description : These bits read back as 0xB1 +#define SPI_SSPPCELLID3_SSPPCELLID3_RESET 0xb1 +#define SPI_SSPPCELLID3_SSPPCELLID3_BITS 0x000000ff +#define SPI_SSPPCELLID3_SSPPCELLID3_MSB 7 +#define SPI_SSPPCELLID3_SSPPCELLID3_LSB 0 +#define SPI_SSPPCELLID3_SSPPCELLID3_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_SPI_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/ssi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/ssi.h new file mode 100644 index 0000000000..04eeccaf50 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/ssi.h @@ -0,0 +1,809 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : SSI +// Version : 1 +// Bus type : apb +// Description : DW_apb_ssi has the following features: +// * APB interface – Allows for easy integration into a +// DesignWare Synthesizable Components for AMBA 2 +// implementation. +// * APB3 and APB4 protocol support. +// * Scalable APB data bus width – Supports APB data bus widths +// of 8, 16, and 32 bits. +// * Serial-master or serial-slave operation – Enables serial +// communication with serial-master or serial-slave peripheral +// devices. +// * Programmable Dual/Quad/Octal SPI support in Master Mode. +// * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - +// Enables the DW_apb_ssi master to perform operations with the +// device in DDR and RDS modes when working in Dual/Quad/Octal +// mode of operation. +// * Data Mask Support - Enables the DW_apb_ssi to selectively +// update the bytes in the device. This feature is applicable +// only in enhanced SPI modes. +// * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi +// master to behave as a memory mapped I/O and fetches the data +// from the device based on the APB read request. This feature +// is applicable only in enhanced SPI modes. +// * DMA Controller Interface – Enables the DW_apb_ssi to +// interface to a DMA controller over the bus using a +// handshaking interface for transfer requests. +// * Independent masking of interrupts – Master collision, +// transmit FIFO overflow, transmit FIFO empty, receive FIFO +// full, receive FIFO underflow, and receive FIFO overflow +// interrupts can all be masked independently. +// * Multi-master contention detection – Informs the processor +// of multiple serial-master accesses on the serial bus. +// * Bypass of meta-stability flip-flops for synchronous clocks +// – When the APB clock (pclk) and the DW_apb_ssi serial clock +// (ssi_clk) are synchronous, meta-stable flip-flops are not +// used when transferring control signals across these clock +// domains. +// * Programmable delay on the sample time of the received +// serial data bit (rxd); enables programmable control of +// routing delays resulting in higher serial data-bit rates. +// * Programmable features: +// - Serial interface operation – Choice of Motorola SPI, Texas +// Instruments Synchronous Serial Protocol or National +// Semiconductor Microwire. +// - Clock bit-rate – Dynamic control of the serial bit rate of +// the data transfer; used in only serial-master mode of +// operation. +// - Data Item size (4 to 32 bits) – Item size of each data +// transfer under the control of the programmer. +// * Configured features: +// - FIFO depth – 16 words deep. The FIFO width is fixed at 32 +// bits. +// - 1 slave select output. +// - Hardware slave-select – Dedicated hardware slave-select +// line. +// - Combined interrupt line - one combined interrupt line from +// the DW_apb_ssi to the interrupt controller. +// - Interrupt polarity – active high interrupt lines. +// - Serial clock polarity – low serial-clock polarity directly +// after reset. +// - Serial clock phase – capture on first edge of serial-clock +// directly after reset. +// ============================================================================= +#ifndef HARDWARE_REGS_SSI_DEFINED +#define HARDWARE_REGS_SSI_DEFINED +// ============================================================================= +// Register : SSI_CTRLR0 +// Description : Control register 0 +#define SSI_CTRLR0_OFFSET 0x00000000 +#define SSI_CTRLR0_BITS 0x017fffff +#define SSI_CTRLR0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_SSTE +// Description : Slave select toggle enable +#define SSI_CTRLR0_SSTE_RESET 0x0 +#define SSI_CTRLR0_SSTE_BITS 0x01000000 +#define SSI_CTRLR0_SSTE_MSB 24 +#define SSI_CTRLR0_SSTE_LSB 24 +#define SSI_CTRLR0_SSTE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_SPI_FRF +// Description : SPI frame format +// 0x0 -> Standard 1-bit SPI frame format; 1 bit per SCK, +// full-duplex +// 0x1 -> Dual-SPI frame format; two bits per SCK, half-duplex +// 0x2 -> Quad-SPI frame format; four bits per SCK, half-duplex +#define SSI_CTRLR0_SPI_FRF_RESET 0x0 +#define SSI_CTRLR0_SPI_FRF_BITS 0x00600000 +#define SSI_CTRLR0_SPI_FRF_MSB 22 +#define SSI_CTRLR0_SPI_FRF_LSB 21 +#define SSI_CTRLR0_SPI_FRF_ACCESS "RW" +#define SSI_CTRLR0_SPI_FRF_VALUE_STD 0x0 +#define SSI_CTRLR0_SPI_FRF_VALUE_DUAL 0x1 +#define SSI_CTRLR0_SPI_FRF_VALUE_QUAD 0x2 +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_DFS_32 +// Description : Data frame size in 32b transfer mode +// Value of n -> n+1 clocks per frame. +#define SSI_CTRLR0_DFS_32_RESET 0x00 +#define SSI_CTRLR0_DFS_32_BITS 0x001f0000 +#define SSI_CTRLR0_DFS_32_MSB 20 +#define SSI_CTRLR0_DFS_32_LSB 16 +#define SSI_CTRLR0_DFS_32_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_CFS +// Description : Control frame size +// Value of n -> n+1 clocks per frame. +#define SSI_CTRLR0_CFS_RESET 0x0 +#define SSI_CTRLR0_CFS_BITS 0x0000f000 +#define SSI_CTRLR0_CFS_MSB 15 +#define SSI_CTRLR0_CFS_LSB 12 +#define SSI_CTRLR0_CFS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_SRL +// Description : Shift register loop (test mode) +#define SSI_CTRLR0_SRL_RESET 0x0 +#define SSI_CTRLR0_SRL_BITS 0x00000800 +#define SSI_CTRLR0_SRL_MSB 11 +#define SSI_CTRLR0_SRL_LSB 11 +#define SSI_CTRLR0_SRL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_SLV_OE +// Description : Slave output enable +#define SSI_CTRLR0_SLV_OE_RESET 0x0 +#define SSI_CTRLR0_SLV_OE_BITS 0x00000400 +#define SSI_CTRLR0_SLV_OE_MSB 10 +#define SSI_CTRLR0_SLV_OE_LSB 10 +#define SSI_CTRLR0_SLV_OE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_TMOD +// Description : Transfer mode +// 0x0 -> Both transmit and receive +// 0x1 -> Transmit only (not for FRF == 0, standard SPI mode) +// 0x2 -> Receive only (not for FRF == 0, standard SPI mode) +// 0x3 -> EEPROM read mode (TX then RX; RX starts after control +// data TX'd) +#define SSI_CTRLR0_TMOD_RESET 0x0 +#define SSI_CTRLR0_TMOD_BITS 0x00000300 +#define SSI_CTRLR0_TMOD_MSB 9 +#define SSI_CTRLR0_TMOD_LSB 8 +#define SSI_CTRLR0_TMOD_ACCESS "RW" +#define SSI_CTRLR0_TMOD_VALUE_TX_AND_RX 0x0 +#define SSI_CTRLR0_TMOD_VALUE_TX_ONLY 0x1 +#define SSI_CTRLR0_TMOD_VALUE_RX_ONLY 0x2 +#define SSI_CTRLR0_TMOD_VALUE_EEPROM_READ 0x3 +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_SCPOL +// Description : Serial clock polarity +#define SSI_CTRLR0_SCPOL_RESET 0x0 +#define SSI_CTRLR0_SCPOL_BITS 0x00000080 +#define SSI_CTRLR0_SCPOL_MSB 7 +#define SSI_CTRLR0_SCPOL_LSB 7 +#define SSI_CTRLR0_SCPOL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_SCPH +// Description : Serial clock phase +#define SSI_CTRLR0_SCPH_RESET 0x0 +#define SSI_CTRLR0_SCPH_BITS 0x00000040 +#define SSI_CTRLR0_SCPH_MSB 6 +#define SSI_CTRLR0_SCPH_LSB 6 +#define SSI_CTRLR0_SCPH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_FRF +// Description : Frame format +#define SSI_CTRLR0_FRF_RESET 0x0 +#define SSI_CTRLR0_FRF_BITS 0x00000030 +#define SSI_CTRLR0_FRF_MSB 5 +#define SSI_CTRLR0_FRF_LSB 4 +#define SSI_CTRLR0_FRF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR0_DFS +// Description : Data frame size +#define SSI_CTRLR0_DFS_RESET 0x0 +#define SSI_CTRLR0_DFS_BITS 0x0000000f +#define SSI_CTRLR0_DFS_MSB 3 +#define SSI_CTRLR0_DFS_LSB 0 +#define SSI_CTRLR0_DFS_ACCESS "RW" +// ============================================================================= +// Register : SSI_CTRLR1 +// Description : Master Control register 1 +#define SSI_CTRLR1_OFFSET 0x00000004 +#define SSI_CTRLR1_BITS 0x0000ffff +#define SSI_CTRLR1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_CTRLR1_NDF +// Description : Number of data frames +#define SSI_CTRLR1_NDF_RESET 0x0000 +#define SSI_CTRLR1_NDF_BITS 0x0000ffff +#define SSI_CTRLR1_NDF_MSB 15 +#define SSI_CTRLR1_NDF_LSB 0 +#define SSI_CTRLR1_NDF_ACCESS "RW" +// ============================================================================= +// Register : SSI_SSIENR +// Description : SSI Enable +#define SSI_SSIENR_OFFSET 0x00000008 +#define SSI_SSIENR_BITS 0x00000001 +#define SSI_SSIENR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_SSIENR_SSI_EN +// Description : SSI enable +#define SSI_SSIENR_SSI_EN_RESET 0x0 +#define SSI_SSIENR_SSI_EN_BITS 0x00000001 +#define SSI_SSIENR_SSI_EN_MSB 0 +#define SSI_SSIENR_SSI_EN_LSB 0 +#define SSI_SSIENR_SSI_EN_ACCESS "RW" +// ============================================================================= +// Register : SSI_MWCR +// Description : Microwire Control +#define SSI_MWCR_OFFSET 0x0000000c +#define SSI_MWCR_BITS 0x00000007 +#define SSI_MWCR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_MWCR_MHS +// Description : Microwire handshaking +#define SSI_MWCR_MHS_RESET 0x0 +#define SSI_MWCR_MHS_BITS 0x00000004 +#define SSI_MWCR_MHS_MSB 2 +#define SSI_MWCR_MHS_LSB 2 +#define SSI_MWCR_MHS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_MWCR_MDD +// Description : Microwire control +#define SSI_MWCR_MDD_RESET 0x0 +#define SSI_MWCR_MDD_BITS 0x00000002 +#define SSI_MWCR_MDD_MSB 1 +#define SSI_MWCR_MDD_LSB 1 +#define SSI_MWCR_MDD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_MWCR_MWMOD +// Description : Microwire transfer mode +#define SSI_MWCR_MWMOD_RESET 0x0 +#define SSI_MWCR_MWMOD_BITS 0x00000001 +#define SSI_MWCR_MWMOD_MSB 0 +#define SSI_MWCR_MWMOD_LSB 0 +#define SSI_MWCR_MWMOD_ACCESS "RW" +// ============================================================================= +// Register : SSI_SER +// Description : Slave enable +// For each bit: +// 0 -> slave not selected +// 1 -> slave selected +#define SSI_SER_OFFSET 0x00000010 +#define SSI_SER_BITS 0x00000001 +#define SSI_SER_RESET 0x00000000 +#define SSI_SER_MSB 0 +#define SSI_SER_LSB 0 +#define SSI_SER_ACCESS "RW" +// ============================================================================= +// Register : SSI_BAUDR +// Description : Baud rate +#define SSI_BAUDR_OFFSET 0x00000014 +#define SSI_BAUDR_BITS 0x0000ffff +#define SSI_BAUDR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_BAUDR_SCKDV +// Description : SSI clock divider +#define SSI_BAUDR_SCKDV_RESET 0x0000 +#define SSI_BAUDR_SCKDV_BITS 0x0000ffff +#define SSI_BAUDR_SCKDV_MSB 15 +#define SSI_BAUDR_SCKDV_LSB 0 +#define SSI_BAUDR_SCKDV_ACCESS "RW" +// ============================================================================= +// Register : SSI_TXFTLR +// Description : TX FIFO threshold level +#define SSI_TXFTLR_OFFSET 0x00000018 +#define SSI_TXFTLR_BITS 0x000000ff +#define SSI_TXFTLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_TXFTLR_TFT +// Description : Transmit FIFO threshold +#define SSI_TXFTLR_TFT_RESET 0x00 +#define SSI_TXFTLR_TFT_BITS 0x000000ff +#define SSI_TXFTLR_TFT_MSB 7 +#define SSI_TXFTLR_TFT_LSB 0 +#define SSI_TXFTLR_TFT_ACCESS "RW" +// ============================================================================= +// Register : SSI_RXFTLR +// Description : RX FIFO threshold level +#define SSI_RXFTLR_OFFSET 0x0000001c +#define SSI_RXFTLR_BITS 0x000000ff +#define SSI_RXFTLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_RXFTLR_RFT +// Description : Receive FIFO threshold +#define SSI_RXFTLR_RFT_RESET 0x00 +#define SSI_RXFTLR_RFT_BITS 0x000000ff +#define SSI_RXFTLR_RFT_MSB 7 +#define SSI_RXFTLR_RFT_LSB 0 +#define SSI_RXFTLR_RFT_ACCESS "RW" +// ============================================================================= +// Register : SSI_TXFLR +// Description : TX FIFO level +#define SSI_TXFLR_OFFSET 0x00000020 +#define SSI_TXFLR_BITS 0x000000ff +#define SSI_TXFLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_TXFLR_TFTFL +// Description : Transmit FIFO level +#define SSI_TXFLR_TFTFL_RESET 0x00 +#define SSI_TXFLR_TFTFL_BITS 0x000000ff +#define SSI_TXFLR_TFTFL_MSB 7 +#define SSI_TXFLR_TFTFL_LSB 0 +#define SSI_TXFLR_TFTFL_ACCESS "RO" +// ============================================================================= +// Register : SSI_RXFLR +// Description : RX FIFO level +#define SSI_RXFLR_OFFSET 0x00000024 +#define SSI_RXFLR_BITS 0x000000ff +#define SSI_RXFLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_RXFLR_RXTFL +// Description : Receive FIFO level +#define SSI_RXFLR_RXTFL_RESET 0x00 +#define SSI_RXFLR_RXTFL_BITS 0x000000ff +#define SSI_RXFLR_RXTFL_MSB 7 +#define SSI_RXFLR_RXTFL_LSB 0 +#define SSI_RXFLR_RXTFL_ACCESS "RO" +// ============================================================================= +// Register : SSI_SR +// Description : Status register +#define SSI_SR_OFFSET 0x00000028 +#define SSI_SR_BITS 0x0000007f +#define SSI_SR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_SR_DCOL +// Description : Data collision error +#define SSI_SR_DCOL_RESET 0x0 +#define SSI_SR_DCOL_BITS 0x00000040 +#define SSI_SR_DCOL_MSB 6 +#define SSI_SR_DCOL_LSB 6 +#define SSI_SR_DCOL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_SR_TXE +// Description : Transmission error +#define SSI_SR_TXE_RESET 0x0 +#define SSI_SR_TXE_BITS 0x00000020 +#define SSI_SR_TXE_MSB 5 +#define SSI_SR_TXE_LSB 5 +#define SSI_SR_TXE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_SR_RFF +// Description : Receive FIFO full +#define SSI_SR_RFF_RESET 0x0 +#define SSI_SR_RFF_BITS 0x00000010 +#define SSI_SR_RFF_MSB 4 +#define SSI_SR_RFF_LSB 4 +#define SSI_SR_RFF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_SR_RFNE +// Description : Receive FIFO not empty +#define SSI_SR_RFNE_RESET 0x0 +#define SSI_SR_RFNE_BITS 0x00000008 +#define SSI_SR_RFNE_MSB 3 +#define SSI_SR_RFNE_LSB 3 +#define SSI_SR_RFNE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_SR_TFE +// Description : Transmit FIFO empty +#define SSI_SR_TFE_RESET 0x0 +#define SSI_SR_TFE_BITS 0x00000004 +#define SSI_SR_TFE_MSB 2 +#define SSI_SR_TFE_LSB 2 +#define SSI_SR_TFE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_SR_TFNF +// Description : Transmit FIFO not full +#define SSI_SR_TFNF_RESET 0x0 +#define SSI_SR_TFNF_BITS 0x00000002 +#define SSI_SR_TFNF_MSB 1 +#define SSI_SR_TFNF_LSB 1 +#define SSI_SR_TFNF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_SR_BUSY +// Description : SSI busy flag +#define SSI_SR_BUSY_RESET 0x0 +#define SSI_SR_BUSY_BITS 0x00000001 +#define SSI_SR_BUSY_MSB 0 +#define SSI_SR_BUSY_LSB 0 +#define SSI_SR_BUSY_ACCESS "RO" +// ============================================================================= +// Register : SSI_IMR +// Description : Interrupt mask +#define SSI_IMR_OFFSET 0x0000002c +#define SSI_IMR_BITS 0x0000003f +#define SSI_IMR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_IMR_MSTIM +// Description : Multi-master contention interrupt mask +#define SSI_IMR_MSTIM_RESET 0x0 +#define SSI_IMR_MSTIM_BITS 0x00000020 +#define SSI_IMR_MSTIM_MSB 5 +#define SSI_IMR_MSTIM_LSB 5 +#define SSI_IMR_MSTIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_IMR_RXFIM +// Description : Receive FIFO full interrupt mask +#define SSI_IMR_RXFIM_RESET 0x0 +#define SSI_IMR_RXFIM_BITS 0x00000010 +#define SSI_IMR_RXFIM_MSB 4 +#define SSI_IMR_RXFIM_LSB 4 +#define SSI_IMR_RXFIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_IMR_RXOIM +// Description : Receive FIFO overflow interrupt mask +#define SSI_IMR_RXOIM_RESET 0x0 +#define SSI_IMR_RXOIM_BITS 0x00000008 +#define SSI_IMR_RXOIM_MSB 3 +#define SSI_IMR_RXOIM_LSB 3 +#define SSI_IMR_RXOIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_IMR_RXUIM +// Description : Receive FIFO underflow interrupt mask +#define SSI_IMR_RXUIM_RESET 0x0 +#define SSI_IMR_RXUIM_BITS 0x00000004 +#define SSI_IMR_RXUIM_MSB 2 +#define SSI_IMR_RXUIM_LSB 2 +#define SSI_IMR_RXUIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_IMR_TXOIM +// Description : Transmit FIFO overflow interrupt mask +#define SSI_IMR_TXOIM_RESET 0x0 +#define SSI_IMR_TXOIM_BITS 0x00000002 +#define SSI_IMR_TXOIM_MSB 1 +#define SSI_IMR_TXOIM_LSB 1 +#define SSI_IMR_TXOIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_IMR_TXEIM +// Description : Transmit FIFO empty interrupt mask +#define SSI_IMR_TXEIM_RESET 0x0 +#define SSI_IMR_TXEIM_BITS 0x00000001 +#define SSI_IMR_TXEIM_MSB 0 +#define SSI_IMR_TXEIM_LSB 0 +#define SSI_IMR_TXEIM_ACCESS "RW" +// ============================================================================= +// Register : SSI_ISR +// Description : Interrupt status +#define SSI_ISR_OFFSET 0x00000030 +#define SSI_ISR_BITS 0x0000003f +#define SSI_ISR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_ISR_MSTIS +// Description : Multi-master contention interrupt status +#define SSI_ISR_MSTIS_RESET 0x0 +#define SSI_ISR_MSTIS_BITS 0x00000020 +#define SSI_ISR_MSTIS_MSB 5 +#define SSI_ISR_MSTIS_LSB 5 +#define SSI_ISR_MSTIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_ISR_RXFIS +// Description : Receive FIFO full interrupt status +#define SSI_ISR_RXFIS_RESET 0x0 +#define SSI_ISR_RXFIS_BITS 0x00000010 +#define SSI_ISR_RXFIS_MSB 4 +#define SSI_ISR_RXFIS_LSB 4 +#define SSI_ISR_RXFIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_ISR_RXOIS +// Description : Receive FIFO overflow interrupt status +#define SSI_ISR_RXOIS_RESET 0x0 +#define SSI_ISR_RXOIS_BITS 0x00000008 +#define SSI_ISR_RXOIS_MSB 3 +#define SSI_ISR_RXOIS_LSB 3 +#define SSI_ISR_RXOIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_ISR_RXUIS +// Description : Receive FIFO underflow interrupt status +#define SSI_ISR_RXUIS_RESET 0x0 +#define SSI_ISR_RXUIS_BITS 0x00000004 +#define SSI_ISR_RXUIS_MSB 2 +#define SSI_ISR_RXUIS_LSB 2 +#define SSI_ISR_RXUIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_ISR_TXOIS +// Description : Transmit FIFO overflow interrupt status +#define SSI_ISR_TXOIS_RESET 0x0 +#define SSI_ISR_TXOIS_BITS 0x00000002 +#define SSI_ISR_TXOIS_MSB 1 +#define SSI_ISR_TXOIS_LSB 1 +#define SSI_ISR_TXOIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_ISR_TXEIS +// Description : Transmit FIFO empty interrupt status +#define SSI_ISR_TXEIS_RESET 0x0 +#define SSI_ISR_TXEIS_BITS 0x00000001 +#define SSI_ISR_TXEIS_MSB 0 +#define SSI_ISR_TXEIS_LSB 0 +#define SSI_ISR_TXEIS_ACCESS "RO" +// ============================================================================= +// Register : SSI_RISR +// Description : Raw interrupt status +#define SSI_RISR_OFFSET 0x00000034 +#define SSI_RISR_BITS 0x0000003f +#define SSI_RISR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_RISR_MSTIR +// Description : Multi-master contention raw interrupt status +#define SSI_RISR_MSTIR_RESET 0x0 +#define SSI_RISR_MSTIR_BITS 0x00000020 +#define SSI_RISR_MSTIR_MSB 5 +#define SSI_RISR_MSTIR_LSB 5 +#define SSI_RISR_MSTIR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_RISR_RXFIR +// Description : Receive FIFO full raw interrupt status +#define SSI_RISR_RXFIR_RESET 0x0 +#define SSI_RISR_RXFIR_BITS 0x00000010 +#define SSI_RISR_RXFIR_MSB 4 +#define SSI_RISR_RXFIR_LSB 4 +#define SSI_RISR_RXFIR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_RISR_RXOIR +// Description : Receive FIFO overflow raw interrupt status +#define SSI_RISR_RXOIR_RESET 0x0 +#define SSI_RISR_RXOIR_BITS 0x00000008 +#define SSI_RISR_RXOIR_MSB 3 +#define SSI_RISR_RXOIR_LSB 3 +#define SSI_RISR_RXOIR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_RISR_RXUIR +// Description : Receive FIFO underflow raw interrupt status +#define SSI_RISR_RXUIR_RESET 0x0 +#define SSI_RISR_RXUIR_BITS 0x00000004 +#define SSI_RISR_RXUIR_MSB 2 +#define SSI_RISR_RXUIR_LSB 2 +#define SSI_RISR_RXUIR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_RISR_TXOIR +// Description : Transmit FIFO overflow raw interrupt status +#define SSI_RISR_TXOIR_RESET 0x0 +#define SSI_RISR_TXOIR_BITS 0x00000002 +#define SSI_RISR_TXOIR_MSB 1 +#define SSI_RISR_TXOIR_LSB 1 +#define SSI_RISR_TXOIR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SSI_RISR_TXEIR +// Description : Transmit FIFO empty raw interrupt status +#define SSI_RISR_TXEIR_RESET 0x0 +#define SSI_RISR_TXEIR_BITS 0x00000001 +#define SSI_RISR_TXEIR_MSB 0 +#define SSI_RISR_TXEIR_LSB 0 +#define SSI_RISR_TXEIR_ACCESS "RO" +// ============================================================================= +// Register : SSI_TXOICR +// Description : TX FIFO overflow interrupt clear +// Clear-on-read transmit FIFO overflow interrupt +#define SSI_TXOICR_OFFSET 0x00000038 +#define SSI_TXOICR_BITS 0x00000001 +#define SSI_TXOICR_RESET 0x00000000 +#define SSI_TXOICR_MSB 0 +#define SSI_TXOICR_LSB 0 +#define SSI_TXOICR_ACCESS "RO" +// ============================================================================= +// Register : SSI_RXOICR +// Description : RX FIFO overflow interrupt clear +// Clear-on-read receive FIFO overflow interrupt +#define SSI_RXOICR_OFFSET 0x0000003c +#define SSI_RXOICR_BITS 0x00000001 +#define SSI_RXOICR_RESET 0x00000000 +#define SSI_RXOICR_MSB 0 +#define SSI_RXOICR_LSB 0 +#define SSI_RXOICR_ACCESS "RO" +// ============================================================================= +// Register : SSI_RXUICR +// Description : RX FIFO underflow interrupt clear +// Clear-on-read receive FIFO underflow interrupt +#define SSI_RXUICR_OFFSET 0x00000040 +#define SSI_RXUICR_BITS 0x00000001 +#define SSI_RXUICR_RESET 0x00000000 +#define SSI_RXUICR_MSB 0 +#define SSI_RXUICR_LSB 0 +#define SSI_RXUICR_ACCESS "RO" +// ============================================================================= +// Register : SSI_MSTICR +// Description : Multi-master interrupt clear +// Clear-on-read multi-master contention interrupt +#define SSI_MSTICR_OFFSET 0x00000044 +#define SSI_MSTICR_BITS 0x00000001 +#define SSI_MSTICR_RESET 0x00000000 +#define SSI_MSTICR_MSB 0 +#define SSI_MSTICR_LSB 0 +#define SSI_MSTICR_ACCESS "RO" +// ============================================================================= +// Register : SSI_ICR +// Description : Interrupt clear +// Clear-on-read all active interrupts +#define SSI_ICR_OFFSET 0x00000048 +#define SSI_ICR_BITS 0x00000001 +#define SSI_ICR_RESET 0x00000000 +#define SSI_ICR_MSB 0 +#define SSI_ICR_LSB 0 +#define SSI_ICR_ACCESS "RO" +// ============================================================================= +// Register : SSI_DMACR +// Description : DMA control +#define SSI_DMACR_OFFSET 0x0000004c +#define SSI_DMACR_BITS 0x00000003 +#define SSI_DMACR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_DMACR_TDMAE +// Description : Transmit DMA enable +#define SSI_DMACR_TDMAE_RESET 0x0 +#define SSI_DMACR_TDMAE_BITS 0x00000002 +#define SSI_DMACR_TDMAE_MSB 1 +#define SSI_DMACR_TDMAE_LSB 1 +#define SSI_DMACR_TDMAE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_DMACR_RDMAE +// Description : Receive DMA enable +#define SSI_DMACR_RDMAE_RESET 0x0 +#define SSI_DMACR_RDMAE_BITS 0x00000001 +#define SSI_DMACR_RDMAE_MSB 0 +#define SSI_DMACR_RDMAE_LSB 0 +#define SSI_DMACR_RDMAE_ACCESS "RW" +// ============================================================================= +// Register : SSI_DMATDLR +// Description : DMA TX data level +#define SSI_DMATDLR_OFFSET 0x00000050 +#define SSI_DMATDLR_BITS 0x000000ff +#define SSI_DMATDLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_DMATDLR_DMATDL +// Description : Transmit data watermark level +#define SSI_DMATDLR_DMATDL_RESET 0x00 +#define SSI_DMATDLR_DMATDL_BITS 0x000000ff +#define SSI_DMATDLR_DMATDL_MSB 7 +#define SSI_DMATDLR_DMATDL_LSB 0 +#define SSI_DMATDLR_DMATDL_ACCESS "RW" +// ============================================================================= +// Register : SSI_DMARDLR +// Description : DMA RX data level +#define SSI_DMARDLR_OFFSET 0x00000054 +#define SSI_DMARDLR_BITS 0x000000ff +#define SSI_DMARDLR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_DMARDLR_DMARDL +// Description : Receive data watermark level (DMARDLR+1) +#define SSI_DMARDLR_DMARDL_RESET 0x00 +#define SSI_DMARDLR_DMARDL_BITS 0x000000ff +#define SSI_DMARDLR_DMARDL_MSB 7 +#define SSI_DMARDLR_DMARDL_LSB 0 +#define SSI_DMARDLR_DMARDL_ACCESS "RW" +// ============================================================================= +// Register : SSI_IDR +// Description : Identification register +#define SSI_IDR_OFFSET 0x00000058 +#define SSI_IDR_BITS 0xffffffff +#define SSI_IDR_RESET 0x51535049 +// ----------------------------------------------------------------------------- +// Field : SSI_IDR_IDCODE +// Description : Peripheral dentification code +#define SSI_IDR_IDCODE_RESET 0x51535049 +#define SSI_IDR_IDCODE_BITS 0xffffffff +#define SSI_IDR_IDCODE_MSB 31 +#define SSI_IDR_IDCODE_LSB 0 +#define SSI_IDR_IDCODE_ACCESS "RO" +// ============================================================================= +// Register : SSI_SSI_VERSION_ID +// Description : Version ID +#define SSI_SSI_VERSION_ID_OFFSET 0x0000005c +#define SSI_SSI_VERSION_ID_BITS 0xffffffff +#define SSI_SSI_VERSION_ID_RESET 0x3430312a +// ----------------------------------------------------------------------------- +// Field : SSI_SSI_VERSION_ID_SSI_COMP_VERSION +// Description : SNPS component version (format X.YY) +#define SSI_SSI_VERSION_ID_SSI_COMP_VERSION_RESET 0x3430312a +#define SSI_SSI_VERSION_ID_SSI_COMP_VERSION_BITS 0xffffffff +#define SSI_SSI_VERSION_ID_SSI_COMP_VERSION_MSB 31 +#define SSI_SSI_VERSION_ID_SSI_COMP_VERSION_LSB 0 +#define SSI_SSI_VERSION_ID_SSI_COMP_VERSION_ACCESS "RO" +// ============================================================================= +// Register : SSI_DR0 +// Description : Data Register 0 (of 36) +#define SSI_DR0_OFFSET 0x00000060 +#define SSI_DR0_BITS 0xffffffff +#define SSI_DR0_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_DR0_DR +// Description : First data register of 36 +#define SSI_DR0_DR_RESET 0x00000000 +#define SSI_DR0_DR_BITS 0xffffffff +#define SSI_DR0_DR_MSB 31 +#define SSI_DR0_DR_LSB 0 +#define SSI_DR0_DR_ACCESS "RW" +// ============================================================================= +// Register : SSI_RX_SAMPLE_DLY +// Description : RX sample delay +#define SSI_RX_SAMPLE_DLY_OFFSET 0x000000f0 +#define SSI_RX_SAMPLE_DLY_BITS 0x000000ff +#define SSI_RX_SAMPLE_DLY_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_RX_SAMPLE_DLY_RSD +// Description : RXD sample delay (in SCLK cycles) +#define SSI_RX_SAMPLE_DLY_RSD_RESET 0x00 +#define SSI_RX_SAMPLE_DLY_RSD_BITS 0x000000ff +#define SSI_RX_SAMPLE_DLY_RSD_MSB 7 +#define SSI_RX_SAMPLE_DLY_RSD_LSB 0 +#define SSI_RX_SAMPLE_DLY_RSD_ACCESS "RW" +// ============================================================================= +// Register : SSI_SPI_CTRLR0 +// Description : SPI control +#define SSI_SPI_CTRLR0_OFFSET 0x000000f4 +#define SSI_SPI_CTRLR0_BITS 0xff07fb3f +#define SSI_SPI_CTRLR0_RESET 0x03000000 +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_XIP_CMD +// Description : SPI Command to send in XIP mode (INST_L = 8-bit) or to append +// to Address (INST_L = 0-bit) +#define SSI_SPI_CTRLR0_XIP_CMD_RESET 0x03 +#define SSI_SPI_CTRLR0_XIP_CMD_BITS 0xff000000 +#define SSI_SPI_CTRLR0_XIP_CMD_MSB 31 +#define SSI_SPI_CTRLR0_XIP_CMD_LSB 24 +#define SSI_SPI_CTRLR0_XIP_CMD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_SPI_RXDS_EN +// Description : Read data strobe enable +#define SSI_SPI_CTRLR0_SPI_RXDS_EN_RESET 0x0 +#define SSI_SPI_CTRLR0_SPI_RXDS_EN_BITS 0x00040000 +#define SSI_SPI_CTRLR0_SPI_RXDS_EN_MSB 18 +#define SSI_SPI_CTRLR0_SPI_RXDS_EN_LSB 18 +#define SSI_SPI_CTRLR0_SPI_RXDS_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_INST_DDR_EN +// Description : Instruction DDR transfer enable +#define SSI_SPI_CTRLR0_INST_DDR_EN_RESET 0x0 +#define SSI_SPI_CTRLR0_INST_DDR_EN_BITS 0x00020000 +#define SSI_SPI_CTRLR0_INST_DDR_EN_MSB 17 +#define SSI_SPI_CTRLR0_INST_DDR_EN_LSB 17 +#define SSI_SPI_CTRLR0_INST_DDR_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_SPI_DDR_EN +// Description : SPI DDR transfer enable +#define SSI_SPI_CTRLR0_SPI_DDR_EN_RESET 0x0 +#define SSI_SPI_CTRLR0_SPI_DDR_EN_BITS 0x00010000 +#define SSI_SPI_CTRLR0_SPI_DDR_EN_MSB 16 +#define SSI_SPI_CTRLR0_SPI_DDR_EN_LSB 16 +#define SSI_SPI_CTRLR0_SPI_DDR_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_WAIT_CYCLES +// Description : Wait cycles between control frame transmit and data reception +// (in SCLK cycles) +#define SSI_SPI_CTRLR0_WAIT_CYCLES_RESET 0x00 +#define SSI_SPI_CTRLR0_WAIT_CYCLES_BITS 0x0000f800 +#define SSI_SPI_CTRLR0_WAIT_CYCLES_MSB 15 +#define SSI_SPI_CTRLR0_WAIT_CYCLES_LSB 11 +#define SSI_SPI_CTRLR0_WAIT_CYCLES_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_INST_L +// Description : Instruction length (0/4/8/16b) +// 0x0 -> No instruction +// 0x1 -> 4-bit instruction +// 0x2 -> 8-bit instruction +// 0x3 -> 16-bit instruction +#define SSI_SPI_CTRLR0_INST_L_RESET 0x0 +#define SSI_SPI_CTRLR0_INST_L_BITS 0x00000300 +#define SSI_SPI_CTRLR0_INST_L_MSB 9 +#define SSI_SPI_CTRLR0_INST_L_LSB 8 +#define SSI_SPI_CTRLR0_INST_L_ACCESS "RW" +#define SSI_SPI_CTRLR0_INST_L_VALUE_NONE 0x0 +#define SSI_SPI_CTRLR0_INST_L_VALUE_4B 0x1 +#define SSI_SPI_CTRLR0_INST_L_VALUE_8B 0x2 +#define SSI_SPI_CTRLR0_INST_L_VALUE_16B 0x3 +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_ADDR_L +// Description : Address length (0b-60b in 4b increments) +#define SSI_SPI_CTRLR0_ADDR_L_RESET 0x0 +#define SSI_SPI_CTRLR0_ADDR_L_BITS 0x0000003c +#define SSI_SPI_CTRLR0_ADDR_L_MSB 5 +#define SSI_SPI_CTRLR0_ADDR_L_LSB 2 +#define SSI_SPI_CTRLR0_ADDR_L_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SSI_SPI_CTRLR0_TRANS_TYPE +// Description : Address and instruction transfer format +// 0x0 -> Command and address both in standard SPI frame format +// 0x1 -> Command in standard SPI format, address in format +// specified by FRF +// 0x2 -> Command and address both in format specified by FRF +// (e.g. Dual-SPI) +#define SSI_SPI_CTRLR0_TRANS_TYPE_RESET 0x0 +#define SSI_SPI_CTRLR0_TRANS_TYPE_BITS 0x00000003 +#define SSI_SPI_CTRLR0_TRANS_TYPE_MSB 1 +#define SSI_SPI_CTRLR0_TRANS_TYPE_LSB 0 +#define SSI_SPI_CTRLR0_TRANS_TYPE_ACCESS "RW" +#define SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C1A 0x0 +#define SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C2A 0x1 +#define SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_2C2A 0x2 +// ============================================================================= +// Register : SSI_TXD_DRIVE_EDGE +// Description : TX drive edge +#define SSI_TXD_DRIVE_EDGE_OFFSET 0x000000f8 +#define SSI_TXD_DRIVE_EDGE_BITS 0x000000ff +#define SSI_TXD_DRIVE_EDGE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SSI_TXD_DRIVE_EDGE_TDE +// Description : TXD drive edge +#define SSI_TXD_DRIVE_EDGE_TDE_RESET 0x00 +#define SSI_TXD_DRIVE_EDGE_TDE_BITS 0x000000ff +#define SSI_TXD_DRIVE_EDGE_TDE_MSB 7 +#define SSI_TXD_DRIVE_EDGE_TDE_LSB 0 +#define SSI_TXD_DRIVE_EDGE_TDE_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_SSI_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/syscfg.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/syscfg.h new file mode 100644 index 0000000000..c1bcaf9dc8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/syscfg.h @@ -0,0 +1,257 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : SYSCFG +// Version : 1 +// Bus type : apb +// Description : Register block for various chip control signals +// ============================================================================= +#ifndef HARDWARE_REGS_SYSCFG_DEFINED +#define HARDWARE_REGS_SYSCFG_DEFINED +// ============================================================================= +// Register : SYSCFG_PROC0_NMI_MASK +// Description : Processor core 0 NMI source mask +// Set a bit high to enable NMI from that IRQ +#define SYSCFG_PROC0_NMI_MASK_OFFSET 0x00000000 +#define SYSCFG_PROC0_NMI_MASK_BITS 0xffffffff +#define SYSCFG_PROC0_NMI_MASK_RESET 0x00000000 +#define SYSCFG_PROC0_NMI_MASK_MSB 31 +#define SYSCFG_PROC0_NMI_MASK_LSB 0 +#define SYSCFG_PROC0_NMI_MASK_ACCESS "RW" +// ============================================================================= +// Register : SYSCFG_PROC1_NMI_MASK +// Description : Processor core 1 NMI source mask +// Set a bit high to enable NMI from that IRQ +#define SYSCFG_PROC1_NMI_MASK_OFFSET 0x00000004 +#define SYSCFG_PROC1_NMI_MASK_BITS 0xffffffff +#define SYSCFG_PROC1_NMI_MASK_RESET 0x00000000 +#define SYSCFG_PROC1_NMI_MASK_MSB 31 +#define SYSCFG_PROC1_NMI_MASK_LSB 0 +#define SYSCFG_PROC1_NMI_MASK_ACCESS "RW" +// ============================================================================= +// Register : SYSCFG_PROC_CONFIG +// Description : Configuration for processors +#define SYSCFG_PROC_CONFIG_OFFSET 0x00000008 +#define SYSCFG_PROC_CONFIG_BITS 0xff000003 +#define SYSCFG_PROC_CONFIG_RESET 0x10000000 +// ----------------------------------------------------------------------------- +// Field : SYSCFG_PROC_CONFIG_PROC1_DAP_INSTID +// Description : Configure proc1 DAP instance ID. +// Recommend that this is NOT changed until you require debug +// access in multi-chip environment +// WARNING: do not set to 15 as this is reserved for RescueDP +#define SYSCFG_PROC_CONFIG_PROC1_DAP_INSTID_RESET 0x1 +#define SYSCFG_PROC_CONFIG_PROC1_DAP_INSTID_BITS 0xf0000000 +#define SYSCFG_PROC_CONFIG_PROC1_DAP_INSTID_MSB 31 +#define SYSCFG_PROC_CONFIG_PROC1_DAP_INSTID_LSB 28 +#define SYSCFG_PROC_CONFIG_PROC1_DAP_INSTID_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_PROC_CONFIG_PROC0_DAP_INSTID +// Description : Configure proc0 DAP instance ID. +// Recommend that this is NOT changed until you require debug +// access in multi-chip environment +// WARNING: do not set to 15 as this is reserved for RescueDP +#define SYSCFG_PROC_CONFIG_PROC0_DAP_INSTID_RESET 0x0 +#define SYSCFG_PROC_CONFIG_PROC0_DAP_INSTID_BITS 0x0f000000 +#define SYSCFG_PROC_CONFIG_PROC0_DAP_INSTID_MSB 27 +#define SYSCFG_PROC_CONFIG_PROC0_DAP_INSTID_LSB 24 +#define SYSCFG_PROC_CONFIG_PROC0_DAP_INSTID_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_PROC_CONFIG_PROC1_HALTED +// Description : Indication that proc1 has halted +#define SYSCFG_PROC_CONFIG_PROC1_HALTED_RESET 0x0 +#define SYSCFG_PROC_CONFIG_PROC1_HALTED_BITS 0x00000002 +#define SYSCFG_PROC_CONFIG_PROC1_HALTED_MSB 1 +#define SYSCFG_PROC_CONFIG_PROC1_HALTED_LSB 1 +#define SYSCFG_PROC_CONFIG_PROC1_HALTED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_PROC_CONFIG_PROC0_HALTED +// Description : Indication that proc0 has halted +#define SYSCFG_PROC_CONFIG_PROC0_HALTED_RESET 0x0 +#define SYSCFG_PROC_CONFIG_PROC0_HALTED_BITS 0x00000001 +#define SYSCFG_PROC_CONFIG_PROC0_HALTED_MSB 0 +#define SYSCFG_PROC_CONFIG_PROC0_HALTED_LSB 0 +#define SYSCFG_PROC_CONFIG_PROC0_HALTED_ACCESS "RO" +// ============================================================================= +// Register : SYSCFG_PROC_IN_SYNC_BYPASS +// Description : For each bit, if 1, bypass the input synchronizer between that +// GPIO +// and the GPIO input register in the SIO. The input synchronizers +// should +// generally be unbypassed, to avoid injecting metastabilities +// into processors. +// If you're feeling brave, you can bypass to save two cycles of +// input +// latency. This register applies to GPIO 0...29. +#define SYSCFG_PROC_IN_SYNC_BYPASS_OFFSET 0x0000000c +#define SYSCFG_PROC_IN_SYNC_BYPASS_BITS 0x3fffffff +#define SYSCFG_PROC_IN_SYNC_BYPASS_RESET 0x00000000 +#define SYSCFG_PROC_IN_SYNC_BYPASS_MSB 29 +#define SYSCFG_PROC_IN_SYNC_BYPASS_LSB 0 +#define SYSCFG_PROC_IN_SYNC_BYPASS_ACCESS "RW" +// ============================================================================= +// Register : SYSCFG_PROC_IN_SYNC_BYPASS_HI +// Description : For each bit, if 1, bypass the input synchronizer between that +// GPIO +// and the GPIO input register in the SIO. The input synchronizers +// should +// generally be unbypassed, to avoid injecting metastabilities +// into processors. +// If you're feeling brave, you can bypass to save two cycles of +// input +// latency. This register applies to GPIO 30...35 (the QSPI IOs). +#define SYSCFG_PROC_IN_SYNC_BYPASS_HI_OFFSET 0x00000010 +#define SYSCFG_PROC_IN_SYNC_BYPASS_HI_BITS 0x0000003f +#define SYSCFG_PROC_IN_SYNC_BYPASS_HI_RESET 0x00000000 +#define SYSCFG_PROC_IN_SYNC_BYPASS_HI_MSB 5 +#define SYSCFG_PROC_IN_SYNC_BYPASS_HI_LSB 0 +#define SYSCFG_PROC_IN_SYNC_BYPASS_HI_ACCESS "RW" +// ============================================================================= +// Register : SYSCFG_DBGFORCE +// Description : Directly control the SWD debug port of either processor +#define SYSCFG_DBGFORCE_OFFSET 0x00000014 +#define SYSCFG_DBGFORCE_BITS 0x000000ff +#define SYSCFG_DBGFORCE_RESET 0x00000066 +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC1_ATTACH +// Description : Attach processor 1 debug port to syscfg controls, and +// disconnect it from external SWD pads. +#define SYSCFG_DBGFORCE_PROC1_ATTACH_RESET 0x0 +#define SYSCFG_DBGFORCE_PROC1_ATTACH_BITS 0x00000080 +#define SYSCFG_DBGFORCE_PROC1_ATTACH_MSB 7 +#define SYSCFG_DBGFORCE_PROC1_ATTACH_LSB 7 +#define SYSCFG_DBGFORCE_PROC1_ATTACH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC1_SWCLK +// Description : Directly drive processor 1 SWCLK, if PROC1_ATTACH is set +#define SYSCFG_DBGFORCE_PROC1_SWCLK_RESET 0x1 +#define SYSCFG_DBGFORCE_PROC1_SWCLK_BITS 0x00000040 +#define SYSCFG_DBGFORCE_PROC1_SWCLK_MSB 6 +#define SYSCFG_DBGFORCE_PROC1_SWCLK_LSB 6 +#define SYSCFG_DBGFORCE_PROC1_SWCLK_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC1_SWDI +// Description : Directly drive processor 1 SWDIO input, if PROC1_ATTACH is set +#define SYSCFG_DBGFORCE_PROC1_SWDI_RESET 0x1 +#define SYSCFG_DBGFORCE_PROC1_SWDI_BITS 0x00000020 +#define SYSCFG_DBGFORCE_PROC1_SWDI_MSB 5 +#define SYSCFG_DBGFORCE_PROC1_SWDI_LSB 5 +#define SYSCFG_DBGFORCE_PROC1_SWDI_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC1_SWDO +// Description : Observe the value of processor 1 SWDIO output. +#define SYSCFG_DBGFORCE_PROC1_SWDO_RESET "-" +#define SYSCFG_DBGFORCE_PROC1_SWDO_BITS 0x00000010 +#define SYSCFG_DBGFORCE_PROC1_SWDO_MSB 4 +#define SYSCFG_DBGFORCE_PROC1_SWDO_LSB 4 +#define SYSCFG_DBGFORCE_PROC1_SWDO_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC0_ATTACH +// Description : Attach processor 0 debug port to syscfg controls, and +// disconnect it from external SWD pads. +#define SYSCFG_DBGFORCE_PROC0_ATTACH_RESET 0x0 +#define SYSCFG_DBGFORCE_PROC0_ATTACH_BITS 0x00000008 +#define SYSCFG_DBGFORCE_PROC0_ATTACH_MSB 3 +#define SYSCFG_DBGFORCE_PROC0_ATTACH_LSB 3 +#define SYSCFG_DBGFORCE_PROC0_ATTACH_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC0_SWCLK +// Description : Directly drive processor 0 SWCLK, if PROC0_ATTACH is set +#define SYSCFG_DBGFORCE_PROC0_SWCLK_RESET 0x1 +#define SYSCFG_DBGFORCE_PROC0_SWCLK_BITS 0x00000004 +#define SYSCFG_DBGFORCE_PROC0_SWCLK_MSB 2 +#define SYSCFG_DBGFORCE_PROC0_SWCLK_LSB 2 +#define SYSCFG_DBGFORCE_PROC0_SWCLK_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC0_SWDI +// Description : Directly drive processor 0 SWDIO input, if PROC0_ATTACH is set +#define SYSCFG_DBGFORCE_PROC0_SWDI_RESET 0x1 +#define SYSCFG_DBGFORCE_PROC0_SWDI_BITS 0x00000002 +#define SYSCFG_DBGFORCE_PROC0_SWDI_MSB 1 +#define SYSCFG_DBGFORCE_PROC0_SWDI_LSB 1 +#define SYSCFG_DBGFORCE_PROC0_SWDI_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_DBGFORCE_PROC0_SWDO +// Description : Observe the value of processor 0 SWDIO output. +#define SYSCFG_DBGFORCE_PROC0_SWDO_RESET "-" +#define SYSCFG_DBGFORCE_PROC0_SWDO_BITS 0x00000001 +#define SYSCFG_DBGFORCE_PROC0_SWDO_MSB 0 +#define SYSCFG_DBGFORCE_PROC0_SWDO_LSB 0 +#define SYSCFG_DBGFORCE_PROC0_SWDO_ACCESS "RO" +// ============================================================================= +// Register : SYSCFG_MEMPOWERDOWN +// Description : Control power downs to memories. Set high to power down +// memories. +// Use with extreme caution +#define SYSCFG_MEMPOWERDOWN_OFFSET 0x00000018 +#define SYSCFG_MEMPOWERDOWN_BITS 0x000000ff +#define SYSCFG_MEMPOWERDOWN_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_ROM +// Description : None +#define SYSCFG_MEMPOWERDOWN_ROM_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_ROM_BITS 0x00000080 +#define SYSCFG_MEMPOWERDOWN_ROM_MSB 7 +#define SYSCFG_MEMPOWERDOWN_ROM_LSB 7 +#define SYSCFG_MEMPOWERDOWN_ROM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_USB +// Description : None +#define SYSCFG_MEMPOWERDOWN_USB_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_USB_BITS 0x00000040 +#define SYSCFG_MEMPOWERDOWN_USB_MSB 6 +#define SYSCFG_MEMPOWERDOWN_USB_LSB 6 +#define SYSCFG_MEMPOWERDOWN_USB_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_SRAM5 +// Description : None +#define SYSCFG_MEMPOWERDOWN_SRAM5_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_SRAM5_BITS 0x00000020 +#define SYSCFG_MEMPOWERDOWN_SRAM5_MSB 5 +#define SYSCFG_MEMPOWERDOWN_SRAM5_LSB 5 +#define SYSCFG_MEMPOWERDOWN_SRAM5_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_SRAM4 +// Description : None +#define SYSCFG_MEMPOWERDOWN_SRAM4_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_SRAM4_BITS 0x00000010 +#define SYSCFG_MEMPOWERDOWN_SRAM4_MSB 4 +#define SYSCFG_MEMPOWERDOWN_SRAM4_LSB 4 +#define SYSCFG_MEMPOWERDOWN_SRAM4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_SRAM3 +// Description : None +#define SYSCFG_MEMPOWERDOWN_SRAM3_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_SRAM3_BITS 0x00000008 +#define SYSCFG_MEMPOWERDOWN_SRAM3_MSB 3 +#define SYSCFG_MEMPOWERDOWN_SRAM3_LSB 3 +#define SYSCFG_MEMPOWERDOWN_SRAM3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_SRAM2 +// Description : None +#define SYSCFG_MEMPOWERDOWN_SRAM2_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_SRAM2_BITS 0x00000004 +#define SYSCFG_MEMPOWERDOWN_SRAM2_MSB 2 +#define SYSCFG_MEMPOWERDOWN_SRAM2_LSB 2 +#define SYSCFG_MEMPOWERDOWN_SRAM2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_SRAM1 +// Description : None +#define SYSCFG_MEMPOWERDOWN_SRAM1_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_SRAM1_BITS 0x00000002 +#define SYSCFG_MEMPOWERDOWN_SRAM1_MSB 1 +#define SYSCFG_MEMPOWERDOWN_SRAM1_LSB 1 +#define SYSCFG_MEMPOWERDOWN_SRAM1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : SYSCFG_MEMPOWERDOWN_SRAM0 +// Description : None +#define SYSCFG_MEMPOWERDOWN_SRAM0_RESET 0x0 +#define SYSCFG_MEMPOWERDOWN_SRAM0_BITS 0x00000001 +#define SYSCFG_MEMPOWERDOWN_SRAM0_MSB 0 +#define SYSCFG_MEMPOWERDOWN_SRAM0_LSB 0 +#define SYSCFG_MEMPOWERDOWN_SRAM0_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_SYSCFG_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sysinfo.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sysinfo.h new file mode 100644 index 0000000000..7a460374c0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/sysinfo.h @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : SYSINFO +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_SYSINFO_DEFINED +#define HARDWARE_REGS_SYSINFO_DEFINED +// ============================================================================= +// Register : SYSINFO_CHIP_ID +// Description : JEDEC JEP-106 compliant chip identifier. +#define SYSINFO_CHIP_ID_OFFSET 0x00000000 +#define SYSINFO_CHIP_ID_BITS 0xffffffff +#define SYSINFO_CHIP_ID_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SYSINFO_CHIP_ID_REVISION +// Description : None +#define SYSINFO_CHIP_ID_REVISION_RESET "-" +#define SYSINFO_CHIP_ID_REVISION_BITS 0xf0000000 +#define SYSINFO_CHIP_ID_REVISION_MSB 31 +#define SYSINFO_CHIP_ID_REVISION_LSB 28 +#define SYSINFO_CHIP_ID_REVISION_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SYSINFO_CHIP_ID_PART +// Description : None +#define SYSINFO_CHIP_ID_PART_RESET "-" +#define SYSINFO_CHIP_ID_PART_BITS 0x0ffff000 +#define SYSINFO_CHIP_ID_PART_MSB 27 +#define SYSINFO_CHIP_ID_PART_LSB 12 +#define SYSINFO_CHIP_ID_PART_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SYSINFO_CHIP_ID_MANUFACTURER +// Description : None +#define SYSINFO_CHIP_ID_MANUFACTURER_RESET "-" +#define SYSINFO_CHIP_ID_MANUFACTURER_BITS 0x00000fff +#define SYSINFO_CHIP_ID_MANUFACTURER_MSB 11 +#define SYSINFO_CHIP_ID_MANUFACTURER_LSB 0 +#define SYSINFO_CHIP_ID_MANUFACTURER_ACCESS "RO" +// ============================================================================= +// Register : SYSINFO_PLATFORM +// Description : Platform register. Allows software to know what environment it +// is running in. +#define SYSINFO_PLATFORM_OFFSET 0x00000004 +#define SYSINFO_PLATFORM_BITS 0x00000003 +#define SYSINFO_PLATFORM_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : SYSINFO_PLATFORM_ASIC +// Description : None +#define SYSINFO_PLATFORM_ASIC_RESET 0x0 +#define SYSINFO_PLATFORM_ASIC_BITS 0x00000002 +#define SYSINFO_PLATFORM_ASIC_MSB 1 +#define SYSINFO_PLATFORM_ASIC_LSB 1 +#define SYSINFO_PLATFORM_ASIC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : SYSINFO_PLATFORM_FPGA +// Description : None +#define SYSINFO_PLATFORM_FPGA_RESET 0x0 +#define SYSINFO_PLATFORM_FPGA_BITS 0x00000001 +#define SYSINFO_PLATFORM_FPGA_MSB 0 +#define SYSINFO_PLATFORM_FPGA_LSB 0 +#define SYSINFO_PLATFORM_FPGA_ACCESS "RO" +// ============================================================================= +// Register : SYSINFO_GITREF_RP2040 +// Description : Git hash of the chip source. Used to identify chip version. +#define SYSINFO_GITREF_RP2040_OFFSET 0x00000040 +#define SYSINFO_GITREF_RP2040_BITS 0xffffffff +#define SYSINFO_GITREF_RP2040_RESET "-" +#define SYSINFO_GITREF_RP2040_MSB 31 +#define SYSINFO_GITREF_RP2040_LSB 0 +#define SYSINFO_GITREF_RP2040_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_SYSINFO_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/tbman.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/tbman.h new file mode 100644 index 0000000000..6bf9b2959b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/tbman.h @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : TBMAN +// Version : 1 +// Bus type : apb +// Description : Testbench manager. Allows the programmer to know what +// platform their software is running on. +// ============================================================================= +#ifndef HARDWARE_REGS_TBMAN_DEFINED +#define HARDWARE_REGS_TBMAN_DEFINED +// ============================================================================= +// Register : TBMAN_PLATFORM +// Description : Indicates the type of platform in use +#define TBMAN_PLATFORM_OFFSET 0x00000000 +#define TBMAN_PLATFORM_BITS 0x00000003 +#define TBMAN_PLATFORM_RESET 0x00000005 +// ----------------------------------------------------------------------------- +// Field : TBMAN_PLATFORM_FPGA +// Description : Indicates the platform is an FPGA +#define TBMAN_PLATFORM_FPGA_RESET 0x0 +#define TBMAN_PLATFORM_FPGA_BITS 0x00000002 +#define TBMAN_PLATFORM_FPGA_MSB 1 +#define TBMAN_PLATFORM_FPGA_LSB 1 +#define TBMAN_PLATFORM_FPGA_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : TBMAN_PLATFORM_ASIC +// Description : Indicates the platform is an ASIC +#define TBMAN_PLATFORM_ASIC_RESET 0x1 +#define TBMAN_PLATFORM_ASIC_BITS 0x00000001 +#define TBMAN_PLATFORM_ASIC_MSB 0 +#define TBMAN_PLATFORM_ASIC_LSB 0 +#define TBMAN_PLATFORM_ASIC_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_TBMAN_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/timer.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/timer.h new file mode 100644 index 0000000000..a2209b690a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/timer.h @@ -0,0 +1,332 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : TIMER +// Version : 1 +// Bus type : apb +// Description : Controls time and alarms +// time is a 64 bit value indicating the time in usec since +// power-on +// timeh is the top 32 bits of time & timel is the bottom 32 +// bits +// to change time write to timelw before timehw +// to read time read from timelr before timehr +// An alarm is set by setting alarm_enable and writing to the +// corresponding alarm register +// When an alarm is pending, the corresponding alarm_running +// signal will be high +// An alarm can be cancelled before it has finished by clearing +// the alarm_enable +// When an alarm fires, the corresponding alarm_irq is set and +// alarm_running is cleared +// To clear the interrupt write a 1 to the corresponding +// alarm_irq +// ============================================================================= +#ifndef HARDWARE_REGS_TIMER_DEFINED +#define HARDWARE_REGS_TIMER_DEFINED +// ============================================================================= +// Register : TIMER_TIMEHW +// Description : Write to bits 63:32 of time +// always write timelw before timehw +#define TIMER_TIMEHW_OFFSET 0x00000000 +#define TIMER_TIMEHW_BITS 0xffffffff +#define TIMER_TIMEHW_RESET 0x00000000 +#define TIMER_TIMEHW_MSB 31 +#define TIMER_TIMEHW_LSB 0 +#define TIMER_TIMEHW_ACCESS "WF" +// ============================================================================= +// Register : TIMER_TIMELW +// Description : Write to bits 31:0 of time +// writes do not get copied to time until timehw is written +#define TIMER_TIMELW_OFFSET 0x00000004 +#define TIMER_TIMELW_BITS 0xffffffff +#define TIMER_TIMELW_RESET 0x00000000 +#define TIMER_TIMELW_MSB 31 +#define TIMER_TIMELW_LSB 0 +#define TIMER_TIMELW_ACCESS "WF" +// ============================================================================= +// Register : TIMER_TIMEHR +// Description : Read from bits 63:32 of time +// always read timelr before timehr +#define TIMER_TIMEHR_OFFSET 0x00000008 +#define TIMER_TIMEHR_BITS 0xffffffff +#define TIMER_TIMEHR_RESET 0x00000000 +#define TIMER_TIMEHR_MSB 31 +#define TIMER_TIMEHR_LSB 0 +#define TIMER_TIMEHR_ACCESS "RO" +// ============================================================================= +// Register : TIMER_TIMELR +// Description : Read from bits 31:0 of time +#define TIMER_TIMELR_OFFSET 0x0000000c +#define TIMER_TIMELR_BITS 0xffffffff +#define TIMER_TIMELR_RESET 0x00000000 +#define TIMER_TIMELR_MSB 31 +#define TIMER_TIMELR_LSB 0 +#define TIMER_TIMELR_ACCESS "RO" +// ============================================================================= +// Register : TIMER_ALARM0 +// Description : Arm alarm 0, and configure the time it will fire. +// Once armed, the alarm fires when TIMER_ALARM0 == TIMELR. +// The alarm will disarm itself once it fires, and can +// be disarmed early using the ARMED status register. +#define TIMER_ALARM0_OFFSET 0x00000010 +#define TIMER_ALARM0_BITS 0xffffffff +#define TIMER_ALARM0_RESET 0x00000000 +#define TIMER_ALARM0_MSB 31 +#define TIMER_ALARM0_LSB 0 +#define TIMER_ALARM0_ACCESS "RW" +// ============================================================================= +// Register : TIMER_ALARM1 +// Description : Arm alarm 1, and configure the time it will fire. +// Once armed, the alarm fires when TIMER_ALARM1 == TIMELR. +// The alarm will disarm itself once it fires, and can +// be disarmed early using the ARMED status register. +#define TIMER_ALARM1_OFFSET 0x00000014 +#define TIMER_ALARM1_BITS 0xffffffff +#define TIMER_ALARM1_RESET 0x00000000 +#define TIMER_ALARM1_MSB 31 +#define TIMER_ALARM1_LSB 0 +#define TIMER_ALARM1_ACCESS "RW" +// ============================================================================= +// Register : TIMER_ALARM2 +// Description : Arm alarm 2, and configure the time it will fire. +// Once armed, the alarm fires when TIMER_ALARM2 == TIMELR. +// The alarm will disarm itself once it fires, and can +// be disarmed early using the ARMED status register. +#define TIMER_ALARM2_OFFSET 0x00000018 +#define TIMER_ALARM2_BITS 0xffffffff +#define TIMER_ALARM2_RESET 0x00000000 +#define TIMER_ALARM2_MSB 31 +#define TIMER_ALARM2_LSB 0 +#define TIMER_ALARM2_ACCESS "RW" +// ============================================================================= +// Register : TIMER_ALARM3 +// Description : Arm alarm 3, and configure the time it will fire. +// Once armed, the alarm fires when TIMER_ALARM3 == TIMELR. +// The alarm will disarm itself once it fires, and can +// be disarmed early using the ARMED status register. +#define TIMER_ALARM3_OFFSET 0x0000001c +#define TIMER_ALARM3_BITS 0xffffffff +#define TIMER_ALARM3_RESET 0x00000000 +#define TIMER_ALARM3_MSB 31 +#define TIMER_ALARM3_LSB 0 +#define TIMER_ALARM3_ACCESS "RW" +// ============================================================================= +// Register : TIMER_ARMED +// Description : Indicates the armed/disarmed status of each alarm. +// A write to the corresponding ALARMx register arms the alarm. +// Alarms automatically disarm upon firing, but writing ones here +// will disarm immediately without waiting to fire. +#define TIMER_ARMED_OFFSET 0x00000020 +#define TIMER_ARMED_BITS 0x0000000f +#define TIMER_ARMED_RESET 0x00000000 +#define TIMER_ARMED_MSB 3 +#define TIMER_ARMED_LSB 0 +#define TIMER_ARMED_ACCESS "WC" +// ============================================================================= +// Register : TIMER_TIMERAWH +// Description : Raw read from bits 63:32 of time (no side effects) +#define TIMER_TIMERAWH_OFFSET 0x00000024 +#define TIMER_TIMERAWH_BITS 0xffffffff +#define TIMER_TIMERAWH_RESET 0x00000000 +#define TIMER_TIMERAWH_MSB 31 +#define TIMER_TIMERAWH_LSB 0 +#define TIMER_TIMERAWH_ACCESS "RO" +// ============================================================================= +// Register : TIMER_TIMERAWL +// Description : Raw read from bits 31:0 of time (no side effects) +#define TIMER_TIMERAWL_OFFSET 0x00000028 +#define TIMER_TIMERAWL_BITS 0xffffffff +#define TIMER_TIMERAWL_RESET 0x00000000 +#define TIMER_TIMERAWL_MSB 31 +#define TIMER_TIMERAWL_LSB 0 +#define TIMER_TIMERAWL_ACCESS "RO" +// ============================================================================= +// Register : TIMER_DBGPAUSE +// Description : Set bits high to enable pause when the corresponding debug +// ports are active +#define TIMER_DBGPAUSE_OFFSET 0x0000002c +#define TIMER_DBGPAUSE_BITS 0x00000006 +#define TIMER_DBGPAUSE_RESET 0x00000007 +// ----------------------------------------------------------------------------- +// Field : TIMER_DBGPAUSE_DBG1 +// Description : Pause when processor 1 is in debug mode +#define TIMER_DBGPAUSE_DBG1_RESET 0x1 +#define TIMER_DBGPAUSE_DBG1_BITS 0x00000004 +#define TIMER_DBGPAUSE_DBG1_MSB 2 +#define TIMER_DBGPAUSE_DBG1_LSB 2 +#define TIMER_DBGPAUSE_DBG1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_DBGPAUSE_DBG0 +// Description : Pause when processor 0 is in debug mode +#define TIMER_DBGPAUSE_DBG0_RESET 0x1 +#define TIMER_DBGPAUSE_DBG0_BITS 0x00000002 +#define TIMER_DBGPAUSE_DBG0_MSB 1 +#define TIMER_DBGPAUSE_DBG0_LSB 1 +#define TIMER_DBGPAUSE_DBG0_ACCESS "RW" +// ============================================================================= +// Register : TIMER_PAUSE +// Description : Set high to pause the timer +#define TIMER_PAUSE_OFFSET 0x00000030 +#define TIMER_PAUSE_BITS 0x00000001 +#define TIMER_PAUSE_RESET 0x00000000 +#define TIMER_PAUSE_MSB 0 +#define TIMER_PAUSE_LSB 0 +#define TIMER_PAUSE_ACCESS "RW" +// ============================================================================= +// Register : TIMER_INTR +// Description : Raw Interrupts +#define TIMER_INTR_OFFSET 0x00000034 +#define TIMER_INTR_BITS 0x0000000f +#define TIMER_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : TIMER_INTR_ALARM_3 +// Description : None +#define TIMER_INTR_ALARM_3_RESET 0x0 +#define TIMER_INTR_ALARM_3_BITS 0x00000008 +#define TIMER_INTR_ALARM_3_MSB 3 +#define TIMER_INTR_ALARM_3_LSB 3 +#define TIMER_INTR_ALARM_3_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTR_ALARM_2 +// Description : None +#define TIMER_INTR_ALARM_2_RESET 0x0 +#define TIMER_INTR_ALARM_2_BITS 0x00000004 +#define TIMER_INTR_ALARM_2_MSB 2 +#define TIMER_INTR_ALARM_2_LSB 2 +#define TIMER_INTR_ALARM_2_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTR_ALARM_1 +// Description : None +#define TIMER_INTR_ALARM_1_RESET 0x0 +#define TIMER_INTR_ALARM_1_BITS 0x00000002 +#define TIMER_INTR_ALARM_1_MSB 1 +#define TIMER_INTR_ALARM_1_LSB 1 +#define TIMER_INTR_ALARM_1_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTR_ALARM_0 +// Description : None +#define TIMER_INTR_ALARM_0_RESET 0x0 +#define TIMER_INTR_ALARM_0_BITS 0x00000001 +#define TIMER_INTR_ALARM_0_MSB 0 +#define TIMER_INTR_ALARM_0_LSB 0 +#define TIMER_INTR_ALARM_0_ACCESS "WC" +// ============================================================================= +// Register : TIMER_INTE +// Description : Interrupt Enable +#define TIMER_INTE_OFFSET 0x00000038 +#define TIMER_INTE_BITS 0x0000000f +#define TIMER_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : TIMER_INTE_ALARM_3 +// Description : None +#define TIMER_INTE_ALARM_3_RESET 0x0 +#define TIMER_INTE_ALARM_3_BITS 0x00000008 +#define TIMER_INTE_ALARM_3_MSB 3 +#define TIMER_INTE_ALARM_3_LSB 3 +#define TIMER_INTE_ALARM_3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTE_ALARM_2 +// Description : None +#define TIMER_INTE_ALARM_2_RESET 0x0 +#define TIMER_INTE_ALARM_2_BITS 0x00000004 +#define TIMER_INTE_ALARM_2_MSB 2 +#define TIMER_INTE_ALARM_2_LSB 2 +#define TIMER_INTE_ALARM_2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTE_ALARM_1 +// Description : None +#define TIMER_INTE_ALARM_1_RESET 0x0 +#define TIMER_INTE_ALARM_1_BITS 0x00000002 +#define TIMER_INTE_ALARM_1_MSB 1 +#define TIMER_INTE_ALARM_1_LSB 1 +#define TIMER_INTE_ALARM_1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTE_ALARM_0 +// Description : None +#define TIMER_INTE_ALARM_0_RESET 0x0 +#define TIMER_INTE_ALARM_0_BITS 0x00000001 +#define TIMER_INTE_ALARM_0_MSB 0 +#define TIMER_INTE_ALARM_0_LSB 0 +#define TIMER_INTE_ALARM_0_ACCESS "RW" +// ============================================================================= +// Register : TIMER_INTF +// Description : Interrupt Force +#define TIMER_INTF_OFFSET 0x0000003c +#define TIMER_INTF_BITS 0x0000000f +#define TIMER_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : TIMER_INTF_ALARM_3 +// Description : None +#define TIMER_INTF_ALARM_3_RESET 0x0 +#define TIMER_INTF_ALARM_3_BITS 0x00000008 +#define TIMER_INTF_ALARM_3_MSB 3 +#define TIMER_INTF_ALARM_3_LSB 3 +#define TIMER_INTF_ALARM_3_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTF_ALARM_2 +// Description : None +#define TIMER_INTF_ALARM_2_RESET 0x0 +#define TIMER_INTF_ALARM_2_BITS 0x00000004 +#define TIMER_INTF_ALARM_2_MSB 2 +#define TIMER_INTF_ALARM_2_LSB 2 +#define TIMER_INTF_ALARM_2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTF_ALARM_1 +// Description : None +#define TIMER_INTF_ALARM_1_RESET 0x0 +#define TIMER_INTF_ALARM_1_BITS 0x00000002 +#define TIMER_INTF_ALARM_1_MSB 1 +#define TIMER_INTF_ALARM_1_LSB 1 +#define TIMER_INTF_ALARM_1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTF_ALARM_0 +// Description : None +#define TIMER_INTF_ALARM_0_RESET 0x0 +#define TIMER_INTF_ALARM_0_BITS 0x00000001 +#define TIMER_INTF_ALARM_0_MSB 0 +#define TIMER_INTF_ALARM_0_LSB 0 +#define TIMER_INTF_ALARM_0_ACCESS "RW" +// ============================================================================= +// Register : TIMER_INTS +// Description : Interrupt status after masking & forcing +#define TIMER_INTS_OFFSET 0x00000040 +#define TIMER_INTS_BITS 0x0000000f +#define TIMER_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : TIMER_INTS_ALARM_3 +// Description : None +#define TIMER_INTS_ALARM_3_RESET 0x0 +#define TIMER_INTS_ALARM_3_BITS 0x00000008 +#define TIMER_INTS_ALARM_3_MSB 3 +#define TIMER_INTS_ALARM_3_LSB 3 +#define TIMER_INTS_ALARM_3_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTS_ALARM_2 +// Description : None +#define TIMER_INTS_ALARM_2_RESET 0x0 +#define TIMER_INTS_ALARM_2_BITS 0x00000004 +#define TIMER_INTS_ALARM_2_MSB 2 +#define TIMER_INTS_ALARM_2_LSB 2 +#define TIMER_INTS_ALARM_2_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTS_ALARM_1 +// Description : None +#define TIMER_INTS_ALARM_1_RESET 0x0 +#define TIMER_INTS_ALARM_1_BITS 0x00000002 +#define TIMER_INTS_ALARM_1_MSB 1 +#define TIMER_INTS_ALARM_1_LSB 1 +#define TIMER_INTS_ALARM_1_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : TIMER_INTS_ALARM_0 +// Description : None +#define TIMER_INTS_ALARM_0_RESET 0x0 +#define TIMER_INTS_ALARM_0_BITS 0x00000001 +#define TIMER_INTS_ALARM_0_MSB 0 +#define TIMER_INTS_ALARM_0_LSB 0 +#define TIMER_INTS_ALARM_0_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_TIMER_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/uart.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/uart.h new file mode 100644 index 0000000000..8fde5d1973 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/uart.h @@ -0,0 +1,1148 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : UART +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_UART_DEFINED +#define HARDWARE_REGS_UART_DEFINED +// ============================================================================= +// Register : UART_UARTDR +// Description : Data Register, UARTDR +#define UART_UARTDR_OFFSET 0x00000000 +#define UART_UARTDR_BITS 0x00000fff +#define UART_UARTDR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTDR_OE +// Description : Overrun error. This bit is set to 1 if data is received and the +// receive FIFO is already full. This is cleared to 0 once there +// is an empty space in the FIFO and a new character can be +// written to it. +#define UART_UARTDR_OE_RESET "-" +#define UART_UARTDR_OE_BITS 0x00000800 +#define UART_UARTDR_OE_MSB 11 +#define UART_UARTDR_OE_LSB 11 +#define UART_UARTDR_OE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTDR_BE +// Description : Break error. This bit is set to 1 if a break condition was +// detected, indicating that the received data input was held LOW +// for longer than a full-word transmission time (defined as +// start, data, parity and stop bits). In FIFO mode, this error is +// associated with the character at the top of the FIFO. When a +// break occurs, only one 0 character is loaded into the FIFO. The +// next character is only enabled after the receive data input +// goes to a 1 (marking state), and the next valid start bit is +// received. +#define UART_UARTDR_BE_RESET "-" +#define UART_UARTDR_BE_BITS 0x00000400 +#define UART_UARTDR_BE_MSB 10 +#define UART_UARTDR_BE_LSB 10 +#define UART_UARTDR_BE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTDR_PE +// Description : Parity error. When set to 1, it indicates that the parity of +// the received data character does not match the parity that the +// EPS and SPS bits in the Line Control Register, UARTLCR_H. In +// FIFO mode, this error is associated with the character at the +// top of the FIFO. +#define UART_UARTDR_PE_RESET "-" +#define UART_UARTDR_PE_BITS 0x00000200 +#define UART_UARTDR_PE_MSB 9 +#define UART_UARTDR_PE_LSB 9 +#define UART_UARTDR_PE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTDR_FE +// Description : Framing error. When set to 1, it indicates that the received +// character did not have a valid stop bit (a valid stop bit is +// 1). In FIFO mode, this error is associated with the character +// at the top of the FIFO. +#define UART_UARTDR_FE_RESET "-" +#define UART_UARTDR_FE_BITS 0x00000100 +#define UART_UARTDR_FE_MSB 8 +#define UART_UARTDR_FE_LSB 8 +#define UART_UARTDR_FE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTDR_DATA +// Description : Receive (read) data character. Transmit (write) data character. +#define UART_UARTDR_DATA_RESET "-" +#define UART_UARTDR_DATA_BITS 0x000000ff +#define UART_UARTDR_DATA_MSB 7 +#define UART_UARTDR_DATA_LSB 0 +#define UART_UARTDR_DATA_ACCESS "RWF" +// ============================================================================= +// Register : UART_UARTRSR +// Description : Receive Status Register/Error Clear Register, UARTRSR/UARTECR +#define UART_UARTRSR_OFFSET 0x00000004 +#define UART_UARTRSR_BITS 0x0000000f +#define UART_UARTRSR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTRSR_OE +// Description : Overrun error. This bit is set to 1 if data is received and the +// FIFO is already full. This bit is cleared to 0 by a write to +// UARTECR. The FIFO contents remain valid because no more data is +// written when the FIFO is full, only the contents of the shift +// register are overwritten. The CPU must now read the data, to +// empty the FIFO. +#define UART_UARTRSR_OE_RESET 0x0 +#define UART_UARTRSR_OE_BITS 0x00000008 +#define UART_UARTRSR_OE_MSB 3 +#define UART_UARTRSR_OE_LSB 3 +#define UART_UARTRSR_OE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRSR_BE +// Description : Break error. This bit is set to 1 if a break condition was +// detected, indicating that the received data input was held LOW +// for longer than a full-word transmission time (defined as +// start, data, parity, and stop bits). This bit is cleared to 0 +// after a write to UARTECR. In FIFO mode, this error is +// associated with the character at the top of the FIFO. When a +// break occurs, only one 0 character is loaded into the FIFO. The +// next character is only enabled after the receive data input +// goes to a 1 (marking state) and the next valid start bit is +// received. +#define UART_UARTRSR_BE_RESET 0x0 +#define UART_UARTRSR_BE_BITS 0x00000004 +#define UART_UARTRSR_BE_MSB 2 +#define UART_UARTRSR_BE_LSB 2 +#define UART_UARTRSR_BE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRSR_PE +// Description : Parity error. When set to 1, it indicates that the parity of +// the received data character does not match the parity that the +// EPS and SPS bits in the Line Control Register, UARTLCR_H. This +// bit is cleared to 0 by a write to UARTECR. In FIFO mode, this +// error is associated with the character at the top of the FIFO. +#define UART_UARTRSR_PE_RESET 0x0 +#define UART_UARTRSR_PE_BITS 0x00000002 +#define UART_UARTRSR_PE_MSB 1 +#define UART_UARTRSR_PE_LSB 1 +#define UART_UARTRSR_PE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRSR_FE +// Description : Framing error. When set to 1, it indicates that the received +// character did not have a valid stop bit (a valid stop bit is +// 1). This bit is cleared to 0 by a write to UARTECR. In FIFO +// mode, this error is associated with the character at the top of +// the FIFO. +#define UART_UARTRSR_FE_RESET 0x0 +#define UART_UARTRSR_FE_BITS 0x00000001 +#define UART_UARTRSR_FE_MSB 0 +#define UART_UARTRSR_FE_LSB 0 +#define UART_UARTRSR_FE_ACCESS "WC" +// ============================================================================= +// Register : UART_UARTFR +// Description : Flag Register, UARTFR +#define UART_UARTFR_OFFSET 0x00000018 +#define UART_UARTFR_BITS 0x000001ff +#define UART_UARTFR_RESET 0x00000090 +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_RI +// Description : Ring indicator. This bit is the complement of the UART ring +// indicator, nUARTRI, modem status input. That is, the bit is 1 +// when nUARTRI is LOW. +#define UART_UARTFR_RI_RESET "-" +#define UART_UARTFR_RI_BITS 0x00000100 +#define UART_UARTFR_RI_MSB 8 +#define UART_UARTFR_RI_LSB 8 +#define UART_UARTFR_RI_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_TXFE +// Description : Transmit FIFO empty. The meaning of this bit depends on the +// state of the FEN bit in the Line Control Register, UARTLCR_H. +// If the FIFO is disabled, this bit is set when the transmit +// holding register is empty. If the FIFO is enabled, the TXFE bit +// is set when the transmit FIFO is empty. This bit does not +// indicate if there is data in the transmit shift register. +#define UART_UARTFR_TXFE_RESET 0x1 +#define UART_UARTFR_TXFE_BITS 0x00000080 +#define UART_UARTFR_TXFE_MSB 7 +#define UART_UARTFR_TXFE_LSB 7 +#define UART_UARTFR_TXFE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_RXFF +// Description : Receive FIFO full. The meaning of this bit depends on the state +// of the FEN bit in the UARTLCR_H Register. If the FIFO is +// disabled, this bit is set when the receive holding register is +// full. If the FIFO is enabled, the RXFF bit is set when the +// receive FIFO is full. +#define UART_UARTFR_RXFF_RESET 0x0 +#define UART_UARTFR_RXFF_BITS 0x00000040 +#define UART_UARTFR_RXFF_MSB 6 +#define UART_UARTFR_RXFF_LSB 6 +#define UART_UARTFR_RXFF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_TXFF +// Description : Transmit FIFO full. The meaning of this bit depends on the +// state of the FEN bit in the UARTLCR_H Register. If the FIFO is +// disabled, this bit is set when the transmit holding register is +// full. If the FIFO is enabled, the TXFF bit is set when the +// transmit FIFO is full. +#define UART_UARTFR_TXFF_RESET 0x0 +#define UART_UARTFR_TXFF_BITS 0x00000020 +#define UART_UARTFR_TXFF_MSB 5 +#define UART_UARTFR_TXFF_LSB 5 +#define UART_UARTFR_TXFF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_RXFE +// Description : Receive FIFO empty. The meaning of this bit depends on the +// state of the FEN bit in the UARTLCR_H Register. If the FIFO is +// disabled, this bit is set when the receive holding register is +// empty. If the FIFO is enabled, the RXFE bit is set when the +// receive FIFO is empty. +#define UART_UARTFR_RXFE_RESET 0x1 +#define UART_UARTFR_RXFE_BITS 0x00000010 +#define UART_UARTFR_RXFE_MSB 4 +#define UART_UARTFR_RXFE_LSB 4 +#define UART_UARTFR_RXFE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_BUSY +// Description : UART busy. If this bit is set to 1, the UART is busy +// transmitting data. This bit remains set until the complete +// byte, including all the stop bits, has been sent from the shift +// register. This bit is set as soon as the transmit FIFO becomes +// non-empty, regardless of whether the UART is enabled or not. +#define UART_UARTFR_BUSY_RESET 0x0 +#define UART_UARTFR_BUSY_BITS 0x00000008 +#define UART_UARTFR_BUSY_MSB 3 +#define UART_UARTFR_BUSY_LSB 3 +#define UART_UARTFR_BUSY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_DCD +// Description : Data carrier detect. This bit is the complement of the UART +// data carrier detect, nUARTDCD, modem status input. That is, the +// bit is 1 when nUARTDCD is LOW. +#define UART_UARTFR_DCD_RESET "-" +#define UART_UARTFR_DCD_BITS 0x00000004 +#define UART_UARTFR_DCD_MSB 2 +#define UART_UARTFR_DCD_LSB 2 +#define UART_UARTFR_DCD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_DSR +// Description : Data set ready. This bit is the complement of the UART data set +// ready, nUARTDSR, modem status input. That is, the bit is 1 when +// nUARTDSR is LOW. +#define UART_UARTFR_DSR_RESET "-" +#define UART_UARTFR_DSR_BITS 0x00000002 +#define UART_UARTFR_DSR_MSB 1 +#define UART_UARTFR_DSR_LSB 1 +#define UART_UARTFR_DSR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTFR_CTS +// Description : Clear to send. This bit is the complement of the UART clear to +// send, nUARTCTS, modem status input. That is, the bit is 1 when +// nUARTCTS is LOW. +#define UART_UARTFR_CTS_RESET "-" +#define UART_UARTFR_CTS_BITS 0x00000001 +#define UART_UARTFR_CTS_MSB 0 +#define UART_UARTFR_CTS_LSB 0 +#define UART_UARTFR_CTS_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTILPR +// Description : IrDA Low-Power Counter Register, UARTILPR +#define UART_UARTILPR_OFFSET 0x00000020 +#define UART_UARTILPR_BITS 0x000000ff +#define UART_UARTILPR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTILPR_ILPDVSR +// Description : 8-bit low-power divisor value. These bits are cleared to 0 at +// reset. +#define UART_UARTILPR_ILPDVSR_RESET 0x00 +#define UART_UARTILPR_ILPDVSR_BITS 0x000000ff +#define UART_UARTILPR_ILPDVSR_MSB 7 +#define UART_UARTILPR_ILPDVSR_LSB 0 +#define UART_UARTILPR_ILPDVSR_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTIBRD +// Description : Integer Baud Rate Register, UARTIBRD +#define UART_UARTIBRD_OFFSET 0x00000024 +#define UART_UARTIBRD_BITS 0x0000ffff +#define UART_UARTIBRD_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTIBRD_BAUD_DIVINT +// Description : The integer baud rate divisor. These bits are cleared to 0 on +// reset. +#define UART_UARTIBRD_BAUD_DIVINT_RESET 0x0000 +#define UART_UARTIBRD_BAUD_DIVINT_BITS 0x0000ffff +#define UART_UARTIBRD_BAUD_DIVINT_MSB 15 +#define UART_UARTIBRD_BAUD_DIVINT_LSB 0 +#define UART_UARTIBRD_BAUD_DIVINT_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTFBRD +// Description : Fractional Baud Rate Register, UARTFBRD +#define UART_UARTFBRD_OFFSET 0x00000028 +#define UART_UARTFBRD_BITS 0x0000003f +#define UART_UARTFBRD_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTFBRD_BAUD_DIVFRAC +// Description : The fractional baud rate divisor. These bits are cleared to 0 +// on reset. +#define UART_UARTFBRD_BAUD_DIVFRAC_RESET 0x00 +#define UART_UARTFBRD_BAUD_DIVFRAC_BITS 0x0000003f +#define UART_UARTFBRD_BAUD_DIVFRAC_MSB 5 +#define UART_UARTFBRD_BAUD_DIVFRAC_LSB 0 +#define UART_UARTFBRD_BAUD_DIVFRAC_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTLCR_H +// Description : Line Control Register, UARTLCR_H +#define UART_UARTLCR_H_OFFSET 0x0000002c +#define UART_UARTLCR_H_BITS 0x000000ff +#define UART_UARTLCR_H_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_SPS +// Description : Stick parity select. 0 = stick parity is disabled 1 = either: * +// if the EPS bit is 0 then the parity bit is transmitted and +// checked as a 1 * if the EPS bit is 1 then the parity bit is +// transmitted and checked as a 0. This bit has no effect when the +// PEN bit disables parity checking and generation. +#define UART_UARTLCR_H_SPS_RESET 0x0 +#define UART_UARTLCR_H_SPS_BITS 0x00000080 +#define UART_UARTLCR_H_SPS_MSB 7 +#define UART_UARTLCR_H_SPS_LSB 7 +#define UART_UARTLCR_H_SPS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_WLEN +// Description : Word length. These bits indicate the number of data bits +// transmitted or received in a frame as follows: b11 = 8 bits b10 +// = 7 bits b01 = 6 bits b00 = 5 bits. +#define UART_UARTLCR_H_WLEN_RESET 0x0 +#define UART_UARTLCR_H_WLEN_BITS 0x00000060 +#define UART_UARTLCR_H_WLEN_MSB 6 +#define UART_UARTLCR_H_WLEN_LSB 5 +#define UART_UARTLCR_H_WLEN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_FEN +// Description : Enable FIFOs: 0 = FIFOs are disabled (character mode) that is, +// the FIFOs become 1-byte-deep holding registers 1 = transmit and +// receive FIFO buffers are enabled (FIFO mode). +#define UART_UARTLCR_H_FEN_RESET 0x0 +#define UART_UARTLCR_H_FEN_BITS 0x00000010 +#define UART_UARTLCR_H_FEN_MSB 4 +#define UART_UARTLCR_H_FEN_LSB 4 +#define UART_UARTLCR_H_FEN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_STP2 +// Description : Two stop bits select. If this bit is set to 1, two stop bits +// are transmitted at the end of the frame. The receive logic does +// not check for two stop bits being received. +#define UART_UARTLCR_H_STP2_RESET 0x0 +#define UART_UARTLCR_H_STP2_BITS 0x00000008 +#define UART_UARTLCR_H_STP2_MSB 3 +#define UART_UARTLCR_H_STP2_LSB 3 +#define UART_UARTLCR_H_STP2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_EPS +// Description : Even parity select. Controls the type of parity the UART uses +// during transmission and reception: 0 = odd parity. The UART +// generates or checks for an odd number of 1s in the data and +// parity bits. 1 = even parity. The UART generates or checks for +// an even number of 1s in the data and parity bits. This bit has +// no effect when the PEN bit disables parity checking and +// generation. +#define UART_UARTLCR_H_EPS_RESET 0x0 +#define UART_UARTLCR_H_EPS_BITS 0x00000004 +#define UART_UARTLCR_H_EPS_MSB 2 +#define UART_UARTLCR_H_EPS_LSB 2 +#define UART_UARTLCR_H_EPS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_PEN +// Description : Parity enable: 0 = parity is disabled and no parity bit added +// to the data frame 1 = parity checking and generation is +// enabled. +#define UART_UARTLCR_H_PEN_RESET 0x0 +#define UART_UARTLCR_H_PEN_BITS 0x00000002 +#define UART_UARTLCR_H_PEN_MSB 1 +#define UART_UARTLCR_H_PEN_LSB 1 +#define UART_UARTLCR_H_PEN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTLCR_H_BRK +// Description : Send break. If this bit is set to 1, a low-level is continually +// output on the UARTTXD output, after completing transmission of +// the current character. For the proper execution of the break +// command, the software must set this bit for at least two +// complete frames. For normal use, this bit must be cleared to 0. +#define UART_UARTLCR_H_BRK_RESET 0x0 +#define UART_UARTLCR_H_BRK_BITS 0x00000001 +#define UART_UARTLCR_H_BRK_MSB 0 +#define UART_UARTLCR_H_BRK_LSB 0 +#define UART_UARTLCR_H_BRK_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTCR +// Description : Control Register, UARTCR +#define UART_UARTCR_OFFSET 0x00000030 +#define UART_UARTCR_BITS 0x0000ff87 +#define UART_UARTCR_RESET 0x00000300 +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_CTSEN +// Description : CTS hardware flow control enable. If this bit is set to 1, CTS +// hardware flow control is enabled. Data is only transmitted when +// the nUARTCTS signal is asserted. +#define UART_UARTCR_CTSEN_RESET 0x0 +#define UART_UARTCR_CTSEN_BITS 0x00008000 +#define UART_UARTCR_CTSEN_MSB 15 +#define UART_UARTCR_CTSEN_LSB 15 +#define UART_UARTCR_CTSEN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_RTSEN +// Description : RTS hardware flow control enable. If this bit is set to 1, RTS +// hardware flow control is enabled. Data is only requested when +// there is space in the receive FIFO for it to be received. +#define UART_UARTCR_RTSEN_RESET 0x0 +#define UART_UARTCR_RTSEN_BITS 0x00004000 +#define UART_UARTCR_RTSEN_MSB 14 +#define UART_UARTCR_RTSEN_LSB 14 +#define UART_UARTCR_RTSEN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_OUT2 +// Description : This bit is the complement of the UART Out2 (nUARTOut2) modem +// status output. That is, when the bit is programmed to a 1, the +// output is 0. For DTE this can be used as Ring Indicator (RI). +#define UART_UARTCR_OUT2_RESET 0x0 +#define UART_UARTCR_OUT2_BITS 0x00002000 +#define UART_UARTCR_OUT2_MSB 13 +#define UART_UARTCR_OUT2_LSB 13 +#define UART_UARTCR_OUT2_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_OUT1 +// Description : This bit is the complement of the UART Out1 (nUARTOut1) modem +// status output. That is, when the bit is programmed to a 1 the +// output is 0. For DTE this can be used as Data Carrier Detect +// (DCD). +#define UART_UARTCR_OUT1_RESET 0x0 +#define UART_UARTCR_OUT1_BITS 0x00001000 +#define UART_UARTCR_OUT1_MSB 12 +#define UART_UARTCR_OUT1_LSB 12 +#define UART_UARTCR_OUT1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_RTS +// Description : Request to send. This bit is the complement of the UART request +// to send, nUARTRTS, modem status output. That is, when the bit +// is programmed to a 1 then nUARTRTS is LOW. +#define UART_UARTCR_RTS_RESET 0x0 +#define UART_UARTCR_RTS_BITS 0x00000800 +#define UART_UARTCR_RTS_MSB 11 +#define UART_UARTCR_RTS_LSB 11 +#define UART_UARTCR_RTS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_DTR +// Description : Data transmit ready. This bit is the complement of the UART +// data transmit ready, nUARTDTR, modem status output. That is, +// when the bit is programmed to a 1 then nUARTDTR is LOW. +#define UART_UARTCR_DTR_RESET 0x0 +#define UART_UARTCR_DTR_BITS 0x00000400 +#define UART_UARTCR_DTR_MSB 10 +#define UART_UARTCR_DTR_LSB 10 +#define UART_UARTCR_DTR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_RXE +// Description : Receive enable. If this bit is set to 1, the receive section of +// the UART is enabled. Data reception occurs for either UART +// signals or SIR signals depending on the setting of the SIREN +// bit. When the UART is disabled in the middle of reception, it +// completes the current character before stopping. +#define UART_UARTCR_RXE_RESET 0x1 +#define UART_UARTCR_RXE_BITS 0x00000200 +#define UART_UARTCR_RXE_MSB 9 +#define UART_UARTCR_RXE_LSB 9 +#define UART_UARTCR_RXE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_TXE +// Description : Transmit enable. If this bit is set to 1, the transmit section +// of the UART is enabled. Data transmission occurs for either +// UART signals, or SIR signals depending on the setting of the +// SIREN bit. When the UART is disabled in the middle of +// transmission, it completes the current character before +// stopping. +#define UART_UARTCR_TXE_RESET 0x1 +#define UART_UARTCR_TXE_BITS 0x00000100 +#define UART_UARTCR_TXE_MSB 8 +#define UART_UARTCR_TXE_LSB 8 +#define UART_UARTCR_TXE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_LBE +// Description : Loopback enable. If this bit is set to 1 and the SIREN bit is +// set to 1 and the SIRTEST bit in the Test Control Register, +// UARTTCR is set to 1, then the nSIROUT path is inverted, and fed +// through to the SIRIN path. The SIRTEST bit in the test register +// must be set to 1 to override the normal half-duplex SIR +// operation. This must be the requirement for accessing the test +// registers during normal operation, and SIRTEST must be cleared +// to 0 when loopback testing is finished. This feature reduces +// the amount of external coupling required during system test. If +// this bit is set to 1, and the SIRTEST bit is set to 0, the +// UARTTXD path is fed through to the UARTRXD path. In either SIR +// mode or UART mode, when this bit is set, the modem outputs are +// also fed through to the modem inputs. This bit is cleared to 0 +// on reset, to disable loopback. +#define UART_UARTCR_LBE_RESET 0x0 +#define UART_UARTCR_LBE_BITS 0x00000080 +#define UART_UARTCR_LBE_MSB 7 +#define UART_UARTCR_LBE_LSB 7 +#define UART_UARTCR_LBE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_SIRLP +// Description : SIR low-power IrDA mode. This bit selects the IrDA encoding +// mode. If this bit is cleared to 0, low-level bits are +// transmitted as an active high pulse with a width of 3 / 16th of +// the bit period. If this bit is set to 1, low-level bits are +// transmitted with a pulse width that is 3 times the period of +// the IrLPBaud16 input signal, regardless of the selected bit +// rate. Setting this bit uses less power, but might reduce +// transmission distances. +#define UART_UARTCR_SIRLP_RESET 0x0 +#define UART_UARTCR_SIRLP_BITS 0x00000004 +#define UART_UARTCR_SIRLP_MSB 2 +#define UART_UARTCR_SIRLP_LSB 2 +#define UART_UARTCR_SIRLP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_SIREN +// Description : SIR enable: 0 = IrDA SIR ENDEC is disabled. nSIROUT remains LOW +// (no light pulse generated), and signal transitions on SIRIN +// have no effect. 1 = IrDA SIR ENDEC is enabled. Data is +// transmitted and received on nSIROUT and SIRIN. UARTTXD remains +// HIGH, in the marking state. Signal transitions on UARTRXD or +// modem status inputs have no effect. This bit has no effect if +// the UARTEN bit disables the UART. +#define UART_UARTCR_SIREN_RESET 0x0 +#define UART_UARTCR_SIREN_BITS 0x00000002 +#define UART_UARTCR_SIREN_MSB 1 +#define UART_UARTCR_SIREN_LSB 1 +#define UART_UARTCR_SIREN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTCR_UARTEN +// Description : UART enable: 0 = UART is disabled. If the UART is disabled in +// the middle of transmission or reception, it completes the +// current character before stopping. 1 = the UART is enabled. +// Data transmission and reception occurs for either UART signals +// or SIR signals depending on the setting of the SIREN bit. +#define UART_UARTCR_UARTEN_RESET 0x0 +#define UART_UARTCR_UARTEN_BITS 0x00000001 +#define UART_UARTCR_UARTEN_MSB 0 +#define UART_UARTCR_UARTEN_LSB 0 +#define UART_UARTCR_UARTEN_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTIFLS +// Description : Interrupt FIFO Level Select Register, UARTIFLS +#define UART_UARTIFLS_OFFSET 0x00000034 +#define UART_UARTIFLS_BITS 0x0000003f +#define UART_UARTIFLS_RESET 0x00000012 +// ----------------------------------------------------------------------------- +// Field : UART_UARTIFLS_RXIFLSEL +// Description : Receive interrupt FIFO level select. The trigger points for the +// receive interrupt are as follows: b000 = Receive FIFO becomes +// >= 1 / 8 full b001 = Receive FIFO becomes >= 1 / 4 full b010 = +// Receive FIFO becomes >= 1 / 2 full b011 = Receive FIFO becomes +// >= 3 / 4 full b100 = Receive FIFO becomes >= 7 / 8 full +// b101-b111 = reserved. +#define UART_UARTIFLS_RXIFLSEL_RESET 0x2 +#define UART_UARTIFLS_RXIFLSEL_BITS 0x00000038 +#define UART_UARTIFLS_RXIFLSEL_MSB 5 +#define UART_UARTIFLS_RXIFLSEL_LSB 3 +#define UART_UARTIFLS_RXIFLSEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIFLS_TXIFLSEL +// Description : Transmit interrupt FIFO level select. The trigger points for +// the transmit interrupt are as follows: b000 = Transmit FIFO +// becomes <= 1 / 8 full b001 = Transmit FIFO becomes <= 1 / 4 +// full b010 = Transmit FIFO becomes <= 1 / 2 full b011 = Transmit +// FIFO becomes <= 3 / 4 full b100 = Transmit FIFO becomes <= 7 / +// 8 full b101-b111 = reserved. +#define UART_UARTIFLS_TXIFLSEL_RESET 0x2 +#define UART_UARTIFLS_TXIFLSEL_BITS 0x00000007 +#define UART_UARTIFLS_TXIFLSEL_MSB 2 +#define UART_UARTIFLS_TXIFLSEL_LSB 0 +#define UART_UARTIFLS_TXIFLSEL_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTIMSC +// Description : Interrupt Mask Set/Clear Register, UARTIMSC +#define UART_UARTIMSC_OFFSET 0x00000038 +#define UART_UARTIMSC_BITS 0x000007ff +#define UART_UARTIMSC_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_OEIM +// Description : Overrun error interrupt mask. A read returns the current mask +// for the UARTOEINTR interrupt. On a write of 1, the mask of the +// UARTOEINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_OEIM_RESET 0x0 +#define UART_UARTIMSC_OEIM_BITS 0x00000400 +#define UART_UARTIMSC_OEIM_MSB 10 +#define UART_UARTIMSC_OEIM_LSB 10 +#define UART_UARTIMSC_OEIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_BEIM +// Description : Break error interrupt mask. A read returns the current mask for +// the UARTBEINTR interrupt. On a write of 1, the mask of the +// UARTBEINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_BEIM_RESET 0x0 +#define UART_UARTIMSC_BEIM_BITS 0x00000200 +#define UART_UARTIMSC_BEIM_MSB 9 +#define UART_UARTIMSC_BEIM_LSB 9 +#define UART_UARTIMSC_BEIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_PEIM +// Description : Parity error interrupt mask. A read returns the current mask +// for the UARTPEINTR interrupt. On a write of 1, the mask of the +// UARTPEINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_PEIM_RESET 0x0 +#define UART_UARTIMSC_PEIM_BITS 0x00000100 +#define UART_UARTIMSC_PEIM_MSB 8 +#define UART_UARTIMSC_PEIM_LSB 8 +#define UART_UARTIMSC_PEIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_FEIM +// Description : Framing error interrupt mask. A read returns the current mask +// for the UARTFEINTR interrupt. On a write of 1, the mask of the +// UARTFEINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_FEIM_RESET 0x0 +#define UART_UARTIMSC_FEIM_BITS 0x00000080 +#define UART_UARTIMSC_FEIM_MSB 7 +#define UART_UARTIMSC_FEIM_LSB 7 +#define UART_UARTIMSC_FEIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_RTIM +// Description : Receive timeout interrupt mask. A read returns the current mask +// for the UARTRTINTR interrupt. On a write of 1, the mask of the +// UARTRTINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_RTIM_RESET 0x0 +#define UART_UARTIMSC_RTIM_BITS 0x00000040 +#define UART_UARTIMSC_RTIM_MSB 6 +#define UART_UARTIMSC_RTIM_LSB 6 +#define UART_UARTIMSC_RTIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_TXIM +// Description : Transmit interrupt mask. A read returns the current mask for +// the UARTTXINTR interrupt. On a write of 1, the mask of the +// UARTTXINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_TXIM_RESET 0x0 +#define UART_UARTIMSC_TXIM_BITS 0x00000020 +#define UART_UARTIMSC_TXIM_MSB 5 +#define UART_UARTIMSC_TXIM_LSB 5 +#define UART_UARTIMSC_TXIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_RXIM +// Description : Receive interrupt mask. A read returns the current mask for the +// UARTRXINTR interrupt. On a write of 1, the mask of the +// UARTRXINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_RXIM_RESET 0x0 +#define UART_UARTIMSC_RXIM_BITS 0x00000010 +#define UART_UARTIMSC_RXIM_MSB 4 +#define UART_UARTIMSC_RXIM_LSB 4 +#define UART_UARTIMSC_RXIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_DSRMIM +// Description : nUARTDSR modem interrupt mask. A read returns the current mask +// for the UARTDSRINTR interrupt. On a write of 1, the mask of the +// UARTDSRINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_DSRMIM_RESET 0x0 +#define UART_UARTIMSC_DSRMIM_BITS 0x00000008 +#define UART_UARTIMSC_DSRMIM_MSB 3 +#define UART_UARTIMSC_DSRMIM_LSB 3 +#define UART_UARTIMSC_DSRMIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_DCDMIM +// Description : nUARTDCD modem interrupt mask. A read returns the current mask +// for the UARTDCDINTR interrupt. On a write of 1, the mask of the +// UARTDCDINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_DCDMIM_RESET 0x0 +#define UART_UARTIMSC_DCDMIM_BITS 0x00000004 +#define UART_UARTIMSC_DCDMIM_MSB 2 +#define UART_UARTIMSC_DCDMIM_LSB 2 +#define UART_UARTIMSC_DCDMIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_CTSMIM +// Description : nUARTCTS modem interrupt mask. A read returns the current mask +// for the UARTCTSINTR interrupt. On a write of 1, the mask of the +// UARTCTSINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_CTSMIM_RESET 0x0 +#define UART_UARTIMSC_CTSMIM_BITS 0x00000002 +#define UART_UARTIMSC_CTSMIM_MSB 1 +#define UART_UARTIMSC_CTSMIM_LSB 1 +#define UART_UARTIMSC_CTSMIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTIMSC_RIMIM +// Description : nUARTRI modem interrupt mask. A read returns the current mask +// for the UARTRIINTR interrupt. On a write of 1, the mask of the +// UARTRIINTR interrupt is set. A write of 0 clears the mask. +#define UART_UARTIMSC_RIMIM_RESET 0x0 +#define UART_UARTIMSC_RIMIM_BITS 0x00000001 +#define UART_UARTIMSC_RIMIM_MSB 0 +#define UART_UARTIMSC_RIMIM_LSB 0 +#define UART_UARTIMSC_RIMIM_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTRIS +// Description : Raw Interrupt Status Register, UARTRIS +#define UART_UARTRIS_OFFSET 0x0000003c +#define UART_UARTRIS_BITS 0x000007ff +#define UART_UARTRIS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_OERIS +// Description : Overrun error interrupt status. Returns the raw interrupt state +// of the UARTOEINTR interrupt. +#define UART_UARTRIS_OERIS_RESET 0x0 +#define UART_UARTRIS_OERIS_BITS 0x00000400 +#define UART_UARTRIS_OERIS_MSB 10 +#define UART_UARTRIS_OERIS_LSB 10 +#define UART_UARTRIS_OERIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_BERIS +// Description : Break error interrupt status. Returns the raw interrupt state +// of the UARTBEINTR interrupt. +#define UART_UARTRIS_BERIS_RESET 0x0 +#define UART_UARTRIS_BERIS_BITS 0x00000200 +#define UART_UARTRIS_BERIS_MSB 9 +#define UART_UARTRIS_BERIS_LSB 9 +#define UART_UARTRIS_BERIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_PERIS +// Description : Parity error interrupt status. Returns the raw interrupt state +// of the UARTPEINTR interrupt. +#define UART_UARTRIS_PERIS_RESET 0x0 +#define UART_UARTRIS_PERIS_BITS 0x00000100 +#define UART_UARTRIS_PERIS_MSB 8 +#define UART_UARTRIS_PERIS_LSB 8 +#define UART_UARTRIS_PERIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_FERIS +// Description : Framing error interrupt status. Returns the raw interrupt state +// of the UARTFEINTR interrupt. +#define UART_UARTRIS_FERIS_RESET 0x0 +#define UART_UARTRIS_FERIS_BITS 0x00000080 +#define UART_UARTRIS_FERIS_MSB 7 +#define UART_UARTRIS_FERIS_LSB 7 +#define UART_UARTRIS_FERIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_RTRIS +// Description : Receive timeout interrupt status. Returns the raw interrupt +// state of the UARTRTINTR interrupt. a +#define UART_UARTRIS_RTRIS_RESET 0x0 +#define UART_UARTRIS_RTRIS_BITS 0x00000040 +#define UART_UARTRIS_RTRIS_MSB 6 +#define UART_UARTRIS_RTRIS_LSB 6 +#define UART_UARTRIS_RTRIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_TXRIS +// Description : Transmit interrupt status. Returns the raw interrupt state of +// the UARTTXINTR interrupt. +#define UART_UARTRIS_TXRIS_RESET 0x0 +#define UART_UARTRIS_TXRIS_BITS 0x00000020 +#define UART_UARTRIS_TXRIS_MSB 5 +#define UART_UARTRIS_TXRIS_LSB 5 +#define UART_UARTRIS_TXRIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_RXRIS +// Description : Receive interrupt status. Returns the raw interrupt state of +// the UARTRXINTR interrupt. +#define UART_UARTRIS_RXRIS_RESET 0x0 +#define UART_UARTRIS_RXRIS_BITS 0x00000010 +#define UART_UARTRIS_RXRIS_MSB 4 +#define UART_UARTRIS_RXRIS_LSB 4 +#define UART_UARTRIS_RXRIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_DSRRMIS +// Description : nUARTDSR modem interrupt status. Returns the raw interrupt +// state of the UARTDSRINTR interrupt. +#define UART_UARTRIS_DSRRMIS_RESET "-" +#define UART_UARTRIS_DSRRMIS_BITS 0x00000008 +#define UART_UARTRIS_DSRRMIS_MSB 3 +#define UART_UARTRIS_DSRRMIS_LSB 3 +#define UART_UARTRIS_DSRRMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_DCDRMIS +// Description : nUARTDCD modem interrupt status. Returns the raw interrupt +// state of the UARTDCDINTR interrupt. +#define UART_UARTRIS_DCDRMIS_RESET "-" +#define UART_UARTRIS_DCDRMIS_BITS 0x00000004 +#define UART_UARTRIS_DCDRMIS_MSB 2 +#define UART_UARTRIS_DCDRMIS_LSB 2 +#define UART_UARTRIS_DCDRMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_CTSRMIS +// Description : nUARTCTS modem interrupt status. Returns the raw interrupt +// state of the UARTCTSINTR interrupt. +#define UART_UARTRIS_CTSRMIS_RESET "-" +#define UART_UARTRIS_CTSRMIS_BITS 0x00000002 +#define UART_UARTRIS_CTSRMIS_MSB 1 +#define UART_UARTRIS_CTSRMIS_LSB 1 +#define UART_UARTRIS_CTSRMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTRIS_RIRMIS +// Description : nUARTRI modem interrupt status. Returns the raw interrupt state +// of the UARTRIINTR interrupt. +#define UART_UARTRIS_RIRMIS_RESET "-" +#define UART_UARTRIS_RIRMIS_BITS 0x00000001 +#define UART_UARTRIS_RIRMIS_MSB 0 +#define UART_UARTRIS_RIRMIS_LSB 0 +#define UART_UARTRIS_RIRMIS_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTMIS +// Description : Masked Interrupt Status Register, UARTMIS +#define UART_UARTMIS_OFFSET 0x00000040 +#define UART_UARTMIS_BITS 0x000007ff +#define UART_UARTMIS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_OEMIS +// Description : Overrun error masked interrupt status. Returns the masked +// interrupt state of the UARTOEINTR interrupt. +#define UART_UARTMIS_OEMIS_RESET 0x0 +#define UART_UARTMIS_OEMIS_BITS 0x00000400 +#define UART_UARTMIS_OEMIS_MSB 10 +#define UART_UARTMIS_OEMIS_LSB 10 +#define UART_UARTMIS_OEMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_BEMIS +// Description : Break error masked interrupt status. Returns the masked +// interrupt state of the UARTBEINTR interrupt. +#define UART_UARTMIS_BEMIS_RESET 0x0 +#define UART_UARTMIS_BEMIS_BITS 0x00000200 +#define UART_UARTMIS_BEMIS_MSB 9 +#define UART_UARTMIS_BEMIS_LSB 9 +#define UART_UARTMIS_BEMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_PEMIS +// Description : Parity error masked interrupt status. Returns the masked +// interrupt state of the UARTPEINTR interrupt. +#define UART_UARTMIS_PEMIS_RESET 0x0 +#define UART_UARTMIS_PEMIS_BITS 0x00000100 +#define UART_UARTMIS_PEMIS_MSB 8 +#define UART_UARTMIS_PEMIS_LSB 8 +#define UART_UARTMIS_PEMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_FEMIS +// Description : Framing error masked interrupt status. Returns the masked +// interrupt state of the UARTFEINTR interrupt. +#define UART_UARTMIS_FEMIS_RESET 0x0 +#define UART_UARTMIS_FEMIS_BITS 0x00000080 +#define UART_UARTMIS_FEMIS_MSB 7 +#define UART_UARTMIS_FEMIS_LSB 7 +#define UART_UARTMIS_FEMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_RTMIS +// Description : Receive timeout masked interrupt status. Returns the masked +// interrupt state of the UARTRTINTR interrupt. +#define UART_UARTMIS_RTMIS_RESET 0x0 +#define UART_UARTMIS_RTMIS_BITS 0x00000040 +#define UART_UARTMIS_RTMIS_MSB 6 +#define UART_UARTMIS_RTMIS_LSB 6 +#define UART_UARTMIS_RTMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_TXMIS +// Description : Transmit masked interrupt status. Returns the masked interrupt +// state of the UARTTXINTR interrupt. +#define UART_UARTMIS_TXMIS_RESET 0x0 +#define UART_UARTMIS_TXMIS_BITS 0x00000020 +#define UART_UARTMIS_TXMIS_MSB 5 +#define UART_UARTMIS_TXMIS_LSB 5 +#define UART_UARTMIS_TXMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_RXMIS +// Description : Receive masked interrupt status. Returns the masked interrupt +// state of the UARTRXINTR interrupt. +#define UART_UARTMIS_RXMIS_RESET 0x0 +#define UART_UARTMIS_RXMIS_BITS 0x00000010 +#define UART_UARTMIS_RXMIS_MSB 4 +#define UART_UARTMIS_RXMIS_LSB 4 +#define UART_UARTMIS_RXMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_DSRMMIS +// Description : nUARTDSR modem masked interrupt status. Returns the masked +// interrupt state of the UARTDSRINTR interrupt. +#define UART_UARTMIS_DSRMMIS_RESET "-" +#define UART_UARTMIS_DSRMMIS_BITS 0x00000008 +#define UART_UARTMIS_DSRMMIS_MSB 3 +#define UART_UARTMIS_DSRMMIS_LSB 3 +#define UART_UARTMIS_DSRMMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_DCDMMIS +// Description : nUARTDCD modem masked interrupt status. Returns the masked +// interrupt state of the UARTDCDINTR interrupt. +#define UART_UARTMIS_DCDMMIS_RESET "-" +#define UART_UARTMIS_DCDMMIS_BITS 0x00000004 +#define UART_UARTMIS_DCDMMIS_MSB 2 +#define UART_UARTMIS_DCDMMIS_LSB 2 +#define UART_UARTMIS_DCDMMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_CTSMMIS +// Description : nUARTCTS modem masked interrupt status. Returns the masked +// interrupt state of the UARTCTSINTR interrupt. +#define UART_UARTMIS_CTSMMIS_RESET "-" +#define UART_UARTMIS_CTSMMIS_BITS 0x00000002 +#define UART_UARTMIS_CTSMMIS_MSB 1 +#define UART_UARTMIS_CTSMMIS_LSB 1 +#define UART_UARTMIS_CTSMMIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTMIS_RIMMIS +// Description : nUARTRI modem masked interrupt status. Returns the masked +// interrupt state of the UARTRIINTR interrupt. +#define UART_UARTMIS_RIMMIS_RESET "-" +#define UART_UARTMIS_RIMMIS_BITS 0x00000001 +#define UART_UARTMIS_RIMMIS_MSB 0 +#define UART_UARTMIS_RIMMIS_LSB 0 +#define UART_UARTMIS_RIMMIS_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTICR +// Description : Interrupt Clear Register, UARTICR +#define UART_UARTICR_OFFSET 0x00000044 +#define UART_UARTICR_BITS 0x000007ff +#define UART_UARTICR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_OEIC +// Description : Overrun error interrupt clear. Clears the UARTOEINTR interrupt. +#define UART_UARTICR_OEIC_RESET "-" +#define UART_UARTICR_OEIC_BITS 0x00000400 +#define UART_UARTICR_OEIC_MSB 10 +#define UART_UARTICR_OEIC_LSB 10 +#define UART_UARTICR_OEIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_BEIC +// Description : Break error interrupt clear. Clears the UARTBEINTR interrupt. +#define UART_UARTICR_BEIC_RESET "-" +#define UART_UARTICR_BEIC_BITS 0x00000200 +#define UART_UARTICR_BEIC_MSB 9 +#define UART_UARTICR_BEIC_LSB 9 +#define UART_UARTICR_BEIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_PEIC +// Description : Parity error interrupt clear. Clears the UARTPEINTR interrupt. +#define UART_UARTICR_PEIC_RESET "-" +#define UART_UARTICR_PEIC_BITS 0x00000100 +#define UART_UARTICR_PEIC_MSB 8 +#define UART_UARTICR_PEIC_LSB 8 +#define UART_UARTICR_PEIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_FEIC +// Description : Framing error interrupt clear. Clears the UARTFEINTR interrupt. +#define UART_UARTICR_FEIC_RESET "-" +#define UART_UARTICR_FEIC_BITS 0x00000080 +#define UART_UARTICR_FEIC_MSB 7 +#define UART_UARTICR_FEIC_LSB 7 +#define UART_UARTICR_FEIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_RTIC +// Description : Receive timeout interrupt clear. Clears the UARTRTINTR +// interrupt. +#define UART_UARTICR_RTIC_RESET "-" +#define UART_UARTICR_RTIC_BITS 0x00000040 +#define UART_UARTICR_RTIC_MSB 6 +#define UART_UARTICR_RTIC_LSB 6 +#define UART_UARTICR_RTIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_TXIC +// Description : Transmit interrupt clear. Clears the UARTTXINTR interrupt. +#define UART_UARTICR_TXIC_RESET "-" +#define UART_UARTICR_TXIC_BITS 0x00000020 +#define UART_UARTICR_TXIC_MSB 5 +#define UART_UARTICR_TXIC_LSB 5 +#define UART_UARTICR_TXIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_RXIC +// Description : Receive interrupt clear. Clears the UARTRXINTR interrupt. +#define UART_UARTICR_RXIC_RESET "-" +#define UART_UARTICR_RXIC_BITS 0x00000010 +#define UART_UARTICR_RXIC_MSB 4 +#define UART_UARTICR_RXIC_LSB 4 +#define UART_UARTICR_RXIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_DSRMIC +// Description : nUARTDSR modem interrupt clear. Clears the UARTDSRINTR +// interrupt. +#define UART_UARTICR_DSRMIC_RESET "-" +#define UART_UARTICR_DSRMIC_BITS 0x00000008 +#define UART_UARTICR_DSRMIC_MSB 3 +#define UART_UARTICR_DSRMIC_LSB 3 +#define UART_UARTICR_DSRMIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_DCDMIC +// Description : nUARTDCD modem interrupt clear. Clears the UARTDCDINTR +// interrupt. +#define UART_UARTICR_DCDMIC_RESET "-" +#define UART_UARTICR_DCDMIC_BITS 0x00000004 +#define UART_UARTICR_DCDMIC_MSB 2 +#define UART_UARTICR_DCDMIC_LSB 2 +#define UART_UARTICR_DCDMIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_CTSMIC +// Description : nUARTCTS modem interrupt clear. Clears the UARTCTSINTR +// interrupt. +#define UART_UARTICR_CTSMIC_RESET "-" +#define UART_UARTICR_CTSMIC_BITS 0x00000002 +#define UART_UARTICR_CTSMIC_MSB 1 +#define UART_UARTICR_CTSMIC_LSB 1 +#define UART_UARTICR_CTSMIC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : UART_UARTICR_RIMIC +// Description : nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt. +#define UART_UARTICR_RIMIC_RESET "-" +#define UART_UARTICR_RIMIC_BITS 0x00000001 +#define UART_UARTICR_RIMIC_MSB 0 +#define UART_UARTICR_RIMIC_LSB 0 +#define UART_UARTICR_RIMIC_ACCESS "WC" +// ============================================================================= +// Register : UART_UARTDMACR +// Description : DMA Control Register, UARTDMACR +#define UART_UARTDMACR_OFFSET 0x00000048 +#define UART_UARTDMACR_BITS 0x00000007 +#define UART_UARTDMACR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTDMACR_DMAONERR +// Description : DMA on error. If this bit is set to 1, the DMA receive request +// outputs, UARTRXDMASREQ or UARTRXDMABREQ, are disabled when the +// UART error interrupt is asserted. +#define UART_UARTDMACR_DMAONERR_RESET 0x0 +#define UART_UARTDMACR_DMAONERR_BITS 0x00000004 +#define UART_UARTDMACR_DMAONERR_MSB 2 +#define UART_UARTDMACR_DMAONERR_LSB 2 +#define UART_UARTDMACR_DMAONERR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTDMACR_TXDMAE +// Description : Transmit DMA enable. If this bit is set to 1, DMA for the +// transmit FIFO is enabled. +#define UART_UARTDMACR_TXDMAE_RESET 0x0 +#define UART_UARTDMACR_TXDMAE_BITS 0x00000002 +#define UART_UARTDMACR_TXDMAE_MSB 1 +#define UART_UARTDMACR_TXDMAE_LSB 1 +#define UART_UARTDMACR_TXDMAE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : UART_UARTDMACR_RXDMAE +// Description : Receive DMA enable. If this bit is set to 1, DMA for the +// receive FIFO is enabled. +#define UART_UARTDMACR_RXDMAE_RESET 0x0 +#define UART_UARTDMACR_RXDMAE_BITS 0x00000001 +#define UART_UARTDMACR_RXDMAE_MSB 0 +#define UART_UARTDMACR_RXDMAE_LSB 0 +#define UART_UARTDMACR_RXDMAE_ACCESS "RW" +// ============================================================================= +// Register : UART_UARTPERIPHID0 +// Description : UARTPeriphID0 Register +#define UART_UARTPERIPHID0_OFFSET 0x00000fe0 +#define UART_UARTPERIPHID0_BITS 0x000000ff +#define UART_UARTPERIPHID0_RESET 0x00000011 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPERIPHID0_PARTNUMBER0 +// Description : These bits read back as 0x11 +#define UART_UARTPERIPHID0_PARTNUMBER0_RESET 0x11 +#define UART_UARTPERIPHID0_PARTNUMBER0_BITS 0x000000ff +#define UART_UARTPERIPHID0_PARTNUMBER0_MSB 7 +#define UART_UARTPERIPHID0_PARTNUMBER0_LSB 0 +#define UART_UARTPERIPHID0_PARTNUMBER0_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPERIPHID1 +// Description : UARTPeriphID1 Register +#define UART_UARTPERIPHID1_OFFSET 0x00000fe4 +#define UART_UARTPERIPHID1_BITS 0x000000ff +#define UART_UARTPERIPHID1_RESET 0x00000010 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPERIPHID1_DESIGNER0 +// Description : These bits read back as 0x1 +#define UART_UARTPERIPHID1_DESIGNER0_RESET 0x1 +#define UART_UARTPERIPHID1_DESIGNER0_BITS 0x000000f0 +#define UART_UARTPERIPHID1_DESIGNER0_MSB 7 +#define UART_UARTPERIPHID1_DESIGNER0_LSB 4 +#define UART_UARTPERIPHID1_DESIGNER0_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTPERIPHID1_PARTNUMBER1 +// Description : These bits read back as 0x0 +#define UART_UARTPERIPHID1_PARTNUMBER1_RESET 0x0 +#define UART_UARTPERIPHID1_PARTNUMBER1_BITS 0x0000000f +#define UART_UARTPERIPHID1_PARTNUMBER1_MSB 3 +#define UART_UARTPERIPHID1_PARTNUMBER1_LSB 0 +#define UART_UARTPERIPHID1_PARTNUMBER1_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPERIPHID2 +// Description : UARTPeriphID2 Register +#define UART_UARTPERIPHID2_OFFSET 0x00000fe8 +#define UART_UARTPERIPHID2_BITS 0x000000ff +#define UART_UARTPERIPHID2_RESET 0x00000034 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPERIPHID2_REVISION +// Description : This field depends on the revision of the UART: r1p0 0x0 r1p1 +// 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3 +#define UART_UARTPERIPHID2_REVISION_RESET 0x3 +#define UART_UARTPERIPHID2_REVISION_BITS 0x000000f0 +#define UART_UARTPERIPHID2_REVISION_MSB 7 +#define UART_UARTPERIPHID2_REVISION_LSB 4 +#define UART_UARTPERIPHID2_REVISION_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : UART_UARTPERIPHID2_DESIGNER1 +// Description : These bits read back as 0x4 +#define UART_UARTPERIPHID2_DESIGNER1_RESET 0x4 +#define UART_UARTPERIPHID2_DESIGNER1_BITS 0x0000000f +#define UART_UARTPERIPHID2_DESIGNER1_MSB 3 +#define UART_UARTPERIPHID2_DESIGNER1_LSB 0 +#define UART_UARTPERIPHID2_DESIGNER1_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPERIPHID3 +// Description : UARTPeriphID3 Register +#define UART_UARTPERIPHID3_OFFSET 0x00000fec +#define UART_UARTPERIPHID3_BITS 0x000000ff +#define UART_UARTPERIPHID3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPERIPHID3_CONFIGURATION +// Description : These bits read back as 0x00 +#define UART_UARTPERIPHID3_CONFIGURATION_RESET 0x00 +#define UART_UARTPERIPHID3_CONFIGURATION_BITS 0x000000ff +#define UART_UARTPERIPHID3_CONFIGURATION_MSB 7 +#define UART_UARTPERIPHID3_CONFIGURATION_LSB 0 +#define UART_UARTPERIPHID3_CONFIGURATION_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPCELLID0 +// Description : UARTPCellID0 Register +#define UART_UARTPCELLID0_OFFSET 0x00000ff0 +#define UART_UARTPCELLID0_BITS 0x000000ff +#define UART_UARTPCELLID0_RESET 0x0000000d +// ----------------------------------------------------------------------------- +// Field : UART_UARTPCELLID0_UARTPCELLID0 +// Description : These bits read back as 0x0D +#define UART_UARTPCELLID0_UARTPCELLID0_RESET 0x0d +#define UART_UARTPCELLID0_UARTPCELLID0_BITS 0x000000ff +#define UART_UARTPCELLID0_UARTPCELLID0_MSB 7 +#define UART_UARTPCELLID0_UARTPCELLID0_LSB 0 +#define UART_UARTPCELLID0_UARTPCELLID0_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPCELLID1 +// Description : UARTPCellID1 Register +#define UART_UARTPCELLID1_OFFSET 0x00000ff4 +#define UART_UARTPCELLID1_BITS 0x000000ff +#define UART_UARTPCELLID1_RESET 0x000000f0 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPCELLID1_UARTPCELLID1 +// Description : These bits read back as 0xF0 +#define UART_UARTPCELLID1_UARTPCELLID1_RESET 0xf0 +#define UART_UARTPCELLID1_UARTPCELLID1_BITS 0x000000ff +#define UART_UARTPCELLID1_UARTPCELLID1_MSB 7 +#define UART_UARTPCELLID1_UARTPCELLID1_LSB 0 +#define UART_UARTPCELLID1_UARTPCELLID1_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPCELLID2 +// Description : UARTPCellID2 Register +#define UART_UARTPCELLID2_OFFSET 0x00000ff8 +#define UART_UARTPCELLID2_BITS 0x000000ff +#define UART_UARTPCELLID2_RESET 0x00000005 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPCELLID2_UARTPCELLID2 +// Description : These bits read back as 0x05 +#define UART_UARTPCELLID2_UARTPCELLID2_RESET 0x05 +#define UART_UARTPCELLID2_UARTPCELLID2_BITS 0x000000ff +#define UART_UARTPCELLID2_UARTPCELLID2_MSB 7 +#define UART_UARTPCELLID2_UARTPCELLID2_LSB 0 +#define UART_UARTPCELLID2_UARTPCELLID2_ACCESS "RO" +// ============================================================================= +// Register : UART_UARTPCELLID3 +// Description : UARTPCellID3 Register +#define UART_UARTPCELLID3_OFFSET 0x00000ffc +#define UART_UARTPCELLID3_BITS 0x000000ff +#define UART_UARTPCELLID3_RESET 0x000000b1 +// ----------------------------------------------------------------------------- +// Field : UART_UARTPCELLID3_UARTPCELLID3 +// Description : These bits read back as 0xB1 +#define UART_UARTPCELLID3_UARTPCELLID3_RESET 0xb1 +#define UART_UARTPCELLID3_UARTPCELLID3_BITS 0x000000ff +#define UART_UARTPCELLID3_UARTPCELLID3_MSB 7 +#define UART_UARTPCELLID3_UARTPCELLID3_LSB 0 +#define UART_UARTPCELLID3_UARTPCELLID3_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_UART_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/usb.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/usb.h new file mode 100644 index 0000000000..6693205f96 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/usb.h @@ -0,0 +1,3603 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : USB +// Version : 1 +// Bus type : ahbl +// Description : USB FS/LS controller device registers +// ============================================================================= +#ifndef HARDWARE_REGS_USB_DEFINED +#define HARDWARE_REGS_USB_DEFINED +// ============================================================================= +// Register : USB_ADDR_ENDP +// Description : Device address and endpoint control +#define USB_ADDR_ENDP_OFFSET 0x00000000 +#define USB_ADDR_ENDP_BITS 0x000f007f +#define USB_ADDR_ENDP_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP_ENDPOINT +// Description : Device endpoint to send data to. Only valid for HOST mode. +#define USB_ADDR_ENDP_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP_ADDRESS +// Description : In device mode, the address that the device should respond to. +// Set in response to a SET_ADDR setup packet from the host. In +// host mode set to the address of the device to communicate with. +#define USB_ADDR_ENDP_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP_ADDRESS_MSB 6 +#define USB_ADDR_ENDP_ADDRESS_LSB 0 +#define USB_ADDR_ENDP_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP1 +// Description : Interrupt endpoint 1. Only valid for HOST mode. +#define USB_ADDR_ENDP1_OFFSET 0x00000004 +#define USB_ADDR_ENDP1_BITS 0x060f007f +#define USB_ADDR_ENDP1_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP1_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP1_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP1_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP1_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP1_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP1_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP1_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP1_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP1_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP1_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP1_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP1_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP1_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP1_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP1_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP1_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP1_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP1_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP1_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP1_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP1_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP1_ADDRESS_MSB 6 +#define USB_ADDR_ENDP1_ADDRESS_LSB 0 +#define USB_ADDR_ENDP1_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP2 +// Description : Interrupt endpoint 2. Only valid for HOST mode. +#define USB_ADDR_ENDP2_OFFSET 0x00000008 +#define USB_ADDR_ENDP2_BITS 0x060f007f +#define USB_ADDR_ENDP2_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP2_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP2_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP2_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP2_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP2_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP2_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP2_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP2_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP2_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP2_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP2_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP2_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP2_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP2_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP2_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP2_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP2_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP2_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP2_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP2_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP2_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP2_ADDRESS_MSB 6 +#define USB_ADDR_ENDP2_ADDRESS_LSB 0 +#define USB_ADDR_ENDP2_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP3 +// Description : Interrupt endpoint 3. Only valid for HOST mode. +#define USB_ADDR_ENDP3_OFFSET 0x0000000c +#define USB_ADDR_ENDP3_BITS 0x060f007f +#define USB_ADDR_ENDP3_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP3_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP3_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP3_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP3_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP3_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP3_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP3_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP3_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP3_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP3_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP3_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP3_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP3_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP3_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP3_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP3_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP3_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP3_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP3_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP3_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP3_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP3_ADDRESS_MSB 6 +#define USB_ADDR_ENDP3_ADDRESS_LSB 0 +#define USB_ADDR_ENDP3_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP4 +// Description : Interrupt endpoint 4. Only valid for HOST mode. +#define USB_ADDR_ENDP4_OFFSET 0x00000010 +#define USB_ADDR_ENDP4_BITS 0x060f007f +#define USB_ADDR_ENDP4_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP4_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP4_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP4_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP4_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP4_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP4_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP4_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP4_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP4_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP4_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP4_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP4_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP4_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP4_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP4_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP4_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP4_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP4_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP4_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP4_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP4_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP4_ADDRESS_MSB 6 +#define USB_ADDR_ENDP4_ADDRESS_LSB 0 +#define USB_ADDR_ENDP4_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP5 +// Description : Interrupt endpoint 5. Only valid for HOST mode. +#define USB_ADDR_ENDP5_OFFSET 0x00000014 +#define USB_ADDR_ENDP5_BITS 0x060f007f +#define USB_ADDR_ENDP5_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP5_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP5_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP5_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP5_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP5_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP5_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP5_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP5_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP5_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP5_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP5_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP5_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP5_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP5_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP5_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP5_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP5_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP5_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP5_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP5_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP5_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP5_ADDRESS_MSB 6 +#define USB_ADDR_ENDP5_ADDRESS_LSB 0 +#define USB_ADDR_ENDP5_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP6 +// Description : Interrupt endpoint 6. Only valid for HOST mode. +#define USB_ADDR_ENDP6_OFFSET 0x00000018 +#define USB_ADDR_ENDP6_BITS 0x060f007f +#define USB_ADDR_ENDP6_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP6_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP6_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP6_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP6_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP6_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP6_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP6_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP6_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP6_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP6_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP6_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP6_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP6_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP6_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP6_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP6_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP6_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP6_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP6_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP6_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP6_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP6_ADDRESS_MSB 6 +#define USB_ADDR_ENDP6_ADDRESS_LSB 0 +#define USB_ADDR_ENDP6_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP7 +// Description : Interrupt endpoint 7. Only valid for HOST mode. +#define USB_ADDR_ENDP7_OFFSET 0x0000001c +#define USB_ADDR_ENDP7_BITS 0x060f007f +#define USB_ADDR_ENDP7_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP7_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP7_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP7_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP7_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP7_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP7_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP7_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP7_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP7_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP7_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP7_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP7_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP7_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP7_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP7_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP7_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP7_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP7_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP7_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP7_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP7_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP7_ADDRESS_MSB 6 +#define USB_ADDR_ENDP7_ADDRESS_LSB 0 +#define USB_ADDR_ENDP7_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP8 +// Description : Interrupt endpoint 8. Only valid for HOST mode. +#define USB_ADDR_ENDP8_OFFSET 0x00000020 +#define USB_ADDR_ENDP8_BITS 0x060f007f +#define USB_ADDR_ENDP8_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP8_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP8_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP8_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP8_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP8_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP8_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP8_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP8_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP8_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP8_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP8_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP8_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP8_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP8_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP8_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP8_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP8_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP8_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP8_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP8_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP8_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP8_ADDRESS_MSB 6 +#define USB_ADDR_ENDP8_ADDRESS_LSB 0 +#define USB_ADDR_ENDP8_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP9 +// Description : Interrupt endpoint 9. Only valid for HOST mode. +#define USB_ADDR_ENDP9_OFFSET 0x00000024 +#define USB_ADDR_ENDP9_BITS 0x060f007f +#define USB_ADDR_ENDP9_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP9_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP9_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP9_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP9_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP9_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP9_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP9_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP9_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP9_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP9_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP9_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP9_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP9_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP9_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP9_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP9_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP9_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP9_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP9_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP9_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP9_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP9_ADDRESS_MSB 6 +#define USB_ADDR_ENDP9_ADDRESS_LSB 0 +#define USB_ADDR_ENDP9_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP10 +// Description : Interrupt endpoint 10. Only valid for HOST mode. +#define USB_ADDR_ENDP10_OFFSET 0x00000028 +#define USB_ADDR_ENDP10_BITS 0x060f007f +#define USB_ADDR_ENDP10_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP10_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP10_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP10_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP10_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP10_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP10_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP10_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP10_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP10_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP10_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP10_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP10_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP10_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP10_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP10_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP10_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP10_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP10_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP10_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP10_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP10_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP10_ADDRESS_MSB 6 +#define USB_ADDR_ENDP10_ADDRESS_LSB 0 +#define USB_ADDR_ENDP10_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP11 +// Description : Interrupt endpoint 11. Only valid for HOST mode. +#define USB_ADDR_ENDP11_OFFSET 0x0000002c +#define USB_ADDR_ENDP11_BITS 0x060f007f +#define USB_ADDR_ENDP11_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP11_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP11_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP11_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP11_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP11_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP11_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP11_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP11_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP11_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP11_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP11_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP11_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP11_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP11_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP11_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP11_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP11_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP11_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP11_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP11_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP11_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP11_ADDRESS_MSB 6 +#define USB_ADDR_ENDP11_ADDRESS_LSB 0 +#define USB_ADDR_ENDP11_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP12 +// Description : Interrupt endpoint 12. Only valid for HOST mode. +#define USB_ADDR_ENDP12_OFFSET 0x00000030 +#define USB_ADDR_ENDP12_BITS 0x060f007f +#define USB_ADDR_ENDP12_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP12_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP12_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP12_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP12_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP12_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP12_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP12_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP12_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP12_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP12_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP12_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP12_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP12_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP12_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP12_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP12_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP12_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP12_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP12_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP12_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP12_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP12_ADDRESS_MSB 6 +#define USB_ADDR_ENDP12_ADDRESS_LSB 0 +#define USB_ADDR_ENDP12_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP13 +// Description : Interrupt endpoint 13. Only valid for HOST mode. +#define USB_ADDR_ENDP13_OFFSET 0x00000034 +#define USB_ADDR_ENDP13_BITS 0x060f007f +#define USB_ADDR_ENDP13_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP13_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP13_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP13_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP13_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP13_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP13_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP13_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP13_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP13_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP13_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP13_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP13_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP13_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP13_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP13_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP13_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP13_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP13_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP13_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP13_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP13_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP13_ADDRESS_MSB 6 +#define USB_ADDR_ENDP13_ADDRESS_LSB 0 +#define USB_ADDR_ENDP13_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP14 +// Description : Interrupt endpoint 14. Only valid for HOST mode. +#define USB_ADDR_ENDP14_OFFSET 0x00000038 +#define USB_ADDR_ENDP14_BITS 0x060f007f +#define USB_ADDR_ENDP14_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP14_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP14_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP14_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP14_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP14_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP14_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP14_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP14_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP14_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP14_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP14_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP14_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP14_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP14_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP14_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP14_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP14_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP14_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP14_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP14_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP14_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP14_ADDRESS_MSB 6 +#define USB_ADDR_ENDP14_ADDRESS_LSB 0 +#define USB_ADDR_ENDP14_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_ADDR_ENDP15 +// Description : Interrupt endpoint 15. Only valid for HOST mode. +#define USB_ADDR_ENDP15_OFFSET 0x0000003c +#define USB_ADDR_ENDP15_BITS 0x060f007f +#define USB_ADDR_ENDP15_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP15_INTEP_PREAMBLE +// Description : Interrupt EP requires preamble (is a low speed device on a full +// speed hub) +#define USB_ADDR_ENDP15_INTEP_PREAMBLE_RESET 0x0 +#define USB_ADDR_ENDP15_INTEP_PREAMBLE_BITS 0x04000000 +#define USB_ADDR_ENDP15_INTEP_PREAMBLE_MSB 26 +#define USB_ADDR_ENDP15_INTEP_PREAMBLE_LSB 26 +#define USB_ADDR_ENDP15_INTEP_PREAMBLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP15_INTEP_DIR +// Description : Direction of the interrupt endpoint. In=0, Out=1 +#define USB_ADDR_ENDP15_INTEP_DIR_RESET 0x0 +#define USB_ADDR_ENDP15_INTEP_DIR_BITS 0x02000000 +#define USB_ADDR_ENDP15_INTEP_DIR_MSB 25 +#define USB_ADDR_ENDP15_INTEP_DIR_LSB 25 +#define USB_ADDR_ENDP15_INTEP_DIR_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP15_ENDPOINT +// Description : Endpoint number of the interrupt endpoint +#define USB_ADDR_ENDP15_ENDPOINT_RESET 0x0 +#define USB_ADDR_ENDP15_ENDPOINT_BITS 0x000f0000 +#define USB_ADDR_ENDP15_ENDPOINT_MSB 19 +#define USB_ADDR_ENDP15_ENDPOINT_LSB 16 +#define USB_ADDR_ENDP15_ENDPOINT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_ADDR_ENDP15_ADDRESS +// Description : Device address +#define USB_ADDR_ENDP15_ADDRESS_RESET 0x00 +#define USB_ADDR_ENDP15_ADDRESS_BITS 0x0000007f +#define USB_ADDR_ENDP15_ADDRESS_MSB 6 +#define USB_ADDR_ENDP15_ADDRESS_LSB 0 +#define USB_ADDR_ENDP15_ADDRESS_ACCESS "RW" +// ============================================================================= +// Register : USB_MAIN_CTRL +// Description : Main control register +#define USB_MAIN_CTRL_OFFSET 0x00000040 +#define USB_MAIN_CTRL_BITS 0x80000003 +#define USB_MAIN_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_MAIN_CTRL_SIM_TIMING +// Description : Reduced timings for simulation +#define USB_MAIN_CTRL_SIM_TIMING_RESET 0x0 +#define USB_MAIN_CTRL_SIM_TIMING_BITS 0x80000000 +#define USB_MAIN_CTRL_SIM_TIMING_MSB 31 +#define USB_MAIN_CTRL_SIM_TIMING_LSB 31 +#define USB_MAIN_CTRL_SIM_TIMING_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_MAIN_CTRL_HOST_NDEVICE +// Description : Device mode = 0, Host mode = 1 +#define USB_MAIN_CTRL_HOST_NDEVICE_RESET 0x0 +#define USB_MAIN_CTRL_HOST_NDEVICE_BITS 0x00000002 +#define USB_MAIN_CTRL_HOST_NDEVICE_MSB 1 +#define USB_MAIN_CTRL_HOST_NDEVICE_LSB 1 +#define USB_MAIN_CTRL_HOST_NDEVICE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_MAIN_CTRL_CONTROLLER_EN +// Description : Enable controller +#define USB_MAIN_CTRL_CONTROLLER_EN_RESET 0x0 +#define USB_MAIN_CTRL_CONTROLLER_EN_BITS 0x00000001 +#define USB_MAIN_CTRL_CONTROLLER_EN_MSB 0 +#define USB_MAIN_CTRL_CONTROLLER_EN_LSB 0 +#define USB_MAIN_CTRL_CONTROLLER_EN_ACCESS "RW" +// ============================================================================= +// Register : USB_SOF_WR +// Description : Set the SOF (Start of Frame) frame number in the host +// controller. The SOF packet is sent every 1ms and the host will +// increment the frame number by 1 each time. +#define USB_SOF_WR_OFFSET 0x00000044 +#define USB_SOF_WR_BITS 0x000007ff +#define USB_SOF_WR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_SOF_WR_COUNT +// Description : None +#define USB_SOF_WR_COUNT_RESET 0x000 +#define USB_SOF_WR_COUNT_BITS 0x000007ff +#define USB_SOF_WR_COUNT_MSB 10 +#define USB_SOF_WR_COUNT_LSB 0 +#define USB_SOF_WR_COUNT_ACCESS "WF" +// ============================================================================= +// Register : USB_SOF_RD +// Description : Read the last SOF (Start of Frame) frame number seen. In device +// mode the last SOF received from the host. In host mode the last +// SOF sent by the host. +#define USB_SOF_RD_OFFSET 0x00000048 +#define USB_SOF_RD_BITS 0x000007ff +#define USB_SOF_RD_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_SOF_RD_COUNT +// Description : None +#define USB_SOF_RD_COUNT_RESET 0x000 +#define USB_SOF_RD_COUNT_BITS 0x000007ff +#define USB_SOF_RD_COUNT_MSB 10 +#define USB_SOF_RD_COUNT_LSB 0 +#define USB_SOF_RD_COUNT_ACCESS "RO" +// ============================================================================= +// Register : USB_SIE_CTRL +// Description : SIE control register +#define USB_SIE_CTRL_OFFSET 0x0000004c +#define USB_SIE_CTRL_BITS 0xff07bf5f +#define USB_SIE_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_EP0_INT_STALL +// Description : Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL +#define USB_SIE_CTRL_EP0_INT_STALL_RESET 0x0 +#define USB_SIE_CTRL_EP0_INT_STALL_BITS 0x80000000 +#define USB_SIE_CTRL_EP0_INT_STALL_MSB 31 +#define USB_SIE_CTRL_EP0_INT_STALL_LSB 31 +#define USB_SIE_CTRL_EP0_INT_STALL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_EP0_DOUBLE_BUF +// Description : Device: EP0 single buffered = 0, double buffered = 1 +#define USB_SIE_CTRL_EP0_DOUBLE_BUF_RESET 0x0 +#define USB_SIE_CTRL_EP0_DOUBLE_BUF_BITS 0x40000000 +#define USB_SIE_CTRL_EP0_DOUBLE_BUF_MSB 30 +#define USB_SIE_CTRL_EP0_DOUBLE_BUF_LSB 30 +#define USB_SIE_CTRL_EP0_DOUBLE_BUF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_EP0_INT_1BUF +// Description : Device: Set bit in BUFF_STATUS for every buffer completed on +// EP0 +#define USB_SIE_CTRL_EP0_INT_1BUF_RESET 0x0 +#define USB_SIE_CTRL_EP0_INT_1BUF_BITS 0x20000000 +#define USB_SIE_CTRL_EP0_INT_1BUF_MSB 29 +#define USB_SIE_CTRL_EP0_INT_1BUF_LSB 29 +#define USB_SIE_CTRL_EP0_INT_1BUF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_EP0_INT_2BUF +// Description : Device: Set bit in BUFF_STATUS for every 2 buffers completed on +// EP0 +#define USB_SIE_CTRL_EP0_INT_2BUF_RESET 0x0 +#define USB_SIE_CTRL_EP0_INT_2BUF_BITS 0x10000000 +#define USB_SIE_CTRL_EP0_INT_2BUF_MSB 28 +#define USB_SIE_CTRL_EP0_INT_2BUF_LSB 28 +#define USB_SIE_CTRL_EP0_INT_2BUF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_EP0_INT_NAK +// Description : Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK +#define USB_SIE_CTRL_EP0_INT_NAK_RESET 0x0 +#define USB_SIE_CTRL_EP0_INT_NAK_BITS 0x08000000 +#define USB_SIE_CTRL_EP0_INT_NAK_MSB 27 +#define USB_SIE_CTRL_EP0_INT_NAK_LSB 27 +#define USB_SIE_CTRL_EP0_INT_NAK_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_DIRECT_EN +// Description : Direct bus drive enable +#define USB_SIE_CTRL_DIRECT_EN_RESET 0x0 +#define USB_SIE_CTRL_DIRECT_EN_BITS 0x04000000 +#define USB_SIE_CTRL_DIRECT_EN_MSB 26 +#define USB_SIE_CTRL_DIRECT_EN_LSB 26 +#define USB_SIE_CTRL_DIRECT_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_DIRECT_DP +// Description : Direct control of DP +#define USB_SIE_CTRL_DIRECT_DP_RESET 0x0 +#define USB_SIE_CTRL_DIRECT_DP_BITS 0x02000000 +#define USB_SIE_CTRL_DIRECT_DP_MSB 25 +#define USB_SIE_CTRL_DIRECT_DP_LSB 25 +#define USB_SIE_CTRL_DIRECT_DP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_DIRECT_DM +// Description : Direct control of DM +#define USB_SIE_CTRL_DIRECT_DM_RESET 0x0 +#define USB_SIE_CTRL_DIRECT_DM_BITS 0x01000000 +#define USB_SIE_CTRL_DIRECT_DM_MSB 24 +#define USB_SIE_CTRL_DIRECT_DM_LSB 24 +#define USB_SIE_CTRL_DIRECT_DM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_TRANSCEIVER_PD +// Description : Power down bus transceiver +#define USB_SIE_CTRL_TRANSCEIVER_PD_RESET 0x0 +#define USB_SIE_CTRL_TRANSCEIVER_PD_BITS 0x00040000 +#define USB_SIE_CTRL_TRANSCEIVER_PD_MSB 18 +#define USB_SIE_CTRL_TRANSCEIVER_PD_LSB 18 +#define USB_SIE_CTRL_TRANSCEIVER_PD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_RPU_OPT +// Description : Device: Pull-up strength (0=1K2, 1=2k3) +#define USB_SIE_CTRL_RPU_OPT_RESET 0x0 +#define USB_SIE_CTRL_RPU_OPT_BITS 0x00020000 +#define USB_SIE_CTRL_RPU_OPT_MSB 17 +#define USB_SIE_CTRL_RPU_OPT_LSB 17 +#define USB_SIE_CTRL_RPU_OPT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_PULLUP_EN +// Description : Device: Enable pull up resistor +#define USB_SIE_CTRL_PULLUP_EN_RESET 0x0 +#define USB_SIE_CTRL_PULLUP_EN_BITS 0x00010000 +#define USB_SIE_CTRL_PULLUP_EN_MSB 16 +#define USB_SIE_CTRL_PULLUP_EN_LSB 16 +#define USB_SIE_CTRL_PULLUP_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_PULLDOWN_EN +// Description : Host: Enable pull down resistors +#define USB_SIE_CTRL_PULLDOWN_EN_RESET 0x0 +#define USB_SIE_CTRL_PULLDOWN_EN_BITS 0x00008000 +#define USB_SIE_CTRL_PULLDOWN_EN_MSB 15 +#define USB_SIE_CTRL_PULLDOWN_EN_LSB 15 +#define USB_SIE_CTRL_PULLDOWN_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_RESET_BUS +// Description : Host: Reset bus +#define USB_SIE_CTRL_RESET_BUS_RESET 0x0 +#define USB_SIE_CTRL_RESET_BUS_BITS 0x00002000 +#define USB_SIE_CTRL_RESET_BUS_MSB 13 +#define USB_SIE_CTRL_RESET_BUS_LSB 13 +#define USB_SIE_CTRL_RESET_BUS_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_RESUME +// Description : Device: Remote wakeup. Device can initiate its own resume after +// suspend. +#define USB_SIE_CTRL_RESUME_RESET 0x0 +#define USB_SIE_CTRL_RESUME_BITS 0x00001000 +#define USB_SIE_CTRL_RESUME_MSB 12 +#define USB_SIE_CTRL_RESUME_LSB 12 +#define USB_SIE_CTRL_RESUME_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_VBUS_EN +// Description : Host: Enable VBUS +#define USB_SIE_CTRL_VBUS_EN_RESET 0x0 +#define USB_SIE_CTRL_VBUS_EN_BITS 0x00000800 +#define USB_SIE_CTRL_VBUS_EN_MSB 11 +#define USB_SIE_CTRL_VBUS_EN_LSB 11 +#define USB_SIE_CTRL_VBUS_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_KEEP_ALIVE_EN +// Description : Host: Enable keep alive packet (for low speed bus) +#define USB_SIE_CTRL_KEEP_ALIVE_EN_RESET 0x0 +#define USB_SIE_CTRL_KEEP_ALIVE_EN_BITS 0x00000400 +#define USB_SIE_CTRL_KEEP_ALIVE_EN_MSB 10 +#define USB_SIE_CTRL_KEEP_ALIVE_EN_LSB 10 +#define USB_SIE_CTRL_KEEP_ALIVE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_SOF_EN +// Description : Host: Enable SOF generation (for full speed bus) +#define USB_SIE_CTRL_SOF_EN_RESET 0x0 +#define USB_SIE_CTRL_SOF_EN_BITS 0x00000200 +#define USB_SIE_CTRL_SOF_EN_MSB 9 +#define USB_SIE_CTRL_SOF_EN_LSB 9 +#define USB_SIE_CTRL_SOF_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_SOF_SYNC +// Description : Host: Delay packet(s) until after SOF +#define USB_SIE_CTRL_SOF_SYNC_RESET 0x0 +#define USB_SIE_CTRL_SOF_SYNC_BITS 0x00000100 +#define USB_SIE_CTRL_SOF_SYNC_MSB 8 +#define USB_SIE_CTRL_SOF_SYNC_LSB 8 +#define USB_SIE_CTRL_SOF_SYNC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_PREAMBLE_EN +// Description : Host: Preable enable for LS device on FS hub +#define USB_SIE_CTRL_PREAMBLE_EN_RESET 0x0 +#define USB_SIE_CTRL_PREAMBLE_EN_BITS 0x00000040 +#define USB_SIE_CTRL_PREAMBLE_EN_MSB 6 +#define USB_SIE_CTRL_PREAMBLE_EN_LSB 6 +#define USB_SIE_CTRL_PREAMBLE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_STOP_TRANS +// Description : Host: Stop transaction +#define USB_SIE_CTRL_STOP_TRANS_RESET 0x0 +#define USB_SIE_CTRL_STOP_TRANS_BITS 0x00000010 +#define USB_SIE_CTRL_STOP_TRANS_MSB 4 +#define USB_SIE_CTRL_STOP_TRANS_LSB 4 +#define USB_SIE_CTRL_STOP_TRANS_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_RECEIVE_DATA +// Description : Host: Receive transaction (IN to host) +#define USB_SIE_CTRL_RECEIVE_DATA_RESET 0x0 +#define USB_SIE_CTRL_RECEIVE_DATA_BITS 0x00000008 +#define USB_SIE_CTRL_RECEIVE_DATA_MSB 3 +#define USB_SIE_CTRL_RECEIVE_DATA_LSB 3 +#define USB_SIE_CTRL_RECEIVE_DATA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_SEND_DATA +// Description : Host: Send transaction (OUT from host) +#define USB_SIE_CTRL_SEND_DATA_RESET 0x0 +#define USB_SIE_CTRL_SEND_DATA_BITS 0x00000004 +#define USB_SIE_CTRL_SEND_DATA_MSB 2 +#define USB_SIE_CTRL_SEND_DATA_LSB 2 +#define USB_SIE_CTRL_SEND_DATA_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_SEND_SETUP +// Description : Host: Send Setup packet +#define USB_SIE_CTRL_SEND_SETUP_RESET 0x0 +#define USB_SIE_CTRL_SEND_SETUP_BITS 0x00000002 +#define USB_SIE_CTRL_SEND_SETUP_MSB 1 +#define USB_SIE_CTRL_SEND_SETUP_LSB 1 +#define USB_SIE_CTRL_SEND_SETUP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_CTRL_START_TRANS +// Description : Host: Start transaction +#define USB_SIE_CTRL_START_TRANS_RESET 0x0 +#define USB_SIE_CTRL_START_TRANS_BITS 0x00000001 +#define USB_SIE_CTRL_START_TRANS_MSB 0 +#define USB_SIE_CTRL_START_TRANS_LSB 0 +#define USB_SIE_CTRL_START_TRANS_ACCESS "SC" +// ============================================================================= +// Register : USB_SIE_STATUS +// Description : SIE status register +#define USB_SIE_STATUS_OFFSET 0x00000050 +#define USB_SIE_STATUS_BITS 0xff0f0f1d +#define USB_SIE_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_DATA_SEQ_ERROR +// Description : Data Sequence Error. +// +// The device can raise a sequence error in the following +// conditions: +// +// * A SETUP packet is received followed by a DATA1 packet (data +// phase should always be DATA0) * An OUT packet is received from +// the host but doesn't match the data pid in the buffer control +// register read from DPSRAM +// +// The host can raise a data sequence error in the following +// conditions: +// +// * An IN packet from the device has the wrong data PID +#define USB_SIE_STATUS_DATA_SEQ_ERROR_RESET 0x0 +#define USB_SIE_STATUS_DATA_SEQ_ERROR_BITS 0x80000000 +#define USB_SIE_STATUS_DATA_SEQ_ERROR_MSB 31 +#define USB_SIE_STATUS_DATA_SEQ_ERROR_LSB 31 +#define USB_SIE_STATUS_DATA_SEQ_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_ACK_REC +// Description : ACK received. Raised by both host and device. +#define USB_SIE_STATUS_ACK_REC_RESET 0x0 +#define USB_SIE_STATUS_ACK_REC_BITS 0x40000000 +#define USB_SIE_STATUS_ACK_REC_MSB 30 +#define USB_SIE_STATUS_ACK_REC_LSB 30 +#define USB_SIE_STATUS_ACK_REC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_STALL_REC +// Description : Host: STALL received +#define USB_SIE_STATUS_STALL_REC_RESET 0x0 +#define USB_SIE_STATUS_STALL_REC_BITS 0x20000000 +#define USB_SIE_STATUS_STALL_REC_MSB 29 +#define USB_SIE_STATUS_STALL_REC_LSB 29 +#define USB_SIE_STATUS_STALL_REC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_NAK_REC +// Description : Host: NAK received +#define USB_SIE_STATUS_NAK_REC_RESET 0x0 +#define USB_SIE_STATUS_NAK_REC_BITS 0x10000000 +#define USB_SIE_STATUS_NAK_REC_MSB 28 +#define USB_SIE_STATUS_NAK_REC_LSB 28 +#define USB_SIE_STATUS_NAK_REC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_RX_TIMEOUT +// Description : RX timeout is raised by both the host and device if an ACK is +// not received in the maximum time specified by the USB spec. +#define USB_SIE_STATUS_RX_TIMEOUT_RESET 0x0 +#define USB_SIE_STATUS_RX_TIMEOUT_BITS 0x08000000 +#define USB_SIE_STATUS_RX_TIMEOUT_MSB 27 +#define USB_SIE_STATUS_RX_TIMEOUT_LSB 27 +#define USB_SIE_STATUS_RX_TIMEOUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_RX_OVERFLOW +// Description : RX overflow is raised by the Serial RX engine if the incoming +// data is too fast. +#define USB_SIE_STATUS_RX_OVERFLOW_RESET 0x0 +#define USB_SIE_STATUS_RX_OVERFLOW_BITS 0x04000000 +#define USB_SIE_STATUS_RX_OVERFLOW_MSB 26 +#define USB_SIE_STATUS_RX_OVERFLOW_LSB 26 +#define USB_SIE_STATUS_RX_OVERFLOW_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_BIT_STUFF_ERROR +// Description : Bit Stuff Error. Raised by the Serial RX engine. +#define USB_SIE_STATUS_BIT_STUFF_ERROR_RESET 0x0 +#define USB_SIE_STATUS_BIT_STUFF_ERROR_BITS 0x02000000 +#define USB_SIE_STATUS_BIT_STUFF_ERROR_MSB 25 +#define USB_SIE_STATUS_BIT_STUFF_ERROR_LSB 25 +#define USB_SIE_STATUS_BIT_STUFF_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_CRC_ERROR +// Description : CRC Error. Raised by the Serial RX engine. +#define USB_SIE_STATUS_CRC_ERROR_RESET 0x0 +#define USB_SIE_STATUS_CRC_ERROR_BITS 0x01000000 +#define USB_SIE_STATUS_CRC_ERROR_MSB 24 +#define USB_SIE_STATUS_CRC_ERROR_LSB 24 +#define USB_SIE_STATUS_CRC_ERROR_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_BUS_RESET +// Description : Device: bus reset received +#define USB_SIE_STATUS_BUS_RESET_RESET 0x0 +#define USB_SIE_STATUS_BUS_RESET_BITS 0x00080000 +#define USB_SIE_STATUS_BUS_RESET_MSB 19 +#define USB_SIE_STATUS_BUS_RESET_LSB 19 +#define USB_SIE_STATUS_BUS_RESET_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_TRANS_COMPLETE +// Description : Transaction complete. +// +// Raised by device if: +// +// * An IN or OUT packet is sent with the `LAST_BUFF` bit set in +// the buffer control register +// +// Raised by host if: +// +// * A setup packet is sent when no data in or data out +// transaction follows * An IN packet is received and the +// `LAST_BUFF` bit is set in the buffer control register * An IN +// packet is received with zero length * An OUT packet is sent and +// the `LAST_BUFF` bit is set +#define USB_SIE_STATUS_TRANS_COMPLETE_RESET 0x0 +#define USB_SIE_STATUS_TRANS_COMPLETE_BITS 0x00040000 +#define USB_SIE_STATUS_TRANS_COMPLETE_MSB 18 +#define USB_SIE_STATUS_TRANS_COMPLETE_LSB 18 +#define USB_SIE_STATUS_TRANS_COMPLETE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_SETUP_REC +// Description : Device: Setup packet received +#define USB_SIE_STATUS_SETUP_REC_RESET 0x0 +#define USB_SIE_STATUS_SETUP_REC_BITS 0x00020000 +#define USB_SIE_STATUS_SETUP_REC_MSB 17 +#define USB_SIE_STATUS_SETUP_REC_LSB 17 +#define USB_SIE_STATUS_SETUP_REC_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_CONNECTED +// Description : Device: connected +#define USB_SIE_STATUS_CONNECTED_RESET 0x0 +#define USB_SIE_STATUS_CONNECTED_BITS 0x00010000 +#define USB_SIE_STATUS_CONNECTED_MSB 16 +#define USB_SIE_STATUS_CONNECTED_LSB 16 +#define USB_SIE_STATUS_CONNECTED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_RESUME +// Description : Host: Device has initiated a remote resume. Device: host has +// initiated a resume. +#define USB_SIE_STATUS_RESUME_RESET 0x0 +#define USB_SIE_STATUS_RESUME_BITS 0x00000800 +#define USB_SIE_STATUS_RESUME_MSB 11 +#define USB_SIE_STATUS_RESUME_LSB 11 +#define USB_SIE_STATUS_RESUME_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_VBUS_OVER_CURR +// Description : VBUS over current detected +#define USB_SIE_STATUS_VBUS_OVER_CURR_RESET 0x0 +#define USB_SIE_STATUS_VBUS_OVER_CURR_BITS 0x00000400 +#define USB_SIE_STATUS_VBUS_OVER_CURR_MSB 10 +#define USB_SIE_STATUS_VBUS_OVER_CURR_LSB 10 +#define USB_SIE_STATUS_VBUS_OVER_CURR_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_SPEED +// Description : Host: device speed. Disconnected = 00, LS = 01, FS = 10 +#define USB_SIE_STATUS_SPEED_RESET 0x0 +#define USB_SIE_STATUS_SPEED_BITS 0x00000300 +#define USB_SIE_STATUS_SPEED_MSB 9 +#define USB_SIE_STATUS_SPEED_LSB 8 +#define USB_SIE_STATUS_SPEED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_SUSPENDED +// Description : Bus in suspended state. Valid for device and host. Host and +// device will go into suspend if neither Keep Alive / SOF frames +// are enabled. +#define USB_SIE_STATUS_SUSPENDED_RESET 0x0 +#define USB_SIE_STATUS_SUSPENDED_BITS 0x00000010 +#define USB_SIE_STATUS_SUSPENDED_MSB 4 +#define USB_SIE_STATUS_SUSPENDED_LSB 4 +#define USB_SIE_STATUS_SUSPENDED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_LINE_STATE +// Description : USB bus line state +#define USB_SIE_STATUS_LINE_STATE_RESET 0x0 +#define USB_SIE_STATUS_LINE_STATE_BITS 0x0000000c +#define USB_SIE_STATUS_LINE_STATE_MSB 3 +#define USB_SIE_STATUS_LINE_STATE_LSB 2 +#define USB_SIE_STATUS_LINE_STATE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_SIE_STATUS_VBUS_DETECTED +// Description : Device: VBUS Detected +#define USB_SIE_STATUS_VBUS_DETECTED_RESET 0x0 +#define USB_SIE_STATUS_VBUS_DETECTED_BITS 0x00000001 +#define USB_SIE_STATUS_VBUS_DETECTED_MSB 0 +#define USB_SIE_STATUS_VBUS_DETECTED_LSB 0 +#define USB_SIE_STATUS_VBUS_DETECTED_ACCESS "RO" +// ============================================================================= +// Register : USB_INT_EP_CTRL +// Description : interrupt endpoint control register +#define USB_INT_EP_CTRL_OFFSET 0x00000054 +#define USB_INT_EP_CTRL_BITS 0x0000fffe +#define USB_INT_EP_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_INT_EP_CTRL_INT_EP_ACTIVE +// Description : Host: Enable interrupt endpoint 1 -> 15 +#define USB_INT_EP_CTRL_INT_EP_ACTIVE_RESET 0x0000 +#define USB_INT_EP_CTRL_INT_EP_ACTIVE_BITS 0x0000fffe +#define USB_INT_EP_CTRL_INT_EP_ACTIVE_MSB 15 +#define USB_INT_EP_CTRL_INT_EP_ACTIVE_LSB 1 +#define USB_INT_EP_CTRL_INT_EP_ACTIVE_ACCESS "RW" +// ============================================================================= +// Register : USB_BUFF_STATUS +// Description : Buffer status register. A bit set here indicates that a buffer +// has completed on the endpoint (if the buffer interrupt is +// enabled). It is possible for 2 buffers to be completed, so +// clearing the buffer status bit may instantly re set it on the +// next clock cycle. +#define USB_BUFF_STATUS_OFFSET 0x00000058 +#define USB_BUFF_STATUS_BITS 0xffffffff +#define USB_BUFF_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP15_OUT +// Description : None +#define USB_BUFF_STATUS_EP15_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP15_OUT_BITS 0x80000000 +#define USB_BUFF_STATUS_EP15_OUT_MSB 31 +#define USB_BUFF_STATUS_EP15_OUT_LSB 31 +#define USB_BUFF_STATUS_EP15_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP15_IN +// Description : None +#define USB_BUFF_STATUS_EP15_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP15_IN_BITS 0x40000000 +#define USB_BUFF_STATUS_EP15_IN_MSB 30 +#define USB_BUFF_STATUS_EP15_IN_LSB 30 +#define USB_BUFF_STATUS_EP15_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP14_OUT +// Description : None +#define USB_BUFF_STATUS_EP14_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP14_OUT_BITS 0x20000000 +#define USB_BUFF_STATUS_EP14_OUT_MSB 29 +#define USB_BUFF_STATUS_EP14_OUT_LSB 29 +#define USB_BUFF_STATUS_EP14_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP14_IN +// Description : None +#define USB_BUFF_STATUS_EP14_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP14_IN_BITS 0x10000000 +#define USB_BUFF_STATUS_EP14_IN_MSB 28 +#define USB_BUFF_STATUS_EP14_IN_LSB 28 +#define USB_BUFF_STATUS_EP14_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP13_OUT +// Description : None +#define USB_BUFF_STATUS_EP13_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP13_OUT_BITS 0x08000000 +#define USB_BUFF_STATUS_EP13_OUT_MSB 27 +#define USB_BUFF_STATUS_EP13_OUT_LSB 27 +#define USB_BUFF_STATUS_EP13_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP13_IN +// Description : None +#define USB_BUFF_STATUS_EP13_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP13_IN_BITS 0x04000000 +#define USB_BUFF_STATUS_EP13_IN_MSB 26 +#define USB_BUFF_STATUS_EP13_IN_LSB 26 +#define USB_BUFF_STATUS_EP13_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP12_OUT +// Description : None +#define USB_BUFF_STATUS_EP12_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP12_OUT_BITS 0x02000000 +#define USB_BUFF_STATUS_EP12_OUT_MSB 25 +#define USB_BUFF_STATUS_EP12_OUT_LSB 25 +#define USB_BUFF_STATUS_EP12_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP12_IN +// Description : None +#define USB_BUFF_STATUS_EP12_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP12_IN_BITS 0x01000000 +#define USB_BUFF_STATUS_EP12_IN_MSB 24 +#define USB_BUFF_STATUS_EP12_IN_LSB 24 +#define USB_BUFF_STATUS_EP12_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP11_OUT +// Description : None +#define USB_BUFF_STATUS_EP11_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP11_OUT_BITS 0x00800000 +#define USB_BUFF_STATUS_EP11_OUT_MSB 23 +#define USB_BUFF_STATUS_EP11_OUT_LSB 23 +#define USB_BUFF_STATUS_EP11_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP11_IN +// Description : None +#define USB_BUFF_STATUS_EP11_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP11_IN_BITS 0x00400000 +#define USB_BUFF_STATUS_EP11_IN_MSB 22 +#define USB_BUFF_STATUS_EP11_IN_LSB 22 +#define USB_BUFF_STATUS_EP11_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP10_OUT +// Description : None +#define USB_BUFF_STATUS_EP10_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP10_OUT_BITS 0x00200000 +#define USB_BUFF_STATUS_EP10_OUT_MSB 21 +#define USB_BUFF_STATUS_EP10_OUT_LSB 21 +#define USB_BUFF_STATUS_EP10_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP10_IN +// Description : None +#define USB_BUFF_STATUS_EP10_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP10_IN_BITS 0x00100000 +#define USB_BUFF_STATUS_EP10_IN_MSB 20 +#define USB_BUFF_STATUS_EP10_IN_LSB 20 +#define USB_BUFF_STATUS_EP10_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP9_OUT +// Description : None +#define USB_BUFF_STATUS_EP9_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP9_OUT_BITS 0x00080000 +#define USB_BUFF_STATUS_EP9_OUT_MSB 19 +#define USB_BUFF_STATUS_EP9_OUT_LSB 19 +#define USB_BUFF_STATUS_EP9_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP9_IN +// Description : None +#define USB_BUFF_STATUS_EP9_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP9_IN_BITS 0x00040000 +#define USB_BUFF_STATUS_EP9_IN_MSB 18 +#define USB_BUFF_STATUS_EP9_IN_LSB 18 +#define USB_BUFF_STATUS_EP9_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP8_OUT +// Description : None +#define USB_BUFF_STATUS_EP8_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP8_OUT_BITS 0x00020000 +#define USB_BUFF_STATUS_EP8_OUT_MSB 17 +#define USB_BUFF_STATUS_EP8_OUT_LSB 17 +#define USB_BUFF_STATUS_EP8_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP8_IN +// Description : None +#define USB_BUFF_STATUS_EP8_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP8_IN_BITS 0x00010000 +#define USB_BUFF_STATUS_EP8_IN_MSB 16 +#define USB_BUFF_STATUS_EP8_IN_LSB 16 +#define USB_BUFF_STATUS_EP8_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP7_OUT +// Description : None +#define USB_BUFF_STATUS_EP7_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP7_OUT_BITS 0x00008000 +#define USB_BUFF_STATUS_EP7_OUT_MSB 15 +#define USB_BUFF_STATUS_EP7_OUT_LSB 15 +#define USB_BUFF_STATUS_EP7_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP7_IN +// Description : None +#define USB_BUFF_STATUS_EP7_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP7_IN_BITS 0x00004000 +#define USB_BUFF_STATUS_EP7_IN_MSB 14 +#define USB_BUFF_STATUS_EP7_IN_LSB 14 +#define USB_BUFF_STATUS_EP7_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP6_OUT +// Description : None +#define USB_BUFF_STATUS_EP6_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP6_OUT_BITS 0x00002000 +#define USB_BUFF_STATUS_EP6_OUT_MSB 13 +#define USB_BUFF_STATUS_EP6_OUT_LSB 13 +#define USB_BUFF_STATUS_EP6_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP6_IN +// Description : None +#define USB_BUFF_STATUS_EP6_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP6_IN_BITS 0x00001000 +#define USB_BUFF_STATUS_EP6_IN_MSB 12 +#define USB_BUFF_STATUS_EP6_IN_LSB 12 +#define USB_BUFF_STATUS_EP6_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP5_OUT +// Description : None +#define USB_BUFF_STATUS_EP5_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP5_OUT_BITS 0x00000800 +#define USB_BUFF_STATUS_EP5_OUT_MSB 11 +#define USB_BUFF_STATUS_EP5_OUT_LSB 11 +#define USB_BUFF_STATUS_EP5_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP5_IN +// Description : None +#define USB_BUFF_STATUS_EP5_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP5_IN_BITS 0x00000400 +#define USB_BUFF_STATUS_EP5_IN_MSB 10 +#define USB_BUFF_STATUS_EP5_IN_LSB 10 +#define USB_BUFF_STATUS_EP5_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP4_OUT +// Description : None +#define USB_BUFF_STATUS_EP4_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP4_OUT_BITS 0x00000200 +#define USB_BUFF_STATUS_EP4_OUT_MSB 9 +#define USB_BUFF_STATUS_EP4_OUT_LSB 9 +#define USB_BUFF_STATUS_EP4_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP4_IN +// Description : None +#define USB_BUFF_STATUS_EP4_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP4_IN_BITS 0x00000100 +#define USB_BUFF_STATUS_EP4_IN_MSB 8 +#define USB_BUFF_STATUS_EP4_IN_LSB 8 +#define USB_BUFF_STATUS_EP4_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP3_OUT +// Description : None +#define USB_BUFF_STATUS_EP3_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP3_OUT_BITS 0x00000080 +#define USB_BUFF_STATUS_EP3_OUT_MSB 7 +#define USB_BUFF_STATUS_EP3_OUT_LSB 7 +#define USB_BUFF_STATUS_EP3_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP3_IN +// Description : None +#define USB_BUFF_STATUS_EP3_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP3_IN_BITS 0x00000040 +#define USB_BUFF_STATUS_EP3_IN_MSB 6 +#define USB_BUFF_STATUS_EP3_IN_LSB 6 +#define USB_BUFF_STATUS_EP3_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP2_OUT +// Description : None +#define USB_BUFF_STATUS_EP2_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP2_OUT_BITS 0x00000020 +#define USB_BUFF_STATUS_EP2_OUT_MSB 5 +#define USB_BUFF_STATUS_EP2_OUT_LSB 5 +#define USB_BUFF_STATUS_EP2_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP2_IN +// Description : None +#define USB_BUFF_STATUS_EP2_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP2_IN_BITS 0x00000010 +#define USB_BUFF_STATUS_EP2_IN_MSB 4 +#define USB_BUFF_STATUS_EP2_IN_LSB 4 +#define USB_BUFF_STATUS_EP2_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP1_OUT +// Description : None +#define USB_BUFF_STATUS_EP1_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP1_OUT_BITS 0x00000008 +#define USB_BUFF_STATUS_EP1_OUT_MSB 3 +#define USB_BUFF_STATUS_EP1_OUT_LSB 3 +#define USB_BUFF_STATUS_EP1_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP1_IN +// Description : None +#define USB_BUFF_STATUS_EP1_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP1_IN_BITS 0x00000004 +#define USB_BUFF_STATUS_EP1_IN_MSB 2 +#define USB_BUFF_STATUS_EP1_IN_LSB 2 +#define USB_BUFF_STATUS_EP1_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP0_OUT +// Description : None +#define USB_BUFF_STATUS_EP0_OUT_RESET 0x0 +#define USB_BUFF_STATUS_EP0_OUT_BITS 0x00000002 +#define USB_BUFF_STATUS_EP0_OUT_MSB 1 +#define USB_BUFF_STATUS_EP0_OUT_LSB 1 +#define USB_BUFF_STATUS_EP0_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_STATUS_EP0_IN +// Description : None +#define USB_BUFF_STATUS_EP0_IN_RESET 0x0 +#define USB_BUFF_STATUS_EP0_IN_BITS 0x00000001 +#define USB_BUFF_STATUS_EP0_IN_MSB 0 +#define USB_BUFF_STATUS_EP0_IN_LSB 0 +#define USB_BUFF_STATUS_EP0_IN_ACCESS "RO" +// ============================================================================= +// Register : USB_BUFF_CPU_SHOULD_HANDLE +// Description : Which of the double buffers should be handled. Only valid if +// using an interrupt per buffer (i.e. not per 2 buffers). Not +// valid for host interrupt endpoint polling because they are only +// single buffered. +#define USB_BUFF_CPU_SHOULD_HANDLE_OFFSET 0x0000005c +#define USB_BUFF_CPU_SHOULD_HANDLE_BITS 0xffffffff +#define USB_BUFF_CPU_SHOULD_HANDLE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP15_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_OUT_BITS 0x80000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_OUT_MSB 31 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_OUT_LSB 31 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP15_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_IN_BITS 0x40000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_IN_MSB 30 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_IN_LSB 30 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP15_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP14_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_OUT_BITS 0x20000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_OUT_MSB 29 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_OUT_LSB 29 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP14_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_IN_BITS 0x10000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_IN_MSB 28 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_IN_LSB 28 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP14_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP13_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_OUT_BITS 0x08000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_OUT_MSB 27 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_OUT_LSB 27 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP13_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_IN_BITS 0x04000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_IN_MSB 26 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_IN_LSB 26 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP13_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP12_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_OUT_BITS 0x02000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_OUT_MSB 25 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_OUT_LSB 25 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP12_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_IN_BITS 0x01000000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_IN_MSB 24 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_IN_LSB 24 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP12_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP11_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_OUT_BITS 0x00800000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_OUT_MSB 23 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_OUT_LSB 23 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP11_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_IN_BITS 0x00400000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_IN_MSB 22 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_IN_LSB 22 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP11_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP10_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_OUT_BITS 0x00200000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_OUT_MSB 21 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_OUT_LSB 21 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP10_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_IN_BITS 0x00100000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_IN_MSB 20 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_IN_LSB 20 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP10_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP9_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_OUT_BITS 0x00080000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_OUT_MSB 19 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_OUT_LSB 19 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP9_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_IN_BITS 0x00040000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_IN_MSB 18 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_IN_LSB 18 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP9_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP8_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_OUT_BITS 0x00020000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_OUT_MSB 17 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_OUT_LSB 17 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP8_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_IN_BITS 0x00010000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_IN_MSB 16 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_IN_LSB 16 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP8_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP7_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_OUT_BITS 0x00008000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_OUT_MSB 15 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_OUT_LSB 15 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP7_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_IN_BITS 0x00004000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_IN_MSB 14 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_IN_LSB 14 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP7_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP6_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_OUT_BITS 0x00002000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_OUT_MSB 13 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_OUT_LSB 13 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP6_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_IN_BITS 0x00001000 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_IN_MSB 12 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_IN_LSB 12 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP6_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP5_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_OUT_BITS 0x00000800 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_OUT_MSB 11 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_OUT_LSB 11 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP5_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_IN_BITS 0x00000400 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_IN_MSB 10 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_IN_LSB 10 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP5_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP4_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_OUT_BITS 0x00000200 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_OUT_MSB 9 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_OUT_LSB 9 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP4_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_IN_BITS 0x00000100 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_IN_MSB 8 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_IN_LSB 8 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP4_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP3_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_OUT_BITS 0x00000080 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_OUT_MSB 7 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_OUT_LSB 7 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP3_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_IN_BITS 0x00000040 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_IN_MSB 6 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_IN_LSB 6 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP3_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP2_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_OUT_BITS 0x00000020 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_OUT_MSB 5 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_OUT_LSB 5 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP2_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_IN_BITS 0x00000010 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_IN_MSB 4 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_IN_LSB 4 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP2_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP1_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_OUT_BITS 0x00000008 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_OUT_MSB 3 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_OUT_LSB 3 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP1_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_IN_BITS 0x00000004 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_IN_MSB 2 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_IN_LSB 2 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP1_IN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP0_OUT +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_OUT_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_OUT_BITS 0x00000002 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_OUT_MSB 1 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_OUT_LSB 1 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_OUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_BUFF_CPU_SHOULD_HANDLE_EP0_IN +// Description : None +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_IN_RESET 0x0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_IN_BITS 0x00000001 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_IN_MSB 0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_IN_LSB 0 +#define USB_BUFF_CPU_SHOULD_HANDLE_EP0_IN_ACCESS "RO" +// ============================================================================= +// Register : USB_EP_ABORT +// Description : Device only: Can be set to ignore the buffer control register +// for this endpoint in case you would like to revoke a buffer. A +// NAK will be sent for every access to the endpoint until this +// bit is cleared. A corresponding bit in `EP_ABORT_DONE` is set +// when it is safe to modify the buffer control register. +#define USB_EP_ABORT_OFFSET 0x00000060 +#define USB_EP_ABORT_BITS 0xffffffff +#define USB_EP_ABORT_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP15_OUT +// Description : None +#define USB_EP_ABORT_EP15_OUT_RESET 0x0 +#define USB_EP_ABORT_EP15_OUT_BITS 0x80000000 +#define USB_EP_ABORT_EP15_OUT_MSB 31 +#define USB_EP_ABORT_EP15_OUT_LSB 31 +#define USB_EP_ABORT_EP15_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP15_IN +// Description : None +#define USB_EP_ABORT_EP15_IN_RESET 0x0 +#define USB_EP_ABORT_EP15_IN_BITS 0x40000000 +#define USB_EP_ABORT_EP15_IN_MSB 30 +#define USB_EP_ABORT_EP15_IN_LSB 30 +#define USB_EP_ABORT_EP15_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP14_OUT +// Description : None +#define USB_EP_ABORT_EP14_OUT_RESET 0x0 +#define USB_EP_ABORT_EP14_OUT_BITS 0x20000000 +#define USB_EP_ABORT_EP14_OUT_MSB 29 +#define USB_EP_ABORT_EP14_OUT_LSB 29 +#define USB_EP_ABORT_EP14_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP14_IN +// Description : None +#define USB_EP_ABORT_EP14_IN_RESET 0x0 +#define USB_EP_ABORT_EP14_IN_BITS 0x10000000 +#define USB_EP_ABORT_EP14_IN_MSB 28 +#define USB_EP_ABORT_EP14_IN_LSB 28 +#define USB_EP_ABORT_EP14_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP13_OUT +// Description : None +#define USB_EP_ABORT_EP13_OUT_RESET 0x0 +#define USB_EP_ABORT_EP13_OUT_BITS 0x08000000 +#define USB_EP_ABORT_EP13_OUT_MSB 27 +#define USB_EP_ABORT_EP13_OUT_LSB 27 +#define USB_EP_ABORT_EP13_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP13_IN +// Description : None +#define USB_EP_ABORT_EP13_IN_RESET 0x0 +#define USB_EP_ABORT_EP13_IN_BITS 0x04000000 +#define USB_EP_ABORT_EP13_IN_MSB 26 +#define USB_EP_ABORT_EP13_IN_LSB 26 +#define USB_EP_ABORT_EP13_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP12_OUT +// Description : None +#define USB_EP_ABORT_EP12_OUT_RESET 0x0 +#define USB_EP_ABORT_EP12_OUT_BITS 0x02000000 +#define USB_EP_ABORT_EP12_OUT_MSB 25 +#define USB_EP_ABORT_EP12_OUT_LSB 25 +#define USB_EP_ABORT_EP12_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP12_IN +// Description : None +#define USB_EP_ABORT_EP12_IN_RESET 0x0 +#define USB_EP_ABORT_EP12_IN_BITS 0x01000000 +#define USB_EP_ABORT_EP12_IN_MSB 24 +#define USB_EP_ABORT_EP12_IN_LSB 24 +#define USB_EP_ABORT_EP12_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP11_OUT +// Description : None +#define USB_EP_ABORT_EP11_OUT_RESET 0x0 +#define USB_EP_ABORT_EP11_OUT_BITS 0x00800000 +#define USB_EP_ABORT_EP11_OUT_MSB 23 +#define USB_EP_ABORT_EP11_OUT_LSB 23 +#define USB_EP_ABORT_EP11_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP11_IN +// Description : None +#define USB_EP_ABORT_EP11_IN_RESET 0x0 +#define USB_EP_ABORT_EP11_IN_BITS 0x00400000 +#define USB_EP_ABORT_EP11_IN_MSB 22 +#define USB_EP_ABORT_EP11_IN_LSB 22 +#define USB_EP_ABORT_EP11_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP10_OUT +// Description : None +#define USB_EP_ABORT_EP10_OUT_RESET 0x0 +#define USB_EP_ABORT_EP10_OUT_BITS 0x00200000 +#define USB_EP_ABORT_EP10_OUT_MSB 21 +#define USB_EP_ABORT_EP10_OUT_LSB 21 +#define USB_EP_ABORT_EP10_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP10_IN +// Description : None +#define USB_EP_ABORT_EP10_IN_RESET 0x0 +#define USB_EP_ABORT_EP10_IN_BITS 0x00100000 +#define USB_EP_ABORT_EP10_IN_MSB 20 +#define USB_EP_ABORT_EP10_IN_LSB 20 +#define USB_EP_ABORT_EP10_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP9_OUT +// Description : None +#define USB_EP_ABORT_EP9_OUT_RESET 0x0 +#define USB_EP_ABORT_EP9_OUT_BITS 0x00080000 +#define USB_EP_ABORT_EP9_OUT_MSB 19 +#define USB_EP_ABORT_EP9_OUT_LSB 19 +#define USB_EP_ABORT_EP9_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP9_IN +// Description : None +#define USB_EP_ABORT_EP9_IN_RESET 0x0 +#define USB_EP_ABORT_EP9_IN_BITS 0x00040000 +#define USB_EP_ABORT_EP9_IN_MSB 18 +#define USB_EP_ABORT_EP9_IN_LSB 18 +#define USB_EP_ABORT_EP9_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP8_OUT +// Description : None +#define USB_EP_ABORT_EP8_OUT_RESET 0x0 +#define USB_EP_ABORT_EP8_OUT_BITS 0x00020000 +#define USB_EP_ABORT_EP8_OUT_MSB 17 +#define USB_EP_ABORT_EP8_OUT_LSB 17 +#define USB_EP_ABORT_EP8_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP8_IN +// Description : None +#define USB_EP_ABORT_EP8_IN_RESET 0x0 +#define USB_EP_ABORT_EP8_IN_BITS 0x00010000 +#define USB_EP_ABORT_EP8_IN_MSB 16 +#define USB_EP_ABORT_EP8_IN_LSB 16 +#define USB_EP_ABORT_EP8_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP7_OUT +// Description : None +#define USB_EP_ABORT_EP7_OUT_RESET 0x0 +#define USB_EP_ABORT_EP7_OUT_BITS 0x00008000 +#define USB_EP_ABORT_EP7_OUT_MSB 15 +#define USB_EP_ABORT_EP7_OUT_LSB 15 +#define USB_EP_ABORT_EP7_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP7_IN +// Description : None +#define USB_EP_ABORT_EP7_IN_RESET 0x0 +#define USB_EP_ABORT_EP7_IN_BITS 0x00004000 +#define USB_EP_ABORT_EP7_IN_MSB 14 +#define USB_EP_ABORT_EP7_IN_LSB 14 +#define USB_EP_ABORT_EP7_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP6_OUT +// Description : None +#define USB_EP_ABORT_EP6_OUT_RESET 0x0 +#define USB_EP_ABORT_EP6_OUT_BITS 0x00002000 +#define USB_EP_ABORT_EP6_OUT_MSB 13 +#define USB_EP_ABORT_EP6_OUT_LSB 13 +#define USB_EP_ABORT_EP6_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP6_IN +// Description : None +#define USB_EP_ABORT_EP6_IN_RESET 0x0 +#define USB_EP_ABORT_EP6_IN_BITS 0x00001000 +#define USB_EP_ABORT_EP6_IN_MSB 12 +#define USB_EP_ABORT_EP6_IN_LSB 12 +#define USB_EP_ABORT_EP6_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP5_OUT +// Description : None +#define USB_EP_ABORT_EP5_OUT_RESET 0x0 +#define USB_EP_ABORT_EP5_OUT_BITS 0x00000800 +#define USB_EP_ABORT_EP5_OUT_MSB 11 +#define USB_EP_ABORT_EP5_OUT_LSB 11 +#define USB_EP_ABORT_EP5_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP5_IN +// Description : None +#define USB_EP_ABORT_EP5_IN_RESET 0x0 +#define USB_EP_ABORT_EP5_IN_BITS 0x00000400 +#define USB_EP_ABORT_EP5_IN_MSB 10 +#define USB_EP_ABORT_EP5_IN_LSB 10 +#define USB_EP_ABORT_EP5_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP4_OUT +// Description : None +#define USB_EP_ABORT_EP4_OUT_RESET 0x0 +#define USB_EP_ABORT_EP4_OUT_BITS 0x00000200 +#define USB_EP_ABORT_EP4_OUT_MSB 9 +#define USB_EP_ABORT_EP4_OUT_LSB 9 +#define USB_EP_ABORT_EP4_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP4_IN +// Description : None +#define USB_EP_ABORT_EP4_IN_RESET 0x0 +#define USB_EP_ABORT_EP4_IN_BITS 0x00000100 +#define USB_EP_ABORT_EP4_IN_MSB 8 +#define USB_EP_ABORT_EP4_IN_LSB 8 +#define USB_EP_ABORT_EP4_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP3_OUT +// Description : None +#define USB_EP_ABORT_EP3_OUT_RESET 0x0 +#define USB_EP_ABORT_EP3_OUT_BITS 0x00000080 +#define USB_EP_ABORT_EP3_OUT_MSB 7 +#define USB_EP_ABORT_EP3_OUT_LSB 7 +#define USB_EP_ABORT_EP3_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP3_IN +// Description : None +#define USB_EP_ABORT_EP3_IN_RESET 0x0 +#define USB_EP_ABORT_EP3_IN_BITS 0x00000040 +#define USB_EP_ABORT_EP3_IN_MSB 6 +#define USB_EP_ABORT_EP3_IN_LSB 6 +#define USB_EP_ABORT_EP3_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP2_OUT +// Description : None +#define USB_EP_ABORT_EP2_OUT_RESET 0x0 +#define USB_EP_ABORT_EP2_OUT_BITS 0x00000020 +#define USB_EP_ABORT_EP2_OUT_MSB 5 +#define USB_EP_ABORT_EP2_OUT_LSB 5 +#define USB_EP_ABORT_EP2_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP2_IN +// Description : None +#define USB_EP_ABORT_EP2_IN_RESET 0x0 +#define USB_EP_ABORT_EP2_IN_BITS 0x00000010 +#define USB_EP_ABORT_EP2_IN_MSB 4 +#define USB_EP_ABORT_EP2_IN_LSB 4 +#define USB_EP_ABORT_EP2_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP1_OUT +// Description : None +#define USB_EP_ABORT_EP1_OUT_RESET 0x0 +#define USB_EP_ABORT_EP1_OUT_BITS 0x00000008 +#define USB_EP_ABORT_EP1_OUT_MSB 3 +#define USB_EP_ABORT_EP1_OUT_LSB 3 +#define USB_EP_ABORT_EP1_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP1_IN +// Description : None +#define USB_EP_ABORT_EP1_IN_RESET 0x0 +#define USB_EP_ABORT_EP1_IN_BITS 0x00000004 +#define USB_EP_ABORT_EP1_IN_MSB 2 +#define USB_EP_ABORT_EP1_IN_LSB 2 +#define USB_EP_ABORT_EP1_IN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP0_OUT +// Description : None +#define USB_EP_ABORT_EP0_OUT_RESET 0x0 +#define USB_EP_ABORT_EP0_OUT_BITS 0x00000002 +#define USB_EP_ABORT_EP0_OUT_MSB 1 +#define USB_EP_ABORT_EP0_OUT_LSB 1 +#define USB_EP_ABORT_EP0_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_EP0_IN +// Description : None +#define USB_EP_ABORT_EP0_IN_RESET 0x0 +#define USB_EP_ABORT_EP0_IN_BITS 0x00000001 +#define USB_EP_ABORT_EP0_IN_MSB 0 +#define USB_EP_ABORT_EP0_IN_LSB 0 +#define USB_EP_ABORT_EP0_IN_ACCESS "RW" +// ============================================================================= +// Register : USB_EP_ABORT_DONE +// Description : Device only: Used in conjunction with `EP_ABORT`. Set once an +// endpoint is idle so the programmer knows it is safe to modify +// the buffer control register. +#define USB_EP_ABORT_DONE_OFFSET 0x00000064 +#define USB_EP_ABORT_DONE_BITS 0xffffffff +#define USB_EP_ABORT_DONE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP15_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP15_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP15_OUT_BITS 0x80000000 +#define USB_EP_ABORT_DONE_EP15_OUT_MSB 31 +#define USB_EP_ABORT_DONE_EP15_OUT_LSB 31 +#define USB_EP_ABORT_DONE_EP15_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP15_IN +// Description : None +#define USB_EP_ABORT_DONE_EP15_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP15_IN_BITS 0x40000000 +#define USB_EP_ABORT_DONE_EP15_IN_MSB 30 +#define USB_EP_ABORT_DONE_EP15_IN_LSB 30 +#define USB_EP_ABORT_DONE_EP15_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP14_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP14_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP14_OUT_BITS 0x20000000 +#define USB_EP_ABORT_DONE_EP14_OUT_MSB 29 +#define USB_EP_ABORT_DONE_EP14_OUT_LSB 29 +#define USB_EP_ABORT_DONE_EP14_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP14_IN +// Description : None +#define USB_EP_ABORT_DONE_EP14_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP14_IN_BITS 0x10000000 +#define USB_EP_ABORT_DONE_EP14_IN_MSB 28 +#define USB_EP_ABORT_DONE_EP14_IN_LSB 28 +#define USB_EP_ABORT_DONE_EP14_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP13_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP13_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP13_OUT_BITS 0x08000000 +#define USB_EP_ABORT_DONE_EP13_OUT_MSB 27 +#define USB_EP_ABORT_DONE_EP13_OUT_LSB 27 +#define USB_EP_ABORT_DONE_EP13_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP13_IN +// Description : None +#define USB_EP_ABORT_DONE_EP13_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP13_IN_BITS 0x04000000 +#define USB_EP_ABORT_DONE_EP13_IN_MSB 26 +#define USB_EP_ABORT_DONE_EP13_IN_LSB 26 +#define USB_EP_ABORT_DONE_EP13_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP12_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP12_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP12_OUT_BITS 0x02000000 +#define USB_EP_ABORT_DONE_EP12_OUT_MSB 25 +#define USB_EP_ABORT_DONE_EP12_OUT_LSB 25 +#define USB_EP_ABORT_DONE_EP12_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP12_IN +// Description : None +#define USB_EP_ABORT_DONE_EP12_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP12_IN_BITS 0x01000000 +#define USB_EP_ABORT_DONE_EP12_IN_MSB 24 +#define USB_EP_ABORT_DONE_EP12_IN_LSB 24 +#define USB_EP_ABORT_DONE_EP12_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP11_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP11_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP11_OUT_BITS 0x00800000 +#define USB_EP_ABORT_DONE_EP11_OUT_MSB 23 +#define USB_EP_ABORT_DONE_EP11_OUT_LSB 23 +#define USB_EP_ABORT_DONE_EP11_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP11_IN +// Description : None +#define USB_EP_ABORT_DONE_EP11_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP11_IN_BITS 0x00400000 +#define USB_EP_ABORT_DONE_EP11_IN_MSB 22 +#define USB_EP_ABORT_DONE_EP11_IN_LSB 22 +#define USB_EP_ABORT_DONE_EP11_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP10_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP10_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP10_OUT_BITS 0x00200000 +#define USB_EP_ABORT_DONE_EP10_OUT_MSB 21 +#define USB_EP_ABORT_DONE_EP10_OUT_LSB 21 +#define USB_EP_ABORT_DONE_EP10_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP10_IN +// Description : None +#define USB_EP_ABORT_DONE_EP10_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP10_IN_BITS 0x00100000 +#define USB_EP_ABORT_DONE_EP10_IN_MSB 20 +#define USB_EP_ABORT_DONE_EP10_IN_LSB 20 +#define USB_EP_ABORT_DONE_EP10_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP9_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP9_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP9_OUT_BITS 0x00080000 +#define USB_EP_ABORT_DONE_EP9_OUT_MSB 19 +#define USB_EP_ABORT_DONE_EP9_OUT_LSB 19 +#define USB_EP_ABORT_DONE_EP9_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP9_IN +// Description : None +#define USB_EP_ABORT_DONE_EP9_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP9_IN_BITS 0x00040000 +#define USB_EP_ABORT_DONE_EP9_IN_MSB 18 +#define USB_EP_ABORT_DONE_EP9_IN_LSB 18 +#define USB_EP_ABORT_DONE_EP9_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP8_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP8_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP8_OUT_BITS 0x00020000 +#define USB_EP_ABORT_DONE_EP8_OUT_MSB 17 +#define USB_EP_ABORT_DONE_EP8_OUT_LSB 17 +#define USB_EP_ABORT_DONE_EP8_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP8_IN +// Description : None +#define USB_EP_ABORT_DONE_EP8_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP8_IN_BITS 0x00010000 +#define USB_EP_ABORT_DONE_EP8_IN_MSB 16 +#define USB_EP_ABORT_DONE_EP8_IN_LSB 16 +#define USB_EP_ABORT_DONE_EP8_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP7_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP7_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP7_OUT_BITS 0x00008000 +#define USB_EP_ABORT_DONE_EP7_OUT_MSB 15 +#define USB_EP_ABORT_DONE_EP7_OUT_LSB 15 +#define USB_EP_ABORT_DONE_EP7_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP7_IN +// Description : None +#define USB_EP_ABORT_DONE_EP7_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP7_IN_BITS 0x00004000 +#define USB_EP_ABORT_DONE_EP7_IN_MSB 14 +#define USB_EP_ABORT_DONE_EP7_IN_LSB 14 +#define USB_EP_ABORT_DONE_EP7_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP6_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP6_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP6_OUT_BITS 0x00002000 +#define USB_EP_ABORT_DONE_EP6_OUT_MSB 13 +#define USB_EP_ABORT_DONE_EP6_OUT_LSB 13 +#define USB_EP_ABORT_DONE_EP6_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP6_IN +// Description : None +#define USB_EP_ABORT_DONE_EP6_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP6_IN_BITS 0x00001000 +#define USB_EP_ABORT_DONE_EP6_IN_MSB 12 +#define USB_EP_ABORT_DONE_EP6_IN_LSB 12 +#define USB_EP_ABORT_DONE_EP6_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP5_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP5_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP5_OUT_BITS 0x00000800 +#define USB_EP_ABORT_DONE_EP5_OUT_MSB 11 +#define USB_EP_ABORT_DONE_EP5_OUT_LSB 11 +#define USB_EP_ABORT_DONE_EP5_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP5_IN +// Description : None +#define USB_EP_ABORT_DONE_EP5_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP5_IN_BITS 0x00000400 +#define USB_EP_ABORT_DONE_EP5_IN_MSB 10 +#define USB_EP_ABORT_DONE_EP5_IN_LSB 10 +#define USB_EP_ABORT_DONE_EP5_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP4_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP4_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP4_OUT_BITS 0x00000200 +#define USB_EP_ABORT_DONE_EP4_OUT_MSB 9 +#define USB_EP_ABORT_DONE_EP4_OUT_LSB 9 +#define USB_EP_ABORT_DONE_EP4_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP4_IN +// Description : None +#define USB_EP_ABORT_DONE_EP4_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP4_IN_BITS 0x00000100 +#define USB_EP_ABORT_DONE_EP4_IN_MSB 8 +#define USB_EP_ABORT_DONE_EP4_IN_LSB 8 +#define USB_EP_ABORT_DONE_EP4_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP3_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP3_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP3_OUT_BITS 0x00000080 +#define USB_EP_ABORT_DONE_EP3_OUT_MSB 7 +#define USB_EP_ABORT_DONE_EP3_OUT_LSB 7 +#define USB_EP_ABORT_DONE_EP3_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP3_IN +// Description : None +#define USB_EP_ABORT_DONE_EP3_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP3_IN_BITS 0x00000040 +#define USB_EP_ABORT_DONE_EP3_IN_MSB 6 +#define USB_EP_ABORT_DONE_EP3_IN_LSB 6 +#define USB_EP_ABORT_DONE_EP3_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP2_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP2_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP2_OUT_BITS 0x00000020 +#define USB_EP_ABORT_DONE_EP2_OUT_MSB 5 +#define USB_EP_ABORT_DONE_EP2_OUT_LSB 5 +#define USB_EP_ABORT_DONE_EP2_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP2_IN +// Description : None +#define USB_EP_ABORT_DONE_EP2_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP2_IN_BITS 0x00000010 +#define USB_EP_ABORT_DONE_EP2_IN_MSB 4 +#define USB_EP_ABORT_DONE_EP2_IN_LSB 4 +#define USB_EP_ABORT_DONE_EP2_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP1_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP1_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP1_OUT_BITS 0x00000008 +#define USB_EP_ABORT_DONE_EP1_OUT_MSB 3 +#define USB_EP_ABORT_DONE_EP1_OUT_LSB 3 +#define USB_EP_ABORT_DONE_EP1_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP1_IN +// Description : None +#define USB_EP_ABORT_DONE_EP1_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP1_IN_BITS 0x00000004 +#define USB_EP_ABORT_DONE_EP1_IN_MSB 2 +#define USB_EP_ABORT_DONE_EP1_IN_LSB 2 +#define USB_EP_ABORT_DONE_EP1_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP0_OUT +// Description : None +#define USB_EP_ABORT_DONE_EP0_OUT_RESET 0x0 +#define USB_EP_ABORT_DONE_EP0_OUT_BITS 0x00000002 +#define USB_EP_ABORT_DONE_EP0_OUT_MSB 1 +#define USB_EP_ABORT_DONE_EP0_OUT_LSB 1 +#define USB_EP_ABORT_DONE_EP0_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_ABORT_DONE_EP0_IN +// Description : None +#define USB_EP_ABORT_DONE_EP0_IN_RESET 0x0 +#define USB_EP_ABORT_DONE_EP0_IN_BITS 0x00000001 +#define USB_EP_ABORT_DONE_EP0_IN_MSB 0 +#define USB_EP_ABORT_DONE_EP0_IN_LSB 0 +#define USB_EP_ABORT_DONE_EP0_IN_ACCESS "WC" +// ============================================================================= +// Register : USB_EP_STALL_ARM +// Description : Device: this bit must be set in conjunction with the `STALL` +// bit in the buffer control register to send a STALL on EP0. The +// device controller clears these bits when a SETUP packet is +// received because the USB spec requires that a STALL condition +// is cleared when a SETUP packet is received. +#define USB_EP_STALL_ARM_OFFSET 0x00000068 +#define USB_EP_STALL_ARM_BITS 0x00000003 +#define USB_EP_STALL_ARM_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_EP_STALL_ARM_EP0_OUT +// Description : None +#define USB_EP_STALL_ARM_EP0_OUT_RESET 0x0 +#define USB_EP_STALL_ARM_EP0_OUT_BITS 0x00000002 +#define USB_EP_STALL_ARM_EP0_OUT_MSB 1 +#define USB_EP_STALL_ARM_EP0_OUT_LSB 1 +#define USB_EP_STALL_ARM_EP0_OUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STALL_ARM_EP0_IN +// Description : None +#define USB_EP_STALL_ARM_EP0_IN_RESET 0x0 +#define USB_EP_STALL_ARM_EP0_IN_BITS 0x00000001 +#define USB_EP_STALL_ARM_EP0_IN_MSB 0 +#define USB_EP_STALL_ARM_EP0_IN_LSB 0 +#define USB_EP_STALL_ARM_EP0_IN_ACCESS "RW" +// ============================================================================= +// Register : USB_NAK_POLL +// Description : Used by the host controller. Sets the wait time in microseconds +// before trying again if the device replies with a NAK. +#define USB_NAK_POLL_OFFSET 0x0000006c +#define USB_NAK_POLL_BITS 0x03ff03ff +#define USB_NAK_POLL_RESET 0x00100010 +// ----------------------------------------------------------------------------- +// Field : USB_NAK_POLL_DELAY_FS +// Description : NAK polling interval for a full speed device +#define USB_NAK_POLL_DELAY_FS_RESET 0x010 +#define USB_NAK_POLL_DELAY_FS_BITS 0x03ff0000 +#define USB_NAK_POLL_DELAY_FS_MSB 25 +#define USB_NAK_POLL_DELAY_FS_LSB 16 +#define USB_NAK_POLL_DELAY_FS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_NAK_POLL_DELAY_LS +// Description : NAK polling interval for a low speed device +#define USB_NAK_POLL_DELAY_LS_RESET 0x010 +#define USB_NAK_POLL_DELAY_LS_BITS 0x000003ff +#define USB_NAK_POLL_DELAY_LS_MSB 9 +#define USB_NAK_POLL_DELAY_LS_LSB 0 +#define USB_NAK_POLL_DELAY_LS_ACCESS "RW" +// ============================================================================= +// Register : USB_EP_STATUS_STALL_NAK +// Description : Device: bits are set when the `IRQ_ON_NAK` or `IRQ_ON_STALL` +// bits are set. For EP0 this comes from `SIE_CTRL`. For all other +// endpoints it comes from the endpoint control register. +#define USB_EP_STATUS_STALL_NAK_OFFSET 0x00000070 +#define USB_EP_STATUS_STALL_NAK_BITS 0xffffffff +#define USB_EP_STATUS_STALL_NAK_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP15_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP15_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP15_OUT_BITS 0x80000000 +#define USB_EP_STATUS_STALL_NAK_EP15_OUT_MSB 31 +#define USB_EP_STATUS_STALL_NAK_EP15_OUT_LSB 31 +#define USB_EP_STATUS_STALL_NAK_EP15_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP15_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP15_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP15_IN_BITS 0x40000000 +#define USB_EP_STATUS_STALL_NAK_EP15_IN_MSB 30 +#define USB_EP_STATUS_STALL_NAK_EP15_IN_LSB 30 +#define USB_EP_STATUS_STALL_NAK_EP15_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP14_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP14_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP14_OUT_BITS 0x20000000 +#define USB_EP_STATUS_STALL_NAK_EP14_OUT_MSB 29 +#define USB_EP_STATUS_STALL_NAK_EP14_OUT_LSB 29 +#define USB_EP_STATUS_STALL_NAK_EP14_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP14_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP14_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP14_IN_BITS 0x10000000 +#define USB_EP_STATUS_STALL_NAK_EP14_IN_MSB 28 +#define USB_EP_STATUS_STALL_NAK_EP14_IN_LSB 28 +#define USB_EP_STATUS_STALL_NAK_EP14_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP13_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP13_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP13_OUT_BITS 0x08000000 +#define USB_EP_STATUS_STALL_NAK_EP13_OUT_MSB 27 +#define USB_EP_STATUS_STALL_NAK_EP13_OUT_LSB 27 +#define USB_EP_STATUS_STALL_NAK_EP13_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP13_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP13_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP13_IN_BITS 0x04000000 +#define USB_EP_STATUS_STALL_NAK_EP13_IN_MSB 26 +#define USB_EP_STATUS_STALL_NAK_EP13_IN_LSB 26 +#define USB_EP_STATUS_STALL_NAK_EP13_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP12_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP12_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP12_OUT_BITS 0x02000000 +#define USB_EP_STATUS_STALL_NAK_EP12_OUT_MSB 25 +#define USB_EP_STATUS_STALL_NAK_EP12_OUT_LSB 25 +#define USB_EP_STATUS_STALL_NAK_EP12_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP12_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP12_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP12_IN_BITS 0x01000000 +#define USB_EP_STATUS_STALL_NAK_EP12_IN_MSB 24 +#define USB_EP_STATUS_STALL_NAK_EP12_IN_LSB 24 +#define USB_EP_STATUS_STALL_NAK_EP12_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP11_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP11_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP11_OUT_BITS 0x00800000 +#define USB_EP_STATUS_STALL_NAK_EP11_OUT_MSB 23 +#define USB_EP_STATUS_STALL_NAK_EP11_OUT_LSB 23 +#define USB_EP_STATUS_STALL_NAK_EP11_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP11_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP11_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP11_IN_BITS 0x00400000 +#define USB_EP_STATUS_STALL_NAK_EP11_IN_MSB 22 +#define USB_EP_STATUS_STALL_NAK_EP11_IN_LSB 22 +#define USB_EP_STATUS_STALL_NAK_EP11_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP10_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP10_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP10_OUT_BITS 0x00200000 +#define USB_EP_STATUS_STALL_NAK_EP10_OUT_MSB 21 +#define USB_EP_STATUS_STALL_NAK_EP10_OUT_LSB 21 +#define USB_EP_STATUS_STALL_NAK_EP10_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP10_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP10_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP10_IN_BITS 0x00100000 +#define USB_EP_STATUS_STALL_NAK_EP10_IN_MSB 20 +#define USB_EP_STATUS_STALL_NAK_EP10_IN_LSB 20 +#define USB_EP_STATUS_STALL_NAK_EP10_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP9_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP9_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP9_OUT_BITS 0x00080000 +#define USB_EP_STATUS_STALL_NAK_EP9_OUT_MSB 19 +#define USB_EP_STATUS_STALL_NAK_EP9_OUT_LSB 19 +#define USB_EP_STATUS_STALL_NAK_EP9_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP9_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP9_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP9_IN_BITS 0x00040000 +#define USB_EP_STATUS_STALL_NAK_EP9_IN_MSB 18 +#define USB_EP_STATUS_STALL_NAK_EP9_IN_LSB 18 +#define USB_EP_STATUS_STALL_NAK_EP9_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP8_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP8_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP8_OUT_BITS 0x00020000 +#define USB_EP_STATUS_STALL_NAK_EP8_OUT_MSB 17 +#define USB_EP_STATUS_STALL_NAK_EP8_OUT_LSB 17 +#define USB_EP_STATUS_STALL_NAK_EP8_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP8_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP8_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP8_IN_BITS 0x00010000 +#define USB_EP_STATUS_STALL_NAK_EP8_IN_MSB 16 +#define USB_EP_STATUS_STALL_NAK_EP8_IN_LSB 16 +#define USB_EP_STATUS_STALL_NAK_EP8_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP7_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP7_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP7_OUT_BITS 0x00008000 +#define USB_EP_STATUS_STALL_NAK_EP7_OUT_MSB 15 +#define USB_EP_STATUS_STALL_NAK_EP7_OUT_LSB 15 +#define USB_EP_STATUS_STALL_NAK_EP7_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP7_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP7_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP7_IN_BITS 0x00004000 +#define USB_EP_STATUS_STALL_NAK_EP7_IN_MSB 14 +#define USB_EP_STATUS_STALL_NAK_EP7_IN_LSB 14 +#define USB_EP_STATUS_STALL_NAK_EP7_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP6_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP6_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP6_OUT_BITS 0x00002000 +#define USB_EP_STATUS_STALL_NAK_EP6_OUT_MSB 13 +#define USB_EP_STATUS_STALL_NAK_EP6_OUT_LSB 13 +#define USB_EP_STATUS_STALL_NAK_EP6_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP6_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP6_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP6_IN_BITS 0x00001000 +#define USB_EP_STATUS_STALL_NAK_EP6_IN_MSB 12 +#define USB_EP_STATUS_STALL_NAK_EP6_IN_LSB 12 +#define USB_EP_STATUS_STALL_NAK_EP6_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP5_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP5_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP5_OUT_BITS 0x00000800 +#define USB_EP_STATUS_STALL_NAK_EP5_OUT_MSB 11 +#define USB_EP_STATUS_STALL_NAK_EP5_OUT_LSB 11 +#define USB_EP_STATUS_STALL_NAK_EP5_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP5_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP5_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP5_IN_BITS 0x00000400 +#define USB_EP_STATUS_STALL_NAK_EP5_IN_MSB 10 +#define USB_EP_STATUS_STALL_NAK_EP5_IN_LSB 10 +#define USB_EP_STATUS_STALL_NAK_EP5_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP4_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP4_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP4_OUT_BITS 0x00000200 +#define USB_EP_STATUS_STALL_NAK_EP4_OUT_MSB 9 +#define USB_EP_STATUS_STALL_NAK_EP4_OUT_LSB 9 +#define USB_EP_STATUS_STALL_NAK_EP4_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP4_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP4_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP4_IN_BITS 0x00000100 +#define USB_EP_STATUS_STALL_NAK_EP4_IN_MSB 8 +#define USB_EP_STATUS_STALL_NAK_EP4_IN_LSB 8 +#define USB_EP_STATUS_STALL_NAK_EP4_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP3_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP3_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP3_OUT_BITS 0x00000080 +#define USB_EP_STATUS_STALL_NAK_EP3_OUT_MSB 7 +#define USB_EP_STATUS_STALL_NAK_EP3_OUT_LSB 7 +#define USB_EP_STATUS_STALL_NAK_EP3_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP3_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP3_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP3_IN_BITS 0x00000040 +#define USB_EP_STATUS_STALL_NAK_EP3_IN_MSB 6 +#define USB_EP_STATUS_STALL_NAK_EP3_IN_LSB 6 +#define USB_EP_STATUS_STALL_NAK_EP3_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP2_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP2_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP2_OUT_BITS 0x00000020 +#define USB_EP_STATUS_STALL_NAK_EP2_OUT_MSB 5 +#define USB_EP_STATUS_STALL_NAK_EP2_OUT_LSB 5 +#define USB_EP_STATUS_STALL_NAK_EP2_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP2_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP2_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP2_IN_BITS 0x00000010 +#define USB_EP_STATUS_STALL_NAK_EP2_IN_MSB 4 +#define USB_EP_STATUS_STALL_NAK_EP2_IN_LSB 4 +#define USB_EP_STATUS_STALL_NAK_EP2_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP1_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP1_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP1_OUT_BITS 0x00000008 +#define USB_EP_STATUS_STALL_NAK_EP1_OUT_MSB 3 +#define USB_EP_STATUS_STALL_NAK_EP1_OUT_LSB 3 +#define USB_EP_STATUS_STALL_NAK_EP1_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP1_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP1_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP1_IN_BITS 0x00000004 +#define USB_EP_STATUS_STALL_NAK_EP1_IN_MSB 2 +#define USB_EP_STATUS_STALL_NAK_EP1_IN_LSB 2 +#define USB_EP_STATUS_STALL_NAK_EP1_IN_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP0_OUT +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP0_OUT_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP0_OUT_BITS 0x00000002 +#define USB_EP_STATUS_STALL_NAK_EP0_OUT_MSB 1 +#define USB_EP_STATUS_STALL_NAK_EP0_OUT_LSB 1 +#define USB_EP_STATUS_STALL_NAK_EP0_OUT_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : USB_EP_STATUS_STALL_NAK_EP0_IN +// Description : None +#define USB_EP_STATUS_STALL_NAK_EP0_IN_RESET 0x0 +#define USB_EP_STATUS_STALL_NAK_EP0_IN_BITS 0x00000001 +#define USB_EP_STATUS_STALL_NAK_EP0_IN_MSB 0 +#define USB_EP_STATUS_STALL_NAK_EP0_IN_LSB 0 +#define USB_EP_STATUS_STALL_NAK_EP0_IN_ACCESS "WC" +// ============================================================================= +// Register : USB_USB_MUXING +// Description : Where to connect the USB controller. Should be to_phy by +// default. +#define USB_USB_MUXING_OFFSET 0x00000074 +#define USB_USB_MUXING_BITS 0x0000000f +#define USB_USB_MUXING_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_USB_MUXING_SOFTCON +// Description : None +#define USB_USB_MUXING_SOFTCON_RESET 0x0 +#define USB_USB_MUXING_SOFTCON_BITS 0x00000008 +#define USB_USB_MUXING_SOFTCON_MSB 3 +#define USB_USB_MUXING_SOFTCON_LSB 3 +#define USB_USB_MUXING_SOFTCON_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_MUXING_TO_DIGITAL_PAD +// Description : None +#define USB_USB_MUXING_TO_DIGITAL_PAD_RESET 0x0 +#define USB_USB_MUXING_TO_DIGITAL_PAD_BITS 0x00000004 +#define USB_USB_MUXING_TO_DIGITAL_PAD_MSB 2 +#define USB_USB_MUXING_TO_DIGITAL_PAD_LSB 2 +#define USB_USB_MUXING_TO_DIGITAL_PAD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_MUXING_TO_EXTPHY +// Description : None +#define USB_USB_MUXING_TO_EXTPHY_RESET 0x0 +#define USB_USB_MUXING_TO_EXTPHY_BITS 0x00000002 +#define USB_USB_MUXING_TO_EXTPHY_MSB 1 +#define USB_USB_MUXING_TO_EXTPHY_LSB 1 +#define USB_USB_MUXING_TO_EXTPHY_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_MUXING_TO_PHY +// Description : None +#define USB_USB_MUXING_TO_PHY_RESET 0x0 +#define USB_USB_MUXING_TO_PHY_BITS 0x00000001 +#define USB_USB_MUXING_TO_PHY_MSB 0 +#define USB_USB_MUXING_TO_PHY_LSB 0 +#define USB_USB_MUXING_TO_PHY_ACCESS "RW" +// ============================================================================= +// Register : USB_USB_PWR +// Description : Overrides for the power signals in the event that the VBUS +// signals are not hooked up to GPIO. Set the value of the +// override and then the override enable to switch over to the +// override value. +#define USB_USB_PWR_OFFSET 0x00000078 +#define USB_USB_PWR_BITS 0x0000003f +#define USB_USB_PWR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_USB_PWR_OVERCURR_DETECT_EN +// Description : None +#define USB_USB_PWR_OVERCURR_DETECT_EN_RESET 0x0 +#define USB_USB_PWR_OVERCURR_DETECT_EN_BITS 0x00000020 +#define USB_USB_PWR_OVERCURR_DETECT_EN_MSB 5 +#define USB_USB_PWR_OVERCURR_DETECT_EN_LSB 5 +#define USB_USB_PWR_OVERCURR_DETECT_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_PWR_OVERCURR_DETECT +// Description : None +#define USB_USB_PWR_OVERCURR_DETECT_RESET 0x0 +#define USB_USB_PWR_OVERCURR_DETECT_BITS 0x00000010 +#define USB_USB_PWR_OVERCURR_DETECT_MSB 4 +#define USB_USB_PWR_OVERCURR_DETECT_LSB 4 +#define USB_USB_PWR_OVERCURR_DETECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN +// Description : None +#define USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_RESET 0x0 +#define USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_BITS 0x00000008 +#define USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_MSB 3 +#define USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_LSB 3 +#define USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_PWR_VBUS_DETECT +// Description : None +#define USB_USB_PWR_VBUS_DETECT_RESET 0x0 +#define USB_USB_PWR_VBUS_DETECT_BITS 0x00000004 +#define USB_USB_PWR_VBUS_DETECT_MSB 2 +#define USB_USB_PWR_VBUS_DETECT_LSB 2 +#define USB_USB_PWR_VBUS_DETECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_PWR_VBUS_EN_OVERRIDE_EN +// Description : None +#define USB_USB_PWR_VBUS_EN_OVERRIDE_EN_RESET 0x0 +#define USB_USB_PWR_VBUS_EN_OVERRIDE_EN_BITS 0x00000002 +#define USB_USB_PWR_VBUS_EN_OVERRIDE_EN_MSB 1 +#define USB_USB_PWR_VBUS_EN_OVERRIDE_EN_LSB 1 +#define USB_USB_PWR_VBUS_EN_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USB_PWR_VBUS_EN +// Description : None +#define USB_USB_PWR_VBUS_EN_RESET 0x0 +#define USB_USB_PWR_VBUS_EN_BITS 0x00000001 +#define USB_USB_PWR_VBUS_EN_MSB 0 +#define USB_USB_PWR_VBUS_EN_LSB 0 +#define USB_USB_PWR_VBUS_EN_ACCESS "RW" +// ============================================================================= +// Register : USB_USBPHY_DIRECT +// Description : This register allows for direct control of the USB phy. Use in +// conjunction with usbphy_direct_override register to enable each +// override bit. +#define USB_USBPHY_DIRECT_OFFSET 0x0000007c +#define USB_USBPHY_DIRECT_BITS 0x007fff77 +#define USB_USBPHY_DIRECT_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DM_OVV +// Description : DM over voltage +#define USB_USBPHY_DIRECT_DM_OVV_RESET 0x0 +#define USB_USBPHY_DIRECT_DM_OVV_BITS 0x00400000 +#define USB_USBPHY_DIRECT_DM_OVV_MSB 22 +#define USB_USBPHY_DIRECT_DM_OVV_LSB 22 +#define USB_USBPHY_DIRECT_DM_OVV_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DP_OVV +// Description : DP over voltage +#define USB_USBPHY_DIRECT_DP_OVV_RESET 0x0 +#define USB_USBPHY_DIRECT_DP_OVV_BITS 0x00200000 +#define USB_USBPHY_DIRECT_DP_OVV_MSB 21 +#define USB_USBPHY_DIRECT_DP_OVV_LSB 21 +#define USB_USBPHY_DIRECT_DP_OVV_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DM_OVCN +// Description : DM overcurrent +#define USB_USBPHY_DIRECT_DM_OVCN_RESET 0x0 +#define USB_USBPHY_DIRECT_DM_OVCN_BITS 0x00100000 +#define USB_USBPHY_DIRECT_DM_OVCN_MSB 20 +#define USB_USBPHY_DIRECT_DM_OVCN_LSB 20 +#define USB_USBPHY_DIRECT_DM_OVCN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DP_OVCN +// Description : DP overcurrent +#define USB_USBPHY_DIRECT_DP_OVCN_RESET 0x0 +#define USB_USBPHY_DIRECT_DP_OVCN_BITS 0x00080000 +#define USB_USBPHY_DIRECT_DP_OVCN_MSB 19 +#define USB_USBPHY_DIRECT_DP_OVCN_LSB 19 +#define USB_USBPHY_DIRECT_DP_OVCN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_RX_DM +// Description : DPM pin state +#define USB_USBPHY_DIRECT_RX_DM_RESET 0x0 +#define USB_USBPHY_DIRECT_RX_DM_BITS 0x00040000 +#define USB_USBPHY_DIRECT_RX_DM_MSB 18 +#define USB_USBPHY_DIRECT_RX_DM_LSB 18 +#define USB_USBPHY_DIRECT_RX_DM_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_RX_DP +// Description : DPP pin state +#define USB_USBPHY_DIRECT_RX_DP_RESET 0x0 +#define USB_USBPHY_DIRECT_RX_DP_BITS 0x00020000 +#define USB_USBPHY_DIRECT_RX_DP_MSB 17 +#define USB_USBPHY_DIRECT_RX_DP_LSB 17 +#define USB_USBPHY_DIRECT_RX_DP_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_RX_DD +// Description : Differential RX +#define USB_USBPHY_DIRECT_RX_DD_RESET 0x0 +#define USB_USBPHY_DIRECT_RX_DD_BITS 0x00010000 +#define USB_USBPHY_DIRECT_RX_DD_MSB 16 +#define USB_USBPHY_DIRECT_RX_DD_LSB 16 +#define USB_USBPHY_DIRECT_RX_DD_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_DIFFMODE +// Description : TX_DIFFMODE=0: Single ended mode +// TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE +// ignored) +#define USB_USBPHY_DIRECT_TX_DIFFMODE_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_DIFFMODE_BITS 0x00008000 +#define USB_USBPHY_DIRECT_TX_DIFFMODE_MSB 15 +#define USB_USBPHY_DIRECT_TX_DIFFMODE_LSB 15 +#define USB_USBPHY_DIRECT_TX_DIFFMODE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_FSSLEW +// Description : TX_FSSLEW=0: Low speed slew rate +// TX_FSSLEW=1: Full speed slew rate +#define USB_USBPHY_DIRECT_TX_FSSLEW_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_FSSLEW_BITS 0x00004000 +#define USB_USBPHY_DIRECT_TX_FSSLEW_MSB 14 +#define USB_USBPHY_DIRECT_TX_FSSLEW_LSB 14 +#define USB_USBPHY_DIRECT_TX_FSSLEW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_PD +// Description : TX power down override (if override enable is set). 1 = powered +// down. +#define USB_USBPHY_DIRECT_TX_PD_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_PD_BITS 0x00002000 +#define USB_USBPHY_DIRECT_TX_PD_MSB 13 +#define USB_USBPHY_DIRECT_TX_PD_LSB 13 +#define USB_USBPHY_DIRECT_TX_PD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_RX_PD +// Description : RX power down override (if override enable is set). 1 = powered +// down. +#define USB_USBPHY_DIRECT_RX_PD_RESET 0x0 +#define USB_USBPHY_DIRECT_RX_PD_BITS 0x00001000 +#define USB_USBPHY_DIRECT_RX_PD_MSB 12 +#define USB_USBPHY_DIRECT_RX_PD_LSB 12 +#define USB_USBPHY_DIRECT_RX_PD_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_DM +// Description : Output data. TX_DIFFMODE=1, Ignored +// TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. +// DPM=TX_DM +#define USB_USBPHY_DIRECT_TX_DM_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_DM_BITS 0x00000800 +#define USB_USBPHY_DIRECT_TX_DM_MSB 11 +#define USB_USBPHY_DIRECT_TX_DM_LSB 11 +#define USB_USBPHY_DIRECT_TX_DM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_DP +// Description : Output data. If TX_DIFFMODE=1, Drives DPP/DPM diff pair. +// TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP +// If TX_DIFFMODE=0, Drives DPP only. TX_DP_OE=1 to enable drive. +// DPP=TX_DP +#define USB_USBPHY_DIRECT_TX_DP_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_DP_BITS 0x00000400 +#define USB_USBPHY_DIRECT_TX_DP_MSB 10 +#define USB_USBPHY_DIRECT_TX_DP_LSB 10 +#define USB_USBPHY_DIRECT_TX_DP_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_DM_OE +// Description : Output enable. If TX_DIFFMODE=1, Ignored. +// If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - +// DPM driving +#define USB_USBPHY_DIRECT_TX_DM_OE_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_DM_OE_BITS 0x00000200 +#define USB_USBPHY_DIRECT_TX_DM_OE_MSB 9 +#define USB_USBPHY_DIRECT_TX_DM_OE_LSB 9 +#define USB_USBPHY_DIRECT_TX_DM_OE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_TX_DP_OE +// Description : Output enable. If TX_DIFFMODE=1, OE for DPP/DPM diff pair. 0 - +// DPP/DPM in Hi-Z state; 1 - DPP/DPM driving +// If TX_DIFFMODE=0, OE for DPP only. 0 - DPP in Hi-Z state; 1 - +// DPP driving +#define USB_USBPHY_DIRECT_TX_DP_OE_RESET 0x0 +#define USB_USBPHY_DIRECT_TX_DP_OE_BITS 0x00000100 +#define USB_USBPHY_DIRECT_TX_DP_OE_MSB 8 +#define USB_USBPHY_DIRECT_TX_DP_OE_LSB 8 +#define USB_USBPHY_DIRECT_TX_DP_OE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DM_PULLDN_EN +// Description : DM pull down enable +#define USB_USBPHY_DIRECT_DM_PULLDN_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_DM_PULLDN_EN_BITS 0x00000040 +#define USB_USBPHY_DIRECT_DM_PULLDN_EN_MSB 6 +#define USB_USBPHY_DIRECT_DM_PULLDN_EN_LSB 6 +#define USB_USBPHY_DIRECT_DM_PULLDN_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DM_PULLUP_EN +// Description : DM pull up enable +#define USB_USBPHY_DIRECT_DM_PULLUP_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_DM_PULLUP_EN_BITS 0x00000020 +#define USB_USBPHY_DIRECT_DM_PULLUP_EN_MSB 5 +#define USB_USBPHY_DIRECT_DM_PULLUP_EN_LSB 5 +#define USB_USBPHY_DIRECT_DM_PULLUP_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DM_PULLUP_HISEL +// Description : Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - +// Pull = Rpu1 + Rpu2 +#define USB_USBPHY_DIRECT_DM_PULLUP_HISEL_RESET 0x0 +#define USB_USBPHY_DIRECT_DM_PULLUP_HISEL_BITS 0x00000010 +#define USB_USBPHY_DIRECT_DM_PULLUP_HISEL_MSB 4 +#define USB_USBPHY_DIRECT_DM_PULLUP_HISEL_LSB 4 +#define USB_USBPHY_DIRECT_DM_PULLUP_HISEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DP_PULLDN_EN +// Description : DP pull down enable +#define USB_USBPHY_DIRECT_DP_PULLDN_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_DP_PULLDN_EN_BITS 0x00000004 +#define USB_USBPHY_DIRECT_DP_PULLDN_EN_MSB 2 +#define USB_USBPHY_DIRECT_DP_PULLDN_EN_LSB 2 +#define USB_USBPHY_DIRECT_DP_PULLDN_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DP_PULLUP_EN +// Description : DP pull up enable +#define USB_USBPHY_DIRECT_DP_PULLUP_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_DP_PULLUP_EN_BITS 0x00000002 +#define USB_USBPHY_DIRECT_DP_PULLUP_EN_MSB 1 +#define USB_USBPHY_DIRECT_DP_PULLUP_EN_LSB 1 +#define USB_USBPHY_DIRECT_DP_PULLUP_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_DP_PULLUP_HISEL +// Description : Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - +// Pull = Rpu1 + Rpu2 +#define USB_USBPHY_DIRECT_DP_PULLUP_HISEL_RESET 0x0 +#define USB_USBPHY_DIRECT_DP_PULLUP_HISEL_BITS 0x00000001 +#define USB_USBPHY_DIRECT_DP_PULLUP_HISEL_MSB 0 +#define USB_USBPHY_DIRECT_DP_PULLUP_HISEL_LSB 0 +#define USB_USBPHY_DIRECT_DP_PULLUP_HISEL_ACCESS "RW" +// ============================================================================= +// Register : USB_USBPHY_DIRECT_OVERRIDE +// Description : Override enable for each control in usbphy_direct +#define USB_USBPHY_DIRECT_OVERRIDE_OFFSET 0x00000080 +#define USB_USBPHY_DIRECT_OVERRIDE_BITS 0x00009fff +#define USB_USBPHY_DIRECT_OVERRIDE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_DIFFMODE_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DIFFMODE_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DIFFMODE_OVERRIDE_EN_BITS 0x00008000 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DIFFMODE_OVERRIDE_EN_MSB 15 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DIFFMODE_OVERRIDE_EN_LSB 15 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DIFFMODE_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_OVERRIDE_EN_BITS 0x00001000 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_OVERRIDE_EN_MSB 12 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_OVERRIDE_EN_LSB 12 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_FSSLEW_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_FSSLEW_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_FSSLEW_OVERRIDE_EN_BITS 0x00000800 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_FSSLEW_OVERRIDE_EN_MSB 11 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_FSSLEW_OVERRIDE_EN_LSB 11 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_FSSLEW_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_PD_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_PD_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_PD_OVERRIDE_EN_BITS 0x00000400 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_PD_OVERRIDE_EN_MSB 10 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_PD_OVERRIDE_EN_LSB 10 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_PD_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_RX_PD_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_RX_PD_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_RX_PD_OVERRIDE_EN_BITS 0x00000200 +#define USB_USBPHY_DIRECT_OVERRIDE_RX_PD_OVERRIDE_EN_MSB 9 +#define USB_USBPHY_DIRECT_OVERRIDE_RX_PD_OVERRIDE_EN_LSB 9 +#define USB_USBPHY_DIRECT_OVERRIDE_RX_PD_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OVERRIDE_EN_BITS 0x00000100 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OVERRIDE_EN_MSB 8 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OVERRIDE_EN_LSB 8 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OVERRIDE_EN_BITS 0x00000080 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OVERRIDE_EN_MSB 7 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OVERRIDE_EN_LSB 7 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OE_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OE_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OE_OVERRIDE_EN_BITS 0x00000040 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OE_OVERRIDE_EN_MSB 6 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OE_OVERRIDE_EN_LSB 6 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DM_OE_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OE_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OE_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OE_OVERRIDE_EN_BITS 0x00000020 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OE_OVERRIDE_EN_MSB 5 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OE_OVERRIDE_EN_LSB 5 +#define USB_USBPHY_DIRECT_OVERRIDE_TX_DP_OE_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_DM_PULLDN_EN_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLDN_EN_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLDN_EN_OVERRIDE_EN_BITS 0x00000010 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLDN_EN_OVERRIDE_EN_MSB 4 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLDN_EN_OVERRIDE_EN_LSB 4 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLDN_EN_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_DP_PULLDN_EN_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLDN_EN_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLDN_EN_OVERRIDE_EN_BITS 0x00000008 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLDN_EN_OVERRIDE_EN_MSB 3 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLDN_EN_OVERRIDE_EN_LSB 3 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLDN_EN_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_BITS 0x00000004 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_MSB 2 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_LSB 2 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_HISEL_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_HISEL_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_HISEL_OVERRIDE_EN_BITS 0x00000002 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_HISEL_OVERRIDE_EN_MSB 1 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_HISEL_OVERRIDE_EN_LSB 1 +#define USB_USBPHY_DIRECT_OVERRIDE_DM_PULLUP_HISEL_OVERRIDE_EN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_HISEL_OVERRIDE_EN +// Description : None +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_HISEL_OVERRIDE_EN_RESET 0x0 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_HISEL_OVERRIDE_EN_BITS 0x00000001 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_HISEL_OVERRIDE_EN_MSB 0 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_HISEL_OVERRIDE_EN_LSB 0 +#define USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_HISEL_OVERRIDE_EN_ACCESS "RW" +// ============================================================================= +// Register : USB_USBPHY_TRIM +// Description : Used to adjust trim values of USB phy pull down resistors. +#define USB_USBPHY_TRIM_OFFSET 0x00000084 +#define USB_USBPHY_TRIM_BITS 0x00001f1f +#define USB_USBPHY_TRIM_RESET 0x00001f1f +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_TRIM_DM_PULLDN_TRIM +// Description : Value to drive to USB PHY +// DM pulldown resistor trim control +// Experimental data suggests that the reset value will work, but +// this register allows adjustment if required +#define USB_USBPHY_TRIM_DM_PULLDN_TRIM_RESET 0x1f +#define USB_USBPHY_TRIM_DM_PULLDN_TRIM_BITS 0x00001f00 +#define USB_USBPHY_TRIM_DM_PULLDN_TRIM_MSB 12 +#define USB_USBPHY_TRIM_DM_PULLDN_TRIM_LSB 8 +#define USB_USBPHY_TRIM_DM_PULLDN_TRIM_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_USBPHY_TRIM_DP_PULLDN_TRIM +// Description : Value to drive to USB PHY +// DP pulldown resistor trim control +// Experimental data suggests that the reset value will work, but +// this register allows adjustment if required +#define USB_USBPHY_TRIM_DP_PULLDN_TRIM_RESET 0x1f +#define USB_USBPHY_TRIM_DP_PULLDN_TRIM_BITS 0x0000001f +#define USB_USBPHY_TRIM_DP_PULLDN_TRIM_MSB 4 +#define USB_USBPHY_TRIM_DP_PULLDN_TRIM_LSB 0 +#define USB_USBPHY_TRIM_DP_PULLDN_TRIM_ACCESS "RW" +// ============================================================================= +// Register : USB_INTR +// Description : Raw Interrupts +#define USB_INTR_OFFSET 0x0000008c +#define USB_INTR_BITS 0x000fffff +#define USB_INTR_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_INTR_EP_STALL_NAK +// Description : Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by +// clearing all bits in EP_STATUS_STALL_NAK. +#define USB_INTR_EP_STALL_NAK_RESET 0x0 +#define USB_INTR_EP_STALL_NAK_BITS 0x00080000 +#define USB_INTR_EP_STALL_NAK_MSB 19 +#define USB_INTR_EP_STALL_NAK_LSB 19 +#define USB_INTR_EP_STALL_NAK_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_ABORT_DONE +// Description : Raised when any bit in ABORT_DONE is set. Clear by clearing all +// bits in ABORT_DONE. +#define USB_INTR_ABORT_DONE_RESET 0x0 +#define USB_INTR_ABORT_DONE_BITS 0x00040000 +#define USB_INTR_ABORT_DONE_MSB 18 +#define USB_INTR_ABORT_DONE_LSB 18 +#define USB_INTR_ABORT_DONE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_DEV_SOF +// Description : Set every time the device receives a SOF (Start of Frame) +// packet. Cleared by reading SOF_RD +#define USB_INTR_DEV_SOF_RESET 0x0 +#define USB_INTR_DEV_SOF_BITS 0x00020000 +#define USB_INTR_DEV_SOF_MSB 17 +#define USB_INTR_DEV_SOF_LSB 17 +#define USB_INTR_DEV_SOF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_SETUP_REQ +// Description : Device. Source: SIE_STATUS.SETUP_REC +#define USB_INTR_SETUP_REQ_RESET 0x0 +#define USB_INTR_SETUP_REQ_BITS 0x00010000 +#define USB_INTR_SETUP_REQ_MSB 16 +#define USB_INTR_SETUP_REQ_LSB 16 +#define USB_INTR_SETUP_REQ_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_DEV_RESUME_FROM_HOST +// Description : Set when the device receives a resume from the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTR_DEV_RESUME_FROM_HOST_RESET 0x0 +#define USB_INTR_DEV_RESUME_FROM_HOST_BITS 0x00008000 +#define USB_INTR_DEV_RESUME_FROM_HOST_MSB 15 +#define USB_INTR_DEV_RESUME_FROM_HOST_LSB 15 +#define USB_INTR_DEV_RESUME_FROM_HOST_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_DEV_SUSPEND +// Description : Set when the device suspend state changes. Cleared by writing +// to SIE_STATUS.SUSPENDED +#define USB_INTR_DEV_SUSPEND_RESET 0x0 +#define USB_INTR_DEV_SUSPEND_BITS 0x00004000 +#define USB_INTR_DEV_SUSPEND_MSB 14 +#define USB_INTR_DEV_SUSPEND_LSB 14 +#define USB_INTR_DEV_SUSPEND_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_DEV_CONN_DIS +// Description : Set when the device connection state changes. Cleared by +// writing to SIE_STATUS.CONNECTED +#define USB_INTR_DEV_CONN_DIS_RESET 0x0 +#define USB_INTR_DEV_CONN_DIS_BITS 0x00002000 +#define USB_INTR_DEV_CONN_DIS_MSB 13 +#define USB_INTR_DEV_CONN_DIS_LSB 13 +#define USB_INTR_DEV_CONN_DIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_BUS_RESET +// Description : Source: SIE_STATUS.BUS_RESET +#define USB_INTR_BUS_RESET_RESET 0x0 +#define USB_INTR_BUS_RESET_BITS 0x00001000 +#define USB_INTR_BUS_RESET_MSB 12 +#define USB_INTR_BUS_RESET_LSB 12 +#define USB_INTR_BUS_RESET_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_VBUS_DETECT +// Description : Source: SIE_STATUS.VBUS_DETECT +#define USB_INTR_VBUS_DETECT_RESET 0x0 +#define USB_INTR_VBUS_DETECT_BITS 0x00000800 +#define USB_INTR_VBUS_DETECT_MSB 11 +#define USB_INTR_VBUS_DETECT_LSB 11 +#define USB_INTR_VBUS_DETECT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_STALL +// Description : Source: SIE_STATUS.STALL_REC +#define USB_INTR_STALL_RESET 0x0 +#define USB_INTR_STALL_BITS 0x00000400 +#define USB_INTR_STALL_MSB 10 +#define USB_INTR_STALL_LSB 10 +#define USB_INTR_STALL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_ERROR_CRC +// Description : Source: SIE_STATUS.CRC_ERROR +#define USB_INTR_ERROR_CRC_RESET 0x0 +#define USB_INTR_ERROR_CRC_BITS 0x00000200 +#define USB_INTR_ERROR_CRC_MSB 9 +#define USB_INTR_ERROR_CRC_LSB 9 +#define USB_INTR_ERROR_CRC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_ERROR_BIT_STUFF +// Description : Source: SIE_STATUS.BIT_STUFF_ERROR +#define USB_INTR_ERROR_BIT_STUFF_RESET 0x0 +#define USB_INTR_ERROR_BIT_STUFF_BITS 0x00000100 +#define USB_INTR_ERROR_BIT_STUFF_MSB 8 +#define USB_INTR_ERROR_BIT_STUFF_LSB 8 +#define USB_INTR_ERROR_BIT_STUFF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_ERROR_RX_OVERFLOW +// Description : Source: SIE_STATUS.RX_OVERFLOW +#define USB_INTR_ERROR_RX_OVERFLOW_RESET 0x0 +#define USB_INTR_ERROR_RX_OVERFLOW_BITS 0x00000080 +#define USB_INTR_ERROR_RX_OVERFLOW_MSB 7 +#define USB_INTR_ERROR_RX_OVERFLOW_LSB 7 +#define USB_INTR_ERROR_RX_OVERFLOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_ERROR_RX_TIMEOUT +// Description : Source: SIE_STATUS.RX_TIMEOUT +#define USB_INTR_ERROR_RX_TIMEOUT_RESET 0x0 +#define USB_INTR_ERROR_RX_TIMEOUT_BITS 0x00000040 +#define USB_INTR_ERROR_RX_TIMEOUT_MSB 6 +#define USB_INTR_ERROR_RX_TIMEOUT_LSB 6 +#define USB_INTR_ERROR_RX_TIMEOUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_ERROR_DATA_SEQ +// Description : Source: SIE_STATUS.DATA_SEQ_ERROR +#define USB_INTR_ERROR_DATA_SEQ_RESET 0x0 +#define USB_INTR_ERROR_DATA_SEQ_BITS 0x00000020 +#define USB_INTR_ERROR_DATA_SEQ_MSB 5 +#define USB_INTR_ERROR_DATA_SEQ_LSB 5 +#define USB_INTR_ERROR_DATA_SEQ_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_BUFF_STATUS +// Description : Raised when any bit in BUFF_STATUS is set. Clear by clearing +// all bits in BUFF_STATUS. +#define USB_INTR_BUFF_STATUS_RESET 0x0 +#define USB_INTR_BUFF_STATUS_BITS 0x00000010 +#define USB_INTR_BUFF_STATUS_MSB 4 +#define USB_INTR_BUFF_STATUS_LSB 4 +#define USB_INTR_BUFF_STATUS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_TRANS_COMPLETE +// Description : Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by +// writing to this bit. +#define USB_INTR_TRANS_COMPLETE_RESET 0x0 +#define USB_INTR_TRANS_COMPLETE_BITS 0x00000008 +#define USB_INTR_TRANS_COMPLETE_MSB 3 +#define USB_INTR_TRANS_COMPLETE_LSB 3 +#define USB_INTR_TRANS_COMPLETE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_HOST_SOF +// Description : Host: raised every time the host sends a SOF (Start of Frame). +// Cleared by reading SOF_RD +#define USB_INTR_HOST_SOF_RESET 0x0 +#define USB_INTR_HOST_SOF_BITS 0x00000004 +#define USB_INTR_HOST_SOF_MSB 2 +#define USB_INTR_HOST_SOF_LSB 2 +#define USB_INTR_HOST_SOF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_HOST_RESUME +// Description : Host: raised when a device wakes up the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTR_HOST_RESUME_RESET 0x0 +#define USB_INTR_HOST_RESUME_BITS 0x00000002 +#define USB_INTR_HOST_RESUME_MSB 1 +#define USB_INTR_HOST_RESUME_LSB 1 +#define USB_INTR_HOST_RESUME_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTR_HOST_CONN_DIS +// Description : Host: raised when a device is connected or disconnected (i.e. +// when SIE_STATUS.SPEED changes). Cleared by writing to +// SIE_STATUS.SPEED +#define USB_INTR_HOST_CONN_DIS_RESET 0x0 +#define USB_INTR_HOST_CONN_DIS_BITS 0x00000001 +#define USB_INTR_HOST_CONN_DIS_MSB 0 +#define USB_INTR_HOST_CONN_DIS_LSB 0 +#define USB_INTR_HOST_CONN_DIS_ACCESS "RO" +// ============================================================================= +// Register : USB_INTE +// Description : Interrupt Enable +#define USB_INTE_OFFSET 0x00000090 +#define USB_INTE_BITS 0x000fffff +#define USB_INTE_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_INTE_EP_STALL_NAK +// Description : Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by +// clearing all bits in EP_STATUS_STALL_NAK. +#define USB_INTE_EP_STALL_NAK_RESET 0x0 +#define USB_INTE_EP_STALL_NAK_BITS 0x00080000 +#define USB_INTE_EP_STALL_NAK_MSB 19 +#define USB_INTE_EP_STALL_NAK_LSB 19 +#define USB_INTE_EP_STALL_NAK_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_ABORT_DONE +// Description : Raised when any bit in ABORT_DONE is set. Clear by clearing all +// bits in ABORT_DONE. +#define USB_INTE_ABORT_DONE_RESET 0x0 +#define USB_INTE_ABORT_DONE_BITS 0x00040000 +#define USB_INTE_ABORT_DONE_MSB 18 +#define USB_INTE_ABORT_DONE_LSB 18 +#define USB_INTE_ABORT_DONE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_DEV_SOF +// Description : Set every time the device receives a SOF (Start of Frame) +// packet. Cleared by reading SOF_RD +#define USB_INTE_DEV_SOF_RESET 0x0 +#define USB_INTE_DEV_SOF_BITS 0x00020000 +#define USB_INTE_DEV_SOF_MSB 17 +#define USB_INTE_DEV_SOF_LSB 17 +#define USB_INTE_DEV_SOF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_SETUP_REQ +// Description : Device. Source: SIE_STATUS.SETUP_REC +#define USB_INTE_SETUP_REQ_RESET 0x0 +#define USB_INTE_SETUP_REQ_BITS 0x00010000 +#define USB_INTE_SETUP_REQ_MSB 16 +#define USB_INTE_SETUP_REQ_LSB 16 +#define USB_INTE_SETUP_REQ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_DEV_RESUME_FROM_HOST +// Description : Set when the device receives a resume from the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTE_DEV_RESUME_FROM_HOST_RESET 0x0 +#define USB_INTE_DEV_RESUME_FROM_HOST_BITS 0x00008000 +#define USB_INTE_DEV_RESUME_FROM_HOST_MSB 15 +#define USB_INTE_DEV_RESUME_FROM_HOST_LSB 15 +#define USB_INTE_DEV_RESUME_FROM_HOST_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_DEV_SUSPEND +// Description : Set when the device suspend state changes. Cleared by writing +// to SIE_STATUS.SUSPENDED +#define USB_INTE_DEV_SUSPEND_RESET 0x0 +#define USB_INTE_DEV_SUSPEND_BITS 0x00004000 +#define USB_INTE_DEV_SUSPEND_MSB 14 +#define USB_INTE_DEV_SUSPEND_LSB 14 +#define USB_INTE_DEV_SUSPEND_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_DEV_CONN_DIS +// Description : Set when the device connection state changes. Cleared by +// writing to SIE_STATUS.CONNECTED +#define USB_INTE_DEV_CONN_DIS_RESET 0x0 +#define USB_INTE_DEV_CONN_DIS_BITS 0x00002000 +#define USB_INTE_DEV_CONN_DIS_MSB 13 +#define USB_INTE_DEV_CONN_DIS_LSB 13 +#define USB_INTE_DEV_CONN_DIS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_BUS_RESET +// Description : Source: SIE_STATUS.BUS_RESET +#define USB_INTE_BUS_RESET_RESET 0x0 +#define USB_INTE_BUS_RESET_BITS 0x00001000 +#define USB_INTE_BUS_RESET_MSB 12 +#define USB_INTE_BUS_RESET_LSB 12 +#define USB_INTE_BUS_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_VBUS_DETECT +// Description : Source: SIE_STATUS.VBUS_DETECT +#define USB_INTE_VBUS_DETECT_RESET 0x0 +#define USB_INTE_VBUS_DETECT_BITS 0x00000800 +#define USB_INTE_VBUS_DETECT_MSB 11 +#define USB_INTE_VBUS_DETECT_LSB 11 +#define USB_INTE_VBUS_DETECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_STALL +// Description : Source: SIE_STATUS.STALL_REC +#define USB_INTE_STALL_RESET 0x0 +#define USB_INTE_STALL_BITS 0x00000400 +#define USB_INTE_STALL_MSB 10 +#define USB_INTE_STALL_LSB 10 +#define USB_INTE_STALL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_ERROR_CRC +// Description : Source: SIE_STATUS.CRC_ERROR +#define USB_INTE_ERROR_CRC_RESET 0x0 +#define USB_INTE_ERROR_CRC_BITS 0x00000200 +#define USB_INTE_ERROR_CRC_MSB 9 +#define USB_INTE_ERROR_CRC_LSB 9 +#define USB_INTE_ERROR_CRC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_ERROR_BIT_STUFF +// Description : Source: SIE_STATUS.BIT_STUFF_ERROR +#define USB_INTE_ERROR_BIT_STUFF_RESET 0x0 +#define USB_INTE_ERROR_BIT_STUFF_BITS 0x00000100 +#define USB_INTE_ERROR_BIT_STUFF_MSB 8 +#define USB_INTE_ERROR_BIT_STUFF_LSB 8 +#define USB_INTE_ERROR_BIT_STUFF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_ERROR_RX_OVERFLOW +// Description : Source: SIE_STATUS.RX_OVERFLOW +#define USB_INTE_ERROR_RX_OVERFLOW_RESET 0x0 +#define USB_INTE_ERROR_RX_OVERFLOW_BITS 0x00000080 +#define USB_INTE_ERROR_RX_OVERFLOW_MSB 7 +#define USB_INTE_ERROR_RX_OVERFLOW_LSB 7 +#define USB_INTE_ERROR_RX_OVERFLOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_ERROR_RX_TIMEOUT +// Description : Source: SIE_STATUS.RX_TIMEOUT +#define USB_INTE_ERROR_RX_TIMEOUT_RESET 0x0 +#define USB_INTE_ERROR_RX_TIMEOUT_BITS 0x00000040 +#define USB_INTE_ERROR_RX_TIMEOUT_MSB 6 +#define USB_INTE_ERROR_RX_TIMEOUT_LSB 6 +#define USB_INTE_ERROR_RX_TIMEOUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_ERROR_DATA_SEQ +// Description : Source: SIE_STATUS.DATA_SEQ_ERROR +#define USB_INTE_ERROR_DATA_SEQ_RESET 0x0 +#define USB_INTE_ERROR_DATA_SEQ_BITS 0x00000020 +#define USB_INTE_ERROR_DATA_SEQ_MSB 5 +#define USB_INTE_ERROR_DATA_SEQ_LSB 5 +#define USB_INTE_ERROR_DATA_SEQ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_BUFF_STATUS +// Description : Raised when any bit in BUFF_STATUS is set. Clear by clearing +// all bits in BUFF_STATUS. +#define USB_INTE_BUFF_STATUS_RESET 0x0 +#define USB_INTE_BUFF_STATUS_BITS 0x00000010 +#define USB_INTE_BUFF_STATUS_MSB 4 +#define USB_INTE_BUFF_STATUS_LSB 4 +#define USB_INTE_BUFF_STATUS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_TRANS_COMPLETE +// Description : Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by +// writing to this bit. +#define USB_INTE_TRANS_COMPLETE_RESET 0x0 +#define USB_INTE_TRANS_COMPLETE_BITS 0x00000008 +#define USB_INTE_TRANS_COMPLETE_MSB 3 +#define USB_INTE_TRANS_COMPLETE_LSB 3 +#define USB_INTE_TRANS_COMPLETE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_HOST_SOF +// Description : Host: raised every time the host sends a SOF (Start of Frame). +// Cleared by reading SOF_RD +#define USB_INTE_HOST_SOF_RESET 0x0 +#define USB_INTE_HOST_SOF_BITS 0x00000004 +#define USB_INTE_HOST_SOF_MSB 2 +#define USB_INTE_HOST_SOF_LSB 2 +#define USB_INTE_HOST_SOF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_HOST_RESUME +// Description : Host: raised when a device wakes up the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTE_HOST_RESUME_RESET 0x0 +#define USB_INTE_HOST_RESUME_BITS 0x00000002 +#define USB_INTE_HOST_RESUME_MSB 1 +#define USB_INTE_HOST_RESUME_LSB 1 +#define USB_INTE_HOST_RESUME_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTE_HOST_CONN_DIS +// Description : Host: raised when a device is connected or disconnected (i.e. +// when SIE_STATUS.SPEED changes). Cleared by writing to +// SIE_STATUS.SPEED +#define USB_INTE_HOST_CONN_DIS_RESET 0x0 +#define USB_INTE_HOST_CONN_DIS_BITS 0x00000001 +#define USB_INTE_HOST_CONN_DIS_MSB 0 +#define USB_INTE_HOST_CONN_DIS_LSB 0 +#define USB_INTE_HOST_CONN_DIS_ACCESS "RW" +// ============================================================================= +// Register : USB_INTF +// Description : Interrupt Force +#define USB_INTF_OFFSET 0x00000094 +#define USB_INTF_BITS 0x000fffff +#define USB_INTF_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_INTF_EP_STALL_NAK +// Description : Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by +// clearing all bits in EP_STATUS_STALL_NAK. +#define USB_INTF_EP_STALL_NAK_RESET 0x0 +#define USB_INTF_EP_STALL_NAK_BITS 0x00080000 +#define USB_INTF_EP_STALL_NAK_MSB 19 +#define USB_INTF_EP_STALL_NAK_LSB 19 +#define USB_INTF_EP_STALL_NAK_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_ABORT_DONE +// Description : Raised when any bit in ABORT_DONE is set. Clear by clearing all +// bits in ABORT_DONE. +#define USB_INTF_ABORT_DONE_RESET 0x0 +#define USB_INTF_ABORT_DONE_BITS 0x00040000 +#define USB_INTF_ABORT_DONE_MSB 18 +#define USB_INTF_ABORT_DONE_LSB 18 +#define USB_INTF_ABORT_DONE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_DEV_SOF +// Description : Set every time the device receives a SOF (Start of Frame) +// packet. Cleared by reading SOF_RD +#define USB_INTF_DEV_SOF_RESET 0x0 +#define USB_INTF_DEV_SOF_BITS 0x00020000 +#define USB_INTF_DEV_SOF_MSB 17 +#define USB_INTF_DEV_SOF_LSB 17 +#define USB_INTF_DEV_SOF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_SETUP_REQ +// Description : Device. Source: SIE_STATUS.SETUP_REC +#define USB_INTF_SETUP_REQ_RESET 0x0 +#define USB_INTF_SETUP_REQ_BITS 0x00010000 +#define USB_INTF_SETUP_REQ_MSB 16 +#define USB_INTF_SETUP_REQ_LSB 16 +#define USB_INTF_SETUP_REQ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_DEV_RESUME_FROM_HOST +// Description : Set when the device receives a resume from the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTF_DEV_RESUME_FROM_HOST_RESET 0x0 +#define USB_INTF_DEV_RESUME_FROM_HOST_BITS 0x00008000 +#define USB_INTF_DEV_RESUME_FROM_HOST_MSB 15 +#define USB_INTF_DEV_RESUME_FROM_HOST_LSB 15 +#define USB_INTF_DEV_RESUME_FROM_HOST_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_DEV_SUSPEND +// Description : Set when the device suspend state changes. Cleared by writing +// to SIE_STATUS.SUSPENDED +#define USB_INTF_DEV_SUSPEND_RESET 0x0 +#define USB_INTF_DEV_SUSPEND_BITS 0x00004000 +#define USB_INTF_DEV_SUSPEND_MSB 14 +#define USB_INTF_DEV_SUSPEND_LSB 14 +#define USB_INTF_DEV_SUSPEND_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_DEV_CONN_DIS +// Description : Set when the device connection state changes. Cleared by +// writing to SIE_STATUS.CONNECTED +#define USB_INTF_DEV_CONN_DIS_RESET 0x0 +#define USB_INTF_DEV_CONN_DIS_BITS 0x00002000 +#define USB_INTF_DEV_CONN_DIS_MSB 13 +#define USB_INTF_DEV_CONN_DIS_LSB 13 +#define USB_INTF_DEV_CONN_DIS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_BUS_RESET +// Description : Source: SIE_STATUS.BUS_RESET +#define USB_INTF_BUS_RESET_RESET 0x0 +#define USB_INTF_BUS_RESET_BITS 0x00001000 +#define USB_INTF_BUS_RESET_MSB 12 +#define USB_INTF_BUS_RESET_LSB 12 +#define USB_INTF_BUS_RESET_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_VBUS_DETECT +// Description : Source: SIE_STATUS.VBUS_DETECT +#define USB_INTF_VBUS_DETECT_RESET 0x0 +#define USB_INTF_VBUS_DETECT_BITS 0x00000800 +#define USB_INTF_VBUS_DETECT_MSB 11 +#define USB_INTF_VBUS_DETECT_LSB 11 +#define USB_INTF_VBUS_DETECT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_STALL +// Description : Source: SIE_STATUS.STALL_REC +#define USB_INTF_STALL_RESET 0x0 +#define USB_INTF_STALL_BITS 0x00000400 +#define USB_INTF_STALL_MSB 10 +#define USB_INTF_STALL_LSB 10 +#define USB_INTF_STALL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_ERROR_CRC +// Description : Source: SIE_STATUS.CRC_ERROR +#define USB_INTF_ERROR_CRC_RESET 0x0 +#define USB_INTF_ERROR_CRC_BITS 0x00000200 +#define USB_INTF_ERROR_CRC_MSB 9 +#define USB_INTF_ERROR_CRC_LSB 9 +#define USB_INTF_ERROR_CRC_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_ERROR_BIT_STUFF +// Description : Source: SIE_STATUS.BIT_STUFF_ERROR +#define USB_INTF_ERROR_BIT_STUFF_RESET 0x0 +#define USB_INTF_ERROR_BIT_STUFF_BITS 0x00000100 +#define USB_INTF_ERROR_BIT_STUFF_MSB 8 +#define USB_INTF_ERROR_BIT_STUFF_LSB 8 +#define USB_INTF_ERROR_BIT_STUFF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_ERROR_RX_OVERFLOW +// Description : Source: SIE_STATUS.RX_OVERFLOW +#define USB_INTF_ERROR_RX_OVERFLOW_RESET 0x0 +#define USB_INTF_ERROR_RX_OVERFLOW_BITS 0x00000080 +#define USB_INTF_ERROR_RX_OVERFLOW_MSB 7 +#define USB_INTF_ERROR_RX_OVERFLOW_LSB 7 +#define USB_INTF_ERROR_RX_OVERFLOW_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_ERROR_RX_TIMEOUT +// Description : Source: SIE_STATUS.RX_TIMEOUT +#define USB_INTF_ERROR_RX_TIMEOUT_RESET 0x0 +#define USB_INTF_ERROR_RX_TIMEOUT_BITS 0x00000040 +#define USB_INTF_ERROR_RX_TIMEOUT_MSB 6 +#define USB_INTF_ERROR_RX_TIMEOUT_LSB 6 +#define USB_INTF_ERROR_RX_TIMEOUT_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_ERROR_DATA_SEQ +// Description : Source: SIE_STATUS.DATA_SEQ_ERROR +#define USB_INTF_ERROR_DATA_SEQ_RESET 0x0 +#define USB_INTF_ERROR_DATA_SEQ_BITS 0x00000020 +#define USB_INTF_ERROR_DATA_SEQ_MSB 5 +#define USB_INTF_ERROR_DATA_SEQ_LSB 5 +#define USB_INTF_ERROR_DATA_SEQ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_BUFF_STATUS +// Description : Raised when any bit in BUFF_STATUS is set. Clear by clearing +// all bits in BUFF_STATUS. +#define USB_INTF_BUFF_STATUS_RESET 0x0 +#define USB_INTF_BUFF_STATUS_BITS 0x00000010 +#define USB_INTF_BUFF_STATUS_MSB 4 +#define USB_INTF_BUFF_STATUS_LSB 4 +#define USB_INTF_BUFF_STATUS_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_TRANS_COMPLETE +// Description : Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by +// writing to this bit. +#define USB_INTF_TRANS_COMPLETE_RESET 0x0 +#define USB_INTF_TRANS_COMPLETE_BITS 0x00000008 +#define USB_INTF_TRANS_COMPLETE_MSB 3 +#define USB_INTF_TRANS_COMPLETE_LSB 3 +#define USB_INTF_TRANS_COMPLETE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_HOST_SOF +// Description : Host: raised every time the host sends a SOF (Start of Frame). +// Cleared by reading SOF_RD +#define USB_INTF_HOST_SOF_RESET 0x0 +#define USB_INTF_HOST_SOF_BITS 0x00000004 +#define USB_INTF_HOST_SOF_MSB 2 +#define USB_INTF_HOST_SOF_LSB 2 +#define USB_INTF_HOST_SOF_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_HOST_RESUME +// Description : Host: raised when a device wakes up the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTF_HOST_RESUME_RESET 0x0 +#define USB_INTF_HOST_RESUME_BITS 0x00000002 +#define USB_INTF_HOST_RESUME_MSB 1 +#define USB_INTF_HOST_RESUME_LSB 1 +#define USB_INTF_HOST_RESUME_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : USB_INTF_HOST_CONN_DIS +// Description : Host: raised when a device is connected or disconnected (i.e. +// when SIE_STATUS.SPEED changes). Cleared by writing to +// SIE_STATUS.SPEED +#define USB_INTF_HOST_CONN_DIS_RESET 0x0 +#define USB_INTF_HOST_CONN_DIS_BITS 0x00000001 +#define USB_INTF_HOST_CONN_DIS_MSB 0 +#define USB_INTF_HOST_CONN_DIS_LSB 0 +#define USB_INTF_HOST_CONN_DIS_ACCESS "RW" +// ============================================================================= +// Register : USB_INTS +// Description : Interrupt status after masking & forcing +#define USB_INTS_OFFSET 0x00000098 +#define USB_INTS_BITS 0x000fffff +#define USB_INTS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : USB_INTS_EP_STALL_NAK +// Description : Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by +// clearing all bits in EP_STATUS_STALL_NAK. +#define USB_INTS_EP_STALL_NAK_RESET 0x0 +#define USB_INTS_EP_STALL_NAK_BITS 0x00080000 +#define USB_INTS_EP_STALL_NAK_MSB 19 +#define USB_INTS_EP_STALL_NAK_LSB 19 +#define USB_INTS_EP_STALL_NAK_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_ABORT_DONE +// Description : Raised when any bit in ABORT_DONE is set. Clear by clearing all +// bits in ABORT_DONE. +#define USB_INTS_ABORT_DONE_RESET 0x0 +#define USB_INTS_ABORT_DONE_BITS 0x00040000 +#define USB_INTS_ABORT_DONE_MSB 18 +#define USB_INTS_ABORT_DONE_LSB 18 +#define USB_INTS_ABORT_DONE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_DEV_SOF +// Description : Set every time the device receives a SOF (Start of Frame) +// packet. Cleared by reading SOF_RD +#define USB_INTS_DEV_SOF_RESET 0x0 +#define USB_INTS_DEV_SOF_BITS 0x00020000 +#define USB_INTS_DEV_SOF_MSB 17 +#define USB_INTS_DEV_SOF_LSB 17 +#define USB_INTS_DEV_SOF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_SETUP_REQ +// Description : Device. Source: SIE_STATUS.SETUP_REC +#define USB_INTS_SETUP_REQ_RESET 0x0 +#define USB_INTS_SETUP_REQ_BITS 0x00010000 +#define USB_INTS_SETUP_REQ_MSB 16 +#define USB_INTS_SETUP_REQ_LSB 16 +#define USB_INTS_SETUP_REQ_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_DEV_RESUME_FROM_HOST +// Description : Set when the device receives a resume from the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTS_DEV_RESUME_FROM_HOST_RESET 0x0 +#define USB_INTS_DEV_RESUME_FROM_HOST_BITS 0x00008000 +#define USB_INTS_DEV_RESUME_FROM_HOST_MSB 15 +#define USB_INTS_DEV_RESUME_FROM_HOST_LSB 15 +#define USB_INTS_DEV_RESUME_FROM_HOST_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_DEV_SUSPEND +// Description : Set when the device suspend state changes. Cleared by writing +// to SIE_STATUS.SUSPENDED +#define USB_INTS_DEV_SUSPEND_RESET 0x0 +#define USB_INTS_DEV_SUSPEND_BITS 0x00004000 +#define USB_INTS_DEV_SUSPEND_MSB 14 +#define USB_INTS_DEV_SUSPEND_LSB 14 +#define USB_INTS_DEV_SUSPEND_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_DEV_CONN_DIS +// Description : Set when the device connection state changes. Cleared by +// writing to SIE_STATUS.CONNECTED +#define USB_INTS_DEV_CONN_DIS_RESET 0x0 +#define USB_INTS_DEV_CONN_DIS_BITS 0x00002000 +#define USB_INTS_DEV_CONN_DIS_MSB 13 +#define USB_INTS_DEV_CONN_DIS_LSB 13 +#define USB_INTS_DEV_CONN_DIS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_BUS_RESET +// Description : Source: SIE_STATUS.BUS_RESET +#define USB_INTS_BUS_RESET_RESET 0x0 +#define USB_INTS_BUS_RESET_BITS 0x00001000 +#define USB_INTS_BUS_RESET_MSB 12 +#define USB_INTS_BUS_RESET_LSB 12 +#define USB_INTS_BUS_RESET_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_VBUS_DETECT +// Description : Source: SIE_STATUS.VBUS_DETECT +#define USB_INTS_VBUS_DETECT_RESET 0x0 +#define USB_INTS_VBUS_DETECT_BITS 0x00000800 +#define USB_INTS_VBUS_DETECT_MSB 11 +#define USB_INTS_VBUS_DETECT_LSB 11 +#define USB_INTS_VBUS_DETECT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_STALL +// Description : Source: SIE_STATUS.STALL_REC +#define USB_INTS_STALL_RESET 0x0 +#define USB_INTS_STALL_BITS 0x00000400 +#define USB_INTS_STALL_MSB 10 +#define USB_INTS_STALL_LSB 10 +#define USB_INTS_STALL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_ERROR_CRC +// Description : Source: SIE_STATUS.CRC_ERROR +#define USB_INTS_ERROR_CRC_RESET 0x0 +#define USB_INTS_ERROR_CRC_BITS 0x00000200 +#define USB_INTS_ERROR_CRC_MSB 9 +#define USB_INTS_ERROR_CRC_LSB 9 +#define USB_INTS_ERROR_CRC_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_ERROR_BIT_STUFF +// Description : Source: SIE_STATUS.BIT_STUFF_ERROR +#define USB_INTS_ERROR_BIT_STUFF_RESET 0x0 +#define USB_INTS_ERROR_BIT_STUFF_BITS 0x00000100 +#define USB_INTS_ERROR_BIT_STUFF_MSB 8 +#define USB_INTS_ERROR_BIT_STUFF_LSB 8 +#define USB_INTS_ERROR_BIT_STUFF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_ERROR_RX_OVERFLOW +// Description : Source: SIE_STATUS.RX_OVERFLOW +#define USB_INTS_ERROR_RX_OVERFLOW_RESET 0x0 +#define USB_INTS_ERROR_RX_OVERFLOW_BITS 0x00000080 +#define USB_INTS_ERROR_RX_OVERFLOW_MSB 7 +#define USB_INTS_ERROR_RX_OVERFLOW_LSB 7 +#define USB_INTS_ERROR_RX_OVERFLOW_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_ERROR_RX_TIMEOUT +// Description : Source: SIE_STATUS.RX_TIMEOUT +#define USB_INTS_ERROR_RX_TIMEOUT_RESET 0x0 +#define USB_INTS_ERROR_RX_TIMEOUT_BITS 0x00000040 +#define USB_INTS_ERROR_RX_TIMEOUT_MSB 6 +#define USB_INTS_ERROR_RX_TIMEOUT_LSB 6 +#define USB_INTS_ERROR_RX_TIMEOUT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_ERROR_DATA_SEQ +// Description : Source: SIE_STATUS.DATA_SEQ_ERROR +#define USB_INTS_ERROR_DATA_SEQ_RESET 0x0 +#define USB_INTS_ERROR_DATA_SEQ_BITS 0x00000020 +#define USB_INTS_ERROR_DATA_SEQ_MSB 5 +#define USB_INTS_ERROR_DATA_SEQ_LSB 5 +#define USB_INTS_ERROR_DATA_SEQ_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_BUFF_STATUS +// Description : Raised when any bit in BUFF_STATUS is set. Clear by clearing +// all bits in BUFF_STATUS. +#define USB_INTS_BUFF_STATUS_RESET 0x0 +#define USB_INTS_BUFF_STATUS_BITS 0x00000010 +#define USB_INTS_BUFF_STATUS_MSB 4 +#define USB_INTS_BUFF_STATUS_LSB 4 +#define USB_INTS_BUFF_STATUS_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_TRANS_COMPLETE +// Description : Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by +// writing to this bit. +#define USB_INTS_TRANS_COMPLETE_RESET 0x0 +#define USB_INTS_TRANS_COMPLETE_BITS 0x00000008 +#define USB_INTS_TRANS_COMPLETE_MSB 3 +#define USB_INTS_TRANS_COMPLETE_LSB 3 +#define USB_INTS_TRANS_COMPLETE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_HOST_SOF +// Description : Host: raised every time the host sends a SOF (Start of Frame). +// Cleared by reading SOF_RD +#define USB_INTS_HOST_SOF_RESET 0x0 +#define USB_INTS_HOST_SOF_BITS 0x00000004 +#define USB_INTS_HOST_SOF_MSB 2 +#define USB_INTS_HOST_SOF_LSB 2 +#define USB_INTS_HOST_SOF_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_HOST_RESUME +// Description : Host: raised when a device wakes up the host. Cleared by +// writing to SIE_STATUS.RESUME +#define USB_INTS_HOST_RESUME_RESET 0x0 +#define USB_INTS_HOST_RESUME_BITS 0x00000002 +#define USB_INTS_HOST_RESUME_MSB 1 +#define USB_INTS_HOST_RESUME_LSB 1 +#define USB_INTS_HOST_RESUME_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : USB_INTS_HOST_CONN_DIS +// Description : Host: raised when a device is connected or disconnected (i.e. +// when SIE_STATUS.SPEED changes). Cleared by writing to +// SIE_STATUS.SPEED +#define USB_INTS_HOST_CONN_DIS_RESET 0x0 +#define USB_INTS_HOST_CONN_DIS_BITS 0x00000001 +#define USB_INTS_HOST_CONN_DIS_MSB 0 +#define USB_INTS_HOST_CONN_DIS_LSB 0 +#define USB_INTS_HOST_CONN_DIS_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_USB_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/vreg_and_chip_reset.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/vreg_and_chip_reset.h new file mode 100644 index 0000000000..34ca1ba5c0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/vreg_and_chip_reset.h @@ -0,0 +1,151 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : VREG_AND_CHIP_RESET +// Version : 1 +// Bus type : apb +// Description : control and status for on-chip voltage regulator and chip +// level reset subsystem +// ============================================================================= +#ifndef HARDWARE_REGS_VREG_AND_CHIP_RESET_DEFINED +#define HARDWARE_REGS_VREG_AND_CHIP_RESET_DEFINED +// ============================================================================= +// Register : VREG_AND_CHIP_RESET_VREG +// Description : Voltage regulator control and status +#define VREG_AND_CHIP_RESET_VREG_OFFSET 0x00000000 +#define VREG_AND_CHIP_RESET_VREG_BITS 0x000010f3 +#define VREG_AND_CHIP_RESET_VREG_RESET 0x000000b1 +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_VREG_ROK +// Description : regulation status +// 0=not in regulation, 1=in regulation +#define VREG_AND_CHIP_RESET_VREG_ROK_RESET 0x0 +#define VREG_AND_CHIP_RESET_VREG_ROK_BITS 0x00001000 +#define VREG_AND_CHIP_RESET_VREG_ROK_MSB 12 +#define VREG_AND_CHIP_RESET_VREG_ROK_LSB 12 +#define VREG_AND_CHIP_RESET_VREG_ROK_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_VREG_VSEL +// Description : output voltage select +// 0000 to 0101 - 0.80V +// 0110 - 0.85V +// 0111 - 0.90V +// 1000 - 0.95V +// 1001 - 1.00V +// 1010 - 1.05V +// 1011 - 1.10V (default) +// 1100 - 1.15V +// 1101 - 1.20V +// 1110 - 1.25V +// 1111 - 1.30V +#define VREG_AND_CHIP_RESET_VREG_VSEL_RESET 0xb +#define VREG_AND_CHIP_RESET_VREG_VSEL_BITS 0x000000f0 +#define VREG_AND_CHIP_RESET_VREG_VSEL_MSB 7 +#define VREG_AND_CHIP_RESET_VREG_VSEL_LSB 4 +#define VREG_AND_CHIP_RESET_VREG_VSEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_VREG_HIZ +// Description : high impedance mode select +// 0=not in high impedance mode, 1=in high impedance mode +#define VREG_AND_CHIP_RESET_VREG_HIZ_RESET 0x0 +#define VREG_AND_CHIP_RESET_VREG_HIZ_BITS 0x00000002 +#define VREG_AND_CHIP_RESET_VREG_HIZ_MSB 1 +#define VREG_AND_CHIP_RESET_VREG_HIZ_LSB 1 +#define VREG_AND_CHIP_RESET_VREG_HIZ_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_VREG_EN +// Description : enable +// 0=not enabled, 1=enabled +#define VREG_AND_CHIP_RESET_VREG_EN_RESET 0x1 +#define VREG_AND_CHIP_RESET_VREG_EN_BITS 0x00000001 +#define VREG_AND_CHIP_RESET_VREG_EN_MSB 0 +#define VREG_AND_CHIP_RESET_VREG_EN_LSB 0 +#define VREG_AND_CHIP_RESET_VREG_EN_ACCESS "RW" +// ============================================================================= +// Register : VREG_AND_CHIP_RESET_BOD +// Description : brown-out detection control +#define VREG_AND_CHIP_RESET_BOD_OFFSET 0x00000004 +#define VREG_AND_CHIP_RESET_BOD_BITS 0x000000f1 +#define VREG_AND_CHIP_RESET_BOD_RESET 0x00000091 +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_BOD_VSEL +// Description : threshold select +// 0000 - 0.473V +// 0001 - 0.516V +// 0010 - 0.559V +// 0011 - 0.602V +// 0100 - 0.645V +// 0101 - 0.688V +// 0110 - 0.731V +// 0111 - 0.774V +// 1000 - 0.817V +// 1001 - 0.860V (default) +// 1010 - 0.903V +// 1011 - 0.946V +// 1100 - 0.989V +// 1101 - 1.032V +// 1110 - 1.075V +// 1111 - 1.118V +#define VREG_AND_CHIP_RESET_BOD_VSEL_RESET 0x9 +#define VREG_AND_CHIP_RESET_BOD_VSEL_BITS 0x000000f0 +#define VREG_AND_CHIP_RESET_BOD_VSEL_MSB 7 +#define VREG_AND_CHIP_RESET_BOD_VSEL_LSB 4 +#define VREG_AND_CHIP_RESET_BOD_VSEL_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_BOD_EN +// Description : enable +// 0=not enabled, 1=enabled +#define VREG_AND_CHIP_RESET_BOD_EN_RESET 0x1 +#define VREG_AND_CHIP_RESET_BOD_EN_BITS 0x00000001 +#define VREG_AND_CHIP_RESET_BOD_EN_MSB 0 +#define VREG_AND_CHIP_RESET_BOD_EN_LSB 0 +#define VREG_AND_CHIP_RESET_BOD_EN_ACCESS "RW" +// ============================================================================= +// Register : VREG_AND_CHIP_RESET_CHIP_RESET +// Description : Chip reset control and status +#define VREG_AND_CHIP_RESET_CHIP_RESET_OFFSET 0x00000008 +#define VREG_AND_CHIP_RESET_CHIP_RESET_BITS 0x01110100 +#define VREG_AND_CHIP_RESET_CHIP_RESET_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_CHIP_RESET_PSM_RESTART_FLAG +// Description : This is set by psm_restart from the debugger. +// Its purpose is to branch bootcode to a safe mode when the +// debugger has issued a psm_restart in order to recover from a +// boot lock-up. +// In the safe mode the debugger can repair the boot code, clear +// this flag then reboot the processor. +#define VREG_AND_CHIP_RESET_CHIP_RESET_PSM_RESTART_FLAG_RESET 0x0 +#define VREG_AND_CHIP_RESET_CHIP_RESET_PSM_RESTART_FLAG_BITS 0x01000000 +#define VREG_AND_CHIP_RESET_CHIP_RESET_PSM_RESTART_FLAG_MSB 24 +#define VREG_AND_CHIP_RESET_CHIP_RESET_PSM_RESTART_FLAG_LSB 24 +#define VREG_AND_CHIP_RESET_CHIP_RESET_PSM_RESTART_FLAG_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART +// Description : Last reset was from the debug port +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_RESET 0x0 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_BITS 0x00100000 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_MSB 20 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_LSB 20 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN +// Description : Last reset was from the RUN pin +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_RESET 0x0 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_BITS 0x00010000 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_MSB 16 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_LSB 16 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR +// Description : Last reset was from the power-on reset or brown-out detection +// blocks +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_RESET 0x0 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_BITS 0x00000100 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_MSB 8 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_LSB 8 +#define VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_ACCESS "RO" +// ============================================================================= +#endif // HARDWARE_REGS_VREG_AND_CHIP_RESET_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/watchdog.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/watchdog.h new file mode 100644 index 0000000000..f415c9c25e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/watchdog.h @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : WATCHDOG +// Version : 1 +// Bus type : apb +// Description : None +// ============================================================================= +#ifndef HARDWARE_REGS_WATCHDOG_DEFINED +#define HARDWARE_REGS_WATCHDOG_DEFINED +// ============================================================================= +// Register : WATCHDOG_CTRL +// Description : Watchdog control +// The rst_wdsel register determines which subsystems are reset +// when the watchdog is triggered. +// The watchdog can be triggered in software. +#define WATCHDOG_CTRL_OFFSET 0x00000000 +#define WATCHDOG_CTRL_BITS 0xc7ffffff +#define WATCHDOG_CTRL_RESET 0x07000000 +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_CTRL_TRIGGER +// Description : Trigger a watchdog reset +#define WATCHDOG_CTRL_TRIGGER_RESET 0x0 +#define WATCHDOG_CTRL_TRIGGER_BITS 0x80000000 +#define WATCHDOG_CTRL_TRIGGER_MSB 31 +#define WATCHDOG_CTRL_TRIGGER_LSB 31 +#define WATCHDOG_CTRL_TRIGGER_ACCESS "SC" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_CTRL_ENABLE +// Description : When not enabled the watchdog timer is paused +#define WATCHDOG_CTRL_ENABLE_RESET 0x0 +#define WATCHDOG_CTRL_ENABLE_BITS 0x40000000 +#define WATCHDOG_CTRL_ENABLE_MSB 30 +#define WATCHDOG_CTRL_ENABLE_LSB 30 +#define WATCHDOG_CTRL_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_CTRL_PAUSE_DBG1 +// Description : Pause the watchdog timer when processor 1 is in debug mode +#define WATCHDOG_CTRL_PAUSE_DBG1_RESET 0x1 +#define WATCHDOG_CTRL_PAUSE_DBG1_BITS 0x04000000 +#define WATCHDOG_CTRL_PAUSE_DBG1_MSB 26 +#define WATCHDOG_CTRL_PAUSE_DBG1_LSB 26 +#define WATCHDOG_CTRL_PAUSE_DBG1_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_CTRL_PAUSE_DBG0 +// Description : Pause the watchdog timer when processor 0 is in debug mode +#define WATCHDOG_CTRL_PAUSE_DBG0_RESET 0x1 +#define WATCHDOG_CTRL_PAUSE_DBG0_BITS 0x02000000 +#define WATCHDOG_CTRL_PAUSE_DBG0_MSB 25 +#define WATCHDOG_CTRL_PAUSE_DBG0_LSB 25 +#define WATCHDOG_CTRL_PAUSE_DBG0_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_CTRL_PAUSE_JTAG +// Description : Pause the watchdog timer when JTAG is accessing the bus fabric +#define WATCHDOG_CTRL_PAUSE_JTAG_RESET 0x1 +#define WATCHDOG_CTRL_PAUSE_JTAG_BITS 0x01000000 +#define WATCHDOG_CTRL_PAUSE_JTAG_MSB 24 +#define WATCHDOG_CTRL_PAUSE_JTAG_LSB 24 +#define WATCHDOG_CTRL_PAUSE_JTAG_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_CTRL_TIME +// Description : Indicates the number of ticks / 2 (see errata RP2040-E1) before +// a watchdog reset will be triggered +#define WATCHDOG_CTRL_TIME_RESET 0x000000 +#define WATCHDOG_CTRL_TIME_BITS 0x00ffffff +#define WATCHDOG_CTRL_TIME_MSB 23 +#define WATCHDOG_CTRL_TIME_LSB 0 +#define WATCHDOG_CTRL_TIME_ACCESS "RO" +// ============================================================================= +// Register : WATCHDOG_LOAD +// Description : Load the watchdog timer. The maximum setting is 0xffffff which +// corresponds to 0xffffff / 2 ticks before triggering a watchdog +// reset (see errata RP2040-E1). +#define WATCHDOG_LOAD_OFFSET 0x00000004 +#define WATCHDOG_LOAD_BITS 0x00ffffff +#define WATCHDOG_LOAD_RESET 0x00000000 +#define WATCHDOG_LOAD_MSB 23 +#define WATCHDOG_LOAD_LSB 0 +#define WATCHDOG_LOAD_ACCESS "WF" +// ============================================================================= +// Register : WATCHDOG_REASON +// Description : Logs the reason for the last reset. Both bits are zero for the +// case of a hardware reset. +#define WATCHDOG_REASON_OFFSET 0x00000008 +#define WATCHDOG_REASON_BITS 0x00000003 +#define WATCHDOG_REASON_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_REASON_FORCE +// Description : None +#define WATCHDOG_REASON_FORCE_RESET 0x0 +#define WATCHDOG_REASON_FORCE_BITS 0x00000002 +#define WATCHDOG_REASON_FORCE_MSB 1 +#define WATCHDOG_REASON_FORCE_LSB 1 +#define WATCHDOG_REASON_FORCE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_REASON_TIMER +// Description : None +#define WATCHDOG_REASON_TIMER_RESET 0x0 +#define WATCHDOG_REASON_TIMER_BITS 0x00000001 +#define WATCHDOG_REASON_TIMER_MSB 0 +#define WATCHDOG_REASON_TIMER_LSB 0 +#define WATCHDOG_REASON_TIMER_ACCESS "RO" +// ============================================================================= +// Register : WATCHDOG_SCRATCH0 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH0_OFFSET 0x0000000c +#define WATCHDOG_SCRATCH0_BITS 0xffffffff +#define WATCHDOG_SCRATCH0_RESET 0x00000000 +#define WATCHDOG_SCRATCH0_MSB 31 +#define WATCHDOG_SCRATCH0_LSB 0 +#define WATCHDOG_SCRATCH0_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH1 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH1_OFFSET 0x00000010 +#define WATCHDOG_SCRATCH1_BITS 0xffffffff +#define WATCHDOG_SCRATCH1_RESET 0x00000000 +#define WATCHDOG_SCRATCH1_MSB 31 +#define WATCHDOG_SCRATCH1_LSB 0 +#define WATCHDOG_SCRATCH1_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH2 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH2_OFFSET 0x00000014 +#define WATCHDOG_SCRATCH2_BITS 0xffffffff +#define WATCHDOG_SCRATCH2_RESET 0x00000000 +#define WATCHDOG_SCRATCH2_MSB 31 +#define WATCHDOG_SCRATCH2_LSB 0 +#define WATCHDOG_SCRATCH2_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH3 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH3_OFFSET 0x00000018 +#define WATCHDOG_SCRATCH3_BITS 0xffffffff +#define WATCHDOG_SCRATCH3_RESET 0x00000000 +#define WATCHDOG_SCRATCH3_MSB 31 +#define WATCHDOG_SCRATCH3_LSB 0 +#define WATCHDOG_SCRATCH3_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH4 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH4_OFFSET 0x0000001c +#define WATCHDOG_SCRATCH4_BITS 0xffffffff +#define WATCHDOG_SCRATCH4_RESET 0x00000000 +#define WATCHDOG_SCRATCH4_MSB 31 +#define WATCHDOG_SCRATCH4_LSB 0 +#define WATCHDOG_SCRATCH4_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH5 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH5_OFFSET 0x00000020 +#define WATCHDOG_SCRATCH5_BITS 0xffffffff +#define WATCHDOG_SCRATCH5_RESET 0x00000000 +#define WATCHDOG_SCRATCH5_MSB 31 +#define WATCHDOG_SCRATCH5_LSB 0 +#define WATCHDOG_SCRATCH5_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH6 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH6_OFFSET 0x00000024 +#define WATCHDOG_SCRATCH6_BITS 0xffffffff +#define WATCHDOG_SCRATCH6_RESET 0x00000000 +#define WATCHDOG_SCRATCH6_MSB 31 +#define WATCHDOG_SCRATCH6_LSB 0 +#define WATCHDOG_SCRATCH6_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_SCRATCH7 +// Description : Scratch register. Information persists through soft reset of +// the chip. +#define WATCHDOG_SCRATCH7_OFFSET 0x00000028 +#define WATCHDOG_SCRATCH7_BITS 0xffffffff +#define WATCHDOG_SCRATCH7_RESET 0x00000000 +#define WATCHDOG_SCRATCH7_MSB 31 +#define WATCHDOG_SCRATCH7_LSB 0 +#define WATCHDOG_SCRATCH7_ACCESS "RW" +// ============================================================================= +// Register : WATCHDOG_TICK +// Description : Controls the tick generator +#define WATCHDOG_TICK_OFFSET 0x0000002c +#define WATCHDOG_TICK_BITS 0x000fffff +#define WATCHDOG_TICK_RESET 0x00000200 +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_TICK_COUNT +// Description : Count down timer: the remaining number clk_tick cycles before +// the next tick is generated. +#define WATCHDOG_TICK_COUNT_RESET "-" +#define WATCHDOG_TICK_COUNT_BITS 0x000ff800 +#define WATCHDOG_TICK_COUNT_MSB 19 +#define WATCHDOG_TICK_COUNT_LSB 11 +#define WATCHDOG_TICK_COUNT_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_TICK_RUNNING +// Description : Is the tick generator running? +#define WATCHDOG_TICK_RUNNING_RESET "-" +#define WATCHDOG_TICK_RUNNING_BITS 0x00000400 +#define WATCHDOG_TICK_RUNNING_MSB 10 +#define WATCHDOG_TICK_RUNNING_LSB 10 +#define WATCHDOG_TICK_RUNNING_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_TICK_ENABLE +// Description : start / stop tick generation +#define WATCHDOG_TICK_ENABLE_RESET 0x1 +#define WATCHDOG_TICK_ENABLE_BITS 0x00000200 +#define WATCHDOG_TICK_ENABLE_MSB 9 +#define WATCHDOG_TICK_ENABLE_LSB 9 +#define WATCHDOG_TICK_ENABLE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : WATCHDOG_TICK_CYCLES +// Description : Total number of clk_tick cycles before the next tick. +#define WATCHDOG_TICK_CYCLES_RESET 0x000 +#define WATCHDOG_TICK_CYCLES_BITS 0x000001ff +#define WATCHDOG_TICK_CYCLES_MSB 8 +#define WATCHDOG_TICK_CYCLES_LSB 0 +#define WATCHDOG_TICK_CYCLES_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_WATCHDOG_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xip.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xip.h new file mode 100644 index 0000000000..59487e4604 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xip.h @@ -0,0 +1,187 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : XIP +// Version : 1 +// Bus type : ahb +// Description : QSPI flash execute-in-place block +// ============================================================================= +#ifndef HARDWARE_REGS_XIP_DEFINED +#define HARDWARE_REGS_XIP_DEFINED +// ============================================================================= +// Register : XIP_CTRL +// Description : Cache control +#define XIP_CTRL_OFFSET 0x00000000 +#define XIP_CTRL_BITS 0x0000000b +#define XIP_CTRL_RESET 0x00000003 +// ----------------------------------------------------------------------------- +// Field : XIP_CTRL_POWER_DOWN +// Description : When 1, the cache memories are powered down. They retain state, +// but can not be accessed. This reduces static power dissipation. +// Writing 1 to this bit forces CTRL_EN to 0, i.e. the cache +// cannot +// be enabled when powered down. +// Cache-as-SRAM accesses will produce a bus error response when +// the cache is powered down. +#define XIP_CTRL_POWER_DOWN_RESET 0x0 +#define XIP_CTRL_POWER_DOWN_BITS 0x00000008 +#define XIP_CTRL_POWER_DOWN_MSB 3 +#define XIP_CTRL_POWER_DOWN_LSB 3 +#define XIP_CTRL_POWER_DOWN_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : XIP_CTRL_ERR_BADWRITE +// Description : When 1, writes to any alias other than 0x0 (caching, +// allocating) +// will produce a bus fault. When 0, these writes are silently +// ignored. +// In either case, writes to the 0x0 alias will deallocate on tag +// match, +// as usual. +#define XIP_CTRL_ERR_BADWRITE_RESET 0x1 +#define XIP_CTRL_ERR_BADWRITE_BITS 0x00000002 +#define XIP_CTRL_ERR_BADWRITE_MSB 1 +#define XIP_CTRL_ERR_BADWRITE_LSB 1 +#define XIP_CTRL_ERR_BADWRITE_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : XIP_CTRL_EN +// Description : When 1, enable the cache. When the cache is disabled, all XIP +// accesses +// will go straight to the flash, without querying the cache. When +// enabled, +// cacheable XIP accesses will query the cache, and the flash will +// not be accessed if the tag matches and the valid bit is set. +// +// If the cache is enabled, cache-as-SRAM accesses have no effect +// on the +// cache data RAM, and will produce a bus error response. +#define XIP_CTRL_EN_RESET 0x1 +#define XIP_CTRL_EN_BITS 0x00000001 +#define XIP_CTRL_EN_MSB 0 +#define XIP_CTRL_EN_LSB 0 +#define XIP_CTRL_EN_ACCESS "RW" +// ============================================================================= +// Register : XIP_FLUSH +// Description : Cache Flush control +// Write 1 to flush the cache. This clears the tag memory, but +// the data memory retains its contents. (This means cache-as-SRAM +// contents is not affected by flush or reset.) +// Reading will hold the bus (stall the processor) until the flush +// completes. Alternatively STAT can be polled until completion. +#define XIP_FLUSH_OFFSET 0x00000004 +#define XIP_FLUSH_BITS 0x00000001 +#define XIP_FLUSH_RESET 0x00000000 +#define XIP_FLUSH_MSB 0 +#define XIP_FLUSH_LSB 0 +#define XIP_FLUSH_ACCESS "SC" +// ============================================================================= +// Register : XIP_STAT +// Description : Cache Status +#define XIP_STAT_OFFSET 0x00000008 +#define XIP_STAT_BITS 0x00000007 +#define XIP_STAT_RESET 0x00000002 +// ----------------------------------------------------------------------------- +// Field : XIP_STAT_FIFO_FULL +// Description : When 1, indicates the XIP streaming FIFO is completely full. +// The streaming FIFO is 2 entries deep, so the full and empty +// flag allow its level to be ascertained. +#define XIP_STAT_FIFO_FULL_RESET 0x0 +#define XIP_STAT_FIFO_FULL_BITS 0x00000004 +#define XIP_STAT_FIFO_FULL_MSB 2 +#define XIP_STAT_FIFO_FULL_LSB 2 +#define XIP_STAT_FIFO_FULL_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : XIP_STAT_FIFO_EMPTY +// Description : When 1, indicates the XIP streaming FIFO is completely empty. +#define XIP_STAT_FIFO_EMPTY_RESET 0x1 +#define XIP_STAT_FIFO_EMPTY_BITS 0x00000002 +#define XIP_STAT_FIFO_EMPTY_MSB 1 +#define XIP_STAT_FIFO_EMPTY_LSB 1 +#define XIP_STAT_FIFO_EMPTY_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : XIP_STAT_FLUSH_READY +// Description : Reads as 0 while a cache flush is in progress, and 1 otherwise. +// The cache is flushed whenever the XIP block is reset, and also +// when requested via the FLUSH register. +#define XIP_STAT_FLUSH_READY_RESET 0x0 +#define XIP_STAT_FLUSH_READY_BITS 0x00000001 +#define XIP_STAT_FLUSH_READY_MSB 0 +#define XIP_STAT_FLUSH_READY_LSB 0 +#define XIP_STAT_FLUSH_READY_ACCESS "RO" +// ============================================================================= +// Register : XIP_CTR_HIT +// Description : Cache Hit counter +// A 32 bit saturating counter that increments upon each cache +// hit, +// i.e. when an XIP access is serviced directly from cached data. +// Write any value to clear. +#define XIP_CTR_HIT_OFFSET 0x0000000c +#define XIP_CTR_HIT_BITS 0xffffffff +#define XIP_CTR_HIT_RESET 0x00000000 +#define XIP_CTR_HIT_MSB 31 +#define XIP_CTR_HIT_LSB 0 +#define XIP_CTR_HIT_ACCESS "WC" +// ============================================================================= +// Register : XIP_CTR_ACC +// Description : Cache Access counter +// A 32 bit saturating counter that increments upon each XIP +// access, +// whether the cache is hit or not. This includes noncacheable +// accesses. +// Write any value to clear. +#define XIP_CTR_ACC_OFFSET 0x00000010 +#define XIP_CTR_ACC_BITS 0xffffffff +#define XIP_CTR_ACC_RESET 0x00000000 +#define XIP_CTR_ACC_MSB 31 +#define XIP_CTR_ACC_LSB 0 +#define XIP_CTR_ACC_ACCESS "WC" +// ============================================================================= +// Register : XIP_STREAM_ADDR +// Description : FIFO stream address +// The address of the next word to be streamed from flash to the +// streaming FIFO. +// Increments automatically after each flash access. +// Write the initial access address here before starting a +// streaming read. +#define XIP_STREAM_ADDR_OFFSET 0x00000014 +#define XIP_STREAM_ADDR_BITS 0xfffffffc +#define XIP_STREAM_ADDR_RESET 0x00000000 +#define XIP_STREAM_ADDR_MSB 31 +#define XIP_STREAM_ADDR_LSB 2 +#define XIP_STREAM_ADDR_ACCESS "RW" +// ============================================================================= +// Register : XIP_STREAM_CTR +// Description : FIFO stream control +// Write a nonzero value to start a streaming read. This will then +// progress in the background, using flash idle cycles to transfer +// a linear data block from flash to the streaming FIFO. +// Decrements automatically (1 at a time) as the stream +// progresses, and halts on reaching 0. +// Write 0 to halt an in-progress stream, and discard any +// in-flight +// read, so that a new stream can immediately be started (after +// draining the FIFO and reinitialising STREAM_ADDR) +#define XIP_STREAM_CTR_OFFSET 0x00000018 +#define XIP_STREAM_CTR_BITS 0x003fffff +#define XIP_STREAM_CTR_RESET 0x00000000 +#define XIP_STREAM_CTR_MSB 21 +#define XIP_STREAM_CTR_LSB 0 +#define XIP_STREAM_CTR_ACCESS "RW" +// ============================================================================= +// Register : XIP_STREAM_FIFO +// Description : FIFO stream data +// Streamed data is buffered here, for retrieval by the system +// DMA. +// This FIFO can also be accessed via the XIP_AUX slave, to avoid +// exposing +// the DMA to bus stalls caused by other XIP traffic. +#define XIP_STREAM_FIFO_OFFSET 0x0000001c +#define XIP_STREAM_FIFO_BITS 0xffffffff +#define XIP_STREAM_FIFO_RESET 0x00000000 +#define XIP_STREAM_FIFO_MSB 31 +#define XIP_STREAM_FIFO_LSB 0 +#define XIP_STREAM_FIFO_ACCESS "RF" +// ============================================================================= +#endif // HARDWARE_REGS_XIP_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xosc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xosc.h new file mode 100644 index 0000000000..89d036b86b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/include/hardware/regs/xosc.h @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +// ============================================================================= +// Register block : XOSC +// Version : 1 +// Bus type : apb +// Description : Controls the crystal oscillator +// ============================================================================= +#ifndef HARDWARE_REGS_XOSC_DEFINED +#define HARDWARE_REGS_XOSC_DEFINED +// ============================================================================= +// Register : XOSC_CTRL +// Description : Crystal Oscillator Control +#define XOSC_CTRL_OFFSET 0x00000000 +#define XOSC_CTRL_BITS 0x00ffffff +#define XOSC_CTRL_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : XOSC_CTRL_ENABLE +// Description : On power-up this field is initialised to DISABLE and the chip +// runs from the ROSC. +// If the chip has subsequently been programmed to run from the +// XOSC then setting this field to DISABLE may lock-up the chip. +// If this is a concern then run the clk_ref from the ROSC and +// enable the clk_sys RESUS feature. +// The 12-bit code is intended to give some protection against +// accidental writes. An invalid setting will enable the +// oscillator. +// 0xd1e -> DISABLE +// 0xfab -> ENABLE +#define XOSC_CTRL_ENABLE_RESET "-" +#define XOSC_CTRL_ENABLE_BITS 0x00fff000 +#define XOSC_CTRL_ENABLE_MSB 23 +#define XOSC_CTRL_ENABLE_LSB 12 +#define XOSC_CTRL_ENABLE_ACCESS "RW" +#define XOSC_CTRL_ENABLE_VALUE_DISABLE 0xd1e +#define XOSC_CTRL_ENABLE_VALUE_ENABLE 0xfab +// ----------------------------------------------------------------------------- +// Field : XOSC_CTRL_FREQ_RANGE +// Description : Frequency range. This resets to 0xAA0 and cannot be changed. +// 0xaa0 -> 1_15MHZ +// 0xaa1 -> RESERVED_1 +// 0xaa2 -> RESERVED_2 +// 0xaa3 -> RESERVED_3 +#define XOSC_CTRL_FREQ_RANGE_RESET "-" +#define XOSC_CTRL_FREQ_RANGE_BITS 0x00000fff +#define XOSC_CTRL_FREQ_RANGE_MSB 11 +#define XOSC_CTRL_FREQ_RANGE_LSB 0 +#define XOSC_CTRL_FREQ_RANGE_ACCESS "RW" +#define XOSC_CTRL_FREQ_RANGE_VALUE_1_15MHZ 0xaa0 +#define XOSC_CTRL_FREQ_RANGE_VALUE_RESERVED_1 0xaa1 +#define XOSC_CTRL_FREQ_RANGE_VALUE_RESERVED_2 0xaa2 +#define XOSC_CTRL_FREQ_RANGE_VALUE_RESERVED_3 0xaa3 +// ============================================================================= +// Register : XOSC_STATUS +// Description : Crystal Oscillator Status +#define XOSC_STATUS_OFFSET 0x00000004 +#define XOSC_STATUS_BITS 0x81001003 +#define XOSC_STATUS_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : XOSC_STATUS_STABLE +// Description : Oscillator is running and stable +#define XOSC_STATUS_STABLE_RESET 0x0 +#define XOSC_STATUS_STABLE_BITS 0x80000000 +#define XOSC_STATUS_STABLE_MSB 31 +#define XOSC_STATUS_STABLE_LSB 31 +#define XOSC_STATUS_STABLE_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : XOSC_STATUS_BADWRITE +// Description : An invalid value has been written to CTRL_ENABLE or +// CTRL_FREQ_RANGE or DORMANT +#define XOSC_STATUS_BADWRITE_RESET 0x0 +#define XOSC_STATUS_BADWRITE_BITS 0x01000000 +#define XOSC_STATUS_BADWRITE_MSB 24 +#define XOSC_STATUS_BADWRITE_LSB 24 +#define XOSC_STATUS_BADWRITE_ACCESS "WC" +// ----------------------------------------------------------------------------- +// Field : XOSC_STATUS_ENABLED +// Description : Oscillator is enabled but not necessarily running and stable, +// resets to 0 +#define XOSC_STATUS_ENABLED_RESET "-" +#define XOSC_STATUS_ENABLED_BITS 0x00001000 +#define XOSC_STATUS_ENABLED_MSB 12 +#define XOSC_STATUS_ENABLED_LSB 12 +#define XOSC_STATUS_ENABLED_ACCESS "RO" +// ----------------------------------------------------------------------------- +// Field : XOSC_STATUS_FREQ_RANGE +// Description : The current frequency range setting, always reads 0 +// 0x0 -> 1_15MHZ +// 0x1 -> RESERVED_1 +// 0x2 -> RESERVED_2 +// 0x3 -> RESERVED_3 +#define XOSC_STATUS_FREQ_RANGE_RESET "-" +#define XOSC_STATUS_FREQ_RANGE_BITS 0x00000003 +#define XOSC_STATUS_FREQ_RANGE_MSB 1 +#define XOSC_STATUS_FREQ_RANGE_LSB 0 +#define XOSC_STATUS_FREQ_RANGE_ACCESS "RO" +#define XOSC_STATUS_FREQ_RANGE_VALUE_1_15MHZ 0x0 +#define XOSC_STATUS_FREQ_RANGE_VALUE_RESERVED_1 0x1 +#define XOSC_STATUS_FREQ_RANGE_VALUE_RESERVED_2 0x2 +#define XOSC_STATUS_FREQ_RANGE_VALUE_RESERVED_3 0x3 +// ============================================================================= +// Register : XOSC_DORMANT +// Description : Crystal Oscillator pause control +// This is used to save power by pausing the XOSC +// On power-up this field is initialised to WAKE +// An invalid write will also select WAKE +// WARNING: stop the PLLs before selecting dormant mode +// WARNING: setup the irq before selecting dormant mode +// 0x636f6d61 -> DORMANT +// 0x77616b65 -> WAKE +#define XOSC_DORMANT_OFFSET 0x00000008 +#define XOSC_DORMANT_BITS 0xffffffff +#define XOSC_DORMANT_RESET "-" +#define XOSC_DORMANT_MSB 31 +#define XOSC_DORMANT_LSB 0 +#define XOSC_DORMANT_ACCESS "RW" +#define XOSC_DORMANT_VALUE_DORMANT 0x636f6d61 +#define XOSC_DORMANT_VALUE_WAKE 0x77616b65 +// ============================================================================= +// Register : XOSC_STARTUP +// Description : Controls the startup delay +#define XOSC_STARTUP_OFFSET 0x0000000c +#define XOSC_STARTUP_BITS 0x00103fff +#define XOSC_STARTUP_RESET 0x00000000 +// ----------------------------------------------------------------------------- +// Field : XOSC_STARTUP_X4 +// Description : Multiplies the startup_delay by 4. This is of little value to +// the user given that the delay can be programmed directly +#define XOSC_STARTUP_X4_RESET "-" +#define XOSC_STARTUP_X4_BITS 0x00100000 +#define XOSC_STARTUP_X4_MSB 20 +#define XOSC_STARTUP_X4_LSB 20 +#define XOSC_STARTUP_X4_ACCESS "RW" +// ----------------------------------------------------------------------------- +// Field : XOSC_STARTUP_DELAY +// Description : in multiples of 256*xtal_period +#define XOSC_STARTUP_DELAY_RESET "-" +#define XOSC_STARTUP_DELAY_BITS 0x00003fff +#define XOSC_STARTUP_DELAY_MSB 13 +#define XOSC_STARTUP_DELAY_LSB 0 +#define XOSC_STARTUP_DELAY_ACCESS "RW" +// ============================================================================= +// Register : XOSC_COUNT +// Description : A down counter running at the xosc frequency which counts to +// zero and stops. +// To start the counter write a non-zero value. +// Can be used for short software pauses when setting up time +// sensitive hardware. +#define XOSC_COUNT_OFFSET 0x0000001c +#define XOSC_COUNT_BITS 0x000000ff +#define XOSC_COUNT_RESET 0x00000000 +#define XOSC_COUNT_MSB 7 +#define XOSC_COUNT_LSB 0 +#define XOSC_COUNT_ACCESS "RW" +// ============================================================================= +#endif // HARDWARE_REGS_XOSC_DEFINED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/rp2040.svd b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/rp2040.svd new file mode 100644 index 0000000000..27fc1328e0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_regs/rp2040.svd @@ -0,0 +1,40366 @@ + + + + 8 + Raspberry Pi + RP2040 + + Copyright (c) 2020 Raspberry Pi (Trading) Ltd. \n + \n + SPDX-License-Identifier: BSD-3-Clause + + 0.1 + 32 + + CM0PLUS + r0p1 + little + true + false + 2 + false + 26 + + + + + 0 + 0x0020 + registers + + 0x14000000 + QSPI flash execute-in-place block + + XIP_IRQ + 6 + + XIP_CTRL + + + 0x0000 + Cache control + + + read-write + [3:3] + When 1, the cache memories are powered down. They retain state,\n + but can not be accessed. This reduces static power dissipation.\n + Writing 1 to this bit forces CTRL_EN to 0, i.e. the cache cannot\n + be enabled when powered down.\n + Cache-as-SRAM accesses will produce a bus error response when\n + the cache is powered down. + POWER_DOWN + + + read-write + [1:1] + When 1, writes to any alias other than 0x0 (caching, allocating)\n + will produce a bus fault. When 0, these writes are silently ignored.\n + In either case, writes to the 0x0 alias will deallocate on tag match,\n + as usual. + ERR_BADWRITE + + + read-write + [0:0] + When 1, enable the cache. When the cache is disabled, all XIP accesses\n + will go straight to the flash, without querying the cache. When enabled,\n + cacheable XIP accesses will query the cache, and the flash will\n + not be accessed if the tag matches and the valid bit is set.\n\n + If the cache is enabled, cache-as-SRAM accesses have no effect on the\n + cache data RAM, and will produce a bus error response. + EN + + + CTRL + 0x00000003 + + + 0x0004 + Cache Flush control + + + read-write + [0:0] + Write 1 to flush the cache. This clears the tag memory, but\n + the data memory retains its contents. (This means cache-as-SRAM\n + contents is not affected by flush or reset.)\n + Reading will hold the bus (stall the processor) until the flush\n + completes. Alternatively STAT can be polled until completion. + clear + FLUSH + + + FLUSH + 0x00000000 + + + 0x0008 + Cache Status + + + read-only + [2:2] + When 1, indicates the XIP streaming FIFO is completely full.\n + The streaming FIFO is 2 entries deep, so the full and empty\n + flag allow its level to be ascertained. + FIFO_FULL + + + read-only + [1:1] + When 1, indicates the XIP streaming FIFO is completely empty. + FIFO_EMPTY + + + read-only + [0:0] + Reads as 0 while a cache flush is in progress, and 1 otherwise.\n + The cache is flushed whenever the XIP block is reset, and also\n + when requested via the FLUSH register. + FLUSH_READY + + + STAT + 0x00000002 + + + read-write + 0x000c + Cache Hit counter\n + A 32 bit saturating counter that increments upon each cache hit,\n + i.e. when an XIP access is serviced directly from cached data.\n + Write any value to clear. + oneToClear + CTR_HIT + 0x00000000 + + + read-write + 0x0010 + Cache Access counter\n + A 32 bit saturating counter that increments upon each XIP access,\n + whether the cache is hit or not. This includes noncacheable accesses.\n + Write any value to clear. + oneToClear + CTR_ACC + 0x00000000 + + + 0x0014 + FIFO stream address + + + read-write + [31:2] + The address of the next word to be streamed from flash to the streaming FIFO.\n + Increments automatically after each flash access.\n + Write the initial access address here before starting a streaming read. + STREAM_ADDR + + + STREAM_ADDR + 0x00000000 + + + 0x0018 + FIFO stream control + + + read-write + [21:0] + Write a nonzero value to start a streaming read. This will then\n + progress in the background, using flash idle cycles to transfer\n + a linear data block from flash to the streaming FIFO.\n + Decrements automatically (1 at a time) as the stream\n + progresses, and halts on reaching 0.\n + Write 0 to halt an in-progress stream, and discard any in-flight\n + read, so that a new stream can immediately be started (after\n + draining the FIFO and reinitialising STREAM_ADDR) + STREAM_CTR + + + STREAM_CTR + 0x00000000 + + + read-only + 0x001c + FIFO stream data\n + Streamed data is buffered here, for retrieval by the system DMA.\n + This FIFO can also be accessed via the XIP_AUX slave, to avoid exposing\n + the DMA to bus stalls caused by other XIP traffic. + STREAM_FIFO + 0x00000000 + + + 32 + 1 + + + + 0 + 0x0100 + registers + + 0x18000000 + DW_apb_ssi has the following features:\n + * APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation.\n + * APB3 and APB4 protocol support.\n + * Scalable APB data bus width – Supports APB data bus widths of 8, 16, and 32 bits.\n + * Serial-master or serial-slave operation – Enables serial communication with serial-master or serial-slave peripheral devices.\n + * Programmable Dual/Quad/Octal SPI support in Master Mode.\n + * Dual Data Rate (DDR) and Read Data Strobe (RDS) Support - Enables the DW_apb_ssi master to perform operations with the device in DDR and RDS modes when working in Dual/Quad/Octal mode of operation.\n + * Data Mask Support - Enables the DW_apb_ssi to selectively update the bytes in the device. This feature is applicable only in enhanced SPI modes.\n + * eXecute-In-Place (XIP) support - Enables the DW_apb_ssi master to behave as a memory mapped I/O and fetches the data from the device based on the APB read request. This feature is applicable only in enhanced SPI modes.\n + * DMA Controller Interface – Enables the DW_apb_ssi to interface to a DMA controller over the bus using a handshaking interface for transfer requests.\n + * Independent masking of interrupts – Master collision, transmit FIFO overflow, transmit FIFO empty, receive FIFO full, receive FIFO underflow, and receive FIFO overflow interrupts can all be masked independently.\n + * Multi-master contention detection – Informs the processor of multiple serial-master accesses on the serial bus.\n + * Bypass of meta-stability flip-flops for synchronous clocks – When the APB clock (pclk) and the DW_apb_ssi serial clock (ssi_clk) are synchronous, meta-stable flip-flops are not used when transferring control signals across these clock domains.\n + * Programmable delay on the sample time of the received serial data bit (rxd); enables programmable control of routing delays resulting in higher serial data-bit rates.\n + * Programmable features:\n + - Serial interface operation – Choice of Motorola SPI, Texas Instruments Synchronous Serial Protocol or National Semiconductor Microwire.\n + - Clock bit-rate – Dynamic control of the serial bit rate of the data transfer; used in only serial-master mode of operation.\n + - Data Item size (4 to 32 bits) – Item size of each data transfer under the control of the programmer.\n + * Configured features:\n + - FIFO depth – 16 words deep. The FIFO width is fixed at 32 bits.\n + - 1 slave select output.\n + - Hardware slave-select – Dedicated hardware slave-select line.\n + - Combined interrupt line - one combined interrupt line from the DW_apb_ssi to the interrupt controller.\n + - Interrupt polarity – active high interrupt lines.\n + - Serial clock polarity – low serial-clock polarity directly after reset.\n + - Serial clock phase – capture on first edge of serial-clock directly after reset. + XIP_SSI + + + 0x0000 + Control register 0 + + + read-write + [24:24] + Slave select toggle enable + SSTE + + + read-write + [22:21] + SPI frame format + + + Standard 1-bit SPI frame format; 1 bit per SCK, full-duplex + STD + 0 + + + Dual-SPI frame format; two bits per SCK, half-duplex + DUAL + 1 + + + Quad-SPI frame format; four bits per SCK, half-duplex + QUAD + 2 + + + SPI_FRF + + + read-write + [20:16] + Data frame size in 32b transfer mode\n + Value of n -> n+1 clocks per frame. + DFS_32 + + + read-write + [15:12] + Control frame size\n + Value of n -> n+1 clocks per frame. + CFS + + + read-write + [11:11] + Shift register loop (test mode) + SRL + + + read-write + [10:10] + Slave output enable + SLV_OE + + + read-write + [9:8] + Transfer mode + + + Both transmit and receive + TX_AND_RX + 0 + + + Transmit only (not for FRF == 0, standard SPI mode) + TX_ONLY + 1 + + + Receive only (not for FRF == 0, standard SPI mode) + RX_ONLY + 2 + + + EEPROM read mode (TX then RX; RX starts after control data TX'd) + EEPROM_READ + 3 + + + TMOD + + + read-write + [7:7] + Serial clock polarity + SCPOL + + + read-write + [6:6] + Serial clock phase + SCPH + + + read-write + [5:4] + Frame format + FRF + + + read-write + [3:0] + Data frame size + DFS + + + CTRLR0 + 0x00000000 + + + 0x0004 + Master Control register 1 + + + read-write + [15:0] + Number of data frames + NDF + + + CTRLR1 + 0x00000000 + + + 0x0008 + SSI Enable + + + read-write + [0:0] + SSI enable + SSI_EN + + + SSIENR + 0x00000000 + + + 0x000c + Microwire Control + + + read-write + [2:2] + Microwire handshaking + MHS + + + read-write + [1:1] + Microwire control + MDD + + + read-write + [0:0] + Microwire transfer mode + MWMOD + + + MWCR + 0x00000000 + + + 0x0010 + Slave enable + + + read-write + [0:0] + For each bit:\n + 0 -> slave not selected\n + 1 -> slave selected + SER + + + SER + 0x00000000 + + + 0x0014 + Baud rate + + + read-write + [15:0] + SSI clock divider + SCKDV + + + BAUDR + 0x00000000 + + + 0x0018 + TX FIFO threshold level + + + read-write + [7:0] + Transmit FIFO threshold + TFT + + + TXFTLR + 0x00000000 + + + 0x001c + RX FIFO threshold level + + + read-write + [7:0] + Receive FIFO threshold + RFT + + + RXFTLR + 0x00000000 + + + 0x0020 + TX FIFO level + + + read-only + [7:0] + Transmit FIFO level + TFTFL + + + TXFLR + 0x00000000 + + + 0x0024 + RX FIFO level + + + read-only + [7:0] + Receive FIFO level + RXTFL + + + RXFLR + 0x00000000 + + + 0x0028 + Status register + + + read-only + [6:6] + Data collision error + DCOL + + + read-only + [5:5] + Transmission error + TXE + + + read-only + [4:4] + Receive FIFO full + RFF + + + read-only + [3:3] + Receive FIFO not empty + RFNE + + + read-only + [2:2] + Transmit FIFO empty + TFE + + + read-only + [1:1] + Transmit FIFO not full + TFNF + + + read-only + [0:0] + SSI busy flag + BUSY + + + SR + 0x00000000 + + + 0x002c + Interrupt mask + + + read-write + [5:5] + Multi-master contention interrupt mask + MSTIM + + + read-write + [4:4] + Receive FIFO full interrupt mask + RXFIM + + + read-write + [3:3] + Receive FIFO overflow interrupt mask + RXOIM + + + read-write + [2:2] + Receive FIFO underflow interrupt mask + RXUIM + + + read-write + [1:1] + Transmit FIFO overflow interrupt mask + TXOIM + + + read-write + [0:0] + Transmit FIFO empty interrupt mask + TXEIM + + + IMR + 0x00000000 + + + 0x0030 + Interrupt status + + + read-only + [5:5] + Multi-master contention interrupt status + MSTIS + + + read-only + [4:4] + Receive FIFO full interrupt status + RXFIS + + + read-only + [3:3] + Receive FIFO overflow interrupt status + RXOIS + + + read-only + [2:2] + Receive FIFO underflow interrupt status + RXUIS + + + read-only + [1:1] + Transmit FIFO overflow interrupt status + TXOIS + + + read-only + [0:0] + Transmit FIFO empty interrupt status + TXEIS + + + ISR + 0x00000000 + + + 0x0034 + Raw interrupt status + + + read-only + [5:5] + Multi-master contention raw interrupt status + MSTIR + + + read-only + [4:4] + Receive FIFO full raw interrupt status + RXFIR + + + read-only + [3:3] + Receive FIFO overflow raw interrupt status + RXOIR + + + read-only + [2:2] + Receive FIFO underflow raw interrupt status + RXUIR + + + read-only + [1:1] + Transmit FIFO overflow raw interrupt status + TXOIR + + + read-only + [0:0] + Transmit FIFO empty raw interrupt status + TXEIR + + + RISR + 0x00000000 + + + 0x0038 + TX FIFO overflow interrupt clear + + + read-only + [0:0] + Clear-on-read transmit FIFO overflow interrupt + TXOICR + + + TXOICR + 0x00000000 + + + 0x003c + RX FIFO overflow interrupt clear + + + read-only + [0:0] + Clear-on-read receive FIFO overflow interrupt + RXOICR + + + RXOICR + 0x00000000 + + + 0x0040 + RX FIFO underflow interrupt clear + + + read-only + [0:0] + Clear-on-read receive FIFO underflow interrupt + RXUICR + + + RXUICR + 0x00000000 + + + 0x0044 + Multi-master interrupt clear + + + read-only + [0:0] + Clear-on-read multi-master contention interrupt + MSTICR + + + MSTICR + 0x00000000 + + + 0x0048 + Interrupt clear + + + read-only + [0:0] + Clear-on-read all active interrupts + ICR + + + ICR + 0x00000000 + + + 0x004c + DMA control + + + read-write + [1:1] + Transmit DMA enable + TDMAE + + + read-write + [0:0] + Receive DMA enable + RDMAE + + + DMACR + 0x00000000 + + + 0x0050 + DMA TX data level + + + read-write + [7:0] + Transmit data watermark level + DMATDL + + + DMATDLR + 0x00000000 + + + 0x0054 + DMA RX data level + + + read-write + [7:0] + Receive data watermark level (DMARDLR+1) + DMARDL + + + DMARDLR + 0x00000000 + + + 0x0058 + Identification register + + + read-only + [31:0] + Peripheral dentification code + IDCODE + + + IDR + 0x51535049 + + + 0x005c + Version ID + + + read-only + [31:0] + SNPS component version (format X.YY) + SSI_COMP_VERSION + + + SSI_VERSION_ID + 0x3430312a + + + 0x0060 + Data Register 0 (of 36) + + + read-write + [31:0] + First data register of 36 + DR + + + DR0 + 0x00000000 + + + 0x00f0 + RX sample delay + + + read-write + [7:0] + RXD sample delay (in SCLK cycles) + RSD + + + RX_SAMPLE_DLY + 0x00000000 + + + 0x00f4 + SPI control + + + read-write + [31:24] + SPI Command to send in XIP mode (INST_L = 8-bit) or to append to Address (INST_L = 0-bit) + XIP_CMD + + + read-write + [18:18] + Read data strobe enable + SPI_RXDS_EN + + + read-write + [17:17] + Instruction DDR transfer enable + INST_DDR_EN + + + read-write + [16:16] + SPI DDR transfer enable + SPI_DDR_EN + + + read-write + [15:11] + Wait cycles between control frame transmit and data reception (in SCLK cycles) + WAIT_CYCLES + + + read-write + [9:8] + Instruction length (0/4/8/16b) + + + No instruction + NONE + 0 + + + 4-bit instruction + 4B + 1 + + + 8-bit instruction + 8B + 2 + + + 16-bit instruction + 16B + 3 + + + INST_L + + + read-write + [5:2] + Address length (0b-60b in 4b increments) + ADDR_L + + + read-write + [1:0] + Address and instruction transfer format + + + Command and address both in standard SPI frame format + 1C1A + 0 + + + Command in standard SPI format, address in format specified by FRF + 1C2A + 1 + + + Command and address both in format specified by FRF (e.g. Dual-SPI) + 2C2A + 2 + + + TRANS_TYPE + + + SPI_CTRLR0 + 0x03000000 + + + 0x00f8 + TX drive edge + + + read-write + [7:0] + TXD drive edge + TDE + + + TXD_DRIVE_EDGE + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40000000 + SYSINFO + + + 0x0000 + JEDEC JEP-106 compliant chip identifier. + + + read-only + [31:28] + REVISION + + + read-only + [27:12] + PART + + + read-only + [11:0] + MANUFACTURER + + + CHIP_ID + 0x00000000 + + + 0x0004 + Platform register. Allows software to know what environment it is running in. + + + read-only + [1:1] + ASIC + + + read-only + [0:0] + FPGA + + + PLATFORM + 0x00000000 + + + read-only + 0x0040 + Git hash of the chip source. Used to identify chip version. + GITREF_RP2040 + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40004000 + Register block for various chip control signals + SYSCFG + + + read-write + 0x0000 + Processor core 0 NMI source mask\n + Set a bit high to enable NMI from that IRQ + PROC0_NMI_MASK + 0x00000000 + + + read-write + 0x0004 + Processor core 1 NMI source mask\n + Set a bit high to enable NMI from that IRQ + PROC1_NMI_MASK + 0x00000000 + + + 0x0008 + Configuration for processors + + + read-write + [31:28] + Configure proc1 DAP instance ID.\n + Recommend that this is NOT changed until you require debug access in multi-chip environment\n + WARNING: do not set to 15 as this is reserved for RescueDP + PROC1_DAP_INSTID + + + read-write + [27:24] + Configure proc0 DAP instance ID.\n + Recommend that this is NOT changed until you require debug access in multi-chip environment\n + WARNING: do not set to 15 as this is reserved for RescueDP + PROC0_DAP_INSTID + + + read-only + [1:1] + Indication that proc1 has halted + PROC1_HALTED + + + read-only + [0:0] + Indication that proc0 has halted + PROC0_HALTED + + + PROC_CONFIG + 0x10000000 + + + 0x000c + For each bit, if 1, bypass the input synchronizer between that GPIO\n + and the GPIO input register in the SIO. The input synchronizers should\n + generally be unbypassed, to avoid injecting metastabilities into processors.\n + If you're feeling brave, you can bypass to save two cycles of input\n + latency. This register applies to GPIO 0...29. + + + read-write + [29:0] + PROC_IN_SYNC_BYPASS + + + PROC_IN_SYNC_BYPASS + 0x00000000 + + + 0x0010 + For each bit, if 1, bypass the input synchronizer between that GPIO\n + and the GPIO input register in the SIO. The input synchronizers should\n + generally be unbypassed, to avoid injecting metastabilities into processors.\n + If you're feeling brave, you can bypass to save two cycles of input\n + latency. This register applies to GPIO 30...35 (the QSPI IOs). + + + read-write + [5:0] + PROC_IN_SYNC_BYPASS_HI + + + PROC_IN_SYNC_BYPASS_HI + 0x00000000 + + + 0x0014 + Directly control the SWD debug port of either processor + + + read-write + [7:7] + Attach processor 1 debug port to syscfg controls, and disconnect it from external SWD pads. + PROC1_ATTACH + + + read-write + [6:6] + Directly drive processor 1 SWCLK, if PROC1_ATTACH is set + PROC1_SWCLK + + + read-write + [5:5] + Directly drive processor 1 SWDIO input, if PROC1_ATTACH is set + PROC1_SWDI + + + read-only + [4:4] + Observe the value of processor 1 SWDIO output. + PROC1_SWDO + + + read-write + [3:3] + Attach processor 0 debug port to syscfg controls, and disconnect it from external SWD pads. + PROC0_ATTACH + + + read-write + [2:2] + Directly drive processor 0 SWCLK, if PROC0_ATTACH is set + PROC0_SWCLK + + + read-write + [1:1] + Directly drive processor 0 SWDIO input, if PROC0_ATTACH is set + PROC0_SWDI + + + read-only + [0:0] + Observe the value of processor 0 SWDIO output. + PROC0_SWDO + + + DBGFORCE + 0x00000066 + + + 0x0018 + Control power downs to memories. Set high to power down memories.\n + Use with extreme caution + + + read-write + [7:7] + ROM + + + read-write + [6:6] + USB + + + read-write + [5:5] + SRAM5 + + + read-write + [4:4] + SRAM4 + + + read-write + [3:3] + SRAM3 + + + read-write + [2:2] + SRAM2 + + + read-write + [1:1] + SRAM1 + + + read-write + [0:0] + SRAM0 + + + MEMPOWERDOWN + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40008000 + + CLOCKS_IRQ + 17 + + CLOCKS + + + 0x0000 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [12:12] + Enables duty cycle correction for odd divisors + DC50 + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [8:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + AUXSRC + + + CLK_GPOUT0_CTRL + 0x00000000 + + + 0x0004 + Clock divisor, can be changed on-the-fly + + + read-write + [31:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + read-write + [7:0] + Fractional component of the divisor + FRAC + + + CLK_GPOUT0_DIV + 0x00000100 + + + read-only + 0x0008 + Indicates which src is currently selected (one-hot) + CLK_GPOUT0_SELECTED + 0x00000001 + + + 0x000c + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [12:12] + Enables duty cycle correction for odd divisors + DC50 + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [8:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + AUXSRC + + + CLK_GPOUT1_CTRL + 0x00000000 + + + 0x0010 + Clock divisor, can be changed on-the-fly + + + read-write + [31:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + read-write + [7:0] + Fractional component of the divisor + FRAC + + + CLK_GPOUT1_DIV + 0x00000100 + + + read-only + 0x0014 + Indicates which src is currently selected (one-hot) + CLK_GPOUT1_SELECTED + 0x00000001 + + + 0x0018 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [12:12] + Enables duty cycle correction for odd divisors + DC50 + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [8:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + AUXSRC + + + CLK_GPOUT2_CTRL + 0x00000000 + + + 0x001c + Clock divisor, can be changed on-the-fly + + + read-write + [31:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + read-write + [7:0] + Fractional component of the divisor + FRAC + + + CLK_GPOUT2_DIV + 0x00000100 + + + read-only + 0x0020 + Indicates which src is currently selected (one-hot) + CLK_GPOUT2_SELECTED + 0x00000001 + + + 0x0024 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [12:12] + Enables duty cycle correction for odd divisors + DC50 + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [8:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_sys + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + clksrc_pll_usb + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clk_sys + 6 + + + clk_usb + 7 + + + clk_adc + 8 + + + clk_rtc + 9 + + + clk_ref + 10 + + + AUXSRC + + + CLK_GPOUT3_CTRL + 0x00000000 + + + 0x0028 + Clock divisor, can be changed on-the-fly + + + read-write + [31:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + read-write + [7:0] + Fractional component of the divisor + FRAC + + + CLK_GPOUT3_DIV + 0x00000100 + + + read-only + 0x002c + Indicates which src is currently selected (one-hot) + CLK_GPOUT3_SELECTED + 0x00000001 + + + 0x0030 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [6:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_usb + 0 + + + clksrc_gpin0 + 1 + + + clksrc_gpin1 + 2 + + + AUXSRC + + + read-write + [1:0] + Selects the clock source glitchlessly, can be changed on-the-fly + + + rosc_clksrc_ph + 0 + + + clksrc_clk_ref_aux + 1 + + + xosc_clksrc + 2 + + + SRC + + + CLK_REF_CTRL + 0x00000000 + + + 0x0034 + Clock divisor, can be changed on-the-fly + + + read-write + [9:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + CLK_REF_DIV + 0x00000100 + + + read-only + 0x0038 + Indicates which src is currently selected (one-hot) + CLK_REF_SELECTED + 0x00000001 + + + 0x003c + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [7:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_sys + 0 + + + clksrc_pll_usb + 1 + + + rosc_clksrc + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + AUXSRC + + + read-write + [0:0] + Selects the clock source glitchlessly, can be changed on-the-fly + + + clk_ref + 0 + + + clksrc_clk_sys_aux + 1 + + + SRC + + + CLK_SYS_CTRL + 0x00000000 + + + 0x0040 + Clock divisor, can be changed on-the-fly + + + read-write + [31:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + read-write + [7:0] + Fractional component of the divisor + FRAC + + + CLK_SYS_DIV + 0x00000100 + + + read-only + 0x0044 + Indicates which src is currently selected (one-hot) + CLK_SYS_SELECTED + 0x00000001 + + + 0x0048 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [7:5] + Selects the auxiliary clock source, will glitch when switching + + + clk_sys + 0 + + + clksrc_pll_sys + 1 + + + clksrc_pll_usb + 2 + + + rosc_clksrc_ph + 3 + + + xosc_clksrc + 4 + + + clksrc_gpin0 + 5 + + + clksrc_gpin1 + 6 + + + AUXSRC + + + CLK_PERI_CTRL + 0x00000000 + + + read-only + 0x0050 + Indicates which src is currently selected (one-hot) + CLK_PERI_SELECTED + 0x00000001 + + + 0x0054 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [7:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + AUXSRC + + + CLK_USB_CTRL + 0x00000000 + + + 0x0058 + Clock divisor, can be changed on-the-fly + + + read-write + [9:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + CLK_USB_DIV + 0x00000100 + + + read-only + 0x005c + Indicates which src is currently selected (one-hot) + CLK_USB_SELECTED + 0x00000001 + + + 0x0060 + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [7:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + AUXSRC + + + CLK_ADC_CTRL + 0x00000000 + + + 0x0064 + Clock divisor, can be changed on-the-fly + + + read-write + [9:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + CLK_ADC_DIV + 0x00000100 + + + read-only + 0x0068 + Indicates which src is currently selected (one-hot) + CLK_ADC_SELECTED + 0x00000001 + + + 0x006c + Clock control, can be changed on-the-fly (except for auxsrc) + + + read-write + [20:20] + An edge on this signal shifts the phase of the output by 1 cycle of the input clock\n + This can be done at any time + NUDGE + + + read-write + [17:16] + This delays the enable signal by up to 3 cycles of the input clock\n + This must be set before the clock is enabled to have any effect + PHASE + + + read-write + [11:11] + Starts and stops the clock generator cleanly + ENABLE + + + read-write + [10:10] + Asynchronously kills the clock generator + KILL + + + read-write + [7:5] + Selects the auxiliary clock source, will glitch when switching + + + clksrc_pll_usb + 0 + + + clksrc_pll_sys + 1 + + + rosc_clksrc_ph + 2 + + + xosc_clksrc + 3 + + + clksrc_gpin0 + 4 + + + clksrc_gpin1 + 5 + + + AUXSRC + + + CLK_RTC_CTRL + 0x00000000 + + + 0x0070 + Clock divisor, can be changed on-the-fly + + + read-write + [31:8] + Integer component of the divisor, 0 -> divide by 2^16 + INT + + + read-write + [7:0] + Fractional component of the divisor + FRAC + + + CLK_RTC_DIV + 0x00000100 + + + read-only + 0x0074 + Indicates which src is currently selected (one-hot) + CLK_RTC_SELECTED + 0x00000001 + + + 0x0078 + + + read-write + [16:16] + For clearing the resus after the fault that triggered it has been corrected + CLEAR + + + read-write + [12:12] + Force a resus, for test purposes only + FRCE + + + read-write + [8:8] + Enable resus + ENABLE + + + read-write + [7:0] + This is expressed as a number of clk_ref cycles\n + and must be >= 2x clk_ref_freq/min_clk_tst_freq + TIMEOUT + + + CLK_SYS_RESUS_CTRL + 0x000000ff + + + 0x007c + + + read-only + [0:0] + Clock has been resuscitated, correct the error then send ctrl_clear=1 + RESUSSED + + + CLK_SYS_RESUS_STATUS + 0x00000000 + + + 0x0080 + Reference clock frequency in kHz + + + read-write + [19:0] + FC0_REF_KHZ + + + FC0_REF_KHZ + 0x00000000 + + + 0x0084 + Minimum pass frequency in kHz. This is optional. Set to 0 if you are not using the pass/fail flags + + + read-write + [24:0] + FC0_MIN_KHZ + + + FC0_MIN_KHZ + 0x00000000 + + + 0x0088 + Maximum pass frequency in kHz. This is optional. Set to 0x1ffffff if you are not using the pass/fail flags + + + read-write + [24:0] + FC0_MAX_KHZ + + + FC0_MAX_KHZ + 0x01ffffff + + + 0x008c + Delays the start of frequency counting to allow the mux to settle\n + Delay is measured in multiples of the reference clock period + + + read-write + [2:0] + FC0_DELAY + + + FC0_DELAY + 0x00000001 + + + 0x0090 + The test interval is 0.98us * 2**interval, but let's call it 1us * 2**interval\n + The default gives a test interval of 250us + + + read-write + [3:0] + FC0_INTERVAL + + + FC0_INTERVAL + 0x00000008 + + + 0x0094 + Clock sent to frequency counter, set to 0 when not required\n + Writing to this register initiates the frequency count + + + read-write + [7:0] + + + NULL + 0 + + + pll_sys_clksrc_primary + 1 + + + pll_usb_clksrc_primary + 2 + + + rosc_clksrc + 3 + + + rosc_clksrc_ph + 4 + + + xosc_clksrc + 5 + + + clksrc_gpin0 + 6 + + + clksrc_gpin1 + 7 + + + clk_ref + 8 + + + clk_sys + 9 + + + clk_peri + 10 + + + clk_usb + 11 + + + clk_adc + 12 + + + clk_rtc + 13 + + + FC0_SRC + + + FC0_SRC + 0x00000000 + + + 0x0098 + Frequency counter status + + + read-only + [28:28] + Test clock stopped during test + DIED + + + read-only + [24:24] + Test clock faster than expected, only valid when status_done=1 + FAST + + + read-only + [20:20] + Test clock slower than expected, only valid when status_done=1 + SLOW + + + read-only + [16:16] + Test failed + FAIL + + + read-only + [12:12] + Waiting for test clock to start + WAITING + + + read-only + [8:8] + Test running + RUNNING + + + read-only + [4:4] + Test complete + DONE + + + read-only + [0:0] + Test passed + PASS + + + FC0_STATUS + 0x00000000 + + + 0x009c + Result of frequency measurement, only valid when status_done=1 + + + read-only + [29:5] + KHZ + + + read-only + [4:0] + FRAC + + + FC0_RESULT + 0x00000000 + + + 0x00a0 + enable clock in wake mode + + + read-write + [31:31] + clk_sys_sram3 + + + read-write + [30:30] + clk_sys_sram2 + + + read-write + [29:29] + clk_sys_sram1 + + + read-write + [28:28] + clk_sys_sram0 + + + read-write + [27:27] + clk_sys_spi1 + + + read-write + [26:26] + clk_peri_spi1 + + + read-write + [25:25] + clk_sys_spi0 + + + read-write + [24:24] + clk_peri_spi0 + + + read-write + [23:23] + clk_sys_sio + + + read-write + [22:22] + clk_sys_rtc + + + read-write + [21:21] + clk_rtc_rtc + + + read-write + [20:20] + clk_sys_rosc + + + read-write + [19:19] + clk_sys_rom + + + read-write + [18:18] + clk_sys_resets + + + read-write + [17:17] + clk_sys_pwm + + + read-write + [16:16] + clk_sys_psm + + + read-write + [15:15] + clk_sys_pll_usb + + + read-write + [14:14] + clk_sys_pll_sys + + + read-write + [13:13] + clk_sys_pio1 + + + read-write + [12:12] + clk_sys_pio0 + + + read-write + [11:11] + clk_sys_pads + + + read-write + [10:10] + clk_sys_vreg_and_chip_reset + + + read-write + [9:9] + clk_sys_jtag + + + read-write + [8:8] + clk_sys_io + + + read-write + [7:7] + clk_sys_i2c1 + + + read-write + [6:6] + clk_sys_i2c0 + + + read-write + [5:5] + clk_sys_dma + + + read-write + [4:4] + clk_sys_busfabric + + + read-write + [3:3] + clk_sys_busctrl + + + read-write + [2:2] + clk_sys_adc + + + read-write + [1:1] + clk_adc_adc + + + read-write + [0:0] + clk_sys_clocks + + + WAKE_EN0 + 0xffffffff + + + 0x00a4 + enable clock in wake mode + + + read-write + [14:14] + clk_sys_xosc + + + read-write + [13:13] + clk_sys_xip + + + read-write + [12:12] + clk_sys_watchdog + + + read-write + [11:11] + clk_usb_usbctrl + + + read-write + [10:10] + clk_sys_usbctrl + + + read-write + [9:9] + clk_sys_uart1 + + + read-write + [8:8] + clk_peri_uart1 + + + read-write + [7:7] + clk_sys_uart0 + + + read-write + [6:6] + clk_peri_uart0 + + + read-write + [5:5] + clk_sys_timer + + + read-write + [4:4] + clk_sys_tbman + + + read-write + [3:3] + clk_sys_sysinfo + + + read-write + [2:2] + clk_sys_syscfg + + + read-write + [1:1] + clk_sys_sram5 + + + read-write + [0:0] + clk_sys_sram4 + + + WAKE_EN1 + 0x00007fff + + + 0x00a8 + enable clock in sleep mode + + + read-write + [31:31] + clk_sys_sram3 + + + read-write + [30:30] + clk_sys_sram2 + + + read-write + [29:29] + clk_sys_sram1 + + + read-write + [28:28] + clk_sys_sram0 + + + read-write + [27:27] + clk_sys_spi1 + + + read-write + [26:26] + clk_peri_spi1 + + + read-write + [25:25] + clk_sys_spi0 + + + read-write + [24:24] + clk_peri_spi0 + + + read-write + [23:23] + clk_sys_sio + + + read-write + [22:22] + clk_sys_rtc + + + read-write + [21:21] + clk_rtc_rtc + + + read-write + [20:20] + clk_sys_rosc + + + read-write + [19:19] + clk_sys_rom + + + read-write + [18:18] + clk_sys_resets + + + read-write + [17:17] + clk_sys_pwm + + + read-write + [16:16] + clk_sys_psm + + + read-write + [15:15] + clk_sys_pll_usb + + + read-write + [14:14] + clk_sys_pll_sys + + + read-write + [13:13] + clk_sys_pio1 + + + read-write + [12:12] + clk_sys_pio0 + + + read-write + [11:11] + clk_sys_pads + + + read-write + [10:10] + clk_sys_vreg_and_chip_reset + + + read-write + [9:9] + clk_sys_jtag + + + read-write + [8:8] + clk_sys_io + + + read-write + [7:7] + clk_sys_i2c1 + + + read-write + [6:6] + clk_sys_i2c0 + + + read-write + [5:5] + clk_sys_dma + + + read-write + [4:4] + clk_sys_busfabric + + + read-write + [3:3] + clk_sys_busctrl + + + read-write + [2:2] + clk_sys_adc + + + read-write + [1:1] + clk_adc_adc + + + read-write + [0:0] + clk_sys_clocks + + + SLEEP_EN0 + 0xffffffff + + + 0x00ac + enable clock in sleep mode + + + read-write + [14:14] + clk_sys_xosc + + + read-write + [13:13] + clk_sys_xip + + + read-write + [12:12] + clk_sys_watchdog + + + read-write + [11:11] + clk_usb_usbctrl + + + read-write + [10:10] + clk_sys_usbctrl + + + read-write + [9:9] + clk_sys_uart1 + + + read-write + [8:8] + clk_peri_uart1 + + + read-write + [7:7] + clk_sys_uart0 + + + read-write + [6:6] + clk_peri_uart0 + + + read-write + [5:5] + clk_sys_timer + + + read-write + [4:4] + clk_sys_tbman + + + read-write + [3:3] + clk_sys_sysinfo + + + read-write + [2:2] + clk_sys_syscfg + + + read-write + [1:1] + clk_sys_sram5 + + + read-write + [0:0] + clk_sys_sram4 + + + SLEEP_EN1 + 0x00007fff + + + 0x00b0 + indicates the state of the clock enable + + + read-only + [31:31] + clk_sys_sram3 + + + read-only + [30:30] + clk_sys_sram2 + + + read-only + [29:29] + clk_sys_sram1 + + + read-only + [28:28] + clk_sys_sram0 + + + read-only + [27:27] + clk_sys_spi1 + + + read-only + [26:26] + clk_peri_spi1 + + + read-only + [25:25] + clk_sys_spi0 + + + read-only + [24:24] + clk_peri_spi0 + + + read-only + [23:23] + clk_sys_sio + + + read-only + [22:22] + clk_sys_rtc + + + read-only + [21:21] + clk_rtc_rtc + + + read-only + [20:20] + clk_sys_rosc + + + read-only + [19:19] + clk_sys_rom + + + read-only + [18:18] + clk_sys_resets + + + read-only + [17:17] + clk_sys_pwm + + + read-only + [16:16] + clk_sys_psm + + + read-only + [15:15] + clk_sys_pll_usb + + + read-only + [14:14] + clk_sys_pll_sys + + + read-only + [13:13] + clk_sys_pio1 + + + read-only + [12:12] + clk_sys_pio0 + + + read-only + [11:11] + clk_sys_pads + + + read-only + [10:10] + clk_sys_vreg_and_chip_reset + + + read-only + [9:9] + clk_sys_jtag + + + read-only + [8:8] + clk_sys_io + + + read-only + [7:7] + clk_sys_i2c1 + + + read-only + [6:6] + clk_sys_i2c0 + + + read-only + [5:5] + clk_sys_dma + + + read-only + [4:4] + clk_sys_busfabric + + + read-only + [3:3] + clk_sys_busctrl + + + read-only + [2:2] + clk_sys_adc + + + read-only + [1:1] + clk_adc_adc + + + read-only + [0:0] + clk_sys_clocks + + + ENABLED0 + 0x00000000 + + + 0x00b4 + indicates the state of the clock enable + + + read-only + [14:14] + clk_sys_xosc + + + read-only + [13:13] + clk_sys_xip + + + read-only + [12:12] + clk_sys_watchdog + + + read-only + [11:11] + clk_usb_usbctrl + + + read-only + [10:10] + clk_sys_usbctrl + + + read-only + [9:9] + clk_sys_uart1 + + + read-only + [8:8] + clk_peri_uart1 + + + read-only + [7:7] + clk_sys_uart0 + + + read-only + [6:6] + clk_peri_uart0 + + + read-only + [5:5] + clk_sys_timer + + + read-only + [4:4] + clk_sys_tbman + + + read-only + [3:3] + clk_sys_sysinfo + + + read-only + [2:2] + clk_sys_syscfg + + + read-only + [1:1] + clk_sys_sram5 + + + read-only + [0:0] + clk_sys_sram4 + + + ENABLED1 + 0x00000000 + + + 0x00b8 + Raw Interrupts + + + read-only + [0:0] + CLK_SYS_RESUS + + + INTR + 0x00000000 + + + 0x00bc + Interrupt Enable + + + read-write + [0:0] + CLK_SYS_RESUS + + + INTE + 0x00000000 + + + 0x00c0 + Interrupt Force + + + read-write + [0:0] + CLK_SYS_RESUS + + + INTF + 0x00000000 + + + 0x00c4 + Interrupt status after masking & forcing + + + read-only + [0:0] + CLK_SYS_RESUS + + + INTS + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x4000c000 + RESETS + + + 0x0000 + Reset control. If a bit is set it means the peripheral is in reset. 0 means the peripheral's reset is deasserted. + + + read-write + [24:24] + usbctrl + + + read-write + [23:23] + uart1 + + + read-write + [22:22] + uart0 + + + read-write + [21:21] + timer + + + read-write + [20:20] + tbman + + + read-write + [19:19] + sysinfo + + + read-write + [18:18] + syscfg + + + read-write + [17:17] + spi1 + + + read-write + [16:16] + spi0 + + + read-write + [15:15] + rtc + + + read-write + [14:14] + pwm + + + read-write + [13:13] + pll_usb + + + read-write + [12:12] + pll_sys + + + read-write + [11:11] + pio1 + + + read-write + [10:10] + pio0 + + + read-write + [9:9] + pads_qspi + + + read-write + [8:8] + pads_bank0 + + + read-write + [7:7] + jtag + + + read-write + [6:6] + io_qspi + + + read-write + [5:5] + io_bank0 + + + read-write + [4:4] + i2c1 + + + read-write + [3:3] + i2c0 + + + read-write + [2:2] + dma + + + read-write + [1:1] + busctrl + + + read-write + [0:0] + adc + + + RESET + 0x01ffffff + + + 0x0004 + Watchdog select. If a bit is set then the watchdog will reset this peripheral when the watchdog fires. + + + read-write + [24:24] + usbctrl + + + read-write + [23:23] + uart1 + + + read-write + [22:22] + uart0 + + + read-write + [21:21] + timer + + + read-write + [20:20] + tbman + + + read-write + [19:19] + sysinfo + + + read-write + [18:18] + syscfg + + + read-write + [17:17] + spi1 + + + read-write + [16:16] + spi0 + + + read-write + [15:15] + rtc + + + read-write + [14:14] + pwm + + + read-write + [13:13] + pll_usb + + + read-write + [12:12] + pll_sys + + + read-write + [11:11] + pio1 + + + read-write + [10:10] + pio0 + + + read-write + [9:9] + pads_qspi + + + read-write + [8:8] + pads_bank0 + + + read-write + [7:7] + jtag + + + read-write + [6:6] + io_qspi + + + read-write + [5:5] + io_bank0 + + + read-write + [4:4] + i2c1 + + + read-write + [3:3] + i2c0 + + + read-write + [2:2] + dma + + + read-write + [1:1] + busctrl + + + read-write + [0:0] + adc + + + WDSEL + 0x00000000 + + + 0x0008 + Reset done. If a bit is set then a reset done signal has been returned by the peripheral. This indicates that the peripheral's registers are ready to be accessed. + + + read-only + [24:24] + usbctrl + + + read-only + [23:23] + uart1 + + + read-only + [22:22] + uart0 + + + read-only + [21:21] + timer + + + read-only + [20:20] + tbman + + + read-only + [19:19] + sysinfo + + + read-only + [18:18] + syscfg + + + read-only + [17:17] + spi1 + + + read-only + [16:16] + spi0 + + + read-only + [15:15] + rtc + + + read-only + [14:14] + pwm + + + read-only + [13:13] + pll_usb + + + read-only + [12:12] + pll_sys + + + read-only + [11:11] + pio1 + + + read-only + [10:10] + pio0 + + + read-only + [9:9] + pads_qspi + + + read-only + [8:8] + pads_bank0 + + + read-only + [7:7] + jtag + + + read-only + [6:6] + io_qspi + + + read-only + [5:5] + io_bank0 + + + read-only + [4:4] + i2c1 + + + read-only + [3:3] + i2c0 + + + read-only + [2:2] + dma + + + read-only + [1:1] + busctrl + + + read-only + [0:0] + adc + + + RESET_DONE + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40010000 + PSM + + + 0x0000 + Force block out of reset (i.e. power it on) + + + read-write + [16:16] + proc1 + + + read-write + [15:15] + proc0 + + + read-write + [14:14] + sio + + + read-write + [13:13] + vreg_and_chip_reset + + + read-write + [12:12] + xip + + + read-write + [11:11] + sram5 + + + read-write + [10:10] + sram4 + + + read-write + [9:9] + sram3 + + + read-write + [8:8] + sram2 + + + read-write + [7:7] + sram1 + + + read-write + [6:6] + sram0 + + + read-write + [5:5] + rom + + + read-write + [4:4] + busfabric + + + read-write + [3:3] + resets + + + read-write + [2:2] + clocks + + + read-write + [1:1] + xosc + + + read-write + [0:0] + rosc + + + FRCE_ON + 0x00000000 + + + 0x0004 + Force into reset (i.e. power it off) + + + read-write + [16:16] + proc1 + + + read-write + [15:15] + proc0 + + + read-write + [14:14] + sio + + + read-write + [13:13] + vreg_and_chip_reset + + + read-write + [12:12] + xip + + + read-write + [11:11] + sram5 + + + read-write + [10:10] + sram4 + + + read-write + [9:9] + sram3 + + + read-write + [8:8] + sram2 + + + read-write + [7:7] + sram1 + + + read-write + [6:6] + sram0 + + + read-write + [5:5] + rom + + + read-write + [4:4] + busfabric + + + read-write + [3:3] + resets + + + read-write + [2:2] + clocks + + + read-write + [1:1] + xosc + + + read-write + [0:0] + rosc + + + FRCE_OFF + 0x00000000 + + + 0x0008 + Set to 1 if this peripheral should be reset when the watchdog fires. + + + read-write + [16:16] + proc1 + + + read-write + [15:15] + proc0 + + + read-write + [14:14] + sio + + + read-write + [13:13] + vreg_and_chip_reset + + + read-write + [12:12] + xip + + + read-write + [11:11] + sram5 + + + read-write + [10:10] + sram4 + + + read-write + [9:9] + sram3 + + + read-write + [8:8] + sram2 + + + read-write + [7:7] + sram1 + + + read-write + [6:6] + sram0 + + + read-write + [5:5] + rom + + + read-write + [4:4] + busfabric + + + read-write + [3:3] + resets + + + read-write + [2:2] + clocks + + + read-write + [1:1] + xosc + + + read-write + [0:0] + rosc + + + WDSEL + 0x00000000 + + + 0x000c + Indicates the peripheral's registers are ready to access. + + + read-only + [16:16] + proc1 + + + read-only + [15:15] + proc0 + + + read-only + [14:14] + sio + + + read-only + [13:13] + vreg_and_chip_reset + + + read-only + [12:12] + xip + + + read-only + [11:11] + sram5 + + + read-only + [10:10] + sram4 + + + read-only + [9:9] + sram3 + + + read-only + [8:8] + sram2 + + + read-only + [7:7] + sram1 + + + read-only + [6:6] + sram0 + + + read-only + [5:5] + rom + + + read-only + [4:4] + busfabric + + + read-only + [3:3] + resets + + + read-only + [2:2] + clocks + + + read-only + [1:1] + xosc + + + read-only + [0:0] + rosc + + + DONE + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40014000 + + IO_IRQ_BANK0 + 13 + + IO_BANK0 + + + 0x0000 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO0_STATUS + 0x00000000 + + + 0x0004 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + jtag_tck + 0 + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_0 + 4 + + + sio_0 + 5 + + + pio0_0 + 6 + + + pio1_0 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO0_CTRL + 0x0000001f + + + 0x0008 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO1_STATUS + 0x00000000 + + + 0x000c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + jtag_tms + 0 + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_0 + 4 + + + sio_1 + 5 + + + pio0_1 + 6 + + + pio1_1 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO1_CTRL + 0x0000001f + + + 0x0010 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO2_STATUS + 0x00000000 + + + 0x0014 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + jtag_tdi + 0 + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_1 + 4 + + + sio_2 + 5 + + + pio0_2 + 6 + + + pio1_2 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO2_CTRL + 0x0000001f + + + 0x0018 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO3_STATUS + 0x00000000 + + + 0x001c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + jtag_tdo + 0 + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_1 + 4 + + + sio_3 + 5 + + + pio0_3 + 6 + + + pio1_3 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO3_CTRL + 0x0000001f + + + 0x0020 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO4_STATUS + 0x00000000 + + + 0x0024 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_2 + 4 + + + sio_4 + 5 + + + pio0_4 + 6 + + + pio1_4 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO4_CTRL + 0x0000001f + + + 0x0028 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO5_STATUS + 0x00000000 + + + 0x002c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_2 + 4 + + + sio_5 + 5 + + + pio0_5 + 6 + + + pio1_5 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO5_CTRL + 0x0000001f + + + 0x0030 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO6_STATUS + 0x00000000 + + + 0x0034 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_3 + 4 + + + sio_6 + 5 + + + pio0_6 + 6 + + + pio1_6 + 7 + + + usb_muxing_extphy_softcon + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO6_CTRL + 0x0000001f + + + 0x0038 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO7_STATUS + 0x00000000 + + + 0x003c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_3 + 4 + + + sio_7 + 5 + + + pio0_7 + 6 + + + pio1_7 + 7 + + + usb_muxing_extphy_oe_n + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO7_CTRL + 0x0000001f + + + 0x0040 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO8_STATUS + 0x00000000 + + + 0x0044 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_4 + 4 + + + sio_8 + 5 + + + pio0_8 + 6 + + + pio1_8 + 7 + + + usb_muxing_extphy_rcv + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO8_CTRL + 0x0000001f + + + 0x0048 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO9_STATUS + 0x00000000 + + + 0x004c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_4 + 4 + + + sio_9 + 5 + + + pio0_9 + 6 + + + pio1_9 + 7 + + + usb_muxing_extphy_vp + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO9_CTRL + 0x0000001f + + + 0x0050 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO10_STATUS + 0x00000000 + + + 0x0054 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_5 + 4 + + + sio_10 + 5 + + + pio0_10 + 6 + + + pio1_10 + 7 + + + usb_muxing_extphy_vm + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO10_CTRL + 0x0000001f + + + 0x0058 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO11_STATUS + 0x00000000 + + + 0x005c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_5 + 4 + + + sio_11 + 5 + + + pio0_11 + 6 + + + pio1_11 + 7 + + + usb_muxing_extphy_suspnd + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO11_CTRL + 0x0000001f + + + 0x0060 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO12_STATUS + 0x00000000 + + + 0x0064 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_6 + 4 + + + sio_12 + 5 + + + pio0_12 + 6 + + + pio1_12 + 7 + + + usb_muxing_extphy_speed + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO12_CTRL + 0x0000001f + + + 0x0068 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO13_STATUS + 0x00000000 + + + 0x006c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_6 + 4 + + + sio_13 + 5 + + + pio0_13 + 6 + + + pio1_13 + 7 + + + usb_muxing_extphy_vpo + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO13_CTRL + 0x0000001f + + + 0x0070 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO14_STATUS + 0x00000000 + + + 0x0074 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_7 + 4 + + + sio_14 + 5 + + + pio0_14 + 6 + + + pio1_14 + 7 + + + usb_muxing_extphy_vmo + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO14_CTRL + 0x0000001f + + + 0x0078 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO15_STATUS + 0x00000000 + + + 0x007c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_7 + 4 + + + sio_15 + 5 + + + pio0_15 + 6 + + + pio1_15 + 7 + + + usb_muxing_digital_dp + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO15_CTRL + 0x0000001f + + + 0x0080 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO16_STATUS + 0x00000000 + + + 0x0084 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_0 + 4 + + + sio_16 + 5 + + + pio0_16 + 6 + + + pio1_16 + 7 + + + usb_muxing_digital_dm + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO16_CTRL + 0x0000001f + + + 0x0088 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO17_STATUS + 0x00000000 + + + 0x008c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_0 + 4 + + + sio_17 + 5 + + + pio0_17 + 6 + + + pio1_17 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO17_CTRL + 0x0000001f + + + 0x0090 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO18_STATUS + 0x00000000 + + + 0x0094 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_sclk + 1 + + + uart0_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_1 + 4 + + + sio_18 + 5 + + + pio0_18 + 6 + + + pio1_18 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO18_CTRL + 0x0000001f + + + 0x0098 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO19_STATUS + 0x00000000 + + + 0x009c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_tx + 1 + + + uart0_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_1 + 4 + + + sio_19 + 5 + + + pio0_19 + 6 + + + pio1_19 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO19_CTRL + 0x0000001f + + + 0x00a0 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO20_STATUS + 0x00000000 + + + 0x00a4 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_2 + 4 + + + sio_20 + 5 + + + pio0_20 + 6 + + + pio1_20 + 7 + + + clocks_gpin_0 + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO20_CTRL + 0x0000001f + + + 0x00a8 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO21_STATUS + 0x00000000 + + + 0x00ac + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_2 + 4 + + + sio_21 + 5 + + + pio0_21 + 6 + + + pio1_21 + 7 + + + clocks_gpout_0 + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO21_CTRL + 0x0000001f + + + 0x00b0 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO22_STATUS + 0x00000000 + + + 0x00b4 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_3 + 4 + + + sio_22 + 5 + + + pio0_22 + 6 + + + pio1_22 + 7 + + + clocks_gpin_1 + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO22_CTRL + 0x0000001f + + + 0x00b8 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO23_STATUS + 0x00000000 + + + 0x00bc + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi0_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_3 + 4 + + + sio_23 + 5 + + + pio0_23 + 6 + + + pio1_23 + 7 + + + clocks_gpout_1 + 8 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO23_CTRL + 0x0000001f + + + 0x00c0 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO24_STATUS + 0x00000000 + + + 0x00c4 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_rx + 1 + + + uart1_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_4 + 4 + + + sio_24 + 5 + + + pio0_24 + 6 + + + pio1_24 + 7 + + + clocks_gpout_2 + 8 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO24_CTRL + 0x0000001f + + + 0x00c8 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO25_STATUS + 0x00000000 + + + 0x00cc + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_ss_n + 1 + + + uart1_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_4 + 4 + + + sio_25 + 5 + + + pio0_25 + 6 + + + pio1_25 + 7 + + + clocks_gpout_3 + 8 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO25_CTRL + 0x0000001f + + + 0x00d0 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO26_STATUS + 0x00000000 + + + 0x00d4 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_sclk + 1 + + + uart1_cts + 2 + + + i2c1_sda + 3 + + + pwm_a_5 + 4 + + + sio_26 + 5 + + + pio0_26 + 6 + + + pio1_26 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO26_CTRL + 0x0000001f + + + 0x00d8 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO27_STATUS + 0x00000000 + + + 0x00dc + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_tx + 1 + + + uart1_rts + 2 + + + i2c1_scl + 3 + + + pwm_b_5 + 4 + + + sio_27 + 5 + + + pio0_27 + 6 + + + pio1_27 + 7 + + + usb_muxing_overcurr_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO27_CTRL + 0x0000001f + + + 0x00e0 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO28_STATUS + 0x00000000 + + + 0x00e4 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_rx + 1 + + + uart0_tx + 2 + + + i2c0_sda + 3 + + + pwm_a_6 + 4 + + + sio_28 + 5 + + + pio0_28 + 6 + + + pio1_28 + 7 + + + usb_muxing_vbus_detect + 9 + + + null + 31 + + + FUNCSEL + + + GPIO28_CTRL + 0x0000001f + + + 0x00e8 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO29_STATUS + 0x00000000 + + + 0x00ec + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + spi1_ss_n + 1 + + + uart0_rx + 2 + + + i2c0_scl + 3 + + + pwm_b_6 + 4 + + + sio_29 + 5 + + + pio0_29 + 6 + + + pio1_29 + 7 + + + usb_muxing_vbus_en + 9 + + + null + 31 + + + FUNCSEL + + + GPIO29_CTRL + 0x0000001f + + + 0x00f0 + Raw Interrupts + + + read-write + [31:31] + oneToClear + GPIO7_EDGE_HIGH + + + read-write + [30:30] + oneToClear + GPIO7_EDGE_LOW + + + read-only + [29:29] + GPIO7_LEVEL_HIGH + + + read-only + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + oneToClear + GPIO6_EDGE_HIGH + + + read-write + [26:26] + oneToClear + GPIO6_EDGE_LOW + + + read-only + [25:25] + GPIO6_LEVEL_HIGH + + + read-only + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + oneToClear + GPIO5_EDGE_HIGH + + + read-write + [22:22] + oneToClear + GPIO5_EDGE_LOW + + + read-only + [21:21] + GPIO5_LEVEL_HIGH + + + read-only + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + oneToClear + GPIO4_EDGE_HIGH + + + read-write + [18:18] + oneToClear + GPIO4_EDGE_LOW + + + read-only + [17:17] + GPIO4_LEVEL_HIGH + + + read-only + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + oneToClear + GPIO3_EDGE_HIGH + + + read-write + [14:14] + oneToClear + GPIO3_EDGE_LOW + + + read-only + [13:13] + GPIO3_LEVEL_HIGH + + + read-only + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + oneToClear + GPIO2_EDGE_HIGH + + + read-write + [10:10] + oneToClear + GPIO2_EDGE_LOW + + + read-only + [9:9] + GPIO2_LEVEL_HIGH + + + read-only + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + oneToClear + GPIO1_EDGE_HIGH + + + read-write + [6:6] + oneToClear + GPIO1_EDGE_LOW + + + read-only + [5:5] + GPIO1_LEVEL_HIGH + + + read-only + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + oneToClear + GPIO0_EDGE_HIGH + + + read-write + [2:2] + oneToClear + GPIO0_EDGE_LOW + + + read-only + [1:1] + GPIO0_LEVEL_HIGH + + + read-only + [0:0] + GPIO0_LEVEL_LOW + + + INTR0 + 0x00000000 + + + 0x00f4 + Raw Interrupts + + + read-write + [31:31] + oneToClear + GPIO15_EDGE_HIGH + + + read-write + [30:30] + oneToClear + GPIO15_EDGE_LOW + + + read-only + [29:29] + GPIO15_LEVEL_HIGH + + + read-only + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + oneToClear + GPIO14_EDGE_HIGH + + + read-write + [26:26] + oneToClear + GPIO14_EDGE_LOW + + + read-only + [25:25] + GPIO14_LEVEL_HIGH + + + read-only + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + oneToClear + GPIO13_EDGE_HIGH + + + read-write + [22:22] + oneToClear + GPIO13_EDGE_LOW + + + read-only + [21:21] + GPIO13_LEVEL_HIGH + + + read-only + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + oneToClear + GPIO12_EDGE_HIGH + + + read-write + [18:18] + oneToClear + GPIO12_EDGE_LOW + + + read-only + [17:17] + GPIO12_LEVEL_HIGH + + + read-only + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + oneToClear + GPIO11_EDGE_HIGH + + + read-write + [14:14] + oneToClear + GPIO11_EDGE_LOW + + + read-only + [13:13] + GPIO11_LEVEL_HIGH + + + read-only + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + oneToClear + GPIO10_EDGE_HIGH + + + read-write + [10:10] + oneToClear + GPIO10_EDGE_LOW + + + read-only + [9:9] + GPIO10_LEVEL_HIGH + + + read-only + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + oneToClear + GPIO9_EDGE_HIGH + + + read-write + [6:6] + oneToClear + GPIO9_EDGE_LOW + + + read-only + [5:5] + GPIO9_LEVEL_HIGH + + + read-only + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + oneToClear + GPIO8_EDGE_HIGH + + + read-write + [2:2] + oneToClear + GPIO8_EDGE_LOW + + + read-only + [1:1] + GPIO8_LEVEL_HIGH + + + read-only + [0:0] + GPIO8_LEVEL_LOW + + + INTR1 + 0x00000000 + + + 0x00f8 + Raw Interrupts + + + read-write + [31:31] + oneToClear + GPIO23_EDGE_HIGH + + + read-write + [30:30] + oneToClear + GPIO23_EDGE_LOW + + + read-only + [29:29] + GPIO23_LEVEL_HIGH + + + read-only + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + oneToClear + GPIO22_EDGE_HIGH + + + read-write + [26:26] + oneToClear + GPIO22_EDGE_LOW + + + read-only + [25:25] + GPIO22_LEVEL_HIGH + + + read-only + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + oneToClear + GPIO21_EDGE_HIGH + + + read-write + [22:22] + oneToClear + GPIO21_EDGE_LOW + + + read-only + [21:21] + GPIO21_LEVEL_HIGH + + + read-only + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + oneToClear + GPIO20_EDGE_HIGH + + + read-write + [18:18] + oneToClear + GPIO20_EDGE_LOW + + + read-only + [17:17] + GPIO20_LEVEL_HIGH + + + read-only + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + oneToClear + GPIO19_EDGE_HIGH + + + read-write + [14:14] + oneToClear + GPIO19_EDGE_LOW + + + read-only + [13:13] + GPIO19_LEVEL_HIGH + + + read-only + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + oneToClear + GPIO18_EDGE_HIGH + + + read-write + [10:10] + oneToClear + GPIO18_EDGE_LOW + + + read-only + [9:9] + GPIO18_LEVEL_HIGH + + + read-only + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + oneToClear + GPIO17_EDGE_HIGH + + + read-write + [6:6] + oneToClear + GPIO17_EDGE_LOW + + + read-only + [5:5] + GPIO17_LEVEL_HIGH + + + read-only + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + oneToClear + GPIO16_EDGE_HIGH + + + read-write + [2:2] + oneToClear + GPIO16_EDGE_LOW + + + read-only + [1:1] + GPIO16_LEVEL_HIGH + + + read-only + [0:0] + GPIO16_LEVEL_LOW + + + INTR2 + 0x00000000 + + + 0x00fc + Raw Interrupts + + + read-write + [23:23] + oneToClear + GPIO29_EDGE_HIGH + + + read-write + [22:22] + oneToClear + GPIO29_EDGE_LOW + + + read-only + [21:21] + GPIO29_LEVEL_HIGH + + + read-only + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + oneToClear + GPIO28_EDGE_HIGH + + + read-write + [18:18] + oneToClear + GPIO28_EDGE_LOW + + + read-only + [17:17] + GPIO28_LEVEL_HIGH + + + read-only + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + oneToClear + GPIO27_EDGE_HIGH + + + read-write + [14:14] + oneToClear + GPIO27_EDGE_LOW + + + read-only + [13:13] + GPIO27_LEVEL_HIGH + + + read-only + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + oneToClear + GPIO26_EDGE_HIGH + + + read-write + [10:10] + oneToClear + GPIO26_EDGE_LOW + + + read-only + [9:9] + GPIO26_LEVEL_HIGH + + + read-only + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + oneToClear + GPIO25_EDGE_HIGH + + + read-write + [6:6] + oneToClear + GPIO25_EDGE_LOW + + + read-only + [5:5] + GPIO25_LEVEL_HIGH + + + read-only + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + oneToClear + GPIO24_EDGE_HIGH + + + read-write + [2:2] + oneToClear + GPIO24_EDGE_LOW + + + read-only + [1:1] + GPIO24_LEVEL_HIGH + + + read-only + [0:0] + GPIO24_LEVEL_LOW + + + INTR3 + 0x00000000 + + + 0x0100 + Interrupt Enable for proc0 + + + read-write + [31:31] + GPIO7_EDGE_HIGH + + + read-write + [30:30] + GPIO7_EDGE_LOW + + + read-write + [29:29] + GPIO7_LEVEL_HIGH + + + read-write + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + GPIO6_EDGE_HIGH + + + read-write + [26:26] + GPIO6_EDGE_LOW + + + read-write + [25:25] + GPIO6_LEVEL_HIGH + + + read-write + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + GPIO5_EDGE_HIGH + + + read-write + [22:22] + GPIO5_EDGE_LOW + + + read-write + [21:21] + GPIO5_LEVEL_HIGH + + + read-write + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + GPIO4_EDGE_HIGH + + + read-write + [18:18] + GPIO4_EDGE_LOW + + + read-write + [17:17] + GPIO4_LEVEL_HIGH + + + read-write + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + GPIO3_EDGE_HIGH + + + read-write + [14:14] + GPIO3_EDGE_LOW + + + read-write + [13:13] + GPIO3_LEVEL_HIGH + + + read-write + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + GPIO2_EDGE_HIGH + + + read-write + [10:10] + GPIO2_EDGE_LOW + + + read-write + [9:9] + GPIO2_LEVEL_HIGH + + + read-write + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + GPIO1_EDGE_HIGH + + + read-write + [6:6] + GPIO1_EDGE_LOW + + + read-write + [5:5] + GPIO1_LEVEL_HIGH + + + read-write + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + GPIO0_EDGE_HIGH + + + read-write + [2:2] + GPIO0_EDGE_LOW + + + read-write + [1:1] + GPIO0_LEVEL_HIGH + + + read-write + [0:0] + GPIO0_LEVEL_LOW + + + PROC0_INTE0 + 0x00000000 + + + 0x0104 + Interrupt Enable for proc0 + + + read-write + [31:31] + GPIO15_EDGE_HIGH + + + read-write + [30:30] + GPIO15_EDGE_LOW + + + read-write + [29:29] + GPIO15_LEVEL_HIGH + + + read-write + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + GPIO14_EDGE_HIGH + + + read-write + [26:26] + GPIO14_EDGE_LOW + + + read-write + [25:25] + GPIO14_LEVEL_HIGH + + + read-write + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + GPIO13_EDGE_HIGH + + + read-write + [22:22] + GPIO13_EDGE_LOW + + + read-write + [21:21] + GPIO13_LEVEL_HIGH + + + read-write + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + GPIO12_EDGE_HIGH + + + read-write + [18:18] + GPIO12_EDGE_LOW + + + read-write + [17:17] + GPIO12_LEVEL_HIGH + + + read-write + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + GPIO11_EDGE_HIGH + + + read-write + [14:14] + GPIO11_EDGE_LOW + + + read-write + [13:13] + GPIO11_LEVEL_HIGH + + + read-write + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + GPIO10_EDGE_HIGH + + + read-write + [10:10] + GPIO10_EDGE_LOW + + + read-write + [9:9] + GPIO10_LEVEL_HIGH + + + read-write + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + GPIO9_EDGE_HIGH + + + read-write + [6:6] + GPIO9_EDGE_LOW + + + read-write + [5:5] + GPIO9_LEVEL_HIGH + + + read-write + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + GPIO8_EDGE_HIGH + + + read-write + [2:2] + GPIO8_EDGE_LOW + + + read-write + [1:1] + GPIO8_LEVEL_HIGH + + + read-write + [0:0] + GPIO8_LEVEL_LOW + + + PROC0_INTE1 + 0x00000000 + + + 0x0108 + Interrupt Enable for proc0 + + + read-write + [31:31] + GPIO23_EDGE_HIGH + + + read-write + [30:30] + GPIO23_EDGE_LOW + + + read-write + [29:29] + GPIO23_LEVEL_HIGH + + + read-write + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + GPIO22_EDGE_HIGH + + + read-write + [26:26] + GPIO22_EDGE_LOW + + + read-write + [25:25] + GPIO22_LEVEL_HIGH + + + read-write + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + GPIO21_EDGE_HIGH + + + read-write + [22:22] + GPIO21_EDGE_LOW + + + read-write + [21:21] + GPIO21_LEVEL_HIGH + + + read-write + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + GPIO20_EDGE_HIGH + + + read-write + [18:18] + GPIO20_EDGE_LOW + + + read-write + [17:17] + GPIO20_LEVEL_HIGH + + + read-write + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + GPIO19_EDGE_HIGH + + + read-write + [14:14] + GPIO19_EDGE_LOW + + + read-write + [13:13] + GPIO19_LEVEL_HIGH + + + read-write + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + GPIO18_EDGE_HIGH + + + read-write + [10:10] + GPIO18_EDGE_LOW + + + read-write + [9:9] + GPIO18_LEVEL_HIGH + + + read-write + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + GPIO17_EDGE_HIGH + + + read-write + [6:6] + GPIO17_EDGE_LOW + + + read-write + [5:5] + GPIO17_LEVEL_HIGH + + + read-write + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + GPIO16_EDGE_HIGH + + + read-write + [2:2] + GPIO16_EDGE_LOW + + + read-write + [1:1] + GPIO16_LEVEL_HIGH + + + read-write + [0:0] + GPIO16_LEVEL_LOW + + + PROC0_INTE2 + 0x00000000 + + + 0x010c + Interrupt Enable for proc0 + + + read-write + [23:23] + GPIO29_EDGE_HIGH + + + read-write + [22:22] + GPIO29_EDGE_LOW + + + read-write + [21:21] + GPIO29_LEVEL_HIGH + + + read-write + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + GPIO28_EDGE_HIGH + + + read-write + [18:18] + GPIO28_EDGE_LOW + + + read-write + [17:17] + GPIO28_LEVEL_HIGH + + + read-write + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + GPIO27_EDGE_HIGH + + + read-write + [14:14] + GPIO27_EDGE_LOW + + + read-write + [13:13] + GPIO27_LEVEL_HIGH + + + read-write + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + GPIO26_EDGE_HIGH + + + read-write + [10:10] + GPIO26_EDGE_LOW + + + read-write + [9:9] + GPIO26_LEVEL_HIGH + + + read-write + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + GPIO25_EDGE_HIGH + + + read-write + [6:6] + GPIO25_EDGE_LOW + + + read-write + [5:5] + GPIO25_LEVEL_HIGH + + + read-write + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + GPIO24_EDGE_HIGH + + + read-write + [2:2] + GPIO24_EDGE_LOW + + + read-write + [1:1] + GPIO24_LEVEL_HIGH + + + read-write + [0:0] + GPIO24_LEVEL_LOW + + + PROC0_INTE3 + 0x00000000 + + + 0x0110 + Interrupt Force for proc0 + + + read-write + [31:31] + GPIO7_EDGE_HIGH + + + read-write + [30:30] + GPIO7_EDGE_LOW + + + read-write + [29:29] + GPIO7_LEVEL_HIGH + + + read-write + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + GPIO6_EDGE_HIGH + + + read-write + [26:26] + GPIO6_EDGE_LOW + + + read-write + [25:25] + GPIO6_LEVEL_HIGH + + + read-write + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + GPIO5_EDGE_HIGH + + + read-write + [22:22] + GPIO5_EDGE_LOW + + + read-write + [21:21] + GPIO5_LEVEL_HIGH + + + read-write + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + GPIO4_EDGE_HIGH + + + read-write + [18:18] + GPIO4_EDGE_LOW + + + read-write + [17:17] + GPIO4_LEVEL_HIGH + + + read-write + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + GPIO3_EDGE_HIGH + + + read-write + [14:14] + GPIO3_EDGE_LOW + + + read-write + [13:13] + GPIO3_LEVEL_HIGH + + + read-write + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + GPIO2_EDGE_HIGH + + + read-write + [10:10] + GPIO2_EDGE_LOW + + + read-write + [9:9] + GPIO2_LEVEL_HIGH + + + read-write + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + GPIO1_EDGE_HIGH + + + read-write + [6:6] + GPIO1_EDGE_LOW + + + read-write + [5:5] + GPIO1_LEVEL_HIGH + + + read-write + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + GPIO0_EDGE_HIGH + + + read-write + [2:2] + GPIO0_EDGE_LOW + + + read-write + [1:1] + GPIO0_LEVEL_HIGH + + + read-write + [0:0] + GPIO0_LEVEL_LOW + + + PROC0_INTF0 + 0x00000000 + + + 0x0114 + Interrupt Force for proc0 + + + read-write + [31:31] + GPIO15_EDGE_HIGH + + + read-write + [30:30] + GPIO15_EDGE_LOW + + + read-write + [29:29] + GPIO15_LEVEL_HIGH + + + read-write + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + GPIO14_EDGE_HIGH + + + read-write + [26:26] + GPIO14_EDGE_LOW + + + read-write + [25:25] + GPIO14_LEVEL_HIGH + + + read-write + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + GPIO13_EDGE_HIGH + + + read-write + [22:22] + GPIO13_EDGE_LOW + + + read-write + [21:21] + GPIO13_LEVEL_HIGH + + + read-write + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + GPIO12_EDGE_HIGH + + + read-write + [18:18] + GPIO12_EDGE_LOW + + + read-write + [17:17] + GPIO12_LEVEL_HIGH + + + read-write + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + GPIO11_EDGE_HIGH + + + read-write + [14:14] + GPIO11_EDGE_LOW + + + read-write + [13:13] + GPIO11_LEVEL_HIGH + + + read-write + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + GPIO10_EDGE_HIGH + + + read-write + [10:10] + GPIO10_EDGE_LOW + + + read-write + [9:9] + GPIO10_LEVEL_HIGH + + + read-write + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + GPIO9_EDGE_HIGH + + + read-write + [6:6] + GPIO9_EDGE_LOW + + + read-write + [5:5] + GPIO9_LEVEL_HIGH + + + read-write + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + GPIO8_EDGE_HIGH + + + read-write + [2:2] + GPIO8_EDGE_LOW + + + read-write + [1:1] + GPIO8_LEVEL_HIGH + + + read-write + [0:0] + GPIO8_LEVEL_LOW + + + PROC0_INTF1 + 0x00000000 + + + 0x0118 + Interrupt Force for proc0 + + + read-write + [31:31] + GPIO23_EDGE_HIGH + + + read-write + [30:30] + GPIO23_EDGE_LOW + + + read-write + [29:29] + GPIO23_LEVEL_HIGH + + + read-write + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + GPIO22_EDGE_HIGH + + + read-write + [26:26] + GPIO22_EDGE_LOW + + + read-write + [25:25] + GPIO22_LEVEL_HIGH + + + read-write + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + GPIO21_EDGE_HIGH + + + read-write + [22:22] + GPIO21_EDGE_LOW + + + read-write + [21:21] + GPIO21_LEVEL_HIGH + + + read-write + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + GPIO20_EDGE_HIGH + + + read-write + [18:18] + GPIO20_EDGE_LOW + + + read-write + [17:17] + GPIO20_LEVEL_HIGH + + + read-write + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + GPIO19_EDGE_HIGH + + + read-write + [14:14] + GPIO19_EDGE_LOW + + + read-write + [13:13] + GPIO19_LEVEL_HIGH + + + read-write + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + GPIO18_EDGE_HIGH + + + read-write + [10:10] + GPIO18_EDGE_LOW + + + read-write + [9:9] + GPIO18_LEVEL_HIGH + + + read-write + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + GPIO17_EDGE_HIGH + + + read-write + [6:6] + GPIO17_EDGE_LOW + + + read-write + [5:5] + GPIO17_LEVEL_HIGH + + + read-write + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + GPIO16_EDGE_HIGH + + + read-write + [2:2] + GPIO16_EDGE_LOW + + + read-write + [1:1] + GPIO16_LEVEL_HIGH + + + read-write + [0:0] + GPIO16_LEVEL_LOW + + + PROC0_INTF2 + 0x00000000 + + + 0x011c + Interrupt Force for proc0 + + + read-write + [23:23] + GPIO29_EDGE_HIGH + + + read-write + [22:22] + GPIO29_EDGE_LOW + + + read-write + [21:21] + GPIO29_LEVEL_HIGH + + + read-write + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + GPIO28_EDGE_HIGH + + + read-write + [18:18] + GPIO28_EDGE_LOW + + + read-write + [17:17] + GPIO28_LEVEL_HIGH + + + read-write + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + GPIO27_EDGE_HIGH + + + read-write + [14:14] + GPIO27_EDGE_LOW + + + read-write + [13:13] + GPIO27_LEVEL_HIGH + + + read-write + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + GPIO26_EDGE_HIGH + + + read-write + [10:10] + GPIO26_EDGE_LOW + + + read-write + [9:9] + GPIO26_LEVEL_HIGH + + + read-write + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + GPIO25_EDGE_HIGH + + + read-write + [6:6] + GPIO25_EDGE_LOW + + + read-write + [5:5] + GPIO25_LEVEL_HIGH + + + read-write + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + GPIO24_EDGE_HIGH + + + read-write + [2:2] + GPIO24_EDGE_LOW + + + read-write + [1:1] + GPIO24_LEVEL_HIGH + + + read-write + [0:0] + GPIO24_LEVEL_LOW + + + PROC0_INTF3 + 0x00000000 + + + 0x0120 + Interrupt status after masking & forcing for proc0 + + + read-only + [31:31] + GPIO7_EDGE_HIGH + + + read-only + [30:30] + GPIO7_EDGE_LOW + + + read-only + [29:29] + GPIO7_LEVEL_HIGH + + + read-only + [28:28] + GPIO7_LEVEL_LOW + + + read-only + [27:27] + GPIO6_EDGE_HIGH + + + read-only + [26:26] + GPIO6_EDGE_LOW + + + read-only + [25:25] + GPIO6_LEVEL_HIGH + + + read-only + [24:24] + GPIO6_LEVEL_LOW + + + read-only + [23:23] + GPIO5_EDGE_HIGH + + + read-only + [22:22] + GPIO5_EDGE_LOW + + + read-only + [21:21] + GPIO5_LEVEL_HIGH + + + read-only + [20:20] + GPIO5_LEVEL_LOW + + + read-only + [19:19] + GPIO4_EDGE_HIGH + + + read-only + [18:18] + GPIO4_EDGE_LOW + + + read-only + [17:17] + GPIO4_LEVEL_HIGH + + + read-only + [16:16] + GPIO4_LEVEL_LOW + + + read-only + [15:15] + GPIO3_EDGE_HIGH + + + read-only + [14:14] + GPIO3_EDGE_LOW + + + read-only + [13:13] + GPIO3_LEVEL_HIGH + + + read-only + [12:12] + GPIO3_LEVEL_LOW + + + read-only + [11:11] + GPIO2_EDGE_HIGH + + + read-only + [10:10] + GPIO2_EDGE_LOW + + + read-only + [9:9] + GPIO2_LEVEL_HIGH + + + read-only + [8:8] + GPIO2_LEVEL_LOW + + + read-only + [7:7] + GPIO1_EDGE_HIGH + + + read-only + [6:6] + GPIO1_EDGE_LOW + + + read-only + [5:5] + GPIO1_LEVEL_HIGH + + + read-only + [4:4] + GPIO1_LEVEL_LOW + + + read-only + [3:3] + GPIO0_EDGE_HIGH + + + read-only + [2:2] + GPIO0_EDGE_LOW + + + read-only + [1:1] + GPIO0_LEVEL_HIGH + + + read-only + [0:0] + GPIO0_LEVEL_LOW + + + PROC0_INTS0 + 0x00000000 + + + 0x0124 + Interrupt status after masking & forcing for proc0 + + + read-only + [31:31] + GPIO15_EDGE_HIGH + + + read-only + [30:30] + GPIO15_EDGE_LOW + + + read-only + [29:29] + GPIO15_LEVEL_HIGH + + + read-only + [28:28] + GPIO15_LEVEL_LOW + + + read-only + [27:27] + GPIO14_EDGE_HIGH + + + read-only + [26:26] + GPIO14_EDGE_LOW + + + read-only + [25:25] + GPIO14_LEVEL_HIGH + + + read-only + [24:24] + GPIO14_LEVEL_LOW + + + read-only + [23:23] + GPIO13_EDGE_HIGH + + + read-only + [22:22] + GPIO13_EDGE_LOW + + + read-only + [21:21] + GPIO13_LEVEL_HIGH + + + read-only + [20:20] + GPIO13_LEVEL_LOW + + + read-only + [19:19] + GPIO12_EDGE_HIGH + + + read-only + [18:18] + GPIO12_EDGE_LOW + + + read-only + [17:17] + GPIO12_LEVEL_HIGH + + + read-only + [16:16] + GPIO12_LEVEL_LOW + + + read-only + [15:15] + GPIO11_EDGE_HIGH + + + read-only + [14:14] + GPIO11_EDGE_LOW + + + read-only + [13:13] + GPIO11_LEVEL_HIGH + + + read-only + [12:12] + GPIO11_LEVEL_LOW + + + read-only + [11:11] + GPIO10_EDGE_HIGH + + + read-only + [10:10] + GPIO10_EDGE_LOW + + + read-only + [9:9] + GPIO10_LEVEL_HIGH + + + read-only + [8:8] + GPIO10_LEVEL_LOW + + + read-only + [7:7] + GPIO9_EDGE_HIGH + + + read-only + [6:6] + GPIO9_EDGE_LOW + + + read-only + [5:5] + GPIO9_LEVEL_HIGH + + + read-only + [4:4] + GPIO9_LEVEL_LOW + + + read-only + [3:3] + GPIO8_EDGE_HIGH + + + read-only + [2:2] + GPIO8_EDGE_LOW + + + read-only + [1:1] + GPIO8_LEVEL_HIGH + + + read-only + [0:0] + GPIO8_LEVEL_LOW + + + PROC0_INTS1 + 0x00000000 + + + 0x0128 + Interrupt status after masking & forcing for proc0 + + + read-only + [31:31] + GPIO23_EDGE_HIGH + + + read-only + [30:30] + GPIO23_EDGE_LOW + + + read-only + [29:29] + GPIO23_LEVEL_HIGH + + + read-only + [28:28] + GPIO23_LEVEL_LOW + + + read-only + [27:27] + GPIO22_EDGE_HIGH + + + read-only + [26:26] + GPIO22_EDGE_LOW + + + read-only + [25:25] + GPIO22_LEVEL_HIGH + + + read-only + [24:24] + GPIO22_LEVEL_LOW + + + read-only + [23:23] + GPIO21_EDGE_HIGH + + + read-only + [22:22] + GPIO21_EDGE_LOW + + + read-only + [21:21] + GPIO21_LEVEL_HIGH + + + read-only + [20:20] + GPIO21_LEVEL_LOW + + + read-only + [19:19] + GPIO20_EDGE_HIGH + + + read-only + [18:18] + GPIO20_EDGE_LOW + + + read-only + [17:17] + GPIO20_LEVEL_HIGH + + + read-only + [16:16] + GPIO20_LEVEL_LOW + + + read-only + [15:15] + GPIO19_EDGE_HIGH + + + read-only + [14:14] + GPIO19_EDGE_LOW + + + read-only + [13:13] + GPIO19_LEVEL_HIGH + + + read-only + [12:12] + GPIO19_LEVEL_LOW + + + read-only + [11:11] + GPIO18_EDGE_HIGH + + + read-only + [10:10] + GPIO18_EDGE_LOW + + + read-only + [9:9] + GPIO18_LEVEL_HIGH + + + read-only + [8:8] + GPIO18_LEVEL_LOW + + + read-only + [7:7] + GPIO17_EDGE_HIGH + + + read-only + [6:6] + GPIO17_EDGE_LOW + + + read-only + [5:5] + GPIO17_LEVEL_HIGH + + + read-only + [4:4] + GPIO17_LEVEL_LOW + + + read-only + [3:3] + GPIO16_EDGE_HIGH + + + read-only + [2:2] + GPIO16_EDGE_LOW + + + read-only + [1:1] + GPIO16_LEVEL_HIGH + + + read-only + [0:0] + GPIO16_LEVEL_LOW + + + PROC0_INTS2 + 0x00000000 + + + 0x012c + Interrupt status after masking & forcing for proc0 + + + read-only + [23:23] + GPIO29_EDGE_HIGH + + + read-only + [22:22] + GPIO29_EDGE_LOW + + + read-only + [21:21] + GPIO29_LEVEL_HIGH + + + read-only + [20:20] + GPIO29_LEVEL_LOW + + + read-only + [19:19] + GPIO28_EDGE_HIGH + + + read-only + [18:18] + GPIO28_EDGE_LOW + + + read-only + [17:17] + GPIO28_LEVEL_HIGH + + + read-only + [16:16] + GPIO28_LEVEL_LOW + + + read-only + [15:15] + GPIO27_EDGE_HIGH + + + read-only + [14:14] + GPIO27_EDGE_LOW + + + read-only + [13:13] + GPIO27_LEVEL_HIGH + + + read-only + [12:12] + GPIO27_LEVEL_LOW + + + read-only + [11:11] + GPIO26_EDGE_HIGH + + + read-only + [10:10] + GPIO26_EDGE_LOW + + + read-only + [9:9] + GPIO26_LEVEL_HIGH + + + read-only + [8:8] + GPIO26_LEVEL_LOW + + + read-only + [7:7] + GPIO25_EDGE_HIGH + + + read-only + [6:6] + GPIO25_EDGE_LOW + + + read-only + [5:5] + GPIO25_LEVEL_HIGH + + + read-only + [4:4] + GPIO25_LEVEL_LOW + + + read-only + [3:3] + GPIO24_EDGE_HIGH + + + read-only + [2:2] + GPIO24_EDGE_LOW + + + read-only + [1:1] + GPIO24_LEVEL_HIGH + + + read-only + [0:0] + GPIO24_LEVEL_LOW + + + PROC0_INTS3 + 0x00000000 + + + 0x0130 + Interrupt Enable for proc1 + + + read-write + [31:31] + GPIO7_EDGE_HIGH + + + read-write + [30:30] + GPIO7_EDGE_LOW + + + read-write + [29:29] + GPIO7_LEVEL_HIGH + + + read-write + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + GPIO6_EDGE_HIGH + + + read-write + [26:26] + GPIO6_EDGE_LOW + + + read-write + [25:25] + GPIO6_LEVEL_HIGH + + + read-write + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + GPIO5_EDGE_HIGH + + + read-write + [22:22] + GPIO5_EDGE_LOW + + + read-write + [21:21] + GPIO5_LEVEL_HIGH + + + read-write + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + GPIO4_EDGE_HIGH + + + read-write + [18:18] + GPIO4_EDGE_LOW + + + read-write + [17:17] + GPIO4_LEVEL_HIGH + + + read-write + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + GPIO3_EDGE_HIGH + + + read-write + [14:14] + GPIO3_EDGE_LOW + + + read-write + [13:13] + GPIO3_LEVEL_HIGH + + + read-write + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + GPIO2_EDGE_HIGH + + + read-write + [10:10] + GPIO2_EDGE_LOW + + + read-write + [9:9] + GPIO2_LEVEL_HIGH + + + read-write + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + GPIO1_EDGE_HIGH + + + read-write + [6:6] + GPIO1_EDGE_LOW + + + read-write + [5:5] + GPIO1_LEVEL_HIGH + + + read-write + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + GPIO0_EDGE_HIGH + + + read-write + [2:2] + GPIO0_EDGE_LOW + + + read-write + [1:1] + GPIO0_LEVEL_HIGH + + + read-write + [0:0] + GPIO0_LEVEL_LOW + + + PROC1_INTE0 + 0x00000000 + + + 0x0134 + Interrupt Enable for proc1 + + + read-write + [31:31] + GPIO15_EDGE_HIGH + + + read-write + [30:30] + GPIO15_EDGE_LOW + + + read-write + [29:29] + GPIO15_LEVEL_HIGH + + + read-write + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + GPIO14_EDGE_HIGH + + + read-write + [26:26] + GPIO14_EDGE_LOW + + + read-write + [25:25] + GPIO14_LEVEL_HIGH + + + read-write + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + GPIO13_EDGE_HIGH + + + read-write + [22:22] + GPIO13_EDGE_LOW + + + read-write + [21:21] + GPIO13_LEVEL_HIGH + + + read-write + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + GPIO12_EDGE_HIGH + + + read-write + [18:18] + GPIO12_EDGE_LOW + + + read-write + [17:17] + GPIO12_LEVEL_HIGH + + + read-write + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + GPIO11_EDGE_HIGH + + + read-write + [14:14] + GPIO11_EDGE_LOW + + + read-write + [13:13] + GPIO11_LEVEL_HIGH + + + read-write + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + GPIO10_EDGE_HIGH + + + read-write + [10:10] + GPIO10_EDGE_LOW + + + read-write + [9:9] + GPIO10_LEVEL_HIGH + + + read-write + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + GPIO9_EDGE_HIGH + + + read-write + [6:6] + GPIO9_EDGE_LOW + + + read-write + [5:5] + GPIO9_LEVEL_HIGH + + + read-write + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + GPIO8_EDGE_HIGH + + + read-write + [2:2] + GPIO8_EDGE_LOW + + + read-write + [1:1] + GPIO8_LEVEL_HIGH + + + read-write + [0:0] + GPIO8_LEVEL_LOW + + + PROC1_INTE1 + 0x00000000 + + + 0x0138 + Interrupt Enable for proc1 + + + read-write + [31:31] + GPIO23_EDGE_HIGH + + + read-write + [30:30] + GPIO23_EDGE_LOW + + + read-write + [29:29] + GPIO23_LEVEL_HIGH + + + read-write + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + GPIO22_EDGE_HIGH + + + read-write + [26:26] + GPIO22_EDGE_LOW + + + read-write + [25:25] + GPIO22_LEVEL_HIGH + + + read-write + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + GPIO21_EDGE_HIGH + + + read-write + [22:22] + GPIO21_EDGE_LOW + + + read-write + [21:21] + GPIO21_LEVEL_HIGH + + + read-write + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + GPIO20_EDGE_HIGH + + + read-write + [18:18] + GPIO20_EDGE_LOW + + + read-write + [17:17] + GPIO20_LEVEL_HIGH + + + read-write + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + GPIO19_EDGE_HIGH + + + read-write + [14:14] + GPIO19_EDGE_LOW + + + read-write + [13:13] + GPIO19_LEVEL_HIGH + + + read-write + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + GPIO18_EDGE_HIGH + + + read-write + [10:10] + GPIO18_EDGE_LOW + + + read-write + [9:9] + GPIO18_LEVEL_HIGH + + + read-write + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + GPIO17_EDGE_HIGH + + + read-write + [6:6] + GPIO17_EDGE_LOW + + + read-write + [5:5] + GPIO17_LEVEL_HIGH + + + read-write + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + GPIO16_EDGE_HIGH + + + read-write + [2:2] + GPIO16_EDGE_LOW + + + read-write + [1:1] + GPIO16_LEVEL_HIGH + + + read-write + [0:0] + GPIO16_LEVEL_LOW + + + PROC1_INTE2 + 0x00000000 + + + 0x013c + Interrupt Enable for proc1 + + + read-write + [23:23] + GPIO29_EDGE_HIGH + + + read-write + [22:22] + GPIO29_EDGE_LOW + + + read-write + [21:21] + GPIO29_LEVEL_HIGH + + + read-write + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + GPIO28_EDGE_HIGH + + + read-write + [18:18] + GPIO28_EDGE_LOW + + + read-write + [17:17] + GPIO28_LEVEL_HIGH + + + read-write + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + GPIO27_EDGE_HIGH + + + read-write + [14:14] + GPIO27_EDGE_LOW + + + read-write + [13:13] + GPIO27_LEVEL_HIGH + + + read-write + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + GPIO26_EDGE_HIGH + + + read-write + [10:10] + GPIO26_EDGE_LOW + + + read-write + [9:9] + GPIO26_LEVEL_HIGH + + + read-write + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + GPIO25_EDGE_HIGH + + + read-write + [6:6] + GPIO25_EDGE_LOW + + + read-write + [5:5] + GPIO25_LEVEL_HIGH + + + read-write + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + GPIO24_EDGE_HIGH + + + read-write + [2:2] + GPIO24_EDGE_LOW + + + read-write + [1:1] + GPIO24_LEVEL_HIGH + + + read-write + [0:0] + GPIO24_LEVEL_LOW + + + PROC1_INTE3 + 0x00000000 + + + 0x0140 + Interrupt Force for proc1 + + + read-write + [31:31] + GPIO7_EDGE_HIGH + + + read-write + [30:30] + GPIO7_EDGE_LOW + + + read-write + [29:29] + GPIO7_LEVEL_HIGH + + + read-write + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + GPIO6_EDGE_HIGH + + + read-write + [26:26] + GPIO6_EDGE_LOW + + + read-write + [25:25] + GPIO6_LEVEL_HIGH + + + read-write + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + GPIO5_EDGE_HIGH + + + read-write + [22:22] + GPIO5_EDGE_LOW + + + read-write + [21:21] + GPIO5_LEVEL_HIGH + + + read-write + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + GPIO4_EDGE_HIGH + + + read-write + [18:18] + GPIO4_EDGE_LOW + + + read-write + [17:17] + GPIO4_LEVEL_HIGH + + + read-write + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + GPIO3_EDGE_HIGH + + + read-write + [14:14] + GPIO3_EDGE_LOW + + + read-write + [13:13] + GPIO3_LEVEL_HIGH + + + read-write + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + GPIO2_EDGE_HIGH + + + read-write + [10:10] + GPIO2_EDGE_LOW + + + read-write + [9:9] + GPIO2_LEVEL_HIGH + + + read-write + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + GPIO1_EDGE_HIGH + + + read-write + [6:6] + GPIO1_EDGE_LOW + + + read-write + [5:5] + GPIO1_LEVEL_HIGH + + + read-write + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + GPIO0_EDGE_HIGH + + + read-write + [2:2] + GPIO0_EDGE_LOW + + + read-write + [1:1] + GPIO0_LEVEL_HIGH + + + read-write + [0:0] + GPIO0_LEVEL_LOW + + + PROC1_INTF0 + 0x00000000 + + + 0x0144 + Interrupt Force for proc1 + + + read-write + [31:31] + GPIO15_EDGE_HIGH + + + read-write + [30:30] + GPIO15_EDGE_LOW + + + read-write + [29:29] + GPIO15_LEVEL_HIGH + + + read-write + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + GPIO14_EDGE_HIGH + + + read-write + [26:26] + GPIO14_EDGE_LOW + + + read-write + [25:25] + GPIO14_LEVEL_HIGH + + + read-write + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + GPIO13_EDGE_HIGH + + + read-write + [22:22] + GPIO13_EDGE_LOW + + + read-write + [21:21] + GPIO13_LEVEL_HIGH + + + read-write + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + GPIO12_EDGE_HIGH + + + read-write + [18:18] + GPIO12_EDGE_LOW + + + read-write + [17:17] + GPIO12_LEVEL_HIGH + + + read-write + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + GPIO11_EDGE_HIGH + + + read-write + [14:14] + GPIO11_EDGE_LOW + + + read-write + [13:13] + GPIO11_LEVEL_HIGH + + + read-write + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + GPIO10_EDGE_HIGH + + + read-write + [10:10] + GPIO10_EDGE_LOW + + + read-write + [9:9] + GPIO10_LEVEL_HIGH + + + read-write + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + GPIO9_EDGE_HIGH + + + read-write + [6:6] + GPIO9_EDGE_LOW + + + read-write + [5:5] + GPIO9_LEVEL_HIGH + + + read-write + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + GPIO8_EDGE_HIGH + + + read-write + [2:2] + GPIO8_EDGE_LOW + + + read-write + [1:1] + GPIO8_LEVEL_HIGH + + + read-write + [0:0] + GPIO8_LEVEL_LOW + + + PROC1_INTF1 + 0x00000000 + + + 0x0148 + Interrupt Force for proc1 + + + read-write + [31:31] + GPIO23_EDGE_HIGH + + + read-write + [30:30] + GPIO23_EDGE_LOW + + + read-write + [29:29] + GPIO23_LEVEL_HIGH + + + read-write + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + GPIO22_EDGE_HIGH + + + read-write + [26:26] + GPIO22_EDGE_LOW + + + read-write + [25:25] + GPIO22_LEVEL_HIGH + + + read-write + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + GPIO21_EDGE_HIGH + + + read-write + [22:22] + GPIO21_EDGE_LOW + + + read-write + [21:21] + GPIO21_LEVEL_HIGH + + + read-write + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + GPIO20_EDGE_HIGH + + + read-write + [18:18] + GPIO20_EDGE_LOW + + + read-write + [17:17] + GPIO20_LEVEL_HIGH + + + read-write + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + GPIO19_EDGE_HIGH + + + read-write + [14:14] + GPIO19_EDGE_LOW + + + read-write + [13:13] + GPIO19_LEVEL_HIGH + + + read-write + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + GPIO18_EDGE_HIGH + + + read-write + [10:10] + GPIO18_EDGE_LOW + + + read-write + [9:9] + GPIO18_LEVEL_HIGH + + + read-write + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + GPIO17_EDGE_HIGH + + + read-write + [6:6] + GPIO17_EDGE_LOW + + + read-write + [5:5] + GPIO17_LEVEL_HIGH + + + read-write + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + GPIO16_EDGE_HIGH + + + read-write + [2:2] + GPIO16_EDGE_LOW + + + read-write + [1:1] + GPIO16_LEVEL_HIGH + + + read-write + [0:0] + GPIO16_LEVEL_LOW + + + PROC1_INTF2 + 0x00000000 + + + 0x014c + Interrupt Force for proc1 + + + read-write + [23:23] + GPIO29_EDGE_HIGH + + + read-write + [22:22] + GPIO29_EDGE_LOW + + + read-write + [21:21] + GPIO29_LEVEL_HIGH + + + read-write + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + GPIO28_EDGE_HIGH + + + read-write + [18:18] + GPIO28_EDGE_LOW + + + read-write + [17:17] + GPIO28_LEVEL_HIGH + + + read-write + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + GPIO27_EDGE_HIGH + + + read-write + [14:14] + GPIO27_EDGE_LOW + + + read-write + [13:13] + GPIO27_LEVEL_HIGH + + + read-write + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + GPIO26_EDGE_HIGH + + + read-write + [10:10] + GPIO26_EDGE_LOW + + + read-write + [9:9] + GPIO26_LEVEL_HIGH + + + read-write + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + GPIO25_EDGE_HIGH + + + read-write + [6:6] + GPIO25_EDGE_LOW + + + read-write + [5:5] + GPIO25_LEVEL_HIGH + + + read-write + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + GPIO24_EDGE_HIGH + + + read-write + [2:2] + GPIO24_EDGE_LOW + + + read-write + [1:1] + GPIO24_LEVEL_HIGH + + + read-write + [0:0] + GPIO24_LEVEL_LOW + + + PROC1_INTF3 + 0x00000000 + + + 0x0150 + Interrupt status after masking & forcing for proc1 + + + read-only + [31:31] + GPIO7_EDGE_HIGH + + + read-only + [30:30] + GPIO7_EDGE_LOW + + + read-only + [29:29] + GPIO7_LEVEL_HIGH + + + read-only + [28:28] + GPIO7_LEVEL_LOW + + + read-only + [27:27] + GPIO6_EDGE_HIGH + + + read-only + [26:26] + GPIO6_EDGE_LOW + + + read-only + [25:25] + GPIO6_LEVEL_HIGH + + + read-only + [24:24] + GPIO6_LEVEL_LOW + + + read-only + [23:23] + GPIO5_EDGE_HIGH + + + read-only + [22:22] + GPIO5_EDGE_LOW + + + read-only + [21:21] + GPIO5_LEVEL_HIGH + + + read-only + [20:20] + GPIO5_LEVEL_LOW + + + read-only + [19:19] + GPIO4_EDGE_HIGH + + + read-only + [18:18] + GPIO4_EDGE_LOW + + + read-only + [17:17] + GPIO4_LEVEL_HIGH + + + read-only + [16:16] + GPIO4_LEVEL_LOW + + + read-only + [15:15] + GPIO3_EDGE_HIGH + + + read-only + [14:14] + GPIO3_EDGE_LOW + + + read-only + [13:13] + GPIO3_LEVEL_HIGH + + + read-only + [12:12] + GPIO3_LEVEL_LOW + + + read-only + [11:11] + GPIO2_EDGE_HIGH + + + read-only + [10:10] + GPIO2_EDGE_LOW + + + read-only + [9:9] + GPIO2_LEVEL_HIGH + + + read-only + [8:8] + GPIO2_LEVEL_LOW + + + read-only + [7:7] + GPIO1_EDGE_HIGH + + + read-only + [6:6] + GPIO1_EDGE_LOW + + + read-only + [5:5] + GPIO1_LEVEL_HIGH + + + read-only + [4:4] + GPIO1_LEVEL_LOW + + + read-only + [3:3] + GPIO0_EDGE_HIGH + + + read-only + [2:2] + GPIO0_EDGE_LOW + + + read-only + [1:1] + GPIO0_LEVEL_HIGH + + + read-only + [0:0] + GPIO0_LEVEL_LOW + + + PROC1_INTS0 + 0x00000000 + + + 0x0154 + Interrupt status after masking & forcing for proc1 + + + read-only + [31:31] + GPIO15_EDGE_HIGH + + + read-only + [30:30] + GPIO15_EDGE_LOW + + + read-only + [29:29] + GPIO15_LEVEL_HIGH + + + read-only + [28:28] + GPIO15_LEVEL_LOW + + + read-only + [27:27] + GPIO14_EDGE_HIGH + + + read-only + [26:26] + GPIO14_EDGE_LOW + + + read-only + [25:25] + GPIO14_LEVEL_HIGH + + + read-only + [24:24] + GPIO14_LEVEL_LOW + + + read-only + [23:23] + GPIO13_EDGE_HIGH + + + read-only + [22:22] + GPIO13_EDGE_LOW + + + read-only + [21:21] + GPIO13_LEVEL_HIGH + + + read-only + [20:20] + GPIO13_LEVEL_LOW + + + read-only + [19:19] + GPIO12_EDGE_HIGH + + + read-only + [18:18] + GPIO12_EDGE_LOW + + + read-only + [17:17] + GPIO12_LEVEL_HIGH + + + read-only + [16:16] + GPIO12_LEVEL_LOW + + + read-only + [15:15] + GPIO11_EDGE_HIGH + + + read-only + [14:14] + GPIO11_EDGE_LOW + + + read-only + [13:13] + GPIO11_LEVEL_HIGH + + + read-only + [12:12] + GPIO11_LEVEL_LOW + + + read-only + [11:11] + GPIO10_EDGE_HIGH + + + read-only + [10:10] + GPIO10_EDGE_LOW + + + read-only + [9:9] + GPIO10_LEVEL_HIGH + + + read-only + [8:8] + GPIO10_LEVEL_LOW + + + read-only + [7:7] + GPIO9_EDGE_HIGH + + + read-only + [6:6] + GPIO9_EDGE_LOW + + + read-only + [5:5] + GPIO9_LEVEL_HIGH + + + read-only + [4:4] + GPIO9_LEVEL_LOW + + + read-only + [3:3] + GPIO8_EDGE_HIGH + + + read-only + [2:2] + GPIO8_EDGE_LOW + + + read-only + [1:1] + GPIO8_LEVEL_HIGH + + + read-only + [0:0] + GPIO8_LEVEL_LOW + + + PROC1_INTS1 + 0x00000000 + + + 0x0158 + Interrupt status after masking & forcing for proc1 + + + read-only + [31:31] + GPIO23_EDGE_HIGH + + + read-only + [30:30] + GPIO23_EDGE_LOW + + + read-only + [29:29] + GPIO23_LEVEL_HIGH + + + read-only + [28:28] + GPIO23_LEVEL_LOW + + + read-only + [27:27] + GPIO22_EDGE_HIGH + + + read-only + [26:26] + GPIO22_EDGE_LOW + + + read-only + [25:25] + GPIO22_LEVEL_HIGH + + + read-only + [24:24] + GPIO22_LEVEL_LOW + + + read-only + [23:23] + GPIO21_EDGE_HIGH + + + read-only + [22:22] + GPIO21_EDGE_LOW + + + read-only + [21:21] + GPIO21_LEVEL_HIGH + + + read-only + [20:20] + GPIO21_LEVEL_LOW + + + read-only + [19:19] + GPIO20_EDGE_HIGH + + + read-only + [18:18] + GPIO20_EDGE_LOW + + + read-only + [17:17] + GPIO20_LEVEL_HIGH + + + read-only + [16:16] + GPIO20_LEVEL_LOW + + + read-only + [15:15] + GPIO19_EDGE_HIGH + + + read-only + [14:14] + GPIO19_EDGE_LOW + + + read-only + [13:13] + GPIO19_LEVEL_HIGH + + + read-only + [12:12] + GPIO19_LEVEL_LOW + + + read-only + [11:11] + GPIO18_EDGE_HIGH + + + read-only + [10:10] + GPIO18_EDGE_LOW + + + read-only + [9:9] + GPIO18_LEVEL_HIGH + + + read-only + [8:8] + GPIO18_LEVEL_LOW + + + read-only + [7:7] + GPIO17_EDGE_HIGH + + + read-only + [6:6] + GPIO17_EDGE_LOW + + + read-only + [5:5] + GPIO17_LEVEL_HIGH + + + read-only + [4:4] + GPIO17_LEVEL_LOW + + + read-only + [3:3] + GPIO16_EDGE_HIGH + + + read-only + [2:2] + GPIO16_EDGE_LOW + + + read-only + [1:1] + GPIO16_LEVEL_HIGH + + + read-only + [0:0] + GPIO16_LEVEL_LOW + + + PROC1_INTS2 + 0x00000000 + + + 0x015c + Interrupt status after masking & forcing for proc1 + + + read-only + [23:23] + GPIO29_EDGE_HIGH + + + read-only + [22:22] + GPIO29_EDGE_LOW + + + read-only + [21:21] + GPIO29_LEVEL_HIGH + + + read-only + [20:20] + GPIO29_LEVEL_LOW + + + read-only + [19:19] + GPIO28_EDGE_HIGH + + + read-only + [18:18] + GPIO28_EDGE_LOW + + + read-only + [17:17] + GPIO28_LEVEL_HIGH + + + read-only + [16:16] + GPIO28_LEVEL_LOW + + + read-only + [15:15] + GPIO27_EDGE_HIGH + + + read-only + [14:14] + GPIO27_EDGE_LOW + + + read-only + [13:13] + GPIO27_LEVEL_HIGH + + + read-only + [12:12] + GPIO27_LEVEL_LOW + + + read-only + [11:11] + GPIO26_EDGE_HIGH + + + read-only + [10:10] + GPIO26_EDGE_LOW + + + read-only + [9:9] + GPIO26_LEVEL_HIGH + + + read-only + [8:8] + GPIO26_LEVEL_LOW + + + read-only + [7:7] + GPIO25_EDGE_HIGH + + + read-only + [6:6] + GPIO25_EDGE_LOW + + + read-only + [5:5] + GPIO25_LEVEL_HIGH + + + read-only + [4:4] + GPIO25_LEVEL_LOW + + + read-only + [3:3] + GPIO24_EDGE_HIGH + + + read-only + [2:2] + GPIO24_EDGE_LOW + + + read-only + [1:1] + GPIO24_LEVEL_HIGH + + + read-only + [0:0] + GPIO24_LEVEL_LOW + + + PROC1_INTS3 + 0x00000000 + + + 0x0160 + Interrupt Enable for dormant_wake + + + read-write + [31:31] + GPIO7_EDGE_HIGH + + + read-write + [30:30] + GPIO7_EDGE_LOW + + + read-write + [29:29] + GPIO7_LEVEL_HIGH + + + read-write + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + GPIO6_EDGE_HIGH + + + read-write + [26:26] + GPIO6_EDGE_LOW + + + read-write + [25:25] + GPIO6_LEVEL_HIGH + + + read-write + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + GPIO5_EDGE_HIGH + + + read-write + [22:22] + GPIO5_EDGE_LOW + + + read-write + [21:21] + GPIO5_LEVEL_HIGH + + + read-write + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + GPIO4_EDGE_HIGH + + + read-write + [18:18] + GPIO4_EDGE_LOW + + + read-write + [17:17] + GPIO4_LEVEL_HIGH + + + read-write + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + GPIO3_EDGE_HIGH + + + read-write + [14:14] + GPIO3_EDGE_LOW + + + read-write + [13:13] + GPIO3_LEVEL_HIGH + + + read-write + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + GPIO2_EDGE_HIGH + + + read-write + [10:10] + GPIO2_EDGE_LOW + + + read-write + [9:9] + GPIO2_LEVEL_HIGH + + + read-write + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + GPIO1_EDGE_HIGH + + + read-write + [6:6] + GPIO1_EDGE_LOW + + + read-write + [5:5] + GPIO1_LEVEL_HIGH + + + read-write + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + GPIO0_EDGE_HIGH + + + read-write + [2:2] + GPIO0_EDGE_LOW + + + read-write + [1:1] + GPIO0_LEVEL_HIGH + + + read-write + [0:0] + GPIO0_LEVEL_LOW + + + DORMANT_WAKE_INTE0 + 0x00000000 + + + 0x0164 + Interrupt Enable for dormant_wake + + + read-write + [31:31] + GPIO15_EDGE_HIGH + + + read-write + [30:30] + GPIO15_EDGE_LOW + + + read-write + [29:29] + GPIO15_LEVEL_HIGH + + + read-write + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + GPIO14_EDGE_HIGH + + + read-write + [26:26] + GPIO14_EDGE_LOW + + + read-write + [25:25] + GPIO14_LEVEL_HIGH + + + read-write + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + GPIO13_EDGE_HIGH + + + read-write + [22:22] + GPIO13_EDGE_LOW + + + read-write + [21:21] + GPIO13_LEVEL_HIGH + + + read-write + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + GPIO12_EDGE_HIGH + + + read-write + [18:18] + GPIO12_EDGE_LOW + + + read-write + [17:17] + GPIO12_LEVEL_HIGH + + + read-write + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + GPIO11_EDGE_HIGH + + + read-write + [14:14] + GPIO11_EDGE_LOW + + + read-write + [13:13] + GPIO11_LEVEL_HIGH + + + read-write + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + GPIO10_EDGE_HIGH + + + read-write + [10:10] + GPIO10_EDGE_LOW + + + read-write + [9:9] + GPIO10_LEVEL_HIGH + + + read-write + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + GPIO9_EDGE_HIGH + + + read-write + [6:6] + GPIO9_EDGE_LOW + + + read-write + [5:5] + GPIO9_LEVEL_HIGH + + + read-write + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + GPIO8_EDGE_HIGH + + + read-write + [2:2] + GPIO8_EDGE_LOW + + + read-write + [1:1] + GPIO8_LEVEL_HIGH + + + read-write + [0:0] + GPIO8_LEVEL_LOW + + + DORMANT_WAKE_INTE1 + 0x00000000 + + + 0x0168 + Interrupt Enable for dormant_wake + + + read-write + [31:31] + GPIO23_EDGE_HIGH + + + read-write + [30:30] + GPIO23_EDGE_LOW + + + read-write + [29:29] + GPIO23_LEVEL_HIGH + + + read-write + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + GPIO22_EDGE_HIGH + + + read-write + [26:26] + GPIO22_EDGE_LOW + + + read-write + [25:25] + GPIO22_LEVEL_HIGH + + + read-write + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + GPIO21_EDGE_HIGH + + + read-write + [22:22] + GPIO21_EDGE_LOW + + + read-write + [21:21] + GPIO21_LEVEL_HIGH + + + read-write + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + GPIO20_EDGE_HIGH + + + read-write + [18:18] + GPIO20_EDGE_LOW + + + read-write + [17:17] + GPIO20_LEVEL_HIGH + + + read-write + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + GPIO19_EDGE_HIGH + + + read-write + [14:14] + GPIO19_EDGE_LOW + + + read-write + [13:13] + GPIO19_LEVEL_HIGH + + + read-write + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + GPIO18_EDGE_HIGH + + + read-write + [10:10] + GPIO18_EDGE_LOW + + + read-write + [9:9] + GPIO18_LEVEL_HIGH + + + read-write + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + GPIO17_EDGE_HIGH + + + read-write + [6:6] + GPIO17_EDGE_LOW + + + read-write + [5:5] + GPIO17_LEVEL_HIGH + + + read-write + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + GPIO16_EDGE_HIGH + + + read-write + [2:2] + GPIO16_EDGE_LOW + + + read-write + [1:1] + GPIO16_LEVEL_HIGH + + + read-write + [0:0] + GPIO16_LEVEL_LOW + + + DORMANT_WAKE_INTE2 + 0x00000000 + + + 0x016c + Interrupt Enable for dormant_wake + + + read-write + [23:23] + GPIO29_EDGE_HIGH + + + read-write + [22:22] + GPIO29_EDGE_LOW + + + read-write + [21:21] + GPIO29_LEVEL_HIGH + + + read-write + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + GPIO28_EDGE_HIGH + + + read-write + [18:18] + GPIO28_EDGE_LOW + + + read-write + [17:17] + GPIO28_LEVEL_HIGH + + + read-write + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + GPIO27_EDGE_HIGH + + + read-write + [14:14] + GPIO27_EDGE_LOW + + + read-write + [13:13] + GPIO27_LEVEL_HIGH + + + read-write + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + GPIO26_EDGE_HIGH + + + read-write + [10:10] + GPIO26_EDGE_LOW + + + read-write + [9:9] + GPIO26_LEVEL_HIGH + + + read-write + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + GPIO25_EDGE_HIGH + + + read-write + [6:6] + GPIO25_EDGE_LOW + + + read-write + [5:5] + GPIO25_LEVEL_HIGH + + + read-write + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + GPIO24_EDGE_HIGH + + + read-write + [2:2] + GPIO24_EDGE_LOW + + + read-write + [1:1] + GPIO24_LEVEL_HIGH + + + read-write + [0:0] + GPIO24_LEVEL_LOW + + + DORMANT_WAKE_INTE3 + 0x00000000 + + + 0x0170 + Interrupt Force for dormant_wake + + + read-write + [31:31] + GPIO7_EDGE_HIGH + + + read-write + [30:30] + GPIO7_EDGE_LOW + + + read-write + [29:29] + GPIO7_LEVEL_HIGH + + + read-write + [28:28] + GPIO7_LEVEL_LOW + + + read-write + [27:27] + GPIO6_EDGE_HIGH + + + read-write + [26:26] + GPIO6_EDGE_LOW + + + read-write + [25:25] + GPIO6_LEVEL_HIGH + + + read-write + [24:24] + GPIO6_LEVEL_LOW + + + read-write + [23:23] + GPIO5_EDGE_HIGH + + + read-write + [22:22] + GPIO5_EDGE_LOW + + + read-write + [21:21] + GPIO5_LEVEL_HIGH + + + read-write + [20:20] + GPIO5_LEVEL_LOW + + + read-write + [19:19] + GPIO4_EDGE_HIGH + + + read-write + [18:18] + GPIO4_EDGE_LOW + + + read-write + [17:17] + GPIO4_LEVEL_HIGH + + + read-write + [16:16] + GPIO4_LEVEL_LOW + + + read-write + [15:15] + GPIO3_EDGE_HIGH + + + read-write + [14:14] + GPIO3_EDGE_LOW + + + read-write + [13:13] + GPIO3_LEVEL_HIGH + + + read-write + [12:12] + GPIO3_LEVEL_LOW + + + read-write + [11:11] + GPIO2_EDGE_HIGH + + + read-write + [10:10] + GPIO2_EDGE_LOW + + + read-write + [9:9] + GPIO2_LEVEL_HIGH + + + read-write + [8:8] + GPIO2_LEVEL_LOW + + + read-write + [7:7] + GPIO1_EDGE_HIGH + + + read-write + [6:6] + GPIO1_EDGE_LOW + + + read-write + [5:5] + GPIO1_LEVEL_HIGH + + + read-write + [4:4] + GPIO1_LEVEL_LOW + + + read-write + [3:3] + GPIO0_EDGE_HIGH + + + read-write + [2:2] + GPIO0_EDGE_LOW + + + read-write + [1:1] + GPIO0_LEVEL_HIGH + + + read-write + [0:0] + GPIO0_LEVEL_LOW + + + DORMANT_WAKE_INTF0 + 0x00000000 + + + 0x0174 + Interrupt Force for dormant_wake + + + read-write + [31:31] + GPIO15_EDGE_HIGH + + + read-write + [30:30] + GPIO15_EDGE_LOW + + + read-write + [29:29] + GPIO15_LEVEL_HIGH + + + read-write + [28:28] + GPIO15_LEVEL_LOW + + + read-write + [27:27] + GPIO14_EDGE_HIGH + + + read-write + [26:26] + GPIO14_EDGE_LOW + + + read-write + [25:25] + GPIO14_LEVEL_HIGH + + + read-write + [24:24] + GPIO14_LEVEL_LOW + + + read-write + [23:23] + GPIO13_EDGE_HIGH + + + read-write + [22:22] + GPIO13_EDGE_LOW + + + read-write + [21:21] + GPIO13_LEVEL_HIGH + + + read-write + [20:20] + GPIO13_LEVEL_LOW + + + read-write + [19:19] + GPIO12_EDGE_HIGH + + + read-write + [18:18] + GPIO12_EDGE_LOW + + + read-write + [17:17] + GPIO12_LEVEL_HIGH + + + read-write + [16:16] + GPIO12_LEVEL_LOW + + + read-write + [15:15] + GPIO11_EDGE_HIGH + + + read-write + [14:14] + GPIO11_EDGE_LOW + + + read-write + [13:13] + GPIO11_LEVEL_HIGH + + + read-write + [12:12] + GPIO11_LEVEL_LOW + + + read-write + [11:11] + GPIO10_EDGE_HIGH + + + read-write + [10:10] + GPIO10_EDGE_LOW + + + read-write + [9:9] + GPIO10_LEVEL_HIGH + + + read-write + [8:8] + GPIO10_LEVEL_LOW + + + read-write + [7:7] + GPIO9_EDGE_HIGH + + + read-write + [6:6] + GPIO9_EDGE_LOW + + + read-write + [5:5] + GPIO9_LEVEL_HIGH + + + read-write + [4:4] + GPIO9_LEVEL_LOW + + + read-write + [3:3] + GPIO8_EDGE_HIGH + + + read-write + [2:2] + GPIO8_EDGE_LOW + + + read-write + [1:1] + GPIO8_LEVEL_HIGH + + + read-write + [0:0] + GPIO8_LEVEL_LOW + + + DORMANT_WAKE_INTF1 + 0x00000000 + + + 0x0178 + Interrupt Force for dormant_wake + + + read-write + [31:31] + GPIO23_EDGE_HIGH + + + read-write + [30:30] + GPIO23_EDGE_LOW + + + read-write + [29:29] + GPIO23_LEVEL_HIGH + + + read-write + [28:28] + GPIO23_LEVEL_LOW + + + read-write + [27:27] + GPIO22_EDGE_HIGH + + + read-write + [26:26] + GPIO22_EDGE_LOW + + + read-write + [25:25] + GPIO22_LEVEL_HIGH + + + read-write + [24:24] + GPIO22_LEVEL_LOW + + + read-write + [23:23] + GPIO21_EDGE_HIGH + + + read-write + [22:22] + GPIO21_EDGE_LOW + + + read-write + [21:21] + GPIO21_LEVEL_HIGH + + + read-write + [20:20] + GPIO21_LEVEL_LOW + + + read-write + [19:19] + GPIO20_EDGE_HIGH + + + read-write + [18:18] + GPIO20_EDGE_LOW + + + read-write + [17:17] + GPIO20_LEVEL_HIGH + + + read-write + [16:16] + GPIO20_LEVEL_LOW + + + read-write + [15:15] + GPIO19_EDGE_HIGH + + + read-write + [14:14] + GPIO19_EDGE_LOW + + + read-write + [13:13] + GPIO19_LEVEL_HIGH + + + read-write + [12:12] + GPIO19_LEVEL_LOW + + + read-write + [11:11] + GPIO18_EDGE_HIGH + + + read-write + [10:10] + GPIO18_EDGE_LOW + + + read-write + [9:9] + GPIO18_LEVEL_HIGH + + + read-write + [8:8] + GPIO18_LEVEL_LOW + + + read-write + [7:7] + GPIO17_EDGE_HIGH + + + read-write + [6:6] + GPIO17_EDGE_LOW + + + read-write + [5:5] + GPIO17_LEVEL_HIGH + + + read-write + [4:4] + GPIO17_LEVEL_LOW + + + read-write + [3:3] + GPIO16_EDGE_HIGH + + + read-write + [2:2] + GPIO16_EDGE_LOW + + + read-write + [1:1] + GPIO16_LEVEL_HIGH + + + read-write + [0:0] + GPIO16_LEVEL_LOW + + + DORMANT_WAKE_INTF2 + 0x00000000 + + + 0x017c + Interrupt Force for dormant_wake + + + read-write + [23:23] + GPIO29_EDGE_HIGH + + + read-write + [22:22] + GPIO29_EDGE_LOW + + + read-write + [21:21] + GPIO29_LEVEL_HIGH + + + read-write + [20:20] + GPIO29_LEVEL_LOW + + + read-write + [19:19] + GPIO28_EDGE_HIGH + + + read-write + [18:18] + GPIO28_EDGE_LOW + + + read-write + [17:17] + GPIO28_LEVEL_HIGH + + + read-write + [16:16] + GPIO28_LEVEL_LOW + + + read-write + [15:15] + GPIO27_EDGE_HIGH + + + read-write + [14:14] + GPIO27_EDGE_LOW + + + read-write + [13:13] + GPIO27_LEVEL_HIGH + + + read-write + [12:12] + GPIO27_LEVEL_LOW + + + read-write + [11:11] + GPIO26_EDGE_HIGH + + + read-write + [10:10] + GPIO26_EDGE_LOW + + + read-write + [9:9] + GPIO26_LEVEL_HIGH + + + read-write + [8:8] + GPIO26_LEVEL_LOW + + + read-write + [7:7] + GPIO25_EDGE_HIGH + + + read-write + [6:6] + GPIO25_EDGE_LOW + + + read-write + [5:5] + GPIO25_LEVEL_HIGH + + + read-write + [4:4] + GPIO25_LEVEL_LOW + + + read-write + [3:3] + GPIO24_EDGE_HIGH + + + read-write + [2:2] + GPIO24_EDGE_LOW + + + read-write + [1:1] + GPIO24_LEVEL_HIGH + + + read-write + [0:0] + GPIO24_LEVEL_LOW + + + DORMANT_WAKE_INTF3 + 0x00000000 + + + 0x0180 + Interrupt status after masking & forcing for dormant_wake + + + read-only + [31:31] + GPIO7_EDGE_HIGH + + + read-only + [30:30] + GPIO7_EDGE_LOW + + + read-only + [29:29] + GPIO7_LEVEL_HIGH + + + read-only + [28:28] + GPIO7_LEVEL_LOW + + + read-only + [27:27] + GPIO6_EDGE_HIGH + + + read-only + [26:26] + GPIO6_EDGE_LOW + + + read-only + [25:25] + GPIO6_LEVEL_HIGH + + + read-only + [24:24] + GPIO6_LEVEL_LOW + + + read-only + [23:23] + GPIO5_EDGE_HIGH + + + read-only + [22:22] + GPIO5_EDGE_LOW + + + read-only + [21:21] + GPIO5_LEVEL_HIGH + + + read-only + [20:20] + GPIO5_LEVEL_LOW + + + read-only + [19:19] + GPIO4_EDGE_HIGH + + + read-only + [18:18] + GPIO4_EDGE_LOW + + + read-only + [17:17] + GPIO4_LEVEL_HIGH + + + read-only + [16:16] + GPIO4_LEVEL_LOW + + + read-only + [15:15] + GPIO3_EDGE_HIGH + + + read-only + [14:14] + GPIO3_EDGE_LOW + + + read-only + [13:13] + GPIO3_LEVEL_HIGH + + + read-only + [12:12] + GPIO3_LEVEL_LOW + + + read-only + [11:11] + GPIO2_EDGE_HIGH + + + read-only + [10:10] + GPIO2_EDGE_LOW + + + read-only + [9:9] + GPIO2_LEVEL_HIGH + + + read-only + [8:8] + GPIO2_LEVEL_LOW + + + read-only + [7:7] + GPIO1_EDGE_HIGH + + + read-only + [6:6] + GPIO1_EDGE_LOW + + + read-only + [5:5] + GPIO1_LEVEL_HIGH + + + read-only + [4:4] + GPIO1_LEVEL_LOW + + + read-only + [3:3] + GPIO0_EDGE_HIGH + + + read-only + [2:2] + GPIO0_EDGE_LOW + + + read-only + [1:1] + GPIO0_LEVEL_HIGH + + + read-only + [0:0] + GPIO0_LEVEL_LOW + + + DORMANT_WAKE_INTS0 + 0x00000000 + + + 0x0184 + Interrupt status after masking & forcing for dormant_wake + + + read-only + [31:31] + GPIO15_EDGE_HIGH + + + read-only + [30:30] + GPIO15_EDGE_LOW + + + read-only + [29:29] + GPIO15_LEVEL_HIGH + + + read-only + [28:28] + GPIO15_LEVEL_LOW + + + read-only + [27:27] + GPIO14_EDGE_HIGH + + + read-only + [26:26] + GPIO14_EDGE_LOW + + + read-only + [25:25] + GPIO14_LEVEL_HIGH + + + read-only + [24:24] + GPIO14_LEVEL_LOW + + + read-only + [23:23] + GPIO13_EDGE_HIGH + + + read-only + [22:22] + GPIO13_EDGE_LOW + + + read-only + [21:21] + GPIO13_LEVEL_HIGH + + + read-only + [20:20] + GPIO13_LEVEL_LOW + + + read-only + [19:19] + GPIO12_EDGE_HIGH + + + read-only + [18:18] + GPIO12_EDGE_LOW + + + read-only + [17:17] + GPIO12_LEVEL_HIGH + + + read-only + [16:16] + GPIO12_LEVEL_LOW + + + read-only + [15:15] + GPIO11_EDGE_HIGH + + + read-only + [14:14] + GPIO11_EDGE_LOW + + + read-only + [13:13] + GPIO11_LEVEL_HIGH + + + read-only + [12:12] + GPIO11_LEVEL_LOW + + + read-only + [11:11] + GPIO10_EDGE_HIGH + + + read-only + [10:10] + GPIO10_EDGE_LOW + + + read-only + [9:9] + GPIO10_LEVEL_HIGH + + + read-only + [8:8] + GPIO10_LEVEL_LOW + + + read-only + [7:7] + GPIO9_EDGE_HIGH + + + read-only + [6:6] + GPIO9_EDGE_LOW + + + read-only + [5:5] + GPIO9_LEVEL_HIGH + + + read-only + [4:4] + GPIO9_LEVEL_LOW + + + read-only + [3:3] + GPIO8_EDGE_HIGH + + + read-only + [2:2] + GPIO8_EDGE_LOW + + + read-only + [1:1] + GPIO8_LEVEL_HIGH + + + read-only + [0:0] + GPIO8_LEVEL_LOW + + + DORMANT_WAKE_INTS1 + 0x00000000 + + + 0x0188 + Interrupt status after masking & forcing for dormant_wake + + + read-only + [31:31] + GPIO23_EDGE_HIGH + + + read-only + [30:30] + GPIO23_EDGE_LOW + + + read-only + [29:29] + GPIO23_LEVEL_HIGH + + + read-only + [28:28] + GPIO23_LEVEL_LOW + + + read-only + [27:27] + GPIO22_EDGE_HIGH + + + read-only + [26:26] + GPIO22_EDGE_LOW + + + read-only + [25:25] + GPIO22_LEVEL_HIGH + + + read-only + [24:24] + GPIO22_LEVEL_LOW + + + read-only + [23:23] + GPIO21_EDGE_HIGH + + + read-only + [22:22] + GPIO21_EDGE_LOW + + + read-only + [21:21] + GPIO21_LEVEL_HIGH + + + read-only + [20:20] + GPIO21_LEVEL_LOW + + + read-only + [19:19] + GPIO20_EDGE_HIGH + + + read-only + [18:18] + GPIO20_EDGE_LOW + + + read-only + [17:17] + GPIO20_LEVEL_HIGH + + + read-only + [16:16] + GPIO20_LEVEL_LOW + + + read-only + [15:15] + GPIO19_EDGE_HIGH + + + read-only + [14:14] + GPIO19_EDGE_LOW + + + read-only + [13:13] + GPIO19_LEVEL_HIGH + + + read-only + [12:12] + GPIO19_LEVEL_LOW + + + read-only + [11:11] + GPIO18_EDGE_HIGH + + + read-only + [10:10] + GPIO18_EDGE_LOW + + + read-only + [9:9] + GPIO18_LEVEL_HIGH + + + read-only + [8:8] + GPIO18_LEVEL_LOW + + + read-only + [7:7] + GPIO17_EDGE_HIGH + + + read-only + [6:6] + GPIO17_EDGE_LOW + + + read-only + [5:5] + GPIO17_LEVEL_HIGH + + + read-only + [4:4] + GPIO17_LEVEL_LOW + + + read-only + [3:3] + GPIO16_EDGE_HIGH + + + read-only + [2:2] + GPIO16_EDGE_LOW + + + read-only + [1:1] + GPIO16_LEVEL_HIGH + + + read-only + [0:0] + GPIO16_LEVEL_LOW + + + DORMANT_WAKE_INTS2 + 0x00000000 + + + 0x018c + Interrupt status after masking & forcing for dormant_wake + + + read-only + [23:23] + GPIO29_EDGE_HIGH + + + read-only + [22:22] + GPIO29_EDGE_LOW + + + read-only + [21:21] + GPIO29_LEVEL_HIGH + + + read-only + [20:20] + GPIO29_LEVEL_LOW + + + read-only + [19:19] + GPIO28_EDGE_HIGH + + + read-only + [18:18] + GPIO28_EDGE_LOW + + + read-only + [17:17] + GPIO28_LEVEL_HIGH + + + read-only + [16:16] + GPIO28_LEVEL_LOW + + + read-only + [15:15] + GPIO27_EDGE_HIGH + + + read-only + [14:14] + GPIO27_EDGE_LOW + + + read-only + [13:13] + GPIO27_LEVEL_HIGH + + + read-only + [12:12] + GPIO27_LEVEL_LOW + + + read-only + [11:11] + GPIO26_EDGE_HIGH + + + read-only + [10:10] + GPIO26_EDGE_LOW + + + read-only + [9:9] + GPIO26_LEVEL_HIGH + + + read-only + [8:8] + GPIO26_LEVEL_LOW + + + read-only + [7:7] + GPIO25_EDGE_HIGH + + + read-only + [6:6] + GPIO25_EDGE_LOW + + + read-only + [5:5] + GPIO25_LEVEL_HIGH + + + read-only + [4:4] + GPIO25_LEVEL_LOW + + + read-only + [3:3] + GPIO24_EDGE_HIGH + + + read-only + [2:2] + GPIO24_EDGE_LOW + + + read-only + [1:1] + GPIO24_LEVEL_HIGH + + + read-only + [0:0] + GPIO24_LEVEL_LOW + + + DORMANT_WAKE_INTS3 + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40018000 + + IO_IRQ_QSPI + 14 + + IO_QSPI + + + 0x0000 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO_QSPI_SCLK_STATUS + 0x00000000 + + + 0x0004 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + xip_sclk + 0 + + + sio_30 + 5 + + + null + 31 + + + FUNCSEL + + + GPIO_QSPI_SCLK_CTRL + 0x0000001f + + + 0x0008 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO_QSPI_SS_STATUS + 0x00000000 + + + 0x000c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + xip_ss_n + 0 + + + sio_31 + 5 + + + null + 31 + + + FUNCSEL + + + GPIO_QSPI_SS_CTRL + 0x0000001f + + + 0x0010 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO_QSPI_SD0_STATUS + 0x00000000 + + + 0x0014 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + xip_sd0 + 0 + + + sio_32 + 5 + + + null + 31 + + + FUNCSEL + + + GPIO_QSPI_SD0_CTRL + 0x0000001f + + + 0x0018 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO_QSPI_SD1_STATUS + 0x00000000 + + + 0x001c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + xip_sd1 + 0 + + + sio_33 + 5 + + + null + 31 + + + FUNCSEL + + + GPIO_QSPI_SD1_CTRL + 0x0000001f + + + 0x0020 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO_QSPI_SD2_STATUS + 0x00000000 + + + 0x0024 + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + xip_sd2 + 0 + + + sio_34 + 5 + + + null + 31 + + + FUNCSEL + + + GPIO_QSPI_SD2_CTRL + 0x0000001f + + + 0x0028 + GPIO status + + + read-only + [26:26] + interrupt to processors, after override is applied + IRQTOPROC + + + read-only + [24:24] + interrupt from pad before override is applied + IRQFROMPAD + + + read-only + [19:19] + input signal to peripheral, after override is applied + INTOPERI + + + read-only + [17:17] + input signal from pad, before override is applied + INFROMPAD + + + read-only + [13:13] + output enable to pad after register override is applied + OETOPAD + + + read-only + [12:12] + output enable from selected peripheral, before register override is applied + OEFROMPERI + + + read-only + [9:9] + output signal to pad after register override is applied + OUTTOPAD + + + read-only + [8:8] + output signal from selected peripheral, before register override is applied + OUTFROMPERI + + + GPIO_QSPI_SD3_STATUS + 0x00000000 + + + 0x002c + GPIO control including function select and overrides. + + + read-write + [29:28] + + + don't invert the interrupt + NORMAL + 0 + + + invert the interrupt + INVERT + 1 + + + drive interrupt low + LOW + 2 + + + drive interrupt high + HIGH + 3 + + + IRQOVER + + + read-write + [17:16] + + + don't invert the peri input + NORMAL + 0 + + + invert the peri input + INVERT + 1 + + + drive peri input low + LOW + 2 + + + drive peri input high + HIGH + 3 + + + INOVER + + + read-write + [13:12] + + + drive output enable from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output enable from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + disable output + DISABLE + 2 + + + enable output + ENABLE + 3 + + + OEOVER + + + read-write + [9:8] + + + drive output from peripheral signal selected by funcsel + NORMAL + 0 + + + drive output from inverse of peripheral signal selected by funcsel + INVERT + 1 + + + drive output low + LOW + 2 + + + drive output high + HIGH + 3 + + + OUTOVER + + + read-write + [4:0] + 0-31 -> selects pin function according to the gpio table\n + 31 == NULL + + + xip_sd3 + 0 + + + sio_35 + 5 + + + null + 31 + + + FUNCSEL + + + GPIO_QSPI_SD3_CTRL + 0x0000001f + + + 0x0030 + Raw Interrupts + + + read-write + [23:23] + oneToClear + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + oneToClear + GPIO_QSPI_SD3_EDGE_LOW + + + read-only + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-only + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + oneToClear + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + oneToClear + GPIO_QSPI_SD2_EDGE_LOW + + + read-only + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-only + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + oneToClear + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + oneToClear + GPIO_QSPI_SD1_EDGE_LOW + + + read-only + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-only + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + oneToClear + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + oneToClear + GPIO_QSPI_SD0_EDGE_LOW + + + read-only + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-only + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + oneToClear + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + oneToClear + GPIO_QSPI_SS_EDGE_LOW + + + read-only + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-only + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + oneToClear + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + oneToClear + GPIO_QSPI_SCLK_EDGE_LOW + + + read-only + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-only + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + INTR + 0x00000000 + + + 0x0034 + Interrupt Enable for proc0 + + + read-write + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-write + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-write + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-write + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-write + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-write + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-write + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-write + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-write + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-write + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-write + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-write + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-write + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + PROC0_INTE + 0x00000000 + + + 0x0038 + Interrupt Force for proc0 + + + read-write + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-write + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-write + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-write + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-write + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-write + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-write + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-write + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-write + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-write + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-write + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-write + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-write + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + PROC0_INTF + 0x00000000 + + + 0x003c + Interrupt status after masking & forcing for proc0 + + + read-only + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-only + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-only + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-only + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-only + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-only + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-only + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-only + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-only + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-only + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-only + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-only + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-only + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-only + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-only + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-only + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-only + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-only + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-only + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-only + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-only + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-only + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-only + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-only + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + PROC0_INTS + 0x00000000 + + + 0x0040 + Interrupt Enable for proc1 + + + read-write + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-write + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-write + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-write + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-write + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-write + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-write + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-write + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-write + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-write + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-write + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-write + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-write + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + PROC1_INTE + 0x00000000 + + + 0x0044 + Interrupt Force for proc1 + + + read-write + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-write + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-write + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-write + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-write + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-write + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-write + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-write + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-write + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-write + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-write + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-write + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-write + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + PROC1_INTF + 0x00000000 + + + 0x0048 + Interrupt status after masking & forcing for proc1 + + + read-only + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-only + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-only + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-only + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-only + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-only + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-only + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-only + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-only + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-only + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-only + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-only + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-only + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-only + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-only + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-only + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-only + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-only + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-only + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-only + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-only + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-only + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-only + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-only + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + PROC1_INTS + 0x00000000 + + + 0x004c + Interrupt Enable for dormant_wake + + + read-write + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-write + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-write + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-write + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-write + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-write + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-write + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-write + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-write + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-write + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-write + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-write + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-write + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + DORMANT_WAKE_INTE + 0x00000000 + + + 0x0050 + Interrupt Force for dormant_wake + + + read-write + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-write + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-write + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-write + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-write + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-write + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-write + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-write + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-write + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-write + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-write + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-write + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-write + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-write + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-write + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-write + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-write + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-write + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-write + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-write + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-write + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-write + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-write + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-write + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + DORMANT_WAKE_INTF + 0x00000000 + + + 0x0054 + Interrupt status after masking & forcing for dormant_wake + + + read-only + [23:23] + GPIO_QSPI_SD3_EDGE_HIGH + + + read-only + [22:22] + GPIO_QSPI_SD3_EDGE_LOW + + + read-only + [21:21] + GPIO_QSPI_SD3_LEVEL_HIGH + + + read-only + [20:20] + GPIO_QSPI_SD3_LEVEL_LOW + + + read-only + [19:19] + GPIO_QSPI_SD2_EDGE_HIGH + + + read-only + [18:18] + GPIO_QSPI_SD2_EDGE_LOW + + + read-only + [17:17] + GPIO_QSPI_SD2_LEVEL_HIGH + + + read-only + [16:16] + GPIO_QSPI_SD2_LEVEL_LOW + + + read-only + [15:15] + GPIO_QSPI_SD1_EDGE_HIGH + + + read-only + [14:14] + GPIO_QSPI_SD1_EDGE_LOW + + + read-only + [13:13] + GPIO_QSPI_SD1_LEVEL_HIGH + + + read-only + [12:12] + GPIO_QSPI_SD1_LEVEL_LOW + + + read-only + [11:11] + GPIO_QSPI_SD0_EDGE_HIGH + + + read-only + [10:10] + GPIO_QSPI_SD0_EDGE_LOW + + + read-only + [9:9] + GPIO_QSPI_SD0_LEVEL_HIGH + + + read-only + [8:8] + GPIO_QSPI_SD0_LEVEL_LOW + + + read-only + [7:7] + GPIO_QSPI_SS_EDGE_HIGH + + + read-only + [6:6] + GPIO_QSPI_SS_EDGE_LOW + + + read-only + [5:5] + GPIO_QSPI_SS_LEVEL_HIGH + + + read-only + [4:4] + GPIO_QSPI_SS_LEVEL_LOW + + + read-only + [3:3] + GPIO_QSPI_SCLK_EDGE_HIGH + + + read-only + [2:2] + GPIO_QSPI_SCLK_EDGE_LOW + + + read-only + [1:1] + GPIO_QSPI_SCLK_LEVEL_HIGH + + + read-only + [0:0] + GPIO_QSPI_SCLK_LEVEL_LOW + + + DORMANT_WAKE_INTS + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x4001c000 + PADS_BANK0 + + + 0x0000 + Voltage select. Per bank control + + + read-write + [0:0] + + + Set voltage to 3.3V (DVDD >= 2V5) + 3v3 + 0 + + + Set voltage to 1.8V (DVDD <= 1V8) + 1v8 + 1 + + + VOLTAGE_SELECT + + + VOLTAGE_SELECT + 0x00000000 + + + 0x0004 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO0 + 0x00000056 + + + 0x0008 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO1 + 0x00000056 + + + 0x000c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO2 + 0x00000056 + + + 0x0010 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO3 + 0x00000056 + + + 0x0014 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO4 + 0x00000056 + + + 0x0018 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO5 + 0x00000056 + + + 0x001c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO6 + 0x00000056 + + + 0x0020 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO7 + 0x00000056 + + + 0x0024 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO8 + 0x00000056 + + + 0x0028 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO9 + 0x00000056 + + + 0x002c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO10 + 0x00000056 + + + 0x0030 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO11 + 0x00000056 + + + 0x0034 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO12 + 0x00000056 + + + 0x0038 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO13 + 0x00000056 + + + 0x003c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO14 + 0x00000056 + + + 0x0040 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO15 + 0x00000056 + + + 0x0044 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO16 + 0x00000056 + + + 0x0048 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO17 + 0x00000056 + + + 0x004c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO18 + 0x00000056 + + + 0x0050 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO19 + 0x00000056 + + + 0x0054 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO20 + 0x00000056 + + + 0x0058 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO21 + 0x00000056 + + + 0x005c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO22 + 0x00000056 + + + 0x0060 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO23 + 0x00000056 + + + 0x0064 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO24 + 0x00000056 + + + 0x0068 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO25 + 0x00000056 + + + 0x006c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO26 + 0x00000056 + + + 0x0070 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO27 + 0x00000056 + + + 0x0074 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO28 + 0x00000056 + + + 0x0078 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO29 + 0x00000056 + + + 0x007c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + SWCLK + 0x000000da + + + 0x0080 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + SWD + 0x0000005a + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40020000 + PADS_QSPI + + + 0x0000 + Voltage select. Per bank control + + + read-write + [0:0] + + + Set voltage to 3.3V (DVDD >= 2V5) + 3v3 + 0 + + + Set voltage to 1.8V (DVDD <= 1V8) + 1v8 + 1 + + + VOLTAGE_SELECT + + + VOLTAGE_SELECT + 0x00000000 + + + 0x0004 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO_QSPI_SCLK + 0x00000056 + + + 0x0008 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO_QSPI_SD0 + 0x00000052 + + + 0x000c + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO_QSPI_SD1 + 0x00000052 + + + 0x0010 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO_QSPI_SD2 + 0x00000052 + + + 0x0014 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO_QSPI_SD3 + 0x00000052 + + + 0x0018 + Pad control register + + + read-write + [7:7] + Output disable. Has priority over output enable from peripherals + OD + + + read-write + [6:6] + Input enable + IE + + + read-write + [5:4] + Drive strength. + + + 2mA + 0 + + + 4mA + 1 + + + 8mA + 2 + + + 12mA + 3 + + + DRIVE + + + read-write + [3:3] + Pull up enable + PUE + + + read-write + [2:2] + Pull down enable + PDE + + + read-write + [1:1] + Enable schmitt trigger + SCHMITT + + + read-write + [0:0] + Slew rate control. 1 = Fast, 0 = Slow + SLEWFAST + + + GPIO_QSPI_SS + 0x0000005a + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40024000 + Controls the crystal oscillator + XOSC + + + 0x0000 + Crystal Oscillator Control + + + read-write + [23:12] + On power-up this field is initialised to DISABLE and the chip runs from the ROSC.\n + If the chip has subsequently been programmed to run from the XOSC then setting this field to DISABLE may lock-up the chip. If this is a concern then run the clk_ref from the ROSC and enable the clk_sys RESUS feature.\n + The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator. + + + DISABLE + 3358 + + + ENABLE + 4011 + + + ENABLE + + + read-write + [11:0] + Frequency range. This resets to 0xAA0 and cannot be changed. + + + 1_15MHZ + 2720 + + + RESERVED_1 + 2721 + + + RESERVED_2 + 2722 + + + RESERVED_3 + 2723 + + + FREQ_RANGE + + + CTRL + 0x00000000 + + + 0x0004 + Crystal Oscillator Status + + + read-only + [31:31] + Oscillator is running and stable + STABLE + + + read-write + [24:24] + An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT + oneToClear + BADWRITE + + + read-only + [12:12] + Oscillator is enabled but not necessarily running and stable, resets to 0 + ENABLED + + + read-only + [1:0] + The current frequency range setting, always reads 0 + + + 1_15MHZ + 0 + + + RESERVED_1 + 1 + + + RESERVED_2 + 2 + + + RESERVED_3 + 3 + + + FREQ_RANGE + + + STATUS + 0x00000000 + + + read-write + 0x0008 + Crystal Oscillator pause control\n + This is used to save power by pausing the XOSC\n + On power-up this field is initialised to WAKE\n + An invalid write will also select WAKE\n + WARNING: stop the PLLs before selecting dormant mode\n + WARNING: setup the irq before selecting dormant mode + DORMANT + 0x00000000 + + + 0x000c + Controls the startup delay + + + read-write + [20:20] + Multiplies the startup_delay by 4. This is of little value to the user given that the delay can be programmed directly + X4 + + + read-write + [13:0] + in multiples of 256*xtal_period + DELAY + + + STARTUP + 0x00000000 + + + 0x001c + A down counter running at the xosc frequency which counts to zero and stops.\n + To start the counter write a non-zero value.\n + Can be used for short software pauses when setting up time sensitive hardware. + + + read-write + [7:0] + COUNT + + + COUNT + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40028000 + PLL_SYS + + + 0x0000 + Control and Status\n + GENERAL CONSTRAINTS:\n + Reference clock frequency min=5MHz, max=800MHz\n + Feedback divider min=16, max=320\n + VCO frequency min=400MHz, max=1600MHz + + + read-only + [31:31] + PLL is locked + LOCK + + + read-write + [8:8] + Passes the reference clock to the output instead of the divided VCO. The VCO continues to run so the user can switch between the reference clock and the divided VCO but the output will glitch when doing so. + BYPASS + + + read-write + [5:0] + Divides the PLL input reference clock.\n + Behaviour is undefined for div=0.\n + PLL output will be unpredictable during refdiv changes, wait for lock=1 before using it. + REFDIV + + + CS + 0x00000001 + + + 0x0004 + Controls the PLL power modes. + + + read-write + [5:5] + PLL VCO powerdown\n + To save power set high when PLL output not required or bypass=1. + VCOPD + + + read-write + [3:3] + PLL post divider powerdown\n + To save power set high when PLL output not required or bypass=1. + POSTDIVPD + + + read-write + [2:2] + PLL DSM powerdown\n + Nothing is achieved by setting this low. + DSMPD + + + read-write + [0:0] + PLL powerdown\n + To save power set high when PLL output not required. + PD + + + PWR + 0x0000002d + + + 0x0008 + Feedback divisor\n + (note: this PLL does not support fractional division) + + + read-write + [11:0] + see ctrl reg description for constraints + FBDIV_INT + + + FBDIV_INT + 0x00000000 + + + 0x000c + Controls the PLL post dividers for the primary output\n + (note: this PLL does not have a secondary output)\n + the primary output is driven from VCO divided by postdiv1*postdiv2 + + + read-write + [18:16] + divide by 1-7 + POSTDIV1 + + + read-write + [14:12] + divide by 1-7 + POSTDIV2 + + + PRIM + 0x00077000 + + + 32 + 1 + + + 0x4002c000 + PLL_USB + + + + 0 + 0x1000 + registers + + 0x40030000 + Register block for busfabric control signals and performance counters + BUSCTRL + + + 0x0000 + Set the priority of each master for bus arbitration. + + + read-write + [12:12] + 0 - low priority, 1 - high priority + DMA_W + + + read-write + [8:8] + 0 - low priority, 1 - high priority + DMA_R + + + read-write + [4:4] + 0 - low priority, 1 - high priority + PROC1 + + + read-write + [0:0] + 0 - low priority, 1 - high priority + PROC0 + + + BUS_PRIORITY + 0x00000000 + + + 0x0004 + Bus priority acknowledge + + + read-only + [0:0] + Goes to 1 once all arbiters have registered the new global priority levels.\n + Arbiters update their local priority when servicing a new nonsequential access.\n + In normal circumstances this will happen almost immediately. + BUS_PRIORITY_ACK + + + BUS_PRIORITY_ACK + 0x00000000 + + + 0x0008 + Bus fabric performance counter 0 + + + read-write + [23:0] + Busfabric saturating performance counter 0\n + Count some event signal from the busfabric arbiters.\n + Write any value to clear. Select an event to count using PERFSEL0 + oneToClear + PERFCTR0 + + + PERFCTR0 + 0x00000000 + + + 0x000c + Bus fabric performance event select for PERFCTR0 + + + read-write + [4:0] + Select a performance event for PERFCTR0 + PERFSEL0 + + + PERFSEL0 + 0x0000001f + + + 0x0010 + Bus fabric performance counter 1 + + + read-write + [23:0] + Busfabric saturating performance counter 1\n + Count some event signal from the busfabric arbiters.\n + Write any value to clear. Select an event to count using PERFSEL1 + oneToClear + PERFCTR1 + + + PERFCTR1 + 0x00000000 + + + 0x0014 + Bus fabric performance event select for PERFCTR1 + + + read-write + [4:0] + Select a performance event for PERFCTR1 + PERFSEL1 + + + PERFSEL1 + 0x0000001f + + + 0x0018 + Bus fabric performance counter 2 + + + read-write + [23:0] + Busfabric saturating performance counter 2\n + Count some event signal from the busfabric arbiters.\n + Write any value to clear. Select an event to count using PERFSEL2 + oneToClear + PERFCTR2 + + + PERFCTR2 + 0x00000000 + + + 0x001c + Bus fabric performance event select for PERFCTR2 + + + read-write + [4:0] + Select a performance event for PERFCTR2 + PERFSEL2 + + + PERFSEL2 + 0x0000001f + + + 0x0020 + Bus fabric performance counter 3 + + + read-write + [23:0] + Busfabric saturating performance counter 3\n + Count some event signal from the busfabric arbiters.\n + Write any value to clear. Select an event to count using PERFSEL3 + oneToClear + PERFCTR3 + + + PERFCTR3 + 0x00000000 + + + 0x0024 + Bus fabric performance event select for PERFCTR3 + + + read-write + [4:0] + Select a performance event for PERFCTR3 + PERFSEL3 + + + PERFSEL3 + 0x0000001f + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40034000 + + UART0_IRQ + 20 + + UART0 + + + 0x0000 + Data Register, UARTDR + + + read-only + [11:11] + Overrun error. This bit is set to 1 if data is received and the receive FIFO is already full. This is cleared to 0 once there is an empty space in the FIFO and a new character can be written to it. + OE + + + read-only + [10:10] + Break error. This bit is set to 1 if a break condition was detected, indicating that the received data input was held LOW for longer than a full-word transmission time (defined as start, data, parity and stop bits). In FIFO mode, this error is associated with the character at the top of the FIFO. When a break occurs, only one 0 character is loaded into the FIFO. The next character is only enabled after the receive data input goes to a 1 (marking state), and the next valid start bit is received. + BE + + + read-only + [9:9] + Parity error. When set to 1, it indicates that the parity of the received data character does not match the parity that the EPS and SPS bits in the Line Control Register, UARTLCR_H. In FIFO mode, this error is associated with the character at the top of the FIFO. + PE + + + read-only + [8:8] + Framing error. When set to 1, it indicates that the received character did not have a valid stop bit (a valid stop bit is 1). In FIFO mode, this error is associated with the character at the top of the FIFO. + FE + + + read-write + [7:0] + Receive (read) data character. Transmit (write) data character. + DATA + + + UARTDR + 0x00000000 + + + 0x0004 + Receive Status Register/Error Clear Register, UARTRSR/UARTECR + + + read-write + [3:3] + Overrun error. This bit is set to 1 if data is received and the FIFO is already full. This bit is cleared to 0 by a write to UARTECR. The FIFO contents remain valid because no more data is written when the FIFO is full, only the contents of the shift register are overwritten. The CPU must now read the data, to empty the FIFO. + oneToClear + OE + + + read-write + [2:2] + Break error. This bit is set to 1 if a break condition was detected, indicating that the received data input was held LOW for longer than a full-word transmission time (defined as start, data, parity, and stop bits). This bit is cleared to 0 after a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO. When a break occurs, only one 0 character is loaded into the FIFO. The next character is only enabled after the receive data input goes to a 1 (marking state) and the next valid start bit is received. + oneToClear + BE + + + read-write + [1:1] + Parity error. When set to 1, it indicates that the parity of the received data character does not match the parity that the EPS and SPS bits in the Line Control Register, UARTLCR_H. This bit is cleared to 0 by a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO. + oneToClear + PE + + + read-write + [0:0] + Framing error. When set to 1, it indicates that the received character did not have a valid stop bit (a valid stop bit is 1). This bit is cleared to 0 by a write to UARTECR. In FIFO mode, this error is associated with the character at the top of the FIFO. + oneToClear + FE + + + UARTRSR + 0x00000000 + + + 0x0018 + Flag Register, UARTFR + + + read-only + [8:8] + Ring indicator. This bit is the complement of the UART ring indicator, nUARTRI, modem status input. That is, the bit is 1 when nUARTRI is LOW. + RI + + + read-only + [7:7] + Transmit FIFO empty. The meaning of this bit depends on the state of the FEN bit in the Line Control Register, UARTLCR_H. If the FIFO is disabled, this bit is set when the transmit holding register is empty. If the FIFO is enabled, the TXFE bit is set when the transmit FIFO is empty. This bit does not indicate if there is data in the transmit shift register. + TXFE + + + read-only + [6:6] + Receive FIFO full. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register. If the FIFO is disabled, this bit is set when the receive holding register is full. If the FIFO is enabled, the RXFF bit is set when the receive FIFO is full. + RXFF + + + read-only + [5:5] + Transmit FIFO full. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register. If the FIFO is disabled, this bit is set when the transmit holding register is full. If the FIFO is enabled, the TXFF bit is set when the transmit FIFO is full. + TXFF + + + read-only + [4:4] + Receive FIFO empty. The meaning of this bit depends on the state of the FEN bit in the UARTLCR_H Register. If the FIFO is disabled, this bit is set when the receive holding register is empty. If the FIFO is enabled, the RXFE bit is set when the receive FIFO is empty. + RXFE + + + read-only + [3:3] + UART busy. If this bit is set to 1, the UART is busy transmitting data. This bit remains set until the complete byte, including all the stop bits, has been sent from the shift register. This bit is set as soon as the transmit FIFO becomes non-empty, regardless of whether the UART is enabled or not. + BUSY + + + read-only + [2:2] + Data carrier detect. This bit is the complement of the UART data carrier detect, nUARTDCD, modem status input. That is, the bit is 1 when nUARTDCD is LOW. + DCD + + + read-only + [1:1] + Data set ready. This bit is the complement of the UART data set ready, nUARTDSR, modem status input. That is, the bit is 1 when nUARTDSR is LOW. + DSR + + + read-only + [0:0] + Clear to send. This bit is the complement of the UART clear to send, nUARTCTS, modem status input. That is, the bit is 1 when nUARTCTS is LOW. + CTS + + + UARTFR + 0x00000090 + + + 0x0020 + IrDA Low-Power Counter Register, UARTILPR + + + read-write + [7:0] + 8-bit low-power divisor value. These bits are cleared to 0 at reset. + ILPDVSR + + + UARTILPR + 0x00000000 + + + 0x0024 + Integer Baud Rate Register, UARTIBRD + + + read-write + [15:0] + The integer baud rate divisor. These bits are cleared to 0 on reset. + BAUD_DIVINT + + + UARTIBRD + 0x00000000 + + + 0x0028 + Fractional Baud Rate Register, UARTFBRD + + + read-write + [5:0] + The fractional baud rate divisor. These bits are cleared to 0 on reset. + BAUD_DIVFRAC + + + UARTFBRD + 0x00000000 + + + 0x002c + Line Control Register, UARTLCR_H + + + read-write + [7:7] + Stick parity select. 0 = stick parity is disabled 1 = either: * if the EPS bit is 0 then the parity bit is transmitted and checked as a 1 * if the EPS bit is 1 then the parity bit is transmitted and checked as a 0. This bit has no effect when the PEN bit disables parity checking and generation. + SPS + + + read-write + [6:5] + Word length. These bits indicate the number of data bits transmitted or received in a frame as follows: b11 = 8 bits b10 = 7 bits b01 = 6 bits b00 = 5 bits. + WLEN + + + read-write + [4:4] + Enable FIFOs: 0 = FIFOs are disabled (character mode) that is, the FIFOs become 1-byte-deep holding registers 1 = transmit and receive FIFO buffers are enabled (FIFO mode). + FEN + + + read-write + [3:3] + Two stop bits select. If this bit is set to 1, two stop bits are transmitted at the end of the frame. The receive logic does not check for two stop bits being received. + STP2 + + + read-write + [2:2] + Even parity select. Controls the type of parity the UART uses during transmission and reception: 0 = odd parity. The UART generates or checks for an odd number of 1s in the data and parity bits. 1 = even parity. The UART generates or checks for an even number of 1s in the data and parity bits. This bit has no effect when the PEN bit disables parity checking and generation. + EPS + + + read-write + [1:1] + Parity enable: 0 = parity is disabled and no parity bit added to the data frame 1 = parity checking and generation is enabled. + PEN + + + read-write + [0:0] + Send break. If this bit is set to 1, a low-level is continually output on the UARTTXD output, after completing transmission of the current character. For the proper execution of the break command, the software must set this bit for at least two complete frames. For normal use, this bit must be cleared to 0. + BRK + + + UARTLCR_H + 0x00000000 + + + 0x0030 + Control Register, UARTCR + + + read-write + [15:15] + CTS hardware flow control enable. If this bit is set to 1, CTS hardware flow control is enabled. Data is only transmitted when the nUARTCTS signal is asserted. + CTSEN + + + read-write + [14:14] + RTS hardware flow control enable. If this bit is set to 1, RTS hardware flow control is enabled. Data is only requested when there is space in the receive FIFO for it to be received. + RTSEN + + + read-write + [13:13] + This bit is the complement of the UART Out2 (nUARTOut2) modem status output. That is, when the bit is programmed to a 1, the output is 0. For DTE this can be used as Ring Indicator (RI). + OUT2 + + + read-write + [12:12] + This bit is the complement of the UART Out1 (nUARTOut1) modem status output. That is, when the bit is programmed to a 1 the output is 0. For DTE this can be used as Data Carrier Detect (DCD). + OUT1 + + + read-write + [11:11] + Request to send. This bit is the complement of the UART request to send, nUARTRTS, modem status output. That is, when the bit is programmed to a 1 then nUARTRTS is LOW. + RTS + + + read-write + [10:10] + Data transmit ready. This bit is the complement of the UART data transmit ready, nUARTDTR, modem status output. That is, when the bit is programmed to a 1 then nUARTDTR is LOW. + DTR + + + read-write + [9:9] + Receive enable. If this bit is set to 1, the receive section of the UART is enabled. Data reception occurs for either UART signals or SIR signals depending on the setting of the SIREN bit. When the UART is disabled in the middle of reception, it completes the current character before stopping. + RXE + + + read-write + [8:8] + Transmit enable. If this bit is set to 1, the transmit section of the UART is enabled. Data transmission occurs for either UART signals, or SIR signals depending on the setting of the SIREN bit. When the UART is disabled in the middle of transmission, it completes the current character before stopping. + TXE + + + read-write + [7:7] + Loopback enable. If this bit is set to 1 and the SIREN bit is set to 1 and the SIRTEST bit in the Test Control Register, UARTTCR is set to 1, then the nSIROUT path is inverted, and fed through to the SIRIN path. The SIRTEST bit in the test register must be set to 1 to override the normal half-duplex SIR operation. This must be the requirement for accessing the test registers during normal operation, and SIRTEST must be cleared to 0 when loopback testing is finished. This feature reduces the amount of external coupling required during system test. If this bit is set to 1, and the SIRTEST bit is set to 0, the UARTTXD path is fed through to the UARTRXD path. In either SIR mode or UART mode, when this bit is set, the modem outputs are also fed through to the modem inputs. This bit is cleared to 0 on reset, to disable loopback. + LBE + + + read-write + [2:2] + SIR low-power IrDA mode. This bit selects the IrDA encoding mode. If this bit is cleared to 0, low-level bits are transmitted as an active high pulse with a width of 3 / 16th of the bit period. If this bit is set to 1, low-level bits are transmitted with a pulse width that is 3 times the period of the IrLPBaud16 input signal, regardless of the selected bit rate. Setting this bit uses less power, but might reduce transmission distances. + SIRLP + + + read-write + [1:1] + SIR enable: 0 = IrDA SIR ENDEC is disabled. nSIROUT remains LOW (no light pulse generated), and signal transitions on SIRIN have no effect. 1 = IrDA SIR ENDEC is enabled. Data is transmitted and received on nSIROUT and SIRIN. UARTTXD remains HIGH, in the marking state. Signal transitions on UARTRXD or modem status inputs have no effect. This bit has no effect if the UARTEN bit disables the UART. + SIREN + + + read-write + [0:0] + UART enable: 0 = UART is disabled. If the UART is disabled in the middle of transmission or reception, it completes the current character before stopping. 1 = the UART is enabled. Data transmission and reception occurs for either UART signals or SIR signals depending on the setting of the SIREN bit. + UARTEN + + + UARTCR + 0x00000300 + + + 0x0034 + Interrupt FIFO Level Select Register, UARTIFLS + + + read-write + [5:3] + Receive interrupt FIFO level select. The trigger points for the receive interrupt are as follows: b000 = Receive FIFO becomes >= 1 / 8 full b001 = Receive FIFO becomes >= 1 / 4 full b010 = Receive FIFO becomes >= 1 / 2 full b011 = Receive FIFO becomes >= 3 / 4 full b100 = Receive FIFO becomes >= 7 / 8 full b101-b111 = reserved. + RXIFLSEL + + + read-write + [2:0] + Transmit interrupt FIFO level select. The trigger points for the transmit interrupt are as follows: b000 = Transmit FIFO becomes <= 1 / 8 full b001 = Transmit FIFO becomes <= 1 / 4 full b010 = Transmit FIFO becomes <= 1 / 2 full b011 = Transmit FIFO becomes <= 3 / 4 full b100 = Transmit FIFO becomes <= 7 / 8 full b101-b111 = reserved. + TXIFLSEL + + + UARTIFLS + 0x00000012 + + + 0x0038 + Interrupt Mask Set/Clear Register, UARTIMSC + + + read-write + [10:10] + Overrun error interrupt mask. A read returns the current mask for the UARTOEINTR interrupt. On a write of 1, the mask of the UARTOEINTR interrupt is set. A write of 0 clears the mask. + OEIM + + + read-write + [9:9] + Break error interrupt mask. A read returns the current mask for the UARTBEINTR interrupt. On a write of 1, the mask of the UARTBEINTR interrupt is set. A write of 0 clears the mask. + BEIM + + + read-write + [8:8] + Parity error interrupt mask. A read returns the current mask for the UARTPEINTR interrupt. On a write of 1, the mask of the UARTPEINTR interrupt is set. A write of 0 clears the mask. + PEIM + + + read-write + [7:7] + Framing error interrupt mask. A read returns the current mask for the UARTFEINTR interrupt. On a write of 1, the mask of the UARTFEINTR interrupt is set. A write of 0 clears the mask. + FEIM + + + read-write + [6:6] + Receive timeout interrupt mask. A read returns the current mask for the UARTRTINTR interrupt. On a write of 1, the mask of the UARTRTINTR interrupt is set. A write of 0 clears the mask. + RTIM + + + read-write + [5:5] + Transmit interrupt mask. A read returns the current mask for the UARTTXINTR interrupt. On a write of 1, the mask of the UARTTXINTR interrupt is set. A write of 0 clears the mask. + TXIM + + + read-write + [4:4] + Receive interrupt mask. A read returns the current mask for the UARTRXINTR interrupt. On a write of 1, the mask of the UARTRXINTR interrupt is set. A write of 0 clears the mask. + RXIM + + + read-write + [3:3] + nUARTDSR modem interrupt mask. A read returns the current mask for the UARTDSRINTR interrupt. On a write of 1, the mask of the UARTDSRINTR interrupt is set. A write of 0 clears the mask. + DSRMIM + + + read-write + [2:2] + nUARTDCD modem interrupt mask. A read returns the current mask for the UARTDCDINTR interrupt. On a write of 1, the mask of the UARTDCDINTR interrupt is set. A write of 0 clears the mask. + DCDMIM + + + read-write + [1:1] + nUARTCTS modem interrupt mask. A read returns the current mask for the UARTCTSINTR interrupt. On a write of 1, the mask of the UARTCTSINTR interrupt is set. A write of 0 clears the mask. + CTSMIM + + + read-write + [0:0] + nUARTRI modem interrupt mask. A read returns the current mask for the UARTRIINTR interrupt. On a write of 1, the mask of the UARTRIINTR interrupt is set. A write of 0 clears the mask. + RIMIM + + + UARTIMSC + 0x00000000 + + + 0x003c + Raw Interrupt Status Register, UARTRIS + + + read-only + [10:10] + Overrun error interrupt status. Returns the raw interrupt state of the UARTOEINTR interrupt. + OERIS + + + read-only + [9:9] + Break error interrupt status. Returns the raw interrupt state of the UARTBEINTR interrupt. + BERIS + + + read-only + [8:8] + Parity error interrupt status. Returns the raw interrupt state of the UARTPEINTR interrupt. + PERIS + + + read-only + [7:7] + Framing error interrupt status. Returns the raw interrupt state of the UARTFEINTR interrupt. + FERIS + + + read-only + [6:6] + Receive timeout interrupt status. Returns the raw interrupt state of the UARTRTINTR interrupt. a + RTRIS + + + read-only + [5:5] + Transmit interrupt status. Returns the raw interrupt state of the UARTTXINTR interrupt. + TXRIS + + + read-only + [4:4] + Receive interrupt status. Returns the raw interrupt state of the UARTRXINTR interrupt. + RXRIS + + + read-only + [3:3] + nUARTDSR modem interrupt status. Returns the raw interrupt state of the UARTDSRINTR interrupt. + DSRRMIS + + + read-only + [2:2] + nUARTDCD modem interrupt status. Returns the raw interrupt state of the UARTDCDINTR interrupt. + DCDRMIS + + + read-only + [1:1] + nUARTCTS modem interrupt status. Returns the raw interrupt state of the UARTCTSINTR interrupt. + CTSRMIS + + + read-only + [0:0] + nUARTRI modem interrupt status. Returns the raw interrupt state of the UARTRIINTR interrupt. + RIRMIS + + + UARTRIS + 0x00000000 + + + 0x0040 + Masked Interrupt Status Register, UARTMIS + + + read-only + [10:10] + Overrun error masked interrupt status. Returns the masked interrupt state of the UARTOEINTR interrupt. + OEMIS + + + read-only + [9:9] + Break error masked interrupt status. Returns the masked interrupt state of the UARTBEINTR interrupt. + BEMIS + + + read-only + [8:8] + Parity error masked interrupt status. Returns the masked interrupt state of the UARTPEINTR interrupt. + PEMIS + + + read-only + [7:7] + Framing error masked interrupt status. Returns the masked interrupt state of the UARTFEINTR interrupt. + FEMIS + + + read-only + [6:6] + Receive timeout masked interrupt status. Returns the masked interrupt state of the UARTRTINTR interrupt. + RTMIS + + + read-only + [5:5] + Transmit masked interrupt status. Returns the masked interrupt state of the UARTTXINTR interrupt. + TXMIS + + + read-only + [4:4] + Receive masked interrupt status. Returns the masked interrupt state of the UARTRXINTR interrupt. + RXMIS + + + read-only + [3:3] + nUARTDSR modem masked interrupt status. Returns the masked interrupt state of the UARTDSRINTR interrupt. + DSRMMIS + + + read-only + [2:2] + nUARTDCD modem masked interrupt status. Returns the masked interrupt state of the UARTDCDINTR interrupt. + DCDMMIS + + + read-only + [1:1] + nUARTCTS modem masked interrupt status. Returns the masked interrupt state of the UARTCTSINTR interrupt. + CTSMMIS + + + read-only + [0:0] + nUARTRI modem masked interrupt status. Returns the masked interrupt state of the UARTRIINTR interrupt. + RIMMIS + + + UARTMIS + 0x00000000 + + + 0x0044 + Interrupt Clear Register, UARTICR + + + read-write + [10:10] + Overrun error interrupt clear. Clears the UARTOEINTR interrupt. + oneToClear + OEIC + + + read-write + [9:9] + Break error interrupt clear. Clears the UARTBEINTR interrupt. + oneToClear + BEIC + + + read-write + [8:8] + Parity error interrupt clear. Clears the UARTPEINTR interrupt. + oneToClear + PEIC + + + read-write + [7:7] + Framing error interrupt clear. Clears the UARTFEINTR interrupt. + oneToClear + FEIC + + + read-write + [6:6] + Receive timeout interrupt clear. Clears the UARTRTINTR interrupt. + oneToClear + RTIC + + + read-write + [5:5] + Transmit interrupt clear. Clears the UARTTXINTR interrupt. + oneToClear + TXIC + + + read-write + [4:4] + Receive interrupt clear. Clears the UARTRXINTR interrupt. + oneToClear + RXIC + + + read-write + [3:3] + nUARTDSR modem interrupt clear. Clears the UARTDSRINTR interrupt. + oneToClear + DSRMIC + + + read-write + [2:2] + nUARTDCD modem interrupt clear. Clears the UARTDCDINTR interrupt. + oneToClear + DCDMIC + + + read-write + [1:1] + nUARTCTS modem interrupt clear. Clears the UARTCTSINTR interrupt. + oneToClear + CTSMIC + + + read-write + [0:0] + nUARTRI modem interrupt clear. Clears the UARTRIINTR interrupt. + oneToClear + RIMIC + + + UARTICR + 0x00000000 + + + 0x0048 + DMA Control Register, UARTDMACR + + + read-write + [2:2] + DMA on error. If this bit is set to 1, the DMA receive request outputs, UARTRXDMASREQ or UARTRXDMABREQ, are disabled when the UART error interrupt is asserted. + DMAONERR + + + read-write + [1:1] + Transmit DMA enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. + TXDMAE + + + read-write + [0:0] + Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled. + RXDMAE + + + UARTDMACR + 0x00000000 + + + 0x0fe0 + UARTPeriphID0 Register + + + read-only + [7:0] + These bits read back as 0x11 + PARTNUMBER0 + + + UARTPERIPHID0 + 0x00000011 + + + 0x0fe4 + UARTPeriphID1 Register + + + read-only + [7:4] + These bits read back as 0x1 + DESIGNER0 + + + read-only + [3:0] + These bits read back as 0x0 + PARTNUMBER1 + + + UARTPERIPHID1 + 0x00000010 + + + 0x0fe8 + UARTPeriphID2 Register + + + read-only + [7:4] + This field depends on the revision of the UART: r1p0 0x0 r1p1 0x1 r1p3 0x2 r1p4 0x2 r1p5 0x3 + REVISION + + + read-only + [3:0] + These bits read back as 0x4 + DESIGNER1 + + + UARTPERIPHID2 + 0x00000034 + + + 0x0fec + UARTPeriphID3 Register + + + read-only + [7:0] + These bits read back as 0x00 + CONFIGURATION + + + UARTPERIPHID3 + 0x00000000 + + + 0x0ff0 + UARTPCellID0 Register + + + read-only + [7:0] + These bits read back as 0x0D + UARTPCELLID0 + + + UARTPCELLID0 + 0x0000000d + + + 0x0ff4 + UARTPCellID1 Register + + + read-only + [7:0] + These bits read back as 0xF0 + UARTPCELLID1 + + + UARTPCELLID1 + 0x000000f0 + + + 0x0ff8 + UARTPCellID2 Register + + + read-only + [7:0] + These bits read back as 0x05 + UARTPCELLID2 + + + UARTPCELLID2 + 0x00000005 + + + 0x0ffc + UARTPCellID3 Register + + + read-only + [7:0] + These bits read back as 0xB1 + UARTPCELLID3 + + + UARTPCELLID3 + 0x000000b1 + + + 32 + 1 + + + 0x40038000 + + UART1_IRQ + 21 + + UART1 + + + + 0 + 0x1000 + registers + + 0x4003c000 + + SPI0_IRQ + 18 + + SPI0 + + + 0x0000 + Control register 0, SSPCR0 on page 3-4 + + + read-write + [15:8] + Serial clock rate. The value SCR is used to generate the transmit and receive bit rate of the PrimeCell SSP. The bit rate is: F SSPCLK CPSDVSR x (1+SCR) where CPSDVSR is an even value from 2-254, programmed through the SSPCPSR register and SCR is a value from 0-255. + SCR + + + read-write + [7:7] + SSPCLKOUT phase, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. + SPH + + + read-write + [6:6] + SSPCLKOUT polarity, applicable to Motorola SPI frame format only. See Motorola SPI frame format on page 2-10. + SPO + + + read-write + [5:4] + Frame format: 00 Motorola SPI frame format. 01 TI synchronous serial frame format. 10 National Microwire frame format. 11 Reserved, undefined operation. + FRF + + + read-write + [3:0] + Data Size Select: 0000 Reserved, undefined operation. 0001 Reserved, undefined operation. 0010 Reserved, undefined operation. 0011 4-bit data. 0100 5-bit data. 0101 6-bit data. 0110 7-bit data. 0111 8-bit data. 1000 9-bit data. 1001 10-bit data. 1010 11-bit data. 1011 12-bit data. 1100 13-bit data. 1101 14-bit data. 1110 15-bit data. 1111 16-bit data. + DSS + + + SSPCR0 + 0x00000000 + + + 0x0004 + Control register 1, SSPCR1 on page 3-5 + + + read-write + [3:3] + Slave-mode output disable. This bit is relevant only in the slave mode, MS=1. In multiple-slave systems, it is possible for an PrimeCell SSP master to broadcast a message to all slaves in the system while ensuring that only one slave drives data onto its serial output line. In such systems the RXD lines from multiple slaves could be tied together. To operate in such systems, the SOD bit can be set if the PrimeCell SSP slave is not supposed to drive the SSPTXD line: 0 SSP can drive the SSPTXD output in slave mode. 1 SSP must not drive the SSPTXD output in slave mode. + SOD + + + read-write + [2:2] + Master or slave mode select. This bit can be modified only when the PrimeCell SSP is disabled, SSE=0: 0 Device configured as master, default. 1 Device configured as slave. + MS + + + read-write + [1:1] + Synchronous serial port enable: 0 SSP operation disabled. 1 SSP operation enabled. + SSE + + + read-write + [0:0] + Loop back mode: 0 Normal serial port operation enabled. 1 Output of transmit serial shifter is connected to input of receive serial shifter internally. + LBM + + + SSPCR1 + 0x00000000 + + + 0x0008 + Data register, SSPDR on page 3-6 + + + read-write + [15:0] + Transmit/Receive FIFO: Read Receive FIFO. Write Transmit FIFO. You must right-justify data when the PrimeCell SSP is programmed for a data size that is less than 16 bits. Unused bits at the top are ignored by transmit logic. The receive logic automatically right-justifies. + DATA + + + SSPDR + 0x00000000 + + + 0x000c + Status register, SSPSR on page 3-7 + + + read-only + [4:4] + PrimeCell SSP busy flag, RO: 0 SSP is idle. 1 SSP is currently transmitting and/or receiving a frame or the transmit FIFO is not empty. + BSY + + + read-only + [3:3] + Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full. + RFF + + + read-only + [2:2] + Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty. + RNE + + + read-only + [1:1] + Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full. + TNF + + + read-only + [0:0] + Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty. + TFE + + + SSPSR + 0x00000003 + + + 0x0010 + Clock prescale register, SSPCPSR on page 3-8 + + + read-write + [7:0] + Clock prescale divisor. Must be an even number from 2-254, depending on the frequency of SSPCLK. The least significant bit always returns zero on reads. + CPSDVSR + + + SSPCPSR + 0x00000000 + + + 0x0014 + Interrupt mask set or clear register, SSPIMSC on page 3-9 + + + read-write + [3:3] + Transmit FIFO interrupt mask: 0 Transmit FIFO half empty or less condition interrupt is masked. 1 Transmit FIFO half empty or less condition interrupt is not masked. + TXIM + + + read-write + [2:2] + Receive FIFO interrupt mask: 0 Receive FIFO half full or less condition interrupt is masked. 1 Receive FIFO half full or less condition interrupt is not masked. + RXIM + + + read-write + [1:1] + Receive timeout interrupt mask: 0 Receive FIFO not empty and no read prior to timeout period interrupt is masked. 1 Receive FIFO not empty and no read prior to timeout period interrupt is not masked. + RTIM + + + read-write + [0:0] + Receive overrun interrupt mask: 0 Receive FIFO written to while full condition interrupt is masked. 1 Receive FIFO written to while full condition interrupt is not masked. + RORIM + + + SSPIMSC + 0x00000000 + + + 0x0018 + Raw interrupt status register, SSPRIS on page 3-10 + + + read-only + [3:3] + Gives the raw interrupt state, prior to masking, of the SSPTXINTR interrupt + TXRIS + + + read-only + [2:2] + Gives the raw interrupt state, prior to masking, of the SSPRXINTR interrupt + RXRIS + + + read-only + [1:1] + Gives the raw interrupt state, prior to masking, of the SSPRTINTR interrupt + RTRIS + + + read-only + [0:0] + Gives the raw interrupt state, prior to masking, of the SSPRORINTR interrupt + RORRIS + + + SSPRIS + 0x00000008 + + + 0x001c + Masked interrupt status register, SSPMIS on page 3-11 + + + read-only + [3:3] + Gives the transmit FIFO masked interrupt state, after masking, of the SSPTXINTR interrupt + TXMIS + + + read-only + [2:2] + Gives the receive FIFO masked interrupt state, after masking, of the SSPRXINTR interrupt + RXMIS + + + read-only + [1:1] + Gives the receive timeout masked interrupt state, after masking, of the SSPRTINTR interrupt + RTMIS + + + read-only + [0:0] + Gives the receive over run masked interrupt status, after masking, of the SSPRORINTR interrupt + RORMIS + + + SSPMIS + 0x00000000 + + + 0x0020 + Interrupt clear register, SSPICR on page 3-11 + + + read-write + [1:1] + Clears the SSPRTINTR interrupt + oneToClear + RTIC + + + read-write + [0:0] + Clears the SSPRORINTR interrupt + oneToClear + RORIC + + + SSPICR + 0x00000000 + + + 0x0024 + DMA control register, SSPDMACR on page 3-12 + + + read-write + [1:1] + Transmit DMA Enable. If this bit is set to 1, DMA for the transmit FIFO is enabled. + TXDMAE + + + read-write + [0:0] + Receive DMA Enable. If this bit is set to 1, DMA for the receive FIFO is enabled. + RXDMAE + + + SSPDMACR + 0x00000000 + + + 0x0fe0 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + + + read-only + [7:0] + These bits read back as 0x22 + PARTNUMBER0 + + + SSPPERIPHID0 + 0x00000022 + + + 0x0fe4 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + + + read-only + [7:4] + These bits read back as 0x1 + DESIGNER0 + + + read-only + [3:0] + These bits read back as 0x0 + PARTNUMBER1 + + + SSPPERIPHID1 + 0x00000010 + + + 0x0fe8 + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + + + read-only + [7:4] + These bits return the peripheral revision + REVISION + + + read-only + [3:0] + These bits read back as 0x4 + DESIGNER1 + + + SSPPERIPHID2 + 0x00000034 + + + 0x0fec + Peripheral identification registers, SSPPeriphID0-3 on page 3-13 + + + read-only + [7:0] + These bits read back as 0x00 + CONFIGURATION + + + SSPPERIPHID3 + 0x00000000 + + + 0x0ff0 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + + + read-only + [7:0] + These bits read back as 0x0D + SSPPCELLID0 + + + SSPPCELLID0 + 0x0000000d + + + 0x0ff4 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + + + read-only + [7:0] + These bits read back as 0xF0 + SSPPCELLID1 + + + SSPPCELLID1 + 0x000000f0 + + + 0x0ff8 + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + + + read-only + [7:0] + These bits read back as 0x05 + SSPPCELLID2 + + + SSPPCELLID2 + 0x00000005 + + + 0x0ffc + PrimeCell identification registers, SSPPCellID0-3 on page 3-16 + + + read-only + [7:0] + These bits read back as 0xB1 + SSPPCELLID3 + + + SSPPCELLID3 + 0x000000b1 + + + 32 + 1 + + + 0x40040000 + + SPI1_IRQ + 19 + + SPI1 + + + + 0 + 0x0100 + registers + + 0x40044000 + DW_apb_i2c address block + + I2C0_IRQ + 23 + + I2C0 + + + 0x0000 + I2C Control Register. This register can be written only when the DW_apb_i2c is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.\n\n + Read/Write Access: - bit 10 is read only. - bit 11 is read only - bit 16 is read only - bit 17 is read only - bits 18 and 19 are read only. + + + read-only + [10:10] + Master issues the STOP_DET interrupt irrespective of whether master is active or not + STOP_DET_IF_MASTER_ACTIVE + + + read-write + [9:9] + This bit controls whether DW_apb_i2c should hold the bus when the Rx FIFO is physically full to its RX_BUFFER_DEPTH, as described in the IC_RX_FULL_HLD_BUS_EN parameter.\n\n + Reset value: 0x0. + + + Overflow when RX_FIFO is full + DISABLED + 0 + + + Hold bus when RX_FIFO is full + ENABLED + 1 + + + RX_FIFO_FULL_HLD_CTRL + + + read-write + [8:8] + This bit controls the generation of the TX_EMPTY interrupt, as described in the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0. + + + Default behaviour of TX_EMPTY interrupt + DISABLED + 0 + + + Controlled generation of TX_EMPTY interrupt + ENABLED + 1 + + + TX_EMPTY_CTRL + + + read-write + [7:7] + In slave mode: - 1'b1: issues the STOP_DET interrupt only when it is addressed. - 1'b0: issues the STOP_DET irrespective of whether it's addressed or not. Reset value: 0x0\n\n + NOTE: During a general call address, this slave does not issue the STOP_DET interrupt if STOP_DET_IF_ADDRESSED = 1'b1, even if the slave responds to the general call address by generating ACK. The STOP_DET interrupt is generated only when the transmitted address matches the slave address (SAR). + + + slave issues STOP_DET intr always + DISABLED + 0 + + + slave issues STOP_DET intr only if addressed + ENABLED + 1 + + + STOP_DET_IFADDRESSED + + + read-write + [6:6] + This bit controls whether I2C has its slave disabled, which means once the presetn signal is applied, then this bit is set and the slave is disabled.\n\n + If this bit is set (slave is disabled), DW_apb_i2c functions only as a master and does not perform any action that requires a slave.\n\n + NOTE: Software should ensure that if this bit is written with 0, then bit 0 should also be written with a 0. + + + Slave mode is enabled + SLAVE_ENABLED + 0 + + + Slave mode is disabled + SLAVE_DISABLED + 1 + + + IC_SLAVE_DISABLE + + + read-write + [5:5] + Determines whether RESTART conditions may be sent when acting as a master. Some older slaves do not support handling RESTART conditions; however, RESTART conditions are used in several DW_apb_i2c operations. When RESTART is disabled, the master is prohibited from performing the following functions: - Sending a START BYTE - Performing any high-speed mode operation - High-speed mode operation - Performing direction changes in combined format mode - Performing a read operation with a 10-bit address By replacing RESTART condition followed by a STOP and a subsequent START condition, split operations are broken down into multiple DW_apb_i2c transfers. If the above operations are performed, it will result in setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register.\n\n + Reset value: ENABLED + + + Master restart disabled + DISABLED + 0 + + + Master restart enabled + ENABLED + 1 + + + IC_RESTART_EN + + + read-write + [4:4] + Controls whether the DW_apb_i2c starts its transfers in 7- or 10-bit addressing mode when acting as a master. - 0: 7-bit addressing - 1: 10-bit addressing + + + Master 7Bit addressing mode + ADDR_7BITS + 0 + + + Master 10Bit addressing mode + ADDR_10BITS + 1 + + + IC_10BITADDR_MASTER + + + read-write + [3:3] + When acting as a slave, this bit controls whether the DW_apb_i2c responds to 7- or 10-bit addresses. - 0: 7-bit addressing. The DW_apb_i2c ignores transactions that involve 10-bit addressing; for 7-bit addressing, only the lower 7 bits of the IC_SAR register are compared. - 1: 10-bit addressing. The DW_apb_i2c responds to only 10-bit addressing transfers that match the full 10 bits of the IC_SAR register. + + + Slave 7Bit addressing + ADDR_7BITS + 0 + + + Slave 10Bit addressing + ADDR_10BITS + 1 + + + IC_10BITADDR_SLAVE + + + read-write + [2:1] + These bits control at which speed the DW_apb_i2c operates; its setting is relevant only if one is operating the DW_apb_i2c in master mode. Hardware protects against illegal values being programmed by software. These bits must be programmed appropriately for slave mode also, as it is used to capture correct value of spike filter as per the speed mode.\n\n + This register should be programmed only with a value in the range of 1 to IC_MAX_SPEED_MODE; otherwise, hardware updates this register with the value of IC_MAX_SPEED_MODE.\n\n + 1: standard mode (100 kbit/s)\n\n + 2: fast mode (<=400 kbit/s) or fast mode plus (<=1000Kbit/s)\n\n + 3: high speed mode (3.4 Mbit/s)\n\n + Note: This field is not applicable when IC_ULTRA_FAST_MODE=1 + + + Standard Speed mode of operation + STANDARD + 1 + + + Fast or Fast Plus mode of operation + FAST + 2 + + + High Speed mode of operation + HIGH + 3 + + + SPEED + + + read-write + [0:0] + This bit controls whether the DW_apb_i2c master is enabled.\n\n + NOTE: Software should ensure that if this bit is written with '1' then bit 6 should also be written with a '1'. + + + Master mode is disabled + DISABLED + 0 + + + Master mode is enabled + ENABLED + 1 + + + MASTER_MODE + + + IC_CON + 0x00000065 + + + 0x0004 + I2C Target Address Register\n\n + This register is 12 bits wide, and bits 31:12 are reserved. This register can be written to only when IC_ENABLE[0] is set to 0.\n\n + Note: If the software or application is aware that the DW_apb_i2c is not using the TAR address for the pending commands in the Tx FIFO, then it is possible to update the TAR address even while the Tx FIFO has entries (IC_STATUS[2]= 0). - It is not necessary to perform any write to this register if DW_apb_i2c is enabled as an I2C slave only. + + + read-write + [11:11] + This bit indicates whether software performs a Device-ID or General Call or START BYTE command. - 0: ignore bit 10 GC_OR_START and use IC_TAR normally - 1: perform special I2C command as specified in Device_ID or GC_OR_START bit Reset value: 0x0 + + + Disables programming of GENERAL_CALL or START_BYTE transmission + DISABLED + 0 + + + Enables programming of GENERAL_CALL or START_BYTE transmission + ENABLED + 1 + + + SPECIAL + + + read-write + [10:10] + If bit 11 (SPECIAL) is set to 1 and bit 13(Device-ID) is set to 0, then this bit indicates whether a General Call or START byte command is to be performed by the DW_apb_i2c. - 0: General Call Address - after issuing a General Call, only writes may be performed. Attempting to issue a read command results in setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. The DW_apb_i2c remains in General Call mode until the SPECIAL bit value (bit 11) is cleared. - 1: START BYTE Reset value: 0x0 + + + GENERAL_CALL byte transmission + GENERAL_CALL + 0 + + + START byte transmission + START_BYTE + 1 + + + GC_OR_START + + + read-write + [9:0] + This is the target address for any master transaction. When transmitting a General Call, these bits are ignored. To generate a START BYTE, the CPU needs to write only once into these bits.\n\n + If the IC_TAR and IC_SAR are the same, loopback exists but the FIFOs are shared between master and slave, so full loopback is not feasible. Only one direction loopback mode is supported (simplex), not duplex. A master cannot transmit to itself; it can transmit to only a slave. + IC_TAR + + + IC_TAR + 0x00000055 + + + 0x0008 + I2C Slave Address Register + + + read-write + [9:0] + The IC_SAR holds the slave address when the I2C is operating as a slave. For 7-bit addressing, only IC_SAR[6:0] is used.\n\n + This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.\n\n + Note: The default values cannot be any of the reserved address locations: that is, 0x00 to 0x07, or 0x78 to 0x7f. The correct operation of the device is not guaranteed if you program the IC_SAR or IC_TAR to a reserved value. Refer to <<table_I2C_firstbyte_bit_defs>> for a complete list of these reserved values. + IC_SAR + + + IC_SAR + 0x00000055 + + + 0x0010 + I2C Rx/Tx Data Buffer and Command Register; this is the register the CPU writes to when filling the TX FIFO and the CPU reads from when retrieving bytes from RX FIFO.\n\n + The size of the register changes as follows:\n\n + Write: - 11 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=1 - 9 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=0 Read: - 12 bits when IC_FIRST_DATA_BYTE_STATUS = 1 - 8 bits when IC_FIRST_DATA_BYTE_STATUS = 0 Note: In order for the DW_apb_i2c to continue acknowledging reads, a read command should be written for every byte that is to be received; otherwise the DW_apb_i2c will stop acknowledging. + + + read-only + [11:11] + Indicates the first data byte received after the address phase for receive transfer in Master receiver or Slave receiver mode.\n\n + Reset value : 0x0\n\n + NOTE: In case of APB_DATA_WIDTH=8,\n\n + 1. The user has to perform two APB Reads to IC_DATA_CMD in order to get status on 11 bit.\n\n + 2. In order to read the 11 bit, the user has to perform the first data byte read [7:0] (offset 0x10) and then perform the second read [15:8] (offset 0x11) in order to know the status of 11 bit (whether the data received in previous read is a first data byte or not).\n\n + 3. The 11th bit is an optional read field, user can ignore 2nd byte read [15:8] (offset 0x11) if not interested in FIRST_DATA_BYTE status. + + + Sequential data byte received + INACTIVE + 0 + + + Non sequential data byte received + ACTIVE + 1 + + + FIRST_DATA_BYTE + + + read-write + [10:10] + This bit controls whether a RESTART is issued before the byte is sent or received.\n\n + 1 - If IC_RESTART_EN is 1, a RESTART is issued before the data is sent/received (according to the value of CMD), regardless of whether or not the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead.\n\n + 0 - If IC_RESTART_EN is 1, a RESTART is issued only if the transfer direction is changing from the previous command; if IC_RESTART_EN is 0, a STOP followed by a START is issued instead.\n\n + Reset value: 0x0 + + + Don't Issue RESTART before this command + DISABLE + 0 + + + Issue RESTART before this command + ENABLE + 1 + + + clear + RESTART + + + read-write + [9:9] + This bit controls whether a STOP is issued after the byte is sent or received.\n\n + - 1 - STOP is issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master immediately tries to start a new transfer by issuing a START and arbitrating for the bus. - 0 - STOP is not issued after this byte, regardless of whether or not the Tx FIFO is empty. If the Tx FIFO is not empty, the master continues the current transfer by sending/receiving data bytes according to the value of the CMD bit. If the Tx FIFO is empty, the master holds the SCL line low and stalls the bus until a new command is available in the Tx FIFO. Reset value: 0x0 + + + Don't Issue STOP after this command + DISABLE + 0 + + + Issue STOP after this command + ENABLE + 1 + + + clear + STOP + + + read-write + [8:8] + This bit controls whether a read or a write is performed. This bit does not control the direction when the DW_apb_i2con acts as a slave. It controls only the direction when it acts as a master.\n\n + When a command is entered in the TX FIFO, this bit distinguishes the write and read commands. In slave-receiver mode, this bit is a 'don't care' because writes to this register are not required. In slave-transmitter mode, a '0' indicates that the data in IC_DATA_CMD is to be transmitted.\n\n + When programming this bit, you should remember the following: attempting to perform a read operation after a General Call command has been sent results in a TX_ABRT interrupt (bit 6 of the IC_RAW_INTR_STAT register), unless bit 11 (SPECIAL) in the IC_TAR register has been cleared. If a '1' is written to this bit after receiving a RD_REQ interrupt, then a TX_ABRT interrupt occurs.\n\n + Reset value: 0x0 + + + Master Write Command + WRITE + 0 + + + Master Read Command + READ + 1 + + + clear + CMD + + + read-write + [7:0] + This register contains the data to be transmitted or received on the I2C bus. If you are writing to this register and want to perform a read, bits 7:0 (DAT) are ignored by the DW_apb_i2c. However, when you read this register, these bits return the value of data received on the DW_apb_i2c interface.\n\n + Reset value: 0x0 + DAT + + + IC_DATA_CMD + 0x00000000 + + + 0x0014 + Standard Speed I2C Clock SCL High Count Register + + + read-write + [15:0] + This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for standard speed. For more information, refer to 'IC_CLK Frequency Configuration'.\n\n + This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.\n\n + The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH = 8, the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed.\n\n + NOTE: This register must not be programmed to a value higher than 65525, because DW_apb_i2c uses a 16-bit counter to flag an I2C bus idle condition when this counter reaches a value of IC_SS_SCL_HCNT + 10. + IC_SS_SCL_HCNT + + + IC_SS_SCL_HCNT + 0x00000028 + + + 0x0018 + Standard Speed I2C Clock SCL Low Count Register + + + read-write + [15:0] + This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock low period count for standard speed. For more information, refer to 'IC_CLK Frequency Configuration'\n\n + This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.\n\n + The minimum valid value is 8; hardware prevents values less than this being written, and if attempted, results in 8 being set. For designs with APB_DATA_WIDTH = 8, the order of programming is important to ensure the correct operation of DW_apb_i2c. The lower byte must be programmed first, and then the upper byte is programmed. + IC_SS_SCL_LCNT + + + IC_SS_SCL_LCNT + 0x0000002f + + + 0x001c + Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register + + + read-write + [15:0] + This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock high-period count for fast mode or fast mode plus. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'.\n\n + This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard. This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.\n\n + The minimum valid value is 6; hardware prevents values less than this being written, and if attempted results in 6 being set. For designs with APB_DATA_WIDTH == 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed. + IC_FS_SCL_HCNT + + + IC_FS_SCL_HCNT + 0x00000006 + + + 0x0020 + Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register + + + read-write + [15:0] + This register must be set before any I2C bus transaction can take place to ensure proper I/O timing. This register sets the SCL clock low period count for fast speed. It is used in high-speed mode to send the Master Code and START BYTE or General CALL. For more information, refer to 'IC_CLK Frequency Configuration'.\n\n + This register goes away and becomes read-only returning 0s if IC_MAX_SPEED_MODE = standard.\n\n + This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.\n\n + The minimum valid value is 8; hardware prevents values less than this being written, and if attempted results in 8 being set. For designs with APB_DATA_WIDTH = 8 the order of programming is important to ensure the correct operation of the DW_apb_i2c. The lower byte must be programmed first. Then the upper byte is programmed. If the value is less than 8 then the count value gets changed to 8. + IC_FS_SCL_LCNT + + + IC_FS_SCL_LCNT + 0x0000000d + + + 0x002c + I2C Interrupt Status Register\n\n + Each bit in this register has a corresponding mask bit in the IC_INTR_MASK register. These bits are cleared by reading the matching interrupt clear register. The unmasked raw versions of these bits are available in the IC_RAW_INTR_STAT register. + + + read-only + [13:13] + See IC_RAW_INTR_STAT for a detailed description of R_MASTER_ON_HOLD bit.\n\n + Reset value: 0x0 + + + R_MASTER_ON_HOLD interrupt is inactive + INACTIVE + 0 + + + R_MASTER_ON_HOLD interrupt is active + ACTIVE + 1 + + + R_MASTER_ON_HOLD + + + read-only + [12:12] + See IC_RAW_INTR_STAT for a detailed description of R_RESTART_DET bit.\n\n + Reset value: 0x0 + + + R_RESTART_DET interrupt is inactive + INACTIVE + 0 + + + R_RESTART_DET interrupt is active + ACTIVE + 1 + + + R_RESTART_DET + + + read-only + [11:11] + See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL bit.\n\n + Reset value: 0x0 + + + R_GEN_CALL interrupt is inactive + INACTIVE + 0 + + + R_GEN_CALL interrupt is active + ACTIVE + 1 + + + R_GEN_CALL + + + read-only + [10:10] + See IC_RAW_INTR_STAT for a detailed description of R_START_DET bit.\n\n + Reset value: 0x0 + + + R_START_DET interrupt is inactive + INACTIVE + 0 + + + R_START_DET interrupt is active + ACTIVE + 1 + + + R_START_DET + + + read-only + [9:9] + See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET bit.\n\n + Reset value: 0x0 + + + R_STOP_DET interrupt is inactive + INACTIVE + 0 + + + R_STOP_DET interrupt is active + ACTIVE + 1 + + + R_STOP_DET + + + read-only + [8:8] + See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY bit.\n\n + Reset value: 0x0 + + + R_ACTIVITY interrupt is inactive + INACTIVE + 0 + + + R_ACTIVITY interrupt is active + ACTIVE + 1 + + + R_ACTIVITY + + + read-only + [7:7] + See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE bit.\n\n + Reset value: 0x0 + + + R_RX_DONE interrupt is inactive + INACTIVE + 0 + + + R_RX_DONE interrupt is active + ACTIVE + 1 + + + R_RX_DONE + + + read-only + [6:6] + See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT bit.\n\n + Reset value: 0x0 + + + R_TX_ABRT interrupt is inactive + INACTIVE + 0 + + + R_TX_ABRT interrupt is active + ACTIVE + 1 + + + R_TX_ABRT + + + read-only + [5:5] + See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ bit.\n\n + Reset value: 0x0 + + + R_RD_REQ interrupt is inactive + INACTIVE + 0 + + + R_RD_REQ interrupt is active + ACTIVE + 1 + + + R_RD_REQ + + + read-only + [4:4] + See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY bit.\n\n + Reset value: 0x0 + + + R_TX_EMPTY interrupt is inactive + INACTIVE + 0 + + + R_TX_EMPTY interrupt is active + ACTIVE + 1 + + + R_TX_EMPTY + + + read-only + [3:3] + See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER bit.\n\n + Reset value: 0x0 + + + R_TX_OVER interrupt is inactive + INACTIVE + 0 + + + R_TX_OVER interrupt is active + ACTIVE + 1 + + + R_TX_OVER + + + read-only + [2:2] + See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL bit.\n\n + Reset value: 0x0 + + + R_RX_FULL interrupt is inactive + INACTIVE + 0 + + + R_RX_FULL interrupt is active + ACTIVE + 1 + + + R_RX_FULL + + + read-only + [1:1] + See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER bit.\n\n + Reset value: 0x0 + + + R_RX_OVER interrupt is inactive + INACTIVE + 0 + + + R_RX_OVER interrupt is active + ACTIVE + 1 + + + R_RX_OVER + + + read-only + [0:0] + See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER bit.\n\n + Reset value: 0x0 + + + RX_UNDER interrupt is inactive + INACTIVE + 0 + + + RX_UNDER interrupt is active + ACTIVE + 1 + + + R_RX_UNDER + + + IC_INTR_STAT + 0x00000000 + + + 0x0030 + I2C Interrupt Mask Register.\n\n + These bits mask their corresponding interrupt status bits. This register is active low; a value of 0 masks the interrupt, whereas a value of 1 unmasks the interrupt. + + + read-only + [13:13] + This M_MASTER_ON_HOLD_read_only bit masks the R_MASTER_ON_HOLD interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x0 + + + MASTER_ON_HOLD interrupt is masked + ENABLED + 0 + + + MASTER_ON_HOLD interrupt is unmasked + DISABLED + 1 + + + M_MASTER_ON_HOLD_READ_ONLY + + + read-write + [12:12] + This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x0 + + + RESTART_DET interrupt is masked + ENABLED + 0 + + + RESTART_DET interrupt is unmasked + DISABLED + 1 + + + M_RESTART_DET + + + read-write + [11:11] + This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + GEN_CALL interrupt is masked + ENABLED + 0 + + + GEN_CALL interrupt is unmasked + DISABLED + 1 + + + M_GEN_CALL + + + read-write + [10:10] + This bit masks the R_START_DET interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x0 + + + START_DET interrupt is masked + ENABLED + 0 + + + START_DET interrupt is unmasked + DISABLED + 1 + + + M_START_DET + + + read-write + [9:9] + This bit masks the R_STOP_DET interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x0 + + + STOP_DET interrupt is masked + ENABLED + 0 + + + STOP_DET interrupt is unmasked + DISABLED + 1 + + + M_STOP_DET + + + read-write + [8:8] + This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x0 + + + ACTIVITY interrupt is masked + ENABLED + 0 + + + ACTIVITY interrupt is unmasked + DISABLED + 1 + + + M_ACTIVITY + + + read-write + [7:7] + This bit masks the R_RX_DONE interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + RX_DONE interrupt is masked + ENABLED + 0 + + + RX_DONE interrupt is unmasked + DISABLED + 1 + + + M_RX_DONE + + + read-write + [6:6] + This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + TX_ABORT interrupt is masked + ENABLED + 0 + + + TX_ABORT interrupt is unmasked + DISABLED + 1 + + + M_TX_ABRT + + + read-write + [5:5] + This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + RD_REQ interrupt is masked + ENABLED + 0 + + + RD_REQ interrupt is unmasked + DISABLED + 1 + + + M_RD_REQ + + + read-write + [4:4] + This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + TX_EMPTY interrupt is masked + ENABLED + 0 + + + TX_EMPTY interrupt is unmasked + DISABLED + 1 + + + M_TX_EMPTY + + + read-write + [3:3] + This bit masks the R_TX_OVER interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + TX_OVER interrupt is masked + ENABLED + 0 + + + TX_OVER interrupt is unmasked + DISABLED + 1 + + + M_TX_OVER + + + read-write + [2:2] + This bit masks the R_RX_FULL interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + RX_FULL interrupt is masked + ENABLED + 0 + + + RX_FULL interrupt is unmasked + DISABLED + 1 + + + M_RX_FULL + + + read-write + [1:1] + This bit masks the R_RX_OVER interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + RX_OVER interrupt is masked + ENABLED + 0 + + + RX_OVER interrupt is unmasked + DISABLED + 1 + + + M_RX_OVER + + + read-write + [0:0] + This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT register.\n\n + Reset value: 0x1 + + + RX_UNDER interrupt is masked + ENABLED + 0 + + + RX_UNDER interrupt is unmasked + DISABLED + 1 + + + M_RX_UNDER + + + IC_INTR_MASK + 0x000008ff + + + 0x0034 + I2C Raw Interrupt Status Register\n\n + Unlike the IC_INTR_STAT register, these bits are not masked so they always show the true status of the DW_apb_i2c. + + + read-only + [13:13] + Indicates whether master is holding the bus and TX FIFO is empty. Enabled only when I2C_DYNAMIC_TAR_UPDATE=1 and IC_EMPTYFIFO_HOLD_MASTER_EN=1.\n\n + Reset value: 0x0 + + + MASTER_ON_HOLD interrupt is inactive + INACTIVE + 0 + + + MASTER_ON_HOLD interrupt is active + ACTIVE + 1 + + + MASTER_ON_HOLD + + + read-only + [12:12] + Indicates whether a RESTART condition has occurred on the I2C interface when DW_apb_i2c is operating in Slave mode and the slave is being addressed. Enabled only when IC_SLV_RESTART_DET_EN=1.\n\n + Note: However, in high-speed mode or during a START BYTE transfer, the RESTART comes before the address field as per the I2C protocol. In this case, the slave is not the addressed slave when the RESTART is issued, therefore DW_apb_i2c does not generate the RESTART_DET interrupt.\n\n + Reset value: 0x0 + + + RESTART_DET interrupt is inactive + INACTIVE + 0 + + + RESTART_DET interrupt is active + ACTIVE + 1 + + + RESTART_DET + + + read-only + [11:11] + Set only when a General Call address is received and it is acknowledged. It stays set until it is cleared either by disabling DW_apb_i2c or when the CPU reads bit 0 of the IC_CLR_GEN_CALL register. DW_apb_i2c stores the received data in the Rx buffer.\n\n + Reset value: 0x0 + + + GEN_CALL interrupt is inactive + INACTIVE + 0 + + + GEN_CALL interrupt is active + ACTIVE + 1 + + + GEN_CALL + + + read-only + [10:10] + Indicates whether a START or RESTART condition has occurred on the I2C interface regardless of whether DW_apb_i2c is operating in slave or master mode.\n\n + Reset value: 0x0 + + + START_DET interrupt is inactive + INACTIVE + 0 + + + START_DET interrupt is active + ACTIVE + 1 + + + START_DET + + + read-only + [9:9] + Indicates whether a STOP condition has occurred on the I2C interface regardless of whether DW_apb_i2c is operating in slave or master mode.\n\n + In Slave Mode: - If IC_CON[7]=1'b1 (STOP_DET_IFADDRESSED), the STOP_DET interrupt will be issued only if slave is addressed. Note: During a general call address, this slave does not issue a STOP_DET interrupt if STOP_DET_IF_ADDRESSED=1'b1, even if the slave responds to the general call address by generating ACK. The STOP_DET interrupt is generated only when the transmitted address matches the slave address (SAR). - If IC_CON[7]=1'b0 (STOP_DET_IFADDRESSED), the STOP_DET interrupt is issued irrespective of whether it is being addressed. In Master Mode: - If IC_CON[10]=1'b1 (STOP_DET_IF_MASTER_ACTIVE),the STOP_DET interrupt will be issued only if Master is active. - If IC_CON[10]=1'b0 (STOP_DET_IFADDRESSED),the STOP_DET interrupt will be issued irrespective of whether master is active or not. Reset value: 0x0 + + + STOP_DET interrupt is inactive + INACTIVE + 0 + + + STOP_DET interrupt is active + ACTIVE + 1 + + + STOP_DET + + + read-only + [8:8] + This bit captures DW_apb_i2c activity and stays set until it is cleared. There are four ways to clear it: - Disabling the DW_apb_i2c - Reading the IC_CLR_ACTIVITY register - Reading the IC_CLR_INTR register - System reset Once this bit is set, it stays set unless one of the four methods is used to clear it. Even if the DW_apb_i2c module is idle, this bit remains set until cleared, indicating that there was activity on the bus.\n\n + Reset value: 0x0 + + + RAW_INTR_ACTIVITY interrupt is inactive + INACTIVE + 0 + + + RAW_INTR_ACTIVITY interrupt is active + ACTIVE + 1 + + + ACTIVITY + + + read-only + [7:7] + When the DW_apb_i2c is acting as a slave-transmitter, this bit is set to 1 if the master does not acknowledge a transmitted byte. This occurs on the last byte of the transmission, indicating that the transmission is done.\n\n + Reset value: 0x0 + + + RX_DONE interrupt is inactive + INACTIVE + 0 + + + RX_DONE interrupt is active + ACTIVE + 1 + + + RX_DONE + + + read-only + [6:6] + This bit indicates if DW_apb_i2c, as an I2C transmitter, is unable to complete the intended actions on the contents of the transmit FIFO. This situation can occur both as an I2C master or an I2C slave, and is referred to as a 'transmit abort'. When this bit is set to 1, the IC_TX_ABRT_SOURCE register indicates the reason why the transmit abort takes places.\n\n + Note: The DW_apb_i2c flushes/resets/empties the TX_FIFO and RX_FIFO whenever there is a transmit abort caused by any of the events tracked by the IC_TX_ABRT_SOURCE register. The FIFOs remains in this flushed state until the register IC_CLR_TX_ABRT is read. Once this read is performed, the Tx FIFO is then ready to accept more data bytes from the APB interface.\n\n + Reset value: 0x0 + + + TX_ABRT interrupt is inactive + INACTIVE + 0 + + + TX_ABRT interrupt is active + ACTIVE + 1 + + + TX_ABRT + + + read-only + [5:5] + This bit is set to 1 when DW_apb_i2c is acting as a slave and another I2C master is attempting to read data from DW_apb_i2c. The DW_apb_i2c holds the I2C bus in a wait state (SCL=0) until this interrupt is serviced, which means that the slave has been addressed by a remote master that is asking for data to be transferred. The processor must respond to this interrupt and then write the requested data to the IC_DATA_CMD register. This bit is set to 0 just after the processor reads the IC_CLR_RD_REQ register.\n\n + Reset value: 0x0 + + + RD_REQ interrupt is inactive + INACTIVE + 0 + + + RD_REQ interrupt is active + ACTIVE + 1 + + + RD_REQ + + + read-only + [4:4] + The behavior of the TX_EMPTY interrupt status differs based on the TX_EMPTY_CTRL selection in the IC_CON register. - When TX_EMPTY_CTRL = 0: This bit is set to 1 when the transmit buffer is at or below the threshold value set in the IC_TX_TL register. - When TX_EMPTY_CTRL = 1: This bit is set to 1 when the transmit buffer is at or below the threshold value set in the IC_TX_TL register and the transmission of the address/data from the internal shift register for the most recently popped command is completed. It is automatically cleared by hardware when the buffer level goes above the threshold. When IC_ENABLE[0] is set to 0, the TX FIFO is flushed and held in reset. There the TX FIFO looks like it has no data within it, so this bit is set to 1, provided there is activity in the master or slave state machines. When there is no longer any activity, then with ic_en=0, this bit is set to 0.\n\n + Reset value: 0x0. + + + TX_EMPTY interrupt is inactive + INACTIVE + 0 + + + TX_EMPTY interrupt is active + ACTIVE + 1 + + + TX_EMPTY + + + read-only + [3:3] + Set during transmit if the transmit buffer is filled to IC_TX_BUFFER_DEPTH and the processor attempts to issue another I2C command by writing to the IC_DATA_CMD register. When the module is disabled, this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared.\n\n + Reset value: 0x0 + + + TX_OVER interrupt is inactive + INACTIVE + 0 + + + TX_OVER interrupt is active + ACTIVE + 1 + + + TX_OVER + + + read-only + [2:2] + Set when the receive buffer reaches or goes above the RX_TL threshold in the IC_RX_TL register. It is automatically cleared by hardware when buffer level goes below the threshold. If the module is disabled (IC_ENABLE[0]=0), the RX FIFO is flushed and held in reset; therefore the RX FIFO is not full. So this bit is cleared once the IC_ENABLE bit 0 is programmed with a 0, regardless of the activity that continues.\n\n + Reset value: 0x0 + + + RX_FULL interrupt is inactive + INACTIVE + 0 + + + RX_FULL interrupt is active + ACTIVE + 1 + + + RX_FULL + + + read-only + [1:1] + Set if the receive buffer is completely filled to IC_RX_BUFFER_DEPTH and an additional byte is received from an external I2C device. The DW_apb_i2c acknowledges this, but any data bytes received after the FIFO is full are lost. If the module is disabled (IC_ENABLE[0]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared.\n\n + Note: If bit 9 of the IC_CON register (RX_FIFO_FULL_HLD_CTRL) is programmed to HIGH, then the RX_OVER interrupt never occurs, because the Rx FIFO never overflows.\n\n + Reset value: 0x0 + + + RX_OVER interrupt is inactive + INACTIVE + 0 + + + RX_OVER interrupt is active + ACTIVE + 1 + + + RX_OVER + + + read-only + [0:0] + Set if the processor attempts to read the receive buffer when it is empty by reading from the IC_DATA_CMD register. If the module is disabled (IC_ENABLE[0]=0), this bit keeps its level until the master or slave state machines go into idle, and when ic_en goes to 0, this interrupt is cleared.\n\n + Reset value: 0x0 + + + RX_UNDER interrupt is inactive + INACTIVE + 0 + + + RX_UNDER interrupt is active + ACTIVE + 1 + + + RX_UNDER + + + IC_RAW_INTR_STAT + 0x00000000 + + + 0x0038 + I2C Receive FIFO Threshold Register + + + read-write + [7:0] + Receive FIFO Threshold Level.\n\n + Controls the level of entries (or above) that triggers the RX_FULL interrupt (bit 2 in IC_RAW_INTR_STAT register). The valid range is 0-255, with the additional restriction that hardware does not allow this value to be set to a value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 1 entry, and a value of 255 sets the threshold for 256 entries. + RX_TL + + + IC_RX_TL + 0x00000000 + + + 0x003c + I2C Transmit FIFO Threshold Register + + + read-write + [7:0] + Transmit FIFO Threshold Level.\n\n + Controls the level of entries (or below) that trigger the TX_EMPTY interrupt (bit 4 in IC_RAW_INTR_STAT register). The valid range is 0-255, with the additional restriction that it may not be set to value larger than the depth of the buffer. If an attempt is made to do that, the actual value set will be the maximum depth of the buffer. A value of 0 sets the threshold for 0 entries, and a value of 255 sets the threshold for 255 entries. + TX_TL + + + IC_TX_TL + 0x00000000 + + + 0x0040 + Clear Combined and Individual Interrupt Register + + + read-only + [0:0] + Read this register to clear the combined interrupt, all individual interrupts, and the IC_TX_ABRT_SOURCE register. This bit does not clear hardware clearable interrupts but software clearable interrupts. Refer to Bit 9 of the IC_TX_ABRT_SOURCE register for an exception to clearing IC_TX_ABRT_SOURCE.\n\n + Reset value: 0x0 + CLR_INTR + + + IC_CLR_INTR + 0x00000000 + + + 0x0044 + Clear RX_UNDER Interrupt Register + + + read-only + [0:0] + Read this register to clear the RX_UNDER interrupt (bit 0) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_RX_UNDER + + + IC_CLR_RX_UNDER + 0x00000000 + + + 0x0048 + Clear RX_OVER Interrupt Register + + + read-only + [0:0] + Read this register to clear the RX_OVER interrupt (bit 1) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_RX_OVER + + + IC_CLR_RX_OVER + 0x00000000 + + + 0x004c + Clear TX_OVER Interrupt Register + + + read-only + [0:0] + Read this register to clear the TX_OVER interrupt (bit 3) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_TX_OVER + + + IC_CLR_TX_OVER + 0x00000000 + + + 0x0050 + Clear RD_REQ Interrupt Register + + + read-only + [0:0] + Read this register to clear the RD_REQ interrupt (bit 5) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_RD_REQ + + + IC_CLR_RD_REQ + 0x00000000 + + + 0x0054 + Clear TX_ABRT Interrupt Register + + + read-only + [0:0] + Read this register to clear the TX_ABRT interrupt (bit 6) of the IC_RAW_INTR_STAT register, and the IC_TX_ABRT_SOURCE register. This also releases the TX FIFO from the flushed/reset state, allowing more writes to the TX FIFO. Refer to Bit 9 of the IC_TX_ABRT_SOURCE register for an exception to clearing IC_TX_ABRT_SOURCE.\n\n + Reset value: 0x0 + CLR_TX_ABRT + + + IC_CLR_TX_ABRT + 0x00000000 + + + 0x0058 + Clear RX_DONE Interrupt Register + + + read-only + [0:0] + Read this register to clear the RX_DONE interrupt (bit 7) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_RX_DONE + + + IC_CLR_RX_DONE + 0x00000000 + + + 0x005c + Clear ACTIVITY Interrupt Register + + + read-only + [0:0] + Reading this register clears the ACTIVITY interrupt if the I2C is not active anymore. If the I2C module is still active on the bus, the ACTIVITY interrupt bit continues to be set. It is automatically cleared by hardware if the module is disabled and if there is no further activity on the bus. The value read from this register to get status of the ACTIVITY interrupt (bit 8) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_ACTIVITY + + + IC_CLR_ACTIVITY + 0x00000000 + + + 0x0060 + Clear STOP_DET Interrupt Register + + + read-only + [0:0] + Read this register to clear the STOP_DET interrupt (bit 9) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_STOP_DET + + + IC_CLR_STOP_DET + 0x00000000 + + + 0x0064 + Clear START_DET Interrupt Register + + + read-only + [0:0] + Read this register to clear the START_DET interrupt (bit 10) of the IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_START_DET + + + IC_CLR_START_DET + 0x00000000 + + + 0x0068 + Clear GEN_CALL Interrupt Register + + + read-only + [0:0] + Read this register to clear the GEN_CALL interrupt (bit 11) of IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_GEN_CALL + + + IC_CLR_GEN_CALL + 0x00000000 + + + 0x006c + I2C Enable Register + + + read-write + [2:2] + In Master mode: - 1'b1: Blocks the transmission of data on I2C bus even if Tx FIFO has data to transmit. - 1'b0: The transmission of data starts on I2C bus automatically, as soon as the first data is available in the Tx FIFO. Note: To block the execution of Master commands, set the TX_CMD_BLOCK bit only when Tx FIFO is empty (IC_STATUS[2]==1) and Master is in Idle state (IC_STATUS[5] == 0). Any further commands put in the Tx FIFO are not executed until TX_CMD_BLOCK bit is unset. Reset value: IC_TX_CMD_BLOCK_DEFAULT + + + Tx Command execution not blocked + NOT_BLOCKED + 0 + + + Tx Command execution blocked + BLOCKED + 1 + + + TX_CMD_BLOCK + + + read-write + [1:1] + When set, the controller initiates the transfer abort. - 0: ABORT not initiated or ABORT done - 1: ABORT operation in progress The software can abort the I2C transfer in master mode by setting this bit. The software can set this bit only when ENABLE is already set; otherwise, the controller ignores any write to ABORT bit. The software cannot clear the ABORT bit once set. In response to an ABORT, the controller issues a STOP and flushes the Tx FIFO after completing the current transfer, then sets the TX_ABORT interrupt after the abort operation. The ABORT bit is cleared automatically after the abort operation.\n\n + For a detailed description on how to abort I2C transfers, refer to 'Aborting I2C Transfers'.\n\n + Reset value: 0x0 + + + ABORT operation not in progress + DISABLE + 0 + + + ABORT operation in progress + ENABLED + 1 + + + ABORT + + + read-write + [0:0] + Controls whether the DW_apb_i2c is enabled. - 0: Disables DW_apb_i2c (TX and RX FIFOs are held in an erased state) - 1: Enables DW_apb_i2c Software can disable DW_apb_i2c while it is active. However, it is important that care be taken to ensure that DW_apb_i2c is disabled properly. A recommended procedure is described in 'Disabling DW_apb_i2c'.\n\n + When DW_apb_i2c is disabled, the following occurs: - The TX FIFO and RX FIFO get flushed. - Status bits in the IC_INTR_STAT register are still active until DW_apb_i2c goes into IDLE state. If the module is transmitting, it stops as well as deletes the contents of the transmit buffer after the current transfer is complete. If the module is receiving, the DW_apb_i2c stops the current transfer at the end of the current byte and does not acknowledge the transfer.\n\n + In systems with asynchronous pclk and ic_clk when IC_CLK_TYPE parameter set to asynchronous (1), there is a two ic_clk delay when enabling or disabling the DW_apb_i2c. For a detailed description on how to disable DW_apb_i2c, refer to 'Disabling DW_apb_i2c'\n\n + Reset value: 0x0 + + + I2C is disabled + DISABLED + 0 + + + I2C is enabled + ENABLED + 1 + + + ENABLE + + + IC_ENABLE + 0x00000000 + + + 0x0070 + I2C Status Register\n\n + This is a read-only register used to indicate the current transfer status and FIFO status. The status register may be read at any time. None of the bits in this register request an interrupt.\n\n + When the I2C is disabled by writing 0 in bit 0 of the IC_ENABLE register: - Bits 1 and 2 are set to 1 - Bits 3 and 10 are set to 0 When the master or slave state machines goes to idle and ic_en=0: - Bits 5 and 6 are set to 0 + + + read-only + [6:6] + Slave FSM Activity Status. When the Slave Finite State Machine (FSM) is not in the IDLE state, this bit is set. - 0: Slave FSM is in IDLE state so the Slave part of DW_apb_i2c is not Active - 1: Slave FSM is not in IDLE state so the Slave part of DW_apb_i2c is Active Reset value: 0x0 + + + Slave is idle + IDLE + 0 + + + Slave not idle + ACTIVE + 1 + + + SLV_ACTIVITY + + + read-only + [5:5] + Master FSM Activity Status. When the Master Finite State Machine (FSM) is not in the IDLE state, this bit is set. - 0: Master FSM is in IDLE state so the Master part of DW_apb_i2c is not Active - 1: Master FSM is not in IDLE state so the Master part of DW_apb_i2c is Active Note: IC_STATUS[0]-that is, ACTIVITY bit-is the OR of SLV_ACTIVITY and MST_ACTIVITY bits.\n\n + Reset value: 0x0 + + + Master is idle + IDLE + 0 + + + Master not idle + ACTIVE + 1 + + + MST_ACTIVITY + + + read-only + [4:4] + Receive FIFO Completely Full. When the receive FIFO is completely full, this bit is set. When the receive FIFO contains one or more empty location, this bit is cleared. - 0: Receive FIFO is not full - 1: Receive FIFO is full Reset value: 0x0 + + + Rx FIFO not full + NOT_FULL + 0 + + + Rx FIFO is full + FULL + 1 + + + RFF + + + read-only + [3:3] + Receive FIFO Not Empty. This bit is set when the receive FIFO contains one or more entries; it is cleared when the receive FIFO is empty. - 0: Receive FIFO is empty - 1: Receive FIFO is not empty Reset value: 0x0 + + + Rx FIFO is empty + EMPTY + 0 + + + Rx FIFO not empty + NOT_EMPTY + 1 + + + RFNE + + + read-only + [2:2] + Transmit FIFO Completely Empty. When the transmit FIFO is completely empty, this bit is set. When it contains one or more valid entries, this bit is cleared. This bit field does not request an interrupt. - 0: Transmit FIFO is not empty - 1: Transmit FIFO is empty Reset value: 0x1 + + + Tx FIFO not empty + NON_EMPTY + 0 + + + Tx FIFO is empty + EMPTY + 1 + + + TFE + + + read-only + [1:1] + Transmit FIFO Not Full. Set when the transmit FIFO contains one or more empty locations, and is cleared when the FIFO is full. - 0: Transmit FIFO is full - 1: Transmit FIFO is not full Reset value: 0x1 + + + Tx FIFO is full + FULL + 0 + + + Tx FIFO not full + NOT_FULL + 1 + + + TFNF + + + read-only + [0:0] + I2C Activity Status. Reset value: 0x0 + + + I2C is idle + INACTIVE + 0 + + + I2C is active + ACTIVE + 1 + + + ACTIVITY + + + IC_STATUS + 0x00000006 + + + 0x0074 + I2C Transmit FIFO Level Register This register contains the number of valid data entries in the transmit FIFO buffer. It is cleared whenever: - The I2C is disabled - There is a transmit abort - that is, TX_ABRT bit is set in the IC_RAW_INTR_STAT register - The slave bulk transmit mode is aborted The register increments whenever data is placed into the transmit FIFO and decrements when data is taken from the transmit FIFO. + + + read-only + [4:0] + Transmit FIFO Level. Contains the number of valid data entries in the transmit FIFO.\n\n + Reset value: 0x0 + TXFLR + + + IC_TXFLR + 0x00000000 + + + 0x0078 + I2C Receive FIFO Level Register This register contains the number of valid data entries in the receive FIFO buffer. It is cleared whenever: - The I2C is disabled - Whenever there is a transmit abort caused by any of the events tracked in IC_TX_ABRT_SOURCE The register increments whenever data is placed into the receive FIFO and decrements when data is taken from the receive FIFO. + + + read-only + [4:0] + Receive FIFO Level. Contains the number of valid data entries in the receive FIFO.\n\n + Reset value: 0x0 + RXFLR + + + IC_RXFLR + 0x00000000 + + + 0x007c + I2C SDA Hold Time Length Register\n\n + The bits [15:0] of this register are used to control the hold time of SDA during transmit in both slave and master mode (after SCL goes from HIGH to LOW).\n\n + The bits [23:16] of this register are used to extend the SDA transition (if any) whenever SCL is HIGH in the receiver in either master or slave mode.\n\n + Writes to this register succeed only when IC_ENABLE[0]=0.\n\n + The values in this register are in units of ic_clk period. The value programmed in IC_SDA_TX_HOLD must be greater than the minimum hold time in each mode one cycle in master mode, seven cycles in slave mode for the value to be implemented.\n\n + The programmed SDA hold time during transmit (IC_SDA_TX_HOLD) cannot exceed at any time the duration of the low part of scl. Therefore the programmed value cannot be larger than N_SCL_LOW-2, where N_SCL_LOW is the duration of the low part of the scl period measured in ic_clk cycles. + + + read-write + [23:16] + Sets the required SDA hold time in units of ic_clk period, when DW_apb_i2c acts as a receiver.\n\n + Reset value: IC_DEFAULT_SDA_HOLD[23:16]. + IC_SDA_RX_HOLD + + + read-write + [15:0] + Sets the required SDA hold time in units of ic_clk period, when DW_apb_i2c acts as a transmitter.\n\n + Reset value: IC_DEFAULT_SDA_HOLD[15:0]. + IC_SDA_TX_HOLD + + + IC_SDA_HOLD + 0x00000001 + + + 0x0080 + I2C Transmit Abort Source Register\n\n + This register has 32 bits that indicate the source of the TX_ABRT bit. Except for Bit 9, this register is cleared whenever the IC_CLR_TX_ABRT register or the IC_CLR_INTR register is read. To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; RESTART must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]).\n\n + Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, Bit 9 clears for one cycle and is then re-asserted. + + + read-only + [31:23] + This field indicates the number of Tx FIFO Data Commands which are flushed due to TX_ABRT interrupt. It is cleared whenever I2C is disabled.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter + TX_FLUSH_CNT + + + read-only + [16:16] + This is a master-mode-only bit. Master has detected the transfer abort (IC_ENABLE[1])\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter + + + Transfer abort detected by master- scenario not present + ABRT_USER_ABRT_VOID + 0 + + + Transfer abort detected by master + ABRT_USER_ABRT_GENERATED + 1 + + + ABRT_USER_ABRT + + + read-only + [15:15] + 1: When the processor side responds to a slave mode request for data to be transmitted to a remote master and user writes a 1 in CMD (bit 8) of IC_DATA_CMD register.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Slave-Transmitter + + + Slave trying to transmit to remote master in read mode- scenario not present + ABRT_SLVRD_INTX_VOID + 0 + + + Slave trying to transmit to remote master in read mode + ABRT_SLVRD_INTX_GENERATED + 1 + + + ABRT_SLVRD_INTX + + + read-only + [14:14] + This field indicates that a Slave has lost the bus while transmitting data to a remote master. IC_TX_ABRT_SOURCE[12] is set at the same time. Note: Even though the slave never 'owns' the bus, something could go wrong on the bus. This is a fail safe check. For instance, during a data transmission at the low-to-high transition of SCL, if what is on the data bus is not what is supposed to be transmitted, then DW_apb_i2c no longer own the bus.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Slave-Transmitter + + + Slave lost arbitration to remote master- scenario not present + ABRT_SLV_ARBLOST_VOID + 0 + + + Slave lost arbitration to remote master + ABRT_SLV_ARBLOST_GENERATED + 1 + + + ABRT_SLV_ARBLOST + + + read-only + [13:13] + This field specifies that the Slave has received a read command and some data exists in the TX FIFO, so the slave issues a TX_ABRT interrupt to flush old data in TX FIFO.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Slave-Transmitter + + + Slave flushes existing data in TX-FIFO upon getting read command- scenario not present + ABRT_SLVFLUSH_TXFIFO_VOID + 0 + + + Slave flushes existing data in TX-FIFO upon getting read command + ABRT_SLVFLUSH_TXFIFO_GENERATED + 1 + + + ABRT_SLVFLUSH_TXFIFO + + + read-only + [12:12] + This field specifies that the Master has lost arbitration, or if IC_TX_ABRT_SOURCE[14] is also set, then the slave transmitter has lost arbitration.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter + + + Master or Slave-Transmitter lost arbitration- scenario not present + ABRT_LOST_VOID + 0 + + + Master or Slave-Transmitter lost arbitration + ABRT_LOST_GENERATED + 1 + + + ARB_LOST + + + read-only + [11:11] + This field indicates that the User tries to initiate a Master operation with the Master mode disabled.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Master-Receiver + + + User initiating master operation when MASTER disabled- scenario not present + ABRT_MASTER_DIS_VOID + 0 + + + User initiating master operation when MASTER disabled + ABRT_MASTER_DIS_GENERATED + 1 + + + ABRT_MASTER_DIS + + + read-only + [10:10] + This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the master sends a read command in 10-bit addressing mode.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Receiver + + + Master not trying to read in 10Bit addressing mode when RESTART disabled + ABRT_10B_RD_VOID + 0 + + + Master trying to read in 10Bit addressing mode when RESTART disabled + ABRT_10B_RD_GENERATED + 1 + + + ABRT_10B_RD_NORSTRT + + + read-only + [9:9] + To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be fixed first; restart must be enabled (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must be cleared (IC_TAR[10]). Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in the same manner as other bits in this register. If the source of the ABRT_SBYTE_NORSTRT is not fixed before attempting to clear this bit, bit 9 clears for one cycle and then gets reasserted. When this field is set to 1, the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to send a START Byte.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master + + + User trying to send START byte when RESTART disabled- scenario not present + ABRT_SBYTE_NORSTRT_VOID + 0 + + + User trying to send START byte when RESTART disabled + ABRT_SBYTE_NORSTRT_GENERATED + 1 + + + ABRT_SBYTE_NORSTRT + + + read-only + [8:8] + This field indicates that the restart is disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to use the master to transfer data in High Speed mode.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Master-Receiver + + + User trying to switch Master to HS mode when RESTART disabled- scenario not present + ABRT_HS_NORSTRT_VOID + 0 + + + User trying to switch Master to HS mode when RESTART disabled + ABRT_HS_NORSTRT_GENERATED + 1 + + + ABRT_HS_NORSTRT + + + read-only + [7:7] + This field indicates that the Master has sent a START Byte and the START Byte was acknowledged (wrong behavior).\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master + + + ACK detected for START byte- scenario not present + ABRT_SBYTE_ACKDET_VOID + 0 + + + ACK detected for START byte + ABRT_SBYTE_ACKDET_GENERATED + 1 + + + ABRT_SBYTE_ACKDET + + + read-only + [6:6] + This field indicates that the Master is in High Speed mode and the High Speed Master code was acknowledged (wrong behavior).\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master + + + HS Master code ACKed in HS Mode- scenario not present + ABRT_HS_ACK_VOID + 0 + + + HS Master code ACKed in HS Mode + ABRT_HS_ACK_GENERATED + 1 + + + ABRT_HS_ACKDET + + + read-only + [5:5] + This field indicates that DW_apb_i2c in the master mode has sent a General Call but the user programmed the byte following the General Call to be a read from the bus (IC_DATA_CMD[9] is set to 1).\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter + + + GCALL is followed by read from bus-scenario not present + ABRT_GCALL_READ_VOID + 0 + + + GCALL is followed by read from bus + ABRT_GCALL_READ_GENERATED + 1 + + + ABRT_GCALL_READ + + + read-only + [4:4] + This field indicates that DW_apb_i2c in master mode has sent a General Call and no slave on the bus acknowledged the General Call.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter + + + GCALL not ACKed by any slave-scenario not present + ABRT_GCALL_NOACK_VOID + 0 + + + GCALL not ACKed by any slave + ABRT_GCALL_NOACK_GENERATED + 1 + + + ABRT_GCALL_NOACK + + + read-only + [3:3] + This field indicates the master-mode only bit. When the master receives an acknowledgement for the address, but when it sends data byte(s) following the address, it did not receive an acknowledge from the remote slave(s).\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter + + + Transmitted data non-ACKed by addressed slave-scenario not present + ABRT_TXDATA_NOACK_VOID + 0 + + + Transmitted data not ACKed by addressed slave + ABRT_TXDATA_NOACK_GENERATED + 1 + + + ABRT_TXDATA_NOACK + + + read-only + [2:2] + This field indicates that the Master is in 10-bit address mode and that the second address byte of the 10-bit address was not acknowledged by any slave.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Master-Receiver + + + This abort is not generated + INACTIVE + 0 + + + Byte 2 of 10Bit Address not ACKed by any slave + ACTIVE + 1 + + + ABRT_10ADDR2_NOACK + + + read-only + [1:1] + This field indicates that the Master is in 10-bit address mode and the first 10-bit address byte was not acknowledged by any slave.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Master-Receiver + + + This abort is not generated + INACTIVE + 0 + + + Byte 1 of 10Bit Address not ACKed by any slave + ACTIVE + 1 + + + ABRT_10ADDR1_NOACK + + + read-only + [0:0] + This field indicates that the Master is in 7-bit addressing mode and the address sent was not acknowledged by any slave.\n\n + Reset value: 0x0\n\n + Role of DW_apb_i2c: Master-Transmitter or Master-Receiver + + + This abort is not generated + INACTIVE + 0 + + + This abort is generated because of NOACK for 7-bit address + ACTIVE + 1 + + + ABRT_7B_ADDR_NOACK + + + IC_TX_ABRT_SOURCE + 0x00000000 + + + 0x0084 + Generate Slave Data NACK Register\n\n + The register is used to generate a NACK for the data part of a transfer when DW_apb_i2c is acting as a slave-receiver. This register only exists when the IC_SLV_DATA_NACK_ONLY parameter is set to 1. When this parameter disabled, this register does not exist and writing to the register's address has no effect.\n\n + A write can occur on this register if both of the following conditions are met: - DW_apb_i2c is disabled (IC_ENABLE[0] = 0) - Slave part is inactive (IC_STATUS[6] = 0) Note: The IC_STATUS[6] is a register read-back location for the internal slv_activity signal; the user should poll this before writing the ic_slv_data_nack_only bit. + + + read-write + [0:0] + Generate NACK. This NACK generation only occurs when DW_apb_i2c is a slave-receiver. If this register is set to a value of 1, it can only generate a NACK after a data byte is received; hence, the data transfer is aborted and the data received is not pushed to the receive buffer.\n\n + When the register is set to a value of 0, it generates NACK/ACK, depending on normal criteria. - 1: generate NACK after data byte received - 0: generate NACK/ACK normally Reset value: 0x0 + + + Slave receiver generates NACK normally + DISABLED + 0 + + + Slave receiver generates NACK upon data reception only + ENABLED + 1 + + + NACK + + + IC_SLV_DATA_NACK_ONLY + 0x00000000 + + + 0x0088 + DMA Control Register\n\n + The register is used to enable the DMA Controller interface operation. There is a separate bit for transmit and receive. This can be programmed regardless of the state of IC_ENABLE. + + + read-write + [1:1] + Transmit DMA Enable. This bit enables/disables the transmit FIFO DMA channel. Reset value: 0x0 + + + transmit FIFO DMA channel disabled + DISABLED + 0 + + + Transmit FIFO DMA channel enabled + ENABLED + 1 + + + TDMAE + + + read-write + [0:0] + Receive DMA Enable. This bit enables/disables the receive FIFO DMA channel. Reset value: 0x0 + + + Receive FIFO DMA channel disabled + DISABLED + 0 + + + Receive FIFO DMA channel enabled + ENABLED + 1 + + + RDMAE + + + IC_DMA_CR + 0x00000000 + + + 0x008c + DMA Transmit Data Level Register + + + read-write + [3:0] + Transmit Data Level. This bit field controls the level at which a DMA request is made by the transmit logic. It is equal to the watermark level; that is, the dma_tx_req signal is generated when the number of valid data entries in the transmit FIFO is equal to or below this field value, and TDMAE = 1.\n\n + Reset value: 0x0 + DMATDL + + + IC_DMA_TDLR + 0x00000000 + + + 0x0090 + I2C Receive Data Level Register + + + read-write + [3:0] + Receive Data Level. This bit field controls the level at which a DMA request is made by the receive logic. The watermark level = DMARDL+1; that is, dma_rx_req is generated when the number of valid data entries in the receive FIFO is equal to or more than this field value + 1, and RDMAE =1. For instance, when DMARDL is 0, then dma_rx_req is asserted when 1 or more data entries are present in the receive FIFO.\n\n + Reset value: 0x0 + DMARDL + + + IC_DMA_RDLR + 0x00000000 + + + 0x0094 + I2C SDA Setup Register\n\n + This register controls the amount of time delay (in terms of number of ic_clk clock periods) introduced in the rising edge of SCL - relative to SDA changing - when DW_apb_i2c services a read request in a slave-transmitter operation. The relevant I2C requirement is tSU:DAT (note 4) as detailed in the I2C Bus Specification. This register must be programmed with a value equal to or greater than 2.\n\n + Writes to this register succeed only when IC_ENABLE[0] = 0.\n\n + Note: The length of setup time is calculated using [(IC_SDA_SETUP - 1) * (ic_clk_period)], so if the user requires 10 ic_clk periods of setup time, they should program a value of 11. The IC_SDA_SETUP register is only used by the DW_apb_i2c when operating as a slave transmitter. + + + read-write + [7:0] + SDA Setup. It is recommended that if the required delay is 1000ns, then for an ic_clk frequency of 10 MHz, IC_SDA_SETUP should be programmed to a value of 11. IC_SDA_SETUP must be programmed with a minimum value of 2. + SDA_SETUP + + + IC_SDA_SETUP + 0x00000064 + + + 0x0098 + I2C ACK General Call Register\n\n + The register controls whether DW_apb_i2c responds with a ACK or NACK when it receives an I2C General Call address.\n\n + This register is applicable only when the DW_apb_i2c is in slave mode. + + + read-write + [0:0] + ACK General Call. When set to 1, DW_apb_i2c responds with a ACK (by asserting ic_data_oe) when it receives a General Call. Otherwise, DW_apb_i2c responds with a NACK (by negating ic_data_oe). + + + Generate NACK for a General Call + DISABLED + 0 + + + Generate ACK for a General Call + ENABLED + 1 + + + ACK_GEN_CALL + + + IC_ACK_GENERAL_CALL + 0x00000001 + + + 0x009c + I2C Enable Status Register\n\n + The register is used to report the DW_apb_i2c hardware status when the IC_ENABLE[0] register is set from 1 to 0; that is, when DW_apb_i2c is disabled.\n\n + If IC_ENABLE[0] has been set to 1, bits 2:1 are forced to 0, and bit 0 is forced to 1.\n\n + If IC_ENABLE[0] has been set to 0, bits 2:1 is only be valid as soon as bit 0 is read as '0'.\n\n + Note: When IC_ENABLE[0] has been set to 0, a delay occurs for bit 0 to be read as 0 because disabling the DW_apb_i2c depends on I2C bus activities. + + + read-only + [2:2] + Slave Received Data Lost. This bit indicates if a Slave-Receiver operation has been aborted with at least one data byte received from an I2C transfer due to the setting bit 0 of IC_ENABLE from 1 to 0. When read as 1, DW_apb_i2c is deemed to have been actively engaged in an aborted I2C transfer (with matching address) and the data phase of the I2C transfer has been entered, even though a data byte has been responded with a NACK.\n\n + Note: If the remote I2C master terminates the transfer with a STOP condition before the DW_apb_i2c has a chance to NACK a transfer, and IC_ENABLE[0] has been set to 0, then this bit is also set to 1.\n\n + When read as 0, DW_apb_i2c is deemed to have been disabled without being actively involved in the data phase of a Slave-Receiver transfer.\n\n + Note: The CPU can safely read this bit when IC_EN (bit 0) is read as 0.\n\n + Reset value: 0x0 + + + Slave RX Data is not lost + INACTIVE + 0 + + + Slave RX Data is lost + ACTIVE + 1 + + + SLV_RX_DATA_LOST + + + read-only + [1:1] + Slave Disabled While Busy (Transmit, Receive). This bit indicates if a potential or active Slave operation has been aborted due to the setting bit 0 of the IC_ENABLE register from 1 to 0. This bit is set when the CPU writes a 0 to the IC_ENABLE register while:\n\n + (a) DW_apb_i2c is receiving the address byte of the Slave-Transmitter operation from a remote master;\n\n + OR,\n\n + (b) address and data bytes of the Slave-Receiver operation from a remote master.\n\n + When read as 1, DW_apb_i2c is deemed to have forced a NACK during any part of an I2C transfer, irrespective of whether the I2C address matches the slave address set in DW_apb_i2c (IC_SAR register) OR if the transfer is completed before IC_ENABLE is set to 0 but has not taken effect.\n\n + Note: If the remote I2C master terminates the transfer with a STOP condition before the DW_apb_i2c has a chance to NACK a transfer, and IC_ENABLE[0] has been set to 0, then this bit will also be set to 1.\n\n + When read as 0, DW_apb_i2c is deemed to have been disabled when there is master activity, or when the I2C bus is idle.\n\n + Note: The CPU can safely read this bit when IC_EN (bit 0) is read as 0.\n\n + Reset value: 0x0 + + + Slave is disabled when it is idle + INACTIVE + 0 + + + Slave is disabled when it is active + ACTIVE + 1 + + + SLV_DISABLED_WHILE_BUSY + + + read-only + [0:0] + ic_en Status. This bit always reflects the value driven on the output port ic_en. - When read as 1, DW_apb_i2c is deemed to be in an enabled state. - When read as 0, DW_apb_i2c is deemed completely inactive. Note: The CPU can safely read this bit anytime. When this bit is read as 0, the CPU can safely read SLV_RX_DATA_LOST (bit 2) and SLV_DISABLED_WHILE_BUSY (bit 1).\n\n + Reset value: 0x0 + + + I2C disabled + DISABLED + 0 + + + I2C enabled + ENABLED + 1 + + + IC_EN + + + IC_ENABLE_STATUS + 0x00000000 + + + 0x00a0 + I2C SS, FS or FM+ spike suppression limit\n\n + This register is used to store the duration, measured in ic_clk cycles, of the longest spike that is filtered out by the spike suppression logic when the component is operating in SS, FS or FM+ modes. The relevant I2C requirement is tSP (table 4) as detailed in the I2C Bus Specification. This register must be programmed with a minimum value of 1. + + + read-write + [7:0] + This register must be set before any I2C bus transaction can take place to ensure stable operation. This register sets the duration, measured in ic_clk cycles, of the longest spike in the SCL or SDA lines that will be filtered out by the spike suppression logic. This register can be written only when the I2C interface is disabled which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect. The minimum valid value is 1; hardware prevents values less than this being written, and if attempted results in 1 being set. or more information, refer to 'Spike Suppression'. + IC_FS_SPKLEN + + + IC_FS_SPKLEN + 0x00000007 + + + 0x00a8 + Clear RESTART_DET Interrupt Register + + + read-only + [0:0] + Read this register to clear the RESTART_DET interrupt (bit 12) of IC_RAW_INTR_STAT register.\n\n + Reset value: 0x0 + CLR_RESTART_DET + + + IC_CLR_RESTART_DET + 0x00000000 + + + 0x00f4 + Component Parameter Register 1\n\n + Note This register is not implemented and therefore reads as 0. If it was implemented it would be a constant read-only register that contains encoded information about the component's parameter settings. Fields shown below are the settings for those parameters + + + read-only + [23:16] + TX Buffer Depth = 16 + TX_BUFFER_DEPTH + + + read-only + [15:8] + RX Buffer Depth = 16 + RX_BUFFER_DEPTH + + + read-only + [7:7] + Encoded parameters not visible + ADD_ENCODED_PARAMS + + + read-only + [6:6] + DMA handshaking signals are enabled + HAS_DMA + + + read-only + [5:5] + COMBINED Interrupt outputs + INTR_IO + + + read-only + [4:4] + Programmable count values for each mode. + HC_COUNT_VALUES + + + read-only + [3:2] + MAX SPEED MODE = FAST MODE + MAX_SPEED_MODE + + + read-only + [1:0] + APB data bus width is 32 bits + APB_DATA_WIDTH + + + IC_COMP_PARAM_1 + 0x00000000 + + + 0x00f8 + I2C Component Version Register + + + read-only + [31:0] + IC_COMP_VERSION + + + IC_COMP_VERSION + 0x3230312a + + + 0x00fc + I2C Component Type Register + + + read-only + [31:0] + Designware Component Type number = 0x44_57_01_40. This assigned unique hex value is constant and is derived from the two ASCII letters 'DW' followed by a 16-bit unsigned number. + IC_COMP_TYPE + + + IC_COMP_TYPE + 0x44570140 + + + 32 + 1 + + + 0x40048000 + + I2C1_IRQ + 24 + + I2C1 + + + + 0 + 0x1000 + registers + + 0x4004c000 + Control and data interface to SAR ADC + + ADC_IRQ_FIFO + 22 + + ADC + + + 0x0000 + ADC Control and Status + + + read-write + [20:16] + Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.\n + Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.\n + The first channel to be sampled will be the one currently indicated by AINSEL.\n + AINSEL will be updated after each conversion with the newly-selected channel. + RROBIN + + + read-write + [14:12] + Select analog mux input. Updated automatically in round-robin mode. + AINSEL + + + read-write + [10:10] + Some past ADC conversion encountered an error. Write 1 to clear. + oneToClear + ERR_STICKY + + + read-only + [9:9] + The most recent ADC conversion encountered an error; result is undefined or noisy. + ERR + + + read-only + [8:8] + 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed.\n + 0 whilst conversion in progress. + READY + + + read-write + [3:3] + Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes. + START_MANY + + + read-write + [2:2] + Start a single conversion. Self-clearing. Ignored if start_many is asserted. + clear + START_ONCE + + + read-write + [1:1] + Power on temperature sensor. 1 - enabled. 0 - disabled. + TS_EN + + + read-write + [0:0] + Power on ADC and enable its clock.\n + 1 - enabled. 0 - disabled. + EN + + + CS + 0x00000000 + + + 0x0004 + Result of most recent ADC conversion + + + read-only + [11:0] + RESULT + + + RESULT + 0x00000000 + + + 0x0008 + FIFO control and status + + + read-write + [27:24] + DREQ/IRQ asserted when level >= threshold + THRESH + + + read-only + [19:16] + The number of conversion results currently waiting in the FIFO + LEVEL + + + read-write + [11:11] + 1 if the FIFO has been overflowed. Write 1 to clear. + oneToClear + OVER + + + read-write + [10:10] + 1 if the FIFO has been underflowed. Write 1 to clear. + oneToClear + UNDER + + + read-only + [9:9] + FULL + + + read-only + [8:8] + EMPTY + + + read-write + [3:3] + If 1: assert DMA requests when FIFO contains data + DREQ_EN + + + read-write + [2:2] + If 1: conversion error bit appears in the FIFO alongside the result + ERR + + + read-write + [1:1] + If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers. + SHIFT + + + read-write + [0:0] + If 1: write result to the FIFO after each conversion. + EN + + + FCS + 0x00000000 + + + 0x000c + Conversion result FIFO + + + read-only + [15:15] + 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted. + ERR + + + read-only + [11:0] + VAL + + + FIFO + 0x00000000 + + + 0x0010 + Clock divider. If non-zero, CS_START_MANY will start conversions\n + at regular intervals rather than back-to-back.\n + The divider is reset when either of these fields are written.\n + Total period is 1 + INT + FRAC / 256 + + + read-write + [23:8] + Integer part of clock divisor. + INT + + + read-write + [7:0] + Fractional part of clock divisor. First-order delta-sigma. + FRAC + + + DIV + 0x00000000 + + + 0x0014 + Raw Interrupts + + + read-only + [0:0] + Triggered when the sample FIFO reaches a certain level.\n + This level can be programmed via the FCS_THRESH field. + FIFO + + + INTR + 0x00000000 + + + 0x0018 + Interrupt Enable + + + read-write + [0:0] + Triggered when the sample FIFO reaches a certain level.\n + This level can be programmed via the FCS_THRESH field. + FIFO + + + INTE + 0x00000000 + + + 0x001c + Interrupt Force + + + read-write + [0:0] + Triggered when the sample FIFO reaches a certain level.\n + This level can be programmed via the FCS_THRESH field. + FIFO + + + INTF + 0x00000000 + + + 0x0020 + Interrupt status after masking & forcing + + + read-only + [0:0] + Triggered when the sample FIFO reaches a certain level.\n + This level can be programmed via the FCS_THRESH field. + FIFO + + + INTS + 0x00000000 + + + 32 + 2 + + + + 0 + 0x1000 + registers + + 0x40050000 + Simple PWM + + PWM_IRQ_WRAP + 4 + + PWM + + + 0x0000 + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH0_CSR + 0x00000000 + + + 0x0004 + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH0_DIV + 0x00000010 + + + 0x0008 + Direct access to the PWM counter + + + read-write + [15:0] + CH0_CTR + + + CH0_CTR + 0x00000000 + + + 0x000c + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH0_CC + 0x00000000 + + + 0x0010 + Counter wrap value + + + read-write + [15:0] + CH0_TOP + + + CH0_TOP + 0x0000ffff + + + 0x0014 + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH1_CSR + 0x00000000 + + + 0x0018 + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH1_DIV + 0x00000010 + + + 0x001c + Direct access to the PWM counter + + + read-write + [15:0] + CH1_CTR + + + CH1_CTR + 0x00000000 + + + 0x0020 + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH1_CC + 0x00000000 + + + 0x0024 + Counter wrap value + + + read-write + [15:0] + CH1_TOP + + + CH1_TOP + 0x0000ffff + + + 0x0028 + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH2_CSR + 0x00000000 + + + 0x002c + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH2_DIV + 0x00000010 + + + 0x0030 + Direct access to the PWM counter + + + read-write + [15:0] + CH2_CTR + + + CH2_CTR + 0x00000000 + + + 0x0034 + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH2_CC + 0x00000000 + + + 0x0038 + Counter wrap value + + + read-write + [15:0] + CH2_TOP + + + CH2_TOP + 0x0000ffff + + + 0x003c + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH3_CSR + 0x00000000 + + + 0x0040 + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH3_DIV + 0x00000010 + + + 0x0044 + Direct access to the PWM counter + + + read-write + [15:0] + CH3_CTR + + + CH3_CTR + 0x00000000 + + + 0x0048 + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH3_CC + 0x00000000 + + + 0x004c + Counter wrap value + + + read-write + [15:0] + CH3_TOP + + + CH3_TOP + 0x0000ffff + + + 0x0050 + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH4_CSR + 0x00000000 + + + 0x0054 + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH4_DIV + 0x00000010 + + + 0x0058 + Direct access to the PWM counter + + + read-write + [15:0] + CH4_CTR + + + CH4_CTR + 0x00000000 + + + 0x005c + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH4_CC + 0x00000000 + + + 0x0060 + Counter wrap value + + + read-write + [15:0] + CH4_TOP + + + CH4_TOP + 0x0000ffff + + + 0x0064 + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH5_CSR + 0x00000000 + + + 0x0068 + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH5_DIV + 0x00000010 + + + 0x006c + Direct access to the PWM counter + + + read-write + [15:0] + CH5_CTR + + + CH5_CTR + 0x00000000 + + + 0x0070 + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH5_CC + 0x00000000 + + + 0x0074 + Counter wrap value + + + read-write + [15:0] + CH5_TOP + + + CH5_TOP + 0x0000ffff + + + 0x0078 + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH6_CSR + 0x00000000 + + + 0x007c + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH6_DIV + 0x00000010 + + + 0x0080 + Direct access to the PWM counter + + + read-write + [15:0] + CH6_CTR + + + CH6_CTR + 0x00000000 + + + 0x0084 + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH6_CC + 0x00000000 + + + 0x0088 + Counter wrap value + + + read-write + [15:0] + CH6_TOP + + + CH6_TOP + 0x0000ffff + + + 0x008c + Control and status register + + + read-write + [7:7] + Advance the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running\n + at less than full speed (div_int + div_frac / 16 > 1) + clear + PH_ADV + + + read-write + [6:6] + Retard the phase of the counter by 1 count, while it is running.\n + Self-clearing. Write a 1, and poll until low. Counter must be running. + clear + PH_RET + + + read-write + [5:4] + + + Free-running counting at rate dictated by fractional divider + div + 0 + + + Fractional divider operation is gated by the PWM B pin. + level + 1 + + + Counter advances with each rising edge of the PWM B pin. + rise + 2 + + + Counter advances with each falling edge of the PWM B pin. + fall + 3 + + + DIVMODE + + + read-write + [3:3] + Invert output B + B_INV + + + read-write + [2:2] + Invert output A + A_INV + + + read-write + [1:1] + 1: Enable phase-correct modulation. 0: Trailing-edge + PH_CORRECT + + + read-write + [0:0] + Enable the PWM channel. + EN + + + CH7_CSR + 0x00000000 + + + 0x0090 + INT and FRAC form a fixed-point fractional number.\n + Counting rate is system clock frequency divided by this number.\n + Fractional division uses simple 1st-order sigma-delta. + + + read-write + [11:4] + INT + + + read-write + [3:0] + FRAC + + + CH7_DIV + 0x00000010 + + + 0x0094 + Direct access to the PWM counter + + + read-write + [15:0] + CH7_CTR + + + CH7_CTR + 0x00000000 + + + 0x0098 + Counter compare values + + + read-write + [31:16] + B + + + read-write + [15:0] + A + + + CH7_CC + 0x00000000 + + + 0x009c + Counter wrap value + + + read-write + [15:0] + CH7_TOP + + + CH7_TOP + 0x0000ffff + + + 0x00a0 + This register aliases the CSR_EN bits for all channels.\n + Writing to this register allows multiple channels to be enabled\n + or disabled simultaneously, so they can run in perfect sync.\n + For each channel, there is only one physical EN register bit,\n + which can be accessed through here or CHx_CSR. + + + read-write + [7:7] + CH7 + + + read-write + [6:6] + CH6 + + + read-write + [5:5] + CH5 + + + read-write + [4:4] + CH4 + + + read-write + [3:3] + CH3 + + + read-write + [2:2] + CH2 + + + read-write + [1:1] + CH1 + + + read-write + [0:0] + CH0 + + + EN + 0x00000000 + + + 0x00a4 + Raw Interrupts + + + read-write + [7:7] + oneToClear + CH7 + + + read-write + [6:6] + oneToClear + CH6 + + + read-write + [5:5] + oneToClear + CH5 + + + read-write + [4:4] + oneToClear + CH4 + + + read-write + [3:3] + oneToClear + CH3 + + + read-write + [2:2] + oneToClear + CH2 + + + read-write + [1:1] + oneToClear + CH1 + + + read-write + [0:0] + oneToClear + CH0 + + + INTR + 0x00000000 + + + 0x00a8 + Interrupt Enable + + + read-write + [7:7] + CH7 + + + read-write + [6:6] + CH6 + + + read-write + [5:5] + CH5 + + + read-write + [4:4] + CH4 + + + read-write + [3:3] + CH3 + + + read-write + [2:2] + CH2 + + + read-write + [1:1] + CH1 + + + read-write + [0:0] + CH0 + + + INTE + 0x00000000 + + + 0x00ac + Interrupt Force + + + read-write + [7:7] + CH7 + + + read-write + [6:6] + CH6 + + + read-write + [5:5] + CH5 + + + read-write + [4:4] + CH4 + + + read-write + [3:3] + CH3 + + + read-write + [2:2] + CH2 + + + read-write + [1:1] + CH1 + + + read-write + [0:0] + CH0 + + + INTF + 0x00000000 + + + 0x00b0 + Interrupt status after masking & forcing + + + read-only + [7:7] + CH7 + + + read-only + [6:6] + CH6 + + + read-only + [5:5] + CH5 + + + read-only + [4:4] + CH4 + + + read-only + [3:3] + CH3 + + + read-only + [2:2] + CH2 + + + read-only + [1:1] + CH1 + + + read-only + [0:0] + CH0 + + + INTS + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40054000 + Controls time and alarms\n + time is a 64 bit value indicating the time in usec since power-on\n + timeh is the top 32 bits of time & timel is the bottom 32 bits\n + to change time write to timelw before timehw\n + to read time read from timelr before timehr\n + An alarm is set by setting alarm_enable and writing to the corresponding alarm register\n + When an alarm is pending, the corresponding alarm_running signal will be high\n + An alarm can be cancelled before it has finished by clearing the alarm_enable\n + When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared\n + To clear the interrupt write a 1 to the corresponding alarm_irq + + TIMER_IRQ_0 + 0 + + + TIMER_IRQ_1 + 1 + + + TIMER_IRQ_2 + 2 + + + TIMER_IRQ_3 + 3 + + TIMER + + + write-only + 0x0000 + Write to bits 63:32 of time\n + always write timelw before timehw + TIMEHW + 0x00000000 + + + write-only + 0x0004 + Write to bits 31:0 of time\n + writes do not get copied to time until timehw is written + TIMELW + 0x00000000 + + + read-only + 0x0008 + Read from bits 63:32 of time\n + always read timelr before timehr + TIMEHR + 0x00000000 + + + read-only + 0x000c + Read from bits 31:0 of time + TIMELR + 0x00000000 + + + read-write + 0x0010 + Arm alarm 0, and configure the time it will fire.\n + Once armed, the alarm fires when TIMER_ALARM0 == TIMELR.\n + The alarm will disarm itself once it fires, and can\n + be disarmed early using the ARMED status register. + ALARM0 + 0x00000000 + + + read-write + 0x0014 + Arm alarm 1, and configure the time it will fire.\n + Once armed, the alarm fires when TIMER_ALARM1 == TIMELR.\n + The alarm will disarm itself once it fires, and can\n + be disarmed early using the ARMED status register. + ALARM1 + 0x00000000 + + + read-write + 0x0018 + Arm alarm 2, and configure the time it will fire.\n + Once armed, the alarm fires when TIMER_ALARM2 == TIMELR.\n + The alarm will disarm itself once it fires, and can\n + be disarmed early using the ARMED status register. + ALARM2 + 0x00000000 + + + read-write + 0x001c + Arm alarm 3, and configure the time it will fire.\n + Once armed, the alarm fires when TIMER_ALARM3 == TIMELR.\n + The alarm will disarm itself once it fires, and can\n + be disarmed early using the ARMED status register. + ALARM3 + 0x00000000 + + + 0x0020 + Indicates the armed/disarmed status of each alarm.\n + A write to the corresponding ALARMx register arms the alarm.\n + Alarms automatically disarm upon firing, but writing ones here\n + will disarm immediately without waiting to fire. + + + read-write + [3:0] + oneToClear + ARMED + + + ARMED + 0x00000000 + + + read-only + 0x0024 + Raw read from bits 63:32 of time (no side effects) + TIMERAWH + 0x00000000 + + + read-only + 0x0028 + Raw read from bits 31:0 of time (no side effects) + TIMERAWL + 0x00000000 + + + 0x002c + Set bits high to enable pause when the corresponding debug ports are active + + + read-write + [2:2] + Pause when processor 1 is in debug mode + DBG1 + + + read-write + [1:1] + Pause when processor 0 is in debug mode + DBG0 + + + DBGPAUSE + 0x00000007 + + + 0x0030 + Set high to pause the timer + + + read-write + [0:0] + PAUSE + + + PAUSE + 0x00000000 + + + 0x0034 + Raw Interrupts + + + read-write + [3:3] + oneToClear + ALARM_3 + + + read-write + [2:2] + oneToClear + ALARM_2 + + + read-write + [1:1] + oneToClear + ALARM_1 + + + read-write + [0:0] + oneToClear + ALARM_0 + + + INTR + 0x00000000 + + + 0x0038 + Interrupt Enable + + + read-write + [3:3] + ALARM_3 + + + read-write + [2:2] + ALARM_2 + + + read-write + [1:1] + ALARM_1 + + + read-write + [0:0] + ALARM_0 + + + INTE + 0x00000000 + + + 0x003c + Interrupt Force + + + read-write + [3:3] + ALARM_3 + + + read-write + [2:2] + ALARM_2 + + + read-write + [1:1] + ALARM_1 + + + read-write + [0:0] + ALARM_0 + + + INTF + 0x00000000 + + + 0x0040 + Interrupt status after masking & forcing + + + read-only + [3:3] + ALARM_3 + + + read-only + [2:2] + ALARM_2 + + + read-only + [1:1] + ALARM_1 + + + read-only + [0:0] + ALARM_0 + + + INTS + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40058000 + WATCHDOG + + + 0x0000 + Watchdog control\n + The rst_wdsel register determines which subsystems are reset when the watchdog is triggered.\n + The watchdog can be triggered in software. + + + read-write + [31:31] + Trigger a watchdog reset + clear + TRIGGER + + + read-write + [30:30] + When not enabled the watchdog timer is paused + ENABLE + + + read-write + [26:26] + Pause the watchdog timer when processor 1 is in debug mode + PAUSE_DBG1 + + + read-write + [25:25] + Pause the watchdog timer when processor 0 is in debug mode + PAUSE_DBG0 + + + read-write + [24:24] + Pause the watchdog timer when JTAG is accessing the bus fabric + PAUSE_JTAG + + + read-only + [23:0] + Indicates the number of ticks / 2 (see errata RP2040-E1) before a watchdog reset will be triggered + TIME + + + CTRL + 0x07000000 + + + 0x0004 + Load the watchdog timer. The maximum setting is 0xffffff which corresponds to 0xffffff / 2 ticks before triggering a watchdog reset (see errata RP2040-E1). + + + write-only + [23:0] + LOAD + + + LOAD + 0x00000000 + + + 0x0008 + Logs the reason for the last reset. Both bits are zero for the case of a hardware reset. + + + read-only + [1:1] + FORCE + + + read-only + [0:0] + TIMER + + + REASON + 0x00000000 + + + read-write + 0x000c + Scratch register. Information persists through soft reset of the chip. + SCRATCH0 + 0x00000000 + + + read-write + 0x0010 + Scratch register. Information persists through soft reset of the chip. + SCRATCH1 + 0x00000000 + + + read-write + 0x0014 + Scratch register. Information persists through soft reset of the chip. + SCRATCH2 + 0x00000000 + + + read-write + 0x0018 + Scratch register. Information persists through soft reset of the chip. + SCRATCH3 + 0x00000000 + + + read-write + 0x001c + Scratch register. Information persists through soft reset of the chip. + SCRATCH4 + 0x00000000 + + + read-write + 0x0020 + Scratch register. Information persists through soft reset of the chip. + SCRATCH5 + 0x00000000 + + + read-write + 0x0024 + Scratch register. Information persists through soft reset of the chip. + SCRATCH6 + 0x00000000 + + + read-write + 0x0028 + Scratch register. Information persists through soft reset of the chip. + SCRATCH7 + 0x00000000 + + + 0x002c + Controls the tick generator + + + read-only + [19:11] + Count down timer: the remaining number clk_tick cycles before the next tick is generated. + COUNT + + + read-only + [10:10] + Is the tick generator running? + RUNNING + + + read-write + [9:9] + start / stop tick generation + ENABLE + + + read-write + [8:0] + Total number of clk_tick cycles before the next tick. + CYCLES + + + TICK + 0x00000200 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x4005c000 + Register block to control RTC + + RTC_IRQ + 25 + + RTC + + + 0x0000 + Divider minus 1 for the 1 second counter. Safe to change the value when RTC is not enabled. + + + read-write + [15:0] + CLKDIV_M1 + + + CLKDIV_M1 + 0x00000000 + + + 0x0004 + RTC setup register 0 + + + read-write + [23:12] + Year + YEAR + + + read-write + [11:8] + Month (1..12) + MONTH + + + read-write + [4:0] + Day of the month (1..31) + DAY + + + SETUP_0 + 0x00000000 + + + 0x0008 + RTC setup register 1 + + + read-write + [26:24] + Day of the week: 1-Monday...0-Sunday ISO 8601 mod 7 + DOTW + + + read-write + [20:16] + Hours + HOUR + + + read-write + [13:8] + Minutes + MIN + + + read-write + [5:0] + Seconds + SEC + + + SETUP_1 + 0x00000000 + + + 0x000c + RTC Control and status + + + read-write + [8:8] + If set, leapyear is forced off.\n + Useful for years divisible by 100 but not by 400 + FORCE_NOTLEAPYEAR + + + read-write + [4:4] + Load RTC + clear + LOAD + + + read-only + [1:1] + RTC enabled (running) + RTC_ACTIVE + + + read-write + [0:0] + Enable RTC + RTC_ENABLE + + + CTRL + 0x00000000 + + + 0x0010 + Interrupt setup register 0 + + + read-only + [29:29] + MATCH_ACTIVE + + + read-write + [28:28] + Global match enable. Don't change any other value while this one is enabled + MATCH_ENA + + + read-write + [26:26] + Enable year matching + YEAR_ENA + + + read-write + [25:25] + Enable month matching + MONTH_ENA + + + read-write + [24:24] + Enable day matching + DAY_ENA + + + read-write + [23:12] + Year + YEAR + + + read-write + [11:8] + Month (1..12) + MONTH + + + read-write + [4:0] + Day of the month (1..31) + DAY + + + IRQ_SETUP_0 + 0x00000000 + + + 0x0014 + Interrupt setup register 1 + + + read-write + [31:31] + Enable day of the week matching + DOTW_ENA + + + read-write + [30:30] + Enable hour matching + HOUR_ENA + + + read-write + [29:29] + Enable minute matching + MIN_ENA + + + read-write + [28:28] + Enable second matching + SEC_ENA + + + read-write + [26:24] + Day of the week + DOTW + + + read-write + [20:16] + Hours + HOUR + + + read-write + [13:8] + Minutes + MIN + + + read-write + [5:0] + Seconds + SEC + + + IRQ_SETUP_1 + 0x00000000 + + + 0x0018 + RTC register 1. + + + read-only + [23:12] + Year + YEAR + + + read-only + [11:8] + Month (1..12) + MONTH + + + read-only + [4:0] + Day of the month (1..31) + DAY + + + RTC_1 + 0x00000000 + + + 0x001c + RTC register 0\n + Read this before RTC 1! + + + read-only + [26:24] + Day of the week + DOTW + + + read-only + [20:16] + Hours + HOUR + + + read-only + [13:8] + Minutes + MIN + + + read-only + [5:0] + Seconds + SEC + + + RTC_0 + 0x00000000 + + + 0x0020 + Raw Interrupts + + + read-only + [0:0] + RTC + + + INTR + 0x00000000 + + + 0x0024 + Interrupt Enable + + + read-write + [0:0] + RTC + + + INTE + 0x00000000 + + + 0x0028 + Interrupt Force + + + read-write + [0:0] + RTC + + + INTF + 0x00000000 + + + 0x002c + Interrupt status after masking & forcing + + + read-only + [0:0] + RTC + + + INTS + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40060000 + ROSC + + + 0x0000 + Ring Oscillator control + + + read-write + [23:12] + On power-up this field is initialised to ENABLE\n + The system clock must be switched to another source before setting this field to DISABLE otherwise the chip will lock up\n + The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator. + + + DISABLE + 3358 + + + ENABLE + 4011 + + + ENABLE + + + read-write + [11:0] + Controls the number of delay stages in the ROSC ring\n + LOW uses stages 0 to 7\n + MEDIUM uses stages 0 to 5\n + HIGH uses stages 0 to 3\n + TOOHIGH uses stages 0 to 1 and should not be used because its frequency exceeds design specifications\n + The clock output will not glitch when changing the range up one step at a time\n + The clock output will glitch when changing the range down\n + Note: the values here are gray coded which is why HIGH comes before TOOHIGH + + + LOW + 4004 + + + MEDIUM + 4005 + + + HIGH + 4007 + + + TOOHIGH + 4006 + + + FREQ_RANGE + + + CTRL + 0x00000aa0 + + + 0x0004 + The FREQA & FREQB registers control the frequency by controlling the drive strength of each stage\n + The drive strength has 4 levels determined by the number of bits set\n + Increasing the number of bits set increases the drive strength and increases the oscillation frequency\n + 0 bits set is the default drive strength\n + 1 bit set doubles the drive strength\n + 2 bits set triples drive strength\n + 3 bits set quadruples drive strength + + + read-write + [31:16] + Set to 0x9696 to apply the settings\n + Any other value in this field will set all drive strengths to 0 + + + PASS + 38550 + + + PASSWD + + + read-write + [14:12] + Stage 3 drive strength + DS3 + + + read-write + [10:8] + Stage 2 drive strength + DS2 + + + read-write + [6:4] + Stage 1 drive strength + DS1 + + + read-write + [2:0] + Stage 0 drive strength + DS0 + + + FREQA + 0x00000000 + + + 0x0008 + For a detailed description see freqa register + + + read-write + [31:16] + Set to 0x9696 to apply the settings\n + Any other value in this field will set all drive strengths to 0 + + + PASS + 38550 + + + PASSWD + + + read-write + [14:12] + Stage 7 drive strength + DS7 + + + read-write + [10:8] + Stage 6 drive strength + DS6 + + + read-write + [6:4] + Stage 5 drive strength + DS5 + + + read-write + [2:0] + Stage 4 drive strength + DS4 + + + FREQB + 0x00000000 + + + read-write + 0x000c + Ring Oscillator pause control\n + This is used to save power by pausing the ROSC\n + On power-up this field is initialised to WAKE\n + An invalid write will also select WAKE\n + Warning: setup the irq before selecting dormant mode + DORMANT + 0x00000000 + + + 0x0010 + Controls the output divider + + + read-write + [11:0] + set to 0xaa0 + div where\n + div = 0 divides by 32\n + div = 1-31 divides by div\n + any other value sets div=0 and therefore divides by 32\n + this register resets to div=16 + + + PASS + 2720 + + + DIV + + + DIV + 0x00000000 + + + 0x0014 + Controls the phase shifted output + + + read-write + [11:4] + set to 0xaa0\n + any other value enables the output with shift=0 + PASSWD + + + read-write + [3:3] + enable the phase-shifted output\n + this can be changed on-the-fly + ENABLE + + + read-write + [2:2] + invert the phase-shifted output\n + this is ignored when div=1 + FLIP + + + read-write + [1:0] + phase shift the phase-shifted output by SHIFT input clocks\n + this can be changed on-the-fly\n + must be set to 0 before setting div=1 + SHIFT + + + PHASE + 0x00000008 + + + 0x0018 + Ring Oscillator Status + + + read-only + [31:31] + Oscillator is running and stable + STABLE + + + read-write + [24:24] + An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FRFEQA or FREQB or DORMANT + oneToClear + BADWRITE + + + read-only + [16:16] + post-divider is running\n + this resets to 0 but transitions to 1 during chip startup + DIV_RUNNING + + + read-only + [12:12] + Oscillator is enabled but not necessarily running and stable\n + this resets to 0 but transitions to 1 during chip startup + ENABLED + + + STATUS + 0x00000000 + + + 0x001c + This just reads the state of the oscillator output so randomness is compromised if the ring oscillator is stopped or run at a harmonic of the bus frequency + + + read-only + [0:0] + RANDOMBIT + + + RANDOMBIT + 0x00000001 + + + 0x0020 + A down counter running at the ROSC frequency which counts to zero and stops.\n + To start the counter write a non-zero value.\n + Can be used for short software pauses when setting up time sensitive hardware. + + + read-write + [7:0] + COUNT + + + COUNT + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x40064000 + control and status for on-chip voltage regulator and chip level reset subsystem + VREG_AND_CHIP_RESET + + + 0x0000 + Voltage regulator control and status + + + read-only + [12:12] + regulation status\n + 0=not in regulation, 1=in regulation + ROK + + + read-write + [7:4] + output voltage select\n + 0000 to 0101 - 0.80V\n + 0110 - 0.85V\n + 0111 - 0.90V\n + 1000 - 0.95V\n + 1001 - 1.00V\n + 1010 - 1.05V\n + 1011 - 1.10V (default)\n + 1100 - 1.15V\n + 1101 - 1.20V\n + 1110 - 1.25V\n + 1111 - 1.30V + VSEL + + + read-write + [1:1] + high impedance mode select\n + 0=not in high impedance mode, 1=in high impedance mode + HIZ + + + read-write + [0:0] + enable\n + 0=not enabled, 1=enabled + EN + + + VREG + 0x000000b1 + + + 0x0004 + brown-out detection control + + + read-write + [7:4] + threshold select\n + 0000 - 0.473V\n + 0001 - 0.516V\n + 0010 - 0.559V\n + 0011 - 0.602V\n + 0100 - 0.645V\n + 0101 - 0.688V\n + 0110 - 0.731V\n + 0111 - 0.774V\n + 1000 - 0.817V\n + 1001 - 0.860V (default)\n + 1010 - 0.903V\n + 1011 - 0.946V\n + 1100 - 0.989V\n + 1101 - 1.032V\n + 1110 - 1.075V\n + 1111 - 1.118V + VSEL + + + read-write + [0:0] + enable\n + 0=not enabled, 1=enabled + EN + + + BOD + 0x00000091 + + + 0x0008 + Chip reset control and status + + + read-write + [24:24] + This is set by psm_restart from the debugger.\n + Its purpose is to branch bootcode to a safe mode when the debugger has issued a psm_restart in order to recover from a boot lock-up.\n + In the safe mode the debugger can repair the boot code, clear this flag then reboot the processor. + oneToClear + PSM_RESTART_FLAG + + + read-only + [20:20] + Last reset was from the debug port + HAD_PSM_RESTART + + + read-only + [16:16] + Last reset was from the RUN pin + HAD_RUN + + + read-only + [8:8] + Last reset was from the power-on reset or brown-out detection blocks + HAD_POR + + + CHIP_RESET + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x4006c000 + Testbench manager. Allows the programmer to know what platform their software is running on. + TBMAN + + + 0x0000 + Indicates the type of platform in use + + + read-only + [1:1] + Indicates the platform is an FPGA + FPGA + + + read-only + [0:0] + Indicates the platform is an ASIC + ASIC + + + PLATFORM + 0x00000005 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x50000000 + DMA with separate read and write masters + + DMA_IRQ_0 + 11 + + + DMA_IRQ_1 + 12 + + DMA + + + read-write + 0x0000 + DMA Channel 0 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH0_READ_ADDR + 0x00000000 + + + read-write + 0x0004 + DMA Channel 0 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH0_WRITE_ADDR + 0x00000000 + + + read-write + 0x0008 + DMA Channel 0 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH0_TRANS_COUNT + 0x00000000 + + + 0x000c + DMA Channel 0 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (0). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH0_CTRL_TRIG + 0x00000000 + + + read-only + 0x0010 + Alias for channel 0 CTRL register + CH0_AL1_CTRL + 0x00000000 + + + read-only + 0x0014 + Alias for channel 0 READ_ADDR register + CH0_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0018 + Alias for channel 0 WRITE_ADDR register + CH0_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x001c + Alias for channel 0 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH0_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x0020 + Alias for channel 0 CTRL register + CH0_AL2_CTRL + 0x00000000 + + + read-only + 0x0024 + Alias for channel 0 TRANS_COUNT register + CH0_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x0028 + Alias for channel 0 READ_ADDR register + CH0_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x002c + Alias for channel 0 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH0_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x0030 + Alias for channel 0 CTRL register + CH0_AL3_CTRL + 0x00000000 + + + read-only + 0x0034 + Alias for channel 0 WRITE_ADDR register + CH0_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x0038 + Alias for channel 0 TRANS_COUNT register + CH0_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x003c + Alias for channel 0 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH0_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0040 + DMA Channel 1 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH1_READ_ADDR + 0x00000000 + + + read-write + 0x0044 + DMA Channel 1 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH1_WRITE_ADDR + 0x00000000 + + + read-write + 0x0048 + DMA Channel 1 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH1_TRANS_COUNT + 0x00000000 + + + 0x004c + DMA Channel 1 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (1). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH1_CTRL_TRIG + 0x00000800 + + + read-only + 0x0050 + Alias for channel 1 CTRL register + CH1_AL1_CTRL + 0x00000000 + + + read-only + 0x0054 + Alias for channel 1 READ_ADDR register + CH1_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0058 + Alias for channel 1 WRITE_ADDR register + CH1_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x005c + Alias for channel 1 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH1_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x0060 + Alias for channel 1 CTRL register + CH1_AL2_CTRL + 0x00000000 + + + read-only + 0x0064 + Alias for channel 1 TRANS_COUNT register + CH1_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x0068 + Alias for channel 1 READ_ADDR register + CH1_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x006c + Alias for channel 1 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH1_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x0070 + Alias for channel 1 CTRL register + CH1_AL3_CTRL + 0x00000000 + + + read-only + 0x0074 + Alias for channel 1 WRITE_ADDR register + CH1_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x0078 + Alias for channel 1 TRANS_COUNT register + CH1_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x007c + Alias for channel 1 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH1_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0080 + DMA Channel 2 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH2_READ_ADDR + 0x00000000 + + + read-write + 0x0084 + DMA Channel 2 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH2_WRITE_ADDR + 0x00000000 + + + read-write + 0x0088 + DMA Channel 2 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH2_TRANS_COUNT + 0x00000000 + + + 0x008c + DMA Channel 2 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (2). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH2_CTRL_TRIG + 0x00001000 + + + read-only + 0x0090 + Alias for channel 2 CTRL register + CH2_AL1_CTRL + 0x00000000 + + + read-only + 0x0094 + Alias for channel 2 READ_ADDR register + CH2_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0098 + Alias for channel 2 WRITE_ADDR register + CH2_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x009c + Alias for channel 2 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH2_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x00a0 + Alias for channel 2 CTRL register + CH2_AL2_CTRL + 0x00000000 + + + read-only + 0x00a4 + Alias for channel 2 TRANS_COUNT register + CH2_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x00a8 + Alias for channel 2 READ_ADDR register + CH2_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x00ac + Alias for channel 2 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH2_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x00b0 + Alias for channel 2 CTRL register + CH2_AL3_CTRL + 0x00000000 + + + read-only + 0x00b4 + Alias for channel 2 WRITE_ADDR register + CH2_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x00b8 + Alias for channel 2 TRANS_COUNT register + CH2_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x00bc + Alias for channel 2 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH2_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x00c0 + DMA Channel 3 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH3_READ_ADDR + 0x00000000 + + + read-write + 0x00c4 + DMA Channel 3 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH3_WRITE_ADDR + 0x00000000 + + + read-write + 0x00c8 + DMA Channel 3 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH3_TRANS_COUNT + 0x00000000 + + + 0x00cc + DMA Channel 3 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (3). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH3_CTRL_TRIG + 0x00001800 + + + read-only + 0x00d0 + Alias for channel 3 CTRL register + CH3_AL1_CTRL + 0x00000000 + + + read-only + 0x00d4 + Alias for channel 3 READ_ADDR register + CH3_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x00d8 + Alias for channel 3 WRITE_ADDR register + CH3_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x00dc + Alias for channel 3 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH3_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x00e0 + Alias for channel 3 CTRL register + CH3_AL2_CTRL + 0x00000000 + + + read-only + 0x00e4 + Alias for channel 3 TRANS_COUNT register + CH3_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x00e8 + Alias for channel 3 READ_ADDR register + CH3_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x00ec + Alias for channel 3 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH3_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x00f0 + Alias for channel 3 CTRL register + CH3_AL3_CTRL + 0x00000000 + + + read-only + 0x00f4 + Alias for channel 3 WRITE_ADDR register + CH3_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x00f8 + Alias for channel 3 TRANS_COUNT register + CH3_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x00fc + Alias for channel 3 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH3_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0100 + DMA Channel 4 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH4_READ_ADDR + 0x00000000 + + + read-write + 0x0104 + DMA Channel 4 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH4_WRITE_ADDR + 0x00000000 + + + read-write + 0x0108 + DMA Channel 4 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH4_TRANS_COUNT + 0x00000000 + + + 0x010c + DMA Channel 4 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (4). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH4_CTRL_TRIG + 0x00002000 + + + read-only + 0x0110 + Alias for channel 4 CTRL register + CH4_AL1_CTRL + 0x00000000 + + + read-only + 0x0114 + Alias for channel 4 READ_ADDR register + CH4_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0118 + Alias for channel 4 WRITE_ADDR register + CH4_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x011c + Alias for channel 4 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH4_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x0120 + Alias for channel 4 CTRL register + CH4_AL2_CTRL + 0x00000000 + + + read-only + 0x0124 + Alias for channel 4 TRANS_COUNT register + CH4_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x0128 + Alias for channel 4 READ_ADDR register + CH4_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x012c + Alias for channel 4 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH4_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x0130 + Alias for channel 4 CTRL register + CH4_AL3_CTRL + 0x00000000 + + + read-only + 0x0134 + Alias for channel 4 WRITE_ADDR register + CH4_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x0138 + Alias for channel 4 TRANS_COUNT register + CH4_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x013c + Alias for channel 4 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH4_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0140 + DMA Channel 5 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH5_READ_ADDR + 0x00000000 + + + read-write + 0x0144 + DMA Channel 5 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH5_WRITE_ADDR + 0x00000000 + + + read-write + 0x0148 + DMA Channel 5 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH5_TRANS_COUNT + 0x00000000 + + + 0x014c + DMA Channel 5 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (5). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH5_CTRL_TRIG + 0x00002800 + + + read-only + 0x0150 + Alias for channel 5 CTRL register + CH5_AL1_CTRL + 0x00000000 + + + read-only + 0x0154 + Alias for channel 5 READ_ADDR register + CH5_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0158 + Alias for channel 5 WRITE_ADDR register + CH5_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x015c + Alias for channel 5 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH5_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x0160 + Alias for channel 5 CTRL register + CH5_AL2_CTRL + 0x00000000 + + + read-only + 0x0164 + Alias for channel 5 TRANS_COUNT register + CH5_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x0168 + Alias for channel 5 READ_ADDR register + CH5_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x016c + Alias for channel 5 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH5_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x0170 + Alias for channel 5 CTRL register + CH5_AL3_CTRL + 0x00000000 + + + read-only + 0x0174 + Alias for channel 5 WRITE_ADDR register + CH5_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x0178 + Alias for channel 5 TRANS_COUNT register + CH5_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x017c + Alias for channel 5 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH5_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0180 + DMA Channel 6 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH6_READ_ADDR + 0x00000000 + + + read-write + 0x0184 + DMA Channel 6 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH6_WRITE_ADDR + 0x00000000 + + + read-write + 0x0188 + DMA Channel 6 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH6_TRANS_COUNT + 0x00000000 + + + 0x018c + DMA Channel 6 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (6). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH6_CTRL_TRIG + 0x00003000 + + + read-only + 0x0190 + Alias for channel 6 CTRL register + CH6_AL1_CTRL + 0x00000000 + + + read-only + 0x0194 + Alias for channel 6 READ_ADDR register + CH6_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0198 + Alias for channel 6 WRITE_ADDR register + CH6_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x019c + Alias for channel 6 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH6_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x01a0 + Alias for channel 6 CTRL register + CH6_AL2_CTRL + 0x00000000 + + + read-only + 0x01a4 + Alias for channel 6 TRANS_COUNT register + CH6_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x01a8 + Alias for channel 6 READ_ADDR register + CH6_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x01ac + Alias for channel 6 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH6_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x01b0 + Alias for channel 6 CTRL register + CH6_AL3_CTRL + 0x00000000 + + + read-only + 0x01b4 + Alias for channel 6 WRITE_ADDR register + CH6_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x01b8 + Alias for channel 6 TRANS_COUNT register + CH6_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x01bc + Alias for channel 6 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH6_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x01c0 + DMA Channel 7 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH7_READ_ADDR + 0x00000000 + + + read-write + 0x01c4 + DMA Channel 7 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH7_WRITE_ADDR + 0x00000000 + + + read-write + 0x01c8 + DMA Channel 7 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH7_TRANS_COUNT + 0x00000000 + + + 0x01cc + DMA Channel 7 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (7). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH7_CTRL_TRIG + 0x00003800 + + + read-only + 0x01d0 + Alias for channel 7 CTRL register + CH7_AL1_CTRL + 0x00000000 + + + read-only + 0x01d4 + Alias for channel 7 READ_ADDR register + CH7_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x01d8 + Alias for channel 7 WRITE_ADDR register + CH7_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x01dc + Alias for channel 7 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH7_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x01e0 + Alias for channel 7 CTRL register + CH7_AL2_CTRL + 0x00000000 + + + read-only + 0x01e4 + Alias for channel 7 TRANS_COUNT register + CH7_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x01e8 + Alias for channel 7 READ_ADDR register + CH7_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x01ec + Alias for channel 7 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH7_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x01f0 + Alias for channel 7 CTRL register + CH7_AL3_CTRL + 0x00000000 + + + read-only + 0x01f4 + Alias for channel 7 WRITE_ADDR register + CH7_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x01f8 + Alias for channel 7 TRANS_COUNT register + CH7_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x01fc + Alias for channel 7 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH7_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0200 + DMA Channel 8 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH8_READ_ADDR + 0x00000000 + + + read-write + 0x0204 + DMA Channel 8 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH8_WRITE_ADDR + 0x00000000 + + + read-write + 0x0208 + DMA Channel 8 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH8_TRANS_COUNT + 0x00000000 + + + 0x020c + DMA Channel 8 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (8). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH8_CTRL_TRIG + 0x00004000 + + + read-only + 0x0210 + Alias for channel 8 CTRL register + CH8_AL1_CTRL + 0x00000000 + + + read-only + 0x0214 + Alias for channel 8 READ_ADDR register + CH8_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0218 + Alias for channel 8 WRITE_ADDR register + CH8_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x021c + Alias for channel 8 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH8_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x0220 + Alias for channel 8 CTRL register + CH8_AL2_CTRL + 0x00000000 + + + read-only + 0x0224 + Alias for channel 8 TRANS_COUNT register + CH8_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x0228 + Alias for channel 8 READ_ADDR register + CH8_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x022c + Alias for channel 8 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH8_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x0230 + Alias for channel 8 CTRL register + CH8_AL3_CTRL + 0x00000000 + + + read-only + 0x0234 + Alias for channel 8 WRITE_ADDR register + CH8_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x0238 + Alias for channel 8 TRANS_COUNT register + CH8_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x023c + Alias for channel 8 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH8_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0240 + DMA Channel 9 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH9_READ_ADDR + 0x00000000 + + + read-write + 0x0244 + DMA Channel 9 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH9_WRITE_ADDR + 0x00000000 + + + read-write + 0x0248 + DMA Channel 9 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH9_TRANS_COUNT + 0x00000000 + + + 0x024c + DMA Channel 9 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (9). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH9_CTRL_TRIG + 0x00004800 + + + read-only + 0x0250 + Alias for channel 9 CTRL register + CH9_AL1_CTRL + 0x00000000 + + + read-only + 0x0254 + Alias for channel 9 READ_ADDR register + CH9_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0258 + Alias for channel 9 WRITE_ADDR register + CH9_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x025c + Alias for channel 9 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH9_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x0260 + Alias for channel 9 CTRL register + CH9_AL2_CTRL + 0x00000000 + + + read-only + 0x0264 + Alias for channel 9 TRANS_COUNT register + CH9_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x0268 + Alias for channel 9 READ_ADDR register + CH9_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x026c + Alias for channel 9 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH9_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x0270 + Alias for channel 9 CTRL register + CH9_AL3_CTRL + 0x00000000 + + + read-only + 0x0274 + Alias for channel 9 WRITE_ADDR register + CH9_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x0278 + Alias for channel 9 TRANS_COUNT register + CH9_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x027c + Alias for channel 9 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH9_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x0280 + DMA Channel 10 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH10_READ_ADDR + 0x00000000 + + + read-write + 0x0284 + DMA Channel 10 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH10_WRITE_ADDR + 0x00000000 + + + read-write + 0x0288 + DMA Channel 10 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH10_TRANS_COUNT + 0x00000000 + + + 0x028c + DMA Channel 10 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (10). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH10_CTRL_TRIG + 0x00005000 + + + read-only + 0x0290 + Alias for channel 10 CTRL register + CH10_AL1_CTRL + 0x00000000 + + + read-only + 0x0294 + Alias for channel 10 READ_ADDR register + CH10_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x0298 + Alias for channel 10 WRITE_ADDR register + CH10_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x029c + Alias for channel 10 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH10_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x02a0 + Alias for channel 10 CTRL register + CH10_AL2_CTRL + 0x00000000 + + + read-only + 0x02a4 + Alias for channel 10 TRANS_COUNT register + CH10_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x02a8 + Alias for channel 10 READ_ADDR register + CH10_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x02ac + Alias for channel 10 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH10_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x02b0 + Alias for channel 10 CTRL register + CH10_AL3_CTRL + 0x00000000 + + + read-only + 0x02b4 + Alias for channel 10 WRITE_ADDR register + CH10_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x02b8 + Alias for channel 10 TRANS_COUNT register + CH10_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x02bc + Alias for channel 10 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH10_AL3_READ_ADDR_TRIG + 0x00000000 + + + read-write + 0x02c0 + DMA Channel 11 Read Address pointer\n + This register updates automatically each time a read completes. The current value is the next address to be read by this channel. + CH11_READ_ADDR + 0x00000000 + + + read-write + 0x02c4 + DMA Channel 11 Write Address pointer\n + This register updates automatically each time a write completes. The current value is the next address to be written by this channel. + CH11_WRITE_ADDR + 0x00000000 + + + read-write + 0x02c8 + DMA Channel 11 Transfer Count\n + Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).\n\n + When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.\n\n + Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.\n\n + The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD. + CH11_TRANS_COUNT + 0x00000000 + + + 0x02cc + DMA Channel 11 Control and Status + + + read-only + [31:31] + Logical OR of the READ_ERROR and WRITE_ERROR flags. The channel halts when it encounters any bus error, and always raises its channel IRQ flag. + AHB_ERROR + + + read-write + [30:30] + If 1, the channel received a read bus error. Write one to clear.\n + READ_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 3 transfers later) + oneToClear + READ_ERROR + + + read-write + [29:29] + If 1, the channel received a write bus error. Write one to clear.\n + WRITE_ADDR shows the approximate address where the bus error was encountered (will not to be earlier, or more than 5 transfers later) + oneToClear + WRITE_ERROR + + + read-only + [24:24] + This flag goes high when the channel starts a new transfer sequence, and low when the last transfer of that sequence completes. Clearing EN while BUSY is high pauses the channel, and BUSY will stay high while paused.\n\n + To terminate a sequence early (and clear the BUSY flag), see CHAN_ABORT. + BUSY + + + read-write + [23:23] + If 1, this channel's data transfers are visible to the sniff hardware, and each transfer will advance the state of the checksum. This only applies if the sniff hardware is enabled, and has this channel selected.\n\n + This allows checksum to be enabled or disabled on a per-control- block basis. + SNIFF_EN + + + read-write + [22:22] + Apply byte-swap transformation to DMA data.\n + For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order. + BSWAP + + + read-write + [21:21] + In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, an IRQ is raised when NULL is written to a trigger register, indicating the end of a control block chain.\n\n + This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks. + IRQ_QUIET + + + read-write + [20:15] + Select a Transfer Request signal.\n + The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).\n + 0x0 to 0x3a -> select DREQ n as TREQ + + + Select Timer 0 as TREQ + TIMER0 + 59 + + + Select Timer 1 as TREQ + TIMER1 + 60 + + + Select Timer 2 as TREQ (Optional) + TIMER2 + 61 + + + Select Timer 3 as TREQ (Optional) + TIMER3 + 62 + + + Permanent request, for unpaced transfers. + PERMANENT + 63 + + + TREQ_SEL + + + read-write + [14:11] + When this channel completes, it will trigger the channel indicated by CHAIN_TO. Disable by setting CHAIN_TO = _(this channel)_.\n + Reset value is equal to channel number (11). + CHAIN_TO + + + read-write + [10:10] + Select whether RING_SIZE applies to read or write addresses.\n + If 0, read addresses are wrapped on a (1 << RING_SIZE) boundary. If 1, write addresses are wrapped. + RING_SEL + + + read-write + [9:6] + Size of address wrap region. If 0, don't wrap. For values n > 0, only the lower n bits of the address will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned ring buffers.\n\n + Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL. + + + RING_NONE + 0 + + + RING_SIZE + + + read-write + [5:5] + If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.\n\n + Generally this should be disabled for memory-to-peripheral transfers. + INCR_WRITE + + + read-write + [4:4] + If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.\n\n + Generally this should be disabled for peripheral-to-memory transfers. + INCR_READ + + + read-write + [3:2] + Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer. + + + SIZE_BYTE + 0 + + + SIZE_HALFWORD + 1 + + + SIZE_WORD + 2 + + + DATA_SIZE + + + read-write + [1:1] + HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.\n\n + This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput. + HIGH_PRIORITY + + + read-write + [0:0] + DMA Channel Enable.\n + When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high) + EN + + + CH11_CTRL_TRIG + 0x00005800 + + + read-only + 0x02d0 + Alias for channel 11 CTRL register + CH11_AL1_CTRL + 0x00000000 + + + read-only + 0x02d4 + Alias for channel 11 READ_ADDR register + CH11_AL1_READ_ADDR + 0x00000000 + + + read-only + 0x02d8 + Alias for channel 11 WRITE_ADDR register + CH11_AL1_WRITE_ADDR + 0x00000000 + + + read-only + 0x02dc + Alias for channel 11 TRANS_COUNT register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH11_AL1_TRANS_COUNT_TRIG + 0x00000000 + + + read-only + 0x02e0 + Alias for channel 11 CTRL register + CH11_AL2_CTRL + 0x00000000 + + + read-only + 0x02e4 + Alias for channel 11 TRANS_COUNT register + CH11_AL2_TRANS_COUNT + 0x00000000 + + + read-only + 0x02e8 + Alias for channel 11 READ_ADDR register + CH11_AL2_READ_ADDR + 0x00000000 + + + read-only + 0x02ec + Alias for channel 11 WRITE_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH11_AL2_WRITE_ADDR_TRIG + 0x00000000 + + + read-only + 0x02f0 + Alias for channel 11 CTRL register + CH11_AL3_CTRL + 0x00000000 + + + read-only + 0x02f4 + Alias for channel 11 WRITE_ADDR register + CH11_AL3_WRITE_ADDR + 0x00000000 + + + read-only + 0x02f8 + Alias for channel 11 TRANS_COUNT register + CH11_AL3_TRANS_COUNT + 0x00000000 + + + read-only + 0x02fc + Alias for channel 11 READ_ADDR register\n + This is a trigger register (0xc). Writing a nonzero value will\n + reload the channel counter and start the channel. + CH11_AL3_READ_ADDR_TRIG + 0x00000000 + + + 0x0400 + Interrupt Status (raw) + + + read-only + [15:0] + Raw interrupt status for DMA Channels 0..15. Bit n corresponds to channel n. Ignores any masking or forcing. Channel interrupts can be cleared by writing a bit mask to INTR, INTS0 or INTS1.\n\n + Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1.\n\n + This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores.\n\n + It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0. + INTR + + + INTR + 0x00000000 + + + 0x0404 + Interrupt Enables for IRQ 0 + + + read-write + [15:0] + Set bit n to pass interrupts from channel n to DMA IRQ 0. + INTE0 + + + INTE0 + 0x00000000 + + + 0x0408 + Force Interrupts + + + read-write + [15:0] + Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared. + INTF0 + + + INTF0 + 0x00000000 + + + 0x040c + Interrupt Status for IRQ 0 + + + read-write + [15:0] + Indicates active channel interrupt requests which are currently causing IRQ 0 to be asserted.\n + Channel interrupts can be cleared by writing a bit mask here. + oneToClear + INTS0 + + + INTS0 + 0x00000000 + + + 0x0414 + Interrupt Enables for IRQ 1 + + + read-write + [15:0] + Set bit n to pass interrupts from channel n to DMA IRQ 1. + INTE1 + + + INTE1 + 0x00000000 + + + 0x0418 + Force Interrupts for IRQ 1 + + + read-write + [15:0] + Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared. + INTF1 + + + INTF1 + 0x00000000 + + + 0x041c + Interrupt Status (masked) for IRQ 1 + + + read-write + [15:0] + Indicates active channel interrupt requests which are currently causing IRQ 1 to be asserted.\n + Channel interrupts can be cleared by writing a bit mask here. + oneToClear + INTS1 + + + INTS1 + 0x00000000 + + + 0x0420 + Pacing (X/Y) Fractional Timer\n + The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less. + + + read-write + [31:16] + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + X + + + read-write + [15:0] + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + Y + + + TIMER0 + 0x00000000 + + + 0x0424 + Pacing (X/Y) Fractional Timer\n + The pacing timer produces TREQ assertions at a rate set by ((X/Y) * sys_clk). This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less. + + + read-write + [31:16] + Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer. + X + + + read-write + [15:0] + Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer. + Y + + + TIMER1 + 0x00000000 + + + 0x0430 + Trigger one or more channels simultaneously + + + read-write + [15:0] + Each bit in this register corresponds to a DMA channel. Writing a 1 to the relevant bit is the same as writing to that channel's trigger register; the channel will start if it is currently enabled and not already busy. + clear + MULTI_CHAN_TRIGGER + + + MULTI_CHAN_TRIGGER + 0x00000000 + + + 0x0434 + Sniffer Control + + + read-write + [11:11] + If set, the result appears inverted (bitwise complement) when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus. + OUT_INV + + + read-write + [10:10] + If set, the result appears bit-reversed when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus. + OUT_REV + + + read-write + [9:9] + Locally perform a byte reverse on the sniffed data, before feeding into checksum.\n\n + Note that the sniff hardware is downstream of the DMA channel byteswap performed in the read master: if channel CTRL_BSWAP and SNIFF_CTRL_BSWAP are both enabled, their effects cancel from the sniffer's point of view. + BSWAP + + + read-write + [8:5] + + + Calculate a CRC-32 (IEEE802.3 polynomial) + CRC32 + 0 + + + Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data + CRC32R + 1 + + + Calculate a CRC-16-CCITT + CRC16 + 2 + + + Calculate a CRC-16-CCITT with bit reversed data + CRC16R + 3 + + + XOR reduction over all data. == 1 if the total 1 population count is odd. + EVEN + 14 + + + Calculate a simple 32-bit checksum (addition with a 32 bit accumulator) + SUM + 15 + + + CALC + + + read-write + [4:1] + DMA channel for Sniffer to observe + DMACH + + + read-write + [0:0] + Enable sniffer + EN + + + SNIFF_CTRL + 0x00000000 + + + read-write + 0x0438 + Data accumulator for sniff hardware\n + Write an initial seed value here before starting a DMA transfer on the channel indicated by SNIFF_CTRL_DMACH. The hardware will update this register each time it observes a read from the indicated channel. Once the channel completes, the final result can be read from this register. + SNIFF_DATA + 0x00000000 + + + 0x0440 + Debug RAF, WAF, TDF levels + + + read-only + [23:16] + Current Read-Address-FIFO fill level + RAF_LVL + + + read-only + [15:8] + Current Write-Address-FIFO fill level + WAF_LVL + + + read-only + [7:0] + Current Transfer-Data-FIFO fill level + TDF_LVL + + + FIFO_LEVELS + 0x00000000 + + + 0x0444 + Abort an in-progress transfer sequence on one or more channels + + + read-write + [15:0] + Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs.\n\n + After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel. + clear + CHAN_ABORT + + + CHAN_ABORT + 0x00000000 + + + 0x0448 + The number of channels this DMA instance is equipped with. This DMA supports up to 16 hardware channels, but can be configured with as few as one, to minimise silicon area. + + + read-only + [4:0] + N_CHANNELS + + + N_CHANNELS + 0x00000000 + + + 0x0800 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH0_DBG_CTDREQ + + + CH0_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0804 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH0_DBG_TCR + 0x00000000 + + + 0x0840 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH1_DBG_CTDREQ + + + CH1_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0844 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH1_DBG_TCR + 0x00000000 + + + 0x0880 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH2_DBG_CTDREQ + + + CH2_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0884 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH2_DBG_TCR + 0x00000000 + + + 0x08c0 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH3_DBG_CTDREQ + + + CH3_DBG_CTDREQ + 0x00000000 + + + read-only + 0x08c4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH3_DBG_TCR + 0x00000000 + + + 0x0900 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH4_DBG_CTDREQ + + + CH4_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0904 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH4_DBG_TCR + 0x00000000 + + + 0x0940 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH5_DBG_CTDREQ + + + CH5_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0944 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH5_DBG_TCR + 0x00000000 + + + 0x0980 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH6_DBG_CTDREQ + + + CH6_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0984 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH6_DBG_TCR + 0x00000000 + + + 0x09c0 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH7_DBG_CTDREQ + + + CH7_DBG_CTDREQ + 0x00000000 + + + read-only + 0x09c4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH7_DBG_TCR + 0x00000000 + + + 0x0a00 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH8_DBG_CTDREQ + + + CH8_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0a04 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH8_DBG_TCR + 0x00000000 + + + 0x0a40 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH9_DBG_CTDREQ + + + CH9_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0a44 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH9_DBG_TCR + 0x00000000 + + + 0x0a80 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH10_DBG_CTDREQ + + + CH10_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0a84 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH10_DBG_TCR + 0x00000000 + + + 0x0ac0 + Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake. + + + read-only + [5:0] + CH11_DBG_CTDREQ + + + CH11_DBG_CTDREQ + 0x00000000 + + + read-only + 0x0ac4 + Read to get channel TRANS_COUNT reload value, i.e. the length of the next transfer + CH11_DBG_TCR + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x50110000 + USB FS/LS controller device registers + + USBCTRL_IRQ + 5 + + USBCTRL_REGS + + + 0x0000 + Device address and endpoint control + + + read-write + [19:16] + Device endpoint to send data to. Only valid for HOST mode. + ENDPOINT + + + read-write + [6:0] + In device mode, the address that the device should respond to. Set in response to a SET_ADDR setup packet from the host. In host mode set to the address of the device to communicate with. + ADDRESS + + + ADDR_ENDP + 0x00000000 + + + 0x0004 + Interrupt endpoint 1. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP1 + 0x00000000 + + + 0x0008 + Interrupt endpoint 2. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP2 + 0x00000000 + + + 0x000c + Interrupt endpoint 3. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP3 + 0x00000000 + + + 0x0010 + Interrupt endpoint 4. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP4 + 0x00000000 + + + 0x0014 + Interrupt endpoint 5. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP5 + 0x00000000 + + + 0x0018 + Interrupt endpoint 6. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP6 + 0x00000000 + + + 0x001c + Interrupt endpoint 7. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP7 + 0x00000000 + + + 0x0020 + Interrupt endpoint 8. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP8 + 0x00000000 + + + 0x0024 + Interrupt endpoint 9. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP9 + 0x00000000 + + + 0x0028 + Interrupt endpoint 10. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP10 + 0x00000000 + + + 0x002c + Interrupt endpoint 11. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP11 + 0x00000000 + + + 0x0030 + Interrupt endpoint 12. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP12 + 0x00000000 + + + 0x0034 + Interrupt endpoint 13. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP13 + 0x00000000 + + + 0x0038 + Interrupt endpoint 14. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP14 + 0x00000000 + + + 0x003c + Interrupt endpoint 15. Only valid for HOST mode. + + + read-write + [26:26] + Interrupt EP requires preamble (is a low speed device on a full speed hub) + INTEP_PREAMBLE + + + read-write + [25:25] + Direction of the interrupt endpoint. In=0, Out=1 + INTEP_DIR + + + read-write + [19:16] + Endpoint number of the interrupt endpoint + ENDPOINT + + + read-write + [6:0] + Device address + ADDRESS + + + ADDR_ENDP15 + 0x00000000 + + + 0x0040 + Main control register + + + read-write + [31:31] + Reduced timings for simulation + SIM_TIMING + + + read-write + [1:1] + Device mode = 0, Host mode = 1 + HOST_NDEVICE + + + read-write + [0:0] + Enable controller + CONTROLLER_EN + + + MAIN_CTRL + 0x00000000 + + + 0x0044 + Set the SOF (Start of Frame) frame number in the host controller. The SOF packet is sent every 1ms and the host will increment the frame number by 1 each time. + + + write-only + [10:0] + COUNT + + + SOF_WR + 0x00000000 + + + 0x0048 + Read the last SOF (Start of Frame) frame number seen. In device mode the last SOF received from the host. In host mode the last SOF sent by the host. + + + read-only + [10:0] + COUNT + + + SOF_RD + 0x00000000 + + + 0x004c + SIE control register + + + read-write + [31:31] + Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a STALL + EP0_INT_STALL + + + read-write + [30:30] + Device: EP0 single buffered = 0, double buffered = 1 + EP0_DOUBLE_BUF + + + read-write + [29:29] + Device: Set bit in BUFF_STATUS for every buffer completed on EP0 + EP0_INT_1BUF + + + read-write + [28:28] + Device: Set bit in BUFF_STATUS for every 2 buffers completed on EP0 + EP0_INT_2BUF + + + read-write + [27:27] + Device: Set bit in EP_STATUS_STALL_NAK when EP0 sends a NAK + EP0_INT_NAK + + + read-write + [26:26] + Direct bus drive enable + DIRECT_EN + + + read-write + [25:25] + Direct control of DP + DIRECT_DP + + + read-write + [24:24] + Direct control of DM + DIRECT_DM + + + read-write + [18:18] + Power down bus transceiver + TRANSCEIVER_PD + + + read-write + [17:17] + Device: Pull-up strength (0=1K2, 1=2k3) + RPU_OPT + + + read-write + [16:16] + Device: Enable pull up resistor + PULLUP_EN + + + read-write + [15:15] + Host: Enable pull down resistors + PULLDOWN_EN + + + read-write + [13:13] + Host: Reset bus + clear + RESET_BUS + + + read-write + [12:12] + Device: Remote wakeup. Device can initiate its own resume after suspend. + clear + RESUME + + + read-write + [11:11] + Host: Enable VBUS + VBUS_EN + + + read-write + [10:10] + Host: Enable keep alive packet (for low speed bus) + KEEP_ALIVE_EN + + + read-write + [9:9] + Host: Enable SOF generation (for full speed bus) + SOF_EN + + + read-write + [8:8] + Host: Delay packet(s) until after SOF + SOF_SYNC + + + read-write + [6:6] + Host: Preable enable for LS device on FS hub + PREAMBLE_EN + + + read-write + [4:4] + Host: Stop transaction + clear + STOP_TRANS + + + read-write + [3:3] + Host: Receive transaction (IN to host) + RECEIVE_DATA + + + read-write + [2:2] + Host: Send transaction (OUT from host) + SEND_DATA + + + read-write + [1:1] + Host: Send Setup packet + SEND_SETUP + + + read-write + [0:0] + Host: Start transaction + clear + START_TRANS + + + SIE_CTRL + 0x00000000 + + + 0x0050 + SIE status register + + + read-write + [31:31] + Data Sequence Error.\n\n + The device can raise a sequence error in the following conditions:\n\n + * A SETUP packet is received followed by a DATA1 packet (data phase should always be DATA0) * An OUT packet is received from the host but doesn't match the data pid in the buffer control register read from DPSRAM\n\n + The host can raise a data sequence error in the following conditions:\n\n + * An IN packet from the device has the wrong data PID + oneToClear + DATA_SEQ_ERROR + + + read-write + [30:30] + ACK received. Raised by both host and device. + oneToClear + ACK_REC + + + read-write + [29:29] + Host: STALL received + oneToClear + STALL_REC + + + read-write + [28:28] + Host: NAK received + oneToClear + NAK_REC + + + read-write + [27:27] + RX timeout is raised by both the host and device if an ACK is not received in the maximum time specified by the USB spec. + oneToClear + RX_TIMEOUT + + + read-write + [26:26] + RX overflow is raised by the Serial RX engine if the incoming data is too fast. + oneToClear + RX_OVERFLOW + + + read-write + [25:25] + Bit Stuff Error. Raised by the Serial RX engine. + oneToClear + BIT_STUFF_ERROR + + + read-write + [24:24] + CRC Error. Raised by the Serial RX engine. + oneToClear + CRC_ERROR + + + read-write + [19:19] + Device: bus reset received + oneToClear + BUS_RESET + + + read-write + [18:18] + Transaction complete.\n\n + Raised by device if:\n\n + * An IN or OUT packet is sent with the `LAST_BUFF` bit set in the buffer control register\n\n + Raised by host if:\n\n + * A setup packet is sent when no data in or data out transaction follows * An IN packet is received and the `LAST_BUFF` bit is set in the buffer control register * An IN packet is received with zero length * An OUT packet is sent and the `LAST_BUFF` bit is set + oneToClear + TRANS_COMPLETE + + + read-write + [17:17] + Device: Setup packet received + oneToClear + SETUP_REC + + + read-only + [16:16] + Device: connected + CONNECTED + + + read-write + [11:11] + Host: Device has initiated a remote resume. Device: host has initiated a resume. + oneToClear + RESUME + + + read-only + [10:10] + VBUS over current detected + VBUS_OVER_CURR + + + read-only + [9:8] + Host: device speed. Disconnected = 00, LS = 01, FS = 10 + SPEED + + + read-only + [4:4] + Bus in suspended state. Valid for device and host. Host and device will go into suspend if neither Keep Alive / SOF frames are enabled. + SUSPENDED + + + read-only + [3:2] + USB bus line state + LINE_STATE + + + read-only + [0:0] + Device: VBUS Detected + VBUS_DETECTED + + + SIE_STATUS + 0x00000000 + + + 0x0054 + interrupt endpoint control register + + + read-write + [15:1] + Host: Enable interrupt endpoint 1 -> 15 + INT_EP_ACTIVE + + + INT_EP_CTRL + 0x00000000 + + + 0x0058 + Buffer status register. A bit set here indicates that a buffer has completed on the endpoint (if the buffer interrupt is enabled). It is possible for 2 buffers to be completed, so clearing the buffer status bit may instantly re set it on the next clock cycle. + + + read-only + [31:31] + EP15_OUT + + + read-only + [30:30] + EP15_IN + + + read-only + [29:29] + EP14_OUT + + + read-only + [28:28] + EP14_IN + + + read-only + [27:27] + EP13_OUT + + + read-only + [26:26] + EP13_IN + + + read-only + [25:25] + EP12_OUT + + + read-only + [24:24] + EP12_IN + + + read-only + [23:23] + EP11_OUT + + + read-only + [22:22] + EP11_IN + + + read-only + [21:21] + EP10_OUT + + + read-only + [20:20] + EP10_IN + + + read-only + [19:19] + EP9_OUT + + + read-only + [18:18] + EP9_IN + + + read-only + [17:17] + EP8_OUT + + + read-only + [16:16] + EP8_IN + + + read-only + [15:15] + EP7_OUT + + + read-only + [14:14] + EP7_IN + + + read-only + [13:13] + EP6_OUT + + + read-only + [12:12] + EP6_IN + + + read-only + [11:11] + EP5_OUT + + + read-only + [10:10] + EP5_IN + + + read-only + [9:9] + EP4_OUT + + + read-only + [8:8] + EP4_IN + + + read-only + [7:7] + EP3_OUT + + + read-only + [6:6] + EP3_IN + + + read-only + [5:5] + EP2_OUT + + + read-only + [4:4] + EP2_IN + + + read-only + [3:3] + EP1_OUT + + + read-only + [2:2] + EP1_IN + + + read-only + [1:1] + EP0_OUT + + + read-only + [0:0] + EP0_IN + + + BUFF_STATUS + 0x00000000 + + + 0x005c + Which of the double buffers should be handled. Only valid if using an interrupt per buffer (i.e. not per 2 buffers). Not valid for host interrupt endpoint polling because they are only single buffered. + + + read-only + [31:31] + EP15_OUT + + + read-only + [30:30] + EP15_IN + + + read-only + [29:29] + EP14_OUT + + + read-only + [28:28] + EP14_IN + + + read-only + [27:27] + EP13_OUT + + + read-only + [26:26] + EP13_IN + + + read-only + [25:25] + EP12_OUT + + + read-only + [24:24] + EP12_IN + + + read-only + [23:23] + EP11_OUT + + + read-only + [22:22] + EP11_IN + + + read-only + [21:21] + EP10_OUT + + + read-only + [20:20] + EP10_IN + + + read-only + [19:19] + EP9_OUT + + + read-only + [18:18] + EP9_IN + + + read-only + [17:17] + EP8_OUT + + + read-only + [16:16] + EP8_IN + + + read-only + [15:15] + EP7_OUT + + + read-only + [14:14] + EP7_IN + + + read-only + [13:13] + EP6_OUT + + + read-only + [12:12] + EP6_IN + + + read-only + [11:11] + EP5_OUT + + + read-only + [10:10] + EP5_IN + + + read-only + [9:9] + EP4_OUT + + + read-only + [8:8] + EP4_IN + + + read-only + [7:7] + EP3_OUT + + + read-only + [6:6] + EP3_IN + + + read-only + [5:5] + EP2_OUT + + + read-only + [4:4] + EP2_IN + + + read-only + [3:3] + EP1_OUT + + + read-only + [2:2] + EP1_IN + + + read-only + [1:1] + EP0_OUT + + + read-only + [0:0] + EP0_IN + + + BUFF_CPU_SHOULD_HANDLE + 0x00000000 + + + 0x0060 + Device only: Can be set to ignore the buffer control register for this endpoint in case you would like to revoke a buffer. A NAK will be sent for every access to the endpoint until this bit is cleared. A corresponding bit in `EP_ABORT_DONE` is set when it is safe to modify the buffer control register. + + + read-write + [31:31] + EP15_OUT + + + read-write + [30:30] + EP15_IN + + + read-write + [29:29] + EP14_OUT + + + read-write + [28:28] + EP14_IN + + + read-write + [27:27] + EP13_OUT + + + read-write + [26:26] + EP13_IN + + + read-write + [25:25] + EP12_OUT + + + read-write + [24:24] + EP12_IN + + + read-write + [23:23] + EP11_OUT + + + read-write + [22:22] + EP11_IN + + + read-write + [21:21] + EP10_OUT + + + read-write + [20:20] + EP10_IN + + + read-write + [19:19] + EP9_OUT + + + read-write + [18:18] + EP9_IN + + + read-write + [17:17] + EP8_OUT + + + read-write + [16:16] + EP8_IN + + + read-write + [15:15] + EP7_OUT + + + read-write + [14:14] + EP7_IN + + + read-write + [13:13] + EP6_OUT + + + read-write + [12:12] + EP6_IN + + + read-write + [11:11] + EP5_OUT + + + read-write + [10:10] + EP5_IN + + + read-write + [9:9] + EP4_OUT + + + read-write + [8:8] + EP4_IN + + + read-write + [7:7] + EP3_OUT + + + read-write + [6:6] + EP3_IN + + + read-write + [5:5] + EP2_OUT + + + read-write + [4:4] + EP2_IN + + + read-write + [3:3] + EP1_OUT + + + read-write + [2:2] + EP1_IN + + + read-write + [1:1] + EP0_OUT + + + read-write + [0:0] + EP0_IN + + + EP_ABORT + 0x00000000 + + + 0x0064 + Device only: Used in conjunction with `EP_ABORT`. Set once an endpoint is idle so the programmer knows it is safe to modify the buffer control register. + + + read-write + [31:31] + oneToClear + EP15_OUT + + + read-write + [30:30] + oneToClear + EP15_IN + + + read-write + [29:29] + oneToClear + EP14_OUT + + + read-write + [28:28] + oneToClear + EP14_IN + + + read-write + [27:27] + oneToClear + EP13_OUT + + + read-write + [26:26] + oneToClear + EP13_IN + + + read-write + [25:25] + oneToClear + EP12_OUT + + + read-write + [24:24] + oneToClear + EP12_IN + + + read-write + [23:23] + oneToClear + EP11_OUT + + + read-write + [22:22] + oneToClear + EP11_IN + + + read-write + [21:21] + oneToClear + EP10_OUT + + + read-write + [20:20] + oneToClear + EP10_IN + + + read-write + [19:19] + oneToClear + EP9_OUT + + + read-write + [18:18] + oneToClear + EP9_IN + + + read-write + [17:17] + oneToClear + EP8_OUT + + + read-write + [16:16] + oneToClear + EP8_IN + + + read-write + [15:15] + oneToClear + EP7_OUT + + + read-write + [14:14] + oneToClear + EP7_IN + + + read-write + [13:13] + oneToClear + EP6_OUT + + + read-write + [12:12] + oneToClear + EP6_IN + + + read-write + [11:11] + oneToClear + EP5_OUT + + + read-write + [10:10] + oneToClear + EP5_IN + + + read-write + [9:9] + oneToClear + EP4_OUT + + + read-write + [8:8] + oneToClear + EP4_IN + + + read-write + [7:7] + oneToClear + EP3_OUT + + + read-write + [6:6] + oneToClear + EP3_IN + + + read-write + [5:5] + oneToClear + EP2_OUT + + + read-write + [4:4] + oneToClear + EP2_IN + + + read-write + [3:3] + oneToClear + EP1_OUT + + + read-write + [2:2] + oneToClear + EP1_IN + + + read-write + [1:1] + oneToClear + EP0_OUT + + + read-write + [0:0] + oneToClear + EP0_IN + + + EP_ABORT_DONE + 0x00000000 + + + 0x0068 + Device: this bit must be set in conjunction with the `STALL` bit in the buffer control register to send a STALL on EP0. The device controller clears these bits when a SETUP packet is received because the USB spec requires that a STALL condition is cleared when a SETUP packet is received. + + + read-write + [1:1] + EP0_OUT + + + read-write + [0:0] + EP0_IN + + + EP_STALL_ARM + 0x00000000 + + + 0x006c + Used by the host controller. Sets the wait time in microseconds before trying again if the device replies with a NAK. + + + read-write + [25:16] + NAK polling interval for a full speed device + DELAY_FS + + + read-write + [9:0] + NAK polling interval for a low speed device + DELAY_LS + + + NAK_POLL + 0x00100010 + + + 0x0070 + Device: bits are set when the `IRQ_ON_NAK` or `IRQ_ON_STALL` bits are set. For EP0 this comes from `SIE_CTRL`. For all other endpoints it comes from the endpoint control register. + + + read-write + [31:31] + oneToClear + EP15_OUT + + + read-write + [30:30] + oneToClear + EP15_IN + + + read-write + [29:29] + oneToClear + EP14_OUT + + + read-write + [28:28] + oneToClear + EP14_IN + + + read-write + [27:27] + oneToClear + EP13_OUT + + + read-write + [26:26] + oneToClear + EP13_IN + + + read-write + [25:25] + oneToClear + EP12_OUT + + + read-write + [24:24] + oneToClear + EP12_IN + + + read-write + [23:23] + oneToClear + EP11_OUT + + + read-write + [22:22] + oneToClear + EP11_IN + + + read-write + [21:21] + oneToClear + EP10_OUT + + + read-write + [20:20] + oneToClear + EP10_IN + + + read-write + [19:19] + oneToClear + EP9_OUT + + + read-write + [18:18] + oneToClear + EP9_IN + + + read-write + [17:17] + oneToClear + EP8_OUT + + + read-write + [16:16] + oneToClear + EP8_IN + + + read-write + [15:15] + oneToClear + EP7_OUT + + + read-write + [14:14] + oneToClear + EP7_IN + + + read-write + [13:13] + oneToClear + EP6_OUT + + + read-write + [12:12] + oneToClear + EP6_IN + + + read-write + [11:11] + oneToClear + EP5_OUT + + + read-write + [10:10] + oneToClear + EP5_IN + + + read-write + [9:9] + oneToClear + EP4_OUT + + + read-write + [8:8] + oneToClear + EP4_IN + + + read-write + [7:7] + oneToClear + EP3_OUT + + + read-write + [6:6] + oneToClear + EP3_IN + + + read-write + [5:5] + oneToClear + EP2_OUT + + + read-write + [4:4] + oneToClear + EP2_IN + + + read-write + [3:3] + oneToClear + EP1_OUT + + + read-write + [2:2] + oneToClear + EP1_IN + + + read-write + [1:1] + oneToClear + EP0_OUT + + + read-write + [0:0] + oneToClear + EP0_IN + + + EP_STATUS_STALL_NAK + 0x00000000 + + + 0x0074 + Where to connect the USB controller. Should be to_phy by default. + + + read-write + [3:3] + SOFTCON + + + read-write + [2:2] + TO_DIGITAL_PAD + + + read-write + [1:1] + TO_EXTPHY + + + read-write + [0:0] + TO_PHY + + + USB_MUXING + 0x00000000 + + + 0x0078 + Overrides for the power signals in the event that the VBUS signals are not hooked up to GPIO. Set the value of the override and then the override enable to switch over to the override value. + + + read-write + [5:5] + OVERCURR_DETECT_EN + + + read-write + [4:4] + OVERCURR_DETECT + + + read-write + [3:3] + VBUS_DETECT_OVERRIDE_EN + + + read-write + [2:2] + VBUS_DETECT + + + read-write + [1:1] + VBUS_EN_OVERRIDE_EN + + + read-write + [0:0] + VBUS_EN + + + USB_PWR + 0x00000000 + + + 0x007c + This register allows for direct control of the USB phy. Use in conjunction with usbphy_direct_override register to enable each override bit. + + + read-only + [22:22] + DM over voltage + DM_OVV + + + read-only + [21:21] + DP over voltage + DP_OVV + + + read-only + [20:20] + DM overcurrent + DM_OVCN + + + read-only + [19:19] + DP overcurrent + DP_OVCN + + + read-only + [18:18] + DPM pin state + RX_DM + + + read-only + [17:17] + DPP pin state + RX_DP + + + read-only + [16:16] + Differential RX + RX_DD + + + read-write + [15:15] + TX_DIFFMODE=0: Single ended mode\n + TX_DIFFMODE=1: Differential drive mode (TX_DM, TX_DM_OE ignored) + TX_DIFFMODE + + + read-write + [14:14] + TX_FSSLEW=0: Low speed slew rate\n + TX_FSSLEW=1: Full speed slew rate + TX_FSSLEW + + + read-write + [13:13] + TX power down override (if override enable is set). 1 = powered down. + TX_PD + + + read-write + [12:12] + RX power down override (if override enable is set). 1 = powered down. + RX_PD + + + read-write + [11:11] + Output data. TX_DIFFMODE=1, Ignored\n + TX_DIFFMODE=0, Drives DPM only. TX_DM_OE=1 to enable drive. DPM=TX_DM + TX_DM + + + read-write + [10:10] + Output data. If TX_DIFFMODE=1, Drives DPP/DPM diff pair. TX_DP_OE=1 to enable drive. DPP=TX_DP, DPM=~TX_DP\n + If TX_DIFFMODE=0, Drives DPP only. TX_DP_OE=1 to enable drive. DPP=TX_DP + TX_DP + + + read-write + [9:9] + Output enable. If TX_DIFFMODE=1, Ignored.\n + If TX_DIFFMODE=0, OE for DPM only. 0 - DPM in Hi-Z state; 1 - DPM driving + TX_DM_OE + + + read-write + [8:8] + Output enable. If TX_DIFFMODE=1, OE for DPP/DPM diff pair. 0 - DPP/DPM in Hi-Z state; 1 - DPP/DPM driving\n + If TX_DIFFMODE=0, OE for DPP only. 0 - DPP in Hi-Z state; 1 - DPP driving + TX_DP_OE + + + read-write + [6:6] + DM pull down enable + DM_PULLDN_EN + + + read-write + [5:5] + DM pull up enable + DM_PULLUP_EN + + + read-write + [4:4] + Enable the second DM pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 + DM_PULLUP_HISEL + + + read-write + [2:2] + DP pull down enable + DP_PULLDN_EN + + + read-write + [1:1] + DP pull up enable + DP_PULLUP_EN + + + read-write + [0:0] + Enable the second DP pull up resistor. 0 - Pull = Rpu2; 1 - Pull = Rpu1 + Rpu2 + DP_PULLUP_HISEL + + + USBPHY_DIRECT + 0x00000000 + + + 0x0080 + Override enable for each control in usbphy_direct + + + read-write + [15:15] + TX_DIFFMODE_OVERRIDE_EN + + + read-write + [12:12] + DM_PULLUP_OVERRIDE_EN + + + read-write + [11:11] + TX_FSSLEW_OVERRIDE_EN + + + read-write + [10:10] + TX_PD_OVERRIDE_EN + + + read-write + [9:9] + RX_PD_OVERRIDE_EN + + + read-write + [8:8] + TX_DM_OVERRIDE_EN + + + read-write + [7:7] + TX_DP_OVERRIDE_EN + + + read-write + [6:6] + TX_DM_OE_OVERRIDE_EN + + + read-write + [5:5] + TX_DP_OE_OVERRIDE_EN + + + read-write + [4:4] + DM_PULLDN_EN_OVERRIDE_EN + + + read-write + [3:3] + DP_PULLDN_EN_OVERRIDE_EN + + + read-write + [2:2] + DP_PULLUP_EN_OVERRIDE_EN + + + read-write + [1:1] + DM_PULLUP_HISEL_OVERRIDE_EN + + + read-write + [0:0] + DP_PULLUP_HISEL_OVERRIDE_EN + + + USBPHY_DIRECT_OVERRIDE + 0x00000000 + + + 0x0084 + Used to adjust trim values of USB phy pull down resistors. + + + read-write + [12:8] + Value to drive to USB PHY\n + DM pulldown resistor trim control\n + Experimental data suggests that the reset value will work, but this register allows adjustment if required + DM_PULLDN_TRIM + + + read-write + [4:0] + Value to drive to USB PHY\n + DP pulldown resistor trim control\n + Experimental data suggests that the reset value will work, but this register allows adjustment if required + DP_PULLDN_TRIM + + + USBPHY_TRIM + 0x00001f1f + + + 0x008c + Raw Interrupts + + + read-only + [19:19] + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + EP_STALL_NAK + + + read-only + [18:18] + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + ABORT_DONE + + + read-only + [17:17] + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + DEV_SOF + + + read-only + [16:16] + Device. Source: SIE_STATUS.SETUP_REC + SETUP_REQ + + + read-only + [15:15] + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + DEV_RESUME_FROM_HOST + + + read-only + [14:14] + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + DEV_SUSPEND + + + read-only + [13:13] + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + DEV_CONN_DIS + + + read-only + [12:12] + Source: SIE_STATUS.BUS_RESET + BUS_RESET + + + read-only + [11:11] + Source: SIE_STATUS.VBUS_DETECT + VBUS_DETECT + + + read-only + [10:10] + Source: SIE_STATUS.STALL_REC + STALL + + + read-only + [9:9] + Source: SIE_STATUS.CRC_ERROR + ERROR_CRC + + + read-only + [8:8] + Source: SIE_STATUS.BIT_STUFF_ERROR + ERROR_BIT_STUFF + + + read-only + [7:7] + Source: SIE_STATUS.RX_OVERFLOW + ERROR_RX_OVERFLOW + + + read-only + [6:6] + Source: SIE_STATUS.RX_TIMEOUT + ERROR_RX_TIMEOUT + + + read-only + [5:5] + Source: SIE_STATUS.DATA_SEQ_ERROR + ERROR_DATA_SEQ + + + read-only + [4:4] + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + BUFF_STATUS + + + read-only + [3:3] + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + TRANS_COMPLETE + + + read-only + [2:2] + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + HOST_SOF + + + read-only + [1:1] + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + HOST_RESUME + + + read-only + [0:0] + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + HOST_CONN_DIS + + + INTR + 0x00000000 + + + 0x0090 + Interrupt Enable + + + read-write + [19:19] + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + EP_STALL_NAK + + + read-write + [18:18] + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + ABORT_DONE + + + read-write + [17:17] + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + DEV_SOF + + + read-write + [16:16] + Device. Source: SIE_STATUS.SETUP_REC + SETUP_REQ + + + read-write + [15:15] + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + DEV_RESUME_FROM_HOST + + + read-write + [14:14] + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + DEV_SUSPEND + + + read-write + [13:13] + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + DEV_CONN_DIS + + + read-write + [12:12] + Source: SIE_STATUS.BUS_RESET + BUS_RESET + + + read-write + [11:11] + Source: SIE_STATUS.VBUS_DETECT + VBUS_DETECT + + + read-write + [10:10] + Source: SIE_STATUS.STALL_REC + STALL + + + read-write + [9:9] + Source: SIE_STATUS.CRC_ERROR + ERROR_CRC + + + read-write + [8:8] + Source: SIE_STATUS.BIT_STUFF_ERROR + ERROR_BIT_STUFF + + + read-write + [7:7] + Source: SIE_STATUS.RX_OVERFLOW + ERROR_RX_OVERFLOW + + + read-write + [6:6] + Source: SIE_STATUS.RX_TIMEOUT + ERROR_RX_TIMEOUT + + + read-write + [5:5] + Source: SIE_STATUS.DATA_SEQ_ERROR + ERROR_DATA_SEQ + + + read-write + [4:4] + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + BUFF_STATUS + + + read-write + [3:3] + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + TRANS_COMPLETE + + + read-write + [2:2] + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + HOST_SOF + + + read-write + [1:1] + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + HOST_RESUME + + + read-write + [0:0] + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + HOST_CONN_DIS + + + INTE + 0x00000000 + + + 0x0094 + Interrupt Force + + + read-write + [19:19] + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + EP_STALL_NAK + + + read-write + [18:18] + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + ABORT_DONE + + + read-write + [17:17] + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + DEV_SOF + + + read-write + [16:16] + Device. Source: SIE_STATUS.SETUP_REC + SETUP_REQ + + + read-write + [15:15] + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + DEV_RESUME_FROM_HOST + + + read-write + [14:14] + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + DEV_SUSPEND + + + read-write + [13:13] + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + DEV_CONN_DIS + + + read-write + [12:12] + Source: SIE_STATUS.BUS_RESET + BUS_RESET + + + read-write + [11:11] + Source: SIE_STATUS.VBUS_DETECT + VBUS_DETECT + + + read-write + [10:10] + Source: SIE_STATUS.STALL_REC + STALL + + + read-write + [9:9] + Source: SIE_STATUS.CRC_ERROR + ERROR_CRC + + + read-write + [8:8] + Source: SIE_STATUS.BIT_STUFF_ERROR + ERROR_BIT_STUFF + + + read-write + [7:7] + Source: SIE_STATUS.RX_OVERFLOW + ERROR_RX_OVERFLOW + + + read-write + [6:6] + Source: SIE_STATUS.RX_TIMEOUT + ERROR_RX_TIMEOUT + + + read-write + [5:5] + Source: SIE_STATUS.DATA_SEQ_ERROR + ERROR_DATA_SEQ + + + read-write + [4:4] + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + BUFF_STATUS + + + read-write + [3:3] + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + TRANS_COMPLETE + + + read-write + [2:2] + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + HOST_SOF + + + read-write + [1:1] + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + HOST_RESUME + + + read-write + [0:0] + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + HOST_CONN_DIS + + + INTF + 0x00000000 + + + 0x0098 + Interrupt status after masking & forcing + + + read-only + [19:19] + Raised when any bit in EP_STATUS_STALL_NAK is set. Clear by clearing all bits in EP_STATUS_STALL_NAK. + EP_STALL_NAK + + + read-only + [18:18] + Raised when any bit in ABORT_DONE is set. Clear by clearing all bits in ABORT_DONE. + ABORT_DONE + + + read-only + [17:17] + Set every time the device receives a SOF (Start of Frame) packet. Cleared by reading SOF_RD + DEV_SOF + + + read-only + [16:16] + Device. Source: SIE_STATUS.SETUP_REC + SETUP_REQ + + + read-only + [15:15] + Set when the device receives a resume from the host. Cleared by writing to SIE_STATUS.RESUME + DEV_RESUME_FROM_HOST + + + read-only + [14:14] + Set when the device suspend state changes. Cleared by writing to SIE_STATUS.SUSPENDED + DEV_SUSPEND + + + read-only + [13:13] + Set when the device connection state changes. Cleared by writing to SIE_STATUS.CONNECTED + DEV_CONN_DIS + + + read-only + [12:12] + Source: SIE_STATUS.BUS_RESET + BUS_RESET + + + read-only + [11:11] + Source: SIE_STATUS.VBUS_DETECT + VBUS_DETECT + + + read-only + [10:10] + Source: SIE_STATUS.STALL_REC + STALL + + + read-only + [9:9] + Source: SIE_STATUS.CRC_ERROR + ERROR_CRC + + + read-only + [8:8] + Source: SIE_STATUS.BIT_STUFF_ERROR + ERROR_BIT_STUFF + + + read-only + [7:7] + Source: SIE_STATUS.RX_OVERFLOW + ERROR_RX_OVERFLOW + + + read-only + [6:6] + Source: SIE_STATUS.RX_TIMEOUT + ERROR_RX_TIMEOUT + + + read-only + [5:5] + Source: SIE_STATUS.DATA_SEQ_ERROR + ERROR_DATA_SEQ + + + read-only + [4:4] + Raised when any bit in BUFF_STATUS is set. Clear by clearing all bits in BUFF_STATUS. + BUFF_STATUS + + + read-only + [3:3] + Raised every time SIE_STATUS.TRANS_COMPLETE is set. Clear by writing to this bit. + TRANS_COMPLETE + + + read-only + [2:2] + Host: raised every time the host sends a SOF (Start of Frame). Cleared by reading SOF_RD + HOST_SOF + + + read-only + [1:1] + Host: raised when a device wakes up the host. Cleared by writing to SIE_STATUS.RESUME + HOST_RESUME + + + read-only + [0:0] + Host: raised when a device is connected or disconnected (i.e. when SIE_STATUS.SPEED changes). Cleared by writing to SIE_STATUS.SPEED + HOST_CONN_DIS + + + INTS + 0x00000000 + + + 32 + 1 + + + + 0 + 0x1000 + registers + + 0x50200000 + Programmable IO block + + PIO0_IRQ_0 + 7 + + + PIO0_IRQ_1 + 8 + + PIO0 + + + 0x0000 + PIO control register + + + read-write + [11:8] + Force clock dividers to restart their count and clear fractional\n + accumulators. Restart multiple dividers to synchronise them. + clear + CLKDIV_RESTART + + + read-write + [7:4] + Clear internal SM state which is otherwise difficult to access\n + (e.g. shift counters). Self-clearing. + clear + SM_RESTART + + + read-write + [3:0] + Enable state machine + SM_ENABLE + + + CTRL + 0x00000000 + + + 0x0004 + FIFO status register + + + read-only + [27:24] + State machine TX FIFO is empty + TXEMPTY + + + read-only + [19:16] + State machine TX FIFO is full + TXFULL + + + read-only + [11:8] + State machine RX FIFO is empty + RXEMPTY + + + read-only + [3:0] + State machine RX FIFO is full + RXFULL + + + FSTAT + 0x0f000f00 + + + 0x0008 + FIFO debug register + + + read-write + [27:24] + State machine has stalled on empty TX FIFO. Write 1 to clear. + oneToClear + TXSTALL + + + read-write + [19:16] + TX FIFO overflow has occurred. Write 1 to clear. + oneToClear + TXOVER + + + read-write + [11:8] + RX FIFO underflow has occurred. Write 1 to clear. + oneToClear + RXUNDER + + + read-write + [3:0] + State machine has stalled on full RX FIFO. Write 1 to clear. + oneToClear + RXSTALL + + + FDEBUG + 0x00000000 + + + 0x000c + FIFO levels + + + read-only + [31:28] + RX3 + + + read-only + [27:24] + TX3 + + + read-only + [23:20] + RX2 + + + read-only + [19:16] + TX2 + + + read-only + [15:12] + RX1 + + + read-only + [11:8] + TX1 + + + read-only + [7:4] + RX0 + + + read-only + [3:0] + TX0 + + + FLEVEL + 0x00000000 + + + write-only + 0x0010 + Direct write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. + TXF0 + 0x00000000 + + + write-only + 0x0014 + Direct write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. + TXF1 + 0x00000000 + + + write-only + 0x0018 + Direct write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. + TXF2 + 0x00000000 + + + write-only + 0x001c + Direct write access to the TX FIFO for this state machine. Each write pushes one word to the FIFO. + TXF3 + 0x00000000 + + + read-only + 0x0020 + Direct read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. + RXF0 + 0x00000000 + + + read-only + 0x0024 + Direct read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. + RXF1 + 0x00000000 + + + read-only + 0x0028 + Direct read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. + RXF2 + 0x00000000 + + + read-only + 0x002c + Direct read access to the RX FIFO for this state machine. Each read pops one word from the FIFO. + RXF3 + 0x00000000 + + + 0x0030 + Interrupt request register. Write 1 to clear + + + read-write + [7:0] + oneToClear + IRQ + + + IRQ + 0x00000000 + + + 0x0034 + Writing a 1 to each of these bits will forcibly assert the corresponding IRQ.\n + Note this is different to the INTF register: writing here affects PIO internal\n + state. INTF just asserts the processor-facing IRQ signal for testing ISRs,\n + and is not visible to the state machines. + + + write-only + [7:0] + IRQ_FORCE + + + IRQ_FORCE + 0x00000000 + + + read-write + 0x0038 + There is a 2-flipflop synchronizer on each GPIO input, which protects\n + PIO logic from metastabilities. This increases input delay, and for fast\n + synchronous IO (e.g. SPI) these synchronizers may need to be bypassed.\n + Each bit in this register corresponds to one GPIO.\n + 0 -> input is synchronized (default)\n + 1 -> synchronizer is bypassed\n + If in doubt, leave this register as all zeroes. + INPUT_SYNC_BYPASS + 0x00000000 + + + read-only + 0x003c + Read to sample the pad output values PIO is currently driving to the GPIOs. + DBG_PADOUT + 0x00000000 + + + read-only + 0x0040 + Read to sample the pad output enables (direction) PIO is currently driving to the GPIOs. + DBG_PADOE + 0x00000000 + + + 0x0044 + The PIO hardware has some free parameters that may vary between chip products.\n + These should be provided in the chip datasheet, but are also exposed here. + + + read-only + [21:16] + The size of the instruction memory, measured in units of one instruction + IMEM_SIZE + + + read-only + [11:8] + The number of state machines this PIO instance is equipped with. + SM_COUNT + + + read-only + [5:0] + The depth of the state machine TX/RX FIFOs, measured in words.\n + Joining fifos via SHIFTCTRL_FJOIN gives one FIFO with double\n + this depth. + FIFO_DEPTH + + + DBG_CFGINFO + 0x00000000 + + + 0x0048 + Write-only access to instruction memory location 0 + + + read-write + [15:0] + INSTR_MEM0 + + + INSTR_MEM0 + 0x00000000 + + + 0x004c + Write-only access to instruction memory location 1 + + + read-write + [15:0] + INSTR_MEM1 + + + INSTR_MEM1 + 0x00000000 + + + 0x0050 + Write-only access to instruction memory location 2 + + + read-write + [15:0] + INSTR_MEM2 + + + INSTR_MEM2 + 0x00000000 + + + 0x0054 + Write-only access to instruction memory location 3 + + + read-write + [15:0] + INSTR_MEM3 + + + INSTR_MEM3 + 0x00000000 + + + 0x0058 + Write-only access to instruction memory location 4 + + + read-write + [15:0] + INSTR_MEM4 + + + INSTR_MEM4 + 0x00000000 + + + 0x005c + Write-only access to instruction memory location 5 + + + read-write + [15:0] + INSTR_MEM5 + + + INSTR_MEM5 + 0x00000000 + + + 0x0060 + Write-only access to instruction memory location 6 + + + read-write + [15:0] + INSTR_MEM6 + + + INSTR_MEM6 + 0x00000000 + + + 0x0064 + Write-only access to instruction memory location 7 + + + read-write + [15:0] + INSTR_MEM7 + + + INSTR_MEM7 + 0x00000000 + + + 0x0068 + Write-only access to instruction memory location 8 + + + read-write + [15:0] + INSTR_MEM8 + + + INSTR_MEM8 + 0x00000000 + + + 0x006c + Write-only access to instruction memory location 9 + + + read-write + [15:0] + INSTR_MEM9 + + + INSTR_MEM9 + 0x00000000 + + + 0x0070 + Write-only access to instruction memory location 10 + + + read-write + [15:0] + INSTR_MEM10 + + + INSTR_MEM10 + 0x00000000 + + + 0x0074 + Write-only access to instruction memory location 11 + + + read-write + [15:0] + INSTR_MEM11 + + + INSTR_MEM11 + 0x00000000 + + + 0x0078 + Write-only access to instruction memory location 12 + + + read-write + [15:0] + INSTR_MEM12 + + + INSTR_MEM12 + 0x00000000 + + + 0x007c + Write-only access to instruction memory location 13 + + + read-write + [15:0] + INSTR_MEM13 + + + INSTR_MEM13 + 0x00000000 + + + 0x0080 + Write-only access to instruction memory location 14 + + + read-write + [15:0] + INSTR_MEM14 + + + INSTR_MEM14 + 0x00000000 + + + 0x0084 + Write-only access to instruction memory location 15 + + + read-write + [15:0] + INSTR_MEM15 + + + INSTR_MEM15 + 0x00000000 + + + 0x0088 + Write-only access to instruction memory location 16 + + + read-write + [15:0] + INSTR_MEM16 + + + INSTR_MEM16 + 0x00000000 + + + 0x008c + Write-only access to instruction memory location 17 + + + read-write + [15:0] + INSTR_MEM17 + + + INSTR_MEM17 + 0x00000000 + + + 0x0090 + Write-only access to instruction memory location 18 + + + read-write + [15:0] + INSTR_MEM18 + + + INSTR_MEM18 + 0x00000000 + + + 0x0094 + Write-only access to instruction memory location 19 + + + read-write + [15:0] + INSTR_MEM19 + + + INSTR_MEM19 + 0x00000000 + + + 0x0098 + Write-only access to instruction memory location 20 + + + read-write + [15:0] + INSTR_MEM20 + + + INSTR_MEM20 + 0x00000000 + + + 0x009c + Write-only access to instruction memory location 21 + + + read-write + [15:0] + INSTR_MEM21 + + + INSTR_MEM21 + 0x00000000 + + + 0x00a0 + Write-only access to instruction memory location 22 + + + read-write + [15:0] + INSTR_MEM22 + + + INSTR_MEM22 + 0x00000000 + + + 0x00a4 + Write-only access to instruction memory location 23 + + + read-write + [15:0] + INSTR_MEM23 + + + INSTR_MEM23 + 0x00000000 + + + 0x00a8 + Write-only access to instruction memory location 24 + + + read-write + [15:0] + INSTR_MEM24 + + + INSTR_MEM24 + 0x00000000 + + + 0x00ac + Write-only access to instruction memory location 25 + + + read-write + [15:0] + INSTR_MEM25 + + + INSTR_MEM25 + 0x00000000 + + + 0x00b0 + Write-only access to instruction memory location 26 + + + read-write + [15:0] + INSTR_MEM26 + + + INSTR_MEM26 + 0x00000000 + + + 0x00b4 + Write-only access to instruction memory location 27 + + + read-write + [15:0] + INSTR_MEM27 + + + INSTR_MEM27 + 0x00000000 + + + 0x00b8 + Write-only access to instruction memory location 28 + + + read-write + [15:0] + INSTR_MEM28 + + + INSTR_MEM28 + 0x00000000 + + + 0x00bc + Write-only access to instruction memory location 29 + + + read-write + [15:0] + INSTR_MEM29 + + + INSTR_MEM29 + 0x00000000 + + + 0x00c0 + Write-only access to instruction memory location 30 + + + read-write + [15:0] + INSTR_MEM30 + + + INSTR_MEM30 + 0x00000000 + + + 0x00c4 + Write-only access to instruction memory location 31 + + + read-write + [15:0] + INSTR_MEM31 + + + INSTR_MEM31 + 0x00000000 + + + 0x00c8 + Clock divider register for state machine 0\n + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + + + read-write + [31:16] + Effective frequency is sysclk/int.\n + Value of 0 is interpreted as max possible value + INT + + + read-write + [15:8] + Fractional part of clock divider + FRAC + + + SM0_CLKDIV + 0x00010000 + + + 0x00cc + Execution/behavioural settings for state machine 0 + + + read-only + [31:31] + An instruction written to SMx_INSTR is stalled, and latched by the\n + state machine. Will clear once the instruction completes. + EXEC_STALLED + + + read-write + [30:30] + If 1, the delay MSB is used as side-set enable, rather than a\n + side-set data bit. This allows instructions to perform side-set optionally,\n + rather than on every instruction. + SIDE_EN + + + read-write + [29:29] + Side-set data is asserted to pin OEs instead of pin values + SIDE_PINDIR + + + read-write + [28:24] + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + JMP_PIN + + + read-write + [23:19] + Which data bit to use for inline OUT enable + OUT_EN_SEL + + + read-write + [18:18] + If 1, use a bit of OUT data as an auxiliary write enable\n + When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n + deassert the latest pin write. This can create useful masking/override behaviour\n + due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) + INLINE_OUT_EN + + + read-write + [17:17] + Continuously assert the most recent OUT/SET to the pins + OUT_STICKY + + + read-write + [16:12] + After reaching this address, execution is wrapped to wrap_bottom.\n + If the instruction is a jump, and the jump condition is true, the jump takes priority. + WRAP_TOP + + + read-write + [11:7] + After reaching wrap_top, execution is wrapped to this address. + WRAP_BOTTOM + + + read-write + [4:4] + Comparison used for the MOV x, STATUS instruction. + + + All-ones if TX FIFO level < N, otherwise all-zeroes + TXLEVEL + 0 + + + All-ones if RX FIFO level < N, otherwise all-zeroes + RXLEVEL + 1 + + + STATUS_SEL + + + read-write + [3:0] + Comparison level for the MOV x, STATUS instruction + STATUS_N + + + SM0_EXECCTRL + 0x0001f000 + + + 0x00d0 + Control behaviour of the input/output shift registers for state machine 0 + + + read-write + [31:31] + When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n + TX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_RX + + + read-write + [30:30] + When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n + RX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_TX + + + read-write + [29:25] + Number of bits shifted out of TXSR before autopull or conditional pull.\n + Write 0 for value of 32. + PULL_THRESH + + + read-write + [24:20] + Number of bits shifted into RXSR before autopush or conditional push.\n + Write 0 for value of 32. + PUSH_THRESH + + + read-write + [19:19] + 1 = shift out of output shift register to right. 0 = to left. + OUT_SHIFTDIR + + + read-write + [18:18] + 1 = shift input shift register to right (data enters from left). 0 = to left. + IN_SHIFTDIR + + + read-write + [17:17] + Pull automatically when the output shift register is emptied + AUTOPULL + + + read-write + [16:16] + Push automatically when the input shift register is filled + AUTOPUSH + + + SM0_SHIFTCTRL + 0x000c0000 + + + 0x00d4 + Current instruction address of state machine 0 + + + read-only + [4:0] + SM0_ADDR + + + SM0_ADDR + 0x00000000 + + + 0x00d8 + Instruction currently being executed by state machine 0\n + Write to execute an instruction immediately (including jumps) and then resume execution. + + + read-write + [15:0] + SM0_INSTR + + + SM0_INSTR + 0x00000000 + + + 0x00dc + State machine pin control + + + read-write + [31:29] + The number of delay bits co-opted for side-set. Inclusive of the enable bit, if present. + SIDESET_COUNT + + + read-write + [28:26] + The number of pins asserted by a SET. Max of 5 + SET_COUNT + + + read-write + [25:20] + The number of pins asserted by an OUT. Value of 0 -> 32 pins + OUT_COUNT + + + read-write + [19:15] + The virtual pin corresponding to IN bit 0 + IN_BASE + + + read-write + [14:10] + The virtual pin corresponding to delay field bit 0 + SIDESET_BASE + + + read-write + [9:5] + The virtual pin corresponding to SET bit 0 + SET_BASE + + + read-write + [4:0] + The virtual pin corresponding to OUT bit 0 + OUT_BASE + + + SM0_PINCTRL + 0x14000000 + + + 0x00e0 + Clock divider register for state machine 1\n + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + + + read-write + [31:16] + Effective frequency is sysclk/int.\n + Value of 0 is interpreted as max possible value + INT + + + read-write + [15:8] + Fractional part of clock divider + FRAC + + + SM1_CLKDIV + 0x00010000 + + + 0x00e4 + Execution/behavioural settings for state machine 1 + + + read-only + [31:31] + An instruction written to SMx_INSTR is stalled, and latched by the\n + state machine. Will clear once the instruction completes. + EXEC_STALLED + + + read-write + [30:30] + If 1, the delay MSB is used as side-set enable, rather than a\n + side-set data bit. This allows instructions to perform side-set optionally,\n + rather than on every instruction. + SIDE_EN + + + read-write + [29:29] + Side-set data is asserted to pin OEs instead of pin values + SIDE_PINDIR + + + read-write + [28:24] + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + JMP_PIN + + + read-write + [23:19] + Which data bit to use for inline OUT enable + OUT_EN_SEL + + + read-write + [18:18] + If 1, use a bit of OUT data as an auxiliary write enable\n + When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n + deassert the latest pin write. This can create useful masking/override behaviour\n + due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) + INLINE_OUT_EN + + + read-write + [17:17] + Continuously assert the most recent OUT/SET to the pins + OUT_STICKY + + + read-write + [16:12] + After reaching this address, execution is wrapped to wrap_bottom.\n + If the instruction is a jump, and the jump condition is true, the jump takes priority. + WRAP_TOP + + + read-write + [11:7] + After reaching wrap_top, execution is wrapped to this address. + WRAP_BOTTOM + + + read-write + [4:4] + Comparison used for the MOV x, STATUS instruction. + + + All-ones if TX FIFO level < N, otherwise all-zeroes + TXLEVEL + 0 + + + All-ones if RX FIFO level < N, otherwise all-zeroes + RXLEVEL + 1 + + + STATUS_SEL + + + read-write + [3:0] + Comparison level for the MOV x, STATUS instruction + STATUS_N + + + SM1_EXECCTRL + 0x0001f000 + + + 0x00e8 + Control behaviour of the input/output shift registers for state machine 1 + + + read-write + [31:31] + When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n + TX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_RX + + + read-write + [30:30] + When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n + RX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_TX + + + read-write + [29:25] + Number of bits shifted out of TXSR before autopull or conditional pull.\n + Write 0 for value of 32. + PULL_THRESH + + + read-write + [24:20] + Number of bits shifted into RXSR before autopush or conditional push.\n + Write 0 for value of 32. + PUSH_THRESH + + + read-write + [19:19] + 1 = shift out of output shift register to right. 0 = to left. + OUT_SHIFTDIR + + + read-write + [18:18] + 1 = shift input shift register to right (data enters from left). 0 = to left. + IN_SHIFTDIR + + + read-write + [17:17] + Pull automatically when the output shift register is emptied + AUTOPULL + + + read-write + [16:16] + Push automatically when the input shift register is filled + AUTOPUSH + + + SM1_SHIFTCTRL + 0x000c0000 + + + 0x00ec + Current instruction address of state machine 1 + + + read-only + [4:0] + SM1_ADDR + + + SM1_ADDR + 0x00000000 + + + 0x00f0 + Instruction currently being executed by state machine 1\n + Write to execute an instruction immediately (including jumps) and then resume execution. + + + read-write + [15:0] + SM1_INSTR + + + SM1_INSTR + 0x00000000 + + + 0x00f4 + State machine pin control + + + read-write + [31:29] + The number of delay bits co-opted for side-set. Inclusive of the enable bit, if present. + SIDESET_COUNT + + + read-write + [28:26] + The number of pins asserted by a SET. Max of 5 + SET_COUNT + + + read-write + [25:20] + The number of pins asserted by an OUT. Value of 0 -> 32 pins + OUT_COUNT + + + read-write + [19:15] + The virtual pin corresponding to IN bit 0 + IN_BASE + + + read-write + [14:10] + The virtual pin corresponding to delay field bit 0 + SIDESET_BASE + + + read-write + [9:5] + The virtual pin corresponding to SET bit 0 + SET_BASE + + + read-write + [4:0] + The virtual pin corresponding to OUT bit 0 + OUT_BASE + + + SM1_PINCTRL + 0x14000000 + + + 0x00f8 + Clock divider register for state machine 2\n + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + + + read-write + [31:16] + Effective frequency is sysclk/int.\n + Value of 0 is interpreted as max possible value + INT + + + read-write + [15:8] + Fractional part of clock divider + FRAC + + + SM2_CLKDIV + 0x00010000 + + + 0x00fc + Execution/behavioural settings for state machine 2 + + + read-only + [31:31] + An instruction written to SMx_INSTR is stalled, and latched by the\n + state machine. Will clear once the instruction completes. + EXEC_STALLED + + + read-write + [30:30] + If 1, the delay MSB is used as side-set enable, rather than a\n + side-set data bit. This allows instructions to perform side-set optionally,\n + rather than on every instruction. + SIDE_EN + + + read-write + [29:29] + Side-set data is asserted to pin OEs instead of pin values + SIDE_PINDIR + + + read-write + [28:24] + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + JMP_PIN + + + read-write + [23:19] + Which data bit to use for inline OUT enable + OUT_EN_SEL + + + read-write + [18:18] + If 1, use a bit of OUT data as an auxiliary write enable\n + When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n + deassert the latest pin write. This can create useful masking/override behaviour\n + due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) + INLINE_OUT_EN + + + read-write + [17:17] + Continuously assert the most recent OUT/SET to the pins + OUT_STICKY + + + read-write + [16:12] + After reaching this address, execution is wrapped to wrap_bottom.\n + If the instruction is a jump, and the jump condition is true, the jump takes priority. + WRAP_TOP + + + read-write + [11:7] + After reaching wrap_top, execution is wrapped to this address. + WRAP_BOTTOM + + + read-write + [4:4] + Comparison used for the MOV x, STATUS instruction. + + + All-ones if TX FIFO level < N, otherwise all-zeroes + TXLEVEL + 0 + + + All-ones if RX FIFO level < N, otherwise all-zeroes + RXLEVEL + 1 + + + STATUS_SEL + + + read-write + [3:0] + Comparison level for the MOV x, STATUS instruction + STATUS_N + + + SM2_EXECCTRL + 0x0001f000 + + + 0x0100 + Control behaviour of the input/output shift registers for state machine 2 + + + read-write + [31:31] + When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n + TX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_RX + + + read-write + [30:30] + When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n + RX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_TX + + + read-write + [29:25] + Number of bits shifted out of TXSR before autopull or conditional pull.\n + Write 0 for value of 32. + PULL_THRESH + + + read-write + [24:20] + Number of bits shifted into RXSR before autopush or conditional push.\n + Write 0 for value of 32. + PUSH_THRESH + + + read-write + [19:19] + 1 = shift out of output shift register to right. 0 = to left. + OUT_SHIFTDIR + + + read-write + [18:18] + 1 = shift input shift register to right (data enters from left). 0 = to left. + IN_SHIFTDIR + + + read-write + [17:17] + Pull automatically when the output shift register is emptied + AUTOPULL + + + read-write + [16:16] + Push automatically when the input shift register is filled + AUTOPUSH + + + SM2_SHIFTCTRL + 0x000c0000 + + + 0x0104 + Current instruction address of state machine 2 + + + read-only + [4:0] + SM2_ADDR + + + SM2_ADDR + 0x00000000 + + + 0x0108 + Instruction currently being executed by state machine 2\n + Write to execute an instruction immediately (including jumps) and then resume execution. + + + read-write + [15:0] + SM2_INSTR + + + SM2_INSTR + 0x00000000 + + + 0x010c + State machine pin control + + + read-write + [31:29] + The number of delay bits co-opted for side-set. Inclusive of the enable bit, if present. + SIDESET_COUNT + + + read-write + [28:26] + The number of pins asserted by a SET. Max of 5 + SET_COUNT + + + read-write + [25:20] + The number of pins asserted by an OUT. Value of 0 -> 32 pins + OUT_COUNT + + + read-write + [19:15] + The virtual pin corresponding to IN bit 0 + IN_BASE + + + read-write + [14:10] + The virtual pin corresponding to delay field bit 0 + SIDESET_BASE + + + read-write + [9:5] + The virtual pin corresponding to SET bit 0 + SET_BASE + + + read-write + [4:0] + The virtual pin corresponding to OUT bit 0 + OUT_BASE + + + SM2_PINCTRL + 0x14000000 + + + 0x0110 + Clock divider register for state machine 3\n + Frequency = clock freq / (CLKDIV_INT + CLKDIV_FRAC / 256) + + + read-write + [31:16] + Effective frequency is sysclk/int.\n + Value of 0 is interpreted as max possible value + INT + + + read-write + [15:8] + Fractional part of clock divider + FRAC + + + SM3_CLKDIV + 0x00010000 + + + 0x0114 + Execution/behavioural settings for state machine 3 + + + read-only + [31:31] + An instruction written to SMx_INSTR is stalled, and latched by the\n + state machine. Will clear once the instruction completes. + EXEC_STALLED + + + read-write + [30:30] + If 1, the delay MSB is used as side-set enable, rather than a\n + side-set data bit. This allows instructions to perform side-set optionally,\n + rather than on every instruction. + SIDE_EN + + + read-write + [29:29] + Side-set data is asserted to pin OEs instead of pin values + SIDE_PINDIR + + + read-write + [28:24] + The GPIO number to use as condition for JMP PIN. Unaffected by input mapping. + JMP_PIN + + + read-write + [23:19] + Which data bit to use for inline OUT enable + OUT_EN_SEL + + + read-write + [18:18] + If 1, use a bit of OUT data as an auxiliary write enable\n + When used in conjunction with OUT_STICKY, writes with an enable of 0 will\n + deassert the latest pin write. This can create useful masking/override behaviour\n + due to the priority ordering of state machine pin writes (SM0 < SM1 < ...) + INLINE_OUT_EN + + + read-write + [17:17] + Continuously assert the most recent OUT/SET to the pins + OUT_STICKY + + + read-write + [16:12] + After reaching this address, execution is wrapped to wrap_bottom.\n + If the instruction is a jump, and the jump condition is true, the jump takes priority. + WRAP_TOP + + + read-write + [11:7] + After reaching wrap_top, execution is wrapped to this address. + WRAP_BOTTOM + + + read-write + [4:4] + Comparison used for the MOV x, STATUS instruction. + + + All-ones if TX FIFO level < N, otherwise all-zeroes + TXLEVEL + 0 + + + All-ones if RX FIFO level < N, otherwise all-zeroes + RXLEVEL + 1 + + + STATUS_SEL + + + read-write + [3:0] + Comparison level for the MOV x, STATUS instruction + STATUS_N + + + SM3_EXECCTRL + 0x0001f000 + + + 0x0118 + Control behaviour of the input/output shift registers for state machine 3 + + + read-write + [31:31] + When 1, RX FIFO steals the TX FIFO's storage, and becomes twice as deep.\n + TX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_RX + + + read-write + [30:30] + When 1, TX FIFO steals the RX FIFO's storage, and becomes twice as deep.\n + RX FIFO is disabled as a result (always reads as both full and empty).\n + FIFOs are flushed when this bit is changed. + FJOIN_TX + + + read-write + [29:25] + Number of bits shifted out of TXSR before autopull or conditional pull.\n + Write 0 for value of 32. + PULL_THRESH + + + read-write + [24:20] + Number of bits shifted into RXSR before autopush or conditional push.\n + Write 0 for value of 32. + PUSH_THRESH + + + read-write + [19:19] + 1 = shift out of output shift register to right. 0 = to left. + OUT_SHIFTDIR + + + read-write + [18:18] + 1 = shift input shift register to right (data enters from left). 0 = to left. + IN_SHIFTDIR + + + read-write + [17:17] + Pull automatically when the output shift register is emptied + AUTOPULL + + + read-write + [16:16] + Push automatically when the input shift register is filled + AUTOPUSH + + + SM3_SHIFTCTRL + 0x000c0000 + + + 0x011c + Current instruction address of state machine 3 + + + read-only + [4:0] + SM3_ADDR + + + SM3_ADDR + 0x00000000 + + + 0x0120 + Instruction currently being executed by state machine 3\n + Write to execute an instruction immediately (including jumps) and then resume execution. + + + read-write + [15:0] + SM3_INSTR + + + SM3_INSTR + 0x00000000 + + + 0x0124 + State machine pin control + + + read-write + [31:29] + The number of delay bits co-opted for side-set. Inclusive of the enable bit, if present. + SIDESET_COUNT + + + read-write + [28:26] + The number of pins asserted by a SET. Max of 5 + SET_COUNT + + + read-write + [25:20] + The number of pins asserted by an OUT. Value of 0 -> 32 pins + OUT_COUNT + + + read-write + [19:15] + The virtual pin corresponding to IN bit 0 + IN_BASE + + + read-write + [14:10] + The virtual pin corresponding to delay field bit 0 + SIDESET_BASE + + + read-write + [9:5] + The virtual pin corresponding to SET bit 0 + SET_BASE + + + read-write + [4:0] + The virtual pin corresponding to OUT bit 0 + OUT_BASE + + + SM3_PINCTRL + 0x14000000 + + + 0x0128 + Raw Interrupts + + + read-only + [11:11] + SM3 + + + read-only + [10:10] + SM2 + + + read-only + [9:9] + SM1 + + + read-only + [8:8] + SM0 + + + read-only + [7:7] + SM3_TXNFULL + + + read-only + [6:6] + SM2_TXNFULL + + + read-only + [5:5] + SM1_TXNFULL + + + read-only + [4:4] + SM0_TXNFULL + + + read-only + [3:3] + SM3_RXNEMPTY + + + read-only + [2:2] + SM2_RXNEMPTY + + + read-only + [1:1] + SM1_RXNEMPTY + + + read-only + [0:0] + SM0_RXNEMPTY + + + INTR + 0x00000000 + + + 0x012c + Interrupt Enable for irq0 + + + read-write + [11:11] + SM3 + + + read-write + [10:10] + SM2 + + + read-write + [9:9] + SM1 + + + read-write + [8:8] + SM0 + + + read-write + [7:7] + SM3_TXNFULL + + + read-write + [6:6] + SM2_TXNFULL + + + read-write + [5:5] + SM1_TXNFULL + + + read-write + [4:4] + SM0_TXNFULL + + + read-write + [3:3] + SM3_RXNEMPTY + + + read-write + [2:2] + SM2_RXNEMPTY + + + read-write + [1:1] + SM1_RXNEMPTY + + + read-write + [0:0] + SM0_RXNEMPTY + + + IRQ0_INTE + 0x00000000 + + + 0x0130 + Interrupt Force for irq0 + + + read-write + [11:11] + SM3 + + + read-write + [10:10] + SM2 + + + read-write + [9:9] + SM1 + + + read-write + [8:8] + SM0 + + + read-write + [7:7] + SM3_TXNFULL + + + read-write + [6:6] + SM2_TXNFULL + + + read-write + [5:5] + SM1_TXNFULL + + + read-write + [4:4] + SM0_TXNFULL + + + read-write + [3:3] + SM3_RXNEMPTY + + + read-write + [2:2] + SM2_RXNEMPTY + + + read-write + [1:1] + SM1_RXNEMPTY + + + read-write + [0:0] + SM0_RXNEMPTY + + + IRQ0_INTF + 0x00000000 + + + 0x0134 + Interrupt status after masking & forcing for irq0 + + + read-only + [11:11] + SM3 + + + read-only + [10:10] + SM2 + + + read-only + [9:9] + SM1 + + + read-only + [8:8] + SM0 + + + read-only + [7:7] + SM3_TXNFULL + + + read-only + [6:6] + SM2_TXNFULL + + + read-only + [5:5] + SM1_TXNFULL + + + read-only + [4:4] + SM0_TXNFULL + + + read-only + [3:3] + SM3_RXNEMPTY + + + read-only + [2:2] + SM2_RXNEMPTY + + + read-only + [1:1] + SM1_RXNEMPTY + + + read-only + [0:0] + SM0_RXNEMPTY + + + IRQ0_INTS + 0x00000000 + + + 0x0138 + Interrupt Enable for irq1 + + + read-write + [11:11] + SM3 + + + read-write + [10:10] + SM2 + + + read-write + [9:9] + SM1 + + + read-write + [8:8] + SM0 + + + read-write + [7:7] + SM3_TXNFULL + + + read-write + [6:6] + SM2_TXNFULL + + + read-write + [5:5] + SM1_TXNFULL + + + read-write + [4:4] + SM0_TXNFULL + + + read-write + [3:3] + SM3_RXNEMPTY + + + read-write + [2:2] + SM2_RXNEMPTY + + + read-write + [1:1] + SM1_RXNEMPTY + + + read-write + [0:0] + SM0_RXNEMPTY + + + IRQ1_INTE + 0x00000000 + + + 0x013c + Interrupt Force for irq1 + + + read-write + [11:11] + SM3 + + + read-write + [10:10] + SM2 + + + read-write + [9:9] + SM1 + + + read-write + [8:8] + SM0 + + + read-write + [7:7] + SM3_TXNFULL + + + read-write + [6:6] + SM2_TXNFULL + + + read-write + [5:5] + SM1_TXNFULL + + + read-write + [4:4] + SM0_TXNFULL + + + read-write + [3:3] + SM3_RXNEMPTY + + + read-write + [2:2] + SM2_RXNEMPTY + + + read-write + [1:1] + SM1_RXNEMPTY + + + read-write + [0:0] + SM0_RXNEMPTY + + + IRQ1_INTF + 0x00000000 + + + 0x0140 + Interrupt status after masking & forcing for irq1 + + + read-only + [11:11] + SM3 + + + read-only + [10:10] + SM2 + + + read-only + [9:9] + SM1 + + + read-only + [8:8] + SM0 + + + read-only + [7:7] + SM3_TXNFULL + + + read-only + [6:6] + SM2_TXNFULL + + + read-only + [5:5] + SM1_TXNFULL + + + read-only + [4:4] + SM0_TXNFULL + + + read-only + [3:3] + SM3_RXNEMPTY + + + read-only + [2:2] + SM2_RXNEMPTY + + + read-only + [1:1] + SM1_RXNEMPTY + + + read-only + [0:0] + SM0_RXNEMPTY + + + IRQ1_INTS + 0x00000000 + + + 32 + 1 + + + 0x50300000 + + PIO1_IRQ_0 + 9 + + + PIO1_IRQ_1 + 10 + + PIO1 + + + + 0 + 0x0200 + registers + + 0xd0000000 + Single-cycle IO block\n + Provides core-local and inter-core hardware for the two processors, with single-cycle access. + + SIO_IRQ_PROC0 + 15 + + + SIO_IRQ_PROC1 + 16 + + SIO + + + read-only + 0x0000 + Processor core identifier\n + Value is 0 when read from processor core 0, and 1 when read from processor core 1. + CPUID + 0x00000000 + + + 0x0004 + Input value for GPIO pins + + + read-only + [29:0] + Input value for GPIO0...29 + GPIO_IN + + + GPIO_IN + 0x00000000 + + + 0x0008 + Input value for QSPI pins + + + read-only + [5:0] + Input value on QSPI IO in order 0..5: SCLK, SSn, SD0, SD1, SD2, SD3 + GPIO_HI_IN + + + GPIO_HI_IN + 0x00000000 + + + 0x0010 + GPIO output value + + + read-write + [29:0] + Set output level (1/0 -> high/low) for GPIO0...29.\n + Reading back gives the last value written, NOT the input value from the pins.\n + If core 0 and core 1 both write to GPIO_OUT simultaneously (or to a SET/CLR/XOR alias),\n + the result is as though the write from core 0 took place first,\n + and the write from core 1 was then applied to that intermediate result. + GPIO_OUT + + + GPIO_OUT + 0x00000000 + + + 0x0014 + GPIO output value set + + + read-write + [29:0] + Perform an atomic bit-set on GPIO_OUT, i.e. `GPIO_OUT |= wdata` + GPIO_OUT_SET + + + GPIO_OUT_SET + 0x00000000 + + + 0x0018 + GPIO output value clear + + + read-write + [29:0] + Perform an atomic bit-clear on GPIO_OUT, i.e. `GPIO_OUT &= ~wdata` + GPIO_OUT_CLR + + + GPIO_OUT_CLR + 0x00000000 + + + 0x001c + GPIO output value XOR + + + read-write + [29:0] + Perform an atomic bitwise XOR on GPIO_OUT, i.e. `GPIO_OUT ^= wdata` + GPIO_OUT_XOR + + + GPIO_OUT_XOR + 0x00000000 + + + 0x0020 + GPIO output enable + + + read-write + [29:0] + Set output enable (1/0 -> output/input) for GPIO0...29.\n + Reading back gives the last value written.\n + If core 0 and core 1 both write to GPIO_OE simultaneously (or to a SET/CLR/XOR alias),\n + the result is as though the write from core 0 took place first,\n + and the write from core 1 was then applied to that intermediate result. + GPIO_OE + + + GPIO_OE + 0x00000000 + + + 0x0024 + GPIO output enable set + + + read-write + [29:0] + Perform an atomic bit-set on GPIO_OE, i.e. `GPIO_OE |= wdata` + GPIO_OE_SET + + + GPIO_OE_SET + 0x00000000 + + + 0x0028 + GPIO output enable clear + + + read-write + [29:0] + Perform an atomic bit-clear on GPIO_OE, i.e. `GPIO_OE &= ~wdata` + GPIO_OE_CLR + + + GPIO_OE_CLR + 0x00000000 + + + 0x002c + GPIO output enable XOR + + + read-write + [29:0] + Perform an atomic bitwise XOR on GPIO_OE, i.e. `GPIO_OE ^= wdata` + GPIO_OE_XOR + + + GPIO_OE_XOR + 0x00000000 + + + 0x0030 + QSPI output value + + + read-write + [5:0] + Set output level (1/0 -> high/low) for QSPI IO0...5.\n + Reading back gives the last value written, NOT the input value from the pins.\n + If core 0 and core 1 both write to GPIO_HI_OUT simultaneously (or to a SET/CLR/XOR alias),\n + the result is as though the write from core 0 took place first,\n + and the write from core 1 was then applied to that intermediate result. + GPIO_HI_OUT + + + GPIO_HI_OUT + 0x00000000 + + + 0x0034 + QSPI output value set + + + read-write + [5:0] + Perform an atomic bit-set on GPIO_HI_OUT, i.e. `GPIO_HI_OUT |= wdata` + GPIO_HI_OUT_SET + + + GPIO_HI_OUT_SET + 0x00000000 + + + 0x0038 + QSPI output value clear + + + read-write + [5:0] + Perform an atomic bit-clear on GPIO_HI_OUT, i.e. `GPIO_HI_OUT &= ~wdata` + GPIO_HI_OUT_CLR + + + GPIO_HI_OUT_CLR + 0x00000000 + + + 0x003c + QSPI output value XOR + + + read-write + [5:0] + Perform an atomic bitwise XOR on GPIO_HI_OUT, i.e. `GPIO_HI_OUT ^= wdata` + GPIO_HI_OUT_XOR + + + GPIO_HI_OUT_XOR + 0x00000000 + + + 0x0040 + QSPI output enable + + + read-write + [5:0] + Set output enable (1/0 -> output/input) for QSPI IO0...5.\n + Reading back gives the last value written.\n + If core 0 and core 1 both write to GPIO_HI_OE simultaneously (or to a SET/CLR/XOR alias),\n + the result is as though the write from core 0 took place first,\n + and the write from core 1 was then applied to that intermediate result. + GPIO_HI_OE + + + GPIO_HI_OE + 0x00000000 + + + 0x0044 + QSPI output enable set + + + read-write + [5:0] + Perform an atomic bit-set on GPIO_HI_OE, i.e. `GPIO_HI_OE |= wdata` + GPIO_HI_OE_SET + + + GPIO_HI_OE_SET + 0x00000000 + + + 0x0048 + QSPI output enable clear + + + read-write + [5:0] + Perform an atomic bit-clear on GPIO_HI_OE, i.e. `GPIO_HI_OE &= ~wdata` + GPIO_HI_OE_CLR + + + GPIO_HI_OE_CLR + 0x00000000 + + + 0x004c + QSPI output enable XOR + + + read-write + [5:0] + Perform an atomic bitwise XOR on GPIO_HI_OE, i.e. `GPIO_HI_OE ^= wdata` + GPIO_HI_OE_XOR + + + GPIO_HI_OE_XOR + 0x00000000 + + + 0x0050 + Status register for inter-core FIFOs (mailboxes).\n + There is one FIFO in the core 0 -> core 1 direction, and one core 1 -> core 0. Both are 32 bits wide and 8 words deep.\n + Core 0 can see the read side of the 1->0 FIFO (RX), and the write side of 0->1 FIFO (TX).\n + Core 1 can see the read side of the 0->1 FIFO (RX), and the write side of 1->0 FIFO (TX).\n + The SIO IRQ for each core is the logical OR of the VLD, WOF and ROE fields of its FIFO_ST register. + + + read-write + [3:3] + Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO. + oneToClear + ROE + + + read-write + [2:2] + Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO. + oneToClear + WOF + + + read-only + [1:1] + Value is 1 if this core's TX FIFO is not full (i.e. if FIFO_WR is ready for more data) + RDY + + + read-only + [0:0] + Value is 1 if this core's RX FIFO is not empty (i.e. if FIFO_RD is valid) + VLD + + + FIFO_ST + 0x00000002 + + + write-only + 0x0054 + Write access to this core's TX FIFO + FIFO_WR + 0x00000000 + + + read-only + 0x0058 + Read access to this core's RX FIFO + FIFO_RD + 0x00000000 + + + read-only + 0x005c + Spinlock state\n + A bitmap containing the state of all 32 spinlocks (1=locked).\n + Mainly intended for debugging. + SPINLOCK_ST + 0x00000000 + + + read-write + 0x0060 + Divider unsigned dividend\n + Write to the DIVIDEND operand of the divider, i.e. the p in `p / q`.\n + Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER.\n + UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an\n + unsigned calculation, and the S alias starts a signed calculation. + DIV_UDIVIDEND + 0x00000000 + + + read-write + 0x0064 + Divider unsigned divisor\n + Write to the DIVISOR operand of the divider, i.e. the q in `p / q`.\n + Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER.\n + UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an\n + unsigned calculation, and the S alias starts a signed calculation. + DIV_UDIVISOR + 0x00000000 + + + read-write + 0x0068 + Divider signed dividend\n + The same as UDIVIDEND, but starts a signed calculation, rather than unsigned. + DIV_SDIVIDEND + 0x00000000 + + + read-write + 0x006c + Divider signed divisor\n + The same as UDIVISOR, but starts a signed calculation, rather than unsigned. + DIV_SDIVISOR + 0x00000000 + + + read-write + 0x0070 + Divider result quotient\n + The result of `DIVIDEND / DIVISOR` (division). Contents undefined while CSR_READY is low.\n + For signed calculations, QUOTIENT is negative when the signs of DIVIDEND and DIVISOR differ.\n + This register can be written to directly, for context save/restore purposes. This halts any\n + in-progress calculation and sets the CSR_READY and CSR_DIRTY flags.\n + Reading from QUOTIENT clears the CSR_DIRTY flag, so should read results in the order\n + REMAINDER, QUOTIENT if CSR_DIRTY is used. + DIV_QUOTIENT + 0x00000000 + + + read-write + 0x0074 + Divider result remainder\n + The result of `DIVIDEND % DIVISOR` (modulo). Contents undefined while CSR_READY is low.\n + For signed calculations, REMAINDER is negative only when DIVIDEND is negative.\n + This register can be written to directly, for context save/restore purposes. This halts any\n + in-progress calculation and sets the CSR_READY and CSR_DIRTY flags. + DIV_REMAINDER + 0x00000000 + + + 0x0078 + Control and status register for divider. + + + read-only + [1:1] + Changes to 1 when any register is written, and back to 0 when QUOTIENT is read.\n + Software can use this flag to make save/restore more efficient (skip if not DIRTY).\n + If the flag is used in this way, it's recommended to either read QUOTIENT only,\n + or REMAINDER and then QUOTIENT, to prevent data loss on context switch. + DIRTY + + + read-only + [0:0] + Reads as 0 when a calculation is in progress, 1 otherwise.\n + Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no\n + matter if one is already in progress.\n + Writing to a result register will immediately terminate any in-progress calculation\n + and set the READY and DIRTY flags. + READY + + + DIV_CSR + 0x00000001 + + + read-write + 0x0080 + Read/write access to accumulator 0 + INTERP0_ACCUM0 + 0x00000000 + + + read-write + 0x0084 + Read/write access to accumulator 1 + INTERP0_ACCUM1 + 0x00000000 + + + read-write + 0x0088 + Read/write access to BASE0 register. + INTERP0_BASE0 + 0x00000000 + + + read-write + 0x008c + Read/write access to BASE1 register. + INTERP0_BASE1 + 0x00000000 + + + read-write + 0x0090 + Read/write access to BASE2 register. + INTERP0_BASE2 + 0x00000000 + + + read-only + 0x0094 + Read LANE0 result, and simultaneously write lane results to both accumulators (POP). + INTERP0_POP_LANE0 + 0x00000000 + + + read-only + 0x0098 + Read LANE1 result, and simultaneously write lane results to both accumulators (POP). + INTERP0_POP_LANE1 + 0x00000000 + + + read-only + 0x009c + Read FULL result, and simultaneously write lane results to both accumulators (POP). + INTERP0_POP_FULL + 0x00000000 + + + read-only + 0x00a0 + Read LANE0 result, without altering any internal state (PEEK). + INTERP0_PEEK_LANE0 + 0x00000000 + + + read-only + 0x00a4 + Read LANE1 result, without altering any internal state (PEEK). + INTERP0_PEEK_LANE1 + 0x00000000 + + + read-only + 0x00a8 + Read FULL result, without altering any internal state (PEEK). + INTERP0_PEEK_FULL + 0x00000000 + + + 0x00ac + Control register for lane 0 + + + read-only + [25:25] + Set if either OVERF0 or OVERF1 is set. + OVERF + + + read-only + [24:24] + Indicates if any masked-off MSBs in ACCUM1 are set. + OVERF1 + + + read-only + [23:23] + Indicates if any masked-off MSBs in ACCUM0 are set. + OVERF0 + + + read-write + [21:21] + Only present on INTERP0 on each core. If BLEND mode is enabled:\n + - LANE1 result is a linear interpolation between BASE0 and BASE1, controlled\n + by the 8 LSBs of lane 1 shift and mask value (a fractional number between\n + 0 and 255/256ths)\n + - LANE0 result does not have BASE0 added (yields only the 8 LSBs of lane 1 shift+mask value)\n + - FULL result does not have lane 1 shift+mask value added (BASE2 + lane 0 shift+mask)\n + LANE1 SIGNED flag controls whether the interpolation is signed or unsigned. + BLEND + + + read-write + [20:19] + ORed into bits 29:28 of the lane result presented to the processor on the bus.\n + No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n + of pointers into flash or SRAM. + FORCE_MSB + + + read-write + [18:18] + If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. + ADD_RAW + + + read-write + [17:17] + If 1, feed the opposite lane's result into this lane's accumulator on POP. + CROSS_RESULT + + + read-write + [16:16] + If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n + Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) + CROSS_INPUT + + + read-write + [15:15] + If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n + before adding to BASE0, and LANE0 PEEK/POP appear extended to 32 bits when read by processor. + SIGNED + + + read-write + [14:10] + The most-significant bit allowed to pass by the mask (inclusive)\n + Setting MSB < LSB may cause chip to turn inside-out + MASK_MSB + + + read-write + [9:5] + The least-significant bit allowed to pass by the mask (inclusive) + MASK_LSB + + + read-write + [4:0] + Logical right-shift applied to accumulator before masking + SHIFT + + + INTERP0_CTRL_LANE0 + 0x00000000 + + + 0x00b0 + Control register for lane 1 + + + read-write + [20:19] + ORed into bits 29:28 of the lane result presented to the processor on the bus.\n + No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n + of pointers into flash or SRAM. + FORCE_MSB + + + read-write + [18:18] + If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. + ADD_RAW + + + read-write + [17:17] + If 1, feed the opposite lane's result into this lane's accumulator on POP. + CROSS_RESULT + + + read-write + [16:16] + If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n + Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) + CROSS_INPUT + + + read-write + [15:15] + If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n + before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor. + SIGNED + + + read-write + [14:10] + The most-significant bit allowed to pass by the mask (inclusive)\n + Setting MSB < LSB may cause chip to turn inside-out + MASK_MSB + + + read-write + [9:5] + The least-significant bit allowed to pass by the mask (inclusive) + MASK_LSB + + + read-write + [4:0] + Logical right-shift applied to accumulator before masking + SHIFT + + + INTERP0_CTRL_LANE1 + 0x00000000 + + + 0x00b4 + Values written here are atomically added to ACCUM0\n + Reading yields lane 0's raw shift and mask value (BASE0 not added). + + + read-write + [23:0] + INTERP0_ACCUM0_ADD + + + INTERP0_ACCUM0_ADD + 0x00000000 + + + 0x00b8 + Values written here are atomically added to ACCUM1\n + Reading yields lane 1's raw shift and mask value (BASE1 not added). + + + read-write + [23:0] + INTERP0_ACCUM1_ADD + + + INTERP0_ACCUM1_ADD + 0x00000000 + + + read-write + 0x00bc + On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously.\n + Each half is sign-extended to 32 bits if that lane's SIGNED flag is set. + INTERP0_BASE_1AND0 + 0x00000000 + + + read-write + 0x00c0 + Read/write access to accumulator 0 + INTERP1_ACCUM0 + 0x00000000 + + + read-write + 0x00c4 + Read/write access to accumulator 1 + INTERP1_ACCUM1 + 0x00000000 + + + read-write + 0x00c8 + Read/write access to BASE0 register. + INTERP1_BASE0 + 0x00000000 + + + read-write + 0x00cc + Read/write access to BASE1 register. + INTERP1_BASE1 + 0x00000000 + + + read-write + 0x00d0 + Read/write access to BASE2 register. + INTERP1_BASE2 + 0x00000000 + + + read-only + 0x00d4 + Read LANE0 result, and simultaneously write lane results to both accumulators (POP). + INTERP1_POP_LANE0 + 0x00000000 + + + read-only + 0x00d8 + Read LANE1 result, and simultaneously write lane results to both accumulators (POP). + INTERP1_POP_LANE1 + 0x00000000 + + + read-only + 0x00dc + Read FULL result, and simultaneously write lane results to both accumulators (POP). + INTERP1_POP_FULL + 0x00000000 + + + read-only + 0x00e0 + Read LANE0 result, without altering any internal state (PEEK). + INTERP1_PEEK_LANE0 + 0x00000000 + + + read-only + 0x00e4 + Read LANE1 result, without altering any internal state (PEEK). + INTERP1_PEEK_LANE1 + 0x00000000 + + + read-only + 0x00e8 + Read FULL result, without altering any internal state (PEEK). + INTERP1_PEEK_FULL + 0x00000000 + + + 0x00ec + Control register for lane 0 + + + read-only + [25:25] + Set if either OVERF0 or OVERF1 is set. + OVERF + + + read-only + [24:24] + Indicates if any masked-off MSBs in ACCUM1 are set. + OVERF1 + + + read-only + [23:23] + Indicates if any masked-off MSBs in ACCUM0 are set. + OVERF0 + + + read-write + [22:22] + Only present on INTERP1 on each core. If CLAMP mode is enabled:\n + - LANE0 result is shifted and masked ACCUM0, clamped by a lower bound of\n + BASE0 and an upper bound of BASE1.\n + - Signedness of these comparisons is determined by LANE0_CTRL_SIGNED + CLAMP + + + read-write + [20:19] + ORed into bits 29:28 of the lane result presented to the processor on the bus.\n + No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n + of pointers into flash or SRAM. + FORCE_MSB + + + read-write + [18:18] + If 1, mask + shift is bypassed for LANE0 result. This does not affect FULL result. + ADD_RAW + + + read-write + [17:17] + If 1, feed the opposite lane's result into this lane's accumulator on POP. + CROSS_RESULT + + + read-write + [16:16] + If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n + Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) + CROSS_INPUT + + + read-write + [15:15] + If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n + before adding to BASE0, and LANE0 PEEK/POP appear extended to 32 bits when read by processor. + SIGNED + + + read-write + [14:10] + The most-significant bit allowed to pass by the mask (inclusive)\n + Setting MSB < LSB may cause chip to turn inside-out + MASK_MSB + + + read-write + [9:5] + The least-significant bit allowed to pass by the mask (inclusive) + MASK_LSB + + + read-write + [4:0] + Logical right-shift applied to accumulator before masking + SHIFT + + + INTERP1_CTRL_LANE0 + 0x00000000 + + + 0x00f0 + Control register for lane 1 + + + read-write + [20:19] + ORed into bits 29:28 of the lane result presented to the processor on the bus.\n + No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence\n + of pointers into flash or SRAM. + FORCE_MSB + + + read-write + [18:18] + If 1, mask + shift is bypassed for LANE1 result. This does not affect FULL result. + ADD_RAW + + + read-write + [17:17] + If 1, feed the opposite lane's result into this lane's accumulator on POP. + CROSS_RESULT + + + read-write + [16:16] + If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware.\n + Takes effect even if ADD_RAW is set (the CROSS_INPUT mux is before the shift+mask bypass) + CROSS_INPUT + + + read-write + [15:15] + If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits\n + before adding to BASE1, and LANE1 PEEK/POP appear extended to 32 bits when read by processor. + SIGNED + + + read-write + [14:10] + The most-significant bit allowed to pass by the mask (inclusive)\n + Setting MSB < LSB may cause chip to turn inside-out + MASK_MSB + + + read-write + [9:5] + The least-significant bit allowed to pass by the mask (inclusive) + MASK_LSB + + + read-write + [4:0] + Logical right-shift applied to accumulator before masking + SHIFT + + + INTERP1_CTRL_LANE1 + 0x00000000 + + + 0x00f4 + Values written here are atomically added to ACCUM0\n + Reading yields lane 0's raw shift and mask value (BASE0 not added). + + + read-write + [23:0] + INTERP1_ACCUM0_ADD + + + INTERP1_ACCUM0_ADD + 0x00000000 + + + 0x00f8 + Values written here are atomically added to ACCUM1\n + Reading yields lane 1's raw shift and mask value (BASE1 not added). + + + read-write + [23:0] + INTERP1_ACCUM1_ADD + + + INTERP1_ACCUM1_ADD + 0x00000000 + + + read-write + 0x00fc + On write, the lower 16 bits go to BASE0, upper bits to BASE1 simultaneously.\n + Each half is sign-extended to 32 bits if that lane's SIGNED flag is set. + INTERP1_BASE_1AND0 + 0x00000000 + + + read-only + 0x0100 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK0 + 0x00000000 + + + read-only + 0x0104 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK1 + 0x00000000 + + + read-only + 0x0108 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK2 + 0x00000000 + + + read-only + 0x010c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK3 + 0x00000000 + + + read-only + 0x0110 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK4 + 0x00000000 + + + read-only + 0x0114 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK5 + 0x00000000 + + + read-only + 0x0118 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK6 + 0x00000000 + + + read-only + 0x011c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK7 + 0x00000000 + + + read-only + 0x0120 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK8 + 0x00000000 + + + read-only + 0x0124 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK9 + 0x00000000 + + + read-only + 0x0128 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK10 + 0x00000000 + + + read-only + 0x012c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK11 + 0x00000000 + + + read-only + 0x0130 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK12 + 0x00000000 + + + read-only + 0x0134 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK13 + 0x00000000 + + + read-only + 0x0138 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK14 + 0x00000000 + + + read-only + 0x013c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK15 + 0x00000000 + + + read-only + 0x0140 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK16 + 0x00000000 + + + read-only + 0x0144 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK17 + 0x00000000 + + + read-only + 0x0148 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK18 + 0x00000000 + + + read-only + 0x014c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK19 + 0x00000000 + + + read-only + 0x0150 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK20 + 0x00000000 + + + read-only + 0x0154 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK21 + 0x00000000 + + + read-only + 0x0158 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK22 + 0x00000000 + + + read-only + 0x015c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK23 + 0x00000000 + + + read-only + 0x0160 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK24 + 0x00000000 + + + read-only + 0x0164 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK25 + 0x00000000 + + + read-only + 0x0168 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK26 + 0x00000000 + + + read-only + 0x016c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK27 + 0x00000000 + + + read-only + 0x0170 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK28 + 0x00000000 + + + read-only + 0x0174 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK29 + 0x00000000 + + + read-only + 0x0178 + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK30 + 0x00000000 + + + read-only + 0x017c + Reading from a spinlock address will:\n + - Return 0 if lock is already locked\n + - Otherwise return nonzero, and simultaneously claim the lock\n\n + Writing (any value) releases the lock.\n + If core 0 and core 1 attempt to claim the same lock simultaneously, core 0 wins.\n + The value returned on success is 0x1 << lock number. + SPINLOCK31 + 0x00000000 + + + 32 + 1 + + + + 0 + 0x10000 + registers + + 0xe0000000 + PPB + + + 0xe010 + Use the SysTick Control and Status Register to enable the SysTick features. + + + read-only + [16:16] + Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger. + COUNTFLAG + + + read-write + [2:2] + SysTick clock source. Always reads as one if SYST_CALIB reports NOREF.\n + Selects the SysTick timer clock source:\n + 0 = External reference clock.\n + 1 = Processor clock. + CLKSOURCE + + + read-write + [1:1] + Enables SysTick exception request:\n + 0 = Counting down to zero does not assert the SysTick exception request.\n + 1 = Counting down to zero to asserts the SysTick exception request. + TICKINT + + + read-write + [0:0] + Enable SysTick counter:\n + 0 = Counter disabled.\n + 1 = Counter enabled. + ENABLE + + + SYST_CSR + 0x00000000 + + + 0xe014 + Use the SysTick Reload Value Register to specify the start value to load into the current value register when the counter reaches 0. It can be any value between 0 and 0x00FFFFFF. A start value of 0 is possible, but has no effect because the SysTick interrupt and COUNTFLAG are activated when counting from 1 to 0. The reset value of this register is UNKNOWN.\n + To generate a multi-shot timer with a period of N processor clock cycles, use a RELOAD value of N-1. For example, if the SysTick interrupt is required every 100 clock pulses, set RELOAD to 99. + + + read-write + [23:0] + Value to load into the SysTick Current Value Register when the counter reaches 0. + RELOAD + + + SYST_RVR + 0x00000000 + + + 0xe018 + Use the SysTick Current Value Register to find the current value in the register. The reset value of this register is UNKNOWN. + + + read-write + [23:0] + Reads return the current value of the SysTick counter. This register is write-clear. Writing to it with any value clears the register to 0. Clearing this register also clears the COUNTFLAG bit of the SysTick Control and Status Register. + CURRENT + + + SYST_CVR + 0x00000000 + + + 0xe01c + Use the SysTick Calibration Value Register to enable software to scale to any required speed using divide and multiply. + + + read-only + [31:31] + If reads as 1, the Reference clock is not provided - the CLKSOURCE bit of the SysTick Control and Status register will be forced to 1 and cannot be cleared to 0. + NOREF + + + read-only + [30:30] + If reads as 1, the calibration value for 10ms is inexact (due to clock frequency). + SKEW + + + read-only + [23:0] + An optional Reload value to be used for 10ms (100Hz) timing, subject to system clock skew errors. If the value reads as 0, the calibration value is not known. + TENMS + + + SYST_CALIB + 0x00000000 + + + 0xe100 + Use the Interrupt Set-Enable Register to enable interrupts and determine which interrupts are currently enabled.\n + If a pending interrupt is enabled, the NVIC activates the interrupt based on its priority. If an interrupt is not enabled, asserting its interrupt signal changes the interrupt state to pending, but the NVIC never activates the interrupt, regardless of its priority. + + + read-write + [31:0] + Interrupt set-enable bits.\n + Write:\n + 0 = No effect.\n + 1 = Enable interrupt.\n + Read:\n + 0 = Interrupt disabled.\n + 1 = Interrupt enabled. + SETENA + + + NVIC_ISER + 0x00000000 + + + 0xe180 + Use the Interrupt Clear-Enable Registers to disable interrupts and determine which interrupts are currently enabled. + + + read-write + [31:0] + Interrupt clear-enable bits.\n + Write:\n + 0 = No effect.\n + 1 = Disable interrupt.\n + Read:\n + 0 = Interrupt disabled.\n + 1 = Interrupt enabled. + CLRENA + + + NVIC_ICER + 0x00000000 + + + 0xe200 + The NVIC_ISPR forces interrupts into the pending state, and shows which interrupts are pending. + + + read-write + [31:0] + Interrupt set-pending bits.\n + Write:\n + 0 = No effect.\n + 1 = Changes interrupt state to pending.\n + Read:\n + 0 = Interrupt is not pending.\n + 1 = Interrupt is pending.\n + Note: Writing 1 to the NVIC_ISPR bit corresponding to:\n + An interrupt that is pending has no effect.\n + A disabled interrupt sets the state of that interrupt to pending. + SETPEND + + + NVIC_ISPR + 0x00000000 + + + 0xe280 + Use the Interrupt Clear-Pending Register to clear pending interrupts and determine which interrupts are currently pending. + + + read-write + [31:0] + Interrupt clear-pending bits.\n + Write:\n + 0 = No effect.\n + 1 = Removes pending state and interrupt.\n + Read:\n + 0 = Interrupt is not pending.\n + 1 = Interrupt is pending. + CLRPEND + + + NVIC_ICPR + 0x00000000 + + + 0xe400 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.\n + Note: Writing 1 to an NVIC_ICPR bit does not affect the active state of the corresponding interrupt.\n + These registers are only word-accessible + + + read-write + [31:30] + Priority of interrupt 3 + IP_3 + + + read-write + [23:22] + Priority of interrupt 2 + IP_2 + + + read-write + [15:14] + Priority of interrupt 1 + IP_1 + + + read-write + [7:6] + Priority of interrupt 0 + IP_0 + + + NVIC_IPR0 + 0x00000000 + + + 0xe404 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 7 + IP_7 + + + read-write + [23:22] + Priority of interrupt 6 + IP_6 + + + read-write + [15:14] + Priority of interrupt 5 + IP_5 + + + read-write + [7:6] + Priority of interrupt 4 + IP_4 + + + NVIC_IPR1 + 0x00000000 + + + 0xe408 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 11 + IP_11 + + + read-write + [23:22] + Priority of interrupt 10 + IP_10 + + + read-write + [15:14] + Priority of interrupt 9 + IP_9 + + + read-write + [7:6] + Priority of interrupt 8 + IP_8 + + + NVIC_IPR2 + 0x00000000 + + + 0xe40c + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 15 + IP_15 + + + read-write + [23:22] + Priority of interrupt 14 + IP_14 + + + read-write + [15:14] + Priority of interrupt 13 + IP_13 + + + read-write + [7:6] + Priority of interrupt 12 + IP_12 + + + NVIC_IPR3 + 0x00000000 + + + 0xe410 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 19 + IP_19 + + + read-write + [23:22] + Priority of interrupt 18 + IP_18 + + + read-write + [15:14] + Priority of interrupt 17 + IP_17 + + + read-write + [7:6] + Priority of interrupt 16 + IP_16 + + + NVIC_IPR4 + 0x00000000 + + + 0xe414 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 23 + IP_23 + + + read-write + [23:22] + Priority of interrupt 22 + IP_22 + + + read-write + [15:14] + Priority of interrupt 21 + IP_21 + + + read-write + [7:6] + Priority of interrupt 20 + IP_20 + + + NVIC_IPR5 + 0x00000000 + + + 0xe418 + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 27 + IP_27 + + + read-write + [23:22] + Priority of interrupt 26 + IP_26 + + + read-write + [15:14] + Priority of interrupt 25 + IP_25 + + + read-write + [7:6] + Priority of interrupt 24 + IP_24 + + + NVIC_IPR6 + 0x00000000 + + + 0xe41c + Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest. + + + read-write + [31:30] + Priority of interrupt 31 + IP_31 + + + read-write + [23:22] + Priority of interrupt 30 + IP_30 + + + read-write + [15:14] + Priority of interrupt 29 + IP_29 + + + read-write + [7:6] + Priority of interrupt 28 + IP_28 + + + NVIC_IPR7 + 0x00000000 + + + 0xed00 + Read the CPU ID Base Register to determine: the ID number of the processor core, the version number of the processor core, the implementation details of the processor core. + + + read-only + [31:24] + Implementor code: 0x41 = ARM + IMPLEMENTER + + + read-only + [23:20] + Major revision number n in the rnpm revision status:\n + 0x0 = Revision 0. + VARIANT + + + read-only + [19:16] + Constant that defines the architecture of the processor:\n + 0xC = ARMv6-M architecture. + ARCHITECTURE + + + read-only + [15:4] + Number of processor within family: 0xC60 = Cortex-M0+ + PARTNO + + + read-only + [3:0] + Minor revision number m in the rnpm revision status:\n + 0x1 = Patch 1. + REVISION + + + CPUID + 0x410cc601 + + + 0xed04 + Use the Interrupt Control State Register to set a pending Non-Maskable Interrupt (NMI), set or clear a pending PendSV, set or clear a pending SysTick, check for pending exceptions, check the vector number of the highest priority pended exception, check the vector number of the active exception. + + + read-write + [31:31] + Setting this bit will activate an NMI. Since NMI is the highest priority exception, it will activate as soon as it is registered.\n + NMI set-pending bit.\n + Write:\n + 0 = No effect.\n + 1 = Changes NMI exception state to pending.\n + Read:\n + 0 = NMI exception is not pending.\n + 1 = NMI exception is pending.\n + Because NMI is the highest-priority exception, normally the processor enters the NMI\n + exception handler as soon as it detects a write of 1 to this bit. Entering the handler then clears\n + this bit to 0. This means a read of this bit by the NMI exception handler returns 1 only if the\n + NMI signal is reasserted while the processor is executing that handler. + NMIPENDSET + + + read-write + [28:28] + PendSV set-pending bit.\n + Write:\n + 0 = No effect.\n + 1 = Changes PendSV exception state to pending.\n + Read:\n + 0 = PendSV exception is not pending.\n + 1 = PendSV exception is pending.\n + Writing 1 to this bit is the only way to set the PendSV exception state to pending. + PENDSVSET + + + read-write + [27:27] + PendSV clear-pending bit.\n + Write:\n + 0 = No effect.\n + 1 = Removes the pending state from the PendSV exception. + PENDSVCLR + + + read-write + [26:26] + SysTick exception set-pending bit.\n + Write:\n + 0 = No effect.\n + 1 = Changes SysTick exception state to pending.\n + Read:\n + 0 = SysTick exception is not pending.\n + 1 = SysTick exception is pending. + PENDSTSET + + + read-write + [25:25] + SysTick exception clear-pending bit.\n + Write:\n + 0 = No effect.\n + 1 = Removes the pending state from the SysTick exception.\n + This bit is WO. On a register read its value is Unknown. + PENDSTCLR + + + read-only + [23:23] + The system can only access this bit when the core is halted. It indicates that a pending interrupt is to be taken in the next running cycle. If C_MASKINTS is clear in the Debug Halting Control and Status Register, the interrupt is serviced. + ISRPREEMPT + + + read-only + [22:22] + External interrupt pending flag + ISRPENDING + + + read-only + [20:12] + Indicates the exception number for the highest priority pending exception: 0 = no pending exceptions. Non zero = The pending state includes the effect of memory-mapped enable and mask registers. It does not include the PRIMASK special-purpose register qualifier. + VECTPENDING + + + read-only + [8:0] + Active exception number field. Reset clears the VECTACTIVE field. + VECTACTIVE + + + ICSR + 0x00000000 + + + 0xed08 + The VTOR holds the vector table offset address. + + + read-write + [31:8] + Bits [31:8] of the indicate the vector table offset address. + TBLOFF + + + VTOR + 0x00000000 + + + 0xed0c + Use the Application Interrupt and Reset Control Register to: determine data endianness, clear all active state information from debug halt mode, request a system reset. + + + read-write + [31:16] + Register key:\n + Reads as Unknown\n + On writes, write 0x05FA to VECTKEY, otherwise the write is ignored. + VECTKEY + + + read-only + [15:15] + Data endianness implemented:\n + 0 = Little-endian. + ENDIANESS + + + read-write + [2:2] + Writing 1 to this bit causes the SYSRESETREQ signal to the outer system to be asserted to request a reset. The intention is to force a large system reset of all major components except for debug. The C_HALT bit in the DHCSR is cleared as a result of the system reset requested. The debugger does not lose contact with the device. + SYSRESETREQ + + + read-write + [1:1] + Clears all active state information for fixed and configurable exceptions. This bit: is self-clearing, can only be set by the DAP when the core is halted. When set: clears all active exception status of the processor, forces a return to Thread mode, forces an IPSR of 0. A debugger must re-initialize the stack. + VECTCLRACTIVE + + + AIRCR + 0x00000000 + + + 0xed10 + System Control Register. Use the System Control Register for power-management functions: signal to the system when the processor can enter a low power state, control how the processor enters and exits low power states. + + + read-write + [4:4] + Send Event on Pending bit:\n + 0 = Only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded.\n + 1 = Enabled events and all interrupts, including disabled interrupts, can wakeup the processor.\n + When an event or interrupt becomes pending, the event signal wakes up the processor from WFE. If the\n + processor is not waiting for an event, the event is registered and affects the next WFE.\n + The processor also wakes up on execution of an SEV instruction or an external event. + SEVONPEND + + + read-write + [2:2] + Controls whether the processor uses sleep or deep sleep as its low power mode:\n + 0 = Sleep.\n + 1 = Deep sleep. + SLEEPDEEP + + + read-write + [1:1] + Indicates sleep-on-exit when returning from Handler mode to Thread mode:\n + 0 = Do not sleep when returning to Thread mode.\n + 1 = Enter sleep, or deep sleep, on return from an ISR to Thread mode.\n + Setting this bit to 1 enables an interrupt driven application to avoid returning to an empty main application. + SLEEPONEXIT + + + SCR + 0x00000000 + + + 0xed14 + The Configuration and Control Register permanently enables stack alignment and causes unaligned accesses to result in a Hard Fault. + + + read-only + [9:9] + Always reads as one, indicates 8-byte stack alignment on exception entry. On exception entry, the processor uses bit[9] of the stacked PSR to indicate the stack alignment. On return from the exception it uses this stacked bit to restore the correct stack alignment. + STKALIGN + + + read-only + [3:3] + Always reads as one, indicates that all unaligned accesses generate a HardFault. + UNALIGN_TRP + + + CCR + 0x00000000 + + + 0xed1c + System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 2 to set the priority of SVCall. + + + read-write + [31:30] + Priority of system handler 11, SVCall + PRI_11 + + + SHPR2 + 0x00000000 + + + 0xed20 + System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 3 to set the priority of PendSV and SysTick. + + + read-write + [31:30] + Priority of system handler 15, SysTick + PRI_15 + + + read-write + [23:22] + Priority of system handler 14, PendSV + PRI_14 + + + SHPR3 + 0x00000000 + + + 0xed24 + Use the System Handler Control and State Register to determine or clear the pending status of SVCall. + + + read-write + [15:15] + Reads as 1 if SVCall is Pending. Write 1 to set pending SVCall, write 0 to clear pending SVCall. + SVCALLPENDED + + + SHCSR + 0x00000000 + + + 0xed90 + Read the MPU Type Register to determine if the processor implements an MPU, and how many regions the MPU supports. + + + read-only + [23:16] + Instruction region. Reads as zero as ARMv6-M only supports a unified MPU. + IREGION + + + read-only + [15:8] + Number of regions supported by the MPU. + DREGION + + + read-only + [0:0] + Indicates support for separate instruction and data address maps. Reads as 0 as ARMv6-M only supports a unified MPU. + SEPARATE + + + MPU_TYPE + 0x00000800 + + + 0xed94 + Use the MPU Control Register to enable and disable the MPU, and to control whether the default memory map is enabled as a background region for privileged accesses, and whether the MPU is enabled for HardFaults and NMIs. + + + read-write + [2:2] + Controls whether the default memory map is enabled as a background region for privileged accesses. This bit is ignored when ENABLE is clear.\n + 0 = If the MPU is enabled, disables use of the default memory map. Any memory access to a location not\n + covered by any enabled region causes a fault.\n + 1 = If the MPU is enabled, enables use of the default memory map as a background region for privileged software accesses.\n + When enabled, the background region acts as if it is region number -1. Any region that is defined and enabled has priority over this default map. + PRIVDEFENA + + + read-write + [1:1] + Controls the use of the MPU for HardFaults and NMIs. Setting this bit when ENABLE is clear results in UNPREDICTABLE behaviour.\n + When the MPU is enabled:\n + 0 = MPU is disabled during HardFault and NMI handlers, regardless of the value of the ENABLE bit.\n + 1 = the MPU is enabled during HardFault and NMI handlers. + HFNMIENA + + + read-write + [0:0] + Enables the MPU. If the MPU is disabled, privileged and unprivileged accesses use the default memory map.\n + 0 = MPU disabled.\n + 1 = MPU enabled. + ENABLE + + + MPU_CTRL + 0x00000000 + + + 0xed98 + Use the MPU Region Number Register to select the region currently accessed by MPU_RBAR and MPU_RASR. + + + read-write + [3:0] + Indicates the MPU region referenced by the MPU_RBAR and MPU_RASR registers.\n + The MPU supports 8 memory regions, so the permitted values of this field are 0-7. + REGION + + + MPU_RNR + 0x00000000 + + + 0xed9c + Read the MPU Region Base Address Register to determine the base address of the region identified by MPU_RNR. Write to update the base address of said region or that of a specified region, with whose number MPU_RNR will also be updated. + + + read-write + [31:8] + Base address of the region. + ADDR + + + read-write + [4:4] + On writes, indicates whether the write must update the base address of the region identified by the REGION field, updating the MPU_RNR to indicate this new region.\n + Write:\n + 0 = MPU_RNR not changed, and the processor:\n + Updates the base address for the region specified in the MPU_RNR.\n + Ignores the value of the REGION field.\n + 1 = The processor:\n + Updates the value of the MPU_RNR to the value of the REGION field.\n + Updates the base address for the region specified in the REGION field.\n + Always reads as zero. + VALID + + + read-write + [3:0] + On writes, specifies the number of the region whose base address to update provided VALID is set written as 1. On reads, returns bits [3:0] of MPU_RNR. + REGION + + + MPU_RBAR + 0x00000000 + + + 0xeda0 + Use the MPU Region Attribute and Size Register to define the size, access behaviour and memory type of the region identified by MPU_RNR, and enable that region. + + + read-write + [31:16] + The MPU Region Attribute field. Use to define the region attribute control.\n + 28 = XN: Instruction access disable bit:\n + 0 = Instruction fetches enabled.\n + 1 = Instruction fetches disabled.\n + 26:24 = AP: Access permission field\n + 18 = S: Shareable bit\n + 17 = C: Cacheable bit\n + 16 = B: Bufferable bit + ATTRS + + + read-write + [15:8] + Subregion Disable. For regions of 256 bytes or larger, each bit of this field controls whether one of the eight equal subregions is enabled. + SRD + + + read-write + [5:1] + Indicates the region size. Region size in bytes = 2^(SIZE+1). The minimum permitted value is 7 (b00111) = 256Bytes + SIZE + + + read-write + [0:0] + Enables the region. + ENABLE + + + MPU_RASR + 0x00000000 + + + 32 + 1 + + + \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/CMakeLists.txt new file mode 100644 index 0000000000..9c39eef57e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(hardware_structs INTERFACE) +target_include_directories(hardware_structs INTERFACE include) +target_link_libraries(hardware_structs INTERFACE hardware_regs) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/adc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/adc.h new file mode 100644 index 0000000000..559b5f1772 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/adc.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _HARDWARE_STRUCTS_ADC_H +#define _HARDWARE_STRUCTS_ADC_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/adc.h" + +typedef struct { + io_rw_32 cs; + io_rw_32 result; + io_rw_32 fcs; + io_rw_32 fifo; + io_rw_32 div; + io_rw_32 intr; + io_rw_32 inte; + io_rw_32 intf; + io_rw_32 ints; +} adc_hw_t; + +check_hw_layout(adc_hw_t, ints, ADC_INTS_OFFSET); + +#define adc_hw ((adc_hw_t *const)ADC_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/bus_ctrl.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/bus_ctrl.h new file mode 100644 index 0000000000..ce95a7c198 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/bus_ctrl.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _HARDWARE_STRUCTS_BUS_CTRL_H +#define _HARDWARE_STRUCTS_BUS_CTRL_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/busctrl.h" + +enum bus_ctrl_perf_counter { + arbiter_rom_perf_event_access = 19, + arbiter_rom_perf_event_access_contested = 18, + arbiter_xip_main_perf_event_access = 17, + arbiter_xip_main_perf_event_access_contested = 16, + arbiter_sram0_perf_event_access = 15, + arbiter_sram0_perf_event_access_contested = 14, + arbiter_sram1_perf_event_access = 13, + arbiter_sram1_perf_event_access_contested = 12, + arbiter_sram2_perf_event_access = 11, + arbiter_sram2_perf_event_access_contested = 10, + arbiter_sram3_perf_event_access = 9, + arbiter_sram3_perf_event_access_contested = 8, + arbiter_sram4_perf_event_access = 7, + arbiter_sram4_perf_event_access_contested = 6, + arbiter_sram5_perf_event_access = 5, + arbiter_sram5_perf_event_access_contested = 4, + arbiter_fastperi_perf_event_access = 3, + arbiter_fastperi_perf_event_access_contested = 2, + arbiter_apb_perf_event_access = 1, + arbiter_apb_perf_event_access_contested = 0 +}; + +typedef struct { + io_rw_32 priority; + io_ro_32 priority_ack; + struct { + io_rw_32 value; + io_rw_32 sel; + } counter[4]; +} bus_ctrl_hw_t; + +check_hw_layout(bus_ctrl_hw_t, counter[0].value, BUSCTRL_PERFCTR0_OFFSET); + +#define bus_ctrl_hw ((bus_ctrl_hw_t *const)BUSCTRL_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/clocks.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/clocks.h new file mode 100644 index 0000000000..489876d169 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/clocks.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_CLOCKS_H +#define _HARDWARE_STRUCTS_CLOCKS_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/clocks.h" + +/*! \brief Enumeration identifying a hardware clock + * \ingroup hardware_clocks + */ +/// \tag::clkenum[] +enum clock_index { + clk_gpout0 = 0, ///< GPIO Muxing 0 + clk_gpout1, ///< GPIO Muxing 1 + clk_gpout2, ///< GPIO Muxing 2 + clk_gpout3, ///< GPIO Muxing 3 + clk_ref, ///< Watchdog and timers reference clock + clk_sys, ///< Processors, bus fabric, memory, memory mapped registers + clk_peri, ///< Peripheral clock for UART and SPI + clk_usb, ///< USB clock + clk_adc, ///< ADC clock + clk_rtc, ///< Real time clock + CLK_COUNT +}; +/// \end::clkenum[] + +/// \tag::clock_hw[] +typedef struct { + io_rw_32 ctrl; + io_rw_32 div; + io_rw_32 selected; +} clock_hw_t; +/// \end::clock_hw[] + +typedef struct { + io_rw_32 ref_khz; + io_rw_32 min_khz; + io_rw_32 max_khz; + io_rw_32 delay; + io_rw_32 interval; + io_rw_32 src; + io_ro_32 status; + io_ro_32 result; +} fc_hw_t; + +typedef struct { + clock_hw_t clk[CLK_COUNT]; + struct { + io_rw_32 ctrl; + io_rw_32 status; + } resus; + fc_hw_t fc0; + io_rw_32 wake_en0; + io_rw_32 wake_en1; + io_rw_32 sleep_en0; + io_rw_32 sleep_en1; + io_rw_32 enabled0; + io_rw_32 enabled1; + io_rw_32 intr; + io_rw_32 inte; + io_rw_32 intf; + io_rw_32 ints; +} clocks_hw_t; + +#define clocks_hw ((clocks_hw_t *const)CLOCKS_BASE) +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/dma.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/dma.h new file mode 100644 index 0000000000..f94f9a6083 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/dma.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_DMA_H +#define _HARDWARE_STRUCTS_DMA_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/dma.h" +#include "pico/assert.h" + + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_DMA, Enable/disable DMA assertions, type=bool, default=0, group=hardware_dma +#ifndef PARAM_ASSERTIONS_ENABLED_DMA +#define PARAM_ASSERTIONS_ENABLED_DMA 0 +#endif + +typedef struct { + io_rw_32 read_addr; + io_rw_32 write_addr; + io_rw_32 transfer_count; + io_rw_32 ctrl_trig; + io_rw_32 al1_ctrl; + io_rw_32 al1_read_addr; + io_rw_32 al1_write_addr; + io_rw_32 al1_transfer_count_trig; + io_rw_32 al2_ctrl; + io_rw_32 al2_transfer_count; + io_rw_32 al2_read_addr; + io_rw_32 al2_write_addr_trig; + io_rw_32 al3_ctrl; + io_rw_32 al3_write_addr; + io_rw_32 al3_transfer_count; + io_rw_32 al3_read_addr_trig; +} dma_channel_hw_t; + +typedef struct { + dma_channel_hw_t ch[NUM_DMA_CHANNELS]; + uint32_t _pad0[16 * (16 - NUM_DMA_CHANNELS)]; + io_ro_32 intr; + io_rw_32 inte0; + io_rw_32 intf0; + io_rw_32 ints0; + uint32_t _pad1[1]; + io_rw_32 inte1; + io_rw_32 intf1; + io_rw_32 ints1; + io_rw_32 timer[2]; + uint32_t _pad2[2]; + io_wo_32 multi_channel_trigger; + io_rw_32 sniff_ctrl; + io_rw_32 sniff_data; + uint32_t _pad3[1]; + io_ro_32 fifo_levels; + io_wo_32 abort; +} dma_hw_t; + +typedef struct { + struct dma_debug_hw_channel { + io_ro_32 ctrdeq; + io_ro_32 tcr; + uint32_t pad[14]; + } ch[NUM_DMA_CHANNELS]; +} dma_debug_hw_t; + +#define dma_hw ((dma_hw_t *const)DMA_BASE) +#define dma_debug_hw ((dma_debug_hw_t *const)(DMA_BASE + DMA_CH0_DBG_CTDREQ_OFFSET)) + +static inline void check_dma_channel_param(uint channel) { +#if PARAM_ASSERTIONS_ENABLED(DMA) + // this method is used a lot by inline functions so avoid code bloat by deferring to function + extern void check_dma_channel_param_impl(uint channel); + check_dma_channel_param_impl(channel); +#endif +} + +inline static dma_channel_hw_t *dma_channel_hw_addr(uint channel) { + check_dma_channel_param(channel); + return &dma_hw->ch[channel]; +} + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/i2c.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/i2c.h new file mode 100644 index 0000000000..4bc501f288 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/i2c.h @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_I2C_H +#define _HARDWARE_STRUCTS_I2C_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/i2c.h" + +typedef struct { + io_rw_32 con; + io_rw_32 tar; + io_rw_32 sar; + uint32_t _pad0; + io_rw_32 data_cmd; + io_rw_32 ss_scl_hcnt; + io_rw_32 ss_scl_lcnt; + io_rw_32 fs_scl_hcnt; + io_rw_32 fs_scl_lcnt; + uint32_t _pad1[2]; + io_rw_32 intr_stat; + io_rw_32 intr_mask; + io_rw_32 raw_intr_stat; + io_rw_32 rx_tl; + io_rw_32 tx_tl; + io_rw_32 clr_intr; + io_rw_32 clr_rx_under; + io_rw_32 clr_rx_over; + io_rw_32 clr_tx_over; + io_rw_32 clr_rd_req; + io_rw_32 clr_tx_abrt; + io_rw_32 clr_rx_done; + io_rw_32 clr_activity; + io_rw_32 clr_stop_det; + io_rw_32 clr_start_det; + io_rw_32 clr_gen_call; + io_rw_32 enable; + io_rw_32 status; + io_rw_32 txflr; + io_rw_32 rxflr; + io_rw_32 sda_hold; + io_rw_32 tx_abrt_source; + io_rw_32 slv_data_nack_only; + io_rw_32 dma_cr; + io_rw_32 dma_tdlr; + io_rw_32 dma_rdlr; + io_rw_32 sda_setup; + io_rw_32 ack_general_call; + io_rw_32 enable_status; + io_rw_32 fs_spklen; + uint32_t _pad2; + io_rw_32 clr_restart_det; +} i2c_hw_t; + +#define i2c0_hw ((i2c_hw_t *const)I2C0_BASE) +#define i2c1_hw ((i2c_hw_t *const)I2C1_BASE) + +// List of configuration constants for the Synopsys I2C hardware (you may see +// references to these in I2C register header; these are *fixed* values, +// set at hardware design time): + +// SLAVE_INTERFACE_TYPE .............. 0 +// REG_TIMEOUT_WIDTH ................. 4 +// REG_TIMEOUT_VALUE ................. 8 +// IC_ULTRA_FAST_MODE ................ 0x0 +// IC_UFM_TBUF_CNT_DEFAULT ........... 0x8 +// IC_UFM_SCL_HIGH_COUNT ............. 0x0006 +// IC_TX_TL .......................... 0x0 +// IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0 +// IC_SS_SCL_LOW_COUNT ............... 0x01d6 +// IC_HAS_DMA ........................ 0x1 +// IC_RX_FULL_GEN_NACK ............... 0x0 +// IC_CLOCK_PERIOD ................... 100 +// IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1 +// IC_SMBUS_ARP ...................... 0x0 +// IC_FIRST_DATA_BYTE_STATUS ......... 0x1 +// IC_INTR_IO ........................ 0x1 +// IC_MASTER_MODE .................... 0x1 +// IC_DEFAULT_ACK_GENERAL_CALL ....... 0x0 +// IC_INTR_POL ....................... 0x1 +// IC_OPTIONAL_SAR ................... 0x0 +// IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055 +// IC_DEFAULT_SLAVE_ADDR ............. 0x055 +// IC_DEFAULT_HS_SPKLEN .............. 0x1 +// IC_FS_SCL_HIGH_COUNT .............. 0x003c +// IC_HS_SCL_LOW_COUNT ............... 0x0010 +// IC_DEVICE_ID_VALUE ................ 0x0 +// IC_10BITADDR_MASTER ............... 0x0 +// IC_CLK_FREQ_OPTIMIZATION .......... 0x0 +// IC_DEFAULT_FS_SPKLEN .............. 0xf +// IC_ADD_ENCODED_PARAMS ............. 0x1 +// IC_DEFAULT_SDA_HOLD ............... 0x000001 +// IC_DEFAULT_SDA_SETUP .............. 0x64 +// IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0 +// SLVERR_RESP_EN .................... 0 +// IC_RESTART_EN ..................... 0x1 +// IC_TX_CMD_BLOCK ................... 0x1 +// HC_REG_TIMEOUT_VALUE .............. 0 +// IC_BUS_CLEAR_FEATURE .............. 0x1 +// IC_CAP_LOADING .................... 100 +// IC_HAS_ASYNC_FIFO ................. 0x0 +// IC_FS_SCL_LOW_COUNT ............... 0x0082 +// APB_DATA_WIDTH .................... 32 +// IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff +// IC_SLV_DATA_NACK_ONLY ............. 0x1 +// IC_10BITADDR_SLAVE ................ 0x0 +// IC_TX_BUFFER_DEPTH ................ 32 +// IC_DEFAULT_UFM_SPKLEN ............. 0x1 +// IC_CLK_TYPE ....................... 0x0 +// IC_TX_CMD_BLOCK_DEFAULT ........... 0x0 +// IC_SMBUS_UDID_MSB ................. 0x0 +// IC_SMBUS_SUSPEND_ALERT ............ 0x0 +// IC_HS_SCL_HIGH_COUNT .............. 0x0006 +// IC_SLV_RESTART_DET_EN ............. 0x1 +// IC_SMBUS .......................... 0x1 +// IC_STAT_FOR_CLK_STRETCH ........... 0x1 +// IC_MAX_SPEED_MODE ................. 0x2 +// IC_OPTIONAL_SAR_DEFAULT ........... 0x0 +// IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0 +// IC_USE_COUNTS ..................... 0x1 +// IC_RX_BUFFER_DEPTH ................ 32 +// IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff +// IC_RX_FULL_HLD_BUS_EN ............. 0x1 +// IC_SLAVE_DISABLE .................. 0x1 +// IC_RX_TL .......................... 0x0 +// IC_DEVICE_ID ...................... 0x0 +// IC_HC_COUNT_VALUES ................ 0x0 +// I2C_DYNAMIC_TAR_UPDATE ............ 1 +// IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff +// IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff +// IC_HS_MASTER_CODE ................. 0x1 +// IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff +// IC_UFM_SCL_LOW_COUNT .............. 0x0008 +// IC_SMBUS_UDID_HC .................. 0x1 +// IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff +// IC_SS_SCL_HIGH_COUNT .............. 0x0190 + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/interp.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/interp.h new file mode 100644 index 0000000000..683750733b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/interp.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_INTERP_H +#define _HARDWARE_STRUCTS_INTERP_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/sio.h" + +typedef struct { + io_rw_32 accum[2]; + io_rw_32 base[3]; + io_ro_32 pop[3]; + io_ro_32 peek[3]; + io_rw_32 ctrl[2]; + io_rw_32 add_raw[2]; + io_wo_32 base01; +} interp_hw_t; + +#define interp_hw_array ((interp_hw_t *)(SIO_BASE + SIO_INTERP0_ACCUM0_OFFSET)) +#define interp0_hw (&interp_hw_array[0]) +#define interp1_hw (&interp_hw_array[1]) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/iobank0.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/iobank0.h new file mode 100644 index 0000000000..b19800fa7d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/iobank0.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_IOBANK0_H +#define _HARDWARE_STRUCTS_IOBANK0_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/io_bank0.h" + +typedef struct { + io_rw_32 inte[4]; + io_rw_32 intf[4]; + io_rw_32 ints[4]; +} io_irq_ctrl_hw_t; + +/// \tag::iobank0_hw[] +typedef struct { + struct { + io_rw_32 status; + io_rw_32 ctrl; + } io[30]; + io_rw_32 intr[4]; + io_irq_ctrl_hw_t proc0_irq_ctrl; + io_irq_ctrl_hw_t proc1_irq_ctrl; + io_irq_ctrl_hw_t dormant_wake_irq_ctrl; +} iobank0_hw_t; +/// \end::iobank0_hw[] + +#define iobank0_hw ((iobank0_hw_t *const)IO_BANK0_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ioqspi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ioqspi.h new file mode 100644 index 0000000000..48d08a7c92 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ioqspi.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_IOQSPI_H +#define _HARDWARE_STRUCTS_IOQSPI_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/io_qspi.h" + +typedef struct { + struct { + io_rw_32 status; + io_rw_32 ctrl; + } io[6]; +} ioqspi_hw_t; + +#define ioqspi_hw ((ioqspi_hw_t *const)IO_QSPI_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/mpu.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/mpu.h new file mode 100644 index 0000000000..34e5c39e81 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/mpu.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_MPU_H +#define _HARDWARE_STRUCTS_MPU_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/m0plus.h" + +typedef struct { + io_ro_32 type; + io_rw_32 ctrl; + io_rw_32 rnr; + io_rw_32 rbar; + io_rw_32 rasr; +} mpu_hw_t; + +#define mpu_hw ((mpu_hw_t *const)(PPB_BASE + M0PLUS_MPU_TYPE_OFFSET)) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h new file mode 100644 index 0000000000..451d7ebc38 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pads_qspi.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_PADS_QSPI_H +#define _HARDWARE_STRUCTS_PADS_QSPI_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/pads_qspi.h" + +typedef struct { + io_rw_32 voltage_select; + io_rw_32 io[6]; +} pads_qspi_hw_t; + +#define pads_qspi_hw ((pads_qspi_hw_t *const)PADS_QSPI_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h new file mode 100644 index 0000000000..f56dc40115 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/padsbank0.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_PADSBANK0_H +#define _HARDWARE_STRUCTS_PADSBANK0_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/pads_bank0.h" + +typedef struct { + io_rw_32 voltage_select; + io_rw_32 io[30]; +} padsbank0_hw_t; + +#define padsbank0_hw ((padsbank0_hw_t *)PADS_BANK0_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pio.h new file mode 100644 index 0000000000..176863bb4d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pio.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_PIO_H +#define _HARDWARE_STRUCTS_PIO_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/pio.h" + +typedef struct { + io_rw_32 ctrl; + io_ro_32 fstat; + io_rw_32 fdebug; + io_ro_32 flevel; + io_wo_32 txf[NUM_PIO_STATE_MACHINES]; + io_ro_32 rxf[NUM_PIO_STATE_MACHINES]; + io_rw_32 irq; + io_wo_32 irq_force; + io_rw_32 input_sync_bypass; + io_rw_32 dbg_padout; + io_rw_32 dbg_padoe; + io_rw_32 dbg_cfginfo; + io_wo_32 instr_mem[32]; + struct pio_sm_hw { + io_rw_32 clkdiv; + io_rw_32 execctrl; + io_rw_32 shiftctrl; + io_ro_32 addr; + io_rw_32 instr; + io_rw_32 pinctrl; + } sm[NUM_PIO_STATE_MACHINES]; + io_rw_32 intr; + io_rw_32 inte0; + io_rw_32 intf0; + io_ro_32 ints0; + io_rw_32 inte1; + io_rw_32 intf1; + io_ro_32 ints1; +} pio_hw_t; + +#define pio0_hw ((pio_hw_t *const)PIO0_BASE) +#define pio1_hw ((pio_hw_t *const)PIO1_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pll.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pll.h new file mode 100644 index 0000000000..4d5b5b78cc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pll.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_PLL_H +#define _HARDWARE_STRUCTS_PLL_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/pll.h" + +/// \tag::pll_hw[] +typedef struct { + io_rw_32 cs; + io_rw_32 pwr; + io_rw_32 fbdiv_int; + io_rw_32 prim; +} pll_hw_t; + +#define pll_sys_hw ((pll_hw_t *const)PLL_SYS_BASE) +#define pll_usb_hw ((pll_hw_t *const)PLL_USB_BASE) +/// \end::pll_hw[] + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/psm.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/psm.h new file mode 100644 index 0000000000..cc9fb97e07 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/psm.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_PSM_H +#define _HARDWARE_STRUCTS_PSM_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/psm.h" + +typedef struct { + io_rw_32 frce_on; + io_rw_32 frce_off; + io_rw_32 wdsel; + io_rw_32 done; +} psm_hw_t; + +#define psm_hw ((psm_hw_t *const)PSM_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pwm.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pwm.h new file mode 100644 index 0000000000..5499561093 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/pwm.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_PWM_H +#define _HARDWARE_STRUCTS_PWM_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/pwm.h" + +typedef struct pwm_slice_hw { + io_rw_32 csr; + io_rw_32 div; + io_rw_32 ctr; + io_rw_32 cc; + io_rw_32 top; +} pwm_slice_hw_t; + +typedef struct { + pwm_slice_hw_t slice[NUM_PWM_SLICES]; + io_rw_32 en; + io_rw_32 intr; + io_rw_32 inte; + io_rw_32 intf; + io_rw_32 ints; +} pwm_hw_t; + +#define pwm_hw ((pwm_hw_t *const)PWM_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/resets.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/resets.h new file mode 100644 index 0000000000..a96ddebd7c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/resets.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _HARDWARE_STRUCTS_RESETS_H +#define _HARDWARE_STRUCTS_RESETS_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/resets.h" + +/// \tag::resets_hw[] +typedef struct { + io_rw_32 reset; + io_rw_32 wdsel; + io_rw_32 reset_done; +} resets_hw_t; + +#define resets_hw ((resets_hw_t *const)RESETS_BASE) +/// \end::resets_hw[] + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rosc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rosc.h new file mode 100644 index 0000000000..10543937cf --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rosc.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_ROSC_H +#define _HARDWARE_STRUCTS_ROSC_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/rosc.h" + +typedef struct { + io_rw_32 ctrl; + io_rw_32 freqa; + io_rw_32 freqb; + io_rw_32 dormant; + io_rw_32 div; + io_rw_32 phase; + io_rw_32 status; + io_rw_32 randombit; + io_rw_32 count; + io_rw_32 dftx; +} rosc_hw_t; + +#define rosc_hw ((rosc_hw_t *const)ROSC_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rtc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rtc.h new file mode 100644 index 0000000000..276bd7a242 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/rtc.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_RTC_H +#define _HARDWARE_STRUCTS_RTC_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/rtc.h" + +typedef struct { + io_rw_32 clkdiv_m1; + io_rw_32 setup_0; + io_rw_32 setup_1; + io_rw_32 ctrl; + io_rw_32 irq_setup_0; + io_rw_32 irq_setup_1; + io_rw_32 rtc_1; + io_rw_32 rtc_0; + io_rw_32 intr; + io_rw_32 inte; + io_rw_32 intf; + io_rw_32 ints; +} rtc_hw_t; + +#define rtc_hw ((rtc_hw_t *const)RTC_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/scb.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/scb.h new file mode 100644 index 0000000000..b48a872547 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/scb.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _HARDWARE_STRUCTS_SCB_H +#define _HARDWARE_STRUCTS_SCB_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/m0plus.h" + +// SCB == System Control Block +typedef struct { + io_ro_32 cpuid; + io_rw_32 icsr; + io_rw_32 vtor; + io_rw_32 aircr; + io_rw_32 scr; + // ... +} armv6m_scb_t; + +#define scb_hw ((armv6m_scb_t *const)(PPB_BASE + M0PLUS_CPUID_OFFSET)) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/sio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/sio.h new file mode 100644 index 0000000000..400083f81a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/sio.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_SIO_H +#define _HARDWARE_STRUCTS_SIO_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/sio.h" +#include "hardware/structs/interp.h" + +typedef struct { + io_ro_32 cpuid; + io_ro_32 gpio_in; + io_ro_32 gpio_hi_in; + uint32_t _pad; + + io_wo_32 gpio_out; + io_wo_32 gpio_set; + io_wo_32 gpio_clr; + io_wo_32 gpio_togl; + + io_wo_32 gpio_oe; + io_wo_32 gpio_oe_set; + io_wo_32 gpio_oe_clr; + io_wo_32 gpio_oe_togl; + + io_wo_32 gpio_hi_out; + io_wo_32 gpio_hi_set; + io_wo_32 gpio_hi_clr; + io_wo_32 gpio_hi_togl; + + io_wo_32 gpio_hi_oe; + io_wo_32 gpio_hi_oe_set; + io_wo_32 gpio_hi_oe_clr; + io_wo_32 gpio_hi_oe_togl; + + io_rw_32 fifo_st; + io_wo_32 fifo_wr; + io_ro_32 fifo_rd; + io_ro_32 spinlock_st; + + io_rw_32 div_udividend; + io_rw_32 div_udivisor; + io_rw_32 div_sdividend; + io_rw_32 div_sdivisor; + + io_rw_32 div_quotient; + io_rw_32 div_remainder; + io_rw_32 div_csr; + + uint32_t _pad2; + + interp_hw_t interp[2]; +} sio_hw_t; + +#define sio_hw ((sio_hw_t *)SIO_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/spi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/spi.h new file mode 100644 index 0000000000..5b3b2bab5d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/spi.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_SPI_H +#define _HARDWARE_STRUCTS_SPI_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/spi.h" + +typedef struct { + io_rw_32 cr0; + io_rw_32 cr1; + io_rw_32 dr; + io_rw_32 sr; + io_rw_32 cpsr; + io_rw_32 imsc; + io_rw_32 ris; + io_rw_32 mis; + io_rw_32 icr; + io_rw_32 dmacr; +} spi_hw_t; + +#define spi0_hw ((spi_hw_t *const)SPI0_BASE) +#define spi1_hw ((spi_hw_t *const)SPI1_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h new file mode 100644 index 0000000000..80779fe6ba --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/ssi.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_SSI_H +#define _HARDWARE_STRUCTS_SSI_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/ssi.h" + +typedef struct { + io_rw_32 ctrlr0; + io_rw_32 ctrlr1; + io_rw_32 ssienr; + io_rw_32 mwcr; + io_rw_32 ser; + io_rw_32 baudr; + io_rw_32 txftlr; + io_rw_32 rxftlr; + io_rw_32 txflr; + io_rw_32 rxflr; + io_rw_32 sr; + io_rw_32 imr; + io_rw_32 isr; + io_rw_32 risr; + io_rw_32 txoicr; + io_rw_32 rxoicr; + io_rw_32 rxuicr; + io_rw_32 msticr; + io_rw_32 icr; + io_rw_32 dmacr; + io_rw_32 dmatdlr; + io_rw_32 dmardlr; + io_rw_32 idr; + io_rw_32 ssi_version_id; + io_rw_32 dr0; + uint32_t _pad[(0xf0 - 0x60) / 4 - 1]; + io_rw_32 rx_sample_dly; + io_rw_32 spi_ctrlr0; + io_rw_32 txd_drive_edge; +} ssi_hw_t; + +#define ssi_hw ((ssi_hw_t *const)XIP_SSI_BASE) +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/syscfg.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/syscfg.h new file mode 100644 index 0000000000..0bfc7293c1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/syscfg.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_SYSCFG_H +#define _HARDWARE_STRUCTS_SYSCFG_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/syscfg.h" + +typedef struct { + io_rw_32 proc0_nmi_mask; + io_rw_32 proc1_nmi_mask; + io_rw_32 proc_config; + io_rw_32 proc_in_sync_bypass; + io_rw_32 proc_in_sync_bypass_hi; + io_rw_32 dbgforce; + io_rw_32 mempowerdown; +} syscfg_hw_t; + +#define syscfg_hw ((syscfg_hw_t *const)SYSCFG_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/systick.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/systick.h new file mode 100644 index 0000000000..0d87c479c2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/systick.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_SYSTICK_H +#define _HARDWARE_STRUCTS_SYSTICK_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/m0plus.h" + +typedef struct { + io_rw_32 csr; + io_rw_32 rvr; + io_ro_32 cvr; + io_ro_32 calib; +} systick_hw_t; + +#define mpu_hw ((systick_hw_t *const)(PPB_BASE + M0PLUS_SYST_CSR_OFFSET)) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/timer.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/timer.h new file mode 100644 index 0000000000..e051a06970 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/timer.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_TIMER_H +#define _HARDWARE_STRUCTS_TIMER_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/timer.h" + +#define NUM_TIMERS 4 + +typedef struct { + io_wo_32 timehw; + io_wo_32 timelw; + io_ro_32 timehr; + io_ro_32 timelr; + io_rw_32 alarm[NUM_TIMERS]; + io_rw_32 armed; + io_ro_32 timerawh; + io_ro_32 timerawl; + io_rw_32 dbgpause; + io_rw_32 pause; + io_rw_32 intr; + io_rw_32 inte; + io_rw_32 intf; + io_ro_32 ints; +} timer_hw_t; + +#define timer_hw ((timer_hw_t *const)TIMER_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/uart.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/uart.h new file mode 100644 index 0000000000..42fe8e88bf --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/uart.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_UART_H +#define _HARDWARE_STRUCTS_UART_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/uart.h" + +typedef struct { + io_rw_32 dr; + io_rw_32 rsr; + uint32_t _pad0[4]; + io_rw_32 fr; + uint32_t _pad1; + io_rw_32 ilpr; + io_rw_32 ibrd; + io_rw_32 fbrd; + io_rw_32 lcr_h; + io_rw_32 cr; + io_rw_32 ifls; + io_rw_32 imsc; + io_rw_32 ris; + io_rw_32 mis; + io_rw_32 icr; + io_rw_32 dmacr; +} uart_hw_t; + +#define uart0_hw ((uart_hw_t *const)UART0_BASE) +#define uart1_hw ((uart_hw_t *const)UART1_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/usb.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/usb.h new file mode 100644 index 0000000000..5c3c453399 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/usb.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_USB_H +#define _HARDWARE_STRUCTS_USB_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/usb.h" + +// 0-15 +#define USB_NUM_ENDPOINTS 16 + +// allow user to restrict number of endpoints available to save RAN +#ifndef USB_MAX_ENDPOINTS +#define USB_MAX_ENDPOINTS USB_NUM_ENDPOINTS +#endif + +// 1-15 +#define USB_HOST_INTERRUPT_ENDPOINTS (USB_NUM_ENDPOINTS - 1) + +// Endpoint buffer control bits +#define USB_BUF_CTRL_FULL 0x00008000u +#define USB_BUF_CTRL_LAST 0x00004000u +#define USB_BUF_CTRL_DATA0_PID 0x00000000u +#define USB_BUF_CTRL_DATA1_PID 0x00002000u +#define USB_BUF_CTRL_SEL 0x00001000u +#define USB_BUF_CTRL_STALL 0x00000800u +#define USB_BUF_CTRL_AVAIL 0x00000400u +#define USB_BUF_CTRL_LEN_MASK 0x000003FFu +#define USB_BUF_CTRL_LEN_LSB 0 + +// ep_inout_ctrl bits +#define EP_CTRL_ENABLE_BITS (1u << 31u) +#define EP_CTRL_DOUBLE_BUFFERED_BITS (1u << 30) +#define EP_CTRL_INTERRUPT_PER_BUFFER (1u << 29) +#define EP_CTRL_INTERRUPT_PER_DOUBLE_BUFFER (1u << 28) +#define EP_CTRL_INTERRUPT_ON_NAK (1u << 16) +#define EP_CTRL_INTERRUPT_ON_STALL (1u << 17) +#define EP_CTRL_BUFFER_TYPE_LSB 26 +#define EP_CTRL_HOST_INTERRUPT_INTERVAL_LSB 16 + +#define USB_DPRAM_SIZE 4096 + +// PICO_CONFIG: USB_DPRAM_MAX, Set amount of USB RAM used by USB system, min=0, max=4096, default=4096, group=hardware_usb +// Allow user to claim some of the USB RAM for themselves +#ifndef USB_DPRAM_MAX +#define USB_DPRAM_MAX USB_DPRAM_SIZE +#endif + +// Define maximum packet sizes +#define USB_MAX_ISO_PACKET_SIZE 1023 +#define USB_MAX_PACKET_SIZE 64 + +typedef struct { + // 4K of DPSRAM at beginning. Note this supports 8, 16, and 32 bit accesses + volatile uint8_t setup_packet[8]; // First 8 bytes are always for setup packets + + // Starts at ep1 + struct usb_device_dpram_ep_ctrl { + io_rw_32 in; + io_rw_32 out; + } ep_ctrl[USB_NUM_ENDPOINTS - 1]; + + // Starts at ep0 + struct usb_device_dpram_ep_buf_ctrl { + io_rw_32 in; + io_rw_32 out; + } ep_buf_ctrl[USB_NUM_ENDPOINTS]; + + // EP0 buffers are fixed. Assumes single buffered mode for EP0 + uint8_t ep0_buf_a[0x40]; + uint8_t ep0_buf_b[0x40]; + + // Rest of DPRAM can be carved up as needed + uint8_t epx_data[USB_DPRAM_MAX - 0x180]; +} usb_device_dpram_t; + +static_assert(sizeof(usb_device_dpram_t) == USB_DPRAM_MAX, ""); + +typedef struct { + // 4K of DPSRAM at beginning. Note this supports 8, 16, and 32 bit accesses + volatile uint8_t setup_packet[8]; // First 8 bytes are always for setup packets + + // Interrupt endpoint control 1 -> 15 + struct usb_host_dpram_ep_ctrl { + io_rw_32 ctrl; + io_rw_32 spare; + } int_ep_ctrl[USB_HOST_INTERRUPT_ENDPOINTS]; + + io_rw_32 epx_buf_ctrl; + io_rw_32 _spare0; + + // Interrupt endpoint buffer control + struct usb_host_dpram_ep_buf_ctrl { + io_rw_32 ctrl; + io_rw_32 spare; + } int_ep_buffer_ctrl[USB_HOST_INTERRUPT_ENDPOINTS]; + + io_rw_32 epx_ctrl; + + uint8_t _spare1[124]; + + // Should start at 0x180 + uint8_t epx_data[USB_DPRAM_MAX - 0x180]; +} usb_host_dpram_t; + +static_assert(sizeof(usb_host_dpram_t) == USB_DPRAM_MAX, ""); + +typedef struct { + io_rw_32 dev_addr_ctrl; + io_rw_32 int_ep_addr_ctrl[USB_HOST_INTERRUPT_ENDPOINTS]; + io_rw_32 main_ctrl; + io_rw_32 sof_rw; + io_ro_32 sof_rd; + io_rw_32 sie_ctrl; + io_rw_32 sie_status; + io_rw_32 int_ep_ctrl; + io_rw_32 buf_status; + io_rw_32 buf_cpu_should_handle; // for double buff + io_rw_32 abort; + io_rw_32 abort_done; + io_rw_32 ep_stall_arm; + io_rw_32 nak_poll; + io_rw_32 ep_nak_stall_status; + io_rw_32 muxing; + io_rw_32 pwr; + io_rw_32 phy_direct; + io_rw_32 phy_direct_override; + io_rw_32 phy_trim; + io_rw_32 linestate_tuning; + io_rw_32 intr; + io_rw_32 inte; + io_rw_32 intf; + io_rw_32 ints; +} usb_hw_t; + +check_hw_layout(usb_hw_t, ints, USB_INTS_OFFSET); + +#define usb_hw ((usb_hw_t *)USBCTRL_REGS_BASE) + +#define usb_dpram ((usb_device_dpram_t *)USBCTRL_DPRAM_BASE) +#define usbh_dpram ((usb_host_dpram_t *)USBCTRL_DPRAM_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/vreg_and_chip_reset.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/vreg_and_chip_reset.h new file mode 100644 index 0000000000..9956d68315 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/vreg_and_chip_reset.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_VREG_AND_CHIP_RESET_H +#define _HARDWARE_STRUCTS_VREG_AND_CHIP_RESET_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/vreg_and_chip_reset.h" + +typedef struct { + io_rw_32 vreg; + io_rw_32 bod; + io_rw_32 chip_reset; +} vreg_and_chip_reset_hw_t; + +#define vreg_and_chip_reset_hw ((vreg_and_chip_reset_hw_t *const)VREG_AND_CHIP_RESET_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h new file mode 100644 index 0000000000..2cf05f19d1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/watchdog.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_WATCHDOG_H +#define _HARDWARE_STRUCTS_WATCHDOG_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/watchdog.h" + +typedef struct { + io_rw_32 ctrl; + io_wo_32 load; + io_ro_32 reason; + io_rw_32 scratch[8]; + io_rw_32 tick; +} watchdog_hw_t; + +#define watchdog_hw ((watchdog_hw_t *const)WATCHDOG_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xip_ctrl.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xip_ctrl.h new file mode 100644 index 0000000000..bfa5b1c0cb --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xip_ctrl.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef _HARDWARE_STRUCTS_XIP_CTRL_H +#define _HARDWARE_STRUCTS_XIP_CTRL_H + +#include "hardware/address_mapped.h" +#include "hardware/regs/xip.h" + +typedef struct { + io_rw_32 ctrl; + io_rw_32 flush; + io_rw_32 stat; + io_rw_32 ctr_hit; + io_rw_32 ctr_acc; + io_rw_32 stream_addr; + io_rw_32 stream_ctr; + io_rw_32 stream_fifo; +} xip_ctrl_hw_t; + +#define XIP_STAT_FIFO_FULL 0x4u +#define XIP_STAT_FIFO_EMPTY 0x2u +#define XIP_STAT_FLUSH_RDY 0x1u + +#define xip_ctrl_hw ((xip_ctrl_hw_t *const)XIP_CTRL_BASE) + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xosc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xosc.h new file mode 100644 index 0000000000..698e6a2ff2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2040/hardware_structs/include/hardware/structs/xosc.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_STRUCTS_XOSC_H +#define _HARDWARE_STRUCTS_XOSC_H + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/xosc.h" + +/// \tag::xosc_hw[] +typedef struct { + io_rw_32 ctrl; + io_rw_32 status; + io_rw_32 dormant; + io_rw_32 startup; + io_rw_32 _reserved[3]; + io_rw_32 count; +} xosc_hw_t; + +#define xosc_hw ((xosc_hw_t *const)XOSC_BASE) +/// \end::xosc_hw[] + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common.cmake b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common.cmake new file mode 100644 index 0000000000..76126602fe --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common.cmake @@ -0,0 +1,59 @@ +# include targets for all for PICO on device + +enable_language(ASM) + +function(pico_add_hex_output TARGET) + add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${TARGET}${CMAKE_EXECUTABLE_SUFFIX} ${TARGET}.hex) +endfunction() + +function(pico_add_bin_output TARGET) + add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${TARGET}${CMAKE_EXECUTABLE_SUFFIX} ${TARGET}.bin) +endfunction() + +function(pico_add_dis_output TARGET) + add_custom_command(TARGET ${TARGET} POST_BUILD + COMMAND ${CMAKE_OBJDUMP} -h ${TARGET}${CMAKE_EXECUTABLE_SUFFIX} >${TARGET}.dis + COMMAND ${CMAKE_OBJDUMP} -d ${TARGET}${CMAKE_EXECUTABLE_SUFFIX} >>${TARGET}.dis + ) +endfunction() + +function(pico_add_extra_outputs TARGET) + pico_add_hex_output(${TARGET}) + pico_add_bin_output(${TARGET}) + pico_add_dis_output(${TARGET}) + + # PICO_CMAKE_CONFIG: PICO_NO_TARGET_NAME, Don't defined PICO_TARGET_NAME, type=bool, default=0, group=build + # PICO_BUILD_DEFINE: PICO_TARGET_NAME, The name of the build target being compiled (unless PICO_NO_TARGET_NAME set in build), type=string, default=target name, group=build + if (NOT PICO_NO_TARGET_NAME) + target_compile_definitions(${TARGET} PRIVATE + PICO_TARGET_NAME="${TARGET}" + ) + endif() + + if (PICO_SYMLINK_ELF_AS_FILENAME) + add_custom_target(${TARGET}_symlinked) + add_dependencies(${TARGET}_symlinked ${TARGET}) + + add_custom_command(TARGET ${TARGET}_symlinked POST_BUILD + COMMAND rm -f "${PICO_SYMLINK_ELF_AS_FILENAME}" + COMMAND ln -s -r ${TARGET}${CMAKE_EXECUTABLE_SUFFIX} "${PICO_SYMLINK_ELF_AS_FILENAME}" + COMMENT "Symlinking from ${PICO_SYMLINK_ELF_AS_FILENAME} to ${TARGET}${CMAKE_EXECUTABLE_SUFFIX}" + ) + endif () + # PICO_CMAKE_CONFIG: PICO_NO_UF2, Disable UF2 output, type=bool, default=0, group=build + if (NOT PICO_NO_UF2) + pico_add_uf2_output(${TARGET}) + endif() +endfunction() + +add_subdirectory(common) +add_subdirectory(rp2_common) + +# PICO_CMAKE_CONFIG: PICO_NO_HARDWARE, OPTION: Whether the build is not targeting an RP2040 device, type=bool, default=1 for PICO_PLATFORM=host 0 otherwise, group=build +# PICO_BUILD_DEFINE: PICO_NO_HARDWARE, Whether the build is not targeting an RP2040 device, type=bool, default=1 for PICO_PLATFORM=host 0 otherwise, group=build +set(PICO_NO_HARDWARE "0" CACHE INTERNAL "") +# PICO_CMAKE_CONFIG: PICO_ON_DEVICE, OPTION: Whether the build is targeting an RP2040 device, type=bool, default=0 for PICO_PLATFORM=host 1 otherwise, group=build +# PICO_BUILD_DEFIN: PICO_ON_DEVICE, Whether the build is targeting an RP2040 device, type=bool, default=0 for PICO_PLATFORM=host 1 otherwise, group=build +set(PICO_ON_DEVICE "1" CACHE INTERNAL "") + +set(CMAKE_EXECUTABLE_SUFFIX .elf PARENT_SCOPE) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/CMakeLists.txt new file mode 100644 index 0000000000..b8645680a5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/CMakeLists.txt @@ -0,0 +1,70 @@ +option(PICO_NO_FLASH "Default binaries to not not use flash") +option(PICO_COPY_TO_RAM "Default binaries to Copy code to RAM when booting from flash") + +set(CMAKE_EXECUTABLE_SUFFIX .elf) + +pico_add_subdirectory(hardware_base) +pico_add_subdirectory(hardware_claim) +# HAL items which expose a public (inline) functions/macro API above the raw hardware +pico_add_subdirectory(hardware_adc) +pico_add_subdirectory(hardware_clocks) +pico_add_subdirectory(hardware_dma) +pico_add_subdirectory(hardware_divider) +pico_add_subdirectory(hardware_flash) +pico_add_subdirectory(hardware_gpio) +pico_add_subdirectory(hardware_i2c) +pico_add_subdirectory(hardware_interp) +pico_add_subdirectory(hardware_irq) +pico_add_subdirectory(hardware_pio) +pico_add_subdirectory(hardware_pll) +pico_add_subdirectory(hardware_pwm) +pico_add_subdirectory(hardware_resets) +pico_add_subdirectory(hardware_rtc) +pico_add_subdirectory(hardware_spi) +pico_add_subdirectory(hardware_sync) +pico_add_subdirectory(hardware_timer) +pico_add_subdirectory(hardware_uart) +pico_add_subdirectory(hardware_vreg) +pico_add_subdirectory(hardware_watchdog) +pico_add_subdirectory(hardware_xosc) + +# Helper functions to connect to data/functions in the bootrom +pico_add_subdirectory(pico_bootrom) +pico_add_subdirectory(pico_platform) + +if (NOT PICO_BARE_METAL) + # NOTE THE ORDERING HERE IS IMPORTANT AS SOME TARGETS CHECK ON EXISTENCE OF OTHER TARGETS + pico_add_subdirectory(boot_stage2) + + pico_add_subdirectory(pico_multicore) + + pico_add_subdirectory(pico_bit_ops) + pico_add_subdirectory(pico_divider) + pico_add_subdirectory(pico_double) + pico_add_subdirectory(pico_int64_ops) + pico_add_subdirectory(pico_float) + pico_add_subdirectory(pico_mem_ops) + pico_add_subdirectory(pico_malloc) + pico_add_subdirectory(pico_printf) + + pico_add_subdirectory(pico_stdio) + pico_add_subdirectory(pico_stdio_semihosting) + pico_add_subdirectory(pico_stdio_uart) + + pico_add_subdirectory(tinyusb) + pico_add_subdirectory(pico_stdio_usb) + + pico_add_subdirectory(pico_stdlib) + + pico_add_subdirectory(pico_cxx_options) + pico_add_subdirectory(pico_standard_link) + + pico_add_subdirectory(pico_fix) + + pico_add_subdirectory(pico_runtime) + +endif() + +set(CMAKE_EXECUTABLE_SUFFIX "${CMAKE_EXECUTABLE_SUFFIX}" PARENT_SCOPE) + +pico_add_doxygen(${CMAKE_CURRENT_LIST_DIR}) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/README.md b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/README.md new file mode 100644 index 0000000000..b89380100d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/README.md @@ -0,0 +1,8 @@ +This directory contains libraries specifically targeting the RP2040 or possible future related devices. It is selected when +`PICO_PLATFORM=rp2040` (the default) is specified for the build + +`hardware_` libraries exist for individual hardware components to provide a simple API +providing a thin abstraction hiding the details of accessing the hardware registers directly. + +`pico_` provides higher level functionality you might generally find in say an OS kernel, as well +as runtime support familiar to most C programmers. diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/CMakeLists.txt new file mode 100644 index 0000000000..1f6a29863d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/CMakeLists.txt @@ -0,0 +1,67 @@ +# PICO_CMAKE_CONFIG: PICO_DEFAULT_BOOT_STAGE2_FILE, Default stage2 file to use unless overridden by pico_set_boot_stage2 on the TARGET, type=bool, default=.../boot2_w25q080.S, group=build +if (NOT PICO_DEFAULT_BOOT_STAGE2_FILE) + set(PICO_DEFAULT_BOOT_STAGE2_FILE "${CMAKE_CURRENT_LIST_DIR}/boot2_w25q080.S") +endif() + +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_DEFAULT_BOOT_STAGE2_FILE}" CACHE STRING "boot_stage2 source file" FORCE) + +if (NOT EXISTS ${PICO_DEFAULT_BOOT_STAGE2_FILE}) + message(FATAL_ERROR "Specified boot_stage2 source '${PICO_BOOT_STAGE2_FILE}' does not exist.") +endif() + +# needed by function below +set(PICO_BOOT_STAGE2_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "") + +function(pico_define_boot_stage2 NAME SOURCES) + add_executable(${NAME} + ${SOURCES} + ) + + # todo bit of an abstraction failure - revisit for Clang support anyway + if (CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_options(${NAME} PRIVATE "-nostdlib") + else () + target_link_options(${NAME} PRIVATE "--specs=nosys.specs") + target_link_options(${NAME} PRIVATE "-nostartfiles") + endif () + + target_link_libraries(${NAME} hardware_regs) + target_link_options(${NAME} PRIVATE "LINKER:--script=${PICO_BOOT_STAGE2_DIR}/boot_stage2.ld") + set_target_properties(${NAME} PROPERTIES LINK_DEPENDS ${PICO_BOOT_STAGE2_DIR}/boot_stage2.ld) + + pico_add_dis_output(${NAME}) + pico_add_map_output(${NAME}) + + set(ORIGINAL_BIN ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.bin) + set(PADDED_CHECKSUMMED_ASM ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_padded_checksummed.S) + + add_custom_target(${NAME}_bin DEPENDS ${ORIGINAL_BIN}) + add_dependencies(${NAME}_bin ${NAME}) + + add_custom_command(OUTPUT ${ORIGINAL_BIN} COMMAND ${CMAKE_OBJCOPY} -Obinary $ ${ORIGINAL_BIN}) + + find_package (Python3 REQUIRED COMPONENTS Interpreter) + add_custom_command(OUTPUT ${PADDED_CHECKSUMMED_ASM} + COMMAND ${Python3_EXECUTABLE} ${PICO_BOOT_STAGE2_DIR}/pad_checksum -s 0xffffffff ${ORIGINAL_BIN} ${PADDED_CHECKSUMMED_ASM} + ) + + add_custom_target(${NAME}_padded_checksummed_asm DEPENDS ${PADDED_CHECKSUMMED_ASM}) + add_dependencies(${NAME}_padded_checksummed_asm ${NAME}_bin) + + add_library(${NAME}_library INTERFACE) + add_dependencies(${NAME}_library ${NAME}_padded_checksummed_asm) + # not strictly (or indeed actually) a link library, but this avoids dependency cycle + target_link_libraries(${NAME}_library INTERFACE ${PADDED_CHECKSUMMED_ASM}) +endfunction() + +macro(pico_set_boot_stage2 TARGET NAME) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_BOOT_STAGE2 "${NAME}") + else() + message(FATAL_ERROR "boot stage2 implementation must be set on executable not library") + endif() +endmacro() + +pico_define_boot_stage2(bs2_default ${PICO_DEFAULT_BOOT_STAGE2_FILE}) + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S new file mode 100644 index 0000000000..68d1ef2c41 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_generic_03h.S @@ -0,0 +1,152 @@ +// ---------------------------------------------------------------------------- +// Second stage boot code +// Copyright (c) 2019 Raspberry Pi (Trading) Ltd. +// +// Device: Anything which responds to 03h serial read command +// +// Details: * Configure SSI to translate each APB read into a 03h command +// * 8 command clocks, 24 address clocks and 32 data clocks +// * This enables you to boot from almost anything: you can pretty +// much solder a potato to your PCB, or a piece of cheese +// * The tradeoff is performance around 3x worse than QSPI XIP +// +// Building: * This code must be position-independent, and use stack only +// * The code will be padded to a size of 256 bytes, including a +// 4-byte checksum. Therefore code size cannot exceed 252 bytes. +// ---------------------------------------------------------------------------- + +#include "pico/asm_helper.S" +#include "hardware/regs/addressmap.h" +#include "ssi.h" + +// ---------------------------------------------------------------------------- +// Config section +// ---------------------------------------------------------------------------- +// It should be possible to support most flash devices by modifying this section + +// The serial flash interface will run at clk_sys/PICO_FLASH_SPI_CLKDIV. +// This must be a positive, even integer. +// The bootrom is very conservative with SPI frequency, but here we should be +// as aggressive as possible. +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 4 +#endif + +#define CMD_READ 0x03 + +// Value is number of address bits divided by 4 +#define ADDR_L 6 + +#define CTRLR0_XIP \ + (SSI_CTRLR0_SPI_FRF_VALUE_STD << SSI_CTRLR0_SPI_FRF_LSB) | /* Standard 1-bit SPI serial frames */ \ + (31 << SSI_CTRLR0_DFS_32_LSB) | /* 32 clocks per data frame */ \ + (SSI_CTRLR0_TMOD_VALUE_EEPROM_READ << SSI_CTRLR0_TMOD_LSB) /* Send instr + addr, receive data */ + +#define SPI_CTRLR0_XIP \ + (CMD_READ << SSI_SPI_CTRLR0_XIP_CMD_LSB) | /* Value of instruction prefix */ \ + (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Total number of address + mode bits */ \ + (2 << SSI_SPI_CTRLR0_INST_L_LSB) | /* 8 bit command prefix (field value is bits divided by 4) */ \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C1A << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) /* command and address both in serial format */ + +// ---------------------------------------------------------------------------- +// Start of 2nd Stage Boot Code +// ---------------------------------------------------------------------------- + +.cpu cortex-m0 +.thumb + +.section .text + +.global _stage2_boot +.type _stage2_boot,%function +.thumb_func +_stage2_boot: + push {lr} + + ldr r3, =XIP_SSI_BASE // Use as base address where possible + + // Disable SSI to allow further config + mov r1, #0 + str r1, [r3, #SSI_SSIENR_OFFSET] + + // Set baud rate + mov r1, #PICO_FLASH_SPI_CLKDIV + str r1, [r3, #SSI_BAUDR_OFFSET] + + ldr r1, =(CTRLR0_XIP) + str r1, [r3, #SSI_CTRLR0_OFFSET] + + ldr r1, =(SPI_CTRLR0_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) + str r1, [r0] + + // NDF=0 (single 32b read) + mov r1, #0x0 + str r1, [r3, #SSI_CTRLR1_OFFSET] + + // Re-enable SSI + mov r1, #1 + str r1, [r3, #SSI_SSIENR_OFFSET] + +// We are now in XIP mode. Any bus accesses to the XIP address window will be +// translated by the SSI into 03h read commands to the external flash (if cache is missed), +// and the data will be returned to the bus. + +soft_reset: + // Jump to exit point provided in lr. Bootrom will pass null, in which + // case we use default exit target at a 256 byte offset into XIP region + // (immediately after this second stage's flash location) + pop {r0} + cmp r0, #0 + bne 1f + ldr r0, =(XIP_BASE + 0x101) +1: + bx r0 + +// Common functions + +wait_ssi_ready: + push {r0, r1, lr} + + // Command is complete when there is nothing left to send + // (TX FIFO empty) and SSI is no longer busy (CSn deasserted) +1: + ldr r1, [r3, #SSI_SR_OFFSET] + mov r0, #SSI_SR_TFE_BITS + tst r1, r0 + beq 1b + mov r0, #SSI_SR_BUSY_BITS + tst r1, r0 + bne 1b + + pop {r0, r1, pc} + +#ifdef PROGRAM_STATUS_REG +// Pass status read cmd into r0. +// Returns status value in r0. +.global read_flash_sreg +.type read_flash_sreg,%function +.thumb_func +read_flash_sreg: + push {r1, lr} + str r0, [r3, #SSI_DR0_OFFSET] + // Dummy byte: + str r0, [r3, #SSI_DR0_OFFSET] + + bl wait_ssi_ready + // Discard first byte and combine the next two + ldr r0, [r3, #SSI_DR0_OFFSET] + ldr r0, [r3, #SSI_DR0_OFFSET] + + pop {r1, pc} +#endif + +// ---------------------------------------------------------------------------- +// Literal Table +// ---------------------------------------------------------------------------- + +.global literals +literals: +.ltorg + +.end diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_is25lp080.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_is25lp080.S new file mode 100644 index 0000000000..3c33e5b0ea --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_is25lp080.S @@ -0,0 +1,299 @@ +// ---------------------------------------------------------------------------- +// Second stage boot code +// Copyright (c) 2019 Raspberry Pi (Trading) Ltd. +// +// Device: ISSI IS25LP080D +// Based on W25Q080 code: main difference is the QE bit being in +// SR1 instead of SR2. +// +// Description: Configures IS25LP080D to run in Quad I/O continuous read XIP mode +// +// Details: * Check status register to determine if QSPI mode is enabled, +// and perform an SR programming cycle if necessary. +// * Use SSI to perform a dummy 0xEB read command, with the mode +// continuation bits set, so that the flash will not require +// 0xEB instruction prefix on subsequent reads. +// * Configure SSI to write address, mode bits, but no instruction. +// SSI + flash are now jointly in a state where continuous reads +// can take place. +// * Set VTOR = 0x10000100 (user vector table immediately after +// this boot2 image). +// * Read stack pointer (MSP) and reset vector from the flash +// vector table; set SP and jump, as though the processor had +// booted directly from flash. +// +// Building: * This code must be linked to run at 0x20027f00 +// * The code will be padded to a size of 256 bytes, including a +// 4-byte checksum. Therefore code size cannot exceed 252 bytes. +// ---------------------------------------------------------------------------- + +#include "pico/asm_helper.S" +#include "hardware/regs/addressmap.h" +#include "ssi.h" + +// ---------------------------------------------------------------------------- +// Config section +// ---------------------------------------------------------------------------- +// It should be possible to support most flash devices by modifying this section + +// The serial flash interface will run at clk_sys/PICO_FLASH_SPI_CLKDIV. +// This must be a positive, even integer. +// The bootrom is very conservative with SPI frequency, but here we should be +// as aggressive as possible. +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 4 +#endif + + +// Define interface width: single/dual/quad IO +#define FRAME_FORMAT SSI_CTRLR0_SPI_FRF_VALUE_QUAD + +// For W25Q080 this is the "Read data fast quad IO" instruction: +#define CMD_READ 0xeb + +// "Mode bits" are 8 special bits sent immediately after +// the address bits in a "Read Data Fast Quad I/O" command sequence. +// On W25Q080, the four LSBs are don't care, and if MSBs == 0xa, the +// next read does not require the 0xeb instruction prefix. +#define MODE_CONTINUOUS_READ 0xa0 + +// The number of address + mode bits, divided by 4 (always 4, not function of +// interface width). +#define ADDR_L 8 + +// How many clocks of Hi-Z following the mode bits. For W25Q080, 4 dummy cycles +// are required. +#define WAIT_CYCLES 4 + +// If defined, we will read status reg, compare to SREG_DATA, and overwrite +// with our value if the SR doesn't match. +// This isn't great because it will remove block protections. +// A better solution is to use a volatile SR write if your device supports it. +#define PROGRAM_STATUS_REG + +#define CMD_WRITE_ENABLE 0x06 +#define CMD_READ_STATUS 0x05 +#define CMD_WRITE_STATUS 0x01 +#define SREG_DATA 0x40 // Enable quad-SPI mode + +// ---------------------------------------------------------------------------- +// Start of 2nd Stage Boot Code +// ---------------------------------------------------------------------------- + +.cpu cortex-m0 +.thumb + +.section .text + +.global _stage2_boot +.type _stage2_boot,%function +.thumb_func +_stage2_boot: + + ldr r5, =XIP_SSI_BASE // Use as base address where possible + + // Disable SSI to allow further config + mov r1, #0 + str r1, [r5, #SSI_SSIENR_OFFSET] + + // Set baud rate + mov r1, #PICO_FLASH_SPI_CLKDIV + str r1, [r5, #SSI_BAUDR_OFFSET] + +// On QSPI parts we usually need a 01h SR-write command to enable QSPI mode +// (i.e. turn WPn and HOLDn into IO2/IO3) +#ifdef PROGRAM_STATUS_REG +program_sregs: +#define CTRL0_SPI_TXRX \ + (7 << SSI_CTRLR0_DFS_32_LSB) | /* 8 bits per data frame */ \ + (SSI_CTRLR0_TMOD_VALUE_TX_AND_RX << SSI_CTRLR0_TMOD_LSB) + + ldr r1, =(CTRL0_SPI_TXRX) + str r1, [r5, #SSI_CTRLR0_OFFSET] + + // Enable SSI and select slave 0 + mov r1, #1 + str r1, [r5, #SSI_SSIENR_OFFSET] + + // Check whether SR needs updating + ldr r0, =CMD_READ_STATUS + bl read_flash_sreg + ldr r2, =SREG_DATA + cmp r0, r2 + beq skip_sreg_programming + + // Send write enable command + mov r1, #CMD_WRITE_ENABLE + str r1, [r5, #SSI_DR0_OFFSET] + + // Poll for completion and discard RX + bl wait_ssi_ready + ldr r1, [r5, #SSI_DR0_OFFSET] + + // Send status write command followed by data bytes + mov r1, #CMD_WRITE_STATUS + str r1, [r5, #SSI_DR0_OFFSET] + mov r0, #0 + str r2, [r5, #SSI_DR0_OFFSET] + + bl wait_ssi_ready + ldr r1, [r5, #SSI_DR0_OFFSET] + ldr r1, [r5, #SSI_DR0_OFFSET] + + // Poll status register for write completion +1: + ldr r0, =CMD_READ_STATUS + bl read_flash_sreg + mov r1, #1 + tst r0, r1 + bne 1b + +skip_sreg_programming: + + // Send a 0xA3 high-performance-mode instruction +// ldr r1, =0xa3 +// str r1, [r5, #SSI_DR0_OFFSET] +// bl wait_ssi_ready + + // Disable SSI again so that it can be reconfigured + mov r1, #0 + str r1, [r5, #SSI_SSIENR_OFFSET] +#endif + + +// First we need to send the initial command to get us in to Fast Read Quad I/O +// mode. As this transaction requires a command, we can't send it in XIP mode. +// To enter Continuous Read mode as well we need to append 4'b0010 to the address +// bits and then add a further 4 don't care bits. We will construct this by +// specifying a 28-bit address, with the least significant bits being 4'b0010. +// This is just a dummy transaction so we'll perform a read from address zero +// and then discard what comes back. All we really care about is that at the +// end of the transaction, the flash device is in Continuous Read mode +// and from then on will only expect to receive addresses. +dummy_read: +#define CTRLR0_ENTER_XIP \ + (FRAME_FORMAT /* Quad I/O mode */ \ + << SSI_CTRLR0_SPI_FRF_LSB) | \ + (31 << SSI_CTRLR0_DFS_32_LSB) | /* 32 data bits */ \ + (SSI_CTRLR0_TMOD_VALUE_EEPROM_READ /* Send INST/ADDR, Receive Data */ \ + << SSI_CTRLR0_TMOD_LSB) + + ldr r1, =(CTRLR0_ENTER_XIP) + str r1, [r5, #SSI_CTRLR0_OFFSET] + + mov r1, #0x0 // NDF=0 (single 32b read) + str r1, [r5, #SSI_CTRLR1_OFFSET] + +#define SPI_CTRLR0_ENTER_XIP \ + (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Address + mode bits */ \ + (WAIT_CYCLES << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | /* Hi-Z dummy clocks following address + mode */ \ + (SSI_SPI_CTRLR0_INST_L_VALUE_8B \ + << SSI_SPI_CTRLR0_INST_L_LSB) | /* 8-bit instruction */ \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C2A /* Send Command in serial mode then address in Quad I/O mode */ \ + << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) + + ldr r1, =(SPI_CTRLR0_ENTER_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) // SPI_CTRL0 Register + str r1, [r0] + + mov r1, #1 // Re-enable SSI + str r1, [r5, #SSI_SSIENR_OFFSET] + + mov r1, #CMD_READ + str r1, [r5, #SSI_DR0_OFFSET] // Push SPI command into TX FIFO + mov r1, #MODE_CONTINUOUS_READ // 32-bit: 24 address bits (we don't care, so 0) and M[7:4]=1010 + str r1, [r5, #SSI_DR0_OFFSET] // Push Address into TX FIFO - this will trigger the transaction + + // Poll for completion + bl wait_ssi_ready + +// At this point CN# will be deasserted and the SPI clock will not be running. +// The Winbond WX25X10CL device will be in continuous read, dual I/O mode and +// only expecting address bits after the next CN# assertion. So long as we +// send 4'b0010 (and 4 more dummy HiZ bits) after every subsequent 24b address +// then the Winbond device will remain in continuous read mode. This is the +// ideal mode for Execute-In-Place. +// (If we want to exit continuous read mode then we will need to switch back +// to APM mode and generate a 28-bit address phase with the extra nibble set +// to 4'b0000). + + mov r1, #0 + str r1, [r5, #SSI_SSIENR_OFFSET] // Disable SSI (and clear FIFO) to allow further config + +// Note that the INST_L field is used to select what XIP data gets pushed into +// the TX FIFO: +// INST_L_0_BITS {ADDR[23:0],XIP_CMD[7:0]} Load "mode bits" into XIP_CMD +// Anything else {XIP_CMD[7:0],ADDR[23:0]} Load SPI command into XIP_CMD +configure_ssi: +#define SPI_CTRLR0_XIP \ + (MODE_CONTINUOUS_READ /* Mode bits to keep flash in continuous read mode */ \ + << SSI_SPI_CTRLR0_XIP_CMD_LSB) | \ + (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Total number of address + mode bits */ \ + (WAIT_CYCLES << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | /* Hi-Z dummy clocks following address + mode */ \ + (SSI_SPI_CTRLR0_INST_L_VALUE_NONE /* Do not send a command, instead send XIP_CMD as mode bits after address */ \ + << SSI_SPI_CTRLR0_INST_L_LSB) | \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_2C2A /* Send Address in Quad I/O mode (and Command but that is zero bits long) */ \ + << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) + + ldr r1, =(SPI_CTRLR0_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) + str r1, [r0] + + mov r1, #1 + str r1, [r5, #SSI_SSIENR_OFFSET] // Re-enable SSI + +// We are now in XIP mode, with all transactions using Dual I/O and only +// needing to send 24-bit addresses (plus mode bits) for each read transaction. + +soft_reset: + // Just jump to start of image after this 256-byte boot stage2 (with thumb bit set) + ldr r0, =(XIP_BASE + 256 + 1) + bx r0 + +// Common functions + +wait_ssi_ready: + push {r0, r1, lr} + + // Command is complete when there is nothing left to send + // (TX FIFO empty) and SSI is no longer busy (CSn deasserted) +1: + ldr r1, [r5, #SSI_SR_OFFSET] + mov r0, #SSI_SR_TFE_BITS + tst r1, r0 + beq 1b + mov r0, #SSI_SR_BUSY_BITS + tst r1, r0 + bne 1b + + pop {r0, r1, pc} + +#ifdef PROGRAM_STATUS_REG +// Pass status read cmd into r0. +// Returns status value in r0. +.global read_flash_sreg +.type read_flash_sreg,%function +.thumb_func +read_flash_sreg: + push {r1, lr} + str r0, [r5, #SSI_DR0_OFFSET] + // Dummy byte: + str r0, [r5, #SSI_DR0_OFFSET] + + bl wait_ssi_ready + // Discard first byte and combine the next two + ldr r0, [r5, #SSI_DR0_OFFSET] + ldr r0, [r5, #SSI_DR0_OFFSET] + + pop {r1, pc} +#endif + +// ---------------------------------------------------------------------------- +// Literal Table +// ---------------------------------------------------------------------------- + +.global literals +literals: +.ltorg + +.end diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_usb_blinky.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_usb_blinky.S new file mode 100644 index 0000000000..fcf057e89c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_usb_blinky.S @@ -0,0 +1,47 @@ +// Stub second stage which calls into USB bootcode, with parameters. +// USB boot takes two parameters: +// - A GPIO mask for activity LED -- if mask is 0, don't touch GPIOs at all +// - A mask of interfaces to disable. Bit 0 disables MSC, bit 1 disables PICOBoot +// The bootrom passes 0 for both of these parameters, but user code (or this +// second stage) can pass anything. + +#define USB_BOOT_MSD_AND_PICOBOOT 0x0 +#define USB_BOOT_MSD_ONLY 0x2 +#define USB_BOOT_PICOBOOT_ONLY 0x1 + +// Config +#define ACTIVITY_LED 0 +#define BOOT_MODE USB_BOOT_MSD_AND_PICOBOOT + +.cpu cortex-m0 +.thumb + +.section .text + +.global _stage2_boot +.type _stage2_boot,%function + +.thumb_func +_stage2_boot: + mov r7, #0x14 // Pointer to _well_known pointer table in ROM + ldrh r0, [r7, #0] // Offset 0 is 16 bit pointer to function table + ldrh r7, [r7, #4] // Offset 4 is 16 bit pointer to table lookup routine + ldr r1, =('U' | ('B' << 8)) // Symbol for USB Boot + blx r7 + cmp r0, #0 + beq dead + + mov r7, r0 + ldr r0, =(1u << ACTIVITY_LED) // Mask of which GPIO (or GPIOs) to use + mov r1, #BOOT_MODE + blx r7 + +dead: + wfi + b dead + +.global literals +literals: +.ltorg + +.end diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25q080.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25q080.S new file mode 100644 index 0000000000..0b4178d0a3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25q080.S @@ -0,0 +1,330 @@ +// ---------------------------------------------------------------------------- +// Second stage boot code +// Copyright (c) 2019 Raspberry Pi (Trading) Ltd. +// +// Device: Winbond W25Q080 +// Also supports W25Q16JV (which has some different SR instructions) +// Also supports AT25SF081 +// Also supports S25FL132K0 +// +// Description: Configures W25Q080 to run in Quad I/O continuous read XIP mode +// +// Details: * Check status register 2 to determine if QSPI mode is enabled, +// and perform an SR2 programming cycle if necessary. +// * Use SSI to perform a dummy 0xEB read command, with the mode +// continuation bits set, so that the flash will not require +// 0xEB instruction prefix on subsequent reads. +// * Configure SSI to write address, mode bits, but no instruction. +// SSI + flash are now jointly in a state where continuous reads +// can take place. +// * Jump to exit pointer passed in via lr. Bootrom passes null, +// in which case this code uses a default 256 byte flash offset +// +// Building: * This code must be position-independent, and use stack only +// * The code will be padded to a size of 256 bytes, including a +// 4-byte checksum. Therefore code size cannot exceed 252 bytes. +// ---------------------------------------------------------------------------- + +#include "pico/asm_helper.S" +#include "hardware/regs/addressmap.h" +#include "hardware/regs/ssi.h" +#include "hardware/regs/pads_qspi.h" + +// ---------------------------------------------------------------------------- +// Config section +// ---------------------------------------------------------------------------- +// It should be possible to support most flash devices by modifying this section + +// The serial flash interface will run at clk_sys/PICO_FLASH_SPI_CLKDIV. +// This must be a positive, even integer. +// The bootrom is very conservative with SPI frequency, but here we should be +// as aggressive as possible. + +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 4 +#endif +#if PICO_FLASH_SPI_CLKDIV & 1 +#error PICO_FLASH_SPI_CLKDIV must be even +#endif + +// Define interface width: single/dual/quad IO +#define FRAME_FORMAT SSI_CTRLR0_SPI_FRF_VALUE_QUAD + +// For W25Q080 this is the "Read data fast quad IO" instruction: +#define CMD_READ 0xeb + +// "Mode bits" are 8 special bits sent immediately after +// the address bits in a "Read Data Fast Quad I/O" command sequence. +// On W25Q080, the four LSBs are don't care, and if MSBs == 0xa, the +// next read does not require the 0xeb instruction prefix. +#define MODE_CONTINUOUS_READ 0xa0 + +// The number of address + mode bits, divided by 4 (always 4, not function of +// interface width). +#define ADDR_L 8 + +// How many clocks of Hi-Z following the mode bits. For W25Q080, 4 dummy cycles +// are required. +#define WAIT_CYCLES 4 + +// If defined, we will read status reg, compare to SREG_DATA, and overwrite +// with our value if the SR doesn't match. +// We do a two-byte write to SR1 (01h cmd) rather than a one-byte write to +// SR2 (31h cmd) as the latter command isn't supported by WX25Q080. +// This isn't great because it will remove block protections. +// A better solution is to use a volatile SR write if your device supports it. +#define PROGRAM_STATUS_REG + +#define CMD_WRITE_ENABLE 0x06 +#define CMD_READ_STATUS 0x05 +#define CMD_READ_STATUS2 0x35 +#define CMD_WRITE_STATUS 0x01 +#define SREG_DATA 0x02 // Enable quad-SPI mode + +// ---------------------------------------------------------------------------- +// Start of 2nd Stage Boot Code +// ---------------------------------------------------------------------------- + +.syntax unified +.cpu cortex-m0plus +.thumb + +.section .text + +// The exit point is passed in lr. If entered from bootrom, this will be the +// flash address immediately following this second stage (0x10000100). +// Otherwise it will be a return address -- second stage being called as a +// function by user code, after copying out of XIP region. r3 holds SSI base, +// r0...2 used as temporaries. Other GPRs not used. +.global _stage2_boot +.type _stage2_boot,%function +.thumb_func +_stage2_boot: + push {lr} + + // Set pad configuration: + // - SCLK 8mA drive, no slew limiting + // - SDx disable input Schmitt to reduce delay + + ldr r3, =PADS_QSPI_BASE + movs r0, #(2 << PADS_QSPI_GPIO_QSPI_SCLK_DRIVE_LSB | PADS_QSPI_GPIO_QSPI_SCLK_SLEWFAST_BITS) + str r0, [r3, #PADS_QSPI_GPIO_QSPI_SCLK_OFFSET] + ldr r0, [r3, #PADS_QSPI_GPIO_QSPI_SD0_OFFSET] + movs r1, #PADS_QSPI_GPIO_QSPI_SD0_SCHMITT_BITS + bics r0, r1 + str r0, [r3, #PADS_QSPI_GPIO_QSPI_SD0_OFFSET] + str r0, [r3, #PADS_QSPI_GPIO_QSPI_SD1_OFFSET] + str r0, [r3, #PADS_QSPI_GPIO_QSPI_SD2_OFFSET] + str r0, [r3, #PADS_QSPI_GPIO_QSPI_SD3_OFFSET] + + ldr r3, =XIP_SSI_BASE + + // Disable SSI to allow further config + movs r1, #0 + str r1, [r3, #SSI_SSIENR_OFFSET] + + // Set baud rate + movs r1, #PICO_FLASH_SPI_CLKDIV + str r1, [r3, #SSI_BAUDR_OFFSET] + + // Set 1-cycle sample delay. If PICO_FLASH_SPI_CLKDIV == 2 then this means, + // if the flash launches data on SCLK posedge, we capture it at the time that + // the next SCLK posedge is launched. This is shortly before that posedge + // arrives at the flash, so data hold time should be ok. For + // PICO_FLASH_SPI_CLKDIV > 2 this pretty much has no effect. + + movs r1, #1 + movs r2, #SSI_RX_SAMPLE_DLY_OFFSET // == 0xf0 so need 8 bits of offset significance + str r1, [r3, r2] + + +// On QSPI parts we usually need a 01h SR-write command to enable QSPI mode +// (i.e. turn WPn and HOLDn into IO2/IO3) +#ifdef PROGRAM_STATUS_REG +program_sregs: +#define CTRL0_SPI_TXRX \ + (7 << SSI_CTRLR0_DFS_32_LSB) | /* 8 bits per data frame */ \ + (SSI_CTRLR0_TMOD_VALUE_TX_AND_RX << SSI_CTRLR0_TMOD_LSB) + + ldr r1, =(CTRL0_SPI_TXRX) + str r1, [r3, #SSI_CTRLR0_OFFSET] + + // Enable SSI and select slave 0 + movs r1, #1 + str r1, [r3, #SSI_SSIENR_OFFSET] + + // Check whether SR needs updating + movs r0, #CMD_READ_STATUS2 + bl read_flash_sreg + movs r2, #SREG_DATA + cmp r0, r2 + beq skip_sreg_programming + + // Send write enable command + movs r1, #CMD_WRITE_ENABLE + str r1, [r3, #SSI_DR0_OFFSET] + + // Poll for completion and discard RX + bl wait_ssi_ready + ldr r1, [r3, #SSI_DR0_OFFSET] + + // Send status write command followed by data bytes + movs r1, #CMD_WRITE_STATUS + str r1, [r3, #SSI_DR0_OFFSET] + movs r0, #0 + str r0, [r3, #SSI_DR0_OFFSET] + str r2, [r3, #SSI_DR0_OFFSET] + + bl wait_ssi_ready + ldr r1, [r3, #SSI_DR0_OFFSET] + ldr r1, [r3, #SSI_DR0_OFFSET] + ldr r1, [r3, #SSI_DR0_OFFSET] + + // Poll status register for write completion +1: + movs r0, #CMD_READ_STATUS + bl read_flash_sreg + movs r1, #1 + tst r0, r1 + bne 1b + +skip_sreg_programming: + + // Disable SSI again so that it can be reconfigured + movs r1, #0 + str r1, [r3, #SSI_SSIENR_OFFSET] +#endif + +// Currently the flash expects an 8 bit serial command prefix on every +// transfer, which is a waste of cycles. Perform a dummy Fast Read Quad I/O +// command, with mode bits set such that the flash will not expect a serial +// command prefix on *subsequent* transfers. We don't care about the results +// of the read, the important part is the mode bits. + +dummy_read: +#define CTRLR0_ENTER_XIP \ + (FRAME_FORMAT /* Quad I/O mode */ \ + << SSI_CTRLR0_SPI_FRF_LSB) | \ + (31 << SSI_CTRLR0_DFS_32_LSB) | /* 32 data bits */ \ + (SSI_CTRLR0_TMOD_VALUE_EEPROM_READ /* Send INST/ADDR, Receive Data */ \ + << SSI_CTRLR0_TMOD_LSB) + + ldr r1, =(CTRLR0_ENTER_XIP) + str r1, [r3, #SSI_CTRLR0_OFFSET] + + movs r1, #0x0 // NDF=0 (single 32b read) + str r1, [r3, #SSI_CTRLR1_OFFSET] + +#define SPI_CTRLR0_ENTER_XIP \ + (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Address + mode bits */ \ + (WAIT_CYCLES << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | /* Hi-Z dummy clocks following address + mode */ \ + (SSI_SPI_CTRLR0_INST_L_VALUE_8B \ + << SSI_SPI_CTRLR0_INST_L_LSB) | /* 8-bit instruction */ \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C2A /* Send Command in serial mode then address in Quad I/O mode */ \ + << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) + + ldr r1, =(SPI_CTRLR0_ENTER_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) // SPI_CTRL0 Register + str r1, [r0] + + movs r1, #1 // Re-enable SSI + str r1, [r3, #SSI_SSIENR_OFFSET] + + movs r1, #CMD_READ + str r1, [r3, #SSI_DR0_OFFSET] // Push SPI command into TX FIFO + movs r1, #MODE_CONTINUOUS_READ // 32-bit: 24 address bits (we don't care, so 0) and M[7:4]=1010 + str r1, [r3, #SSI_DR0_OFFSET] // Push Address into TX FIFO - this will trigger the transaction + + // Poll for completion + bl wait_ssi_ready + +// The flash is in a state where we can blast addresses in parallel, and get +// parallel data back. Now configure the SSI to translate XIP bus accesses +// into QSPI transfers of this form. + + movs r1, #0 + str r1, [r3, #SSI_SSIENR_OFFSET] // Disable SSI (and clear FIFO) to allow further config + +// Note that the INST_L field is used to select what XIP data gets pushed into +// the TX FIFO: +// INST_L_0_BITS {ADDR[23:0],XIP_CMD[7:0]} Load "mode bits" into XIP_CMD +// Anything else {XIP_CMD[7:0],ADDR[23:0]} Load SPI command into XIP_CMD +configure_ssi: +#define SPI_CTRLR0_XIP \ + (MODE_CONTINUOUS_READ /* Mode bits to keep flash in continuous read mode */ \ + << SSI_SPI_CTRLR0_XIP_CMD_LSB) | \ + (ADDR_L << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Total number of address + mode bits */ \ + (WAIT_CYCLES << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | /* Hi-Z dummy clocks following address + mode */ \ + (SSI_SPI_CTRLR0_INST_L_VALUE_NONE /* Do not send a command, instead send XIP_CMD as mode bits after address */ \ + << SSI_SPI_CTRLR0_INST_L_LSB) | \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_2C2A /* Send Address in Quad I/O mode (and Command but that is zero bits long) */ \ + << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) + + ldr r1, =(SPI_CTRLR0_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) + str r1, [r0] + + movs r1, #1 + str r1, [r3, #SSI_SSIENR_OFFSET] // Re-enable SSI + +// Bus accesses to the XIP window will now be transparently serviced by the +// external flash on cache miss. We are ready to run code from flash. + +soft_reset: + // Jump to exit point provided in lr. Bootrom will pass null, in which + // case we use default exit target at a 256 byte offset into XIP region + // (immediately after this second stage's flash location) + pop {r0} + cmp r0, #0 + bne 1f + ldr r0, =(XIP_BASE + 0x101) +1: + bx r0 + +// Common functions + +wait_ssi_ready: + push {r0, r1, lr} + + // Command is complete when there is nothing left to send + // (TX FIFO empty) and SSI is no longer busy (CSn deasserted) +1: + ldr r1, [r3, #SSI_SR_OFFSET] + movs r0, #SSI_SR_TFE_BITS + tst r1, r0 + beq 1b + movs r0, #SSI_SR_BUSY_BITS + tst r1, r0 + bne 1b + + pop {r0, r1, pc} + +#ifdef PROGRAM_STATUS_REG +// Pass status read cmd into r0. +// Returns status value in r0. +.global read_flash_sreg +.type read_flash_sreg,%function +.thumb_func +read_flash_sreg: + push {r1, lr} + str r0, [r3, #SSI_DR0_OFFSET] + // Dummy byte: + str r0, [r3, #SSI_DR0_OFFSET] + + bl wait_ssi_ready + // Discard first byte and combine the next two + ldr r0, [r3, #SSI_DR0_OFFSET] + ldr r0, [r3, #SSI_DR0_OFFSET] + + pop {r1, pc} +#endif + +// ---------------------------------------------------------------------------- +// Literal Table +// ---------------------------------------------------------------------------- + +.global literals +literals: +.ltorg + +.end diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25x10cl.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25x10cl.S new file mode 100644 index 0000000000..80f82c697a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot2_w25x10cl.S @@ -0,0 +1,219 @@ +// ---------------------------------------------------------------------------- +// +// .d8888b. 888 .d8888b. 888 +// d88P Y88b 888 d88P Y88b 888 +// 888 888 Y88b. 888 +// .d88P 88888b. .d88888 "Y888b. 888888 8888b. .d88b. .d88b. +// .od888P" 888 "88b d88" 888 "Y88b. 888 "88b d88P"88b d8P Y8b +// d88P" 888 888 888 888 "888 888 .d888888 888 888 88888888 +// 888" 888 888 Y88b 888 Y88b d88P Y88b. 888 888 Y88b 888 Y8b. +// 888888888 888 888 "Y88888 "Y8888P" "Y888 "Y888888 "Y88888 "Y8888 +// 888 +// Y8b d88P +// "Y88P" +// 888888b. 888 .d8888b. 888 +// 888 "88b 888 d88P Y88b 888 +// 888 .88P 888 888 888 888 +// 8888888K. .d88b. .d88b. 888888 888 .d88b. .d88888 .d88b. +// 888 "Y88b d88""88b d88""88b 888 888 d88""88b d88" 888 d8P Y8b +// 888 888 888 888 888 888 888 888 888 888 888 888 888 88888888 +// 888 d88P Y88..88P Y88..88P Y88b. Y88b d88P Y88..88P Y88b 888 Y8b. +// 8888888P" "Y88P" "Y88P" "Y888 "Y8888P" "Y88P" "Y88888 "Y8888 +// +// ---------------------------------------------------------------------------- +// +// Device: Winbond W25X10CL +// +// Description: Configures W25X10CL to run in Dual I/O continuous read XIP mode +// +// Details: * Disable SSI +// * Configure SSI to generate 8b command + 28b address + 2 wait, +// with address and data using dual SPI mode +// * Enable SSI +// * Generate dummy read with command = 0xBB, top 24b of address +// of 0x000000 followed by M[7:0]=0010zzzz (with the HiZ being +// generated by 2 wait cycles). This leaves the W25X10CL in +// continuous read mode +// * Disable SSI +// * Configure SSI to generate 0b command + 28b address + 2 wait, +// with the extra 4 bits of address LSB being 0x2 to keep the +// W25X10CL in continuous read mode forever +// * Enable SSI +// * Set VTOR = 0x10000100 +// * Read MSP reset vector from 0x10000100 and write to MSP (this +// will also enable XIP mode in the SSI wrapper) +// * Read PC reset vector from 0x10000104 and jump to it +// +// Building: * This code must be linked to run at 0x20000000 +// * The code will be padded to a size of 256 bytes, including a +// 4-byte checksum. Therefore code size cannot exceed 252 bytes. +// ---------------------------------------------------------------------------- + +#include "pico/asm_helper.S" +#include "hardware/regs/addressmap.h" +#include "ssi.h" + +// The serial flash interface will run at clk_sys/PICO_FLASH_SPI_CLKDIV. +// This must be an even number. +#ifndef PICO_FLASH_SPI_CLKDIV +#define PICO_FLASH_SPI_CLKDIV 4 +#endif + +// ---------------------------------------------------------------------------- +// The "System Control Block" is a set of internal Cortex-M0+ control registers +// that are memory mapped and accessed like any other H/W register. They have +// fixed addresses in the address map of every Cortex-M0+ system. +// ---------------------------------------------------------------------------- + +.equ SCB_VTOR, 0xE000ED08 // RW Vector Table Offset Register + +// ---------------------------------------------------------------------------- +// Winbond W25X10CL Supported Commands +// Taken from "w25x10cl_reg_021714.pdf" +// ---------------------------------------------------------------------------- + +.equ W25X10CL_CMD_READ_DATA_FAST_DUAL_IO, 0xbb + +// ---------------------------------------------------------------------------- +// Winbond W25X10CL "Mode bits" are 8 special bits sent immediately after +// the address bits in a "Read Data Fast Dual I/O" command sequence. +// Of M[7:4], they say M[7:6] are reserved (set to zero), and bits M[3:0] +// are don't care (we HiZ). Only M[5:4] are used, and they must be set +// to M[5:4] = 2'b10 to enable continuous read mode. +// ---------------------------------------------------------------------------- + +.equ W25X10CL_MODE_CONTINUOUS_READ, 0x20 + +// ---------------------------------------------------------------------------- +// Start of 2nd Stage Boot Code +// ---------------------------------------------------------------------------- + +.cpu cortex-m0 +.thumb + +.org 0 + +.section .text + +// This code will get copied to 0x20000000 and then executed + +.global _stage2_boot +.type _stage2_boot,%function +.thumb_func +_stage2_boot: + + ldr r5, =XIP_SSI_BASE // Use as base address where possible + +// We are primarily interested in setting up Flash for DSPI XIP w/ continuous read + + mov r1, #0 + str r1, [r5, #SSI_SSIENR_OFFSET] // Disable SSI to allow further config + +// The Boot ROM sets a very conservative SPI clock frequency to be sure it can +// read the initial 256 bytes from any device. Here we can be more aggressive. + + mov r1, #PICO_FLASH_SPI_CLKDIV + str r1, [r5, #SSI_BAUDR_OFFSET] // Set SSI Clock + +// First we need to send the initial command to get us in to Fast Read Dual I/O +// mode. As this transaction requires a command, we can't send it in XIP mode. +// To enter Continuous Read mode as well we need to append 4'b0010 to the address +// bits and then add a further 4 don't care bits. We will construct this by +// specifying a 28-bit address, with the least significant bits being 4'b0010. +// This is just a dummy transaction so we'll perform a read from address zero +// and then discard what comes back. All we really care about is that at the +// end of the transaction, the Winbond W25X10CL device is in Continuous Read mode +// and from then on will only expect to receive addresses. + +#define CTRLR0_ENTER_XIP \ + (SSI_CTRLR0_SPI_FRF_VALUE_DUAL /* Dual I/O mode */ \ + << SSI_CTRLR0_SPI_FRF_LSB) | \ + (31 << SSI_CTRLR0_DFS_32_LSB) | /* 32 data bits */ \ + (SSI_CTRLR0_TMOD_VALUE_EEPROM_READ /* Send INST/ADDR, Receive Data */ \ + << SSI_CTRLR0_TMOD_LSB) + + ldr r1, =(CTRLR0_ENTER_XIP) + str r1, [r5, #SSI_CTRLR0_OFFSET] + + mov r1, #0x0 // NDF=0 (single 32b read) + str r1, [r5, #SSI_CTRLR1_OFFSET] + +#define SPI_CTRLR0_ENTER_XIP \ + (7 << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Send 28 bits (24 address + 4 mode) */ \ + (2 << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | /* Hi-Z the other 4 mode bits (2 cycles @ dual I/O = 4 bits) */ \ + (SSI_SPI_CTRLR0_INST_L_VALUE_8B \ + << SSI_SPI_CTRLR0_INST_L_LSB) | /* 8-bit instruction */ \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_1C2A /* Send Command in serial mode then address in Dual I/O mode */ \ + << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) + + ldr r1, =(SPI_CTRLR0_ENTER_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) // SPI_CTRL0 Register + str r1, [r0] + + mov r1, #1 // Re-enable SSI + str r1, [r5, #SSI_SSIENR_OFFSET] + + mov r1, #W25X10CL_CMD_READ_DATA_FAST_DUAL_IO // 8b command = 0xBB + str r1, [r5, #SSI_DR0_OFFSET] // Push SPI command into TX FIFO + mov r1, #0x0000002 // 28-bit Address for dummy read = 0x000000 + 0x2 Mode bits to set M[5:4]=10 + str r1, [r5, #SSI_DR0_OFFSET] // Push Address into TX FIFO - this will trigger the transaction + +// Now we wait for the read transaction to complete by monitoring the SSI +// status register and checking for the "RX FIFO Not Empty" flag to assert. + + mov r1, #SSI_SR_RFNE_BITS +00: + ldr r0, [r5, #SSI_SR_OFFSET] // Read status register + tst r0, r1 // RFNE status flag set? + beq 00b // If not then wait + +// At this point CN# will be deasserted and the SPI clock will not be running. +// The Winbond WX25X10CL device will be in continuous read, dual I/O mode and +// only expecting address bits after the next CN# assertion. So long as we +// send 4'b0010 (and 4 more dummy HiZ bits) after every subsequent 24b address +// then the Winbond device will remain in continuous read mode. This is the +// ideal mode for Execute-In-Place. +// (If we want to exit continuous read mode then we will need to switch back +// to APM mode and generate a 28-bit address phase with the extra nibble set +// to 4'b0000). + + mov r1, #0 + str r1, [r5, #SSI_SSIENR_OFFSET] // Disable SSI (and clear FIFO) to allow further config + +// Note that the INST_L field is used to select what XIP data gets pushed into +// the TX FIFO: +// INST_L_0_BITS {ADDR[23:0],XIP_CMD[7:0]} Load "mode bits" into XIP_CMD +// Anything else {XIP_CMD[7:0],ADDR[23:0]} Load SPI command into XIP_CMD + +#define SPI_CTRLR0_XIP \ + (W25X10CL_MODE_CONTINUOUS_READ /* Mode bits to keep Winbond in continuous read mode */ \ + << SSI_SPI_CTRLR0_XIP_CMD_LSB) | \ + (7 << SSI_SPI_CTRLR0_ADDR_L_LSB) | /* Send 28 bits (24 address + 4 mode) */ \ + (2 << SSI_SPI_CTRLR0_WAIT_CYCLES_LSB) | /* Hi-Z the other 4 mode bits (2 cycles @ dual I/O = 4 bits) */ \ + (SSI_SPI_CTRLR0_INST_L_VALUE_NONE /* Do not send a command, instead send XIP_CMD as mode bits after address */ \ + << SSI_SPI_CTRLR0_INST_L_LSB) | \ + (SSI_SPI_CTRLR0_TRANS_TYPE_VALUE_2C2A /* Send Address in Dual I/O mode (and Command but that is zero bits long) */ \ + << SSI_SPI_CTRLR0_TRANS_TYPE_LSB) + + ldr r1, =(SPI_CTRLR0_XIP) + ldr r0, =(XIP_SSI_BASE + SSI_SPI_CTRLR0_OFFSET) + str r1, [r0] + + mov r1, #1 + str r1, [r5, #SSI_SSIENR_OFFSET] // Re-enable SSI + +// We are now in XIP mode, with all transactions using Dual I/O and only +// needing to send 24-bit addresses (plus mode bits) for each read transaction. + +soft_reset: + // Just jump to start of image after this 256-byte boot stage2 (with thumb bit set) + ldr r0, =(XIP_BASE + 256 + 1) + bx r0 + +// ---------------------------------------------------------------------------- +// Literal Table +// ---------------------------------------------------------------------------- + +.ltorg + +.end diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot_stage2.ld b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot_stage2.ld new file mode 100644 index 0000000000..f8669ab64c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/boot_stage2.ld @@ -0,0 +1,13 @@ +MEMORY { + /* We are loaded to the top 256 bytes of SRAM, which is above the bootrom + stack. Note 4 bytes occupied by checksum. */ + SRAM(rx) : ORIGIN = 0x20041f00, LENGTH = 252 +} + +SECTIONS { + . = ORIGIN(SRAM); + .text : { + *(.entry) + *(.text) + } >SRAM +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/doc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/doc.h new file mode 100644 index 0000000000..483dd682ff --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/doc.h @@ -0,0 +1,4 @@ +/** + * \defgroup boot_stage2 boot_stage2 + * \brief Second stage boot loaders responsible for setting up external flash + */ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/pad_checksum b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/pad_checksum new file mode 100644 index 0000000000..4d7905a45c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/boot_stage2/pad_checksum @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 + +import argparse +import binascii +import struct +import sys + + +def any_int(x): + try: + return int(x, 0) + except: + raise argparse.ArgumentTypeError("expected an integer, not '{!r}'".format(x)) + + +def bitrev(x, width): + return int("{:0{w}b}".format(x, w=width)[::-1], 2) + + +parser = argparse.ArgumentParser() +parser.add_argument("ifile", help="Input file (binary)") +parser.add_argument("ofile", help="Output file (assembly)") +parser.add_argument("-p", "--pad", help="Padded size (bytes), including 4-byte checksum, default 256", + type=any_int, default=256) +parser.add_argument("-s", "--seed", help="Checksum seed value, default 0", + type=any_int, default=0) +args = parser.parse_args() + +try: + idata = open(args.ifile, "rb").read() +except: + sys.exit("Could not open input file '{}'".format(args.ifile)) + +if len(idata) >= args.pad - 4: + sys.exit("Input file size ({} bytes) too large for final size ({} bytes)".format(len(idata), args.pad)) + +idata_padded = idata + bytes(args.pad - 4 - len(idata)) + +# Our bootrom CRC32 is slightly bass-ackward but it's best to work around for now (FIXME) +# 100% worth it to save two Thumb instructions +checksum = bitrev( + (binascii.crc32(bytes(bitrev(b, 8) for b in idata_padded), args.seed ^ 0xffffffff) ^ 0xffffffff) & 0xffffffff, 32) +odata = idata_padded + struct.pack("cs = ADC_CS_EN_BITS; + + // Internal staging completes in a few cycles, but poll to be sure + while (!(adc_hw->cs & ADC_CS_READY_BITS)) { + tight_loop_contents(); + } +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_adc/include/hardware/adc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_adc/include/hardware/adc.h new file mode 100644 index 0000000000..13d7c418f2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_adc/include/hardware/adc.h @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_ADC_H_ +#define _HARDWARE_ADC_H_ + +#include "pico.h" +#include "hardware/structs/adc.h" +#include "hardware/gpio.h" + +/** \file hardware/adc.h + * \defgroup hardware_adc hardware_adc + * + * Analog to Digital Converter (ADC) API + * + * The RP2040 has an internal analogue-digital converter (ADC) with the following features: + * - SAR ADC + * - 500 kS/s (Using an independent 48MHz clock) + * - 12 bit (9.5 ENOB) + * - 5 input mux: + * - 4 inputs that are available on package pins shared with GPIO[29:26] + * - 1 input is dedicated to the internal temperature sensor + * - 4 element receive sample FIFO + * - Interrupt generation + * - DMA interface + * + * Although there is only one ADC you can specify the input to it using the adc_select_input() function. + * In round robin mode (adc_rrobin()) will use that input and move to the next one after a read. + * + * User ADC inputs are on 0-3 (GPIO 26-29), the temperature sensor is on input 4. + * + * Temperature sensor values can be approximated in centigrade as: + * + * T = 27 - (ADC_Voltage - 0.706)/0.001721 + * + * The FIFO, if used, can contain up to 4 entries. + * + * \subsection adc_example Example + * \addtogroup hardware_adc + * + * \include hello_adc.c + */ + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_ADC, Enable/disable assertions in the ADC module, type=bool, default=0, group=hardware_adc +#ifndef PARAM_ASSERTIONS_ENABLED_ADC +#define PARAM_ASSERTIONS_ENABLED_ADC 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! \brief Initialise the ADC HW + * \ingroup hardware_adc + * + */ +void adc_init(void); + +/*! \brief Initialise the gpio for use as an ADC pin + * \ingroup hardware_adc + * + * Prepare a GPIO for use with ADC, by disabling all digital functions. + * + * \param gpio The GPIO number to use. Allowable GPIO numbers are 26 to 29 inclusive. + */ +static inline void adc_gpio_init(uint gpio) { + invalid_params_if(ADC, gpio < 26 || gpio > 29); + // Select NULL function to make output driver hi-Z + gpio_set_function(gpio, GPIO_FUNC_NULL); + // Also disable digital pulls and digital receiver + gpio_disable_pulls(gpio); + gpio_set_input_enabled(gpio, false); +} + +/*! \brief ADC input select + * \ingroup hardware_adc + * + * Select an ADC input. 0...3 are GPIOs 26...29 respectively. + * Input 4 is the onboard temperature sensor. + * + * \param input Input to select. + */ +static inline void adc_select_input(uint input) { + invalid_params_if(ADC, input > 4); + hw_write_masked(&adc_hw->cs, input << ADC_CS_AINSEL_LSB, ADC_CS_AINSEL_BITS); +} + +/*! \brief Round Robin sampling selector + * \ingroup hardware_adc + * + * This function sets which inputs are to be run through in round robin mode. + * Value between 0 and 0x1f (bit 0 to bit 4 for GPIO 26 to 29 and temperature sensor input respectively) + * + * \param input_mask A bit pattern indicating which of the 5 inputs are to be sampled. Write a value of 0 to disable round robin sampling. + */ +static inline void adc_set_round_robin(uint input_mask) { + invalid_params_if(ADC, input_mask & ~ADC_CS_RROBIN_BITS); + hw_write_masked(&adc_hw->cs, input_mask << ADC_CS_RROBIN_LSB, ADC_CS_RROBIN_BITS); +} + +/*! \brief Enable the onboard temperature sensor + * \ingroup hardware_adc + * + * \param enable Set true to power on the onboard temperature sensor, false to power off. + * + */ +static inline void adc_set_temp_sensor_enabled(bool enable) { + if (enable) + hw_set_bits(&adc_hw->cs, ADC_CS_TS_EN_BITS); + else + hw_clear_bits(&adc_hw->cs, ADC_CS_TS_EN_BITS); +} + +/*! \brief Perform a single conversion + * \ingroup hardware_adc + * + * Performs an ADC conversion, waits for the result, and then returns it. + * + * \return Result of the conversion. + */ +static inline uint16_t adc_read(void) { + hw_set_bits(&adc_hw->cs, ADC_CS_START_ONCE_BITS); + + while (!(adc_hw->cs & ADC_CS_READY_BITS)) + tight_loop_contents(); + + return adc_hw->result; +} + +/*! \brief Enable or disable free-running sampling mode + * \ingroup hardware_adc + * + * \param run false to disable, true to enable free running conversion mode. + */ +static inline void adc_run(bool run) { + if (run) + hw_set_bits(&adc_hw->cs, ADC_CS_START_MANY_BITS); + else + hw_clear_bits(&adc_hw->cs, ADC_CS_START_MANY_BITS); +} + +/*! \brief Set the ADC Clock divisor + * \ingroup hardware_adc + * + * Period of samples will be (1 + div) cycles on average. Note it takes 96 cycles to perform a conversion, + * so any period less than that will be clamped to 96. + * + * \param clkdiv If non-zero, conversion will be started at intervals rather than back to back. + */ +static inline void adc_set_clkdiv(float clkdiv) { + invalid_params_if(ADC, clkdiv >= 1 << (ADC_DIV_INT_MSB - ADC_DIV_INT_LSB + 1)); + adc_hw->div = (uint32_t)(clkdiv * (float) (1 << ADC_DIV_INT_LSB)); +} + +/*! \brief Setup the ADC FIFO + * \ingroup hardware_adc + * + * FIFO is 4 samples long, if a conversion is completed and the FIFO is full the result is dropped. + * + * \param en Enables write each conversion result to the FIFO + * \param dreq_en Enable DMA requests when FIFO contains data + * \param dreq_thresh Threshold for DMA requests/FIFO IRQ if enabled. + * \param err_in_fifo If enabled, bit 15 of the FIFO contains error flag for each sample + * \param byte_shift Shift FIFO contents to be one byte in size (for byte DMA) - enables DMA to byte buffers. + */ +static inline void adc_fifo_setup(bool en, bool dreq_en, uint16_t dreq_thresh, bool err_in_fifo, bool byte_shift) { + hw_write_masked(&adc_hw->fcs, + (!!en << ADC_FCS_EN_LSB) | + (!!dreq_en << ADC_FCS_DREQ_EN_LSB) | + (dreq_thresh << ADC_FCS_THRESH_LSB) | + (!!err_in_fifo << ADC_FCS_ERR_LSB) | + (!!byte_shift << ADC_FCS_SHIFT_LSB), + ADC_FCS_EN_BITS | + ADC_FCS_DREQ_EN_BITS | + ADC_FCS_THRESH_BITS | + ADC_FCS_ERR_BITS | + ADC_FCS_SHIFT_BITS + ); +} + +/*! \brief Check FIFO empty state + * \ingroup hardware_adc + * + * \return Returns true if the fifo is empty + */ +static inline bool adc_fifo_is_empty(void) { + return !!(adc_hw->fcs & ADC_FCS_EMPTY_BITS); +} + +/*! \brief Get number of entries in the ADC FIFO + * \ingroup hardware_adc + * + * The ADC FIFO is 4 entries long. This function will return how many samples are currently present. + */ +static inline uint8_t adc_fifo_get_level(void) { + return (adc_hw->fcs & ADC_FCS_LEVEL_BITS) >> ADC_FCS_LEVEL_LSB; +} + +/*! \brief Get ADC result from FIFO + * \ingroup hardware_adc + * + * Pops the latest result from the ADC FIFO. + */ +static inline uint16_t adc_fifo_get(void) { + return adc_hw->fifo; +} + +/*! \brief Wait for the ADC FIFO to have data. + * \ingroup hardware_adc + * + * Blocks until data is present in the FIFO + */ +static inline uint16_t adc_fifo_get_blocking(void) { + while (adc_fifo_is_empty()) + tight_loop_contents(); + return adc_hw->fifo; +} + +/*! \brief Drain the ADC FIFO + * \ingroup hardware_adc + * + * Will wait for any conversion to complete then drain the FIFO discarding any results. + */ +static inline void adc_fifo_drain(void) { + // Potentially there is still a conversion in progress -- wait for this to complete before draining + while (!(adc_hw->cs & ADC_CS_READY_BITS)) + tight_loop_contents(); + while (!adc_fifo_is_empty()) + (void) adc_fifo_get(); +} + +/*! \brief Enable/Disable ADC interrupts. + * \ingroup hardware_adc + * + * \param enabled Set to true to enable the ADC interrupts, false to disable + */ +static inline void adc_irq_set_enabled(bool enabled) { + adc_hw->inte = !!enabled; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/CMakeLists.txt new file mode 100644 index 0000000000..e045618fe2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(hardware_base INTERFACE) +target_include_directories(hardware_base INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +target_link_libraries(hardware_base INTERFACE pico_base_headers) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/include/hardware/address_mapped.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/include/hardware/address_mapped.h new file mode 100644 index 0000000000..6645fbdd0a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_base/include/hardware/address_mapped.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_ADDRESS_MAPPED_H +#define _HARDWARE_ADDRESS_MAPPED_H + +#include "pico.h" +#include "hardware/regs/addressmap.h" + +/** \file address_mapped.h + * \defgroup hardware_base hardware_base + * + * Low-level types and (atomic) accessors for memory-mapped hardware registers + * + * `hardware_base` defines the low level types and access functions for memory mapped hardware registers. It is included + * by default by all other hardware libraries. + * + * The following register access typedefs codify the access type (read/write) and the bus size (8/16/32) of the hardware register. + * The register type names are formed by concatenating one from each of the 3 parts A, B, C + + * A | B | C | Meaning + * ------|---|---|-------- + * io_ | | | A Memory mapped IO register + *  |ro_| | read-only access + *  |rw_| | read-write access + *  |wo_| | write-only access (can't actually be enforced via C API) + *  | | 8| 8-bit wide access + *  | | 16| 16-bit wide access + *  | | 32| 32-bit wide access + * + * When dealing with these types, you will always use a pointer, i.e. `io_rw_32 *some_reg` is a pointer to a read/write + * 32 bit register that you can write with `*some_reg = value`, or read with `value = *some_reg`. + * + * RP2040 hardware is also aliased to provide atomic setting, clear or flipping of a subset of the bits within + * a hardware register so that concurrent access by two cores is always consistent with one atomic operation + * being performed first, followed by the second. + * + * See hw_set_bits(), hw_clear_bits() and hw_xor_bits() provide for atomic access via a pointer to a 32 bit register + * + * Additionally given a pointer to a structure representing a piece of hardware (e.g. `dma_hw_t *dma_hw` for the DMA controller), you can + * get an alias to the entire structure such that writing any member (register) within the structure is equivalent + * to an atomic operation via hw_set_alias(), hw_clear_alias() or hw_xor_alias()... + * + * For example `hw_set_alias(dma_hw)->inte1 = 0x80;` will set bit 7 of the INTE1 register of the DMA controller, + * leaving the other bits unchanged. + */ + +#define check_hw_layout(type, member, offset) static_assert(offsetof(type, member) == (offset), "hw offset mismatch") +#define check_hw_size(type, size) static_assert(sizeof(type) == (size), "hw size mismatch") + +typedef volatile uint32_t io_rw_32; +typedef const volatile uint32_t io_ro_32; +typedef volatile uint32_t io_wo_32; +typedef volatile uint16_t io_rw_16; +typedef const volatile uint16_t io_ro_16; +typedef volatile uint16_t io_wo_16; +typedef volatile uint8_t io_rw_8; +typedef const volatile uint8_t io_ro_8; +typedef volatile uint8_t io_wo_8; + +typedef volatile uint8_t *const ioptr; +typedef ioptr const const_ioptr; + +// Untyped conversion alias pointer generation macros +#define hw_set_alias_untyped(addr) ((void *)(REG_ALIAS_SET_BITS | (uintptr_t)(addr))) +#define hw_clear_alias_untyped(addr) ((void *)(REG_ALIAS_CLR_BITS | (uintptr_t)(addr))) +#define hw_xor_alias_untyped(addr) ((void *)(REG_ALIAS_XOR_BITS | (uintptr_t)(addr))) + +// Typed conversion alias pointer generation macros +#define hw_set_alias(p) ((typeof(p))hw_set_alias_untyped(p)) +#define hw_clear_alias(p) ((typeof(p))hw_clear_alias_untyped(p)) +#define hw_xor_alias(p) ((typeof(p))hw_xor_alias_untyped(p)) + +/*! \brief Atomically set the specified bits to 1 in a HW register + * \ingroup hardware_base + * + * \param addr Address of writable register + * \param mask Bit-mask specifying bits to set + */ +inline static void hw_set_bits(io_rw_32 *addr, uint32_t mask) { + *(io_rw_32 *) hw_set_alias_untyped((volatile void *) addr) = mask; +} + +/*! \brief Atomically clear the specified bits to 0 in a HW register + * \ingroup hardware_base + * + * \param addr Address of writable register + * \param mask Bit-mask specifying bits to clear + */ +inline static void hw_clear_bits(io_rw_32 *addr, uint32_t mask) { + *(io_rw_32 *) hw_clear_alias_untyped((volatile void *) addr) = mask; +} + +/*! \brief Atomically flip the specified bits in a HW register + * \ingroup hardware_base + * + * \param addr Address of writable register + * \param mask Bit-mask specifying bits to invert + */ +inline static void hw_xor_bits(io_rw_32 *addr, uint32_t mask) { + *(io_rw_32 *) hw_xor_alias_untyped((volatile void *) addr) = mask; +} + +/*! \brief Set new values for a sub-set of the bits in a HW register + * \ingroup hardware_base + * + * Sets destination bits to values specified in \p values, if and only if corresponding bit in \p write_mask is set + * + * Note: this method allows safe concurrent modification of *different* bits of + * a register, but multiple concurrent access to the same bits is still unsafe. + * + * \param addr Address of writable register + * \param values Bits values + * \param write_mask Mask of bits to change + */ +inline static void hw_write_masked(io_rw_32 *addr, uint32_t values, uint32_t write_mask) { + hw_xor_bits(addr, (*addr ^ values) & write_mask); +} + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/CMakeLists.txt new file mode 100644 index 0000000000..33213fa2c1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/CMakeLists.txt @@ -0,0 +1,6 @@ +add_library(hardware_claim INTERFACE) +target_include_directories(hardware_claim INTERFACE include) +target_sources(hardware_claim INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/claim.c) + +target_link_libraries(hardware_claim INTERFACE hardware_sync) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/claim.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/claim.c new file mode 100644 index 0000000000..2c5c8eda21 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/claim.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/claim.h" + +uint32_t hw_claim_lock() { + return spin_lock_blocking(spin_lock_instance(PICO_SPINLOCK_ID_HARDWARE_CLAIM)); +} + +void hw_claim_unlock(uint32_t save) { + spin_unlock(spin_lock_instance(PICO_SPINLOCK_ID_HARDWARE_CLAIM), save); +} + +bool hw_is_claimed(uint8_t *bits, uint bit_index) { + bool rc; + uint32_t save = hw_claim_lock(); + if (bits[bit_index >> 3u] & (1u << (bit_index & 7u))) { + rc = false; + } else { + bits[bit_index >> 3u] |= (1u << (bit_index & 7u)); + rc = true; + } + hw_claim_unlock(save); + return rc; +} + +void hw_claim_or_assert(uint8_t *bits, uint bit_index, const char *message) { + uint32_t save = hw_claim_lock(); + if (bits[bit_index >> 3u] & (1u << (bit_index & 7u))) { + panic(message, bit_index); + } else { + bits[bit_index >> 3u] |= (1u << (bit_index & 7u)); + } + hw_claim_unlock(save); +} + +int hw_claim_unused_from_range(uint8_t *bits, bool required, uint bit_lsb, uint bit_msb, const char *message) { + // don't bother check lsb / msb order as if wrong, then it'll fail anyway + uint32_t save = hw_claim_lock(); + int found_bit = -1; + for(uint bit=bit_lsb; bit <= bit_msb; bit++) { + if (!(bits[bit >> 3u] & (1u << (bit & 7u)))) { + bits[bit >> 3u] |= (1u << (bit & 7u)); + found_bit = bit; + break; + } + } + hw_claim_unlock(save); + if (found_bit < 0 && required) { + panic(message); + } + return found_bit; +} + +void hw_claim_clear(uint8_t *bits, uint bit_index) { + uint32_t save = hw_claim_lock(); + assert(bits[bit_index >> 3u] & (1u << (bit_index & 7u))); + bits[bit_index >> 3u] &= ~(1u << (bit_index & 7u)); + hw_claim_unlock(save); +} + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/include/hardware/claim.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/include/hardware/claim.h new file mode 100644 index 0000000000..0c05513557 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_claim/include/hardware/claim.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_CLAIM_H +#define _HARDWARE_CLAIM_H + +#include "pico.h" +#include "hardware/sync.h" + +/** \file claim.h + * \defgroup hardware_claim hardware_claim + * + * Lightweight hardware resource management + * + * `hardware_claim` provides a simple API for management of hardware resources at runtime. + * + * This API is usually called by other hardware specific _claiming_ APIs and provides simple + * multi-core safe methods to manipulate compact bit-sets representing hardware resources. + * + * This API allows any other library to cooperatively participate in a scheme by which + * both compile time and runtime allocation of resources can co-exist, and conflicts + * can be avoided or detected (depending on the use case) without the libraries having + * any other knowledge of each other. + * + * Facilities are providing for: + * + * 1. Claiming resources (and asserting if they are already claimed) + * 2. Freeing (unclaiming) resources + * 3. Finding unused resources + */ + +/*! \brief Atomically claim a resource, panicking if it is already in use + * \ingroup hardware_claim + * + * The resource ownership is indicated by the bit_index bit in an array of bits. + * + * \param bits pointer to an array of bits (8 bits per byte) + * \param bit_index resource to claim (bit index into array of bits) + * \param message string to display if the bit cannot be claimed; note this may have a single printf format "%d" for the bit + */ +void hw_claim_or_assert(uint8_t *bits, uint bit_index, const char *message); + +/*! \brief Atomically claim one resource out of a range of resources, optionally asserting if none are free + * \ingroup hardware_claim + * + * \param bits pointer to an array of bits (8 bits per byte) + * \param required true if this method should panic if the resource is not free + * \param bit_lsb the lower bound (inclusive) of the resource range to claim from + * \param bit_msb the upper bound (inclusive) of the resource range to claim from + * \param message string to display if the bit cannot be claimed + * \return the bit index representing the claimed or -1 if none are available in the range, and required = false + */ +int hw_claim_unused_from_range(uint8_t *bits, bool required, uint bit_lsb, uint bit_msb, const char *message); + +/*! \brief Determine if a resource is claimed at the time of the call + * \ingroup hardware_claim + * + * The resource ownership is indicated by the bit_index bit in an array of bits. + * + * \param bits pointer to an array of bits (8 bits per byte) + * \param bit_index resource to unclaim (bit index into array of bits) + * \return true if the resource is claimed + */ +bool hw_is_claimed(uint8_t *bits, uint bit_index); + +/*! \brief Atomically unclaim a resource + * \ingroup hardware_claim + * + * The resource ownership is indicated by the bit_index bit in an array of bits. + * + * \param bits pointer to an array of bits (8 bits per byte) + * \param bit_index resource to unclaim (bit index into array of bits) + */ +void hw_claim_clear(uint8_t *bits, uint bit_index); + +/*! \brief Acquire the runtime mutual exclusion lock provided by the `hardware_claim` library + * \ingroup hardware_claim + * + * This method is called automatically by the other `hw_claim_` methods, however it is provided as a convenience + * to code that might want to protect other hardware initialization code from concurrent use. + * + * \note hw_claim_lock() uses a spin lock internally, so disables interrupts on the calling core, and will deadlock + * if the calling core already owns the lock. + * + * \return a token to pass to hw_claim_unlock() + */ +uint32_t hw_claim_lock(); + +/*! \brief Release the runtime mutual exclusion lock provided by the `hardware_claim` library + * \ingroup hardware_claim + * + * \note This method MUST be called from the same core that call hw_claim_lock() + * + * \param token the token returned by the corresponding call to hw_claim_lock() + */ +void hw_claim_unlock(uint32_t token); + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/CMakeLists.txt new file mode 100644 index 0000000000..3718d833cc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/CMakeLists.txt @@ -0,0 +1,11 @@ +pico_simple_hardware_target(clocks) + +target_link_libraries(hardware_clocks INTERFACE + hardware_resets + hardware_watchdog + hardware_xosc + hardware_pll + # not currently used by clocks.c, but sensibly bundled here + # as changing frequencies may require upping voltage + hardware_vreg +) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/clocks.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/clocks.c new file mode 100644 index 0000000000..6195dcd575 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/clocks.c @@ -0,0 +1,389 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" +#include "hardware/regs/clocks.h" +#include "hardware/platform_defs.h" +#include "hardware/resets.h" +#include "hardware/clocks.h" +#include "hardware/watchdog.h" +#include "hardware/pll.h" +#include "hardware/xosc.h" +#include "hardware/irq.h" +#include "hardware/gpio.h" + +check_hw_layout(clocks_hw_t, clk[clk_adc].selected, CLOCKS_CLK_ADC_SELECTED_OFFSET); +check_hw_layout(clocks_hw_t, fc0.result, CLOCKS_FC0_RESULT_OFFSET); +check_hw_layout(clocks_hw_t, ints, CLOCKS_INTS_OFFSET); + +static uint32_t configured_freq[CLK_COUNT]; + +static resus_callback_t _resus_callback; + +// Clock muxing consists of two components: +// - A glitchless mux, which can be switched freely, but whose inputs must be +// free-running +// - An auxiliary (glitchy) mux, whose output glitches when switched, but has +// no constraints on its inputs +// Not all clocks have both types of mux. +static inline bool has_glitchless_mux(enum clock_index clk_index) { + return clk_index == clk_sys || clk_index == clk_ref; +} + +void clock_stop(enum clock_index clk_index) { + clock_hw_t *clock = &clocks_hw->clk[clk_index]; + hw_clear_bits(&clock->ctrl, CLOCKS_CLK_USB_CTRL_ENABLE_BITS); + configured_freq[clk_index] = 0; +} + +/// \tag::clock_configure[] +bool clock_configure(enum clock_index clk_index, uint32_t src, uint32_t auxsrc, uint32_t src_freq, uint32_t freq) { + uint32_t div; + + assert(src_freq >= freq); + + if (freq > src_freq) + return false; + + // Div register is 24.8 int.frac divider so multiply by 2^8 (left shift by 8) + div = (uint32_t) (((uint64_t) src_freq << 8) / freq); + + clock_hw_t *clock = &clocks_hw->clk[clk_index]; + + // If increasing divisor, set divisor before source. Otherwise set source + // before divisor. This avoids a momentary overspeed when e.g. switching + // to a faster source and increasing divisor to compensate. + if (div > clock->div) + clock->div = div; + + // If switching a glitchless slice (ref or sys) to an aux source, switch + // away from aux *first* to avoid passing glitches when changing aux mux. + // Assume (!!!) glitchless source 0 is no faster than the aux source. + if (has_glitchless_mux(clk_index) && src == CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX) { + hw_clear_bits(&clock->ctrl, CLOCKS_CLK_REF_CTRL_SRC_BITS); + while (!(clock->selected & 1u)) + tight_loop_contents(); + } + // If no glitchless mux, cleanly stop the clock to avoid glitches + // propagating when changing aux mux. Note it would be a really bad idea + // to do this on one of the glitchless clocks (clk_sys, clk_ref). + else { + hw_clear_bits(&clock->ctrl, CLOCKS_CLK_GPOUT0_CTRL_ENABLE_BITS); + if (configured_freq[clk_index] > 0) { + // Delay for 3 cycles of the target clock, for ENABLE propagation. + // Note XOSC_COUNT is not helpful here because XOSC is not + // necessarily running, nor is timer... so, 3 cycles per loop: + uint delay_cyc = configured_freq[clk_sys] / configured_freq[clk_index] + 1; + asm volatile ( + "1: \n\t" + "sub %0, #1 \n\t" + "bne 1b" + : "+r" (delay_cyc) + ); + } + } + + // Set aux mux first, and then glitchless mux if this clock has one + hw_write_masked(&clock->ctrl, + (auxsrc << CLOCKS_CLK_SYS_CTRL_AUXSRC_LSB), + CLOCKS_CLK_SYS_CTRL_AUXSRC_BITS + ); + + if (has_glitchless_mux(clk_index)) { + hw_write_masked(&clock->ctrl, + src << CLOCKS_CLK_REF_CTRL_SRC_LSB, + CLOCKS_CLK_REF_CTRL_SRC_BITS + ); + while (!(clock->selected & (1u << src))) + tight_loop_contents(); + } + + hw_set_bits(&clock->ctrl, CLOCKS_CLK_GPOUT0_CTRL_ENABLE_BITS); + + // Now that the source is configured, we can trust that the user-supplied + // divisor is a safe value. + clock->div = div; + + // Store the configured frequency + configured_freq[clk_index] = freq; + + return true; +} +/// \end::clock_configure[] + +void clocks_init(void) { + // Start tick in watchdog + watchdog_start_tick(XOSC_MHZ); + + // Everything is 48MHz on FPGA apart from RTC. Otherwise set to 0 and will be set in clock configure + if (running_on_fpga()) { + for (uint i = 0; i < CLK_COUNT; i++) { + configured_freq[i] = 48 * MHZ; + } + configured_freq[clk_rtc] = 46875; + return; + } + + // Disable resus that may be enabled from previous software + clocks_hw->resus.ctrl = 0; + + // Enable the xosc + xosc_init(); + + // Before we touch PLLs, switch sys and ref cleanly away from their aux sources. + hw_clear_bits(&clocks_hw->clk[clk_sys].ctrl, CLOCKS_CLK_SYS_CTRL_SRC_BITS); + while (clocks_hw->clk[clk_sys].selected != 0x1) + tight_loop_contents(); + hw_clear_bits(&clocks_hw->clk[clk_ref].ctrl, CLOCKS_CLK_REF_CTRL_SRC_BITS); + while (clocks_hw->clk[clk_ref].selected != 0x1) + tight_loop_contents(); + + /// \tag::pll_settings[] + // Configure PLLs + // REF FBDIV VCO POSTDIV + // PLL SYS: 12 / 1 = 12MHz * 125 = 1500MHZ / 6 / 2 = 125MHz + // PLL USB: 12 / 1 = 12MHz * 40 = 480 MHz / 5 / 2 = 48MHz + /// \end::pll_settings[] + + reset_block(RESETS_RESET_PLL_SYS_BITS | RESETS_RESET_PLL_USB_BITS); + unreset_block_wait(RESETS_RESET_PLL_SYS_BITS | RESETS_RESET_PLL_USB_BITS); + + /// \tag::pll_init[] + pll_init(pll_sys, 1, 1500 * MHZ, 6, 2); + pll_init(pll_usb, 1, 480 * MHZ, 5, 2); + /// \end::pll_init[] + + // Configure clocks + // CLK_REF = XOSC (12MHz) / 1 = 12MHz + clock_configure(clk_ref, + CLOCKS_CLK_REF_CTRL_SRC_VALUE_XOSC_CLKSRC, + 0, // No aux mux + 12 * MHZ, + 12 * MHZ); + + /// \tag::configure_clk_sys[] + // CLK SYS = PLL SYS (125MHz) / 1 = 125MHz + clock_configure(clk_sys, + CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX, + CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, + 125 * MHZ, + 125 * MHZ); + /// \end::configure_clk_sys[] + + // CLK USB = PLL USB (48MHz) / 1 = 48MHz + clock_configure(clk_usb, + 0, // No GLMUX + CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB, + 48 * MHZ, + 48 * MHZ); + + // CLK ADC = PLL USB (48MHZ) / 1 = 48MHz + clock_configure(clk_adc, + 0, // No GLMUX + CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB, + 48 * MHZ, + 48 * MHZ); + + // CLK RTC = PLL USB (48MHz) / 1024 = 46875Hz + clock_configure(clk_rtc, + 0, // No GLMUX + CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB, + 48 * MHZ, + 46875); + + // CLK PERI = clk_sys. Used as reference clock for Peripherals. No dividers so just select and enable + // Normally choose clk_sys or clk_usb + clock_configure(clk_peri, + 0, + CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS, + 125 * MHZ, + 125 * MHZ); +} + +/// \tag::clock_get_hz[] +uint32_t clock_get_hz(enum clock_index clk_index) { + return configured_freq[clk_index]; +} +/// \end::clock_get_hz[] + +void clock_set_reported_hz(enum clock_index clk_index, uint hz) { + configured_freq[clk_index] = hz; +} + +/// \tag::frequency_count_khz[] +uint32_t frequency_count_khz(uint src) { + fc_hw_t *fc = &clocks_hw->fc0; + + // If frequency counter is running need to wait for it. It runs even if the source is NULL + while(fc->status & CLOCKS_FC0_STATUS_RUNNING_BITS) { + tight_loop_contents(); + } + + // Set reference freq + fc->ref_khz = clock_get_hz(clk_ref) / 1000; + + // FIXME: Don't pick random interval. Use best interval + fc->interval = 10; + + // No min or max + fc->min_khz = 0; + fc->max_khz = 0xffffffff; + + // Set SRC which automatically starts the measurement + fc->src = src; + + while(!(fc->status & CLOCKS_FC0_STATUS_DONE_BITS)) { + tight_loop_contents(); + } + + // Return the result + return fc->result >> CLOCKS_FC0_RESULT_KHZ_LSB; +} +/// \end::frequency_count_khz[] + +static void clocks_handle_resus(void) { + // Set clk_sys back to the ref clock rather than it being forced to clk_ref + // by resus. Call the user's resus callback if they have set one + + // CLK SYS = CLK_REF. Must be running for this code to be running + uint clk_ref_freq = clock_get_hz(clk_ref); + clock_configure(clk_sys, + CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLK_REF, + 0, + clk_ref_freq, + clk_ref_freq); + + // Assert we have been resussed + assert(clocks_hw->resus.status & CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_BITS); + + // Now we have fixed clk_sys we can safely remove the resus + hw_set_bits(&clocks_hw->resus.ctrl, CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_BITS); + hw_clear_bits(&clocks_hw->resus.ctrl, CLOCKS_CLK_SYS_RESUS_CTRL_CLEAR_BITS); + + // Now we should no longer be resussed + assert(!(clocks_hw->resus.status & CLOCKS_CLK_SYS_RESUS_STATUS_RESUSSED_BITS)); + + // Call the user's callback to notify them of the resus event + if (_resus_callback) { + _resus_callback(); + } +} + +static void clocks_irq_handler(void) { + // Clocks interrupt handler. Only resus but handle irq + // defensively just in case. + uint32_t ints = clocks_hw->ints; + + if (ints & CLOCKS_INTE_CLK_SYS_RESUS_BITS) { + ints &= ~CLOCKS_INTE_CLK_SYS_RESUS_BITS; + clocks_handle_resus(); + } + +#ifndef NDEBUG + if (ints) { + panic("Unexpected clocks irq\n"); + } +#endif +} + +void clocks_enable_resus(resus_callback_t resus_callback) { + // Restart clk_sys if it is stopped by forcing it + // to the default source of clk_ref. If clk_ref stops running this will + // not work. + + // Store user's resus callback + _resus_callback = resus_callback; + + irq_set_exclusive_handler(CLOCKS_IRQ, clocks_irq_handler); + + // Enable the resus interrupt in clocks + clocks_hw->inte = CLOCKS_INTE_CLK_SYS_RESUS_BITS; + + // Enable the clocks irq + irq_set_enabled(CLOCKS_IRQ, true); + + // 2 * clk_ref freq / clk_sys_min_freq; + // assume clk_ref is 3MHz and we want clk_sys to be no lower than 1MHz + uint timeout = 2 * 3 * 1; + + // Enable resus with the maximum timeout + clocks_hw->resus.ctrl = CLOCKS_CLK_SYS_RESUS_CTRL_ENABLE_BITS | timeout; +} + +void clock_gpio_init(uint gpio, uint src, uint div) { + // Bit messy but it's as much code to loop through a lookup + // table. The sources for each gpout generators are the same + // so just call with the sources from GP0 + uint gpclk = 0; + if (gpio == 21) gpclk = clk_gpout0; + else if (gpio == 23) gpclk = clk_gpout1; + else if (gpio == 24) gpclk = clk_gpout2; + else if (gpio == 26) gpclk = clk_gpout3; + else { + invalid_params_if(CLOCKS, true); + } + + // Set up the gpclk generator + clocks_hw->clk[gpclk].ctrl = (src << CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_LSB) | + CLOCKS_CLK_GPOUT0_CTRL_ENABLE_BITS; + clocks_hw->clk[gpclk].div = div << CLOCKS_CLK_GPOUT0_DIV_INT_LSB; + + // Set gpio pin to gpclock function + gpio_set_function(gpio, GPIO_FUNC_GPCK); +} + +static const uint8_t gpin0_src[CLK_COUNT] = { + CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_GPOUT0 + CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_GPOUT1 + CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_GPOUT2 + CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_GPOUT3 + CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_REF + CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_SYS + CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_PERI + CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_USB + CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_ADC + CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0, // CLK_RTC +}; + +// Assert GPIN1 is GPIN0 + 1 +static_assert(CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_GPOUT1_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_GPOUT2_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_GPOUT3_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); +static_assert(CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 == (CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + 1), "hw mismatch"); + +bool clock_configure_gpin(enum clock_index clk_index, uint gpio, uint32_t src_freq, uint32_t freq) { + // Configure a clock to run from a GPIO input + uint gpin = 0; + if (gpio == 20) gpin = 0; + else if (gpio == 22) gpin = 1; + else { + invalid_params_if(CLOCKS, true); + } + + // Work out sources. GPIN is always an auxsrc + uint src = 0; + + // GPIN1 == GPIN0 + 1 + uint auxsrc = gpin0_src[clk_index] + gpin; + + if (has_glitchless_mux(clk_index)) { + // AUX src is always 1 + src = 1; + } + + // Set the GPIO function + gpio_set_function(gpio, GPIO_FUNC_GPCK); + + // Now we have the src, auxsrc, and configured the gpio input + // call clock configure to run the clock from a gpio + return clock_configure(clk_index, src, auxsrc, src_freq, freq); +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/include/hardware/clocks.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/include/hardware/clocks.h new file mode 100644 index 0000000000..35940eaaee --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/include/hardware/clocks.h @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_CLOCKS_H_ +#define _HARDWARE_CLOCKS_H_ + +#include "pico.h" +#include "hardware/structs/clocks.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/clocks.h + * \defgroup hardware_clocks hardware_clocks + * + * Clock Management API + * + * This API provides a high level interface to the clock functions. + * + * The clocks block provides independent clocks to on-chip and external components. It takes inputs from a variety of clock + * sources allowing the user to trade off performance against cost, board area and power consumption. From these sources + * it uses multiple clock generators to provide the required clocks. This architecture allows the user flexibility to start and + * stop clocks independently and to vary some clock frequencies whilst maintaining others at their optimum frequencies + * + * Please refer to the datasheet for more details on the RP2040 clocks. + * + * The clock source depends on which clock you are attempting to configure. The first table below shows main clock sources. If + * you are not setting the Reference clock or the System clock, or you are specifying that one of those two will be using an auxiliary + * clock source, then you will need to use one of the entries from the subsequent tables. + * + * **Main Clock Sources** + * + * Source | Reference Clock | System Clock + * -------|-----------------|--------- + * ROSC | CLOCKS_CLK_REF_CTRL_SRC_VALUE_ROSC_CLKSRC_PH | | + * Auxiliary | CLOCKS_CLK_REF_CTRL_SRC_VALUE_CLKSRC_CLK_REF_AUX | CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX + * XOSC | CLOCKS_CLK_REF_CTRL_SRC_VALUE_XOSC_CLKSRC | | + * Reference | | CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLK_REF + * + * **Auxiliary Clock Sources** + * + * The auxiliary clock sources available for use in the configure function depend on which clock is being configured. The following table + * describes the available values that can be used. Note that for clk_gpout[x], x can be 0-3. + * + * + * Aux Source | clk_gpout[x] | clk_ref | clk_sys + * -----------|------------|---------|-------- + * System PLL | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS | | CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS + * GPIO in 0 | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 | CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 | CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + * GPIO in 1 | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 | CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 | CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 + * USB PLL | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB | CLOCKS_CLK_REF_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB| CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB + * ROSC | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_ROSC_CLKSRC | | CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_ROSC_CLKSRC + * XOSC | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_XOSC_CLKSRC | | CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_ROSC_CLKSRC + * System clock | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLK_SYS | | | + * USB Clock | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLK_USB | | | + * ADC clock | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLK_ADC | | | + * RTC Clock | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLK_RTC | | | + * Ref clock | CLOCKS_CLK_GPOUTx_CTRL_AUXSRC_VALUE_CLK_REF | | | + * + * Aux Source | clk_peri | clk_usb | clk_adc + * -----------|-----------|---------|-------- + * System PLL | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS | CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS | CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS + * GPIO in 0 | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 | CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 | CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + * GPIO in 1 | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 | CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 | CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 + * USB PLL | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB | CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB | CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB + * ROSC | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH | CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH | CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH + * XOSC | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_XOSC_CLKSRC | CLOCKS_CLK_USB_CTRL_AUXSRC_VALUE_XOSC_CLKSRC | CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC + * System clock | CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS | | | + * + * Aux Source | clk_rtc + * -----------|---------- + * System PLL | CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS + * GPIO in 0 | CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN0 + * GPIO in 1 | CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_GPIN1 + * USB PLL | CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB + * ROSC | CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH + * XOSC | CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC + + * + * \section clock_example Example + * \addtogroup hardware_clocks + * \include hello_48MHz.c + */ + +#define KHZ 1000 +#define MHZ 1000000 + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_CLOCKS, Enable/disable assertions in the clocks module, type=bool, default=0, group=hardware_clocks +#ifndef PARAM_ASSERTIONS_ENABLED_CLOCKS +#define PARAM_ASSERTIONS_ENABLED_CLOCKS 0 +#endif + +/*! \brief Initialise the clock hardware + * \ingroup hardware_clocks + * + * Must be called before any other clock function. + */ +void clocks_init(); + +/*! \brief Configure the specified clock + * \ingroup hardware_clocks + * + * See the tables in the description for details on the possible values for clock sources. + * + * \param clk_index The clock to configure + * \param src The main clock source, can be 0. + * \param auxsrc The auxiliary clock source, which depends on which clock is being set. Can be 0 + * \param src_freq Frequency of the input clock source + * \param freq Requested frequency + */ +bool clock_configure(enum clock_index clk_index, uint32_t src, uint32_t auxsrc, uint32_t src_freq, uint32_t freq); + +/*! \brief Stop the specified clock + * \ingroup hardware_clocks + * + * \param clk_index The clock to stop + */ +void clock_stop(enum clock_index clk_index); + +/*! \brief Get the current frequency of the specified clock + * \ingroup hardware_clocks + * + * \param clk_index Clock + * \return Clock frequency in Hz + */ +uint32_t clock_get_hz(enum clock_index clk_index); + +/*! \brief Measure a clocks frequency using the Frequency counter. + * \ingroup hardware_clocks + * + * Uses the inbuilt frequency counter to measure the specified clocks frequency. + * Currently, this function is accurate to +-1KHz. See the datasheet for more details. + */ +uint32_t frequency_count_khz(uint src); + +/*! \brief Set the "current frequency" of the clock as reported by clock_get_hz without actually changing the clock + * \ingroup hardware_clocks + * + * \see clock_get_hz + */ +void clock_set_reported_hz(enum clock_index clk_index, uint hz); + +/// \tag::frequency_count_mhz[] +static inline float frequency_count_mhz(uint src) { + return ((float) (frequency_count_khz(src))) / KHZ; +} +/// \end::frequency_count_mhz[] + +/*! \brief Resus callback function type. + * \ingroup hardware_clocks + * + * User provided callback for a resus event (when clk_sys is stopped by the programmer and is restarted for them). + */ +typedef void (*resus_callback_t)(void); + +/*! \brief Enable the resus function. Restarts clk_sys if it is accidentally stopped. + * \ingroup hardware_clocks + * + * The resuscitate function will restart the system clock if it falls below a certain speed (or stops). This + * could happen if the clock source the system clock is running from stops. For example if a PLL is stopped. + * + * \param resus_callback a function pointer provided by the user to call if a resus event happens. + */ +void clocks_enable_resus(resus_callback_t resus_callback); + +/*! \brief Output an optionally divided clock to the specified gpio pin. + * \ingroup hardware_clocks + * + * \param gpio The GPIO pin to output the clock to. Valid GPIOs are: 21, 23, 24, 26. These GPIOs are connected to the GPOUT0-3 clock generators. + * \param src The source clock. See the register field CLOCKS_CLK_GPOUT0_CTRL_AUXSRC for a full list. The list is the same for each GPOUT clock generator. + * \param div The amount to divide the source clock by. This is useful to not overwhelm the GPIO pin with a fast clock. + */ +void clock_gpio_init(uint gpio, uint src, uint div); + +/*! \brief Configure a clock to come from a gpio input + * \ingroup hardware_clocks + * + * \param clk_index The clock to configure + * \param gpio The GPIO pin to run the clock from. Valid GPIOs are: 20 and 22. + * \param src_freq Frequency of the input clock source + * \param freq Requested frequency + */ +bool clock_configure_gpin(enum clock_index clk_index, uint gpio, uint32_t src_freq, uint32_t freq); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py new file mode 100644 index 0000000000..4d901465d3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +import argparse + +parser = argparse.ArgumentParser(description="PLL parameter calculator") +parser.add_argument("--input", "-i", default=12, help="Input (reference) frequency. Default 12 MHz", type=float) +parser.add_argument("--vco-max", default=1600, help="Override maximum VCO frequency. Default 1600 MHz", type=float) +parser.add_argument("--vco-min", default=400, help="Override minimum VCO frequency. Default 400 MHz", type=float) +parser.add_argument("--low-vco", "-l", action="store_true", help="Use a lower VCO frequency when possible. This reduces power consumption, at the cost of increased jitter") +parser.add_argument("output", help="Output frequency in MHz.", type=float) +args = parser.parse_args() + +# Fixed hardware parameters +fbdiv_range = range(16, 320 + 1) +postdiv_range = range(1, 7 + 1) + +best = (0, 0, 0, 0) +best_margin = args.output + +for fbdiv in (fbdiv_range if args.low_vco else reversed(fbdiv_range)): + vco = args.input * fbdiv + if vco < args.vco_min or vco > args.vco_max: + continue + # pd1 is inner loop so that we prefer higher ratios of pd1:pd2 + for pd2 in postdiv_range: + for pd1 in postdiv_range: + out = vco / pd1 / pd2 + margin = abs(out - args.output) + if margin < best_margin: + best = (out, fbdiv, pd1, pd2) + best_margin = margin + +print("Requested: {} MHz".format(args.output)) +print("Achieved: {} MHz".format(best[0])) +print("FBDIV: {} (VCO = {} MHz)".format(best[1], args.input * best[1])) +print("PD1: {}".format(best[2])) +print("PD2: {}".format(best[3])) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/CMakeLists.txt new file mode 100644 index 0000000000..3bbdded5a1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(hardware_divider INTERFACE) +target_sources(hardware_divider INTERFACE ${CMAKE_CURRENT_LIST_DIR}/divider.S) +target_include_directories(hardware_divider INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +target_link_libraries(hardware_divider INTERFACE hardware_structs) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/divider.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/divider.S new file mode 100644 index 0000000000..b9389c514a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/divider.S @@ -0,0 +1,76 @@ +#include "pico/asm_helper.S" +#include "hardware/regs/addressmap.h" +#include "hardware/regs/sio.h" + +.syntax unified +.cpu cortex-m0plus +.thumb + +// tag::hw_div_s32[] + +.macro __divider_delay + // delay 8 cycles + b 1f +1: b 1f +1: b 1f +1: b 1f +1: +.endm + +.align 2 + +regular_func_with_section hw_divider_divmod_s32 + ldr r3, =(SIO_BASE) + str r0, [r3, #SIO_DIV_SDIVIDEND_OFFSET] + str r1, [r3, #SIO_DIV_SDIVISOR_OFFSET] + __divider_delay + // return 64 bit value so we can efficiently return both (note quotient must be read last) + ldr r1, [r3, #SIO_DIV_REMAINDER_OFFSET] + ldr r0, [r3, #SIO_DIV_QUOTIENT_OFFSET] + bx lr +// end::hw_div_s32[] + +.align 2 + +// tag::hw_div_u32[] +regular_func_with_section hw_divider_divmod_u32 + ldr r3, =(SIO_BASE) + str r0, [r3, #SIO_DIV_UDIVIDEND_OFFSET] + str r1, [r3, #SIO_DIV_UDIVISOR_OFFSET] + __divider_delay + // return 64 bit value so we can efficiently return both (note quotient must be read last) + ldr r1, [r3, #SIO_DIV_REMAINDER_OFFSET] + ldr r0, [r3, #SIO_DIV_QUOTIENT_OFFSET] + bx lr +// end::hw_div_u32[] + +#if SIO_DIV_CSR_READY_LSB == 0 +.equ SIO_DIV_CSR_READY_SHIFT_FOR_CARRY, 1 +#else +#error need to change SHIFT above +#endif + +regular_func_with_section hw_divider_save_state + push {r4, r5, lr} + ldr r5, =SIO_BASE + ldr r4, [r5, #SIO_DIV_CSR_OFFSET] + # wait for results as we can't save signed-ness of operation +1: + lsrs r4, #SIO_DIV_CSR_READY_SHIFT_FOR_CARRY + bcc 1b + ldr r1, [r5, #SIO_DIV_UDIVIDEND_OFFSET] + ldr r2, [r5, #SIO_DIV_UDIVISOR_OFFSET] + ldr r3, [r5, #SIO_DIV_REMAINDER_OFFSET] + ldr r4, [r5, #SIO_DIV_QUOTIENT_OFFSET] + stmia r0!, {r1-r4} + pop {r4, r5, pc} + +regular_func_with_section hw_divider_restore_state + push {r4, r5, lr} + ldr r5, =SIO_BASE + ldmia r0!, {r1-r4} + str r1, [r5, #SIO_DIV_UDIVIDEND_OFFSET] + str r2, [r5, #SIO_DIV_UDIVISOR_OFFSET] + str r3, [r5, #SIO_DIV_REMAINDER_OFFSET] + str r4, [r5, #SIO_DIV_QUOTIENT_OFFSET] + pop {r4, r5, pc} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/include/hardware/divider.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/include/hardware/divider.h new file mode 100644 index 0000000000..1c76f51729 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_divider/include/hardware/divider.h @@ -0,0 +1,395 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_DIVIDER_H +#define _HARDWARE_DIVIDER_H + +#include "pico.h" +#include "hardware/structs/sio.h" + +/** \file hardware/divider.h + * \defgroup hardware_divider hardware_divider + * + * Low-level hardware-divider access + * + * The SIO contains an 8-cycle signed/unsigned divide/modulo circuit, per core. Calculation is started by writing a dividend + * and divisor to the two argument registers, DIVIDEND and DIVISOR. The divider calculates the quotient / and remainder % of + * this division over the next 8 cycles, and on the 9th cycle the results can be read from the two result registers + * DIV_QUOTIENT and DIV_REMAINDER. A 'ready' bit in register DIV_CSR can be polled to wait for the calculation to + * complete, or software can insert a fixed 8-cycle delay + * + * This header provides low level macros and inline functions for accessing the hardware dividers directly, + * and perhaps most usefully performing asynchronous divides. These functions however do not follow the regular + * Pico SDK conventions for saving/restoring the divider state, so are not generally safe to call from interrupt handlers + * + * The pico_divider library provides a more user friendly set of APIs over the divider (and support for + * 64 bit divides), and of course by default regular C language integer divisions are redirected through that library, meaning + * you can just use C level `/` and `%` operators and gain the benefits of the fast hardware divider. + * + * @see pico_divider + * + * \subsection divider_example Example + * \addtogroup hardware_divider + * \include hello_divider.c + */ + +typedef uint64_t divmod_result_t; + +/*! \brief Start a signed asynchronous divide + * \ingroup hardware_divider + * + * Start a divide of the specified signed parameters. You should wait for 8 cycles (__div_pause()) or wait for the ready bit to be set + * (hw_divider_wait_ready()) prior to reading the results. + * + * \param a The dividend + * \param b The divisor + */ +static inline void hw_divider_divmod_s32_start(int32_t a, int32_t b) { + check_hw_layout( sio_hw_t, div_sdividend, SIO_DIV_SDIVIDEND_OFFSET); + sio_hw->div_sdividend = a; + sio_hw->div_sdivisor = b; +} + +/*! \brief Start an unsigned asynchronous divide + * \ingroup hardware_divider + * + * Start a divide of the specified unsigned parameters. You should wait for 8 cycles (__div_pause()) or wait for the ready bit to be set + * (hw_divider_wait_ready()) prior to reading the results. + * + * \param a The dividend + * \param b The divisor + */ +static inline void hw_divider_divmod_u32_start(uint32_t a, uint32_t b) { + check_hw_layout( + sio_hw_t, div_udividend, SIO_DIV_UDIVIDEND_OFFSET); + sio_hw->div_udividend = a; + sio_hw->div_udivisor = b; +} + +/*! \brief Wait for a divide to complete + * \ingroup hardware_divider + * + * Wait for a divide to complete + */ +static inline void hw_divider_wait_ready() { + // this is #1 in lsr below + static_assert(SIO_DIV_CSR_READY_BITS == 1, ""); + + // we use one less register and instruction than gcc which uses a TST instruction + + uint32_t tmp; // allow compiler to pick scratch register + asm volatile ( + "hw_divider_result_loop_%=:" + "ldr %0, [%1, %2]\n\t" + "lsr %0, #1\n\t" + "bcc hw_divider_result_loop_%=\n\t" + : "=&l" (tmp) + : "l" (sio_hw), "I" (SIO_DIV_CSR_OFFSET) + : + ); +} + +/*! \brief Return result of HW divide, nowait + * \ingroup hardware_divider + * + * \note This is UNSAFE in that the calculation may not have been completed. + * + * \return Current result. Most significant 32 bits are the remainder, lower 32 bits are the quotient. + */ +static inline divmod_result_t hw_divider_result_nowait() { + // as ugly as this looks it is actually quite efficient + divmod_result_t rc = (((divmod_result_t) sio_hw->div_remainder) << 32u) | sio_hw->div_quotient; + return rc; +} + +/*! \brief Return result of last asynchronous HW divide + * \ingroup hardware_divider + * + * This function waits for the result to be ready by calling hw_divider_wait_ready(). + * + * \return Current result. Most significant 32 bits are the remainder, lower 32 bits are the quotient. + */ +static inline divmod_result_t hw_divider_result_wait() { + hw_divider_wait_ready(); + return hw_divider_result_nowait(); +} + +/*! \brief Return result of last asynchronous HW divide, unsigned quotient only + * \ingroup hardware_divider + * + * This function waits for the result to be ready by calling hw_divider_wait_ready(). + * + * \return Current unsigned quotient result. + */ +static inline uint32_t hw_divider_u32_quotient_wait() { + hw_divider_wait_ready(); + return sio_hw->div_quotient; +} + +/*! \brief Return result of last asynchronous HW divide, signed quotient only + * \ingroup hardware_divider + * + * This function waits for the result to be ready by calling hw_divider_wait_ready(). + * + * \return Current signed quotient result. + */ +static inline int32_t hw_divider_s32_quotient_wait() { + hw_divider_wait_ready(); + return sio_hw->div_quotient; +} + +/*! \brief Return result of last asynchronous HW divide, unsigned remainder only + * \ingroup hardware_divider + * + * This function waits for the result to be ready by calling hw_divider_wait_ready(). + * + * \return Current unsigned remainder result. + */ +static inline uint32_t hw_divider_u32_remainder_wait() { + hw_divider_wait_ready(); + int32_t rc = sio_hw->div_remainder; + sio_hw->div_quotient; // must read quotient to cooperate with other SDK code + return rc; +} + +/*! \brief Return result of last asynchronous HW divide, signed remainder only + * \ingroup hardware_divider + * + * This function waits for the result to be ready by calling hw_divider_wait_ready(). + * + * \return Current remainder results. + */ +static inline int32_t hw_divider_s32_remainder_wait() { + hw_divider_wait_ready(); + int32_t rc = sio_hw->div_remainder; + sio_hw->div_quotient; // must read quotient to cooperate with other SDK code + return rc; +} + +/*! \brief Do a signed HW divide and wait for result + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return result as a fixed point 32p32 value. + * + * \param a The dividend + * \param b The divisor + * \return Results of divide as a 32p32 fixed point value. + */ +divmod_result_t hw_divider_divmod_s32(int32_t a, int32_t b); + +/*! \brief Do an unsigned HW divide and wait for result + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return result as a fixed point 32p32 value. + * + * \param a The dividend + * \param b The divisor + * \return Results of divide as a 32p32 fixed point value. + */ +divmod_result_t hw_divider_divmod_u32(uint32_t a, uint32_t b); + +/*! \brief Efficient extraction of unsigned quotient from 32p32 fixed point + * \ingroup hardware_divider + * + * \param r 32p32 fixed point value. + * \return Unsigned quotient + */ +inline static uint32_t to_quotient_u32(divmod_result_t r) { + return (uint32_t) r; +} + +/*! \brief Efficient extraction of signed quotient from 32p32 fixed point + * \ingroup hardware_divider + * + * \param r 32p32 fixed point value. + * \return Unsigned quotient + */ +inline static int32_t to_quotient_s32(divmod_result_t r) { + return (int32_t)(uint32_t)r; +} + +/*! \brief Efficient extraction of unsigned remainder from 32p32 fixed point + * \ingroup hardware_divider + * + * \param r 32p32 fixed point value. + * \return Unsigned remainder + * + * \note On Arm this is just a 32 bit register move or a nop + */ +inline static uint32_t to_remainder_u32(divmod_result_t r) { + return (uint32_t)(r >> 32u); +} + +/*! \brief Efficient extraction of signed remainder from 32p32 fixed point + * \ingroup hardware_divider + * + * \param r 32p32 fixed point value. + * \return Signed remainder + * + * \note On arm this is just a 32 bit register move or a nop + */ +inline static int32_t to_remainder_s32(divmod_result_t r) { + return (int32_t)(r >> 32u); +} + +/*! \brief Do an unsigned HW divide, wait for result, return quotient + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return quotient. + * + * \param a The dividend + * \param b The divisor + * \return Quotient results of the divide + */ +static inline uint32_t hw_divider_u32_quotient(uint32_t a, uint32_t b) { + return to_quotient_u32(hw_divider_divmod_u32(a, b)); +} + +/*! \brief Do an unsigned HW divide, wait for result, return remainder + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return remainder. + * + * \param a The dividend + * \param b The divisor + * \return Remainder results of the divide + */ +static inline uint32_t hw_divider_u32_remainder(uint32_t a, uint32_t b) { + return to_remainder_u32(hw_divider_divmod_u32(a, b)); +} + +/*! \brief Do a signed HW divide, wait for result, return quotient + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return quotient. + * + * \param a The dividend + * \param b The divisor + * \return Quotient results of the divide + */ +static inline int32_t hw_divider_quotient_s32(int32_t a, int32_t b) { + return to_quotient_s32(hw_divider_divmod_s32(a, b)); +} + +/*! \brief Do a signed HW divide, wait for result, return remainder + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return remainder. + * + * \param a The dividend + * \param b The divisor + * \return Remainder results of the divide + */ +static inline int32_t hw_divider_remainder_s32(int32_t a, int32_t b) { + return to_remainder_s32(hw_divider_divmod_s32(a, b)); +} + +/*! \brief Pause for exact amount of time needed for a asynchronous divide to complete + * \ingroup hardware_divider + */ +static inline void hw_divider_pause() { + asm volatile ( + "b _1_%=\n" + "_1_%=:\n" + "b _2_%=\n" + "_2_%=:\n" + "b _3_%=\n" + "_3_%=:\n" + "b _4_%=\n" + "_4_%=:\n" + :: : ); +} + +/*! \brief Do a hardware unsigned HW divide, wait for result, return quotient + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return quotient. + * + * \param a The dividend + * \param b The divisor + * \return Quotient result of the divide + */ +static inline uint32_t hw_divider_u32_quotient_inlined(uint32_t a, uint32_t b) { + hw_divider_divmod_u32_start(a, b); + hw_divider_pause(); + return sio_hw->div_quotient; +} + +/*! \brief Do a hardware unsigned HW divide, wait for result, return remainder + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return remainder. + * + * \param a The dividend + * \param b The divisor + * \return Remainder result of the divide + */ +static inline uint32_t hw_divider_u32_remainder_inlined(uint32_t a, uint32_t b) { + hw_divider_divmod_u32_start(a, b); + hw_divider_pause(); + int32_t rc = sio_hw->div_remainder; + sio_hw->div_quotient; // must read quotient to cooperate with other SDK code + return rc; +} + +/*! \brief Do a hardware signed HW divide, wait for result, return quotient + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return quotient. + * + * \param a The dividend + * \param b The divisor + * \return Quotient result of the divide + */ +static inline int32_t hw_divider_s32_quotient_inlined(int32_t a, int32_t b) { + hw_divider_divmod_s32_start(a, b); + hw_divider_pause(); + return sio_hw->div_quotient; +} + +/*! \brief Do a hardware signed HW divide, wait for result, return remainder + * \ingroup hardware_divider + * + * Divide \p a by \p b, wait for calculation to complete, return remainder. + * + * \param a The dividend + * \param b The divisor + * \return Remainder result of the divide + */ +static inline int32_t hw_divider_s32_remainder_inlined(int32_t a, int32_t b) { + hw_divider_divmod_s32_start(a, b); + hw_divider_pause(); + int32_t rc = sio_hw->div_remainder; + sio_hw->div_quotient; // must read quotient to cooperate with other SDK code + return rc; +} + +typedef struct { + uint32_t values[4]; +} hw_divider_state_t; + +/*! \brief Save the calling cores hardware divider state + * \ingroup hardware_divider + * + * Copy the current core's hardware divider state into the provided structure. This method + * waits for the divider results to be stable, then copies them to memory. + * They can be restored via hw_divider_restore_state() + * + * \param dest the location to store the divider state + */ +void hw_divider_save_state(hw_divider_state_t *dest); + +/*! \brief Load a saved hardware divider state into the current core's hardware divider + * \ingroup hardware_divider + * + * Copy the passed hardware divider state into the hardware divider. + * + * \param src the location to load the divider state from + */ + +void hw_divider_restore_state(hw_divider_state_t *src); + +#endif // _HARDWARE_DIVIDER_H diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/CMakeLists.txt new file mode 100644 index 0000000000..fe08541736 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/CMakeLists.txt @@ -0,0 +1,2 @@ +pico_simple_hardware_target(dma) +target_link_libraries(hardware_dma INTERFACE hardware_claim) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/dma.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/dma.c new file mode 100644 index 0000000000..c912e7f0c5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/dma.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "hardware/dma.h" +#include "hardware/claim.h" + +#define DMA_CHAN_STRIDE (DMA_CH1_CTRL_TRIG_OFFSET - DMA_CH0_CTRL_TRIG_OFFSET) +check_hw_size(dma_channel_hw_t, DMA_CHAN_STRIDE); +check_hw_layout(dma_hw_t, abort, DMA_CHAN_ABORT_OFFSET); + +// sanity check +static_assert(__builtin_offsetof(dma_hw_t, ch[0].ctrl_trig) == DMA_CH0_CTRL_TRIG_OFFSET, "hw mismatch"); +static_assert(__builtin_offsetof(dma_hw_t, ch[1].ctrl_trig) == DMA_CH1_CTRL_TRIG_OFFSET, "hw mismatch"); + +static_assert(NUM_DMA_CHANNELS <= 16, ""); +static uint16_t _claimed; + +void dma_channel_claim(uint channel) { + check_dma_channel_param(channel); + hw_claim_or_assert((uint8_t *) &_claimed, channel, "DMA channel %d is already claimed"); +} + +void dma_claim_mask(uint32_t mask) { + for(uint i = 0; mask; i++, mask >>= 1u) { + if (mask & 1u) dma_channel_claim(i); + } +} + +void dma_channel_unclaim(uint channel) { + check_dma_channel_param(channel); + hw_claim_clear((uint8_t *) &_claimed, channel); +} + +int dma_claim_unused_channel(bool required) { + return hw_claim_unused_from_range((uint8_t*)&_claimed, required, 0, NUM_DMA_CHANNELS-1, "No DMA channels are available"); +} + +#ifndef NDEBUG + +void print_dma_ctrl(dma_channel_hw_t *channel) { + uint32_t ctrl = channel->ctrl_trig; + int rgsz = (ctrl & DMA_CH0_CTRL_TRIG_RING_SIZE_BITS) >> DMA_CH0_CTRL_TRIG_RING_SIZE_LSB; + printf("(%08x) ber %d rer %d wer %d busy %d trq %d cto %d rgsl %d rgsz %d inw %d inr %d sz %d hip %d en %d", + (uint) ctrl, + ctrl & DMA_CH0_CTRL_TRIG_AHB_ERROR_BITS ? 1 : 0, + ctrl & DMA_CH0_CTRL_TRIG_READ_ERROR_BITS ? 1 : 0, + ctrl & DMA_CH0_CTRL_TRIG_WRITE_ERROR_BITS ? 1 : 0, + ctrl & DMA_CH0_CTRL_TRIG_BUSY_BITS ? 1 : 0, + (int) ((ctrl & DMA_CH0_CTRL_TRIG_TREQ_SEL_BITS) >> DMA_CH0_CTRL_TRIG_TREQ_SEL_LSB), + (int) ((ctrl & DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) >> DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB), + ctrl & DMA_CH0_CTRL_TRIG_RING_SEL_BITS ? 1 : 0, + rgsz ? (1 << rgsz) : 0, + ctrl & DMA_CH0_CTRL_TRIG_INCR_WRITE_BITS ? 1 : 0, + ctrl & DMA_CH0_CTRL_TRIG_INCR_READ_BITS ? 1 : 0, + 1 << ((ctrl & DMA_CH0_CTRL_TRIG_DATA_SIZE_BITS) >> DMA_CH0_CTRL_TRIG_DATA_SIZE_LSB), + ctrl & DMA_CH0_CTRL_TRIG_HIGH_PRIORITY_BITS ? 1 : 0, + ctrl & DMA_CH0_CTRL_TRIG_EN_BITS ? 1 : 0); +} + +void check_dma_channel_param_impl(uint channel) { + valid_params_if(DMA, channel < NUM_DMA_CHANNELS); +} + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/include/hardware/dma.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/include/hardware/dma.h new file mode 100644 index 0000000000..e107c54187 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_dma/include/hardware/dma.h @@ -0,0 +1,591 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_DMA_H_ +#define _HARDWARE_DMA_H_ + +#include "pico.h" +#include "hardware/structs/dma.h" +#include "hardware/regs/dreq.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/dma.h + * \defgroup hardware_dma hardware_dma + * + * DMA Controller API + * + * The RP2040 Direct Memory Access (DMA) master performs bulk data transfers on a processor’s + * behalf. This leaves processors free to attend to other tasks, or enter low-power sleep states. The + * data throughput of the DMA is also significantly higher than one of RP2040’s processors. + * + * The DMA can perform one read access and one write access, up to 32 bits in size, every clock cycle. + * There are 12 independent channels, which each supervise a sequence of bus transfers, usually in + * one of the following scenarios: + * + * * Memory to peripheral + * * Peripheral to memory + * * Memory to memory + */ + +// this is not defined in generated dreq.h +#define DREQ_FORCE 63 + +/*! \brief Mark a dma channel as used + * \ingroup hardware_dma + * + * Method for cooperative claiming of hardware. Will cause a panic if the channel + * is already claimed. Use of this method by libraries detects accidental + * configurations that would fail in unpredictable ways. + * + * \param channel the dma channel + */ +void dma_channel_claim(uint channel); + +/*! \brief Mark multiple dma channels as used + * \ingroup hardware_dma + * + * Method for cooperative claiming of hardware. Will cause a panic if any of the channels + * are already claimed. Use of this method by libraries detects accidental + * configurations that would fail in unpredictable ways. + * + * \param channel_mask Bitfield of all required channels to claim (bit 0 == channel 0, bit 1 == channel 1 etc) + */ +void dma_claim_mask(uint32_t channel_mask); + +/*! \brief Mark a dma channel as no longer used + * \ingroup hardware_dma + * + * Method for cooperative claiming of hardware. + * + * \param channel the dma channel to release + */ +void dma_channel_unclaim(uint channel); + +/*! \brief Claim a free dma channel + * \ingroup hardware_dma + * + * \param required if true the function will panic if none are available + * \return the dma channel number or -1 if required was false, and none were free + */ +int dma_claim_unused_channel(bool required); + +/** \brief DMA channel configuration + * \defgroup channel_config channel_config + * \ingroup hardware_dma + * + * A DMA channel needs to be configured, these functions provide handy helpers to set up configuration + * structures. See \ref dma_channel_config + * + */ + +/*! \brief Enumeration of available DMA channel transfer sizes. + * \ingroup hardware_dma + * + * Names indicate the number of bits. + */ +enum dma_channel_transfer_size { + DMA_SIZE_8 = 0, ///< Byte transfer (8 bits) + DMA_SIZE_16 = 1, ///< Half word transfer (16 bits) + DMA_SIZE_32 = 2 ///< Word transfer (32 bits) +}; + +typedef struct { + uint32_t ctrl; +} dma_channel_config; + +/*! \brief Set DMA channel read increment + * \ingroup channel_config + * + * \param c Pointer to channel configuration data + * \param incr True to enable read address increments, if false, each read will be from the same address + * Usually disabled for peripheral to memory transfers + */ +static inline void channel_config_set_read_increment(dma_channel_config *c, bool incr) { + c->ctrl = incr ? (c->ctrl | DMA_CH0_CTRL_TRIG_INCR_READ_BITS) : (c->ctrl & ~DMA_CH0_CTRL_TRIG_INCR_READ_BITS); +} + +/*! \brief Set DMA channel write increment + * \ingroup channel_config + * + * \param c Pointer to channel configuration data + * \param incr True to enable write address increments, if false, each write will be to the same address + * Usually disabled for memory to peripheral transfers + * Usually disabled for memory to peripheral transfers + */ +static inline void channel_config_set_write_increment(dma_channel_config *c, bool incr) { + c->ctrl = incr ? (c->ctrl | DMA_CH0_CTRL_TRIG_INCR_WRITE_BITS) : (c->ctrl & ~DMA_CH0_CTRL_TRIG_INCR_WRITE_BITS); +} + +/*! \brief Select a transfer request signal + * \ingroup channel_config + * + * The channel uses the transfer request signal to pace its data transfer rate. + * Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system). + * 0x0 to 0x3a -> select DREQ n as TREQ + * 0x3b -> Select Timer 0 as TREQ + * 0x3c -> Select Timer 1 as TREQ + * 0x3d -> Select Timer 2 as TREQ (Optional) + * 0x3e -> Select Timer 3 as TREQ (Optional) + * 0x3f -> Permanent request, for unpaced transfers. + * + * \param c Pointer to channel configuration data + * \param dreq Source (see description) + */ +static inline void channel_config_set_dreq(dma_channel_config *c, uint dreq) { + assert(dreq <= DREQ_FORCE); + c->ctrl = (c->ctrl & ~DMA_CH0_CTRL_TRIG_TREQ_SEL_BITS) | (dreq << DMA_CH0_CTRL_TRIG_TREQ_SEL_LSB); +} + +/*! \brief Set DMA channel completion channel + * \ingroup channel_config + * + * When this channel completes, it will trigger the channel indicated by chain_to. Disable by + * setting chain_to to itself (the same channel) + * + * \param c Pointer to channel configuration data + * \param chain_to Channel to trigger when this channel completes. + */ +static inline void channel_config_set_chain_to(dma_channel_config *c, uint chain_to) { + assert(chain_to <= NUM_DMA_CHANNELS); + c->ctrl = (c->ctrl & ~DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS) | (chain_to << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); +} + +/*! \brief Set the size of each DMA bus transfer + * \ingroup channel_config + * + * Set the size of each bus transfer (byte/halfword/word). The read and write addresses + * advance by the specific amount (1/2/4 bytes) with each transfer. + * + * \param c Pointer to channel configuration data + * \param size See enum for possible values. + */ +static inline void channel_config_set_transfer_data_size(dma_channel_config *c, enum dma_channel_transfer_size size) { + assert(size == DMA_SIZE_8 || size == DMA_SIZE_16 || size == DMA_SIZE_32); + c->ctrl = (c->ctrl & ~DMA_CH0_CTRL_TRIG_DATA_SIZE_BITS) | (size << DMA_CH0_CTRL_TRIG_DATA_SIZE_LSB); +} + +/*! \brief Set address wrapping parameters + * \ingroup channel_config + * + * Size of address wrap region. If 0, don’t wrap. For values n > 0, only the lower n bits of the address + * will change. This wraps the address on a (1 << n) byte boundary, facilitating access to naturally-aligned + * ring buffers. + * Ring sizes between 2 and 32768 bytes are possible (size_bits from 1 - 15) + * + * 0x0 -> No wrapping. + * + * \param c Pointer to channel configuration data + * \param write True to apply to write addresses, false to apply to read addresses + * \param size_bits 0 to disable wrapping. Otherwise the size in bits of the changing part of the address. + * Effectively wraps the address on a (1 << size_bits) byte boundary. + */ +static inline void channel_config_set_ring(dma_channel_config *c, bool write, uint size_bits) { + assert(size_bits < 32); + c->ctrl = (c->ctrl & ~(DMA_CH0_CTRL_TRIG_RING_SIZE_BITS | DMA_CH0_CTRL_TRIG_RING_SEL_BITS)) | + (size_bits << DMA_CH0_CTRL_TRIG_RING_SIZE_LSB) | + (write ? DMA_CH0_CTRL_TRIG_RING_SEL_BITS : 0); +} + +/*! \brief Set DMA byte swapping + * \ingroup channel_config + * + * No effect for byte data, for halfword data, the two bytes of each halfword are + * swapped. For word data, the four bytes of each word are swapped to reverse their order. + * + * \param c Pointer to channel configuration data + * \param bswap True to enable byte swapping + */ +static inline void channel_config_set_bswap(dma_channel_config *c, bool bswap) { + c->ctrl = bswap ? (c->ctrl | DMA_CH0_CTRL_TRIG_BSWAP_BITS) : (c->ctrl & ~DMA_CH0_CTRL_TRIG_BSWAP_BITS); +} + +/*! \brief Set IRQ quiet mode + * \ingroup channel_config + * + * In QUIET mode, the channel does not generate IRQs at the end of every transfer block. Instead, + * an IRQ is raised when NULL is written to a trigger register, indicating the end of a control + * block chain. + * + * \param c Pointer to channel configuration data + * \param irq_quiet True to enable quiet mode, false to disable. + */ +static inline void channel_config_set_irq_quiet(dma_channel_config *c, bool irq_quiet) { + c->ctrl = irq_quiet ? (c->ctrl | DMA_CH0_CTRL_TRIG_IRQ_QUIET_BITS) : (c->ctrl & ~DMA_CH0_CTRL_TRIG_IRQ_QUIET_BITS); +} + +/*! + * \brief Enable/Disable the DMA channel + * \ingroup channel_config + * + * When false, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will + * remain high if already high) + * + * \param c Pointer to channel configuration data + * \param enable True to enable the DMA channel. When enabled, the channel will respond to triggering events, and start transferring data. + * + */ +static inline void channel_config_set_enable(dma_channel_config *c, bool enable) { + c->ctrl = enable ? (c->ctrl | DMA_CH0_CTRL_TRIG_EN_BITS) : (c->ctrl & ~DMA_CH0_CTRL_TRIG_EN_BITS); +} + +/*! \brief Enable access to channel by sniff hardware. + * \ingroup channel_config + * + * Sniff HW must be enabled and have this channel selected. + * + * \param c Pointer to channel configuration data + * \param sniff_enable True to enable the Sniff HW access to this DMA channel. + */ +static inline void channel_config_set_sniff_enable(dma_channel_config *c, bool sniff_enable) { + c->ctrl = sniff_enable ? (c->ctrl | DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS) : (c->ctrl & + ~DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS); +} + +/*! \brief Get the default channel configuration for a given channel + * \ingroup channel_config + * + * Setting | Default + * --------|-------- + * Read Increment | true + * Write Increment | false + * DReq | DREQ_FORCE + * Chain to | self + * Data size | DMA_SIZE_32 + * Ring | write=false, size=0 (i.e. off) + * Byte Swap | false + * Quiet IRQs | false + * Channel Enable | true + * Sniff Enable | false + * + * \param channel DMA channel + * \return the default configuration which can then be modified. + */ +static inline dma_channel_config dma_channel_get_default_config(uint channel) { + dma_channel_config c = {0}; + channel_config_set_read_increment(&c, true); + channel_config_set_write_increment(&c, false); + channel_config_set_dreq(&c, DREQ_FORCE); + channel_config_set_chain_to(&c, channel); + channel_config_set_transfer_data_size(&c, DMA_SIZE_32); + channel_config_set_ring(&c, false, 0); + channel_config_set_bswap(&c, false); + channel_config_set_irq_quiet(&c, false); + channel_config_set_enable(&c, true); + channel_config_set_sniff_enable(&c, false); + return c; +} + +/*! \brief Get the current configuration for the specified channel. + * \ingroup channel_config + * + * \param channel DMA channel + * \return The current configuration as read from the HW register (not cached) + */ +static inline dma_channel_config dma_get_channel_config(uint channel) { + dma_channel_config c; + c.ctrl = dma_channel_hw_addr(channel)->ctrl_trig; + return c; +} + +/*! \brief Get the raw configuration register from a channel configuration + * \ingroup channel_config + * + * \param config Pointer to a config structure. + * \return Register content + */ +static inline uint32_t channel_config_get_ctrl_value(const dma_channel_config *config) { + return config->ctrl; +} + +/*! \brief Set a channel configuration + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param config Pointer to a config structure with required configuration + * \param trigger True to trigger the transfer immediately + */ +static inline void dma_channel_set_config(uint channel, const dma_channel_config *config, bool trigger) { + // Don't use CTRL_TRIG since we don't want to start a transfer + if (!trigger) { + dma_channel_hw_addr(channel)->al1_ctrl = channel_config_get_ctrl_value(config); + } else { + dma_channel_hw_addr(channel)->ctrl_trig = channel_config_get_ctrl_value(config); + } +} + +/*! \brief Set the DMA initial read address. + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param read_addr Initial read address of transfer. + * \param trigger True to start the transfer immediately + */ +static inline void dma_channel_set_read_addr(uint channel, const volatile void *read_addr, bool trigger) { + if (!trigger) { + dma_channel_hw_addr(channel)->read_addr = (uintptr_t) read_addr; + } else { + dma_channel_hw_addr(channel)->al3_read_addr_trig = (uintptr_t) read_addr; + } +} + +/*! \brief Set the DMA initial read address + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param write_addr Initial write address of transfer. + * \param trigger True to start the transfer immediately + */ +static inline void dma_channel_set_write_addr(uint channel, volatile void *write_addr, bool trigger) { + if (!trigger) { + dma_channel_hw_addr(channel)->write_addr = (uintptr_t) write_addr; + } else { + dma_channel_hw_addr(channel)->al2_write_addr_trig = (uintptr_t) write_addr; + } +} + +/*! \brief Set the number of bus transfers the channel will do + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param trans_count The number of transfers (not NOT bytes, see channel_config_set_transfer_data_size) + * \param trigger True to start the transfer immediately + */ +static inline void dma_channel_set_trans_count(uint channel, uint32_t trans_count, bool trigger) { + if (!trigger) { + dma_channel_hw_addr(channel)->transfer_count = trans_count; + } else { + dma_channel_hw_addr(channel)->al1_transfer_count_trig = trans_count; + } +} + +/*! \brief Configure all DMA parameters and optionally start transfer + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param config Pointer to DMA config structure + * \param write_addr Initial write address + * \param read_addr Initial read address + * \param transfer_count Number of transfers to perform + * \param trigger True to start the transfer immediately + */ +static inline void dma_channel_configure(uint channel, const dma_channel_config *config, volatile void *write_addr, + const volatile void *read_addr, + uint transfer_count, bool trigger) { + dma_channel_set_read_addr(channel, read_addr, false); + dma_channel_set_write_addr(channel, write_addr, false); + dma_channel_set_trans_count(channel, transfer_count, false); + dma_channel_set_config(channel, config, trigger); +} + +/*! \brief Start a DMA transfer from a buffer immediately + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param read_addr Sets the initial read address + * \param transfer_count Number of transfers to make. Not bytes, but the number of transfers of channel_config_set_transfer_data_size() to be sent. + */ +inline static void __attribute__((always_inline)) dma_channel_transfer_from_buffer_now(uint channel, void *read_addr, + uint32_t transfer_count) { +// check_dma_channel_param(channel); + dma_channel_hw_t *hw = dma_channel_hw_addr(channel); + hw->read_addr = (uintptr_t) read_addr; + hw->al1_transfer_count_trig = transfer_count; +} + +/*! \brief Start a DMA transfer to a buffer immediately + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param write_addr Sets the initial write address + * \param transfer_count Number of transfers to make. Not bytes, but the number of transfers of channel_config_set_transfer_data_size() to be sent. + */ +inline static void dma_channel_transfer_to_buffer_now(uint channel, void *write_addr, uint32_t transfer_count) { + dma_channel_hw_t *hw = dma_channel_hw_addr(channel); + hw->write_addr = (uintptr_t) write_addr; + hw->al1_transfer_count_trig = transfer_count; +} + +/*! \brief Start one or more channels simultaneously + * \ingroup hardware_dma + * + * \param chan_mask Bitmask of all the channels requiring starting. Channel 0 = bit 0, channel 1 = bit 1 etc. + */ +static inline void dma_start_channel_mask(uint32_t chan_mask) { + valid_params_if(DMA, chan_mask && chan_mask < (1u << NUM_DMA_CHANNELS)); + dma_hw->multi_channel_trigger = chan_mask; +} + +/*! \brief Start a single DMA channel + * \ingroup hardware_dma + * + * \param channel DMA channel + */ +static inline void dma_channel_start(uint channel) { + dma_start_channel_mask(1u << channel); +} + +/*! \brief Stop a DMA transfer + * \ingroup hardware_dma + * + * Function will only return once the DMA has stopped. + * + * \param channel DMA channel + */ +static inline void dma_channel_abort(uint channel) { + check_dma_channel_param(channel); + dma_hw->abort = 1u << channel; + // Bit will go 0 once channel has reached safe state + // (i.e. any in-flight transfers have retired) + while (dma_hw->abort & (1ul << channel)) tight_loop_contents(); +} + +/*! \brief Enable single DMA channel interrupt 0 + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param enabled true to enable interrupt 0 on specified channel, false to disable. + */ +static inline void dma_channel_set_irq0_enabled(uint channel, bool enabled) { + check_dma_channel_param(channel); + check_hw_layout(dma_hw_t, inte0, DMA_INTE0_OFFSET); + if (enabled) + hw_set_bits(&dma_hw->inte0, 1u << channel); + else + hw_clear_bits(&dma_hw->inte0, 1u << channel); +} + +/*! \brief Enable multiple DMA channels interrupt 0 + * \ingroup hardware_dma + * + * \param channel_mask Bitmask of all the channels to enable/disable. Channel 0 = bit 0, channel 1 = bit 1 etc. + * \param enabled true to enable all the interrupts specified in the mask, false to disable all the interrupts specified in the mask. + */ +static inline void dma_set_irq0_channel_mask_enabled(uint32_t channel_mask, bool enabled) { + if (enabled) { + hw_set_bits(&dma_hw->inte0, channel_mask); + } else { + hw_clear_bits(&dma_hw->inte0, channel_mask); + } +} + +/*! \brief Enable single DMA channel interrupt 1 + * \ingroup hardware_dma + * + * \param channel DMA channel + * \param enabled true to enable interrupt 1 on specified channel, false to disable. + */ +static inline void dma_channel_set_irq1_enabled(uint channel, bool enabled) { + check_dma_channel_param(channel); + check_hw_layout(dma_hw_t, inte1, DMA_INTE1_OFFSET); + if (enabled) + hw_set_bits(&dma_hw->inte1, 1u << channel); + else + hw_clear_bits(&dma_hw->inte1, 1u << channel); +} + +/*! \brief Enable multiple DMA channels interrupt 0 + * \ingroup hardware_dma + * + * \param channel_mask Bitmask of all the channels to enable/disable. Channel 0 = bit 0, channel 1 = bit 1 etc. + * \param enabled true to enable all the interrupts specified in the mask, false to disable all the interrupts specified in the mask. + */ +static inline void dma_set_irq1_channel_mask_enabled(uint32_t channel_mask, bool enabled) { + if (enabled) { + hw_set_bits(&dma_hw->inte1, channel_mask); + } else { + hw_clear_bits(&dma_hw->inte1, channel_mask); + } +} + +/*! \brief Check if DMA channel is busy + * \ingroup hardware_dma + * + * \param channel DMA channel + * \return true if the channel is currently busy + */ +inline static bool dma_channel_is_busy(uint channel) { + check_dma_channel_param(channel); + return !!(dma_hw->ch[channel].al1_ctrl & DMA_CH0_CTRL_TRIG_BUSY_BITS); +} + +/*! \brief Wait for a DMA channel transfer to complete + * \ingroup hardware_dma + * + * \param channel DMA channel + */ +inline static void dma_channel_wait_for_finish_blocking(uint channel) { + while (dma_channel_is_busy(channel)) tight_loop_contents(); +} + +/*! \brief Enable the DMA sniffing targeting the specified channel + * \ingroup hardware_dma + * + * The mode can be one of the following: + * + * Mode | Function + * -----|--------- + * 0x0 | Calculate a CRC-32 (IEEE802.3 polynomial) + * 0x1 | Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data + * 0x2 | Calculate a CRC-16-CCITT + * 0x3 | Calculate a CRC-16-CCITT with bit reversed data + * 0xe | XOR reduction over all data. == 1 if the total 1 population count is odd. + * 0xf | Calculate a simple 32-bit checksum (addition with a 32 bit accumulator) + * + * \param channel DMA channel + * \param mode See description + * \param force_channel_enable Set true to also turn on sniffing in the channel configuration (this + * is usually what you want, but sometimes you might have a chain DMA with only certain segments + * of the chain sniffed, in which case you might pass false). + */ +inline static void dma_sniffer_enable(uint channel, uint mode, bool force_channel_enable) { + check_dma_channel_param(channel); + check_hw_layout(dma_hw_t, sniff_ctrl, DMA_SNIFF_CTRL_OFFSET); + if (force_channel_enable) { + hw_set_bits(&dma_hw->ch[channel].al1_ctrl, DMA_CH0_CTRL_TRIG_SNIFF_EN_BITS); + } + dma_hw->sniff_ctrl = ((channel << DMA_SNIFF_CTRL_DMACH_LSB) & DMA_SNIFF_CTRL_DMACH_BITS) | + ((mode << DMA_SNIFF_CTRL_CALC_LSB) & DMA_SNIFF_CTRL_CALC_BITS) | + DMA_SNIFF_CTRL_EN_BITS; +} + +/*! \brief Enable the Sniffer byte swap function + * \ingroup hardware_dma + * + * Locally perform a byte reverse on the sniffed data, before feeding into checksum. + * + * Note that the sniff hardware is downstream of the DMA channel byteswap performed in the + * read master: if channel_config_set_bswap() and dma_sniffer_set_byte_swap_enabled() are both enabled, + * their effects cancel from the sniffer’s point of view. + * + * \param swap Set true to enable byte swapping + */ +inline static void dma_sniffer_set_byte_swap_enabled(bool swap) { + if (swap) + hw_set_bits(&dma_hw->sniff_ctrl, DMA_SNIFF_CTRL_BSWAP_BITS); + else + hw_clear_bits(&dma_hw->sniff_ctrl, DMA_SNIFF_CTRL_BSWAP_BITS); +} + +/*! \brief Disable the DMA sniffer + * \ingroup hardware_dma + * + */ +inline static void dma_sniffer_disable() { + dma_hw->sniff_ctrl = 0; +} + +#ifndef NDEBUG +void print_dma_ctrl(dma_channel_hw_t *channel); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/CMakeLists.txt new file mode 100644 index 0000000000..1ccab3351f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(hardware_flash INTERFACE) + +target_sources(hardware_flash INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/flash.c + ) + +target_include_directories(hardware_flash INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +target_link_libraries(hardware_flash INTERFACE pico_base_headers pico_bootrom) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/flash.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/flash.c new file mode 100644 index 0000000000..59f2cc27c2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/flash.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/flash.h" +#include "pico/bootrom.h" + +#define FLASH_BLOCK_ERASE_CMD 0xd8 + +#define __compiler_barrier() asm volatile("" ::: "memory") + +//----------------------------------------------------------------------------- +// Infrastructure for reentering XIP mode after exiting for programming (take +// a copy of boot2 before XIP exit). Calling boot2 as a function works because +// it accepts a return vector in LR (and doesn't trash r4-r7). Bootrom passes +// NULL in LR, instructing boot2 to enter flash vector table's reset handler. + +#if !PICO_NO_FLASH + +#define BOOT2_SIZE_WORDS 64 + +static uint32_t boot2_copyout[BOOT2_SIZE_WORDS]; +static bool boot2_copyout_valid = false; + +static void __no_inline_not_in_flash_func(flash_init_boot2_copyout)() { + if (boot2_copyout_valid) + return; + for (int i = 0; i < BOOT2_SIZE_WORDS; ++i) + boot2_copyout[i] = ((uint32_t *)XIP_BASE)[i]; + __compiler_barrier(); + boot2_copyout_valid = true; +} + +static void __no_inline_not_in_flash_func(flash_enable_xip_via_boot2)() { + ((void (*)(void))boot2_copyout+1)(); +} + +#else + +static void __no_inline_not_in_flash_func(flash_init_boot2_copyout)() {} + +static void __no_inline_not_in_flash_func(flash_enable_xip_via_boot2)() { + // Set up XIP for 03h read on bus access (slow but generic) + void (*flash_enter_cmd_xip)(void) = (void(*)(void))rom_func_lookup(rom_table_code('C', 'X')); + assert(flash_enter_cmd_xip); + flash_enter_cmd_xip(); +} + +#endif + +//----------------------------------------------------------------------------- +// Actual flash programming shims (work whether or not PICO_NO_FLASH==1) + +void __no_inline_not_in_flash_func(flash_range_erase)(uint32_t flash_offs, size_t count) { +#ifdef PICO_FLASH_SIZE_BYTES + hard_assert(flash_offs + count <= PICO_FLASH_SIZE_BYTES); +#endif + invalid_params_if(FLASH, flash_offs & (FLASH_SECTOR_SIZE - 1)); + invalid_params_if(FLASH, count & (FLASH_SECTOR_SIZE - 1)); + void (*connect_internal_flash)(void) = (void(*)(void))rom_func_lookup(rom_table_code('I', 'F')); + void (*flash_exit_xip)(void) = (void(*)(void))rom_func_lookup(rom_table_code('E', 'X')); + void (*flash_range_erase)(uint32_t, size_t, uint32_t, uint8_t) = + (void(*)(uint32_t, size_t, uint32_t, uint8_t))rom_func_lookup(rom_table_code('R', 'E')); + void (*flash_flush_cache)(void) = (void(*)(void))rom_func_lookup(rom_table_code('F', 'C')); + assert(connect_internal_flash && flash_exit_xip && flash_range_erase && flash_flush_cache); + flash_init_boot2_copyout(); + + // No flash accesses after this point + __compiler_barrier(); + + connect_internal_flash(); + flash_exit_xip(); + flash_range_erase(flash_offs, count, FLASH_BLOCK_SIZE, FLASH_BLOCK_ERASE_CMD); + flash_flush_cache(); // Note this is needed to remove CSn IO force as well as cache flushing + flash_enable_xip_via_boot2(); +} + +void __no_inline_not_in_flash_func(flash_range_program)(uint32_t flash_offs, const uint8_t *data, size_t count) { +#ifdef PICO_FLASH_SIZE_BYTES + hard_assert(flash_offs + count <= PICO_FLASH_SIZE_BYTES); +#endif + invalid_params_if(FLASH, flash_offs & (FLASH_PAGE_SIZE - 1)); + invalid_params_if(FLASH, count & (FLASH_PAGE_SIZE - 1)); + void (*connect_internal_flash)(void) = (void(*)(void))rom_func_lookup(rom_table_code('I', 'F')); + void (*flash_exit_xip)(void) = (void(*)(void))rom_func_lookup(rom_table_code('E', 'X')); + void (*flash_range_program)(uint32_t, const uint8_t*, size_t) = + (void(*)(uint32_t, const uint8_t*, size_t))rom_func_lookup(rom_table_code('R', 'P')); + void (*flash_flush_cache)(void) = (void(*)(void))rom_func_lookup(rom_table_code('F', 'C')); + assert(connect_internal_flash && flash_exit_xip && flash_range_program && flash_flush_cache); + flash_init_boot2_copyout(); + + __compiler_barrier(); + + connect_internal_flash(); + flash_exit_xip(); + flash_range_program(flash_offs, data, count); + flash_flush_cache(); // Note this is needed to remove CSn IO force as well as cache flushing + flash_enable_xip_via_boot2(); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/include/hardware/flash.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/include/hardware/flash.h new file mode 100644 index 0000000000..7ea96b44d6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_flash/include/hardware/flash.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_FLASH_H +#define _HARDWARE_FLASH_H + +#include "pico.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_FLASH, Enable/disable assertions in the flash module, type=bool, default=0, group=hardware_flash +#ifndef PARAM_ASSERTIONS_ENABLED_FLASH +#define PARAM_ASSERTIONS_ENABLED_FLASH 0 +#endif + +#define FLASH_PAGE_SIZE (1u << 8) +#define FLASH_SECTOR_SIZE (1u << 12) +#define FLASH_BLOCK_SIZE (1u << 16) + +/** \file flash.h + * \defgroup hardware_flash hardware_flash + * + * Low level flash programming and erase API + * + * Note these functions are *unsafe* if you have two cores concurrently + * executing from flash. In this case you must perform your own + * synchronisation to make sure no XIP accesses take place during flash + * programming. + * + * If PICO_NO_FLASH=1 is not defined (i.e. if the program is built to run from + * flash) then these functions will make a static copy of the second stage + * bootloader in SRAM, and use this to reenter execute-in-place mode after + * programming or erasing flash, so that they can safely be called from + * flash-resident code. + * + * \subsection flash_example Example + * \include flash_program.c + */ + + +/*! \brief Erase areas of flash + * \ingroup hardware_flash + * + * \param flash_offs Offset into flash, in bytes, to start the erase. Must be aligned to a 4096-byte flash sector. + * \param count Number of bytes to be erased. Must be a multiple of 4096 bytes (one sector). + */ +void flash_range_erase(uint32_t flash_offs, size_t count); + +/*! \brief Program flash + * \ingroup hardware_flash + * + * \param flash_offs Flash address of the first byte to be programmed. Must be aligned to a 256-byte flash page. + * \param data Pointer to the data to program into flash + * \param count Number of bytes to program. Must be a multiple of 256 bytes (one page). + */ +void flash_range_program(uint32_t flash_offs, const uint8_t *data, size_t count); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/CMakeLists.txt new file mode 100644 index 0000000000..1bfb078f37 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(gpio) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/gpio.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/gpio.c new file mode 100644 index 0000000000..425b74f144 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/gpio.c @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/gpio.h" +#include "hardware/sync.h" + +#include "hardware/structs/iobank0.h" +#include "hardware/irq.h" + +#include "pico/binary_info.h" + +static gpio_irq_callback_t _callbacks[NUM_CORES]; + +// Get the raw value from the pin, bypassing any muxing or overrides. +int gpio_get_pad(uint gpio) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + hw_set_bits(&padsbank0_hw->io[gpio], PADS_BANK0_GPIO0_IE_BITS); + return (iobank0_hw->io[gpio].status & IO_BANK0_GPIO0_STATUS_INFROMPAD_BITS) + >> IO_BANK0_GPIO0_STATUS_INFROMPAD_LSB; +} + +/// \tag::gpio_set_function[] +// Select function for this GPIO, and ensure input/output are enabled at the pad. +// This also clears the input/output/irq override bits. +void gpio_set_function(uint gpio, enum gpio_function fn) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + invalid_params_if(GPIO, fn << IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB & ~IO_BANK0_GPIO0_CTRL_FUNCSEL_BITS); + // Set input enable on, output disable off + hw_write_masked(&padsbank0_hw->io[gpio], + PADS_BANK0_GPIO0_IE_BITS, + PADS_BANK0_GPIO0_IE_BITS | PADS_BANK0_GPIO0_OD_BITS + ); + // Zero all fields apart from fsel; we want this IO to do what the peripheral tells it. + // This doesn't affect e.g. pullup/pulldown, as these are in pad controls. + iobank0_hw->io[gpio].ctrl = fn << IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB; +} +/// \end::gpio_set_function[] + +enum gpio_function gpio_get_function(uint gpio) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + return (enum gpio_function) ((iobank0_hw->io[gpio].ctrl & IO_BANK0_GPIO0_CTRL_FUNCSEL_BITS) >> IO_BANK0_GPIO0_CTRL_FUNCSEL_LSB); +} + +// Note that, on RP2040, setting both pulls enables a "bus keep" function, +// i.e. weak pull to whatever is current high/low state of GPIO. +void gpio_set_pulls(uint gpio, bool up, bool down) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + hw_write_masked( + &padsbank0_hw->io[gpio], + (!!up << PADS_BANK0_GPIO0_PUE_LSB) | (!!down << PADS_BANK0_GPIO0_PDE_LSB), + PADS_BANK0_GPIO0_PUE_BITS | PADS_BANK0_GPIO0_PDE_BITS + ); +} + +// Direct overrides for pad controls +void gpio_set_inover(uint gpio, uint value) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + hw_write_masked(&iobank0_hw->io[gpio].ctrl, + value << IO_BANK0_GPIO0_CTRL_INOVER_LSB, + IO_BANK0_GPIO0_CTRL_INOVER_BITS + ); +} + +void gpio_set_outover(uint gpio, uint value) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + hw_write_masked(&iobank0_hw->io[gpio].ctrl, + value << IO_BANK0_GPIO0_CTRL_OUTOVER_LSB, + IO_BANK0_GPIO0_CTRL_OUTOVER_BITS + ); +} + +void gpio_set_oeover(uint gpio, uint value) { + invalid_params_if(GPIO, gpio >= N_GPIOS); + hw_write_masked(&iobank0_hw->io[gpio].ctrl, + value << IO_BANK0_GPIO0_CTRL_OEOVER_LSB, + IO_BANK0_GPIO0_CTRL_OEOVER_BITS + ); +} + +static void gpio_irq_handler(void) { + io_irq_ctrl_hw_t *irq_ctrl_base = get_core_num() ? + &iobank0_hw->proc1_irq_ctrl : &iobank0_hw->proc0_irq_ctrl; + for (uint gpio = 0; gpio < N_GPIOS; gpio++) { + io_rw_32 *status_reg = &irq_ctrl_base->ints[gpio / 8]; + uint events = (*status_reg >> 4 * (gpio % 8)) & 0xf; + if (events) { + // TODO: If both cores care about this event then the second core won't get the irq? + gpio_acknowledge_irq(gpio, events); + gpio_irq_callback_t callback = _callbacks[get_core_num()]; + if (callback) { + callback(gpio, events); + } + } + } +} + +static void _gpio_set_irq_enabled(uint gpio, uint32_t events, bool enabled, io_irq_ctrl_hw_t *irq_ctrl_base) { + // Clear stale events which might cause immediate spurious handler entry + gpio_acknowledge_irq(gpio, events); + + io_rw_32 *en_reg = &irq_ctrl_base->inte[gpio / 8]; + events <<= 4 * (gpio % 8); + + if (enabled) + hw_set_bits(en_reg, events); + else + hw_clear_bits(en_reg, events); +} + +void gpio_set_irq_enabled(uint gpio, uint32_t events, bool enabled) { + // Separate mask/force/status per-core, so check which core called, and + // set the relevant IRQ controls. + io_irq_ctrl_hw_t *irq_ctrl_base = get_core_num() ? + &iobank0_hw->proc1_irq_ctrl : &iobank0_hw->proc0_irq_ctrl; + _gpio_set_irq_enabled(gpio, events, enabled, irq_ctrl_base); +} + +void gpio_set_irq_enabled_with_callback(uint gpio, uint32_t events, bool enabled, gpio_irq_callback_t callback) { + gpio_set_irq_enabled(gpio, events, enabled); + + // TODO: Do we want to support a callback per GPIO pin? + // Install IRQ handler + _callbacks[get_core_num()] = callback; + irq_set_exclusive_handler(IO_IRQ_BANK0, gpio_irq_handler); + irq_set_enabled(IO_IRQ_BANK0, true); +} + +void gpio_set_dormant_irq_enabled(uint gpio, uint32_t events, bool enabled) { + io_irq_ctrl_hw_t *irq_ctrl_base = &iobank0_hw->dormant_wake_irq_ctrl; + _gpio_set_irq_enabled(gpio, events, enabled, irq_ctrl_base); +} + +void gpio_acknowledge_irq(uint gpio, uint32_t events) { + iobank0_hw->intr[gpio / 8] = events << 4 * (gpio % 8); +} + +#define DEBUG_PIN_MASK (((1u << PICO_DEBUG_PIN_COUNT)-1) << PICO_DEBUG_PIN_BASE) +void gpio_debug_pins_init() { + gpio_init_mask(DEBUG_PIN_MASK); + gpio_set_dir_masked(DEBUG_PIN_MASK, DEBUG_PIN_MASK); + bi_decl_if_func_used(bi_pin_mask_with_names(DEBUG_PIN_MASK, "Debug")); +} + +void gpio_set_input_enabled(uint gpio, bool enabled) { + if (enabled) + hw_set_bits(&padsbank0_hw->io[gpio], PADS_BANK0_GPIO0_IE_BITS); + else + hw_clear_bits(&padsbank0_hw->io[gpio], PADS_BANK0_GPIO0_IE_BITS); +} + +void gpio_init(uint gpio) { + sio_hw->gpio_oe_clr = 1ul << gpio; + sio_hw->gpio_clr = 1ul << gpio; + gpio_set_function(gpio, GPIO_FUNC_SIO); +} + +void gpio_init_mask(uint gpio_mask) { + for(uint i=0;i<32;i++) { + if (gpio_mask & 1) { + gpio_init(i); + } + gpio_mask >>= 1; + } +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h new file mode 100644 index 0000000000..24d6511bb5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h @@ -0,0 +1,531 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_GPIO_H_ +#define _HARDWARE_GPIO_H_ + +#include "pico.h" +#include "hardware/structs/sio.h" +#include "hardware/structs/padsbank0.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_GPIO, Enable/disable assertions in the GPIO module, type=bool, default=0, group=hardware_gpio +#ifndef PARAM_ASSERTIONS_ENABLED_GPIO +#define PARAM_ASSERTIONS_ENABLED_GPIO 0 +#endif + +/** \file gpio.h + * \defgroup hardware_gpio hardware_gpio + * + * General Purpose Input/Output (GPIO) API + * + * RP2040 has 36 multi-functional General Purpose Input / Output (GPIO) pins, divided into two banks. In a typical use case, + * the pins in the QSPI bank (QSPI_SS, QSPI_SCLK and QSPI_SD0 to QSPI_SD3) are used to execute code from an external + * flash device, leaving the User bank (GPIO0 to GPIO29) for the programmer to use. All GPIOs support digital input and + * output, but GPIO26 to GPIO29 can also be used as inputs to the chip’s Analogue to Digital Converter (ADC). Each GPIO + * can be controlled directly by software running on the processors, or by a number of other functional blocks. + * + * The function allocated to each GPIO is selected by calling the \ref gpio_set_function function. \note Not all functions + * are available on all pins. + * + * Each GPIO can have one function selected at a time. Likewise, each peripheral input (e.g. UART0 RX) should only be selected on + * one _GPIO_ at a time. If the same peripheral input is connected to multiple GPIOs, the peripheral sees the logical OR of these + * GPIO inputs. Please refer to the datasheet for more information on GPIO function select. + * + * ### Function Select Table + * + * GPIO | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 + * -------|----------|-----------|----------|--------|-----|------|------|---------------|---- + * 0 | SPI0 RX | UART0 TX | I2C0 SDA | PWM0 A | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 1 | SPI0 CSn | UART0 RX | I2C0 SCL | PWM0 B | SIO | PIO0 | PIO1 | | USB VBUS DET + * 2 | SPI0 SCK | UART0 CTS | I2C1 SDA | PWM1 A | SIO | PIO0 | PIO1 | | USB VBUS EN + * 3 | SPI0 TX | UART0 RTS | I2C1 SCL | PWM1 B | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 4 | SPI0 RX | UART1 TX | I2C0 SDA | PWM2 A | SIO | PIO0 | PIO1 | | USB VBUS DET + * 5 | SPI0 CSn | UART1 RX | I2C0 SCL | PWM2 B | SIO | PIO0 | PIO1 | | USB VBUS EN + * 6 | SPI0 SCK | UART1 CTS | I2C1 SDA | PWM3 A | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 7 | SPI0 TX | UART1 RTS | I2C1 SCL | PWM3 B | SIO | PIO0 | PIO1 | | USB VBUS DET + * 8 | SPI1 RX | UART1 TX | I2C0 SDA | PWM4 A | SIO | PIO0 | PIO1 | | USB VBUS EN + * 9 | SPI1 CSn | UART1 RX | I2C0 SCL | PWM4 B | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 10 | SPI1 SCK | UART1 CTS | I2C1 SDA | PWM5 A | SIO | PIO0 | PIO1 | | USB VBUS DET + * 11 | SPI1 TX | UART1 RTS | I2C1 SCL | PWM5 B | SIO | PIO0 | PIO1 | | USB VBUS EN + * 12 | SPI1 RX | UART0 TX | I2C0 SDA | PWM6 A | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 13 | SPI1 CSn | UART0 RX | I2C0 SCL | PWM6 B | SIO | PIO0 | PIO1 | | USB VBUS DET + * 14 | SPI1 SCK | UART0 CTS | I2C1 SDA | PWM7 A | SIO | PIO0 | PIO1 | | USB VBUS EN + * 15 | SPI1 TX | UART0 RTS | I2C1 SCL | PWM7 B | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 16 | SPI0 RX | UART0 TX | I2C0 SDA | PWM0 A | SIO | PIO0 | PIO1 | | USB VBUS DET + * 17 | SPI0 CSn | UART0 RX | I2C0 SCL | PWM0 B | SIO | PIO0 | PIO1 | | USB VBUS EN + * 18 | SPI0 SCK | UART0 CTS | I2C1 SDA | PWM1 A | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 19 | SPI0 TX | UART0 RTS | I2C1 SCL | PWM1 B | SIO | PIO0 | PIO1 | | USB VBUS DET + * 20 | SPI0 RX | UART1 TX | I2C0 SDA | PWM2 A | SIO | PIO0 | PIO1 | CLOCK GPIN0 | USB VBUS EN + * 21 | SPI0 CSn | UART1 RX | I2C0 SCL | PWM2 B | SIO | PIO0 | PIO1 | CLOCK GPOUT0 | USB OVCUR DET + * 22 | SPI0 SCK | UART1 CTS | I2C1 SDA | PWM3 A | SIO | PIO0 | PIO1 | CLOCK GPIN1 | USB VBUS DET + * 23 | SPI0 TX | UART1 RTS | I2C1 SCL | PWM3 B | SIO | PIO0 | PIO1 | CLOCK GPOUT1 | USB VBUS EN + * 24 | SPI1 RX | UART1 TX | I2C0 SDA | PWM4 A | SIO | PIO0 | PIO1 | CLOCK GPOUT2 | USB OVCUR DET + * 25 | SPI1 CSn | UART1 RX | I2C0 SCL | PWM4 B | SIO | PIO0 | PIO1 | CLOCK GPOUT3 | USB VBUS DET + * 26 | SPI1 SCK | UART1 CTS | I2C1 SDA | PWM5 A | SIO | PIO0 | PIO1 | | USB VBUS EN + * 27 | SPI1 TX | UART1 RTS | I2C1 SCL | PWM5 B | SIO | PIO0 | PIO1 | | USB OVCUR DET + * 28 | SPI1 RX | UART0 TX | I2C0 SDA | PWM6 A | SIO | PIO0 | PIO1 | | USB VBUS DET + * 29 | SPI1 CSn | UART0 RX | I2C0 SCL | PWM6 B | SIO | PIO0 | PIO1 | | USB VBUS EN + + */ + +/*! \brief GPIO function definitions for use with function select + * \ingroup hardware_gpio + * \brief GPIO function selectors + * + * Each GPIO can have one function selected at a time. Likewise, each peripheral input (e.g. UART0 RX) should only be + * selected on one GPIO at a time. If the same peripheral input is connected to multiple GPIOs, the peripheral sees the logical + * OR of these GPIO inputs. + * + * Please refer to the datsheet for more information on GPIO function selection. + */ +enum gpio_function { + GPIO_FUNC_XIP = 0, + GPIO_FUNC_SPI = 1, + GPIO_FUNC_UART = 2, + GPIO_FUNC_I2C = 3, + GPIO_FUNC_PWM = 4, + GPIO_FUNC_SIO = 5, + GPIO_FUNC_PIO0 = 6, + GPIO_FUNC_PIO1 = 7, + GPIO_FUNC_GPCK = 8, + GPIO_FUNC_USB = 9, + GPIO_FUNC_NULL = 0xf, +}; + +#define GPIO_OUT 1 +#define GPIO_IN 0 + +/*! \brief GPIO Interrupt level definitions + * \ingroup hardware_gpio + * \brief GPIO Interrupt levels + * + * An interrupt can be generated for every GPIO pin in 4 scenarios: + * + * * Level High: the GPIO pin is a logical 1 + * * Level Low: the GPIO pin is a logical 0 + * * Edge High: the GPIO has transitioned from a logical 0 to a logical 1 + * * Edge Low: the GPIO has transitioned from a logical 1 to a logical 0 + * + * The level interrupts are not latched. This means that if the pin is a logical 1 and the level high interrupt is active, it will + * become inactive as soon as the pin changes to a logical 0. The edge interrupts are stored in the INTR register and can be + * cleared by writing to the INTR register. + */ +enum gpio_irq_level { + GPIO_IRQ_LEVEL_LOW = 0x1u, + GPIO_IRQ_LEVEL_HIGH = 0x2u, + GPIO_IRQ_EDGE_FALL = 0x4u, + GPIO_IRQ_EDGE_RISE = 0x8u, +}; + +typedef void (*gpio_irq_callback_t)(uint gpio, uint32_t events); + +enum gpio_override { + GPIO_OVERRIDE_NORMAL = 0, ///< peripheral signal selected via \ref gpio_set_function + GPIO_OVERRIDE_INVERT = 1, ///< invert peripheral signal selected via \ref gpio_set_function + GPIO_OVERRIDE_LOW = 2, ///< drive low/disable output + GPIO_OVERRIDE_HIGH = 3, ///< drive high/enable output +}; + +#define N_GPIOS 30 + +// ---------------------------------------------------------------------------- +// Pad Controls + IO Muxing +// ---------------------------------------------------------------------------- +// Declarations for gpio.c + +/*! \brief Select GPIO function + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param fn Which GPIO function select to use from list \ref gpio_function + */ +void gpio_set_function(uint gpio, enum gpio_function fn); + +enum gpio_function gpio_get_function(uint gpio); + +/*! \brief Select up and down pulls on specific GPIO + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param up If true set a pull up on the GPIO + * \param down If true set a pull down on the GPIO + * + * \note On the RP2040, setting both pulls enables a "bus keep" function, + * i.e. a weak pull to whatever is current high/low state of GPIO. + */ +void gpio_set_pulls(uint gpio, bool up, bool down); + +/*! \brief Set specified GPIO to be pulled up. + * \ingroup hardware_gpio + * + * \param gpio GPIO number + */ +static inline void gpio_pull_up(uint gpio) { + gpio_set_pulls(gpio, true, false); +} + +/*! \brief Determine if the specified GPIO is pulled up. + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \return true if the GPIO is pulled up + */ +static inline bool gpio_is_pulled_up(uint gpio) { + return (padsbank0_hw->io[gpio] & PADS_BANK0_GPIO0_PUE_BITS) != 0; +} + +/*! \brief Set specified GPIO to be pulled down. + * \ingroup hardware_gpio + * + * \param gpio GPIO number + */ +static inline void gpio_pull_down(uint gpio) { + gpio_set_pulls(gpio, false, true); +} + +/*! \brief Determine if the specified GPIO is pulled down. + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \return true if the GPIO is pulled down + */ +static inline bool gpio_is_pulled_down(uint gpio) { + return (padsbank0_hw->io[gpio] & PADS_BANK0_GPIO0_PDE_BITS) != 0; +} + +/*! \brief Disable pulls on specified GPIO + * \ingroup hardware_gpio + * + * \param gpio GPIO number + */ +static inline void gpio_disable_pulls(uint gpio) { + gpio_set_pulls(gpio, false, false); +} + +/*! \brief Set GPIO output override + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param value See \ref gpio_override + */ +void gpio_set_outover(uint gpio, uint value); + +/*! \brief Select GPIO input override + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param value See \ref gpio_override + */ +void gpio_set_inover(uint gpio, uint value); + +/*! \brief Select GPIO output enable override + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param value See \ref gpio_override + */ +void gpio_set_oeover(uint gpio, uint value); + +/*! \brief Enable GPIO input + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param enabled true to enable input on specified GPIO + */ +void gpio_set_input_enabled(uint gpio, bool enabled); + +/*! \brief Enable or disable interrupts for specified GPIO + * \ingroup hardware_gpio + * + * \note The IO IRQs are independent per-processor. This configures IRQs for + * the processor that calls the function. + * + * \param gpio GPIO number + * \param events Which events will cause an interrupt + * \param enabled Enable or disable flag + * + * Events is a bitmask of the following: + * + * bit | interrupt + * ----|---------- + * 0 | Low level + * 1 | High level + * 2 | Edge low + * 3 | Edge high + */ +void gpio_set_irq_enabled(uint gpio, uint32_t events, bool enabled); + +/*! \brief Enable interrupts for specified GPIO + * \ingroup hardware_gpio + * + * \note The IO IRQs are independent per-processor. This configures IRQs for + * the processor that calls the function. + * + * \param gpio GPIO number + * \param events Which events will cause an interrupt See \ref gpio_set_irq_enabled for details. + * \param enabled Enable or disable flag + * \param callback user function to call on GPIO irq. Note only one of these can be set per processor. + * + * \note Currently the GPIO parameter is ignored, and this callback will be called for any enabled GPIO IRQ on any pin. + * + */ +void gpio_set_irq_enabled_with_callback(uint gpio, uint32_t events, bool enabled, gpio_irq_callback_t callback); + +/*! \brief Enable dormant wake up interrupt for specified GPIO + * \ingroup hardware_gpio + * + * This configures IRQs to restart the XOSC or ROSC when they are + * disabled in dormant mode + * + * \param gpio GPIO number + * \param events Which events will cause an interrupt. See \ref gpio_set_irq_enabled for details. + * \param enabled Enable/disable flag + */ +void gpio_set_dormant_irq_enabled(uint gpio, uint32_t events, bool enabled); + +/*! \brief Acknowledge a GPIO interrupt + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param events Bitmask of events to clear. See \ref gpio_set_irq_enabled for details. + * + */ +void gpio_acknowledge_irq(uint gpio, uint32_t events); + +/*! \brief Initialise a GPIO for (enabled I/O and set func to GPIO_FUNC_SIO) + * \ingroup hardware_gpio + * + * Clear the output enable (i.e. set to input) + * Clear any output value. + * + * \param gpio GPIO number + */ +void gpio_init(uint gpio); + +/*! \brief Initialise multiple GPIOs (enabled I/O and set func to GPIO_FUNC_SIO) + * \ingroup hardware_gpio + * + * Clear the output enable (i.e. set to input) + * Clear any output value. + * + * \param gpio_mask Mask with 1 bit per GPIO number to initialize + */ +void gpio_init_mask(uint gpio_mask); +// ---------------------------------------------------------------------------- +// Input +// ---------------------------------------------------------------------------- + +/*! \brief Get state of a single specified GPIO + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \return Current state of the GPIO. 0 for low, non-zero for high + */ +static inline bool gpio_get(uint gpio) { + return !!((1ul << gpio) & sio_hw->gpio_in); +} + +/*! \brief Get raw value of all GPIOs + * \ingroup hardware_gpio + * + * \return Bitmask of raw GPIO values, as bits 0-29 + */ +static inline uint32_t gpio_get_all() { + return sio_hw->gpio_in; +} + +// ---------------------------------------------------------------------------- +// Output +// ---------------------------------------------------------------------------- + +/*! \brief Drive high every GPIO appearing in mask + * \ingroup hardware_gpio + * + * \param mask Bitmask of GPIO values to set, as bits 0-29 + */ +static inline void gpio_set_mask(uint32_t mask) { + sio_hw->gpio_set = mask; +} + +/*! \brief Drive low every GPIO appearing in mask + * \ingroup hardware_gpio + * + * \param mask Bitmask of GPIO values to clear, as bits 0-29 + */ +static inline void gpio_clr_mask(uint32_t mask) { + sio_hw->gpio_clr = mask; +} + +/*! \brief Toggle every GPIO appearing in mask + * \ingroup hardware_gpio + * + * \param mask Bitmask of GPIO values to toggle, as bits 0-29 + */ +static inline void gpio_xor_mask(uint32_t mask) { + sio_hw->gpio_togl = mask; +} + +/*! \brief Drive GPIO high/low depending on parameters + * \ingroup hardware_gpio + * + * \param mask Bitmask of GPIO values to change, as bits 0-29 + * \param value Value to set + * + * For each 1 bit in \p mask, drive that pin to the value given by + * corresponding bit in \p value, leaving other pins unchanged. + * Since this uses the TOGL alias, it is concurrency-safe with e.g. an IRQ + * bashing different pins from the same core. + */ +static inline void gpio_put_masked(uint32_t mask, uint32_t value) { + sio_hw->gpio_togl = (sio_hw->gpio_out ^ value) & mask; +} + +/*! \brief Drive all pins simultaneously + * \ingroup hardware_gpio + * + * \param value Bitmask of GPIO values to change, as bits 0-29 + */ +static inline void gpio_put_all(uint32_t value) { + sio_hw->gpio_out = value; +} + +/*! \brief Drive a single GPIO high/low + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param value If false clear the GPIO, otherwise set it. + */ +static inline void gpio_put(uint gpio, bool value) { + uint32_t mask = 1ul << gpio; + if (value) + gpio_set_mask(mask); + else + gpio_clr_mask(mask); +} + +// ---------------------------------------------------------------------------- +// Direction +// ---------------------------------------------------------------------------- + +/*! \brief Set a number of GPIOs to output + * \ingroup hardware_gpio + * + * Switch all GPIOs in "mask" to output + * + * \param mask Bitmask of GPIO to set to output, as bits 0-29 + */ +static inline void gpio_set_dir_out_masked(uint32_t mask) { + sio_hw->gpio_oe_set = mask; +} + +/*! \brief Set a number of GPIOs to input + * \ingroup hardware_gpio + * + * \param mask Bitmask of GPIO to set to input, as bits 0-29 + */ +static inline void gpio_set_dir_in_masked(uint32_t mask) { + sio_hw->gpio_oe_clr = mask; +} + +/*! \brief Set multiple GPIO directions + * \ingroup hardware_gpio + * + * \param mask Bitmask of GPIO to set to input, as bits 0-29 + * \param value Values to set + * + * For each 1 bit in "mask", switch that pin to the direction given by + * corresponding bit in "value", leaving other pins unchanged. + * E.g. gpio_set_dir_masked(0x3, 0x2); -> set pin 0 to input, pin 1 to output, + * simultaneously. + */ +static inline void gpio_set_dir_masked(uint32_t mask, uint32_t value) { + sio_hw->gpio_oe_togl = (sio_hw->gpio_oe ^ value) & mask; +} + +/*! \brief Set direction of all pins simultaneously. + * \ingroup hardware_gpio + * + * \param values individual settings for each gpio; for GPIO N, bit N is 1 for out, 0 for in + */ +static inline void gpio_set_dir_all_bits(uint32_t values) { + sio_hw->gpio_oe = values; +} + +/*! \brief Set a single GPIO direction + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \param out true for out, false for in + */ +static inline void gpio_set_dir(uint gpio, bool out) { + uint32_t mask = 1ul << gpio; + if (out) + gpio_set_dir_out_masked(mask); + else + gpio_set_dir_in_masked(mask); +} + +/*! \brief Check if a specific GPIO direction is OUT + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \return true if the direction for the pin is OUT + */ +static inline bool gpio_is_dir_out(uint gpio) { + return !!(sio_hw->gpio_oe & (1u << (gpio))); +} + +/*! \brief Get a specific GPIO direction + * \ingroup hardware_gpio + * + * \param gpio GPIO number + * \return 1 for out, 0 for in + */ +static inline uint gpio_get_dir(uint gpio) { + return gpio_is_dir_out(gpio); // note GPIO_OUT is 1/true and GPIO_IN is 0/false anyway +} + +extern void gpio_debug_pins_init(); + +#ifdef __cplusplus +} +#endif + + +// PICO_CONFIG: PICO_DEBUG_PIN_BASE, First pin to use for debug output (if enabled), min=0, max=28, default=19, group=hardware_gpio +#ifndef PICO_DEBUG_PIN_BASE +#define PICO_DEBUG_PIN_BASE 19u +#endif + +// PICO_CONFIG: PICO_DEBUG_PIN_COUNT, Number of pins to use for debug output (if enabled), min=1, max=28, default=3, group=hardware_gpio +#ifndef PICO_DEBUG_PIN_COUNT +#define PICO_DEBUG_PIN_COUNT 3u +#endif + +#ifndef __cplusplus +// note these two macros may only be used once per and only apply per compilation unit (hence the CU_) +#define CU_REGISTER_DEBUG_PINS(...) enum __unused DEBUG_PIN_TYPE { _none = 0, __VA_ARGS__ }; static enum DEBUG_PIN_TYPE __selected_debug_pins; +#define CU_SELECT_DEBUG_PINS(x) static enum DEBUG_PIN_TYPE __selected_debug_pins = (x); +#define DEBUG_PINS_ENABLED(p) (__selected_debug_pins == (p)) +#else +#define CU_REGISTER_DEBUG_PINS(p...) \ + enum DEBUG_PIN_TYPE { _none = 0, p }; \ + template class __debug_pin_settings { \ + public: \ + static inline bool enabled() { return false; } \ + }; +#define CU_SELECT_DEBUG_PINS(x) template<> inline bool __debug_pin_settings::enabled() { return true; }; +#define DEBUG_PINS_ENABLED(p) (__debug_pin_settings

    ::enabled()) +#endif +#define DEBUG_PINS_SET(p, v) if (DEBUG_PINS_ENABLED(p)) gpio_set_mask((unsigned)(v)<restart_on_next = false; + + i2c->hw->enable = 0; + + // Configure as a fast-mode master with RepStart support, 7-bit addresses + i2c->hw->con = + I2C_IC_CON_SPEED_VALUE_FAST << I2C_IC_CON_SPEED_LSB | + I2C_IC_CON_MASTER_MODE_BITS | + I2C_IC_CON_IC_SLAVE_DISABLE_BITS | + I2C_IC_CON_IC_RESTART_EN_BITS; + + // Set FIFO watermarks to 1 to make things simpler. This is encoded by a register value of 0. + i2c->hw->tx_tl = 0; + i2c->hw->rx_tl = 0; + + // Always enable the DREQ signalling -- harmless if DMA isn't listening + i2c->hw->dma_cr = I2C_IC_DMA_CR_TDMAE_BITS | I2C_IC_DMA_CR_RDMAE_BITS; + + // Re-sets i2c->hw->enable upon returning: + return i2c_set_baudrate(i2c, baudrate); +} + +void i2c_deinit(i2c_inst_t *i2c) { + i2c_reset(i2c); +} + +uint i2c_set_baudrate(i2c_inst_t *i2c, uint baudrate) { + invalid_params_if(I2C, baudrate == 0); + // I2C is synchronous design that runs from clk_sys + uint freq_in = clock_get_hz(clk_sys); + + // TODO there are some subtleties to I2C timing which we are completely ignoring here + uint period = (freq_in + baudrate / 2) / baudrate; + uint hcnt = period * 3 / 5; // oof this one hurts + uint lcnt = period - hcnt; + // Check for out-of-range divisors: + invalid_params_if(I2C, hcnt > I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_BITS); + invalid_params_if(I2C, lcnt > I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_BITS); + invalid_params_if(I2C, hcnt < 8); + invalid_params_if(I2C, lcnt < 8); + + i2c->hw->enable = 0; + // Always use "fast" mode (<= 400 kHz, works fine for standard mode too) + hw_write_masked(&i2c->hw->con, + I2C_IC_CON_SPEED_VALUE_FAST << I2C_IC_CON_SPEED_LSB, + I2C_IC_CON_SPEED_BITS + ); + i2c->hw->fs_scl_hcnt = hcnt; + i2c->hw->fs_scl_lcnt = lcnt; + i2c->hw->fs_spklen = lcnt < 16 ? 1 : lcnt / 16; + + i2c->hw->enable = 1; + return freq_in / period; +} + +void i2c_set_slave_mode(i2c_inst_t *i2c, bool slave, uint8_t addr) { + invalid_params_if(I2C, addr >= 0x80); // 7-bit addresses + invalid_params_if(I2C, i2c_reserved_addr(addr)); + i2c->hw->enable = 0; + if (slave) { + hw_clear_bits(&i2c->hw->con, + I2C_IC_CON_MASTER_MODE_BITS | + I2C_IC_CON_IC_SLAVE_DISABLE_BITS + ); + i2c->hw->sar = addr; + } else { + hw_set_bits(&i2c->hw->con, + I2C_IC_CON_MASTER_MODE_BITS | + I2C_IC_CON_IC_SLAVE_DISABLE_BITS + ); + } + i2c->hw->enable = 1; +} + +static int i2c_write_blocking_internal(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop, + check_timeout_fn timeout_check, struct timeout_state *ts) { + invalid_params_if(I2C, addr >= 0x80); // 7-bit addresses + invalid_params_if(I2C, i2c_reserved_addr(addr)); + // Synopsys hw accepts start/stop flags alongside data items in the same + // FIFO word, so no 0 byte transfers. + invalid_params_if(I2C, len == 0); + + i2c->hw->enable = 0; + i2c->hw->tar = addr; + i2c->hw->enable = 1; + + bool abort = false; + bool timeout = false; + + uint32_t abort_reason; + size_t byte_ctr; + + for (byte_ctr = 0; byte_ctr < len; ++byte_ctr) { + bool first = byte_ctr == 0; + bool last = byte_ctr == len - 1; + + i2c->hw->data_cmd = + !!(first && i2c->restart_on_next) << I2C_IC_DATA_CMD_RESTART_LSB | + !!(last && !nostop) << I2C_IC_DATA_CMD_STOP_LSB | + *src++; + + do { + // Note clearing the abort flag also clears the reason, and this + // instance of flag is clear-on-read! + abort_reason = i2c->hw->tx_abrt_source; + abort = (bool) i2c->hw->clr_tx_abrt; + if (timeout_check) { + timeout = timeout_check(ts); + abort |= timeout; + } + tight_loop_contents(); + } while (!abort && !(i2c->hw->status & I2C_IC_STATUS_TFE_BITS)); + + // Note the hardware issues a STOP automatically on an abort condition. + // Note also the hardware clears RX FIFO as well as TX on abort, + // because we set hwparam IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT to 0. + if (abort) + break; + } + + int rval; + + // A lot of things could have just happened due to the ingenious and + // creative design of I2C. Try to figure things out. + if (abort) { + if (timeout) + rval = PICO_ERROR_TIMEOUT; + else if (!abort_reason || abort_reason & I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_BITS) { + // No reported errors - seems to happen if there is nothing connected to the bus. + // Address byte not acknowledged + rval = PICO_ERROR_GENERIC; + } else if (abort_reason & I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_BITS) { + // Address acknowledged, some data not acknowledged + rval = byte_ctr; + } else { + //panic("Unknown abort from I2C instance @%08x: %08x\n", (uint32_t) i2c->hw, abort_reason); + rval = PICO_ERROR_GENERIC; + } + } else { + rval = byte_ctr; + } + + // nostop means we are now at the end of a *message* but not the end of a *transfer* + i2c->restart_on_next = nostop; + return rval; +} + +int i2c_write_blocking(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop) { + return i2c_write_blocking_internal(i2c, addr, src, len, nostop, NULL, NULL); +} + +int i2c_write_blocking_until(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop, + absolute_time_t until) { + timeout_state_t ts; + return i2c_write_blocking_internal(i2c, addr, src, len, nostop, init_single_timeout_until(&ts, until), &ts); +} + +int i2c_write_timeout_per_char_us(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop, + uint timeout_per_char_us) { + timeout_state_t ts; + return i2c_write_blocking_internal(i2c, addr, src, len, nostop, + init_per_iteration_timeout_us(&ts, timeout_per_char_us), &ts); +} + +static int i2c_read_blocking_internal(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop, + check_timeout_fn timeout_check, timeout_state_t *ts) { + invalid_params_if(I2C, addr >= 0x80); // 7-bit addresses + invalid_params_if(I2C, i2c_reserved_addr(addr)); + invalid_params_if(I2C, len == 0); + + i2c->hw->enable = 0; + i2c->hw->tar = addr; + i2c->hw->enable = 1; + + bool abort = false; + bool timeout = false; + uint32_t abort_reason; + size_t byte_ctr; + + for (byte_ctr = 0; byte_ctr < len; ++byte_ctr) { + bool first = byte_ctr == 0; + bool last = byte_ctr == len - 1; + while (!i2c_get_write_available(i2c)) + tight_loop_contents(); + + i2c->hw->data_cmd = + !!(first && i2c->restart_on_next) << I2C_IC_DATA_CMD_RESTART_LSB | + !!(last && !nostop) << I2C_IC_DATA_CMD_STOP_LSB | + I2C_IC_DATA_CMD_CMD_BITS; // -> 1 for read + + do { + abort_reason = i2c->hw->tx_abrt_source; + abort = (bool) i2c->hw->clr_tx_abrt; + if (timeout_check) { + timeout = timeout_check(ts); + abort |= timeout; + } + } while (!abort && !i2c_get_read_available(i2c)); + + if (abort) + break; + + *dst++ = i2c->hw->data_cmd; + } + + int rval; + + if (abort) { + if (timeout) + rval = PICO_ERROR_TIMEOUT; + else if (!abort_reason || abort_reason & I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_BITS) { + // No reported errors - seems to happen if there is nothing connected to the bus. + // Address byte not acknowledged + rval = PICO_ERROR_GENERIC; + } else { +// panic("Unknown abort from I2C instance @%08x: %08x\n", (uint32_t) i2c->hw, abort_reason); + rval = PICO_ERROR_GENERIC; + } + } else { + rval = byte_ctr; + } + + i2c->restart_on_next = nostop; + return rval; +} + +int i2c_read_blocking(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop) { + return i2c_read_blocking_internal(i2c, addr, dst, len, nostop, NULL, NULL); +} + +int i2c_read_blocking_until(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop, absolute_time_t until) { + timeout_state_t ts; + return i2c_read_blocking_internal(i2c, addr, dst, len, nostop, init_single_timeout_until(&ts, until), &ts); +} + +int i2c_read_timeout_per_char_us(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop, + uint timeout_per_char_us) { + timeout_state_t ts; + return i2c_read_blocking_internal(i2c, addr, dst, len, nostop, + init_per_iteration_timeout_us(&ts, timeout_per_char_us), &ts); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_i2c/include/hardware/i2c.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_i2c/include/hardware/i2c.h new file mode 100644 index 0000000000..dda598c3e0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_i2c/include/hardware/i2c.h @@ -0,0 +1,304 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_I2C_H +#define _HARDWARE_I2C_H + +#include "pico.h" +#include "pico/time.h" +#include "hardware/structs/i2c.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_I2C, Enable/disable assertions in the I2C module, type=bool, default=0, group=hardware_i2c +#ifndef PARAM_ASSERTIONS_ENABLED_I2C +#define PARAM_ASSERTIONS_ENABLED_I2C 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/i2c.h + * \defgroup hardware_i2c hardware_i2c + * + * I2C Controller API + * + * The I2C bus is a two-wire serial interface, consisting of a serial data line SDA and a serial clock SCL. These wires carry + * information between the devices connected to the bus. Each device is recognized by a unique address and can operate as + * either a “transmitter” or “receiver”, depending on the function of the device. Devices can also be considered as masters or + * slaves when performing data transfers. A master is a device that initiates a data transfer on the bus and generates the + * clock signals to permit that transfer. At that time, any device addressed is considered a slave. + * + * This API allows the controller to be set up as a master or a slave using the \ref i2c_set_slave_mode function. + * + * The external pins of each controller are connected to GPIO pins as defined in the GPIO muxing table in the datasheet. The muxing options + * give some IO flexibility, but each controller external pin should be connected to only one GPIO. + * + * Note that the controller does NOT support High speed mode or Ultra-fast speed mode, the fastest operation being fast mode plus + * at up to 1000Kb/s. + * + * See the datasheet for more information on the I2C controller and its usage. + * + * \subsection i2c_example Example + * \addtogroup hardware_i2c + * \include bus_scan.c + */ + +typedef struct i2c_inst i2c_inst_t; + +/** The I2C identifiers for use in I2C functions. + * + * e.g. i2c_init(i2c0, 48000) + * + * \ingroup hardware_i2c + * @{ + */ +extern i2c_inst_t i2c0_inst; +extern i2c_inst_t i2c1_inst; + +#define i2c0 (&i2c0_inst) ///< Identifier for I2C HW Block 0 +#define i2c1 (&i2c1_inst) ///< Identifier for I2C HW Block 1 + +/** @} */ + +// ---------------------------------------------------------------------------- +// Setup + +/*! \brief Initialise the I2C HW block + * \ingroup hardware_i2c + * + * Put the I2C hardware into a known state, and enable it. Must be called + * before other functions. By default, the I2C is configured to operate as a + * master. + * + * The I2C bus frequency is set as close as possible to requested, and + * the return actual rate set is returned + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param baudrate Baudrate in Hz (e.g. 100kHz is 100000) + * \return Actual set baudrate + */ +uint i2c_init(i2c_inst_t *i2c, uint baudrate); + +/*! \brief Disable the I2C HW block + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * + * Disable the I2C again if it is no longer used. Must be reinitialised before + * being used again. + */ +void i2c_deinit(i2c_inst_t *i2c); + +/*! \brief Set I2C baudrate + * \ingroup hardware_i2c + * + * Set I2C bus frequency as close as possible to requested, and return actual + * rate set. + * Baudrate may not be as exactly requested due to clocking limitations. + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param baudrate Baudrate in Hz (e.g. 100kHz is 100000) + * \return Actual set baudrate + */ +uint i2c_set_baudrate(i2c_inst_t *i2c, uint baudrate); + +/*! \brief Set I2C port to slave mode + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param slave true to use slave mode, false to use master mode + * \param addr If \p slave is true, set the slave address to this value + */ +void i2c_set_slave_mode(i2c_inst_t *i2c, bool slave, uint8_t addr); + +// ---------------------------------------------------------------------------- +// Generic input/output + +struct i2c_inst { + i2c_hw_t *hw; + bool restart_on_next; +}; + +/*! \brief Convert I2c instance to hardware instance number + * \ingroup hardware_i2c + * + * \param i2c I2C instance + * \return Number of UART, 0 or 1. + */ +static inline uint i2c_hw_index(i2c_inst_t *i2c) { + invalid_params_if(I2C, i2c != i2c0 && i2c != i2c1); + return i2c == i2c1 ? 1 : 0; +} + +static inline i2c_hw_t *i2c_get_hw(i2c_inst_t *i2c) { + i2c_hw_index(i2c); // check it is a hw i2c + return i2c->hw; +} + +/*! \brief Attempt to write specified number of bytes to address, blocking until the specified absolute time is reached. + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param addr Address of device to write to + * \param src Pointer to data to send + * \param len Length of data in bytes to send + * \param nostop If true, master retains control of the bus at the end of the transfer (no Stop is issued), + * and the next transfer will begin with a Restart rather than a Start. + * \param until The absolute time that the block will wait until the entire transaction is complete. Note, an individual timeout of + * this value divided by the length of data is applied for each byte transfer, so if the first or subsequent + * bytes fails to transfer within that sub timeout, the function will return with an error. + * + * \return Number of bytes written, or PICO_ERROR_GENERIC if address not acknowledged, no device present, or PICO_ERROR_TIMEOUT if a timeout occurred. + */ +int i2c_write_blocking_until(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop, absolute_time_t until); + +/*! \brief Attempt to read specified number of bytes from address, blocking until the specified absolute time is reached. + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param addr Address of device to read from + * \param dst Pointer to buffer to receive data + * \param len Length of data in bytes to receive + * \param nostop If true, master retains control of the bus at the end of the transfer (no Stop is issued), + * and the next transfer will begin with a Restart rather than a Start. + * \param until The absolute time that the block will wait until the entire transaction is complete. + * \return Number of bytes read, or PICO_ERROR_GENERIC if address not acknowledged, no device present, or PICO_ERROR_TIMEOUT if a timeout occurred. + */ +int i2c_read_blocking_until(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop, absolute_time_t until); + +/*! \brief Attempt to write specified number of bytes to address, with timeout + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param addr Address of device to write to + * \param src Pointer to data to send + * \param len Length of data in bytes to send + * \param nostop If true, master retains control of the bus at the end of the transfer (no Stop is issued), + * and the next transfer will begin with a Restart rather than a Start. + * \param timeout_us The time that the function will wait for the entire transaction to complete. Note, an individual timeout of + * this value divided by the length of data is applied for each byte transfer, so if the first or subsequent + * bytes fails to transfer within that sub timeout, the function will return with an error. + * + * \return Number of bytes written, or PICO_ERROR_GENERIC if address not acknowledged, no device present, or PICO_ERROR_TIMEOUT if a timeout occurred. + */ +static inline int i2c_write_timeout_us(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop, uint timeout_us) { + absolute_time_t t = make_timeout_time_us(timeout_us); + return i2c_write_blocking_until(i2c, addr, src, len, nostop, t); +} + +int i2c_write_timeout_per_char_us(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop, uint timeout_per_char_us); + +/*! \brief Attempt to read specified number of bytes from address, with timeout + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param addr Address of device to read from + * \param dst Pointer to buffer to receive data + * \param len Length of data in bytes to receive + * \param nostop If true, master retains control of the bus at the end of the transfer (no Stop is issued), + * and the next transfer will begin with a Restart rather than a Start. + * \param timeout_us The time that the function will wait for the entire transaction to complete + * \return Number of bytes read, or PICO_ERROR_GENERIC if address not acknowledged, no device present, or PICO_ERROR_TIMEOUT if a timeout occurred. + */ +static inline int i2c_read_timeout_us(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop, uint timeout_us) { + absolute_time_t t = make_timeout_time_us(timeout_us); + return i2c_read_blocking_until(i2c, addr, dst, len, nostop, t); +} + +int i2c_read_timeout_per_char_us(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop, uint timeout_per_char_us); + +/*! \brief Attempt to write specified number of bytes to address, blocking + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param addr Address of device to write to + * \param src Pointer to data to send + * \param len Length of data in bytes to send + * \param nostop If true, master retains control of the bus at the end of the transfer (no Stop is issued), + * and the next transfer will begin with a Restart rather than a Start. + * \return Number of bytes written, or PICO_ERROR_GENERIC if address not acknowledged, no device present. + */ +int i2c_write_blocking(i2c_inst_t *i2c, uint8_t addr, const uint8_t *src, size_t len, bool nostop); + +/*! \brief Attempt to read specified number of bytes from address, blocking + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param addr Address of device to read from + * \param dst Pointer to buffer to receive data + * \param len Length of data in bytes to receive + * \param nostop If true, master retains control of the bus at the end of the transfer (no Stop is issued), + * and the next transfer will begin with a Restart rather than a Start. + * \return Number of bytes read, or PICO_ERROR_GENERIC if address not acknowledged, no device present. + */ +int i2c_read_blocking(i2c_inst_t *i2c, uint8_t addr, uint8_t *dst, size_t len, bool nostop); + + +/*! \brief Determine non-blocking write space available + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \return 0 if no space is available in the I2C to write more data. If return is nonzero, at + * least that many bytes can be written without blocking. + */ +static inline size_t i2c_get_write_available(i2c_inst_t *i2c) { + const size_t IC_TX_BUFFER_DEPTH = 32; + return IC_TX_BUFFER_DEPTH - i2c_get_hw(i2c)->txflr; +} + +/*! \brief Determine number of bytes received + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \return 0 if no data available, if return is nonzero at + * least that many bytes can be read without blocking. + */ +static inline size_t i2c_get_read_available(i2c_inst_t *i2c) { + return i2c_get_hw(i2c)->rxflr; +} + +/*! \brief Write direct to TX FIFO + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param src Data to send + * \param len Number of bytes to send + * + * Writes directly to the to I2C TX FIFO which us mainly useful for + * slave-mode operation. + */ +static inline void i2c_write_raw_blocking(i2c_inst_t *i2c, const uint8_t *src, size_t len) { + for (size_t i = 0; i < len; ++i) { + // TODO NACK or STOP on end? + while (!i2c_get_write_available(i2c)) + tight_loop_contents(); + i2c_get_hw(i2c)->data_cmd = *src++; + } +} + +/*! \brief Write direct to TX FIFO + * \ingroup hardware_i2c + * + * \param i2c Either \ref i2c0 or \ref i2c1 + * \param dst Buffer to accept data + * \param len Number of bytes to send + * + * Reads directly from the I2C RX FIFO which us mainly useful for + * slave-mode operation. + */ +static inline void i2c_read_raw_blocking(i2c_inst_t *i2c, uint8_t *dst, size_t len) { + for (size_t i = 0; i < len; ++i) { + while (!i2c_get_read_available(i2c)) + tight_loop_contents(); + *dst++ = i2c_get_hw(i2c)->data_cmd; + } +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/CMakeLists.txt new file mode 100644 index 0000000000..d6d693fcde --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(interp) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/include/hardware/interp.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/include/hardware/interp.h new file mode 100644 index 0000000000..53f2f6d576 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/include/hardware/interp.h @@ -0,0 +1,435 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_INTERP_H +#define _HARDWARE_INTERP_H + +#include "pico.h" +#include "hardware/structs/interp.h" +#include "hardware/regs/sio.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_INTERP, Enable/disable assertions in the interpolation module, type=bool, default=0, group=hardware_interp +#ifndef PARAM_ASSERTIONS_ENABLED_INTERP +#define PARAM_ASSERTIONS_ENABLED_INTERP 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/interp.h + * \defgroup hardware_interp hardware_interp + * + * Hardware Interpolator API + * + * Each core is equipped with two interpolators (INTERP0 and INTERP1) which can be used to accelerate + * tasks by combining certain pre-configured simple operations into a single processor cycle. Intended + * for cases where the pre-configured operation is repeated a large number of times, this results in + * code which uses both fewer CPU cycles and fewer CPU registers in the time critical sections of the + * code. + * + * The interpolators are used heavily to accelerate audio operations within the Pico SDK, but their + * flexible configuration make it possible to optimise many other tasks such as quantization and + * dithering, table lookup address generation, affine texture mapping, decompression and linear feedback. + * + * Please refer to the RP2040 datasheet for more information on the HW interpolators and how they work. + */ + +#define interp0 interp0_hw +#define interp1 interp1_hw + +/** \brief Interpolator configuration + * \defgroup interp_config interp_config + * \ingroup hardware_interp + * + * Each interpolator needs to be configured, these functions provide handy helpers to set up configuration + * structures. + * + */ + +typedef struct { + uint32_t ctrl; +} interp_config; + +static inline uint interp_index(interp_hw_t *interp) { + assert(interp == interp0 || interp == interp1); + return interp == interp1 ? 1 : 0; +} + +/*! \brief Claim the interpolator lane specified + * \ingroup hardware_interp + * + * Use this function to claim exclusive access to the specified interpolator lane. + * + * This function will panic if the lane is already claimed. + * + * \param interp Interpolator on which to claim a lane. interp0 or interp1 + * \param lane The lane number, 0 or 1. + */ +void interp_claim_lane(interp_hw_t *interp, uint lane); + +/*! \brief Claim the interpolator lanes specified in the mask + * \ingroup hardware_interp + * + * \param interp Interpolator on which to claim lanes. interp0 or interp1 + * \param lane_mask Bit pattern of lanes to claim (only bits 0 and 1 are valid) + */ +void interp_claim_lane_mask(interp_hw_t *interp, uint lane_mask); + +/*! \brief Release a previously claimed interpolator lane + * \ingroup hardware_interp + * + * \param interp Interpolator on which to release a lane. interp0 or interp1 + * \param lane The lane number, 0 or 1 + */ +void interp_unclaim_lane(interp_hw_t *interp, uint lane); + +/*! \brief Set the interpolator shift value + * \ingroup interp_config + * + * Sets the number of bits the accumulator is shifted before masking, on each iteration. + * + * \param c Pointer to an interpolator config + * \param shift Number of bits + */ +static inline void interp_config_set_shift(interp_config *c, uint shift) { + valid_params_if(INTERP, shift < 32); + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_SHIFT_BITS) | + ((shift << SIO_INTERP0_CTRL_LANE0_SHIFT_LSB) & SIO_INTERP0_CTRL_LANE0_SHIFT_BITS); +} + +/*! \brief Set the interpolator mask range + * \ingroup interp_config + * + * Sets the range of bits (least to most) that are allowed to pass through the interpolator + * + * \param c Pointer to interpolation config + * \param mask_lsb The least significant bit allowed to pass + * \param mask_msb The most significant bit allowed to pass + */ +static inline void interp_config_set_mask(interp_config *c, uint mask_lsb, uint mask_msb) { + valid_params_if(INTERP, mask_msb < 32); + valid_params_if(INTERP, mask_lsb <= mask_msb); + c->ctrl = (c->ctrl & ~(SIO_INTERP0_CTRL_LANE0_MASK_LSB_BITS | SIO_INTERP0_CTRL_LANE0_MASK_MSB_BITS)) | + ((mask_lsb << SIO_INTERP0_CTRL_LANE0_MASK_LSB_LSB) & SIO_INTERP0_CTRL_LANE0_MASK_LSB_BITS) | + ((mask_msb << SIO_INTERP0_CTRL_LANE0_MASK_MSB_LSB) & SIO_INTERP0_CTRL_LANE0_MASK_MSB_BITS); +} + +/*! \brief Enable cross input + * \ingroup interp_config + * + * Allows feeding of the accumulator content from the other lane back in to this lanes shift+mask hardware. + * This will take effect even if the interp_config_set_add_raw option is set as the cross input mux is before the + * shift+mask bypass + * + * \param c Pointer to interpolation config + * \param cross_input If true, enable the cross input. + */ +static inline void interp_config_set_cross_input(interp_config *c, bool cross_input) { + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_BITS) | + (cross_input ? SIO_INTERP0_CTRL_LANE0_CROSS_INPUT_BITS : 0); +} + +/*! \brief Enable cross results + * \ingroup interp_config + * + * Allows feeding of the other lane’s result into this lane’s accumulator on a POP operation. + * + * \param c Pointer to interpolation config + * \param cross_result If true, enables the cross result + */ +static inline void interp_config_set_cross_result(interp_config *c, bool cross_result) { + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_BITS) | + (cross_result ? SIO_INTERP0_CTRL_LANE0_CROSS_RESULT_BITS : 0); +} + +/*! \brief Set sign extension + * \ingroup interp_config + * + * Enables signed mode, where the shifted and masked accumulator value is sign-extended to 32 bits + * before adding to BASE1, and LANE1 PEEK/POP results appear extended to 32 bits when read by processor. + * + * \param c Pointer to interpolation config + * \param _signed If true, enables sign extension + */ +static inline void interp_config_set_signed(interp_config *c, bool _signed) { + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_SIGNED_BITS) | + (_signed ? SIO_INTERP0_CTRL_LANE0_SIGNED_BITS : 0); +} + +/*! \brief Set raw add option + * \ingroup interp_config + * + * When enabled, mask + shift is bypassed for LANE0 result. This does not affect the FULL result. + * + * \param c Pointer to interpolation config + * \param add_raw If true, enable raw add option. + */ +static inline void interp_config_set_add_raw(interp_config *c, bool add_raw) { + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_ADD_RAW_BITS) | + (add_raw ? SIO_INTERP0_CTRL_LANE0_ADD_RAW_BITS : 0); +} + +/*! \brief Set blend mode + * \ingroup interp_config + * + * If enabled, LANE1 result is a linear interpolation between BASE0 and BASE1, controlled + * by the 8 LSBs of lane 1 shift and mask value (a fractional number between 0 and 255/256ths) + * + * LANE0 result does not have BASE0 added (yields only the 8 LSBs of lane 1 shift+mask value) + * + * FULL result does not have lane 1 shift+mask value added (BASE2 + lane 0 shift+mask) + * + * LANE1 SIGNED flag controls whether the interpolation is signed or unsig + * + * \param c Pointer to interpolation config + * \param blend Set true to enable blend mode. +*/ +static inline void interp_config_set_blend(interp_config *c, bool blend) { + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_BLEND_BITS) | + (blend ? SIO_INTERP0_CTRL_LANE0_BLEND_BITS : 0); +} + +/*! \brief Set interpolator clamp mode (Interpolator 1 only) + * \ingroup interp_config + * + * Only present on INTERP1 on each core. If CLAMP mode is enabled: + * - LANE0 result is a shifted and masked ACCUM0, clamped by a lower bound of BASE0 and an upper bound of BASE1. + * - Signedness of these comparisons is determined by LANE0_CTRL_SIGNED + * + * \param c Pointer to interpolation config + * \param clamp Set true to enable clamp mode + */ +static inline void interp_config_set_clamp(interp_config *c, bool clamp) { + c->ctrl = (c->ctrl & ~SIO_INTERP1_CTRL_LANE0_CLAMP_BITS) | + (clamp ? SIO_INTERP1_CTRL_LANE0_CLAMP_BITS : 0); +} + +/*! \brief Set interpolator Force bits + * \ingroup interp_config + * + * ORed into bits 29:28 of the lane result presented to the processor on the bus. + * + * No effect on the internal 32-bit datapath. Handy for using a lane to generate sequence + * of pointers into flash or SRAM + * + * \param c Pointer to interpolation config + * \param bits Sets the force bits to that specified. Range 0-3 (two bits) + */ +static inline void interp_config_set_force_bits(interp_config *c, uint bits) { + invalid_params_if(INTERP, bits > 3); + // note cannot use hw_set_bits on SIO + c->ctrl = (c->ctrl & ~SIO_INTERP0_CTRL_LANE0_FORCE_MSB_BITS) | + (bits << SIO_INTERP0_CTRL_LANE0_FORCE_MSB_LSB); +} + +/*! \brief Get a default configuration + * \ingroup interp_config + * + * \return A default interpolation configuration + */ +static inline interp_config interp_default_config() { + interp_config c = {0}; + // Just pass through everything + interp_config_set_mask(&c, 0, 31); + return c; +} + +/*! \brief Send configuration to a lane + * \ingroup interp_config + * + * If an invalid configuration is specified (ie a lane specific item is set on wrong lane), + * depending on setup this function can panic. + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane to set + * \param config Pointer to interpolation config + */ + +static inline void interp_set_config(interp_hw_t *interp, uint lane, interp_config *config) { + invalid_params_if(INTERP, lane > 1); + invalid_params_if(INTERP, config->ctrl & SIO_INTERP1_CTRL_LANE0_CLAMP_BITS && + (!interp_index(interp) || lane)); // only interp1 lane 0 has clamp bit + invalid_params_if(INTERP, config->ctrl & SIO_INTERP0_CTRL_LANE0_BLEND_BITS && + (interp_index(interp) || lane)); // only interp0 lane 0 has blend bit + interp->ctrl[lane] = config->ctrl; +} + +/*! \brief Directly set the force bits on a specified lane + * \ingroup hardware_interp + * + * These bits are ORed into bits 29:28 of the lane result presented to the processor on the bus. + * There is no effect on the internal 32-bit datapath. + * + * Useful for using a lane to generate sequence of pointers into flash or SRAM, saving a subsequent + * OR or add operation. + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane to set + * \param bits The bits to set (bits 0 and 1, value range 0-3) + */ +static inline void interp_set_force_bits(interp_hw_t *interp, uint lane, uint bits) { + // note cannot use hw_set_bits on SIO + interp->ctrl[lane] |= (bits << SIO_INTERP0_CTRL_LANE0_FORCE_MSB_LSB); +} + +typedef struct { + io_rw_32 accum[2]; + io_rw_32 base[3]; + io_rw_32 ctrl[2]; +} interp_hw_save_t; + +/*! \brief Save the specified interpolator state + * \ingroup hardware_interp + * + * Can be used to save state if you need an interpolator for another purpose, state + * can then be recovered afterwards and continue from that point + * + * \param interp Interpolator instance, interp0 or interp1. + * \param saver Pointer to the save structure to fill in + */ +void interp_save(interp_hw_t *interp, interp_hw_save_t *saver); + +/*! \brief Restore an interpolator state + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param saver Pointer to save structure to reapply to the specified interpolator + */ +void interp_restore(interp_hw_t *interp, interp_hw_save_t *saver); + +/*! \brief Sets the interpolator base register by lane + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 or 2 + * \param val The value to apply to the register + */ +static inline void interp_set_base(interp_hw_t *interp, uint lane, uint32_t val) { + interp->base[lane] = val; +} + +/*! \brief Gets the content of interpolator base register by lane + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 or 2 + * \return The current content of the lane base register + */ +static inline uint32_t interp_get_base(interp_hw_t *interp, uint lane) { + return interp->base[lane]; +} + +/*! \brief Sets the interpolator base registers simultaneously + * \ingroup hardware_interp + * + * The lower 16 bits go to BASE0, upper bits to BASE1 simultaneously. + * Each half is sign-extended to 32 bits if that lane’s SIGNED flag is set. + * + * \param interp Interpolator instance, interp0 or interp1. + * \param val The value to apply to the register + */ +static inline void interp_set_base_both(interp_hw_t *interp, uint32_t val) { + interp->base01 = val; +} + + +/*! \brief Sets the interpolator accumulator register by lane + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 + * \param val The value to apply to the register + */ +static inline void interp_set_accumulator(interp_hw_t *interp, uint lane, uint32_t val) { + interp->accum[lane] = val; +} + +/*! \brief Gets the content of the interpolator accumulator register by lane + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 + * \return The current content of the register + */ +static inline uint32_t interp_get_accumulator(interp_hw_t *interp, uint lane) { + return interp->accum[lane]; +} + +/*! \brief Read lane result, and write lane results to both accumulators to update the interpolator + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 + * \return The content of the lane result register + */ +static inline uint32_t interp_pop_lane_result(interp_hw_t *interp, uint lane) { + return interp->pop[lane]; +} + +/*! \brief Read lane result + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 + * \return The content of the lane result register + */ +static inline uint32_t interp_peek_lane_result(interp_hw_t *interp, uint lane) { + return interp->peek[lane]; +} + +/*! \brief Read lane result, and write lane results to both accumulators to update the interpolator + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \return The content of the FULL register + */ +static inline uint32_t interp_pop_full_result(interp_hw_t *interp) { + return interp->pop[2]; +} + +/*! \brief Read lane result + * \ingroup hardware_interp + * + * \param interp Interpolator instance, interp0 or interp1. + * \return The content of the FULL register + */ +static inline uint32_t interp_peek_full_result(interp_hw_t *interp) { + return interp->peek[2]; +} + +/*! \brief Add to accumulator + * \ingroup hardware_interp + * + * Atomically add the specified value to the accumulator on the specified lane + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 + * \param val Value to add + * \return The content of the FULL register + */ +static inline void interp_add_accumulater(interp_hw_t *interp, uint lane, uint32_t val) { + interp->add_raw[lane] = val; +} + +/*! \brief Get raw lane value + * \ingroup hardware_interp + * + * Returns the raw shift and mask value from the specified lane, BASE0 is NOT added + * + * \param interp Interpolator instance, interp0 or interp1. + * \param lane The lane number, 0 or 1 + * \return The raw shift/mask value + */ +static inline uint32_t interp_get_raw(interp_hw_t *interp, uint lane) { + return interp->add_raw[lane]; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/interp.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/interp.c new file mode 100644 index 0000000000..5fdad93c19 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_interp/interp.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/interp.h" +#include "hardware/structs/sio.h" +#include "hardware/claim.h" + +check_hw_size(interp_hw_t, SIO_INTERP1_ACCUM0_OFFSET - SIO_INTERP0_ACCUM0_OFFSET); + +check_hw_layout(sio_hw_t, interp, SIO_INTERP0_ACCUM0_OFFSET); + +static_assert(NUM_DMA_CHANNELS <= 16, ""); + +static uint8_t _claimed; + +void interp_claim_lane(interp_hw_t *interp, uint lane) { + valid_params_if(INTERP, lane < 2); + uint bit = (interp_index(interp) << 1u) | lane; + hw_claim_or_assert((uint8_t *) &_claimed, bit, "Lane is already claimed"); +} + +void interp_claim_lane_mask(interp_hw_t *interp, uint lane_mask) { + valid_params_if(INTERP, lane_mask && lane_mask <= 0x3); + if (lane_mask & 1u) interp_claim_lane(interp, 0); + if (lane_mask & 2u) interp_claim_lane(interp, 1); +} + +void interp_unclaim_lane(interp_hw_t *interp, uint lane) { + valid_params_if(INTERP, lane < 2); + uint bit = (interp_index(interp) << 1u) | lane; + hw_claim_clear((uint8_t *) &_claimed, bit); +} + +void interp_save(interp_hw_t *interp, interp_hw_save_t *saver) { + saver->accum[0] = interp->accum[0]; + saver->accum[1] = interp->accum[1]; + saver->base[0] = interp->base[0]; + saver->base[1] = interp->base[1]; + saver->base[2] = interp->base[2]; + saver->ctrl[0] = interp->ctrl[0]; + saver->ctrl[1] = interp->ctrl[1]; +} + +void interp_restore(interp_hw_t *interp, interp_hw_save_t *saver) { + interp->accum[0] = saver->accum[0]; + interp->accum[1] = saver->accum[1]; + interp->base[0] = saver->base[0]; + interp->base[1] = saver->base[1]; + interp->base[2] = saver->base[2]; + interp->ctrl[0] = saver->ctrl[0]; + interp->ctrl[1] = saver->ctrl[1]; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/CMakeLists.txt new file mode 100644 index 0000000000..c2182319d1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/CMakeLists.txt @@ -0,0 +1,6 @@ +pico_simple_hardware_target(irq) + +# additional sources/libraries + +target_sources(hardware_irq INTERFACE ${CMAKE_CURRENT_LIST_DIR}/irq_handler_chain.S) +target_link_libraries(hardware_irq INTERFACE pico_sync) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/include/hardware/irq.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/include/hardware/irq.h new file mode 100644 index 0000000000..6075118f27 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/include/hardware/irq.h @@ -0,0 +1,264 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_IRQ_H_ +#define _HARDWARE_IRQ_H_ + +// These two config items are also used by assembler, so keeping separate +// PICO_CONFIG: PICO_MAX_SHARED_IRQ_HANDLERS, Maximum Number of shared IRQ handers, default=4, advanced=true, group=hardware_irq +#ifndef PICO_MAX_SHARED_IRQ_HANDLERS +#define PICO_MAX_SHARED_IRQ_HANDLERS 4u +#endif + +// PICO_CONFIG: PICO_DISABLE_SHARED_IRQ_HANDLERS, Disable shared IRQ handers, type=bool, default=0, group=hardware_irq +#ifndef PICO_DISABLE_SHARED_IRQ_HANDLERS +#define PICO_DISABLE_SHARED_IRQ_HANDLERS 0 +#endif + +#ifndef __ASSEMBLER__ + +#include "pico.h" +#include "hardware/regs/intctrl.h" +#include "hardware/regs/m0plus.h" + +/** \file irq.h + * \defgroup hardware_irq hardware_irq + * + * Hardware interrupt handling + * + * The RP2040 uses the standard ARM nested vectored interrupt controller (NVIC). + * + * Interrupts are identified by a number from 0 to 31. + * + * On the RP2040, only the lower 26 IRQ signals are connected on the NVIC; IRQs 26 to 31 are tied to zero (never firing). + * + * There is one NVIC per core, and each core's NVIC has the same hardware interrupt lines routed to it, with the exception of the IO interrupts + * where there is one IO interrupt per bank, per core. These are completely independent, so for example, processor 0 can be + * interrupted by GPIO 0 in bank 0, and processor 1 by GPIO 1 in the same bank. + * + * \note That all IRQ APIs affect the executing core only (i.e. the core calling the function). + * + * \note You should not enable the same (shared) IRQ number on both cores, as this will lead to race conditions + * or starvation of one of the cores. Additionally don't forget that disabling interrupts on one core does not disable interrupts + * on the other core. + * + * There are three different ways to set handlers for an IRQ: + * - Calling irq_add_shared_handler() at runtime to add a handler for a multiplexed interrupt (e.g. GPIO bank) on the current core. Each handler, should check and clear the relevant hardware interrupt source + * - Calling irq_set_exclusive_handler() at runtime to install a single handler for the interrupt on the current core + * - Defining the interrupt handler explicitly in your application (e.g. by defining void `isr_dma_0` will make that function the handler for the DMA_IRQ_0 on core 0, and + * you will not be able to change it using the above APIs at runtime). Using this method can cause link conflicts at runtime, and offers no runtime performance benefit (i.e, it should not generally be used). + * + * \note If an IRQ is enabled and fires with no handler installed, a breakpoint will be hit and the IRQ number will + * be in r0. + * + * \section interrupt_nums Interrupt Numbers + * + * Interrupts are numbered as follows, a set of defines is available (intctrl.h) with these names to avoid using the numbers directly. + * + * IRQ | Interrupt Source + * ----|----------------- + * 0 | TIMER_IRQ_0 + * 1 | TIMER_IRQ_1 + * 2 | TIMER_IRQ_2 + * 3 | TIMER_IRQ_3 + * 4 | PWM_IRQ_WRAP + * 5 | USBCTRL_IRQ + * 6 | XIP_IRQ + * 7 | PIO0_IRQ_0 + * 8 | PIO0_IRQ_1 + * 9 | PIO1_IRQ_0 + * 10 | PIO1_IRQ_1 + * 11 | DMA_IRQ_0 + * 12 | DMA_IRQ_1 + * 13 | IO_IRQ_BANK0 + * 14 | IO_IRQ_QSPI + * 15 | SIO_IRQ_PROC0 + * 16 | SIO_IRQ_PROC1 + * 17 | CLOCKS_IRQ + * 18 | SPI0_IRQ + * 19 | SPI1_IRQ + * 20 | UART0_IRQ + * 21 | UART1_IRQ + * 22 | ADC0_IRQ_FIFO + * 23 | I2C0_IRQ + * 24 | I2C1_IRQ + * 25 | RTC_IRQ + * + */ + +// PICO_CONFIG: PICO_DEFAULT_IRQ_PRIORITY, Define the default IRQ priority, default=0x80, group=hardware_irq +#ifndef PICO_DEFAULT_IRQ_PRIORITY +#define PICO_DEFAULT_IRQ_PRIORITY 0x80 +#endif + +#define PICO_LOWEST_IRQ_PRIORITY 0x01 +#define PICO_HIGHEST_IRQ_PRIORITY 0xff + +// PICO_CONFIG: PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY, Set default shared IRQ order priority, default=0x80, group=hardware_irq +#ifndef PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY +#define PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY 0x80 +#endif + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_IRQ, Enable/disable assertions in the IRQ module, type=bool, default=0, group=hardware_irq +#ifndef PARAM_ASSERTIONS_ENABLED_IRQ +#define PARAM_ASSERTIONS_ENABLED_IRQ 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! \brief Interrupt handler function type + * \ingroup hardware_irq + * + * All interrupts handlers should be of this type, and follow normal ARM EABI register saving conventions + */ +typedef void (*irq_handler_t)(); + +/*! \brief Set specified interrupts priority + * \ingroup hardware_irq + * + * \param num Interrupt number + * \param hardware_priority Priority to set. Hardware priorities range from 0 (lowest) to 255 (highest) though only + * the top 2 bits are significant on ARM Cortex M0+. To make it easier to specify higher or lower priorities + * than the default, all IRQ priorities are initialized to PICO_DEFAULT_IRQ_PRIORITY by the SDK runtime at startup. + * PICO_DEFAULT_IRQ_PRIORITY defaults to 0x80 + */ +void irq_set_priority(uint num, uint8_t hardware_priority); + +/*! \brief Enable or disable a specific interrupt on the executing core + * \ingroup hardware_irq + * + * \param num Interrupt number \ref interrupt_nums + * \param enabled true to enable the interrupt, false to disable + */ +void irq_set_enabled(uint num, bool enabled); + +/*! \brief Determine if a specific interrupt is enabled on the executing core + * \ingroup hardware_irq + * + * \param num Interrupt number \ref interrupt_nums + * \return true if the interrupt is enabled + */ +bool irq_is_enabled(uint num); + +/*! \brief Enable/disable multiple interrupts on the executing core + * \ingroup hardware_irq + * + * \param mask 32-bit mask with one bits set for the interrupts to enable/disable + * \param enabled true to enable the interrupts, false to disable them. + */ +void irq_set_mask_enabled(uint32_t mask, bool enabled); + +/*! \brief Set an exclusive interrupt handler for an interrupt on the executing core. + * \ingroup hardware_irq + * + * Use this method to set a handler for single IRQ source interrupts, or when + * your code, use case or performance requirements dictate that there should + * no other handlers for the interrupt. + * + * This method will assert if there is already any sort of interrupt handler installed + * for the specified irq number. + * + * \param num Interrupt number \ref interrupt_nums + * \param handler The handler to set. See \ref irq_handler_t + * \see irq_add_shared_handler + */ +void irq_set_exclusive_handler(uint num, irq_handler_t handler); + +/*! \brief Get the exclusive interrupt handler for an interrupt on the executing core. + * \ingroup hardware_irq + * + * This method will return an exclusive IRQ handler set on this core + * by irq_set_exclusive_handler if there is one. + * + * \param num Interrupt number \ref interrupt_nums + * \see irq_set_exclusive_handler + * \return handler The handler if an exclusive handler is set for the IRQ, + * NULL if no handler is set or shared/shareable handlers are installed + */ +irq_handler_t irq_get_exclusive_handler(uint num); + +/*! \brief Add a shared interrupt handler for an interrupt on the executing core + * \ingroup hardware_irq + * + * Use this method to add a handler on an irq number shared between multiple distinct hardware sources (e.g. GPIO, DMA or PIO IRQs). + * Handlers added by this method will all be called in sequence from highest order_priority to lowest. The + * irq_set_exclusive_handler() method should be used instead if you know there will or should only ever be one handler for the interrupt. + * + * This method will assert if there is an exclusive interrupt handler set for this irq number on this core, or if + * the (total across all IRQs on both cores) maximum (configurable via PICO_MAX_SHARED_IRQ_HANDLERS) number of shared handlers + * would be exceeded. + * + * \param num Interrupt number + * \param handler The handler to set. See \ref irq_handler_t + * \param order_priority The order priority controls the order that handlers for the same IRQ number on the core are called. + * The shared irq handlers for an interrupt are all called when an IRQ fires, however the order of the calls is based + * on the order_priority (higher priorities are called first, identical priorities are called in undefined order). A good + * rule of thumb is to use PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY if you don't much care, as it is in the middle of + * the priority range by default. + * + * \see irq_set_exclusive_handler + */ +void irq_add_shared_handler(uint num, irq_handler_t handler, uint8_t order_priority); + +/*! \brief Remove a specific interrupt handler for the given irq number on the executing core + * \ingroup hardware_irq + * + * This method may be used to remove an irq set via either irq_set_exclusive_handler() or + * irq_add_shared_handler(), and will assert if the handler is not currently installed for the given + * IRQ number + * + * \note This method may *only* be called from user (non IRQ code) or from within the handler + * itself (i.e. an IRQ handler may remove itself as part of handling the IRQ). Attempts to call + * from another IRQ will cause an assertion. + * + * \param num Interrupt number \ref interrupt_nums + * \param handler The handler to removed. + * \see irq_set_exclusive_handler + * \see irq_add_shared_handler + */ +void irq_remove_handler(uint num, irq_handler_t handler); + +/*! \brief Get the current IRQ handler for the specified IRQ from the currently installed hardware vector table (VTOR) + * of the execution core + * \ingroup hardware_irq + * + * \param num Interrupt number \ref interrupt_nums + * \return the address stored in the VTABLE for the given irq number + */ +irq_handler_t irq_get_vtable_handler(uint num); + +/*! \brief Clear a specific interrupt on the executing core + * \ingroup hardware_irq + * + * \param int_num Interrupt number \ref interrupt_nums + */ +static inline void irq_clear(uint int_num) { + *((volatile uint32_t *) (PPB_BASE + M0PLUS_NVIC_ICPR_OFFSET)) = (1u << ((uint32_t) (int_num & 0x1F))); +} + +/*! \brief Force an interrupt to pending on the executing core + * \ingroup hardware_irq + * + * This should generally not be used for IRQs connected to hardware. + * + * \param num Interrupt number \ref interrupt_nums + */ +void irq_set_pending(uint num); + + +/*! \brief Perform IRQ priority intiialization for the current core + * + * \note This is an internal method and user should generally not call it. + */ +void irq_init_priorities(); +#ifdef __cplusplus +} +#endif + +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq.c new file mode 100644 index 0000000000..255c00df80 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq.c @@ -0,0 +1,401 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/irq.h" +#include "hardware/regs/m0plus.h" +#include "hardware/platform_defs.h" +#include "hardware/structs/scb.h" + +#include "pico/mutex.h" +#include "pico/assert.h" + +extern void __unhandled_user_irq(); +extern uint __get_current_exception(); + +static inline irq_handler_t *get_vtable() { + return (irq_handler_t *) scb_hw->vtor; +} + +static inline void *add_thumb_bit(void *addr) { + return (void *) (((uintptr_t) addr) | 0x1); +} + +static inline void *remove_thumb_bit(void *addr) { + return (void *) (((uintptr_t) addr) & ~0x1); +} + +static void set_raw_irq_handler_and_unlock(uint num, irq_handler_t handler, uint32_t save) { + // update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness) + get_vtable()[16 + num] = handler; + __dmb(); + spin_unlock(spin_lock_instance(PICO_SPINLOCK_ID_IRQ), save); +} + +static inline void check_irq_param(uint num) { + invalid_params_if(IRQ, num >= NUM_IRQS); +} + +void irq_set_enabled(uint num, bool enabled) { + check_irq_param(num); + irq_set_mask_enabled(1u << num, enabled); +} + +bool irq_is_enabled(uint num) { + check_irq_param(num); + return 0 != ((1u << num) & *((io_rw_32 *) (PPB_BASE + M0PLUS_NVIC_ISER_OFFSET))); +} + +void irq_set_mask_enabled(uint32_t mask, bool enabled) { + if (enabled) { + // Clear pending before enable + // (if IRQ is actually asserted, it will immediately re-pend) + *((io_rw_32 *) (PPB_BASE + M0PLUS_NVIC_ICPR_OFFSET)) = mask; + *((io_rw_32 *) (PPB_BASE + M0PLUS_NVIC_ISER_OFFSET)) = mask; + } else { + *((io_rw_32 *) (PPB_BASE + M0PLUS_NVIC_ICER_OFFSET)) = mask; + } +} + +void irq_set_pending(uint num) { + check_irq_param(num); + *((io_rw_32 *) (PPB_BASE + M0PLUS_NVIC_ISPR_OFFSET)) = 1u << num; +} + +#if PICO_MAX_SHARED_IRQ_HANDLERS +// limited by 8 bit relative links (and reality) +static_assert(PICO_MAX_SHARED_IRQ_HANDLERS >= 1 && PICO_MAX_SHARED_IRQ_HANDLERS < 0x7f, ""); + +// note these are not real functions, they are code fragments (i.e. don't call them) +extern void irq_handler_chain_first_slot(); +extern void irq_handler_chain_remove_tail(); + +extern struct irq_handler_chain_slot { + // first 3 half words are executable code (raw vtable handler points to one slot, and inst3 will jump to next + // in chain (or end of chain handler) + uint16_t inst1; + uint16_t inst2; + uint16_t inst3; + union { + // when a handler is removed while executing, it needs an extra instruction, which overwrites + // the link and the priority; this is ok because no one else is modifying the chain, as + // the chain is effectively core local, and the user code which might still need this link + // disable the IRQ in question before updating, which means we aren't executing! + struct { + int8_t link; + uint8_t priority; + }; + uint16_t inst4; + }; + irq_handler_t handler; +} irq_handler_chain_slots[PICO_MAX_SHARED_IRQ_HANDLERS]; + +static int8_t irq_hander_chain_free_slot_head; +#endif + +static inline bool is_shared_irq_raw_handler(irq_handler_t raw_handler) { + return (uintptr_t)raw_handler - (uintptr_t)irq_handler_chain_slots < sizeof(irq_handler_chain_slots); +} + +irq_handler_t irq_get_vtable_handler(uint num) { + check_irq_param(num); + return get_vtable()[16 + num]; +} + +void irq_set_exclusive_handler(uint num, irq_handler_t handler) { + check_irq_param(num); +#if !PICO_NO_RAM_VECTOR_TABLE + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); + uint32_t save = spin_lock_blocking(lock); + __unused irq_handler_t current = irq_get_vtable_handler(num); + hard_assert(current == __unhandled_user_irq || current == handler); + set_raw_irq_handler_and_unlock(num, handler, save); +#else + panic_unsupported(); +#endif +} + +irq_handler_t irq_get_exclusive_handler(uint num) { + check_irq_param(num); +#if !PICO_NO_RAM_VECTOR_TABLE + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); + uint32_t save = spin_lock_blocking(lock); + irq_handler_t current = irq_get_vtable_handler(num); + spin_unlock(lock, save); + if (current == __unhandled_user_irq || is_shared_irq_raw_handler(current)) { + return NULL; + } + return current; +#else + panic_unsupported(); +#endif +} + + +static uint16_t make_branch(uint16_t *from, void *to) { + uint32_t ui_from = (uint32_t)from; + uint32_t ui_to = (uint32_t)to; + uint32_t delta = (ui_to - ui_from - 4) / 2; + assert(!(delta >> 11u)); + return 0xe000 | (delta & 0x7ff); +} + +static void insert_branch_and_link(uint16_t *from, void *to) { + uint32_t ui_from = (uint32_t)from; + uint32_t ui_to = (uint32_t)to; + uint32_t delta = (ui_to - ui_from - 4) / 2; + assert(!(delta >> 11u)); + from[0] = 0xf000 | ((delta >> 11u) & 0x7ffu); + from[1] = 0xf800 | (delta & 0x7ffu); +} + +static inline void *resolve_branch(uint16_t *inst) { + assert(0x1c == (*inst)>>11u); + int32_t i_addr = (*inst) << 21u; + i_addr /= (int32_t)(1u<<21u); + return inst + 2 + i_addr; +} + +// GCC produces horrible code for subtraction of pointers here, and it was bugging me +static inline int8_t slot_diff(struct irq_handler_chain_slot *to, struct irq_handler_chain_slot *from) { + static_assert(sizeof(struct irq_handler_chain_slot) == 12, ""); + int32_t result; + // return (to - from); + // note this implementation has limited range, but is fine for plenty more than -128->127 result + asm (".syntax unified\n" + "subs %1, %2\n" + "adcs %1, %1\n" // * 2 (and + 1 if negative for rounding) + "ldr %0, =0xaaaa\n" + "muls %0, %1\n" + "lsrs %0, 20\n" + : "=l" (result), "+l" (to) + : "l" (from) + : + ); + return result; +} + +void irq_add_shared_handler(uint num, irq_handler_t handler, uint8_t order_priority) { + check_irq_param(num); +#if PICO_DISABLE_SHARED_IRQ_HANDLERS + +#endif +#if PICO_NO_RAM_VECTOR_TABLE || !PICO_MAX_SHARED_IRQ_HANDLERS + panic_unsupported() +#else + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); + uint32_t save = spin_lock_blocking(lock); + hard_assert(irq_hander_chain_free_slot_head >= 0); + struct irq_handler_chain_slot *slot = &irq_handler_chain_slots[irq_hander_chain_free_slot_head]; + int slot_index = irq_hander_chain_free_slot_head; + irq_hander_chain_free_slot_head = slot->link; + irq_handler_t vtable_handler = get_vtable()[16 + num]; + if (!is_shared_irq_raw_handler(vtable_handler)) { + // start new chain + hard_assert(vtable_handler == __unhandled_user_irq); + struct irq_handler_chain_slot slot_data = { + .inst1 = 0xa100, // add r1, pc, #0 + .inst2 = make_branch(&slot->inst2, irq_handler_chain_first_slot), // b irq_handler_chain_first_slot + .inst3 = 0xbd00, // pop {pc} + .link = -1, + .priority = order_priority, + .handler = handler + }; + *slot = slot_data; + vtable_handler = (irq_handler_t)add_thumb_bit(slot); + } else { + assert(!((((uintptr_t)vtable_handler) - ((uintptr_t)irq_handler_chain_slots) - 1)%sizeof(struct irq_handler_chain_slot))); + struct irq_handler_chain_slot *prev_slot = NULL; + struct irq_handler_chain_slot *existing_vtable_slot = remove_thumb_bit(vtable_handler); + struct irq_handler_chain_slot *cur_slot = existing_vtable_slot; + while (cur_slot->priority > order_priority) { + prev_slot = cur_slot; + if (cur_slot->link < 0) break; + cur_slot = &irq_handler_chain_slots[cur_slot->link]; + } + if (prev_slot) { + // insert into chain + struct irq_handler_chain_slot slot_data = { + .inst1 = 0x4801, // ldr r0, [pc, #4] + .inst2 = 0x4780, // blx r0 + .inst3 = prev_slot->link >= 0 ? + make_branch(&slot->inst3, resolve_branch(&prev_slot->inst3)) : // b next_slot + 0xbd00, // pop {pc} + .link = prev_slot->link, + .priority = order_priority, + .handler = handler + }; + // update code and data links + prev_slot->inst3 = make_branch(&prev_slot->inst3, slot), + prev_slot->link = slot_index; + *slot = slot_data; + } else { + // update with new chain head + struct irq_handler_chain_slot slot_data = { + .inst1 = 0xa100, // add r1, pc, #0 + .inst2 = make_branch(&slot->inst2, irq_handler_chain_first_slot), // b irq_handler_chain_first_slot + .inst3 = make_branch(&slot->inst3, existing_vtable_slot), // b existing_slot + .link = slot_diff(existing_vtable_slot, irq_handler_chain_slots), + .priority = order_priority, + .handler = handler + }; + *slot = slot_data; + // fixup previous head slot + existing_vtable_slot->inst1 = 0x4801; // ldr r0, [pc, #4] + existing_vtable_slot->inst2 = 0x4780; // blx r0 + vtable_handler = (irq_handler_t)add_thumb_bit(slot); + } + } + set_raw_irq_handler_and_unlock(num, vtable_handler, save); +#endif +} + +void irq_remove_handler(uint num, irq_handler_t handler) { +#if !PICO_NO_RAM_VECTOR_TABLE + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); + uint32_t save = spin_lock_blocking(lock); + irq_handler_t vtable_handler = get_vtable()[16 + num]; + if (vtable_handler != __unhandled_user_irq && vtable_handler != handler) { +#if !PICO_DISABLE_SHARED_IRQ_HANDLERS && PICO_MAX_SHARED_IRQ_HANDLERS + if (is_shared_irq_raw_handler(vtable_handler)) { + // This is a bit tricky, as an executing IRQ handler doesn't take a lock. + + // First thing to do is to disable the IRQ in question; that takes care of calls from user code. + // Note that a irq handler chain is local to our own core, so we don't need to worry about the other core + bool was_enabled = irq_is_enabled(num); + irq_set_enabled(num, false); + __dmb(); + + // It is possible we are being called while an IRQ for this chain is already in progress. + // The issue we have here is that we must not free a slot that is currently being executed, because + // inst3 is still to be executed, and inst3 might get overwritten if the slot is re-used. + + // By disallowing other exceptions from removing an IRQ handler (which seems fair) + // we now only have to worry about removing a slot from a chain that is currently executing. + + // Note we expect that the slot we are deleting is the one that is executing. + // In particular, bad things happen if the caller were to delete the handler in the chain + // before it. This is not an allowed use case though, and I can't imagine anyone wanting to in practice. + // Sadly this is not something we can detect. + + uint exception = __get_current_exception(); + hard_assert(!exception || exception == num + 16); + + struct irq_handler_chain_slot *prev_slot = NULL; + struct irq_handler_chain_slot *existing_vtable_slot = remove_thumb_bit(vtable_handler); + struct irq_handler_chain_slot *to_free_slot = existing_vtable_slot; + int to_free_slot_index = to_free_slot - irq_handler_chain_slots; + while (to_free_slot->handler != handler) { + prev_slot = to_free_slot; + if (to_free_slot->link < 0) break; + to_free_slot = &irq_handler_chain_slots[to_free_slot->link]; + } + if (to_free_slot->handler == handler) { + int next_slot_index = to_free_slot->link; + if (next_slot_index >= 0) { + // There is another slot in the chain, so copy that over us, so that our inst3 points at something valid + // Note this only matters in the exception case anyway, and it that case, we will skip the next handler, + // however in that case it's IRQ cause should immediately cause re-entry of the IRQ and the only side + // effect will be that there was potentially brief out of priority order execution of the handlers + struct irq_handler_chain_slot *next_slot = &irq_handler_chain_slots[next_slot_index]; + to_free_slot->handler = next_slot->handler; + to_free_slot->priority = next_slot->priority; + to_free_slot->link = next_slot->link; + to_free_slot->inst3 = next_slot->link >= 0 ? + make_branch(&to_free_slot->inst3, resolve_branch(&next_slot->inst3)) : // b mext_>slot->next_slot + 0xbd00; // pop {pc} + + // add old next slot back to free list + next_slot->link = irq_hander_chain_free_slot_head; + irq_hander_chain_free_slot_head = next_slot_index; + } else { + // Slot being removed is at the end of the chain + if (!exception) { + // case when we're not in exception, we physically unlink now + if (prev_slot) { + // chain is not empty + prev_slot->link = -1; + prev_slot->inst3 = 0xbd00; // pop {pc} + } else { + // chain is not empty + vtable_handler = __unhandled_user_irq; + } + // add slot back to free list + to_free_slot->link = irq_hander_chain_free_slot_head; + irq_hander_chain_free_slot_head = to_free_slot_index; + } else { + // since we are the last slot we know that our inst3 hasn't executed yet, so we change + // it to bl to irq_handler_chain_remove_tail which will remove the slot. + // NOTE THAT THIS TRASHES PRIORITY AND LINK SINCE THIS IS A 4 BYTE INSTRUCTION + // BUT THEY ARE NOT NEEDED NOW + insert_branch_and_link(&to_free_slot->inst3, irq_handler_chain_remove_tail); + } + } + } else { + assert(false); // not found + } + irq_set_enabled(num, was_enabled); + } +#else + assert(false); // not found +#endif + } else { + vtable_handler = __unhandled_user_irq; + } + set_raw_irq_handler_and_unlock(num, vtable_handler, save); +#else + panic_unsupported(); +#endif +} + +void irq_set_priority(uint num, uint8_t hardware_priority) { + check_irq_param(num); + + // note that only 32 bit writes are supported + io_rw_32 *p = (io_rw_32 *)((PPB_BASE + M0PLUS_NVIC_IPR0_OFFSET) + (num & ~3u)); + *p = (*p & ~(0xffu << (8 * (num & 3u)))) | (((uint32_t) hardware_priority) << (8 * (num & 3u))); +} + +#if !PICO_DISABLE_SHARED_IRQ_HANDLERS && PICO_MAX_SHARED_IRQ_HANDLERS +// used by irq_handler_chain.S to remove the last link in a handler chain after it executes +// note this must be called only with the last slot in a chain (and during the exception) +void irq_add_tail_to_free_list(struct irq_handler_chain_slot *slot) { + irq_handler_t slot_handler = (irq_handler_t) add_thumb_bit(slot); + assert(is_shared_irq_raw_handler(slot_handler)); + + int exception = __get_current_exception(); + assert(exception); + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); + uint32_t save = spin_lock_blocking(lock); + int slot_index = slot - irq_handler_chain_slots; + if (slot_handler == get_vtable()[exception]) { + get_vtable()[exception] = __unhandled_user_irq; + } else { + bool __unused found = false; + // need to find who points at the slot and update it + for(uint i=0;ilink = irq_hander_chain_free_slot_head; + irq_hander_chain_free_slot_head = slot_index; + spin_unlock(lock, save); +} +#endif + +void irq_init_priorities() { +#if PICO_DEFAULT_IRQ_PRIORITY != 0 + for (uint irq = 0; irq < NUM_IRQS; irq++) { + irq_set_priority(irq, PICO_DEFAULT_IRQ_PRIORITY); + } +#endif +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S new file mode 100644 index 0000000000..6a8a4b688f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/platform_defs.h" +#include "hardware/irq.h" + +#if !PICO_DISABLE_SHARED_IRQ_HANDLERS +.syntax unified +.cpu cortex-m0plus +.thumb + +.data +.align 2 + +.global irq_handler_chain_slots + +.global irq_handler_chain_first_slot +.global irq_handler_chain_remove_tail + +// +// These Slots make up the code and structure of the handler chains; the only external information are the VTABLE entries +// (obviously one set per core) and a free list head. Each individual handler chain starts with the VTABLE entry I +// pointing at the address of slot S (with thumb bit set). Thus each slot which is part of a chain is executble. +// +// The execution jumps (via branch instruction) from one slot to the other, then jumps to the end of chain handler. +// The entirety of the state needed to traverse the chain is contained within the slots of the chain, which is why +// a VTABLE entry is all that is needed per chain (rather than requiring a separarte set of head pointers) +// + +irq_handler_chain_slots: +.set next_slot_number, 1 +.rept PICO_MAX_SHARED_IRQ_HANDLERS + // a slot is executable and is always 3 instructions long. + .hword 0 // inst1 (either: ldr r0, [pc, #4] or for the FIRST slot : add r1, pc, #0 ) + .hword 0 // inst2 ( blx r0 b irq_handler_chain_first_slot ) + + .hword 0 // inst3 (either: b next_slot or for the LAST pop {pc} ) + + // next is a single byte index of next slot in chain (or -1 to end) +.if next_slot_number == PICO_MAX_SHARED_IRQ_HANDLERS + .byte 0xff +.else + .byte next_slot_number +.endif + // next is the 8 bit unsigned priority + .byte 0x00 +1: + // and finally the handler function pointer + .word 0x00000000 + .set next_slot_number, next_slot_number + 1 +.endr + +irq_handler_chain_first_slot: + push {lr} + ldr r0, [r1, #4] + adds r1, #1 + mov lr, r1 + bx r0 +irq_handler_chain_remove_tail: + mov r0, lr + subs r0, #9 + ldr r1, =irq_add_tail_to_free_list + blx r1 + pop {pc} + + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/CMakeLists.txt new file mode 100644 index 0000000000..ad018690bc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/CMakeLists.txt @@ -0,0 +1,4 @@ +pico_simple_hardware_target(pio) + +# additional libraries +target_link_libraries(hardware_pio INTERFACE hardware_gpio hardware_claim) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio.h new file mode 100644 index 0000000000..8cd80e63c0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio.h @@ -0,0 +1,1022 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_PIO_H_ +#define _HARDWARE_PIO_H_ + +#include "pico.h" +#include "hardware/address_mapped.h" +#include "hardware/structs/pio.h" +#include "hardware/gpio.h" +#include "hardware/regs/dreq.h" +#include "hardware/pio_instructions.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_PIO, Enable/disable assertions in the PIO module, type=bool, default=0, group=hardware_pio +#ifndef PARAM_ASSERTIONS_ENABLED_PIO +#define PARAM_ASSERTIONS_ENABLED_PIO 0 +#endif + +/** \file hardware/pio.h + * \defgroup hardware_pio hardware_pio + * + * Programmable I/O (PIO) API + * + * A programmable input/output block (PIO) is a versatile hardware interface which + * can support a number of different IO standards. There are two PIO blocks in the RP2040 + * + * Each PIO is programmable in the same sense as a processor: the four state machines independently + * execute short, sequential programs, to manipulate GPIOs and transfer data. Unlike a general + * purpose processor, PIO state machines are highly specialised for IO, with a focus on determinism, + * precise timing, and close integration with fixed-function hardware. Each state machine is equipped + * with: + * * Two 32-bit shift registers – either direction, any shift count + * * Two 32-bit scratch registers + * * 4×32 bit bus FIFO in each direction (TX/RX), reconfigurable as 8×32 in a single direction + * * Fractional clock divider (16 integer, 8 fractional bits) + * * Flexible GPIO mapping + * * DMA interface, sustained throughput up to 1 word per clock from system DMA + * * IRQ flag set/clear/status + * + * Full details of the PIO can be found in the RP2040 datasheet. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +static_assert(PIO_SM0_SHIFTCTRL_FJOIN_RX_LSB == PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB + 1, ""); + +/** \brief FIFO join states + * \ingroup hardware_pio + */ +enum pio_fifo_join { + PIO_FIFO_JOIN_NONE = 0, + PIO_FIFO_JOIN_TX = 1, + PIO_FIFO_JOIN_RX = 2, +}; + +enum pio_mov_status_type { + STATUS_TX_LESSTHAN = 0, + STATUS_RX_LESSTHAN = 1 +}; + +typedef pio_hw_t *PIO; + +/** Identifier for the first (PIO 0) hardware PIO instance (for use in PIO functions). + * + * e.g. pio_gpio_init(pio0, 5) + * + * \ingroup hardware_pio + * @{ + */ +#define pio0 pio0_hw +/** @} */ + +/** Identifier for the second (PIO 1) hardware PIO instance (for use in PIO functions). + * + * e.g. pio_gpio_init(pio1, 5) + * + * \ingroup hardware_pio + * @{ + */ +#define pio1 pio1_hw +/** @} */ + +/** \brief PIO state machine configuration + * \defgroup sm_config sm_config + * \ingroup hardware_pio + * + * A PIO block needs to be configured, these functions provide helpers to set up configuration + * structures. See \ref pio_sm_set_config + * + */ + +/** \brief PIO Configuration structure + * \ingroup sm_config + */ +typedef struct { + uint32_t clkdiv; + uint32_t execctrl; + uint32_t shiftctrl; + uint32_t pinctrl; +} pio_sm_config; + +static inline void check_sm_param(uint sm) { + valid_params_if(PIO, sm < NUM_PIO_STATE_MACHINES); +} + +/*! \brief Set the 'out' pins in a state machine configuration + * \ingroup sm_config + * + * Can overlap with the 'in', 'set' and 'sideset' pins + * + * \param c Pointer to the configuration structure to modify + * \param out_base 0-31 First pin to set as output + * \param out_count 0-32 Number of pins to set. + */ +static inline void sm_config_set_out_pins(pio_sm_config *c, uint out_base, uint out_count) { + assert(out_base < 32); + assert(out_count <= 32); + c->pinctrl = (c->pinctrl & ~(PIO_SM0_PINCTRL_OUT_BASE_BITS | PIO_SM0_PINCTRL_OUT_COUNT_BITS)) | + (out_base << PIO_SM0_PINCTRL_OUT_BASE_LSB) | + (out_count << PIO_SM0_PINCTRL_OUT_COUNT_LSB); +} + +/*! \brief Set the 'set' pins in a state machine configuration + * \ingroup sm_config + * + * Can overlap with the 'in', 'out' and 'sideset' pins + * + * \param c Pointer to the configuration structure to modify + * \param set_base 0-31 First pin to set as + * \param set_count 0-5 Number of pins to set. + */ +static inline void sm_config_set_set_pins(pio_sm_config *c, uint set_base, uint set_count) { + assert(set_base < 32); + assert(set_count <= 5); + c->pinctrl = (c->pinctrl & ~(PIO_SM0_PINCTRL_SET_BASE_BITS | PIO_SM0_PINCTRL_SET_COUNT_BITS)) | + (set_base << PIO_SM0_PINCTRL_SET_BASE_LSB) | + (set_count << PIO_SM0_PINCTRL_SET_COUNT_LSB); +} + +/*! \brief Set the 'in' pins in a state machine configuration + * \ingroup sm_config + * + * Can overlap with the 'out', ''set' and 'sideset' pins + * + * \param c Pointer to the configuration structure to modify + * \param in_base 0-31 First pin to set as input + */ +static inline void sm_config_set_in_pins(pio_sm_config *c, uint in_base) { + assert(in_base < 32); + c->pinctrl = (c->pinctrl & ~PIO_SM0_PINCTRL_IN_BASE_BITS) | + (in_base << PIO_SM0_PINCTRL_IN_BASE_LSB); +} + +/*! \brief Set the 'sideset' pins in a state machine configuration + * \ingroup sm_config + * + * Can overlap with the 'in', 'out' and 'set' pins + * + * \param c Pointer to the configuration structure to modify + * \param sideset_base base pin for 'side set' + */ +static inline void sm_config_set_sideset_pins(pio_sm_config *c, uint sideset_base) { + assert(sideset_base < 32); + c->pinctrl = (c->pinctrl & ~PIO_SM0_PINCTRL_SIDESET_BASE_BITS) | + (sideset_base << PIO_SM0_PINCTRL_SIDESET_BASE_LSB); +} + +/*! \brief Set the 'sideset' options in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param bit_count Number of bits to steal from delay field in the instruction for use of side set + * \param optional True if the topmost side set bit is used as a flag for whether to apply side set on that instruction + * \param pindirs True if the side set affects pin directions rather than values + */ +static inline void sm_config_set_sideset(pio_sm_config *c, uint bit_count, bool optional, bool pindirs) { + assert(bit_count <= 32); + c->pinctrl = (c->pinctrl & ~PIO_SM0_PINCTRL_SIDESET_COUNT_BITS) | + (bit_count << PIO_SM0_PINCTRL_SIDESET_COUNT_LSB); + + c->execctrl = (c->execctrl & ~(PIO_SM0_EXECCTRL_SIDE_EN_BITS | PIO_SM0_EXECCTRL_SIDE_PINDIR_BITS)) | + (!!optional << PIO_SM0_EXECCTRL_SIDE_EN_LSB) | + (!!pindirs << PIO_SM0_EXECCTRL_SIDE_PINDIR_LSB); +} + +/*! \brief Set the state machine clock divider (from a floating point value) in a state machine configuration + * \ingroup sm_config + * + * The clock divider acts on the system clock to provide a clock for the state machine. + * See the datasheet for more details. + * + * \param c Pointer to the configuration structure to modify + * \param div The fractional divisor to be set. 1 for full speed. An integer clock divisor of n + * will cause the state machine to run 1 cycle in every n. + * Note that for small n, the jitter introduced by a fractional divider (e.g. 2.5) may be unacceptable + * although it will depend on the use case. + */ +static inline void sm_config_set_clkdiv(pio_sm_config *c, float div) { + uint16_t div_int = (uint16_t) div; + uint8_t div_frac = (uint8_t) ((div - div_int) * (1u << 8u)); + c->clkdiv = + (div_frac << PIO_SM0_CLKDIV_FRAC_LSB) | + (div_int << PIO_SM0_CLKDIV_INT_LSB); +} + +/*! \brief Set the state machine clock divider (from integer and fractional parts - 16:8) in a state machine configuration + * \ingroup sm_config + * + * The clock divider acts on the system clock to provide a clock for the state machine. + * See the datasheet for more details. + * + * \param c Pointer to the configuration structure to modify + * \param div_int Integer part of the divisor + * \param div_frac Fractional part in 1/256ths + * \sa sm_config_set_clkdiv + */ +static inline void sm_config_set_clkdiv_int_frac(pio_sm_config *c, uint16_t div_int, uint8_t div_frac) { + c->clkdiv = + (div_frac << PIO_SM0_CLKDIV_FRAC_LSB) | + (div_int << PIO_SM0_CLKDIV_INT_LSB); +} + +/*! \brief Set the wrap addresses in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param wrap_target the instruction memory address to wrap to + * \param wrap the instruction memory address after which to set the program counter to wrap_target + * if the instruction does not itself update the program_counter + */ +static inline void sm_config_set_wrap(pio_sm_config *c, uint wrap_target, uint wrap) { + assert(wrap < PIO_INSTRUCTION_COUNT); + assert(wrap_target < PIO_INSTRUCTION_COUNT); + c->execctrl = (c->execctrl & ~(PIO_SM0_EXECCTRL_WRAP_TOP_BITS | PIO_SM0_EXECCTRL_WRAP_BOTTOM_BITS)) | + (wrap_target << PIO_SM0_EXECCTRL_WRAP_BOTTOM_LSB) | + (wrap << PIO_SM0_EXECCTRL_WRAP_TOP_LSB); +} + +/*! \brief Set the 'jmp' pin in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param pin The raw GPIO pin number to use as the source for a `jmp pin` instruction + */ +static inline void sm_config_set_jmp_pin(pio_sm_config *c, uint pin) { + assert(pin < 32); + c->execctrl = (c->execctrl & ~PIO_SM0_EXECCTRL_JMP_PIN_BITS) | + (pin << PIO_SM0_EXECCTRL_JMP_PIN_LSB); +} + +/*! \brief Setup 'in' shifting parameters in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param shift_right true to shift ISR to right, false to shift ISR to left + * \param autopush whether autopush is enabled + * \param push_threshold threshold in bits to shift in before auto/conditional re-pushing of the ISR + */ +static inline void sm_config_set_in_shift(pio_sm_config *c, bool shift_right, bool autopush, uint push_threshold) { + valid_params_if(PIO, push_threshold <= 32); + c->shiftctrl = (c->shiftctrl & + ~(PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_BITS | + PIO_SM0_SHIFTCTRL_AUTOPUSH_BITS | + PIO_SM0_SHIFTCTRL_PUSH_THRESH_BITS)) | + (!!shift_right << PIO_SM0_SHIFTCTRL_IN_SHIFTDIR_LSB) | + (!!autopush << PIO_SM0_SHIFTCTRL_AUTOPUSH_LSB) | + ((push_threshold & 0x1fu) << PIO_SM0_SHIFTCTRL_PUSH_THRESH_LSB); +} + +/*! \brief Setup 'out' shifting parameters in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param shift_right true to shift OSR to right, false to shift OSR to left + * \param autopull whether autopull is enabled + * \param pull_threshold threshold in bits to shift out before auto/conditional re-pulling of the OSR + */ +static inline void sm_config_set_out_shift(pio_sm_config *c, bool shift_right, bool autopull, uint pull_threshold) { + valid_params_if(PIO, pull_threshold <= 32); + c->shiftctrl = (c->shiftctrl & + ~(PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_BITS | + PIO_SM0_SHIFTCTRL_AUTOPULL_BITS | + PIO_SM0_SHIFTCTRL_PULL_THRESH_BITS)) | + (!!shift_right << PIO_SM0_SHIFTCTRL_OUT_SHIFTDIR_LSB) | + (!!autopull << PIO_SM0_SHIFTCTRL_AUTOPULL_LSB) | + ((pull_threshold & 0x1fu) << PIO_SM0_SHIFTCTRL_PULL_THRESH_LSB); +} + +/*! \brief Setup the FIFO joining in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param join Specifies the join type. \see enum pio_fifo_join + */ +static inline void sm_config_set_fifo_join(pio_sm_config *c, enum pio_fifo_join join) { + assert(join >= 0 && join <= 2); + c->shiftctrl = (c->shiftctrl & ~(PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS | PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS)) | + (join << PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB); +} + +/*! \brief Set special 'out' operations in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param sticky to enable 'sticky' output (i.e. re-asserting most recent OUT/SET pin values on subsequent cycles) + * \param has_enable_pin true to enable auxiliary OUT enable pin + * \param enable_pin_index pin index for auxiliary OUT enable + */ +static inline void sm_config_set_out_special(pio_sm_config *c, bool sticky, bool has_enable_pin, int enable_pin_index) { + c->execctrl = (c->execctrl & + ~(PIO_SM0_EXECCTRL_OUT_STICKY_BITS | PIO_SM0_EXECCTRL_INLINE_OUT_EN_BITS | + PIO_SM0_EXECCTRL_OUT_EN_SEL_BITS)) | + (!!sticky << PIO_SM0_EXECCTRL_OUT_STICKY_LSB) | + (!!has_enable_pin << PIO_SM0_EXECCTRL_INLINE_OUT_EN_LSB) | + ((enable_pin_index << PIO_SM0_EXECCTRL_OUT_EN_SEL_LSB) & PIO_SM0_EXECCTRL_OUT_EN_SEL_BITS); +} + +/*! \brief Set source for 'mov status' in a state machine configuration + * \ingroup sm_config + * + * \param c Pointer to the configuration structure to modify + * \param status_sel the status operation selector + * \param status_n parameter for the mov status operation (currently a bit count) + */ +static inline void sm_config_set_mov_status(pio_sm_config *c, enum pio_mov_status_type status_sel, uint status_n) { + c->execctrl = (c->execctrl + & ~(PIO_SM0_EXECCTRL_STATUS_SEL_BITS | PIO_SM0_EXECCTRL_STATUS_N_BITS)) + | ((status_sel << PIO_SM0_EXECCTRL_STATUS_SEL_LSB) & PIO_SM0_EXECCTRL_STATUS_SEL_BITS) + | ((status_n << PIO_SM0_EXECCTRL_STATUS_N_LSB) & PIO_SM0_EXECCTRL_STATUS_N_BITS); +} + + +/*! \brief Get the default state machine configuration + * \ingroup sm_config + * + * Setting | Default + * --------|-------- + * Out Pins | 32 starting at 0 + * Set Pins | 0 starting at 0 + * In Pins (base) | 0 + * Side Set Pins (base) | 0 + * Side Set | disabled + * Wrap | wrap=31, wrap_to=0 + * In Shift | shift_direction=right, autopush=false, push_thrshold=32 + * Out Shift | shift_direction=right, autopull=false, pull_thrshold=32 + * Jmp Pin | 0 + * Out Special | sticky=false, has_enable_pin=false, enable_pin_index=0 + * Mov Status | status_sel=STATUS_TX_LESSTHAN, n=0 + * + * \return the default state machine configuration which can then be modified. + */ +static inline pio_sm_config pio_get_default_sm_config() { + pio_sm_config c = {0, 0, 0}; + sm_config_set_clkdiv_int_frac(&c, 1, 0); + sm_config_set_wrap(&c, 0, 31); + sm_config_set_in_shift(&c, true, false, 32); + sm_config_set_out_shift(&c, true, false, 32); + return c; +} + +/*! \brief Apply a state machine configuration to a state machine + * \ingroup hardware_pio + * + * \param pio Handle to PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param config the configuration to apply +*/ +static inline void pio_sm_set_config(PIO pio, uint sm, const pio_sm_config *config) { + check_sm_param(sm); + pio->sm[sm].clkdiv = config->clkdiv; + pio->sm[sm].execctrl = config->execctrl; + pio->sm[sm].shiftctrl = config->shiftctrl; + pio->sm[sm].pinctrl = config->pinctrl; +} + +/*! \brief Return the instance number of a PIO instance + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \return the PIO instance number (either 0 or 1) + */ +static inline uint pio_get_index(PIO pio) { + assert(pio == pio0 || pio == pio1); + return pio == pio1 ? 1 : 0; +} + +/*! \brief Setup the function select for a GPIO to use output from the given PIO instance + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param pin the GPIO pin whose function select to set + */ +static inline void pio_gpio_init(PIO pio, uint pin) { + assert(pio == pio0 || pio == pio1); + gpio_set_function(pin, pio == pio0 ? GPIO_FUNC_PIO0 : GPIO_FUNC_PIO1); +} + +/*! \brief Return the DREQ to use for pacing transfers to a particular state machine + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param is_tx true for sending data to the state machine, false for received data from the state machine + */ +static inline uint pio_get_dreq(PIO pio, uint sm, bool is_tx) { + assert(pio == pio0 || pio == pio1); + check_sm_param(sm); + return sm + (is_tx ? 0 : NUM_PIO_STATE_MACHINES) + (pio == pio0 ? DREQ_PIO0_TX0 : DREQ_PIO1_TX0); +} + +typedef struct pio_program { + const uint16_t *instructions; + uint8_t length; + int8_t origin; // required instruction memory origin or -1 +} __packed pio_program_t; + +/*! \brief Determine whether the given program can (at the time of the call) be loaded onto the PIO instance + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param program the program definition + * \return true if the program can be loaded; false if there is not suitable space in the instruction memory + */ +bool pio_can_add_program(PIO pio, const pio_program_t *program); + +/*! \brief Determine whether the given program can (at the time of the call) be loaded onto the PIO instance starting at a particular location + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param program the program definition + * \param offset the instruction memory offset wanted for the start of the program + * \return true if the program can be loaded at that location; false if there is not space in the instruction memory + */ +bool pio_can_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset); + +/*! \brief Attempt to load the program, panicking if not possible + * \ingroup hardware_pio + * + * \see pico_can_add_program if you need to check whether the program can be loaded + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param program the program definition + * \return the instruction memory offset the program is loaded at + */ +uint pio_add_program(PIO pio, const pio_program_t *program); + +/*! \brief Attempt to load the program at the specified instruction memory offset, panicking if not possible + * \ingroup hardware_pio + * + * \see pico_can_add_program_at_offset if you need to check whether the program can be loaded + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param program the program definition + * \param offset the instruction memory offset wanted for the start of the program + * \return the instruction memory offset the program is loaded at + */ +void pio_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset); + +/*! \brief Remove a program from a PIO instance's instruction memory + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param program the program definition + * \param loaded_offset the loaded offset returned when the program was added + */ +void pio_remove_program(PIO pio, const pio_program_t *program, uint loaded_offset); + +/*! \brief Clears all of a PIO instance's instruction memory + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + */ +void pio_clear_instruction_memory(PIO pio); + +/*! \brief Resets the state machine to a consistent state, and configures it + * \ingroup hardware_pio + * + * This method: + * - disables the state machine (if running) + * - clears the FIFOs + * - applies the configuration + * - resets any internal state + * - jumps to the initial program location + * + * The state machine is disabled on return from this call + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param initial_pc the initial program memory offset to run from + * \param config the configuration to apply (or NULL to apply defaults) + */ +void pio_sm_init(PIO pio, uint sm, uint initial_pc, const pio_sm_config *config); + +/*! \brief Enable or disable a PIO state machine + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param enabled true to enable the state machine; false to disable + */ +static inline void pio_sm_set_enabled(PIO pio, uint sm, bool enabled) { + pio->ctrl = (pio->ctrl & ~(1u << sm)) | (!!enabled << sm); +} + +/*! \brief Enable or disable multiple PIO state machines + * \ingroup hardware_pio + * + * Note that this method just sets the enabled state of the state machine; + * if now enabled they continue exactly from where they left off. + * + * \see pio_enable_sm_mask_in_sync if you wish to enable multiple state machines + * and ensure their clock dividers are in sync. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param mask bit mask of state machine indexes to modify the enabled state of + * \param enabled true to enable the state machines; false to disable + */ +static inline void pio_set_sm_mask_enabled(PIO pio, uint32_t mask, bool enabled) { + pio->ctrl = (pio->ctrl & ~mask) | (enabled ? mask : 0u); +} + +/*! \brief Restart a state machine with a known state + * \ingroup hardware_pio + * + * This method clears the ISR, shift counters, clock divider counter + * pin write flags, delay counter, latched EXEC instruction, and IRQ wait condition. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +static inline void pio_sm_restart(PIO pio, uint sm) { + pio->ctrl |= 1u << (PIO_CTRL_SM_RESTART_LSB + sm); +} + +/*! \brief Restart multiple state machine with a known state + * \ingroup hardware_pio + * + * This method clears the ISR, shift counters, clock divider counter + * pin write flags, delay counter, latched EXEC instruction, and IRQ wait condition. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param mask bit mask of state machine indexes to modify the enabled state of + */ +static inline void pio_restart_sm_mask(PIO pio, uint32_t mask) { + pio->ctrl |= (mask << PIO_CTRL_SM_RESTART_LSB) & PIO_CTRL_SM_RESTART_BITS; +} + +/*! \brief Restart a state machine's clock divider (resetting the fractional count) + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +static inline void pio_sm_clkdiv_restart(PIO pio, uint sm) { + pio->ctrl |= 1u << (PIO_CTRL_CLKDIV_RESTART_LSB + sm); +} + +/*! \brief Restart multiple state machines' clock dividers (resetting the fractional count) + * \ingroup hardware_pio + * + * This method can be used to guarantee that multiple state machines with fractional clock dividers + * are exactly in sync + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param mask bit mask of state machine indexes to modify the enabled state of + */ +static inline void pio_clkdiv_restart_sm_mask(PIO pio, uint32_t mask) { + pio->ctrl |= (mask << PIO_CTRL_CLKDIV_RESTART_LSB) & PIO_CTRL_CLKDIV_RESTART_BITS; +} + +/*! \brief Enable multiple PIO state machines synchronizing their clock dividers + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param mask bit mask of state machine indexes to modify the enabled state of + */ +static inline void pio_enable_sm_mask_in_sync(PIO pio, uint32_t mask) { + pio->ctrl |= ((mask << PIO_CTRL_CLKDIV_RESTART_LSB) & PIO_CTRL_CLKDIV_RESTART_BITS) | + ((mask << PIO_CTRL_SM_ENABLE_LSB) & PIO_CTRL_SM_ENABLE_BITS); +} + +/*! \brief Return the current program counter for a state machine + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return the program counter + */ +static inline uint8_t pio_sm_get_pc(PIO pio, uint sm) { + check_sm_param(sm); + return (uint8_t) pio->sm[sm].addr; +} + +/*! \brief Immediately execute an instruction on a state machine + * \ingroup hardware_pio + * + * This instruction is executed instead of the next instruction in the normal control flow on the state machine. + * Subsequent calls to this method replace the previous executed + * instruction if it is still running. \see pio_sm_is_exec_stalled to see if an executed instruction + * is still running (i.e. it is stalled on some condition) + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param instr the encoded PIO instruction + */ +inline static void pio_sm_exec(PIO pio, uint sm, uint instr) { + check_sm_param(sm); + pio->sm[sm].instr = instr; +} + +/*! \brief Determine if an instruction set by pio_sm_exec() is stalled executing + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return true if the executed instruction is still running (stalled) + */ +static inline bool pio_sm_is_exec_stalled(PIO pio, uint sm) { + check_sm_param(sm); + return !!(pio->sm[sm].execctrl & PIO_SM0_EXECCTRL_EXEC_STALLED_BITS); +} + +/*! \brief Immediately execute an instruction on a state machine and wait for it to complete + * \ingroup hardware_pio + * + * This instruction is executed instead of the next instruction in the normal control flow on the state machine. + * Subsequent calls to this method replace the previous executed + * instruction if it is still running. \see pio_sm_is_exec_stalled to see if an executed instruction + * is still running (i.e. it is stalled on some condition) + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param instr the encoded PIO instruction + */ +static inline void pio_sm_exec_wait_blocking(PIO pio, uint sm, uint instr) { + pio_sm_exec(pio, sm, instr); + while (pio_sm_is_exec_stalled(pio, sm)) tight_loop_contents(); +} + +/*! \brief Set the current wrap configuration for a state machine + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param wrap_target the instruction memory address to wrap to + * \param wrap the instruction memory address after which to set the program counter to wrap_target + * if the instruction does not itself update the program_counter + */ +static inline void pio_sm_set_wrap(PIO pio, uint sm, uint wrap_target, uint wrap) { + check_sm_param(sm); + pio->sm[sm].execctrl = + (pio->sm[sm].execctrl & ~(PIO_SM0_EXECCTRL_WRAP_TOP_BITS | PIO_SM0_EXECCTRL_WRAP_BOTTOM_BITS)) | + (wrap_target << PIO_SM0_EXECCTRL_WRAP_BOTTOM_LSB) | + (wrap << PIO_SM0_EXECCTRL_WRAP_TOP_LSB); +} + +/*! \brief Set the current 'out' pins for a state machine + * \ingroup sm_config + * + * Can overlap with the 'in', 'set' and 'sideset' pins + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param out_base 0-31 First pin to set as output + * \param out_count 0-32 Number of pins to set. + */ +static inline void pio_sm_set_out_pins(PIO pio, uint sm, uint out_base, uint out_count) { + check_sm_param(sm); + assert(out_base < 32); + assert(out_count <= 32); + pio->sm[sm].pinctrl = (pio->sm[sm].pinctrl & ~(PIO_SM0_PINCTRL_OUT_BASE_BITS | PIO_SM0_PINCTRL_OUT_COUNT_BITS)) | + (out_base << PIO_SM0_PINCTRL_OUT_BASE_LSB) | + (out_count << PIO_SM0_PINCTRL_OUT_COUNT_LSB); +} + + +/*! \brief Set the current 'set' pins for a state machine + * \ingroup sm_config + * + * Can overlap with the 'in', 'out' and 'sideset' pins + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param set_base 0-31 First pin to set as + * \param set_count 0-5 Number of pins to set. + */ +static inline void pio_sm_set_set_pins(PIO pio, uint sm, uint set_base, uint set_count) { + check_sm_param(sm); + assert(set_base < 32); + assert(set_count <= 5); + pio->sm[sm].pinctrl = (pio->sm[sm].pinctrl & ~(PIO_SM0_PINCTRL_SET_BASE_BITS | PIO_SM0_PINCTRL_SET_COUNT_BITS)) | + (set_base << PIO_SM0_PINCTRL_SET_BASE_LSB) | + (set_count << PIO_SM0_PINCTRL_SET_COUNT_LSB); +} + +/*! \brief Set the current 'in' pins for a state machine + * \ingroup sm_config + * + * Can overlap with the 'out', ''set' and 'sideset' pins + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param in_base 0-31 First pin to set as input + */ +static inline void pio_sm_set_in_pins(PIO pio, uint sm, uint in_base) { + check_sm_param(sm); + assert(in_base < 32); + pio->sm[sm].pinctrl = (pio->sm[sm].pinctrl & ~PIO_SM0_PINCTRL_IN_BASE_BITS) | + (in_base << PIO_SM0_PINCTRL_IN_BASE_LSB); +} + +/*! \brief Set the current 'sideset' pins for a state machine + * \ingroup sm_config + * + * Can overlap with the 'in', 'out' and 'set' pins + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param sideset_base base pin for 'side set' + */ +static inline void pio_sm_set_sideset_pins(PIO pio, uint sm, uint sideset_base) { + check_sm_param(sm); + assert(sideset_base < 32); + pio->sm[sm].pinctrl = (pio->sm[sm].pinctrl & ~PIO_SM0_PINCTRL_SIDESET_BASE_BITS) | + (sideset_base << PIO_SM0_PINCTRL_SIDESET_BASE_LSB); +} + +/*! \brief Write a word of data to a state machine's TX FIFO + * \ingroup hardware_pio + * + * If the FIFO is full, the most recent value will be overwritten + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param data the 32 bit data value + */ +static inline void pio_sm_put(PIO pio, uint sm, uint32_t data) { + check_sm_param(sm); + pio->txf[sm] = data; +} + +/*! \brief Read a word of data from a state machine's RX FIFO + * \ingroup hardware_pio + * + * If the FIFO is empty, the return value is zero. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +static inline uint32_t pio_sm_get(PIO pio, uint sm) { + check_sm_param(sm); + return pio->rxf[sm]; +} + +/*! \brief Determine if a state machine's RX FIFO is full + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return true if the RX FIFO is full + */ +static inline bool pio_sm_is_rx_fifo_full(PIO pio, uint sm) { + check_sm_param(sm); + return (pio->fstat & (1u << (PIO_FSTAT_RXFULL_LSB + sm))) != 0; +} + +/*! \brief Determine if a state machine's RX FIFO is empty + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return true if the RX FIFO is empty + */ +static inline bool pio_sm_is_rx_fifo_empty(PIO pio, uint sm) { + check_sm_param(sm); + return (pio->fstat & (1u << (PIO_FSTAT_RXEMPTY_LSB + sm))) != 0; +} + +/*! \brief Return the number of elements currently in a state machine's RX FIFO + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return the number of elements in the RX FIFO + */ +static inline uint pio_sm_get_rx_fifo_level(PIO pio, uint sm) { + check_sm_param(sm); + int bitoffs = PIO_FLEVEL_RX0_LSB + sm * (PIO_FLEVEL_RX1_LSB - PIO_FLEVEL_RX0_LSB); + const uint32_t mask = PIO_FLEVEL_RX0_BITS >> PIO_FLEVEL_RX0_LSB; + return (pio->flevel >> bitoffs) & mask; +} + +/*! \brief Determine if a state machine's TX FIFO is full + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return true if the TX FIFO is full + */ +static inline bool pio_sm_is_tx_fifo_full(PIO pio, uint sm) { + check_sm_param(sm); + return (pio->fstat & (1u << (PIO_FSTAT_TXFULL_LSB + sm))) != 0; +} + +/*! \brief Determine if a state machine's TX FIFO is empty + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return true if the TX FIFO is empty + */ +static inline bool pio_sm_is_tx_fifo_empty(PIO pio, uint sm) { + check_sm_param(sm); + return (pio->fstat & (1u << (PIO_FSTAT_TXEMPTY_LSB + sm))) != 0; +} + +/*! \brief Return the number of elements currently in a state machine's TX FIFO + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \return the number of elements in the TX FIFO + */ +static inline uint pio_sm_get_tx_fifo_level(PIO pio, uint sm) { + check_sm_param(sm); + unsigned int bitoffs = PIO_FLEVEL_TX0_LSB + sm * (PIO_FLEVEL_TX1_LSB - PIO_FLEVEL_TX0_LSB); + const uint32_t mask = PIO_FLEVEL_TX0_BITS >> PIO_FLEVEL_TX0_LSB; + return (pio->flevel >> bitoffs) & mask; +} + +/*! \brief Write a word of data to a state machine's TX FIFO, blocking if the FIFO is full + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param data the 32 bit data value + */ +static inline void pio_sm_put_blocking(PIO pio, uint sm, uint32_t data) { + check_sm_param(sm); + while (pio_sm_is_tx_fifo_full(pio, sm)) tight_loop_contents(); + pio_sm_put(pio, sm, data); +} + +/*! \brief Read a word of data from a state machine's RX FIFO, blocking if the FIFO is empty + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +static inline uint32_t pio_sm_get_blocking(PIO pio, uint sm) { + check_sm_param(sm); + while (pio_sm_is_rx_fifo_empty(pio, sm)) tight_loop_contents(); + return pio_sm_get(pio, sm); +} + +/*! \brief Empty out a state machine's TX FIFO + * \ingroup hardware_pio + * + * This method executes `pull` instructions on the state machine until the TX FIFO is empty + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +void pio_sm_drain_tx_fifo(PIO pio, uint sm); + +/*! \brief set the current clock divider for a state machine + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param div the floating point clock divider + */ +static inline void pio_sm_set_clkdiv(PIO pio, uint sm, float div) { + check_sm_param(sm); + uint16_t div_int = (uint16_t) div; + uint8_t div_frac = (uint8_t) ((div - div_int) * (1u << 8u)); + pio->sm[sm].clkdiv = + (div_frac << PIO_SM0_CLKDIV_FRAC_LSB) | + (div_int << PIO_SM0_CLKDIV_INT_LSB); +} + +/*! \brief set the current clock divider for a state machine using a 16:8 fraction + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + * \param div_int the integer part of the clock divider + * \param div_frac the fractional part of the clock divider in 1/256s + */ +static inline void pio_sm_set_clkdiv_int_frac(PIO pio, uint sm, uint16_t div_int, uint8_t div_frac) { + check_sm_param(sm); + pio->sm[sm].clkdiv = + (div_frac << PIO_SM0_CLKDIV_FRAC_LSB) | + (div_int << PIO_SM0_CLKDIV_INT_LSB); +} + +/*! \brief Clear a state machine's TX and RX FIFOFs + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +static inline void pio_sm_clear_fifos(PIO pio, uint sm) { + // changing the FIFO join state clears the fifo + check_sm_param(sm); + hw_xor_bits(&pio->sm[sm].shiftctrl, PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS); + hw_xor_bits(&pio->sm[sm].shiftctrl, PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS); +} + +/*! \brief Use a state machine to set a value on all pins for the PIO instance + * \ingroup hardware_pio + * + * This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set values on all 32 pins, + * before restoring the state machine's pin configuration to what it was. + * + * This method is provided as a convenience to set initial pin states, and should not be used against a state machine that is enabled. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) to use + * \param pin_values the pin values to set + */ +void pio_sm_set_pins(PIO pio, uint sm, uint32_t pin_values); + +/*! \brief Use a state machine to set a value on multiple pins for the PIO instance + * \ingroup hardware_pio + * + * This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set values on up to 32 pins, + * before restoring the state machine's pin configuration to what it was. + * + * This method is provided as a convenience to set initial pin states, and should not be used against a state machine that is enabled. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) to use + * \param pin_values the pin values to set (if the corresponding bit in pin_mask is set) + * \param pin_mask a bit for each pin to indicate whether the corresponding pin_value for that pin should be applied. + */ +void pio_sm_set_pins_with_mask(PIO pio, uint sm, uint32_t pin_values, uint32_t pin_mask); + +/*! \brief Use a state machine to set the pin directions for multiple pins for the PIO instance + * \ingroup hardware_pio + * + * This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set pin directions on up to 32 pins, + * before restoring the state machine's pin configuration to what it was. + * + * This method is provided as a convenience to set initial pin directions, and should not be used against a state machine that is enabled. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) to use + * \param pin_dirs the pin directions to set - 1 = out, 0 = in (if the corresponding bit in pin_mask is set) + * \param pin_mask a bit for each pin to indicate whether the corresponding pin_value for that pin should be applied. + */ +void pio_sm_set_pindirs_with_mask(PIO pio, uint sm, uint32_t pin_dirs, uint32_t pin_mask); + +/*! \brief Use a state machine to set the same pin direction for multiple consecutive pins for the PIO instance + * \ingroup hardware_pio + * + * This method repeatedly reconfigures the target state machine's pin configuration and executes 'set' instructions to set the pin direction on consecutive pins, + * before restoring the state machine's pin configuration to what it was. + * + * This method is provided as a convenience to set initial pin directions, and should not be used against a state machine that is enabled. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) to use + * \param pin_base the first pin to set a direction for + * \param pin_count the count of consecutive pins to set the direction for + * \param is_out the direction to set; true = out, false = in + */ +void pio_sm_set_consecutive_pindirs(PIO pio, uint sm, uint pin_base, uint pin_count, bool is_out); + +/*! \brief Mark a state machine as used + * \ingroup hardware_pio + * + * Method for cooperative claiming of hardware. Will cause a panic if the state machine + * is already claimed. Use of this method by libraries detects accidental + * configurations that would fail in unpredictable ways. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +void pio_sm_claim(PIO pio, uint sm); + +/*! \brief Mark multiple state machines as used + * \ingroup hardware_pio + * + * Method for cooperative claiming of hardware. Will cause a panic if any of the state machines + * are already claimed. Use of this method by libraries detects accidental + * configurations that would fail in unpredictable ways. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm_mask Mask of state machine indexes + */ +void pio_claim_sm_mask(PIO pio, uint sm_mask); + +/*! \brief Mark a state machine as no longer used + * \ingroup hardware_pio + * + * Method for cooperative claiming of hardware. + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param sm State machine index (0..3) + */ +void pio_sm_unclaim(PIO pio, uint sm); + +/*! \brief Claim a free state machine on a PIO instance + * \ingroup hardware_pio + * + * \param pio The PIO instance; either \ref pio0 or \ref pio1 + * \param required if true the function will panic if none are available + * \return the state machine index or -1 if required was false, and none were free + */ +int pio_claim_unused_sm(PIO pio, bool required); + +#ifdef __cplusplus +} +#endif + +#endif // _PIO_H_ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio_instructions.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio_instructions.h new file mode 100644 index 0000000000..757411d5e2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/include/hardware/pio_instructions.h @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_PIO_INSTRUCTIONS_H_ +#define _HARDWARE_PIO_INSTRUCTIONS_H_ + +#include "pico.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_PIO_INSTRUCTIONS, Enable/disable assertions in the PIO instructions, type=bool, default=0, group=hardware_pio +#ifndef PARAM_ASSERTIONS_ENABLED_PIO_INSTRUCTIONS +#define PARAM_ASSERTIONS_ENABLED_PIO_INSTRUCTIONS 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +enum pio_instr_bits { + pio_instr_bits_jmp = 0x0000, + pio_instr_bits_wait = 0x2000, + pio_instr_bits_in = 0x4000, + pio_instr_bits_out = 0x6000, + pio_instr_bits_push = 0x8000, + pio_instr_bits_pull = 0x8080, + pio_instr_bits_mov = 0xa000, + pio_instr_bits_irq = 0xc000, + pio_instr_bits_set = 0xe000, +}; + +#ifndef NDEBUG +#define _PIO_INVALID_IN_SRC 0x08u +#define _PIO_INVALID_OUT_DEST 0x10u +#define _PIO_INVALID_SET_DEST 0x20u +#define _PIO_INVALID_MOV_SRC 0x40u +#define _PIO_INVALID_MOV_DEST 0x80u +#else +#define _PIO_INVALID_IN_SRC 0u +#define _PIO_INVALID_OUT_DEST 0u +#define _PIO_INVALID_SET_DEST 0u +#define _PIO_INVALID_MOV_SRC 0u +#define _PIO_INVALID_MOV_DEST 0u +#endif + +enum pio_src_dest { + pio_pins = 0u, + pio_x = 1u, + pio_y = 2u, + pio_null = 3u | _PIO_INVALID_SET_DEST | _PIO_INVALID_MOV_DEST, + pio_pindirs = 4u | _PIO_INVALID_IN_SRC | _PIO_INVALID_MOV_SRC | _PIO_INVALID_MOV_DEST, + pio_exec_mov = 4u | _PIO_INVALID_IN_SRC | _PIO_INVALID_OUT_DEST | _PIO_INVALID_SET_DEST | _PIO_INVALID_MOV_SRC, + pio_status = 5u | _PIO_INVALID_IN_SRC | _PIO_INVALID_OUT_DEST | _PIO_INVALID_SET_DEST | _PIO_INVALID_MOV_DEST, + pio_pc = 5u | _PIO_INVALID_IN_SRC | _PIO_INVALID_SET_DEST | _PIO_INVALID_MOV_SRC, + pio_isr = 6u | _PIO_INVALID_SET_DEST, + pio_osr = 7u | _PIO_INVALID_OUT_DEST | _PIO_INVALID_SET_DEST, + pio_exec_out = 7u | _PIO_INVALID_IN_SRC | _PIO_INVALID_SET_DEST | _PIO_INVALID_MOV_SRC | _PIO_INVALID_MOV_DEST, +}; + +inline static uint _pio_major_instr_bits(uint instr) { + return instr & 0xe000u; +} + +inline static uint _pio_encode_instr_and_args(enum pio_instr_bits instr_bits, uint arg1, uint arg2) { + valid_params_if(PIO_INSTRUCTIONS, arg1 <= 0x7); +#if PARAM_ASSERTIONS_ENABLED(PIO_INSTRUCTIONS) + uint32_t major = _pio_major_instr_bits(instr_bits); + if (major == pio_instr_bits_in || major == pio_instr_bits_out) { + assert(arg2 && arg2 <= 32); + } else { + assert(arg2 <= 31); + } +#endif + return instr_bits | (arg1 << 5u) | (arg2 & 0x1fu); +} + +inline static uint _pio_encode_instr_and_src_dest(enum pio_instr_bits instr_bits, enum pio_src_dest dest, uint value) { + return _pio_encode_instr_and_args(instr_bits, dest & 7u, value); +} + +inline static uint pio_encode_delay(uint cycles) { + valid_params_if(PIO_INSTRUCTIONS, cycles <= 0x1f); + return cycles << 8u; +} + +inline static uint pio_encode_sideset(uint sideset_bit_count, uint value) { + valid_params_if(PIO_INSTRUCTIONS, sideset_bit_count >= 1 && sideset_bit_count <= 5); + valid_params_if(PIO_INSTRUCTIONS, value <= (0x1fu >> sideset_bit_count)); + return value << (13u - sideset_bit_count); +} + +inline static uint pio_encode_sideset_opt(uint sideset_bit_count, uint value) { + valid_params_if(PIO_INSTRUCTIONS, sideset_bit_count >= 2 && sideset_bit_count <= 5); + valid_params_if(PIO_INSTRUCTIONS, value <= (0x1fu >> sideset_bit_count)); + return 0x1000u | value << (12u - sideset_bit_count); +} + +inline static uint pio_encode_jmp(uint addr) { + return _pio_encode_instr_and_args(pio_instr_bits_jmp, 0, addr); +} + +inline static uint _pio_encode_irq(bool relative, uint irq) { + valid_params_if(PIO_INSTRUCTIONS, irq <= 7); + return (relative ? 0x10u : 0x0u) | irq; +} + +inline static uint pio_encode_wait_gpio(bool polarity, uint pin) { + return _pio_encode_instr_and_args(pio_instr_bits_wait, 0u | (polarity ? 4u : 0u), pin); +} + +inline static uint pio_encode_wait_pin(bool polarity, uint pin) { + return _pio_encode_instr_and_args(pio_instr_bits_wait, 1u | (polarity ? 4u : 0u), pin); +} + +inline static uint pio_encode_wait_irq(bool polarity, bool relative, uint irq) { + valid_params_if(PIO_INSTRUCTIONS, irq <= 7); + return _pio_encode_instr_and_args(pio_instr_bits_wait, 2u | (polarity ? 4u : 0u), _pio_encode_irq(relative, irq)); +} + +inline static uint pio_encode_in(enum pio_src_dest src, uint value) { + valid_params_if(PIO_INSTRUCTIONS, !(src & _PIO_INVALID_IN_SRC)); + return _pio_encode_instr_and_src_dest(pio_instr_bits_in, src, value); +} + +inline static uint pio_encode_out(enum pio_src_dest dest, uint value) { + valid_params_if(PIO_INSTRUCTIONS, !(dest & _PIO_INVALID_OUT_DEST)); + return _pio_encode_instr_and_src_dest(pio_instr_bits_out, dest, value); +} + +inline static uint pio_encode_push(bool if_full, bool block) { + return _pio_encode_instr_and_args(pio_instr_bits_push, (if_full ? 2u : 0u) | (block ? 1u : 0u), 0); +} + +inline static uint pio_encode_pull(bool if_empty, bool block) { + return _pio_encode_instr_and_args(pio_instr_bits_pull, (if_empty ? 2u : 0u) | (block ? 1u : 0u), 0); +} + +inline static uint pio_encode_mov(enum pio_src_dest dest, enum pio_src_dest src) { + valid_params_if(PIO_INSTRUCTIONS, !(dest & _PIO_INVALID_MOV_DEST)); + valid_params_if(PIO_INSTRUCTIONS, !(src & _PIO_INVALID_MOV_SRC)); + return _pio_encode_instr_and_src_dest(pio_instr_bits_mov, dest, src & 7u); +} + +inline static uint pio_encode_mov_not(enum pio_src_dest dest, enum pio_src_dest src) { + valid_params_if(PIO_INSTRUCTIONS, !(dest & _PIO_INVALID_MOV_DEST)); + valid_params_if(PIO_INSTRUCTIONS, !(src & _PIO_INVALID_MOV_SRC)); + return _pio_encode_instr_and_src_dest(pio_instr_bits_mov, dest, (1u << 3u) | (src & 7u)); +} + +inline static uint pio_encode_mov_reverse(enum pio_src_dest dest, enum pio_src_dest src) { + valid_params_if(PIO_INSTRUCTIONS, !(dest & _PIO_INVALID_MOV_DEST)); + valid_params_if(PIO_INSTRUCTIONS, !(src & _PIO_INVALID_MOV_SRC)); + return _pio_encode_instr_and_src_dest(pio_instr_bits_mov, dest, (2u << 3u) | (src & 7u)); +} + +inline static uint pio_encode_irq_set(bool relative, uint irq) { + return _pio_encode_instr_and_args(pio_instr_bits_irq, 0, _pio_encode_irq(relative, irq)); +} + +inline static uint pio_encode_irq_clear(bool relative, uint irq) { + return _pio_encode_instr_and_args(pio_instr_bits_irq, 2, _pio_encode_irq(relative, irq)); +} + +inline static uint pio_encode_set(enum pio_src_dest dest, uint value) { + valid_params_if(PIO_INSTRUCTIONS, !(dest & _PIO_INVALID_SET_DEST)); + return _pio_encode_instr_and_src_dest(pio_instr_bits_set, dest, value); +} + +inline static uint pio_encode_nop() { + return pio_encode_mov(pio_y, pio_y); +} + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/pio.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/pio.c new file mode 100644 index 0000000000..1c951ce44b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pio/pio.c @@ -0,0 +1,240 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/claim.h" +#include "hardware/pio.h" +#include "hardware/pio_instructions.h" + +// sanity check +check_hw_layout(pio_hw_t, sm[0].clkdiv, PIO_SM0_CLKDIV_OFFSET); +check_hw_layout(pio_hw_t, sm[1].clkdiv, PIO_SM1_CLKDIV_OFFSET); +check_hw_layout(pio_hw_t, instr_mem[0], PIO_INSTR_MEM0_OFFSET); +check_hw_layout(pio_hw_t, inte0, PIO_IRQ0_INTE_OFFSET); +check_hw_layout(pio_hw_t, txf[1], PIO_TXF1_OFFSET); +check_hw_layout(pio_hw_t, rxf[3], PIO_RXF3_OFFSET); +check_hw_layout(pio_hw_t, ints1, PIO_IRQ1_INTS_OFFSET); + +static_assert(NUM_PIO_STATE_MACHINES * NUM_PIOS <= 8, ""); +static uint8_t claimed; + +void pio_sm_claim(PIO pio, uint sm) { + check_sm_param(sm); + uint which = pio_get_index(pio); + if (which) { + hw_claim_or_assert(&claimed, NUM_PIO_STATE_MACHINES + sm, "PIO 1 SM %d already claimed"); + } else { + hw_claim_or_assert(&claimed, sm, "PIO 0 SM %d already claimed"); + } +} + +void pio_claim_sm_mask(PIO pio, uint sm_mask) { + for(uint i = 0; sm_mask; i++, sm_mask >>= 1u) { + if (sm_mask & 1u) pio_sm_claim(pio, i); + } +} +void pio_sm_unclaim(PIO pio, uint sm) { + check_sm_param(sm); + uint which = pio_get_index(pio); + hw_claim_clear(&claimed, which * NUM_PIO_STATE_MACHINES + sm); +} + +int pio_claim_unused_sm(PIO pio, bool required) { + uint which = pio_get_index(pio); + uint base = which * NUM_PIO_STATE_MACHINES; + int index = hw_claim_unused_from_range((uint8_t*)&claimed, required, base, + base + NUM_PIO_STATE_MACHINES - 1, "No PIO state machines are available"); + return index >= base ? index - base : -1; +} + +void pio_load_program(PIO pio, const uint16_t *prog, uint8_t prog_len, uint8_t load_offset) { + // instructions are only 16 bits, but instruction memory locations are spaced 32 bits apart + // Adjust the addresses of any jump instructions to respect load offset + assert(load_offset + prog_len <= PIO_INSTRUCTION_COUNT); + +} + +static_assert(PIO_INSTRUCTION_COUNT <= 32, ""); +static uint32_t _used_instruction_space[2]; + +static int _pio_find_offset_for_program(PIO pio, const pio_program_t *program) { + assert(program->length < PIO_INSTRUCTION_COUNT); + uint32_t used_mask = _used_instruction_space[pio_get_index(pio)]; + uint32_t program_mask = (1u << program->length) - 1; + if (program->origin >= 0) { + if (program->origin > 32 - program->length) return -1; + return used_mask & (program_mask << program->origin) ? -1 : program->origin; + } else { + // work down from the top always + for (int i = 32 - program->length; i >= 0; i--) { + if (!(used_mask & (program_mask << (uint) i))) { + return i; + } + } + return -1; + } +} + +bool pio_can_add_program(PIO pio, const pio_program_t *program) { + uint32_t save = hw_claim_lock(); + bool rc = -1 != _pio_find_offset_for_program(pio, program); + hw_claim_unlock(save); + return rc; +} + +static bool _pio_can_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset) { + assert(offset < PIO_INSTRUCTION_COUNT); + assert(offset + program->length <= PIO_INSTRUCTION_COUNT); + if (program->origin >= 0 && program->origin != offset) return false; + uint32_t used_mask = _used_instruction_space[pio_get_index(pio)]; + uint32_t program_mask = (1u << program->length) - 1; + return !(used_mask & (program_mask << offset)); +} + +bool pio_can_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset) { + uint32_t save = hw_claim_lock(); + bool rc = _pio_can_add_program_at_offset(pio, program, offset); + hw_claim_unlock(save); + return rc; +} + +static void _pio_add_program_at_offset(PIO pio, const pio_program_t *program, uint offset) { + if (!_pio_can_add_program_at_offset(pio, program, offset)) { + panic("No program space"); + } + for (uint i = 0; i < program->length; ++i) { + uint16_t instr = program->instructions[i]; + pio->instr_mem[offset + i] = pio_instr_bits_jmp != _pio_major_instr_bits(instr) ? instr : instr + offset; + } + uint32_t program_mask = (1u << program->length) - 1; + _used_instruction_space[pio_get_index(pio)] |= program_mask << offset; +} + +// these assert if unable +uint pio_add_program(PIO pio, const pio_program_t *program) { + uint32_t save = hw_claim_lock(); + int offset = _pio_find_offset_for_program(pio, program); + if (offset < 0) { + panic("No program space"); + } + _pio_add_program_at_offset(pio, program, offset); + hw_claim_unlock(save); + return offset; +} + +void pio_remove_program(PIO pio, const pio_program_t *program, uint loaded_offset) { + uint32_t program_mask = (1u << program->length) - 1; + program_mask <<= loaded_offset; + uint32_t save = hw_claim_lock(); + assert(program_mask == (_used_instruction_space[pio_get_index(pio)] & program_mask)); + _used_instruction_space[pio_get_index(pio)] &= ~program_mask; + hw_claim_unlock(save); +} + +void pio_clear_instruction_memory(PIO pio) { + uint32_t save = hw_claim_lock(); + _used_instruction_space[pio_get_index(pio)] = 0; + for(uint i=0;iinstr_mem[i] = pio_encode_jmp(i); + } + hw_claim_unlock(save); +} + +// Set the value of all PIO pins. This is done by forcibly executing +// instructions on a "victim" state machine, sm. Ideally you should choose one +// which is not currently running a program. This is intended for one-time +// setup of initial pin states. +void pio_sm_set_pins(PIO pio, uint sm, uint32_t pins) { + uint32_t pinctrl_saved = pio->sm[sm].pinctrl; + uint remaining = 32; + uint base = 0; + while (remaining) { + uint decrement = remaining > 5 ? 5 : remaining; + pio->sm[sm].pinctrl = + (decrement << PIO_SM0_PINCTRL_SET_COUNT_LSB) | + (base << PIO_SM0_PINCTRL_SET_BASE_LSB); + pio_sm_exec(pio, sm, pio_encode_set(pio_pins, pins & 0x1fu)); + remaining -= decrement; + base += decrement; + pins >>= 5; + } + pio->sm[sm].pinctrl = pinctrl_saved; +} + +void pio_sm_set_pins_with_mask(PIO pio, uint sm, uint32_t pinvals, uint32_t pin_mask) { + uint32_t pinctrl_saved = pio->sm[sm].pinctrl; + while (pin_mask) { + uint base = __builtin_ctz(pin_mask); + pio->sm[sm].pinctrl = + (1u << PIO_SM0_PINCTRL_SET_COUNT_LSB) | + (base << PIO_SM0_PINCTRL_SET_BASE_LSB); + pio_sm_exec(pio, sm, pio_encode_set(pio_pins, (pinvals >> base) & 0x1u)); + pin_mask &= pin_mask - 1; + } + pio->sm[sm].pinctrl = pinctrl_saved; +} + +void pio_sm_set_pindirs_with_mask(PIO pio, uint sm, uint32_t pindirs, uint32_t pin_mask) { + uint32_t pinctrl_saved = pio->sm[sm].pinctrl; + while (pin_mask) { + uint base = __builtin_ctz(pin_mask); + pio->sm[sm].pinctrl = + (1u << PIO_SM0_PINCTRL_SET_COUNT_LSB) | + (base << PIO_SM0_PINCTRL_SET_BASE_LSB); + pio_sm_exec(pio, sm, pio_encode_set(pio_pindirs, (pindirs >> base) & 0x1u)); + pin_mask &= pin_mask - 1; + } + pio->sm[sm].pinctrl = pinctrl_saved; +} + +void pio_sm_set_consecutive_pindirs(PIO pio, uint sm, uint pin, uint count, bool is_out) { + assert(pin < 32u); + uint32_t pinctrl_saved = pio->sm[sm].pinctrl; + uint pindir_val = is_out ? 0x1f : 0; + while (count > 5) { + pio->sm[sm].pinctrl = (5u << PIO_SM0_PINCTRL_SET_COUNT_LSB) | (pin << PIO_SM0_PINCTRL_SET_BASE_LSB); + pio_sm_exec(pio, sm, pio_encode_set(pio_pindirs, pindir_val)); + count -= 5; + pin = (pin + 5) & 0x1f; + } + pio->sm[sm].pinctrl = (count << PIO_SM0_PINCTRL_SET_COUNT_LSB) | (pin << PIO_SM0_PINCTRL_SET_BASE_LSB); + pio_sm_exec(pio, sm, pio_encode_set(pio_pindirs, pindir_val)); + pio->sm[sm].pinctrl = pinctrl_saved; +} + +void pio_sm_init(PIO pio, uint sm, uint initial_pc, const pio_sm_config *config) { + // Halt the machine, set some sensible defaults + pio_sm_set_enabled(pio, sm, false); + + if (config) { + pio_sm_set_config(pio, sm, config); + } else { + pio_sm_config c = pio_get_default_sm_config(); + pio_sm_set_config(pio, sm, &c); + } + + pio_sm_clear_fifos(pio, sm); + + // Clear FIFO debug flags + const uint32_t fdebug_sm_mask = + (1u << PIO_FDEBUG_TXOVER_LSB) | + (1u << PIO_FDEBUG_RXUNDER_LSB) | + (1u << PIO_FDEBUG_TXSTALL_LSB) | + (1u << PIO_FDEBUG_RXSTALL_LSB); + pio->fdebug = fdebug_sm_mask << sm; + + // Finally, clear some internal SM state + pio_sm_restart(pio, sm); + pio_sm_clkdiv_restart(pio, sm); + pio_sm_exec(pio, sm, pio_encode_jmp(initial_pc)); +} + +void pio_sm_drain_tx_fifo(PIO pio, uint sm) { + uint instr = (pio->sm[sm].shiftctrl & PIO_SM0_SHIFTCTRL_AUTOPULL_BITS) ? pio_encode_out(pio_null, 32) : + pio_encode_pull(false, false); + while (!pio_sm_is_tx_fifo_empty(pio, sm)) { + pio_sm_exec(pio, sm, instr); + } +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/CMakeLists.txt new file mode 100644 index 0000000000..37ff759639 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(pll) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/include/hardware/pll.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/include/hardware/pll.h new file mode 100644 index 0000000000..023e340339 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/include/hardware/pll.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_PLL_H_ +#define _HARDWARE_PLL_H_ + +#include "pico.h" +#include "hardware/structs/pll.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/pll.h + * \defgroup hardware_pll hardware_pll + * + * Phase Locked Loop control APIs + * + * There are two PLLs in RP2040. They are: + * - pll_sys - Used to generate up to a 133MHz system clock + * - pll_usb - Used to generate a 48MHz USB reference clock + * + * For details on how the PLL's are calculated, please refer to the RP2040 datasheet. + */ + +typedef pll_hw_t *PLL; + +#define pll_sys pll_sys_hw +#define pll_usb pll_usb_hw + +/*! \brief Initialise specified PLL. + * \ingroup hardware_pll + * \param pll pll_sys or pll_usb + * \param ref_div Input clock divider. + * \param vco_freq Requested output from the VCO (voltage controlled oscillator) + * \param post_div1 Post Divider 1 - range 1-7. Must be >= post_div2 + * \param post_div2 Post Divider 2 - range 1-7 + */ +void pll_init(PLL pll, uint32_t ref_div, uint32_t vco_freq, uint32_t post_div1, uint8_t post_div2); + +/*! \brief Release/uninitialise specified PLL. + * \ingroup hardware_pll + * + * This will turn off the power to the specified PLL. Note this function does not currently check if + * the PLL is in use before powering it off so should be used with care. + * + * \param pll pll_sys or pll_usb + */ +void pll_deinit(PLL pll); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/pll.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/pll.c new file mode 100644 index 0000000000..a55ed5ca88 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pll/pll.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +// For MHZ definitions etc +#include "hardware/clocks.h" +#include "hardware/pll.h" + +/// \tag::pll_init_calculations[] +void pll_init(PLL pll, uint32_t refdiv, uint32_t vco_freq, uint32_t post_div1, uint8_t post_div2) { + // Turn off PLL in case it is already running + pll->pwr = 0xffffffff; + pll->fbdiv_int = 0; + + uint32_t ref_mhz = XOSC_MHZ / refdiv; + pll->cs = refdiv; + + // What are we multiplying the reference clock by to get the vco freq + // (The regs are called div, because you divide the vco output and compare it to the refclk) + uint32_t fbdiv = vco_freq / (ref_mhz * MHZ); +/// \end::pll_init_calculations[] + + // fbdiv + assert(fbdiv >= 16 && fbdiv <= 320); + + // Check divider ranges + assert((post_div1 >= 1 && post_div1 <= 7) && (post_div2 >= 1 && post_div2 <= 7)); + + // post_div1 should be >= post_div2 + // from appnote page 11 + // postdiv1 is designed to operate with a higher input frequency + // than postdiv2 + assert(post_div2 <= post_div1); + +/// \tag::pll_init_finish[] + // Check that reference frequency is no greater than vco / 16 + assert(ref_mhz <= (vco_freq / 16)); + + // Put calculated value into feedback divider + pll->fbdiv_int = fbdiv; + + // Turn on PLL + uint32_t power = PLL_PWR_PD_BITS | // Main power + PLL_PWR_VCOPD_BITS; // VCO Power + + hw_clear_bits(&pll->pwr, power); + + // Wait for PLL to lock + while (!(pll->cs & PLL_CS_LOCK_BITS)) tight_loop_contents(); + + // Set up post dividers - div1 feeds into div2 so if div1 is 5 and div2 is 2 then you get a divide by 10 + uint32_t pdiv = (post_div1 << PLL_PRIM_POSTDIV1_LSB) | + (post_div2 << PLL_PRIM_POSTDIV2_LSB); + pll->prim = pdiv; + + // Turn on post divider + hw_clear_bits(&pll->pwr, PLL_PWR_POSTDIVPD_BITS); +/// \end::pll_init_finish[] +} + +void pll_deinit(PLL pll) { + // todo: Make sure there are no sources running from this pll? + pll->pwr = PLL_PWR_BITS; +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/CMakeLists.txt new file mode 100644 index 0000000000..c8d34014c9 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_headers_only_target(pwm) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h new file mode 100644 index 0000000000..99253369f0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h @@ -0,0 +1,491 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_PWM_H +#define _HARDWARE_PWM_H + +#include "pico.h" +#include "hardware/structs/pwm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_PWM, Enable/disable assertions in the PWM module, type=bool, default=0, group=hadrware_pwm +#ifndef PARAM_ASSERTIONS_ENABLED_PWM +#define PARAM_ASSERTIONS_ENABLED_PWM 0 +#endif + +/** \file hardware/pwm.h + * \defgroup hardware_pwm hardware_pwm + * + * Hardware Pulse Width Modulation (PWM) API + * + * The RP2040 PWM block has 8 identical slices. Each slice can drive two PWM output signals, or + * measure the frequency or duty cycle of an input signal. This gives a total of up to 16 controllable + * PWM outputs. All 30 GPIOs can be driven by the PWM block + * + * The PWM hardware functions by continuously comparing the input value to a free-running counter. This produces a + * toggling output where the amount of time spent at the high output level is proportional to the input value. The fraction of + * time spent at the high signal level is known as the duty cycle of the signal. + * + * The default behaviour of a PWM slice is to count upward until the wrap value (\ref pwm_config_set_wrap) is reached, and then + * immediately wrap to 0. PWM slices also offer a phase-correct mode, where the counter starts to count downward after + * reaching TOP, until it reaches 0 again. + * + * \subsection pwm_example Example + * \addtogroup hardware_pwm + * \include hello_pwm.c + */ + +/** \brief PWM Divider mode settings + * \ingroup hardware_pwm + * + */ +enum pwm_clkdiv_mode +{ + PWM_DIV_FREE_RUNNING, ///< Free-running counting at rate dictated by fractional divider + PWM_DIV_B_HIGH, ///< Fractional divider is gated by the PWM B pin + PWM_DIV_B_RISING, ///< Fractional divider advances with each rising edge of the PWM B pin + PWM_DIV_B_FALLING ///< Fractional divider advances with each falling edge of the PWM B pin +}; + +enum pwm_chan +{ + PWM_CHAN_A = 0, + PWM_CHAN_B = 1 +}; + +typedef struct { + uint32_t csr; + uint32_t div; + uint32_t top; +} pwm_config; + +/** \brief Determine the PWM slice that is attached to the specified GPIO + * \ingroup hardware_pwm + * + * \return The PWM slice number that controls the specified GPIO. + */ +static inline uint pwm_gpio_to_slice_num(uint gpio) { + valid_params_if(PWM, gpio < N_GPIOS); + return (gpio >> 1u) & 7u; +} + +/** \brief Determine the PWM channel that is attached to the specified GPIO. + * \ingroup hardware_pwm + * + * Each slice 0 to 7 has two channels, A and B. + * + * \return The PWM channel that controls the specified GPIO. + */ +static inline uint pwm_gpio_to_channel(uint gpio) { + valid_params_if(PWM, gpio < N_GPIOS); + return gpio & 1u; +} + +/** \brief Set phase correction in a PWM configuration + * \ingroup hardware_pwm + * + * \param c PWM configuration struct to modify + * \param phase_correct true to set phase correct modulation, false to set trailing edge + * + * Setting phase control to true means that instead of wrapping back to zero when the wrap point is reached, + * the PWM starts counting back down. The output frequency is halved when phase-correct mode is enabled. + */ +static inline void pwm_config_set_phase_correct(pwm_config *c, bool phase_correct) { + c->csr = (c->csr & ~PWM_CH0_CSR_PH_CORRECT_BITS) + | (!!phase_correct << PWM_CH0_CSR_PH_CORRECT_LSB); +} + +/** \brief Set clock divider in a PWM configuration + * \ingroup hardware_pwm + * + * \param c PWM configuration struct to modify + * \param div Value to divide counting rate by. Must be greater than or equal to 1. + * + * If the divide mode is free-running, the PWM counter runs at clk_sys / div. + * Otherwise, the divider reduces the rate of events seen on the B pin input (level or edge) + * before passing them on to the PWM counter. + */ +static inline void pwm_config_set_clkdiv(pwm_config *c, float div) { + c->div = (uint32_t)(div * (float)(1u << PWM_CH1_DIV_INT_LSB)); +} + +/** \brief Set PWM clock divider in a PWM configuration + * \ingroup hardware_pwm + * + * \param c PWM configuration struct to modify + * \param div integer value to reduce counting rate by. Must be greater than or equal to 1. + * + * If the divide mode is free-running, the PWM counter runs at clk_sys / div. + * Otherwise, the divider reduces the rate of events seen on the B pin input (level or edge) + * before passing them on to the PWM counter. + */ +static inline void pwm_config_set_clkdiv_int(pwm_config *c, uint div) { + c->div = div << PWM_CH1_DIV_INT_LSB; +} + +/** \brief Set PWM counting mode in a PWM configuration + * \ingroup hardware_pwm + * + * \param c PWM configuration struct to modify + * \param mode PWM divide/count mode + * + * Configure which event gates the operation of the fractional divider. + * The default is always-on (free-running PWM). Can also be configured to count on + * high level, rising edge or falling edge of the B pin input. + */ +static inline void pwm_config_set_clkdiv_mode(pwm_config *c, enum pwm_clkdiv_mode mode) { + valid_params_if(PWM, mode >= PWM_DIV_FREE_RUNNING && mode <= PWM_DIV_B_FALLING); + c->csr = (c->csr & ~PWM_CH0_CSR_DIVMODE_BITS) + | (mode << PWM_CH0_CSR_DIVMODE_LSB); +} + +/** \brief Set output polarity in a PWM configuration + * \ingroup hardware_pwm + * + * \param c PWM configuration struct to modify + * \param a true to invert output A + * \param b true to invert output B + */ +static inline void pwm_config_set_output_polarity(pwm_config *c, bool a, bool b) { + c->csr = (c->csr & ~(PWM_CH0_CSR_A_INV_BITS | PWM_CH0_CSR_B_INV_BITS)) + | ((!!a << PWM_CH0_CSR_A_INV_LSB) | (!!b << PWM_CH0_CSR_B_INV_LSB)); +} + +/** \brief Set PWM counter wrap value in a PWM configuration + * \ingroup hardware_pwm + * + * Set the highest value the counter will reach before returning to 0. Also known as TOP. + * + * \param c PWM configuration struct to modify + * \param wrap Value to set wrap to + */ +static inline void pwm_config_set_wrap(pwm_config *c, uint16_t wrap) { + c->top = wrap; +} + +/** \brief Initialise a PWM with settings from a configuration object + * \ingroup hardware_pwm + * + * Use the \ref pwm_get_default_config() function to initialise a config structure, make changes as + * needed using the pwm_config_* functions, then call this function to set up the PWM. + * + * \param slice_num PWM slice number + * \param c The configuration to use + * \param start If true the PWM will be started running once configured. If false you will need to start + * manually using \ref pwm_set_enabled() or \ref pwm_set_mask_enabled() + */ +static inline void pwm_init(uint slice_num, pwm_config *c, bool start) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + pwm_hw->slice[slice_num].csr = 0; + + pwm_hw->slice[slice_num].ctr = PWM_CH0_CTR_RESET; + pwm_hw->slice[slice_num].cc = PWM_CH0_CC_RESET; + pwm_hw->slice[slice_num].top = c->top; + pwm_hw->slice[slice_num].div = c->div; + pwm_hw->slice[slice_num].csr = c->csr | (!!start << PWM_CH0_CSR_EN_LSB); +} + +/** \brief Get a set of default values for PWM configuration + * \ingroup hardware_pwm + * + * PWM config is free running at system clock speed, no phase correction, wrapping at 0xffff, + * with standard polarities for channels A and B. + * + * \return Set of default values. + */ +static inline pwm_config pwm_get_default_config() { + pwm_config c = {0, 0, 0}; + pwm_config_set_phase_correct(&c, false); + pwm_config_set_clkdiv_int(&c, 1); + pwm_config_set_clkdiv_mode(&c, PWM_DIV_FREE_RUNNING); + pwm_config_set_output_polarity(&c, false, false); + pwm_config_set_wrap(&c, 0xffffu); + return c; +} + +/** \brief Set the current PWM counter wrap value + * \ingroup hardware_pwm + * + * Set the highest value the counter will reach before returning to 0. Also known as TOP. + * + * \param slice_num PWM slice number + * \param wrap Value to set wrap to + */ +static inline void pwm_set_wrap(uint slice_num, uint16_t wrap) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + pwm_hw->slice[slice_num].top = wrap; +} + +/** \brief Set the current PWM counter compare value for one channel + * \ingroup hardware_pwm + * + * Set the value of the PWM counter compare value, for either channel A or channel B + * + * \param slice_num PWM slice number + * \param chan Which channel to update. 0 for A, 1 for B. + * \param level new level for the selected output + */ +static inline void pwm_set_chan_level(uint slice_num, uint chan, uint16_t level) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + hw_write_masked( + &pwm_hw->slice[slice_num].cc, + level << (chan ? PWM_CH0_CC_B_LSB : PWM_CH0_CC_A_LSB), + chan ? PWM_CH0_CC_B_BITS : PWM_CH0_CC_A_BITS + ); +} + +/** \brief Set PWM counter compare values + * \ingroup hardware_pwm + * + * Set the value of the PWM counter compare values, A and B + * + * \param slice_num PWM slice number + * \param level_a Value to set compare A to. When the counter reaches this value the A output is deasserted + * \param level_b Value to set compare B to. When the counter reaches this value the B output is deasserted + */ +static inline void pwm_set_both_levels(uint slice_num, uint16_t level_a, uint16_t level_b) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + pwm_hw->slice[slice_num].cc = (level_b << PWM_CH0_CC_B_LSB) | (level_a << PWM_CH0_CC_A_LSB); +} + +/** \brief Helper function to set the PWM level for the slice and channel associated with a GPIO. + * \ingroup hardware_pwm + * + * Look up the correct slice (0 to 7) and channel (A or B) for a given GPIO, and update the corresponding + * counter-compare field. + * + * This PWM slice should already have been configured and set running. Also be careful of multiple GPIOs + * mapping to the same slice and channel (if GPIOs have a difference of 16). + * + * \param gpio GPIO to set level of + * \param level PWM level for this GPIO + */ +static inline void pwm_set_gpio_level(uint gpio, uint16_t level) { + valid_params_if(PWM, gpio < N_GPIOS); + pwm_set_chan_level(pwm_gpio_to_slice_num(gpio), pwm_gpio_to_channel(gpio), level); +} + +/** \brief Get PWM counter + * \ingroup hardware_pwm + * + * Get current value of PWM counter + * + * \param slice_num PWM slice number + * \return Current value of PWM counter + */ +static inline int16_t pwm_get_counter(uint slice_num) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + return (pwm_hw->slice[slice_num].ctr); +} + +/** \brief Set PWM counter + * \ingroup hardware_pwm + * + * Set the value of the PWM counter + * + * \param slice_num PWM slice number + * \param c Value to set the PWM counter to + * + */ +static inline void pwm_set_counter(uint slice_num, uint16_t c) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + pwm_hw->slice[slice_num].ctr = c; +} + +/** \brief Advance PWM count + * \ingroup hardware_pwm + * + * Advance the phase of a running the counter by 1 count. + * + * This function will return once the increment is complete. + * + * \param slice_num PWM slice number + */ +static inline void pwm_advance_count(uint slice_num) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + hw_set_bits(&pwm_hw->slice[slice_num].csr, PWM_CH0_CSR_PH_ADV_BITS); + while (pwm_hw->slice[slice_num].csr & PWM_CH0_CSR_PH_ADV_BITS) { + tight_loop_contents(); + } +} + +/** \brief Retard PWM count + * \ingroup hardware_pwm + * + * Retard the phase of a running counter by 1 count + * + * This function will return once the retardation is complete. + * + * \param slice_num PWM slice number + */ +static inline void pwm_retard_count(uint slice_num) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + hw_set_bits(&pwm_hw->slice[slice_num].csr, PWM_CH0_CSR_PH_RET_BITS); + while (pwm_hw->slice[slice_num].csr & PWM_CH0_CSR_PH_RET_BITS) { + tight_loop_contents(); + } +} + +/** \brief Set PWM clock divider using an 8:4 fractional value + * \ingroup hardware_pwm + * + * Set the clock divider. Counter increment will be on sysclock divided by this value, taking in to account the gating. + * + * \param slice_num PWM slice number + * \param integer 8 bit integer part of the clock divider + * \param fract 4 bit fractional part of the clock divider + */ +static inline void pwm_set_clkdiv_int_frac(uint slice_num, uint8_t integer, uint8_t fract) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + valid_params_if(PWM, fract >= 0 && slice_num <= 16); + pwm_hw->slice[slice_num].div = (integer << PWM_CH0_DIV_INT_LSB) | (fract << PWM_CH0_DIV_FRAC_LSB); +} + +/** \brief Set PWM clock divider + * \ingroup hardware_pwm + * + * Set the clock divider. Counter increment will be on sysclock divided by this value, taking in to account the gating. + * + * \param slice_num PWM slice number + * \param divider Floating point clock divider, 1.f <= value < 256.f + */ +static inline void pwm_set_clkdiv(uint slice_num, float divider) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + valid_params_if(PWM, divider >= 1.f && divider < 256.f); + uint8_t i = (uint8_t)divider; + uint8_t f = (uint8_t)((divider - i) * (0x01 << 4)); + pwm_set_clkdiv_int_frac(slice_num, i, f); +} + +/** \brief Set PWM output polarity + * \ingroup hardware_pwm + * + * \param slice_num PWM slice number + * \param a true to invert output A + * \param b true to invert output B + */ +static inline void pwm_set_output_polarity(uint slice_num, bool a, bool b) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + hw_write_masked(&pwm_hw->slice[slice_num].csr, !!a << PWM_CH0_CSR_A_INV_LSB | !!b << PWM_CH0_CSR_B_INV_LSB, + PWM_CH0_CSR_A_INV_BITS | PWM_CH0_CSR_B_INV_BITS); +} + + +/** \brief Set PWM divider mode + * \ingroup hardware_pwm + * + * \param slice_num PWM slice number + * \param mode Required divider mode + */ +static inline void pwm_set_clkdiv_mode(uint slice_num, enum pwm_clkdiv_mode mode) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + valid_params_if(PWM, mode >= PWM_DIV_FREE_RUNNING && mode <= PWM_DIV_B_FALLING); + hw_write_masked(&pwm_hw->slice[slice_num].csr, mode << PWM_CH0_CSR_DIVMODE_LSB, PWM_CH0_CSR_DIVMODE_BITS); +} + +/** \brief Set PWM phase correct on/off + * \ingroup hardware_pwm + * + * \param slice_num PWM slice number + * \param phase_correct true to set phase correct modulation, false to set trailing edge + * + * Setting phase control to true means that instead of wrapping back to zero when the wrap point is reached, + * the PWM starts counting back down. The output frequency is halved when phase-correct mode is enabled. + */ +static inline void pwm_set_phase_correct(uint slice_num, bool phase_correct) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + hw_write_masked(&pwm_hw->slice[slice_num].csr, phase_correct << PWM_CH0_CSR_PH_CORRECT_LSB, PWM_CH0_CSR_PH_CORRECT_BITS); +} + +/** \brief Enable/Disable PWM + * \ingroup hardware_pwm + * + * \param slice_num PWM slice number + * \param enabled true to enable the specified PWM, false to disable + */ +static inline void pwm_set_enabled(uint slice_num, bool enabled) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + hw_write_masked(&pwm_hw->slice[slice_num].csr, !!enabled << PWM_CH0_CSR_EN_LSB, PWM_CH0_CSR_EN_BITS); +} + +/** \brief Enable/Disable multiple PWM slices simultaneously + * \ingroup hardware_pwm + * + * \param mask Bitmap of PWMs to enable/disable. Bits 0 to 7 enable slices 0-7 respectively + */ +static inline void pwm_set_mask_enabled(uint32_t mask) { + pwm_hw->en = mask; +} + +/*! \brief Enable PWM instance interrupt + * \ingroup hardware_pwm + * + * Used to enable a single PWM instance interrupt + * + * \param slice_num PWM block to enable/disable + * \param enabled true to enable, false to disable + */ +static inline void pwm_set_irq_enabled(uint slice_num, bool enabled) { + valid_params_if(PWM, slice_num >= 0 && slice_num < NUM_PWM_SLICES); + if (enabled) { + hw_set_bits(&pwm_hw->inte, 1u << slice_num); + } else { + hw_clear_bits(&pwm_hw->inte, 1u << slice_num); + } +} + +/*! \brief Enable multiple PWM instance interrupts + * \ingroup hardware_pwm + * + * Use this to enable multiple PWM interrupts at once. + * + * \param slice_mask Bitmask of all the blocks to enable/disable. Channel 0 = bit 0, channel 1 = bit 1 etc. + * \param enabled true to enable, false to disable + */ +static inline void pwm_set_irq_mask_enabled(uint32_t slice_mask, bool enabled) { + valid_params_if(PWM, slice_mask < 256); + if (enabled) { + hw_set_bits(&pwm_hw->inte, slice_mask); + } else { + hw_clear_bits(&pwm_hw->inte, slice_mask); + } +} + +/*! \brief Clear single PWM channel interrupt + * \ingroup hardware_pwm + * + * \param slice_num PWM slice number + */ +static inline void pwm_clear_irq(uint slice_num) { + pwm_hw->intr = 1u << slice_num; +} + +/*! \brief Get PWM interrupt status, raw + * \ingroup hardware_pwm + * + * \return Bitmask of all PWM interrupts currently set + */ +static inline int32_t pwm_get_irq_status_mask() { + return pwm_hw->ints; +} + +/*! \brief Force PWM interrupt + * \ingroup hardware_pwm + * + * \param slice_num PWM slice number + */ +static inline void pwm_force_irq(uint slice_num) { + pwm_hw->intf = 1u << slice_num; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/CMakeLists.txt new file mode 100644 index 0000000000..0b314573e6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(hardware_resets INTERFACE) +target_include_directories(hardware_resets INTERFACE include) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/include/hardware/resets.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/include/hardware/resets.h new file mode 100644 index 0000000000..fab604bdae --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_resets/include/hardware/resets.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_RESETS_H +#define _HARDWARE_RESETS_H + +#include "pico.h" +#include "hardware/structs/resets.h" + +/** \file hardware/resets.h + * \defgroup hardware_resets hardware_resets + * + * Hardware Reset API + * + * The reset controller allows software control of the resets to all of the peripherals that are not + * critical to boot the processor in the RP2040. + * + * \subsubsection reset_bitmask + * \addtogroup hardware_resets + * + * Multiple blocks are referred to using a bitmask as follows: + * + * Block to reset | Bit + * ---------------|---- + * USB | 24 + * UART 1 | 23 + * UART 0 | 22 + * Timer | 21 + * TB Manager | 20 + * SysInfo | 19 + * System Config | 18 + * SPI 1 | 17 + * SPI 0 | 16 + * RTC | 15 + * PWM | 14 + * PLL USB | 13 + * PLL System | 12 + * PIO 1 | 11 + * PIO 0 | 10 + * Pads - QSPI | 9 + * Pads - bank 0 | 8 + * JTAG | 7 + * IO Bank 1 | 6 + * IO Bank 0 | 5 + * I2C 1 | 4 + * I2C 0 | 3 + * DMA | 2 + * Bus Control | 1 + * ADC 0 | 0 + * + * \subsection reset_example Example + * \addtogroup hardware_resets + * \include hello_reset.c + */ + +/// \tag::reset_funcs[] + +/*! \brief Reset the specified HW blocks + * \ingroup hardware_resets + * + * \param bits Bit pattern indicating blocks to reset. See \ref reset_bitmask + */ +static inline void reset_block(uint32_t bits) { + hw_set_bits(&resets_hw->reset, bits); +} + +/*! \brief bring specified HW blocks out of reset + * \ingroup hardware_resets + * + * \param bits Bit pattern indicating blocks to unreset. See \ref reset_bitmask + */ +static inline void unreset_block(uint32_t bits) { + hw_clear_bits(&resets_hw->reset, bits); +} + +/*! \brief Bring specified HW blocks out of reset and wait for completion + * \ingroup hardware_resets + * + * \param bits Bit pattern indicating blocks to unreset. See \ref reset_bitmask + */ +static inline void unreset_block_wait(uint32_t bits) { + hw_clear_bits(&resets_hw->reset, bits); + while (~resets_hw->reset_done & bits) + tight_loop_contents(); +} +/// \end::reset_funcs[] + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/CMakeLists.txt new file mode 100644 index 0000000000..dce6effb6d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(rtc) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/include/hardware/rtc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/include/hardware/rtc.h new file mode 100644 index 0000000000..83d5bdf288 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/include/hardware/rtc.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_RTC_H +#define _HARDWARE_RTC_H + +#include "pico.h" +#include "hardware/structs/rtc.h" + +/** \file hardware/rtc.h + * \defgroup hardware_rtc hardware_rtc + * + * Hardware Real Time Clock API + * + * The RTC keeps track of time in human readable format and generates events when the time is equal + * to a preset value. Think of a digital clock, not epoch time used by most computers. There are seven + * fields, one each for year (12 bit), month (4 bit), day (5 bit), day of the week (3 bit), hour (5 bit) + * minute (6 bit) and second (6 bit), storing the data in binary format. + * + * \sa datetime_t + * + * \subsection rtc_example Example + * \addtogroup hardware_rtc + * + * \include hello_rtc.c + */ + + +typedef void (*rtc_callback_t)(void); + +/*! \brief Initialise the RTC system + * \ingroup hardware_rtc + */ +void rtc_init(void); + +/*! \brief Set the RTC to the specified time + * \ingroup hardware_rtc + * + * \param t Pointer to a \ref datetime_t structure contains time to set + * \return true if set, false if the passed in datetime was invalid. + */ +bool rtc_set_datetime(datetime_t *t); + +/*! \brief Get the current time from the RTC + * \ingroup hardware_rtc + * + * \param t Pointer to a \ref datetime_t structure to receive the current RTC time + * \return true if datetime is valid, false if the RTC is not running. + */ +bool rtc_get_datetime(datetime_t *t); + +/*! \brief Is the RTC running? + * \ingroup hardware_rtc + * + */ +bool rtc_running(void); + +/*! \brief Set a time in the future for the RTC to call a user provided callback + * \ingroup hardware_rtc + * + * \param t Pointer to a \ref datetime_t structure containing a time in the future to fire the alarm. Any values set to -1 will not be matched on. + * \param user_callback pointer to a \ref rtc_callback_t to call when the alarm fires + */ +void rtc_set_alarm(datetime_t *t, rtc_callback_t user_callback); + +/*! \brief Disable the RTC alarm (if active) + * \ingroup hardware_rtc + */ +void rtc_disable_alarm(void); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/rtc.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/rtc.c new file mode 100644 index 0000000000..91bd1994c1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_rtc/rtc.c @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" + +#include "hardware/irq.h" +#include "hardware/rtc.h" +#include "hardware/resets.h" +#include "hardware/clocks.h" + +// Set this when setting an alarm +static rtc_callback_t _callback = NULL; +static bool _alarm_repeats = false; + +bool rtc_running(void) { + return (rtc_hw->ctrl & RTC_CTRL_RTC_ACTIVE_BITS); +} + +void rtc_init(void) { + // Get clk_rtc freq and make sure it is running + uint rtc_freq = clock_get_hz(clk_rtc); + assert(rtc_freq != 0); + + // Take rtc out of reset now that we know clk_rtc is running + reset_block(RESETS_RESET_RTC_BITS); + unreset_block_wait(RESETS_RESET_RTC_BITS); + + // Set up the 1 second divider. + // If rtc_freq is 400 then clkdiv_m1 should be 399 + rtc_freq -= 1; + + // Check the freq is not too big to divide + assert(rtc_freq <= RTC_CLKDIV_M1_BITS); + + // Write divide value + rtc_hw->clkdiv_m1 = rtc_freq; +} + +static bool valid_datetime(datetime_t *t) { + // Valid ranges taken from RTC doc. Note when setting an RTC alarm + // these values are allowed to be -1 to say "don't match this value" + if (!(t->year >= 0 && t->year <= 4095)) return false; + if (!(t->month >= 1 && t->month <= 12)) return false; + if (!(t->day >= 1 && t->day <= 31)) return false; + if (!(t->dotw >= 0 && t->dotw <= 6)) return false; + if (!(t->hour >= 0 && t->hour <= 23)) return false; + if (!(t->min >= 0 && t->min <= 59)) return false; + if (!(t->sec >= 0 && t->sec <= 59)) return false; + return true; +} + +bool rtc_set_datetime(datetime_t *t) { + if (!valid_datetime(t)) { + return false; + } + + // Disable RTC + rtc_hw->ctrl = 0; + // Wait while it is still active + while (rtc_running()) { + tight_loop_contents(); + } + + // Write to setup registers + rtc_hw->setup_0 = (t->year << RTC_SETUP_0_YEAR_LSB ) | + (t->month << RTC_SETUP_0_MONTH_LSB) | + (t->day << RTC_SETUP_0_DAY_LSB); + rtc_hw->setup_1 = (t->dotw << RTC_SETUP_1_DOTW_LSB) | + (t->hour << RTC_SETUP_1_HOUR_LSB) | + (t->min << RTC_SETUP_1_MIN_LSB) | + (t->sec << RTC_SETUP_1_SEC_LSB); + + // Load setup values into rtc clock domain + rtc_hw->ctrl = RTC_CTRL_LOAD_BITS; + + // Enable RTC and wait for it to be running + rtc_hw->ctrl = RTC_CTRL_RTC_ENABLE_BITS; + while (!rtc_running()) { + tight_loop_contents(); + } + + return true; +} + +bool rtc_get_datetime(datetime_t *t) { + // Make sure RTC is running + if (!rtc_running()) { + return false; + } + + // Note: RTC_0 should be read before RTC_1 + t->dotw = (rtc_hw->rtc_0 & RTC_RTC_0_DOTW_BITS ) >> RTC_RTC_0_DOTW_LSB; + t->hour = (rtc_hw->rtc_0 & RTC_RTC_0_HOUR_BITS ) >> RTC_RTC_0_HOUR_LSB; + t->min = (rtc_hw->rtc_0 & RTC_RTC_0_MIN_BITS ) >> RTC_RTC_0_MIN_LSB; + t->sec = (rtc_hw->rtc_0 & RTC_RTC_0_SEC_BITS ) >> RTC_RTC_0_SEC_LSB; + t->year = (rtc_hw->rtc_1 & RTC_RTC_1_YEAR_BITS ) >> RTC_RTC_1_YEAR_LSB; + t->month = (rtc_hw->rtc_1 & RTC_RTC_1_MONTH_BITS) >> RTC_RTC_1_MONTH_LSB; + t->day = (rtc_hw->rtc_1 & RTC_RTC_1_DAY_BITS ) >> RTC_RTC_1_DAY_LSB; + + return true; +} + +static void rtc_enable_alarm(void) { + // Set matching and wait for it to be enabled + hw_set_bits(&rtc_hw->irq_setup_0, RTC_IRQ_SETUP_0_MATCH_ENA_BITS); + while(!(rtc_hw->irq_setup_0 & RTC_IRQ_SETUP_0_MATCH_ACTIVE_BITS)) { + tight_loop_contents(); + } +} + +static void rtc_irq_handler(void) { + // Always disable the alarm to clear the current IRQ. + // Even if it is a repeatable alarm, we don't want it to keep firing. + // If it matches on a second it can keep firing for that second. + rtc_disable_alarm(); + + if (_alarm_repeats) { + // If it is a repeatable alarm, re enable the alarm. + rtc_enable_alarm(); + } + + // Call user callback function + if (_callback) { + _callback(); + } +} + +static bool rtc_alarm_repeats(datetime_t *t) { + // If any value is set to -1 then we don't match on that value + // hence the alarm will eventually repeat + if (t->year == -1) return true; + if (t->month == -1) return true; + if (t->day == -1) return true; + if (t->dotw == -1) return true; + if (t->hour == -1) return true; + if (t->min == -1) return true; + if (t->sec == -1) return true; + return false; +} + +void rtc_set_alarm(datetime_t *t, rtc_callback_t user_callback) { + rtc_disable_alarm(); + + // Only add to setup if it isn't -1 + rtc_hw->irq_setup_0 = ((t->year == -1) ? 0 : (t->year << RTC_IRQ_SETUP_0_YEAR_LSB )) | + ((t->month == -1) ? 0 : (t->month << RTC_IRQ_SETUP_0_MONTH_LSB)) | + ((t->day == -1) ? 0 : (t->day << RTC_IRQ_SETUP_0_DAY_LSB )); + rtc_hw->irq_setup_1 = ((t->dotw == -1) ? 0 : (t->dotw << RTC_IRQ_SETUP_1_DOTW_LSB)) | + ((t->hour == -1) ? 0 : (t->hour << RTC_IRQ_SETUP_1_HOUR_LSB)) | + ((t->min == -1) ? 0 : (t->min << RTC_IRQ_SETUP_1_MIN_LSB )) | + ((t->sec == -1) ? 0 : (t->sec << RTC_IRQ_SETUP_1_SEC_LSB )); + + // Set the match enable bits for things we care about + if (t->year != -1) hw_set_bits(&rtc_hw->irq_setup_0, RTC_IRQ_SETUP_0_YEAR_ENA_BITS); + if (t->month != -1) hw_set_bits(&rtc_hw->irq_setup_0, RTC_IRQ_SETUP_0_MONTH_ENA_BITS); + if (t->day != -1) hw_set_bits(&rtc_hw->irq_setup_0, RTC_IRQ_SETUP_0_DAY_ENA_BITS); + if (t->dotw != -1) hw_set_bits(&rtc_hw->irq_setup_1, RTC_IRQ_SETUP_1_DOTW_ENA_BITS); + if (t->hour != -1) hw_set_bits(&rtc_hw->irq_setup_1, RTC_IRQ_SETUP_1_HOUR_ENA_BITS); + if (t->min != -1) hw_set_bits(&rtc_hw->irq_setup_1, RTC_IRQ_SETUP_1_MIN_ENA_BITS); + if (t->sec != -1) hw_set_bits(&rtc_hw->irq_setup_1, RTC_IRQ_SETUP_1_SEC_ENA_BITS); + + // Does it repeat? I.e. do we not match on any of the bits + _alarm_repeats = rtc_alarm_repeats(t); + + // Store function pointer we can call later + _callback = user_callback; + + irq_set_exclusive_handler(RTC_IRQ, rtc_irq_handler); + + // Enable the IRQ at the peri + rtc_hw->inte = RTC_INTE_RTC_BITS; + + // Enable the IRQ at the proc + irq_set_enabled(RTC_IRQ, true); + + rtc_enable_alarm(); +} + +void rtc_disable_alarm(void) { + // Disable matching and wait for it to stop being active + hw_clear_bits(&rtc_hw->irq_setup_0, RTC_IRQ_SETUP_0_MATCH_ENA_BITS); + while(rtc_hw->irq_setup_0 & RTC_IRQ_SETUP_0_MATCH_ACTIVE_BITS) { + tight_loop_contents(); + } +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/CMakeLists.txt new file mode 100644 index 0000000000..03e7f1f290 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(spi) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/include/hardware/spi.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/include/hardware/spi.h new file mode 100644 index 0000000000..f0de5a3f12 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/include/hardware/spi.h @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_SPI_H +#define _HARDWARE_SPI_H + +#include "pico.h" +#include "pico/time.h" +#include "hardware/structs/spi.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_SPI, Enable/disable assertions in the SPI module, type=bool, default=0, group=hardware_spi +#ifndef PARAM_ASSERTIONS_ENABLED_SPI +#define PARAM_ASSERTIONS_ENABLED_SPI 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/spi.h + * \defgroup hardware_spi hardware_spi + * + * Hardware SPI API + * + * RP2040 has 2 identical instances of the Serial Peripheral Interface (SPI) controller. + * + * The PrimeCell SSP is a master or slave interface for synchronous serial communication with peripheral devices that have + * Motorola SPI, National Semiconductor Microwire, or Texas Instruments synchronous serial interfaces. + * + * Controller can be defined as master or slave using the \ref spi_set_slave function. + * + * Each controller can be connected to a number of GPIO pins, see the datasheet GPIO function selection table for more information. + */ + +/** + * Opaque type representing an SPI instance. + */ +typedef struct spi_inst spi_inst_t; + +/** Identifier for the first (SPI 0) hardware SPI instance (for use in SPI functions). + * + * e.g. spi_init(spi0, 48000) + * + * \ingroup hardware_spi + */ +#define spi0 ((spi_inst_t * const)spi0_hw) + +/** Identifier for the second (SPI 1) hardware SPI instance (for use in SPI functions). + * + * e.g. spi_init(spi1, 48000) + * + * \ingroup hardware_spi + */ +#define spi1 ((spi_inst_t * const)spi1_hw) + +typedef enum { + SPI_CPHA_0 = 0, + SPI_CPHA_1 = 1 +} spi_cpha_t; + +typedef enum { + SPI_CPOL_0 = 0, + SPI_CPOL_1 = 1 +} spi_cpol_t; + +typedef enum { + SPI_LSB_FIRST = 0, + SPI_MSB_FIRST = 1 +} spi_order_t; + +// ---------------------------------------------------------------------------- +// Setup + +/*! \brief Initialise SPI instances + * \ingroup hardware_spi + * Puts the SPI into a known state, and enable it. Must be called before other + * functions. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param baudrate Baudrate required in Hz + * + * \note There is no guarantee that the baudrate requested will be possible, the nearest will be chosen, + * and this function does not return any indication of this. You can use the \ref spi_set_baudrate function + * which will return the actual baudrate selected if this is important. + */ +void spi_init(spi_inst_t *spi, uint baudrate); + +/*! \brief Deinitialise SPI instances + * \ingroup hardware_spi + * Puts the SPI into a disabled state. Init will need to be called to reenable the device + * functions. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + */ +void spi_deinit(spi_inst_t *spi); + +/*! \brief Set SPI baudrate + * \ingroup hardware_spi + * + * Set SPI frequency as close as possible to baudrate, and return the actual + * achieved rate. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param baudrate Baudrate required in Hz, should be capable of a bitrate of at least 2Mbps, or higher, depending on system clock settings. + * \return The actual baudrate set + */ +uint spi_set_baudrate(spi_inst_t *spi, uint baudrate); + +/*! \brief Convert I2c instance to hardware instance number + * \ingroup hardware_spi + * + * \param spi SPI instance + * \return Number of SPI, 0 or 1. + */ +static inline uint spi_get_index(spi_inst_t *spi) { + invalid_params_if(SPI, spi != spi0 && spi != spi1); + return spi == spi1 ? 1 : 0; +} + +static inline spi_hw_t *spi_get_hw(spi_inst_t *spi) { + spi_get_index(spi); // check it is a hw spi + return (spi_hw_t *)spi; +} + +/*! \brief Configure SPI + * \ingroup hardware_spi + * + * Configure how the SPI serialises and deserialises data on the wire + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param data_bits Number of data bits per transfer. Valid values 4..16. + * \param cpol SSPCLKOUT polarity, applicable to Motorola SPI frame format only. + * \param cpha SSPCLKOUT phase, applicable to Motorola SPI frame format only + * \param order Must be SPI_MSB_FIRST, no other values supported on the PL022 + */ +static inline void spi_set_format(spi_inst_t *spi, uint data_bits, spi_cpol_t cpol, spi_cpha_t cpha, spi_order_t order) { + invalid_params_if(SPI, data_bits < 4 || data_bits > 16); + // LSB-first not supported on PL022: + invalid_params_if(SPI, order != SPI_MSB_FIRST); + invalid_params_if(SPI, cpol != SPI_CPOL_0 && cpol != SPI_CPOL_1); + invalid_params_if(SPI, cpha != SPI_CPHA_0 && cpha != SPI_CPHA_1); + hw_write_masked(&spi_get_hw(spi)->cr0, + (data_bits - 1) << SPI_SSPCR0_DSS_LSB | + cpol << SPI_SSPCR0_SPO_LSB | + cpha << SPI_SSPCR0_SPH_LSB, + SPI_SSPCR0_DSS_BITS | + SPI_SSPCR0_SPO_BITS | + SPI_SSPCR0_SPH_BITS); +} + +/*! \brief Set SPI master/slave + * \ingroup hardware_spi + * + * Configure the SPI for master- or slave-mode operation. By default, + * spi_init() sets master-mode. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param slave true to set SPI device as a slave device, false for master. + */ +static inline void spi_set_slave(spi_inst_t *spi, bool slave) { + if (slave) + hw_set_bits(&spi_get_hw(spi)->cr1, SPI_SSPCR1_MS_BITS); + else + hw_clear_bits(&spi_get_hw(spi)->cr1, SPI_SSPCR1_MS_BITS); +} + +// ---------------------------------------------------------------------------- +// Generic input/output + +/*! \brief Check whether a write can be done on SPI device + * \ingroup hardware_spi + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \return 0 if no space is available to write. Non-zero if a write is possible + * + * \note Although the controllers each have a 8 deep TX FIFO, the current HW implementation can only return 0 or 1 + * rather than the space available. + */ +static inline size_t spi_is_writable(spi_inst_t *spi) { + // PL022 doesn't expose levels directly, so return values are only 0 or 1 + return (spi_get_hw(spi)->sr & SPI_SSPSR_TNF_BITS) >> SPI_SSPSR_TNF_LSB; +} + +/*! \brief Check whether a read can be done on SPI device + * \ingroup hardware_spi + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \return Non-zero if a read is possible i.e. data is present + * + * \note Although the controllers each have a 8 deep RX FIFO, the current HW implementation can only return 0 or 1 + * rather than the data available. + */ +static inline size_t spi_is_readable(spi_inst_t *spi) { + return (spi_get_hw(spi)->sr & SPI_SSPSR_RNE_BITS) >> SPI_SSPSR_RNE_LSB; +} + +/*! \brief Write/Read to/from an SPI device + * \ingroup hardware_spi + * + * Write \p len bytes from \p src to SPI. Simultaneously read \p len bytes from SPI to \p dst. + * Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param src Buffer of data to write + * \param dst Buffer for read data + * \param len Length of BOTH buffers + * \return Number of bytes written/read +*/ +int spi_write_read_blocking(spi_inst_t *spi, const uint8_t *src, uint8_t *dst, size_t len); + +/*! \brief Write to an SPI device, blocking + * \ingroup hardware_spi + * + * Write \p len bytes from \p src to SPI, and discard any data received back + * Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param src Buffer of data to write + * \param len Length of \p src + * \return Number of bytes written/read + */ +int spi_write_blocking(spi_inst_t *spi, const uint8_t *src, size_t len); + +/*! \brief Read from an SPI device + * \ingroup hardware_spi + * + * Read \p len bytes from SPI to \p dst. + * Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. + * \p repeated_tx_data is output repeatedly on TX as data is read in from RX. + * Generally this can be 0, but some devices require a specific value here, + * e.g. SD cards expect 0xff + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param repeated_tx_data Buffer of data to write + * \param dst Buffer for read data + * \param len Length of buffer \p dst + * \return Number of bytes written/read + */ +int spi_read_blocking(spi_inst_t *spi, uint8_t repeated_tx_data, uint8_t *dst, size_t len); + +// ---------------------------------------------------------------------------- +// SPI-specific operations and aliases + +// FIXME need some instance-private data for select() and deselect() if we are going that route + +/*! \brief Write/Read half words to/from an SPI device + * \ingroup hardware_spi + * + * Write \p len halfwords from \p src to SPI. Simultaneously read \p len halfwords from SPI to \p dst. + * Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param src Buffer of data to write + * \param dst Buffer for read data + * \param len Length of BOTH buffers in halfwords + * \return Number of bytes written/read +*/ +int spi_write16_read16_blocking(spi_inst_t *spi, const uint16_t *src, uint16_t *dst, size_t len); + +/*! \brief Write to an SPI device + * \ingroup hardware_spi + * + * Write \p len halfwords from \p src to SPI. Discard any data received back. + * Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param src Buffer of data to write + * \param len Length of buffers + * \return Number of bytes written/read +*/ +int spi_write16_blocking(spi_inst_t *spi, const uint16_t *src, size_t len); + +/*! \brief Read from an SPI device + * \ingroup hardware_spi + * + * Read \p len halfwords from SPI to \p dst. + * Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate. + * \p repeated_tx_data is output repeatedly on TX as data is read in from RX. + * Generally this can be 0, but some devices require a specific value here, + * e.g. SD cards expect 0xff + * + * \param spi SPI instance specifier, either \ref spi0 or \ref spi1 + * \param repeated_tx_data Buffer of data to write + * \param dst Buffer for read data + * \param len Length of buffer \p dst in halfwords + * \return Number of bytes written/read + */ +int spi_read16_blocking(spi_inst_t *spi, uint16_t repeated_tx_data, uint16_t *dst, size_t len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/spi.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/spi.c new file mode 100644 index 0000000000..b0cad30755 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_spi/spi.c @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/resets.h" +#include "hardware/clocks.h" +#include "hardware/spi.h" + +static inline void spi_reset(spi_inst_t *spi) { + invalid_params_if(SPI, spi != spi0 && spi != spi1); + reset_block(spi == spi0 ? RESETS_RESET_SPI0_BITS : RESETS_RESET_SPI1_BITS); +} + +static inline void spi_unreset(spi_inst_t *spi) { + invalid_params_if(SPI, spi != spi0 && spi != spi1); + unreset_block_wait(spi == spi0 ? RESETS_RESET_SPI0_BITS : RESETS_RESET_SPI1_BITS); +} + +void spi_init(spi_inst_t *spi, uint baudrate) { + spi_reset(spi); + spi_unreset(spi); + + (void) spi_set_baudrate(spi, baudrate); + spi_set_format(spi, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST); + // Always enable DREQ signals -- harmless if DMA is not listening + hw_set_bits(&spi_get_hw(spi)->dmacr, SPI_SSPDMACR_TXDMAE_BITS | SPI_SSPDMACR_RXDMAE_BITS); + spi_set_format(spi, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST); + + // Finally enable the SPI + hw_set_bits(&spi_get_hw(spi)->cr1, SPI_SSPCR1_SSE_BITS); +} + +void spi_deinit(spi_inst_t *spi) { + hw_clear_bits(&spi_get_hw(spi)->cr1, SPI_SSPCR1_SSE_BITS); + hw_clear_bits(&spi_get_hw(spi)->dmacr, SPI_SSPDMACR_TXDMAE_BITS | SPI_SSPDMACR_RXDMAE_BITS); + spi_reset(spi); +} + +uint spi_set_baudrate(spi_inst_t *spi, uint baudrate) { + uint freq_in = clock_get_hz(clk_peri); + uint prescale, postdiv; + invalid_params_if(SPI, baudrate > freq_in); + + // Find smallest prescale value which puts output frequency in range of + // post-divide. Prescale is an even number from 2 to 254 inclusive. + for (prescale = 2; prescale <= 254; prescale += 2) { + if (freq_in < (prescale + 2) * 256 * (uint64_t) baudrate) + break; + } + invalid_params_if(SPI, prescale > 254); // Frequency too low + + // Find largest post-divide which makes output <= baudrate. Post-divide is + // an integer in the range 1 to 256 inclusive. + for (postdiv = 256; postdiv > 1; --postdiv) { + if (freq_in / (prescale * (postdiv - 1)) > baudrate) + break; + } + + spi_get_hw(spi)->cpsr = prescale; + hw_write_masked(&spi_get_hw(spi)->cr0, (postdiv - 1) << SPI_SSPCR0_SCR_LSB, SPI_SSPCR0_SCR_BITS); + + // Return the frequency we were able to achieve + return freq_in / (prescale * postdiv); +} + +// Write len bytes from src to SPI. Simultaneously read len bytes from SPI to dst. +// Note this function is guaranteed to exit in a known amount of time (bits sent * time per bit) +int __not_in_flash_func(spi_write_read_blocking)(spi_inst_t *spi, const uint8_t *src, uint8_t *dst, size_t len) { + // Never have more transfers in flight than will fit into the RX FIFO, + // else FIFO will overflow if this code is heavily interrupted. + const size_t fifo_depth = 8; + size_t rx_remaining = len, tx_remaining = len; + + while (rx_remaining || tx_remaining) { + if (tx_remaining && spi_is_writable(spi) && rx_remaining - tx_remaining < fifo_depth) { + spi_get_hw(spi)->dr = (uint32_t) *src++; + --tx_remaining; + } + if (rx_remaining && spi_is_readable(spi)) { + *dst++ = (uint8_t) spi_get_hw(spi)->dr; + --rx_remaining; + } + } + + return len; +} + +// Write len bytes directly from src to the SPI, and discard any data received back +int __not_in_flash_func(spi_write_blocking)(spi_inst_t *spi, const uint8_t *src, size_t len) { + // Write to TX FIFO whilst ignoring RX, then clean up afterward. When RX + // is full, PL022 inhibits RX pushes, and sets a sticky flag on + // push-on-full, but continues shifting. Safe if SSPIMSC_RORIM is not set. + for (size_t i = 0; i < len; ++i) { + while (!spi_is_writable(spi)) + tight_loop_contents(); + spi_get_hw(spi)->dr = (uint32_t)src[i]; + } + // Drain RX FIFO, then wait for shifting to finish (which may be *after* + // TX FIFO drains), then drain RX FIFO again + while (spi_is_readable(spi)) + (void)spi_get_hw(spi)->dr; + while (spi_get_hw(spi)->sr & SPI_SSPSR_BSY_BITS) + tight_loop_contents(); + while (spi_is_readable(spi)) + (void)spi_get_hw(spi)->dr; + + // Don't leave overrun flag set + spi_get_hw(spi)->icr = SPI_SSPICR_RORIC_BITS; + + return len; +} + +// Read len bytes directly from the SPI to dst. +// repeated_tx_data is output repeatedly on SO as data is read in from SI. +// Generally this can be 0, but some devices require a specific value here, +// e.g. SD cards expect 0xff +int __not_in_flash_func(spi_read_blocking)(spi_inst_t *spi, uint8_t repeated_tx_data, uint8_t *dst, size_t len) { + const size_t fifo_depth = 8; + size_t rx_remaining = len, tx_remaining = len; + + while (rx_remaining || tx_remaining) { + if (tx_remaining && spi_is_writable(spi) && rx_remaining - tx_remaining < fifo_depth) { + spi_get_hw(spi)->dr = (uint32_t) repeated_tx_data; + --tx_remaining; + } + if (rx_remaining && spi_is_readable(spi)) { + *dst++ = (uint8_t) spi_get_hw(spi)->dr; + --rx_remaining; + } + } + + return len; +} + +// Write len halfwords from src to SPI. Simultaneously read len halfwords from SPI to dst. +int __not_in_flash_func(spi_write16_read16_blocking)(spi_inst_t *spi, const uint16_t *src, uint16_t *dst, size_t len) { + // Never have more transfers in flight than will fit into the RX FIFO, + // else FIFO will overflow if this code is heavily interrupted. + const size_t fifo_depth = 8; + size_t rx_remaining = len, tx_remaining = len; + + while (rx_remaining || tx_remaining) { + if (tx_remaining && spi_is_writable(spi) && rx_remaining - tx_remaining < fifo_depth) { + spi_get_hw(spi)->dr = (uint32_t) *src++; + --tx_remaining; + } + if (rx_remaining && spi_is_readable(spi)) { + *dst++ = (uint16_t) spi_get_hw(spi)->dr; + --rx_remaining; + } + } + + return len; +} + +// Write len bytes directly from src to the SPI, and discard any data received back +int __not_in_flash_func(spi_write16_blocking)(spi_inst_t *spi, const uint16_t *src, size_t len) { + // Deliberately overflow FIFO, then clean up afterward, to minimise amount + // of APB polling required per halfword + for (size_t i = 0; i < len; ++i) { + while (!spi_is_writable(spi)) + tight_loop_contents(); + spi_get_hw(spi)->dr = (uint32_t)src[i]; + } + + while (spi_is_readable(spi)) + (void)spi_get_hw(spi)->dr; + while (spi_get_hw(spi)->sr & SPI_SSPSR_BSY_BITS) + tight_loop_contents(); + while (spi_is_readable(spi)) + (void)spi_get_hw(spi)->dr; + + // Don't leave overrun flag set + spi_get_hw(spi)->icr = SPI_SSPICR_RORIC_BITS; + + return len; +} + +// Read len halfwords directly from the SPI to dst. +// repeated_tx_data is output repeatedly on SO as data is read in from SI. +int __not_in_flash_func(spi_read16_blocking)(spi_inst_t *spi, uint16_t repeated_tx_data, uint16_t *dst, size_t len) { + const size_t fifo_depth = 8; + size_t rx_remaining = len, tx_remaining = len; + + while (rx_remaining || tx_remaining) { + if (tx_remaining && spi_is_writable(spi) && rx_remaining - tx_remaining < fifo_depth) { + spi_get_hw(spi)->dr = (uint32_t) repeated_tx_data; + --tx_remaining; + } + if (rx_remaining && spi_is_readable(spi)) { + *dst++ = (uint16_t) spi_get_hw(spi)->dr; + --rx_remaining; + } + } + + return len; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/CMakeLists.txt new file mode 100644 index 0000000000..1c64ed61a4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(sync) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/include/hardware/sync.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/include/hardware/sync.h new file mode 100644 index 0000000000..f375ff8bda --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/include/hardware/sync.h @@ -0,0 +1,336 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_SYNC_H +#define _HARDWARE_SYNC_H + +#include "pico.h" +#include "hardware/address_mapped.h" +#include "hardware/regs/sio.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** \file hardware/sync.h + * \defgroup hardware_sync hardware_sync + * + * Low level hardware spin-lock, barrier and processor event API + * + * Functions for synchronisation between core's, HW, etc + * + * The RP2040 provides 32 hardware spin locks, which can be used to manage mutually-exclusive access to shared software + * resources. + * + * \note spin locks 0-15 are currently reserved for fixed uses by the SDK - i.e. if you use them other + * functionality may break or not function optimally + */ + +/** \brief A spin lock identifier + * \ingroup hardware_sync + */ +typedef volatile uint32_t spin_lock_t; + +// PICO_CONFIG: PICO_SPINLOCK_ID_IRQ, Spinlock ID for IRQ protection, min=0, max=31, default=9, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_IRQ +#define PICO_SPINLOCK_ID_IRQ 9 +#endif + +// PICO_CONFIG: PICO_SPINLOCK_ID_TIMER, Spinlock ID for Timer protection, min=0, max=31, default=10, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_TIMER +#define PICO_SPINLOCK_ID_TIMER 10 +#endif + +// PICO_CONFIG: PICO_SPINLOCK_ID_HARDWARE_CLAIM, Spinlock ID for Hardware claim protection, min=0, max=31, default=11, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_HARDWARE_CLAIM +#define PICO_SPINLOCK_ID_HARDWARE_CLAIM 11 +#endif + +// PICO_CONFIG: PICO_SPINLOCK_ID_STRIPED_FIRST, Spinlock ID for striped first, min=16, max=31, default=16, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_STRIPED_FIRST +#define PICO_SPINLOCK_ID_STRIPED_FIRST 16 +#endif + +// PICO_CONFIG: PICO_SPINLOCK_ID_STRIPED_LAST, Spinlock ID for striped last, min=16, max=31, default=23, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_STRIPED_LAST +#define PICO_SPINLOCK_ID_STRIPED_LAST 23 +#endif + +// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, Spinlock ID for claim free first, min=16, max=31, default=24, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_CLAIM_FREE_FIRST +#define PICO_SPINLOCK_ID_CLAIM_FREE_FIRST 24 +#endif + +// PICO_CONFIG: PICO_SPINLOCK_ID_CLAIM_FREE_END, Spinlock ID for claim free end, min=16, max=31, default=31, group=hardware_sync +#ifndef PICO_SPINLOCK_ID_CLAIM_FREE_END +#define PICO_SPINLOCK_ID_CLAIM_FREE_END 31 +#endif + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_SYNC, Enable/disable assertions in the HW sync module, type=bool, default=0, group=hardware_sync +#ifndef PARAM_ASSERTIONS_ENABLED_SYNC +#define PARAM_ASSERTIONS_ENABLED_SYNC 0 +#endif + + +/*! \brief Insert a SEV instruction in to the code path. + * \ingroup hardware_sync + + * The SEV (send event) instruction sends an event to both cores. + */ +inline static void __sev() { + __asm volatile ("sev"); +} + +/*! \brief Insert a WFE instruction in to the code path. + * \ingroup hardware_sync + * + * The WFE (wait for event) instruction waits until one of a number of + * events occurs, including events signalled by the SEV instruction on either core. + */ +inline static void __wfe() { + __asm volatile ("wfe"); +} + +/*! \brief Insert a WFI instruction in to the code path. + * \ingroup hardware_sync +* + * The WFI (wait for interrupt) instruction waits for a interrupt to wake up the core. + */ +inline static void __wfi() { + __asm volatile ("wfi"); +} + +/*! \brief Insert a DMB instruction in to the code path. + * \ingroup hardware_sync + * + * The DMB (data memory barrier) acts as a memory barrier, all memory accesses prior to this + * instruction will be observed before any explicit access after the instruction. + */ +inline static void __dmb() { + __asm volatile ("dmb"); +} + +/*! \brief Insert a ISB instruction in to the code path. + * \ingroup hardware_sync + * + * ISB acts as an instruction synchronization barrier. It flushes the pipeline of the processor, + * so that all instructions following the ISB are fetched from cache or memory again, after + * the ISB instruction has been completed. + */ +inline static void __isb() { + __asm volatile ("isb"); +} + +/*! \brief Acquire a memory fence + * \ingroup hardware_sync + */ +inline static void __mem_fence_acquire() { + // the original code below makes it hard for us to be included from C++ via a header + // which itself is in an extern "C", so just use __dmb instead, which is what + // is required on Cortex M0+ + __dmb(); +//#ifndef __cplusplus +// atomic_thread_fence(memory_order_acquire); +//#else +// std::atomic_thread_fence(std::memory_order_acquire); +//#endif +} + +/*! \brief Release a memory fence + * \ingroup hardware_sync + * + */ +inline static void __mem_fence_release() { + // the original code below makes it hard for us to be included from C++ via a header + // which itself is in an extern "C", so just use __dmb instead, which is what + // is required on Cortex M0+ + __dmb(); +//#ifndef __cplusplus +// atomic_thread_fence(memory_order_release); +//#else +// std::atomic_thread_fence(std::memory_order_release); +//#endif +} + +/*! \brief Save and disable interrupts + * \ingroup hardware_sync + * + * \return The prior interrupt enable status for restoration later via restore_interrupts() + */ +inline static uint32_t save_and_disable_interrupts() { + uint32_t status; + __asm volatile ("mrs %0, PRIMASK" : "=r" (status)::); + __asm volatile ("cpsid i"); + return status; +} + +/*! \brief Restore interrupts to a specified state + * \ingroup hardware_sync + * + * \param status Previous interrupt status from save_and_disable_interrupts() + */ +inline static void restore_interrupts(uint32_t status) { + __asm volatile ("msr PRIMASK,%0"::"r" (status) : ); +} + +/*! \brief Get HW Spinlock instance from number + * \ingroup hardware_sync + * + * \param lock_num Spinlock ID + * \return The spinlock instance + */ +inline static spin_lock_t *spin_lock_instance(uint lock_num) { + return (spin_lock_t *) (SIO_BASE + SIO_SPINLOCK0_OFFSET + lock_num * 4); +} + +/*! \brief Get HW Spinlock number from instance + * \ingroup hardware_sync + * + * \param lock The Spinlock instance + * \return The Spinlock ID + */ +inline static uint spin_lock_get_num(spin_lock_t *lock) { + return lock - (spin_lock_t *) (SIO_BASE + SIO_SPINLOCK0_OFFSET); +} + +/*! \brief Acquire a spin lock without disabling interrupts (hence unsafe) + * \ingroup hardware_sync + * + * \param lock Spinlock instance + */ +inline static void spin_lock_unsafe_blocking(spin_lock_t *lock) { + // Note we don't do a wfe or anything, because by convention these spin_locks are VERY SHORT LIVED and NEVER BLOCK and run + // with INTERRUPTS disabled (to ensure that)... therefore nothing on our core could be blocking us, so we just need to wait on another core + // anyway which should be finished soon + while (__builtin_expect(!*lock, 0)); + __mem_fence_acquire(); +} + +/*! \brief Release a spin lock without re-enabling interrupts + * \ingroup hardware_sync + * + * \param lock Spinlock instance + */ +inline static void spin_unlock_unsafe(spin_lock_t *lock) { + __mem_fence_release(); + *lock = 0; +} + +/*! \brief Acquire a spin lock safely + * \ingroup hardware_sync + * + * This function will disable interrupts prior to acquiring the spinlock + * + * \param lock Spinlock instance + * \return interrupt status to be used when unlocking, to restore to original state + */ +inline static uint32_t spin_lock_blocking(spin_lock_t *lock) { + uint32_t save = save_and_disable_interrupts(); + spin_lock_unsafe_blocking(lock); + return save; +} + +/*! \brief Check to see if a spinlock is currently acquired elsewhere. + * \ingroup hardware_sync + * + * \param lock Spinlock instance + */ +inline static bool is_spin_locked(const spin_lock_t *lock) { + check_hw_size(spin_lock_t, 4); + uint32_t lock_num = lock - spin_lock_instance(0); + return 0 != (*(io_ro_32 *) (SIO_BASE + SIO_SPINLOCK_ST_OFFSET) & (1u << lock_num)); +} + +/*! \brief Release a spin lock safely + * \ingroup hardware_sync + * + * This function will re-enable interrupts according to the parameters. + * + * \param lock Spinlock instance + * \param saved_irq Return value from the \ref spin_lock_blocking() function. + * \return interrupt status to be used when unlocking, to restore to original state + * + * \sa spin_lock_blocking() + */ +inline static void spin_unlock(spin_lock_t *lock, uint32_t saved_irq) { + spin_unlock_unsafe(lock); + restore_interrupts(saved_irq); +} + +/*! \brief Get the current core number + * \ingroup hardware_sync + * + * \return The core number the call was made from + */ +static inline uint get_core_num() { + return (*(uint32_t *) (SIO_BASE + SIO_CPUID_OFFSET)); +} + +/*! \brief Initialise a spin lock + * \ingroup hardware_sync + * + * The spin lock is initially unlocked + * + * \param lock_num The spin lock number + * \return The spin lock instance + */ +spin_lock_t *spin_lock_init(uint lock_num); + +/*! \brief Release all spin locks + * \ingroup hardware_sync + */ +void spin_locks_reset(void); + +// this number is not claimed +uint next_striped_spin_lock_num(); + +/*! \brief Mark a spin lock as used + * \ingroup hardware_sync + * + * Method for cooperative claiming of hardware. Will cause a panic if the spin lock + * is already claimed. Use of this method by libraries detects accidental + * configurations that would fail in unpredictable ways. + * + * \param lock_num the spin lock number + */ +void spin_lock_claim(uint lock_num); + +/*! \brief Mark multiple spin locks as used + * \ingroup hardware_sync + * + * Method for cooperative claiming of hardware. Will cause a panic if any of the spin locks + * are already claimed. Use of this method by libraries detects accidental + * configurations that would fail in unpredictable ways. + * + * \param lock_num_mask Bitfield of all required spin locks to claim (bit 0 == spin lock 0, bit 1 == spin lock 1 etc) + */ +void spin_lock_claim_mask(uint32_t lock_num_mask); + +/*! \brief Mark a spin lock as no longer used + * \ingroup hardware_sync + * + * Method for cooperative claiming of hardware. + * + * \param lock_num the spin lock number to release + */ +void spin_lock_unclaim(uint lock_num); + +/*! \brief Claim a free spin lock + * \ingroup hardware_sync + * + * \param required if true the function will panic if none are available + * \return the spin lock number or -1 if required was false, and none were free + */ +int spin_lock_claim_unused(bool required); + +#define remove_volatile_cast(t, x) ({__mem_fence_acquire(); (t)(x); }) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/sync.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/sync.c new file mode 100644 index 0000000000..dba040a177 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_sync/sync.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/sync.h" +#include "hardware/claim.h" + +static_assert(PICO_SPINLOCK_ID_STRIPED_LAST >= PICO_SPINLOCK_ID_STRIPED_FIRST, ""); +static uint8_t striped_spin_lock_num = PICO_SPINLOCK_ID_STRIPED_FIRST; +static uint32_t claimed; + +static void check_lock_num(uint __unused lock_num) { + invalid_params_if(SYNC, lock_num >= 32); +} + +void spin_locks_reset(void) { + for (uint i = 0; i < NUM_SPIN_LOCKS; i++) { + spin_unlock_unsafe(spin_lock_instance(i)); + } +} + +spin_lock_t *spin_lock_init(uint lock_num) { + assert(lock_num >= 0 && lock_num < NUM_SPIN_LOCKS); + spin_lock_t *lock = spin_lock_instance(lock_num); + spin_unlock_unsafe(lock); + return lock; +} + +uint next_striped_spin_lock_num() { + uint rc = striped_spin_lock_num++; + if (striped_spin_lock_num > PICO_SPINLOCK_ID_STRIPED_LAST) { + striped_spin_lock_num = PICO_SPINLOCK_ID_STRIPED_FIRST; + } + return rc; +} + +void spin_lock_claim(uint lock_num) { + check_lock_num(lock_num); + hw_claim_or_assert((uint8_t *) &claimed, lock_num, "Spinlock %d is already claimed"); +} + +void spin_lock_claim_mask(uint32_t mask) { + for(uint i = 0; mask; i++, mask >>= 1u) { + if (mask & 1u) spin_lock_claim(i); + } +} + +void spin_lock_unclaim(uint lock_num) { + check_lock_num(lock_num); + hw_claim_clear((uint8_t *) &claimed, lock_num); +} + +int spin_lock_claim_unused(bool required) { + return hw_claim_unused_from_range((uint8_t*)&claimed, required, PICO_SPINLOCK_ID_CLAIM_FREE_FIRST, PICO_SPINLOCK_ID_CLAIM_FREE_END, "No spinlocks are available"); +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/CMakeLists.txt new file mode 100644 index 0000000000..358f74c50f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/CMakeLists.txt @@ -0,0 +1,2 @@ +pico_simple_hardware_target(timer) +target_link_libraries(hardware_timer INTERFACE hardware_claim) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/include/hardware/timer.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/include/hardware/timer.h new file mode 100644 index 0000000000..1815a2780e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/include/hardware/timer.h @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_TIMER_H +#define _HARDWARE_TIMER_H + +#include "pico.h" +#include "hardware/structs/timer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/timer.h + * \defgroup hardware_timer hardware_timer + * + * Low-level hardware timer API + * + * This API provides medium level access to the timer HW. + * See also \ref pico_time which provides higher levels functionality using the hardware timer. + * + * The timer peripheral on RP2040 supports the following features: + * - single 64-bit counter, incrementing once per microsecond + * - Latching two-stage read of counter, for race-free read over 32 bit bus + * - Four alarms: match on the lower 32 bits of counter, IRQ on match. + * + * By default the timer uses a one microsecond reference that is generated in the Watchdog (see Section 4.8.2) which is derived + * from the clk_ref. + * + * The timer has 4 alarms, and can output a separate interrupt for each alarm. The alarms match on the lower 32 bits of the 64 + * bit counter which means they can be fired a maximum of 2^32 microseconds into the future. This is equivalent to: + * - 2^32 ÷ 10^6: ~4295 seconds + * - 4295 ÷ 60: ~72 minutes + * + * The timer is expected to be used for short sleeps, if you want a longer alarm see the \ref hardware_rtc functions. + * + * \subsection timer_example Example + * \addtogroup hardware_timer + * + * \include hello_timer.c + * + * \see pico_time + */ + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_TIMER, Enable/disable assertions in the timer module, type=bool, default=0, group=hardware_timer +#ifndef PARAM_ASSERTIONS_ENABLED_TIMER +#define PARAM_ASSERTIONS_ENABLED_TIMER 0 +#endif + +static inline void check_hardware_alarm_num_param(uint alarm_num) { + invalid_params_if(TIMER, alarm_num >= NUM_TIMERS); +} + +/*! \brief Return a 32 bit timestamp value in microseconds +* \ingroup hardware_timer +* +* Returns the low 32 bits of the hardware timer. +* \note This value wraps roughly every 1 hour 11 minutes and 35 seconds. +* +* \return the 32 bit timestamp +*/ +static inline uint32_t time_us_32() { + return timer_hw->timerawl; +} + +/*! \brief Return the current 64 bit timestamp value in microseconds +* \ingroup hardware_timer +* +* Returns the full 64 bits of the hardware timer. The \ref pico_time and other functions rely on the fact that this +* value monotonically increases from power up. As such it is expected that this value counts upwards and never wraps +* (we apologize for introducing a potential year 5851444 bug). +* +* \return the 64 bit timestamp +*/ +uint64_t time_us_64(); + +/*! \brief Busy wait wasting cycles for the given (32 bit) number of microseconds + * \ingroup hardware_timer + * + * \param delay_us delay amount + */ +void busy_wait_us_32(uint32_t delay_us); + +/*! \brief Busy wait wasting cycles for the given (64 bit) number of microseconds + * \ingroup hardware_timer + * + * \param delay_us delay amount + */ +void busy_wait_us(uint64_t delay_us); + +/*! \brief Busy wait wasting cycles until after the specified timestamp + * \ingroup hardware_timer + * + * \param t Absolute time to wait until + */ +void busy_wait_until(absolute_time_t t); + +/*! \brief Check if the specified timestamp has been reached + * \ingroup hardware_timer + * + * \param t Absolute time to compare against current time + * \return true if it is now after the specified timestamp + */ +static inline bool time_reached(absolute_time_t t) { + uint64_t target = to_us_since_boot(t); + uint32_t hi_target = target >> 32u; + uint32_t hi = timer_hw->timerawh; + return (hi >= hi_target && (timer_hw->timerawl >= (uint32_t) target || hi != hi_target)); +} + +/*! Callback function type for hardware alarms + * \ingroup hardware_timer + * + * \param alarm_num the hardware alarm number + * \sa hardware_alarm_set_callback + */ +typedef void (*hardware_alarm_callback_t)(uint alarm_num); + +/*! \brief cooperatively claim the use of this hardware alarm_num + * \ingroup hardware_timer + * + * This method hard asserts if the hardware alarm is currently claimed. + * + * \param alarm_num the hardware alarm to claim + * \sa hardware_claiming + */ +void hardware_alarm_claim(uint alarm_num); + +/*! \brief cooperatively release the claim on use of this hardware alarm_num + * \ingroup hardware_timer + * + * \param alarm_num the hardware alarm to unclaim + * \sa hardware_claiming + */ +void hardware_alarm_unclaim(uint alarm_num); + +/*! \brief Enable/Disable a callback for a hardware timer on this core + * \ingroup hardware_timer + * + * This method enables/disables the alarm IRQ for the specified hardware alarm on the + * calling core, and set the specified callback to be associated with that alarm. + * + * This callback will be used for the timeout set via hardware_alarm_set_target + * + * \note This will install the handler on the current core if the IRQ handler isn't already set. + * Therefore the user has the opportunity to call this up from the core of their choice + * + * \param alarm_num the hardware alarm number + * \param callback the callback to install, or NULL to unset + * + * \sa hardware_alarm_set_target + */ +void hardware_alarm_set_callback(uint alarm_num, hardware_alarm_callback_t callback); + +/** + * \brief Set the current target for the specified hardware alarm + * + * This will replace any existing target + * + * @param alarm_num the hardware alarm number + * @param t the target timestamp + * @return true if the target was "missed"; i.e. it was in the past, or occurred before a future hardware timeout could be set + */ +bool hardware_alarm_set_target(uint alarm_num, absolute_time_t t); + +/** + * \brief Cancel an existing target (if any) for a given hardware_alarm + * + * @param alarm_num + */ + +void hardware_alarm_cancel(uint alarm_num); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/timer.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/timer.c new file mode 100644 index 0000000000..76d5f9038a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_timer/timer.c @@ -0,0 +1,207 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/timer.h" +#include "hardware/irq.h" +#include "hardware/sync.h" +#include "hardware/claim.h" + +check_hw_layout(timer_hw_t, ints, TIMER_INTS_OFFSET); + +static hardware_alarm_callback_t alarm_callbacks[NUM_TIMERS]; +static uint32_t target_hi[NUM_TIMERS]; +static uint8_t timer_callbacks_pending; + +static_assert(NUM_TIMERS <= 4, ""); +static uint8_t claimed; + +void hardware_alarm_claim(uint alarm_num) { + check_hardware_alarm_num_param(alarm_num); + hw_claim_or_assert(&claimed, alarm_num, "Hardware alarm %d already claimed"); +} + +void hardware_alarm_unclaim(uint alarm_num) { + check_hardware_alarm_num_param(alarm_num); + hw_claim_clear(&claimed, alarm_num); +} + +/// tag::time_us_64[] +uint64_t time_us_64() { + // Need to make sure that the upper 32 bits of the timer + // don't change, so read that first + uint32_t hi = timer_hw->timerawh; + uint32_t lo; + do { + // Read the lower 32 bits + lo = timer_hw->timerawl; + // Now read the upper 32 bits again and + // check that it hasn't incremented. If it has loop around + // and read the lower 32 bits again to get an accurate value + uint32_t next_hi = timer_hw->timerawh; + if (hi == next_hi) break; + hi = next_hi; + } while (true); + return ((uint64_t) hi << 32u) | lo; +} +/// end::time_us_64[] + +/// \tag::busy_wait[] +void busy_wait_us_32(uint32_t delay_us) { + if (0 <= (int32_t)delay_us) { + // we only allow 31 bits, otherwise we could have a race in the loop below with + // values very close to 2^32 + uint32_t start = timer_hw->timerawl; + while (timer_hw->timerawl - start < delay_us) { + tight_loop_contents(); + } + } else { + busy_wait_us(delay_us); + } +} + +void busy_wait_us(uint64_t delay_us) { + uint64_t base = time_us_64(); + uint64_t target = base + delay_us; + if (target < base) { + target = (uint64_t)-1; + } + absolute_time_t t; + update_us_since_boot(&t, target); + busy_wait_until(t); +} + +void busy_wait_until(absolute_time_t t) { + uint64_t target = to_us_since_boot(t); + uint32_t hi_target = target >> 32u; + uint32_t hi = timer_hw->timerawh; + while (hi < hi_target) { + hi = timer_hw->timerawh; + tight_loop_contents(); + } + while (hi == hi_target && timer_hw->timerawl < (uint32_t) target) { + hi = timer_hw->timerawh; + tight_loop_contents(); + } +} +/// \end::busy_wait[] + +static inline uint harware_alarm_irq_number(uint alarm_num) { + return TIMER_IRQ_0 + alarm_num; +} + +static void hardware_alarm_irq_handler() { + // Determine which timer this IRQ is for + uint32_t ipsr; + __asm volatile ("mrs %0, ipsr" : "=r" (ipsr)::); + uint alarm_num = (ipsr & 0x3fu) - 16 - TIMER_IRQ_0; + check_hardware_alarm_num_param(alarm_num); + + hardware_alarm_callback_t callback = NULL; + + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); + uint32_t save = spin_lock_blocking(lock); + // Clear the timer IRQ (inside lock, because we check whether we have handled the IRQ yet in alarm_set by looking at the interrupt status + timer_hw->intr = 1u << alarm_num; + + // make sure the IRQ is still valid + if (timer_callbacks_pending & (1u << alarm_num)) { + // Now check whether we have a timer event to handle that isn't already obsolete (this could happen if we + // were already in the IRQ handler before someone else changed the timer setup + if (timer_hw->timerawh >= target_hi[alarm_num]) { + // we have reached the right high word as well as low word value + callback = alarm_callbacks[alarm_num]; + timer_callbacks_pending &= ~(1u << alarm_num); + } else { + // try again in 2^32 us + timer_hw->alarm[alarm_num] = timer_hw->alarm[alarm_num]; // re-arm the timer + } + } + + spin_unlock(lock, save); + + if (callback) { + callback(alarm_num); + } +} + +void hardware_alarm_set_callback(uint alarm_num, hardware_alarm_callback_t callback) { + // todo check current core owner + // note this should probably be subsumed by irq_set_exclusive_handler anyway, since that + // should disallow IRQ handlers on both cores + check_hardware_alarm_num_param(alarm_num); + uint irq_num = harware_alarm_irq_number(alarm_num); + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); + uint32_t save = spin_lock_blocking(lock); + if (callback) { + if (hardware_alarm_irq_handler != irq_get_vtable_handler(irq_num)) { + // note that set_exclusive will silently allow you to set the handler to the same thing + // since it is idempotent, which means we don't need to worry about locking ourselves + irq_set_exclusive_handler(irq_num, hardware_alarm_irq_handler); + irq_set_enabled(irq_num, true); + // Enable interrupt in block and at processor + hw_set_bits(&timer_hw->inte, 1u << alarm_num); + } + alarm_callbacks[alarm_num] = callback; + } else { + alarm_callbacks[alarm_num] = NULL; + timer_callbacks_pending &= ~(1u << alarm_num); + irq_remove_handler(irq_num, hardware_alarm_irq_handler); + irq_set_enabled(irq_num, false); + } + spin_unlock(lock, save); +} + +bool hardware_alarm_set_target(uint alarm_num, absolute_time_t target) { + bool missed; + uint64_t now = time_us_64(); + uint64_t t = to_us_since_boot(target); + if (now >= t) { + missed = true; + } else { + missed = false; + + // 1) actually set the hardware timer + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); + uint32_t save = spin_lock_blocking(lock); + timer_hw->intr = 1u << alarm_num; + timer_callbacks_pending |= 1u << alarm_num; + timer_hw->alarm[alarm_num] = (uint32_t) t; + // Set the alarm. Writing time should arm it + target_hi[alarm_num] = t >> 32u; + + // 2) check for races + if (!(timer_hw->armed & 1u << alarm_num)) { + // not armed, so has already fired .. IRQ must be pending (we are still under lock) + assert(timer_hw->ints & 1u << alarm_num); + } else { + if (time_us_64() >= t) { + // ok well it is time now; the irq isn't being handled yet because of the spin lock + // however the other core might be in the IRQ handler itself about to do a callback + // we do the firing ourselves (and indicate to the IRQ handler if any that it shouldn't + missed = true; + // disarm the timer + timer_hw->armed = 1u << alarm_num; + timer_hw->intr = 1u << alarm_num; // clear the IRQ too + // and set flag in case we're already in the IRQ handler waiting on the spinlock (on the other core) + timer_callbacks_pending &= ~(1u << alarm_num); + } + } + spin_unlock(lock, save); + } + return missed; +} + +void hardware_alarm_cancel(uint alarm_num) { + check_hardware_alarm_num_param(alarm_num); + + spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); + uint32_t save = spin_lock_blocking(lock); + timer_hw->armed = 1u << alarm_num; + timer_callbacks_pending &= ~(1u << alarm_num); + spin_unlock(lock, save); +} + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/CMakeLists.txt new file mode 100644 index 0000000000..9fe65d5422 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(uart) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/include/hardware/uart.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/include/hardware/uart.h new file mode 100644 index 0000000000..2092b7d9ae --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/include/hardware/uart.h @@ -0,0 +1,432 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_UART_H +#define _HARDWARE_UART_H + +#include "pico.h" +#include "hardware/structs/uart.h" + +// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_UART, Enable/disable assertions in the UART module, type=bool, default=0, group=hardware_uart +#ifndef PARAM_ASSERTIONS_ENABLED_UART +#define PARAM_ASSERTIONS_ENABLED_UART 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// PICO_CONFIG: PICO_UART_ENABLE_CRLF_SUPPORT, Enable/disable CR/LF translation support, type=bool, default=1, group=hardware_uart +#ifndef PICO_UART_ENABLE_CRLF_SUPPORT +#define PICO_UART_ENABLE_CRLF_SUPPORT 1 +#endif + +// PICO_CONFIG: PICO_UART_DEFAULT_CRLF, Enable/disable CR/LF translation on UART, type=bool, default=0, depends=PICO_UART_ENABLE_CRLF_SUPPORT, group=hardware_uart +#ifndef PICO_UART_DEFAULT_CRLF +#define PICO_UART_DEFAULT_CRLF 0 +#endif + +// PICO_CONFIG: PICO_DEFAULT_UART, Define the default UART used for printf etc, default=0, group=hardware_uart +#ifndef PICO_DEFAULT_UART +#define PICO_DEFAULT_UART 0 ///< Default UART instance +#endif + +// PICO_CONFIG: PICO_DEFAULT_UART_BAUD_RATE, Define the default UART baudrate, max=921600, default=115200, group=hardware_uart +#ifndef PICO_DEFAULT_UART_BAUD_RATE +#define PICO_DEFAULT_UART_BAUD_RATE 115200 ///< Default baud rate +#endif + +// PICO_CONFIG: PICO_DEFAULT_UART_TX_PIN, Define the default UART TX pin, min=0, max=29, default=0, group=hardware_uart +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 0 ///< Default TX pin +#endif + +// PICO_CONFIG: PICO_DEFAULT_UART_RX_PIN, Define the default UART RX pin, min=0, max=29, default=1, group=hardware_uart +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 1 ///< Default RX pin +#endif + +/** \file hardware/uart.h + * \defgroup hardware_uart hardware_uart + * + * Hardware UART API + * + * RP2040 has 2 identical instances of a UART peripheral, based on the ARM PL011. Each UART can be connected to a number + * of GPIO pins as defined in the GPIO muxing. + * + * Only the TX, RX, RTS, and CTS signals are + * connected, meaning that the modem mode and IrDA mode of the PL011 are not supported. + * + * \subsection uart_example Example + * \addtogroup hardware_uart + * + * \code + * int main() { + * + * // Initialise UART 0 + * uart_init(uart0, 115200); + * + * // Set the GPIO pin mux to the UART - 0 is TX, 1 is RX + * gpio_set_function(0, GPIO_FUNC_UART); + * gpio_set_function(1, GPIO_FUNC_UART); + * + * uart_puts(uart0, "Hello world!"); + * } + * \endcode + */ + +// Currently always a pointer to hw but it might not be in the future +typedef struct uart_inst uart_inst_t; + +/** The UART identifiers for use in UART functions. + * + * e.g. uart_init(uart1, 48000) + * + * \ingroup hardware_uart + * @{ + */ +#define uart0 ((uart_inst_t * const)uart0_hw) ///< Identifier for UART instance 0 +#define uart1 ((uart_inst_t * const)uart1_hw) ///< Identifier for UART instance 1 + +/** @} */ + +#ifndef PICO_DEFAULT_UART_INSTANCE +#define PICO_DEFAULT_UART_INSTANCE (__CONCAT(uart,PICO_DEFAULT_UART)) +#endif + +#define uart_default PICO_DEFAULT_UART_INSTANCE + +/*! \brief Convert UART instance to hardware instance number + * \ingroup hardware_uart + * + * \param uart UART instance + * \return Number of UART, 0 or 1. + */ +static inline uint uart_get_index(uart_inst_t *uart) { + invalid_params_if(UART, uart != uart0 && uart != uart1); + return uart == uart1 ? 1 : 0; +} + +static inline uart_hw_t *uart_get_hw(uart_inst_t *uart) { + uart_get_index(uart); // check it is a hw uart + return (uart_hw_t *)uart; +} + +/** \brief UART Parity enumeration + * \ingroup hardware_uart + */ +typedef enum { + UART_PARITY_NONE, + UART_PARITY_EVEN, + UART_PARITY_ODD +} uart_parity_t; + +// ---------------------------------------------------------------------------- +// Setup + +/*! \brief Initialise a UART + * \ingroup hardware_uart + * + * Put the UART into a known state, and enable it. Must be called before other + * functions. + * + * \note There is no guarantee that the baudrate requested will be possible, the nearest will be chosen, + * and this function will return the configured baud rate. + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param baudrate Baudrate of UART in Hz + * \return Actual set baudrate + */ +uint uart_init(uart_inst_t *uart, uint baudrate); + +/*! \brief DeInitialise a UART + * \ingroup hardware_uart + * + * Disable the UART if it is no longer used. Must be reinitialised before + * being used again. + * + * \param uart UART instance. \ref uart0 or \ref uart1 + */ +void uart_deinit(uart_inst_t *uart); + +/*! \brief Set UART baud rate + * \ingroup hardware_uart + * + * Set baud rate as close as possible to requested, and return actual rate selected. + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param baudrate Baudrate in Hz + */ +uint uart_set_baudrate(uart_inst_t *uart, uint baudrate); + +/*! \brief Set UART flow control CTS/RTS + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param cts If true enable flow control of TX by clear-to-send input + * \param rts If true enable assertion of request-to-send output by RX flow control + */ +static inline void uart_set_hw_flow(uart_inst_t *uart, bool cts, bool rts) { + hw_write_masked(&uart_get_hw(uart)->cr, + (!!cts << UART_UARTCR_CTSEN_LSB) | (!!rts << UART_UARTCR_RTSEN_LSB), + UART_UARTCR_RTSEN_BITS | UART_UARTCR_CTSEN_BITS); +} + +/*! \brief Set UART data format + * \ingroup hardware_uart + * + * Configure the data format (bits etc() for the UART + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param data_bits Number of bits of data. 5..8 + * \param stop_bits Number of stop bits 1..2 + * \param parity Parity option. + */ +static inline void uart_set_format(uart_inst_t *uart, uint data_bits, uint stop_bits, uart_parity_t parity) { + invalid_params_if(UART, data_bits < 5 || data_bits > 8); + invalid_params_if(UART, stop_bits != 1 && stop_bits != 2); + invalid_params_if(UART, parity != UART_PARITY_NONE && parity != UART_PARITY_EVEN && parity != UART_PARITY_ODD); + hw_write_masked(&uart_get_hw(uart)->lcr_h, + ((data_bits - 5) << UART_UARTLCR_H_WLEN_LSB) | + ((stop_bits - 1) << UART_UARTLCR_H_STP2_LSB) | + ((parity != UART_PARITY_NONE) << UART_UARTLCR_H_PEN_LSB) | + ((parity == UART_PARITY_EVEN) << UART_UARTLCR_H_EPS_LSB), + UART_UARTLCR_H_WLEN_BITS | + UART_UARTLCR_H_STP2_BITS | + UART_UARTLCR_H_PEN_BITS | + UART_UARTLCR_H_EPS_BITS); +} + +/*! \brief Setup UART interrupts + * \ingroup hardware_uart + * + * Enable the UART's interrupt output. An interrupt handler will need to be installed prior to calling + * this function. + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param rx_has_data If true an interrupt will be fired when the RX FIFO contain data. + * \param tx_needs_data If true an interrupt will be fired when the TX FIFO needs data. + */ +static inline void uart_set_irq_enables(uart_inst_t *uart, bool rx_has_data, bool tx_needs_data) { + uart_get_hw(uart)->imsc = (!!tx_needs_data << UART_UARTIMSC_TXIM_LSB) | + (!!rx_has_data << UART_UARTIMSC_RXIM_LSB); + if (rx_has_data) { + // Set minimum threshold + hw_write_masked(&uart_get_hw(uart)->ifls, 0 << UART_UARTIFLS_RXIFLSEL_LSB, + UART_UARTIFLS_RXIFLSEL_BITS); + } + if (tx_needs_data) { + // Set maximum threshold + hw_write_masked(&uart_get_hw(uart)->ifls, 0 << UART_UARTIFLS_TXIFLSEL_LSB, + UART_UARTIFLS_TXIFLSEL_BITS); + } +} + +/*! \brief Test if specific UART is enabled + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \return true if the UART is enabled + */ +static inline bool uart_is_enabled(uart_inst_t *uart) { + return !!(uart_get_hw(uart)->cr & UART_UARTCR_UARTEN_BITS); +} + +/*! \brief Enable/Disable the FIFOs on specified UART + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param enabled true to enable FIFO (default), false to disable + */ +static inline void uart_set_fifo_enabled(uart_inst_t *uart, bool enabled) { + hw_write_masked(&uart_get_hw(uart)->lcr_h, + (!!enabled << UART_UARTLCR_H_FEN_LSB), + UART_UARTLCR_H_FEN_BITS); +} + + +// ---------------------------------------------------------------------------- +// Generic input/output + +/*! \brief Determine if space is available in the TX FIFO + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \return false if no space available, true otherwise + */ +static inline bool uart_is_writable(uart_inst_t *uart) { + return !(uart_get_hw(uart)->fr & UART_UARTFR_TXFF_BITS); +} + +/*! \brief Wait for the UART TX fifo to be drained + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + */ +static inline void uart_tx_wait_blocking(uart_inst_t *uart) { + while (uart_get_hw(uart)->fr & UART_UARTFR_BUSY_BITS) tight_loop_contents(); +} + +/*! \brief Determine whether data is waiting in the RX FIFO + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \return 0 if no data available, otherwise the number of bytes, at least, that can be read + * + * \note HW limitations mean this function will return either 0 or 1. + */ +static inline bool uart_is_readable(uart_inst_t *uart) { + // PL011 doesn't expose levels directly, so return values are only 0 or 1 + return !(uart_get_hw(uart)->fr & UART_UARTFR_RXFE_BITS); +} + +/*! \brief Write to the UART for transmission. + * \ingroup hardware_uart + * + * This function will block until all the data has been sent to the UART + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param src The bytes to send + * \param len The number of bytes to send + */ +static inline void uart_write_blocking(uart_inst_t *uart, const uint8_t *src, size_t len) { + for (size_t i = 0; i < len; ++i) { + while (!uart_is_writable(uart)) + tight_loop_contents(); + uart_get_hw(uart)->dr = *src++; + } +} + +/*! \brief Read from the UART + * \ingroup hardware_uart + * + * This function will block until all the data has been received from the UART + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param dst Buffer to accept received bytes + * \param len The number of bytes to receive. + */ +static inline void uart_read_blocking(uart_inst_t *uart, uint8_t *dst, size_t len) { + for (size_t i = 0; i < len; ++i) { + while (!uart_is_readable(uart)) + tight_loop_contents(); + *dst++ = uart_get_hw(uart)->dr; + } +} + +// ---------------------------------------------------------------------------- +// UART-specific operations and aliases + +/*! \brief Write single character to UART for transmission. + * \ingroup hardware_uart + * + * This function will block until all the character has been sent + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param c The character to send + */ +static inline void uart_putc_raw(uart_inst_t *uart, char c) { + uart_write_blocking(uart, (const uint8_t *) &c, 1); +} + +/*! \brief Write single character to UART for transmission, with optional CR/LF conversions + * \ingroup hardware_uart + * + * This function will block until the character has been sent + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param c The character to send + */ +static inline void uart_putc(uart_inst_t *uart, char c) { +#if PICO_UART_ENABLE_CRLF_SUPPORT + extern short uart_char_to_line_feed[NUM_UARTS]; + if (uart_char_to_line_feed[uart_get_index(uart)] == c) + uart_putc_raw(uart, '\r'); +#endif + uart_putc_raw(uart, c); +} + +/*! \brief Write string to UART for transmission, doing any CR/LF conversions + * \ingroup hardware_uart + * + * This function will block until the entire string has been sent + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param s The null terminated string to send + */ +static inline void uart_puts(uart_inst_t *uart, const char *s) { +#if PICO_UART_ENABLE_CRLF_SUPPORT + bool last_was_cr = false; + while (*s) { + // Don't add extra carriage returns if one is present + if (last_was_cr) + uart_putc_raw(uart, *s); + else + uart_putc(uart, *s); + last_was_cr = *s++ == '\r'; + } +#else + while (*s) + uart_putc(uart, *s++); +#endif +} + +/*! \brief Read a single character to UART + * \ingroup hardware_uart + * + * This function will block until the character has been read + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \return The character read. + */ +static inline char uart_getc(uart_inst_t *uart) { + char c; + uart_read_blocking(uart, (uint8_t *) &c, 1); + return c; +} + +/*! \brief Assert a break condition on the UART transmission. + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param en Assert break condition (TX held low) if true. Clear break condition if false. + */ +static inline void uart_set_break(uart_inst_t *uart, bool en) { + if (en) + hw_set_bits(&uart_get_hw(uart)->lcr_h, UART_UARTLCR_H_BRK_BITS); + else + hw_clear_bits(&uart_get_hw(uart)->lcr_h, UART_UARTLCR_H_BRK_BITS); +} + +/*! \brief Set CR/LF conversion on UART + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param translate If true, convert line feeds to carriage return on transmissions + */ +void uart_set_translate_crlf(uart_inst_t *uart, bool translate); + +/*! \brief Wait for the default UART'S TX fifo to be drained + * \ingroup hardware_uart + */ +static inline void uart_default_tx_wait_blocking() { + uart_tx_wait_blocking(uart_default); +} + +/*! \brief Wait for up to a certain number of microseconds for the RX FIFO to be non empty + * \ingroup hardware_uart + * + * \param uart UART instance. \ref uart0 or \ref uart1 + * \param us the number of microseconds to wait at most (may be 0 for an instantaneous check) + * \return true if the RX FIFO became non empty before the timeout, false otherwise + */ +bool uart_is_readable_within_us(uart_inst_t *uart, uint32_t us); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/uart.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/uart.c new file mode 100644 index 0000000000..dbd4c2ddf2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_uart/uart.c @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/address_mapped.h" +#include "hardware/platform_defs.h" +#include "hardware/uart.h" + +#include "hardware/structs/uart.h" +#include "hardware/resets.h" +#include "hardware/clocks.h" +#include "hardware/timer.h" + +#include "pico/assert.h" +#include "pico.h" + +check_hw_layout(uart_hw_t, fr, UART_UARTFR_OFFSET); +check_hw_layout(uart_hw_t, dmacr, UART_UARTDMACR_OFFSET); + +#if PICO_UART_ENABLE_CRLF_SUPPORT +short uart_char_to_line_feed[NUM_UARTS]; +#endif + +/// \tag::uart_reset[] +static inline void uart_reset(uart_inst_t *uart) { + invalid_params_if(UART, uart != uart0 && uart != uart1); + reset_block(uart_get_index(uart) ? RESETS_RESET_UART1_BITS : RESETS_RESET_UART0_BITS); +} + +static inline void uart_unreset(uart_inst_t *uart) { + invalid_params_if(UART, uart != uart0 && uart != uart1); + unreset_block_wait(uart_get_index(uart) ? RESETS_RESET_UART1_BITS : RESETS_RESET_UART0_BITS); +} +/// \end::uart_reset[] + +/// \tag::uart_init[] +uint uart_init(uart_inst_t *uart, uint baudrate) { + invalid_params_if(UART, uart != uart0 && uart != uart1); + + if (clock_get_hz(clk_peri) == 0) + return 0; + + uart_reset(uart); + uart_unreset(uart); + +#if PICO_UART_ENABLE_CRLF_SUPPORT + uart_set_translate_crlf(uart, PICO_UART_DEFAULT_CRLF); +#endif + + // Any LCR writes need to take place before enabling the UART + uint baud = uart_set_baudrate(uart, baudrate); + uart_set_format(uart, 8, 1, UART_PARITY_NONE); + + // Enable the UART, both TX and RX + uart_get_hw(uart)->cr = UART_UARTCR_UARTEN_BITS | UART_UARTCR_TXE_BITS | UART_UARTCR_RXE_BITS; + // Enable FIFOs + hw_set_bits(&uart_get_hw(uart)->lcr_h, UART_UARTLCR_H_FEN_BITS); + // Always enable DREQ signals -- no harm in this if DMA is not listening + uart_get_hw(uart)->dmacr = UART_UARTDMACR_TXDMAE_BITS | UART_UARTDMACR_RXDMAE_BITS; + + return baud; +} +/// \end::uart_init[] + +void uart_deinit(uart_inst_t *uart) { + invalid_params_if(UART, uart != uart0 && uart != uart1); + uart_reset(uart); +} + +/// \tag::uart_set_baudrate[] +uint uart_set_baudrate(uart_inst_t *uart, uint baudrate) { + invalid_params_if(UART, baudrate == 0); + uint32_t baud_rate_div = (8 * clock_get_hz(clk_peri) / baudrate); + uint32_t baud_ibrd = baud_rate_div >> 7; + uint32_t baud_fbrd = ((baud_rate_div & 0x7f) + 1) / 2; + invalid_params_if(UART, (baud_ibrd > 65535) || (baud_ibrd == 0)); + + // Load PL011's baud divisor registers + uart_get_hw(uart)->ibrd = baud_ibrd; + if (baud_ibrd == 65535) { + uart_get_hw(uart)->fbrd = 0; + } else { + uart_get_hw(uart)->fbrd = baud_fbrd; + } + + // PL011 needs a (dummy) line control register write to latch in the + // divisors. We don't want to actually change LCR contents here. + hw_set_bits(&uart_get_hw(uart)->lcr_h, 0); + + // See datasheet + uint baud = (4 * clock_get_hz(clk_peri)) / (64 * baud_ibrd + baud_fbrd); + return baud; +} +/// \end::uart_set_baudrate[] + +void uart_set_translate_crlf(uart_inst_t *uart, bool crlf) { +#if PICO_UART_ENABLE_CRLF_SUPPORT + uart_char_to_line_feed[uart_get_index(uart)] = crlf ? '\n' : 0x100; +#else + panic_unsupported(); +#endif +} + +bool uart_is_readable_within_us(uart_inst_t *uart, uint32_t us) { + uint32_t t = time_us_32(); + do { + if (uart_is_readable(uart)) return true; + } while ((time_us_32() - t) <= us); + return false; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/CMakeLists.txt new file mode 100644 index 0000000000..9a5b1507e6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(vreg) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/include/hardware/vreg.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/include/hardware/vreg.h new file mode 100644 index 0000000000..7b4e259865 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/include/hardware/vreg.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_VREG_H_ +#define _HARDWARE_VREG_H_ + +#include "pico.h" +#include "hardware/structs/vreg_and_chip_reset.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file vreg.h + * \defgroup hardware_vreg hardware_vreg + * + * Voltage Regulation API + * + */ + +/** Possible voltage values that can be applied to the regulator + */ +enum vreg_voltage { + VREG_VOLTAGE_0_85 = 0b0110, ///< 0.85v + VREG_VOLTAGE_0_90 = 0b0111, ///< 0.90v + VREG_VOLTAGE_0_95 = 0b1000, ///< 0.95v + VREG_VOLTAGE_1_00 = 0b1001, ///< 1.00v + VREG_VOLTAGE_1_05 = 0b1010, ///< 1.05v + VREG_VOLTAGE_1_10 = 0b1011, ///< 1.10v + VREG_VOLTAGE_1_15 = 0b1100, ///< 1.15v + VREG_VOLTAGE_1_20 = 0b1101, ///< 1.20v + VREG_VOLTAGE_1_25 = 0b1110, ///< 1.25v + VREG_VOLTAGE_1_30 = 0b1111, ///< 1.30v + + VREG_VOLTAGE_MIN = VREG_VOLTAGE_0_85, ///< Always the minimum possible voltage + VREG_VOLTAGE_DEFAULT = VREG_VOLTAGE_1_10, ///< Default voltage on power up. + VREG_VOLTAGE_MAX = VREG_VOLTAGE_1_30, ///< Always the maximum possible voltage +}; + + +/*! \brief Set voltage + * \ingroup hardware_vreg + * + * \param voltage The voltage (from enumeration \ref vreg_voltage) to apply to the voltage regulator + **/ +void vreg_set_voltage(enum vreg_voltage voltage); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/vreg.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/vreg.c new file mode 100644 index 0000000000..654ab5af3d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_vreg/vreg.c @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" +#include "hardware/vreg.h" + +void vreg_set_voltage(enum vreg_voltage voltage) { + hw_write_masked(&vreg_and_chip_reset_hw->vreg, voltage << VREG_AND_CHIP_RESET_VREG_VSEL_LSB, VREG_AND_CHIP_RESET_VREG_VSEL_BITS); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/CMakeLists.txt new file mode 100644 index 0000000000..43a401b11f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(watchdog) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h new file mode 100644 index 0000000000..ae5ccdc863 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_WATCHDOG_H +#define _HARDWARE_WATCHDOG_H + +#include "pico.h" + +/** \file hardware/watchdog.h + * \defgroup hardware_watchdog hardware_watchdog + * + * Hardware Watchdog Timer API + * + * Supporting functions for the Pico hardware watchdog timer. + * + * The RP2040 has a built in HW watchdog Timer. This is a countdown timer that can restart parts of the chip if it reaches zero. + * For example, this can be used to restart the processor if the software running on it gets stuck in an infinite loop + * or similar. The programmer has to periodically write a value to the watchdog to stop it reaching zero. + * + * \subsection watchdog_example Example + * \addtogroup hardware_watchdog + * \include hello_watchdog.c + */ + +/*! \brief Define actions to perform at watchdog timeout + * \ingroup hardware_watchdog + * + * \note If \ref watchdog_start_tick value does not give a 1MHz clock to the watchdog system, then the \ref delay_ms + * parameter will not be in microseconds. See the datasheet for more details. + * + * By default the SDK assumes a 12MHz XOSC and sets the \ref watchdog_start_tick appropriately. + * + * \param pc If Zero, a standard boot will be performed, if non-zero this is the program counter to jump to on reset. + * \param sp If \p pc is non-zero, this will be the stack pointer used. + * \param delay_ms Initial load value. Maximum value 0x7fffff, approximately 8.3s. + */ +void watchdog_reboot(uint32_t pc, uint32_t sp, uint32_t delay_ms); + +/*! \brief Start the watchdog tick + * \ingroup hardware_watchdog + * + * \param cycles This needs to be a divider that when applied to the XOSC input, produces a 1MHz clock. So if the XOSC is + * 12MHz, this will need to be 12. + */ +void watchdog_start_tick(uint cycles); + +/*! \brief Reload the watchdog counter with the amount of time set in watchdog_enable + * \ingroup hardware_watchdog + * + */ +void watchdog_update(void); + +/** + * \brief Enable the watchdog + * \ingroup hardware_watchdog + * + * \note If \ref watchdog_start_tick value does not give a 1MHz clock to the watchdog system, then the \ref delay_ms + * parameter will not be in microseconds. See the datasheet for more details. + * + * By default the SDK assumes a 12MHz XOSC and sets the \ref watchdog_start_tick appropriately. + * + * \param delay_ms Number of milliseconds before watchdog will reboot without watchdog_update being called. Maximum of 0x7fffff, which is approximately 8.3 seconds + * \param pause_on_debug If the watchdog should be paused when the debugger is stepping through code + */ +void watchdog_enable(uint32_t delay_ms, bool pause_on_debug); + +/** + * \brief Did the watchdog cause the last reboot? + * \ingroup hardware_watchdog + * + * @return true if the watchdog timer or a watchdog force caused the last reboot + * @return false there has been no watchdog reboot since run has been + */ +bool watchdog_caused_reboot(void); + +/** + * @brief Returns the number of microseconds before the watchdog will reboot the chip. + * \ingroup hardware_watchdog + * + * @return The number of microseconds before the watchdog will reboot the chip. + */ +uint32_t watchdog_get_count(void); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c new file mode 100644 index 0000000000..36031aaffc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +#include "hardware/watchdog.h" +#include "hardware/structs/watchdog.h" +#include "hardware/structs/psm.h" + +/// \tag::watchdog_start_tick[] +void watchdog_start_tick(uint cycles) { + // Important: This function also provides a tick reference to the timer + watchdog_hw->tick = cycles | WATCHDOG_TICK_ENABLE_BITS; +} +/// \end::watchdog_start_tick[] + +// Value to load when updating the watchdog + +// tag::watchdog_update[] +static uint32_t load_value; + +void watchdog_update(void) { + watchdog_hw->load = load_value; +} +// end::watchdog_update[] + +uint32_t watchdog_get_count(void) { + return (watchdog_hw->ctrl & WATCHDOG_CTRL_TIME_BITS) / 2 ; +} + +// tag::watchdog_enable[] +// Helper function used by both watchdog_enable and watchdog_reboot +void _watchdog_enable(uint32_t delay_ms, bool pause_on_debug) { + hw_clear_bits(&watchdog_hw->ctrl, WATCHDOG_CTRL_ENABLE_BITS); + + // Reset everything apart from ROSC and XOSC + hw_set_bits(&psm_hw->wdsel, PSM_WDSEL_BITS & ~(PSM_WDSEL_ROSC_BITS | PSM_WDSEL_XOSC_BITS)); + + uint32_t dbg_bits = WATCHDOG_CTRL_PAUSE_DBG0_BITS | + WATCHDOG_CTRL_PAUSE_DBG1_BITS | + WATCHDOG_CTRL_PAUSE_JTAG_BITS; + + if (pause_on_debug) { + hw_set_bits(&watchdog_hw->ctrl, dbg_bits); + } else { + hw_clear_bits(&watchdog_hw->ctrl, dbg_bits); + } + + if (!delay_ms) delay_ms = 50; + + // Note, we have x2 here as the watchdog HW currently decrements twice per tick + load_value = delay_ms * 1000 * 2; + + if (load_value > 0xffffffu) + load_value = 0xffffffu; + + + watchdog_update(); + + hw_set_bits(&watchdog_hw->ctrl, WATCHDOG_CTRL_ENABLE_BITS); +} +// end::watchdog_enable[] + +void watchdog_enable(uint32_t delay_ms, bool pause_on_debug) { + // This watchdog enable doesn't reboot so clear scratch register + // with magic word to jump into code + watchdog_hw->scratch[4] = 0; + _watchdog_enable(delay_ms, pause_on_debug); +} + +void watchdog_reboot(uint32_t pc, uint32_t sp, uint32_t delay_ms) { + check_hw_layout(watchdog_hw_t, scratch[7], WATCHDOG_SCRATCH7_OFFSET); + + // Clear enable before setting up scratch registers + hw_clear_bits(&watchdog_hw->ctrl, WATCHDOG_CTRL_ENABLE_BITS); + + if (pc) { + pc |= 1u; // thumb mode + watchdog_hw->scratch[4] = 0xb007c0d3; + watchdog_hw->scratch[5] = pc ^ -0xb007c0d3; + watchdog_hw->scratch[6] = sp; + watchdog_hw->scratch[7] = pc; +// printf("rebooting %08x/%08x in %dms...\n", (uint) pc, (uint) sp, (uint) delay_ms); + } else { + watchdog_hw->scratch[4] = 0; +// printf("rebooting (regular)) in %dms...\n", (uint) delay_ms); + } + + // Don't pause watchdog for debug + _watchdog_enable(delay_ms, 0); +} + +bool watchdog_caused_reboot(void) { + // If any reason bits are set this is true + return watchdog_hw->reason; +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/CMakeLists.txt new file mode 100644 index 0000000000..50e86c2339 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/CMakeLists.txt @@ -0,0 +1 @@ +pico_simple_hardware_target(xosc) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/include/hardware/xosc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/include/hardware/xosc.h new file mode 100644 index 0000000000..0aa0842dbc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/include/hardware/xosc.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _HARDWARE_XOSC_H_ +#define _HARDWARE_XOSC_H_ + +#include "pico.h" +#include "hardware/structs/xosc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file hardware/xosc.h + * \defgroup hardware_xosc hardware_xosc + * + * Crystal Oscillator (XOSC) API + */ + +/*! \brief Initialise the crystal oscillator system + * \ingroup hardware_xosc + * + * This function will block until the crystal oscillator has stabilised. + **/ +void xosc_init(void); + +/*! \brief Disable the Crystal oscillator + * \ingroup hardware_xosc + * + * Turns off the crystal oscillator source, and waits for it to become unstable + **/ +void xosc_disable(void); + +/*! \brief Set the crystal oscillator system to dormant + * \ingroup hardware_xosc + * + * Turns off the crystal oscillator until it is woken by an interrupt. This will block and hence + * the entire system will stop, until an interrupt wakes it up. This function will + * continue to block until the oscillator becomes stable after its wakeup. + **/ +void xosc_dormant(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/xosc.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/xosc.c new file mode 100644 index 0000000000..977f0bdc00 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/hardware_xosc/xosc.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" + +// For MHZ definitions etc +#include "hardware/clocks.h" + +#include "hardware/platform_defs.h" +#include "hardware/regs/xosc.h" +#include "hardware/structs/xosc.h" + +void xosc_init(void) { + // Assumes 1-15 MHz input + assert(XOSC_MHZ <= 15); + xosc_hw->ctrl = XOSC_CTRL_FREQ_RANGE_VALUE_1_15MHZ; + + // Set xosc startup delay + uint32_t startup_delay = (((12 * MHZ) / 1000) + 128) / 256; + xosc_hw->startup = startup_delay; + + // Set the enable bit now that we have set freq range and startup delay + hw_set_bits(&xosc_hw->ctrl, XOSC_CTRL_ENABLE_VALUE_ENABLE << XOSC_CTRL_ENABLE_LSB); + + // Wait for XOSC to be stable + while(!(xosc_hw->status & XOSC_STATUS_STABLE_BITS)); +} + +void xosc_disable(void) { + uint32_t tmp = xosc_hw->ctrl; + tmp &= (~XOSC_CTRL_ENABLE_BITS); + tmp |= (XOSC_CTRL_ENABLE_VALUE_DISABLE << XOSC_CTRL_ENABLE_LSB); + xosc_hw->ctrl = tmp; + // Wait for stable to go away + while(xosc_hw->status & XOSC_STATUS_STABLE_BITS); +} + +void xosc_dormant(void) { + // WARNING: This stops the xosc until woken up by an irq + xosc_hw->dormant = XOSC_DORMANT_VALUE_DORMANT; + // Wait for it to become stable once woken up + while(!(xosc_hw->status & XOSC_STATUS_STABLE_BITS)); +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/CMakeLists.txt new file mode 100644 index 0000000000..7e5f2b97c7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/CMakeLists.txt @@ -0,0 +1,57 @@ +if (NOT TARGET pico_bit_ops) + #shims for ROM functions for -lgcc functions (listed below) + add_library(pico_bit_ops INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_bit_ops_compiler INTERFACE) + # PICO_BUILD_DEFINE: PICO_BIT_OPS_COMPILER, whether compiler provided bit_ops bit functions support is being used, type=bool, default=0, but dependent on CMake options, group=pico_bit_ops + target_compile_definitions(pico_bit_ops_compiler INTERFACE + PICO_BIT_OPS_COMPILER=1 + ) + + # add alias "default" which is just pico. + add_library(pico_bit_ops_default INTERFACE) + target_link_libraries(pico_bit_ops_default INTERFACE pico_bit_ops_pico) + + set(PICO_DEFAULT_BIT_OPS_IMPL pico_bit_ops_default) + + add_library(pico_bit_ops_pico INTERFACE) + target_link_libraries(pico_bit_ops INTERFACE + $>,$,${PICO_DEFAULT_BIT_OPS_IMPL}>) + + # PICO_BUILD_DEFINE: PICO_BIT_OPS_PICO, whether optimized pico/bootrom provided bit_ops bit functions support is being used, type=bool, default=1, but dependent on CMake options, group=pico_bit_ops + target_compile_definitions(pico_bit_ops_pico INTERFACE + PICO_BIT_OPS_PICO=1 + ) + + target_sources(pico_bit_ops_pico INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/bit_ops_aeabi.S + ) + + target_link_libraries(pico_bit_ops_pico INTERFACE pico_bootrom pico_bit_ops_headers) + + # gcc + pico_wrap_function(pico_bit_ops_pico __clzsi2) + pico_wrap_function(pico_bit_ops_pico __clzsi2) + pico_wrap_function(pico_bit_ops_pico __clzdi2) + pico_wrap_function(pico_bit_ops_pico __ctzsi2) + pico_wrap_function(pico_bit_ops_pico __ctzdi2) + pico_wrap_function(pico_bit_ops_pico __popcountsi2) + pico_wrap_function(pico_bit_ops_pico __popcountdi2) + + # armclang + pico_wrap_function(pico_bit_ops_pico __clz) + pico_wrap_function(pico_bit_ops_pico __clzl) + pico_wrap_function(pico_bit_ops_pico __clzsi2) + pico_wrap_function(pico_bit_ops_pico __clzll) + + macro(pico_set_bit_ops_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_BIT_OPS_IMPL "pico_bit_ops_${IMPL}") + else() + message(FATAL_ERROR "bit_ops implementation must be set on executable not library") + endif() + endmacro() + +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S new file mode 100644 index 0000000000..7c0b42cc67 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +.syntax unified +.cpu cortex-m0plus +.thumb + +#include "pico/asm_helper.S" +__pre_init __aeabi_bits_init, 00010 + +.macro bits_section name +#if PICO_BITS_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +.section .data.aeabi_bits_funcs +.global aeabi_bits_funcs, aeabi_bits_funcs_end +.equ BITS_FUNC_COUNT, 4 +.align 4 +aeabi_bits_funcs: + .word rom_table_code('P','3') // popcount32 + .word rom_table_code('L','3') // clz32 + .word rom_table_code('T','3') // ctz32 + .word rom_table_code('R','3') // reverse32 +aeabi_bits_funcs_end: + +.section .text +.thumb_func +__aeabi_bits_init: + ldr r0, =aeabi_bits_funcs + movs r1, #BITS_FUNC_COUNT + ldr r3, =rom_funcs_lookup + bx r3 + +.equ POPCOUNT32, 0 +.equ CLZ32, 4 +.equ CTZ32, 8 +.equ REVERSE32, 12 + +bits_section clzsi +wrapper_func __clz +wrapper_func __clzl +wrapper_func __clzsi2 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #CLZ32] + bx r3 + +bits_section ctzsi +wrapper_func __ctzsi2 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #CTZ32] + bx r3 + +bits_section popcountsi +wrapper_func __popcountsi2 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #POPCOUNT32] + bx r3 + +bits_section clzdi +wrapper_func __clzll +wrapper_func __clzdi2 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #CLZ32] + cmp r1, #0 + bne 1f + push {lr} + blx r3 + adds r0, #32 + pop {pc} +1: + mov r0, r1 + bx r3 + +bits_section ctzdi +wrapper_func __ctzdi2 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #CTZ32] + cmp r0, #0 + bne 1f + bx r3 +1: + push {lr} + mov r0, r1 + blx r3 + adds r0, #32 + pop {pc} + +bits_section popcountdi +wrapper_func __popcountdi2 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #POPCOUNT32] + push {r1, r3, lr} + blx r3 + mov ip, r0 + pop {r0, r3} + blx r3 + mov r1, ip + add r0, r1 + pop {pc} + +bits_section reverse32 +regular_func reverse32 + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #REVERSE32] + bx r3 + +bits_section __rev +regular_func __rev +regular_func __revl + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #REVERSE32] + bx r3 + +bits_section __revll +regular_func __revll + push {lr} + ldr r3, =aeabi_bits_funcs + ldr r3, [r3, #REVERSE32] + push {r1, r3} + blx r3 + mov ip, r0 // reverse32 preserves ip + pop {r0, r3} + blx r3 + mov r1, ip + pop {pc} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/CMakeLists.txt new file mode 100644 index 0000000000..58ea575cd0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(pico_bootrom INTERFACE) + +target_sources(pico_bootrom INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/bootrom.c + ) + +target_include_directories(pico_bootrom INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +target_link_libraries(pico_bootrom INTERFACE pico_base_headers) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c new file mode 100644 index 0000000000..08cdb33738 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/bootrom.h" + +/// \tag::table_lookup[] + +// Bootrom function: rom_table_lookup +// Returns the 32 bit pointer into the ROM if found or NULL otherwise. +typedef void *(*rom_table_lookup_fn)(uint16_t *table, uint32_t code); + +// Convert a 16 bit pointer stored at the given rom address into a 32 bit pointer +#define rom_hword_as_ptr(rom_address) (void *)(uintptr_t)(*(uint16_t *)rom_address) + +void *rom_func_lookup(uint32_t code) { + rom_table_lookup_fn rom_table_lookup = (rom_table_lookup_fn) rom_hword_as_ptr(0x18); + uint16_t *func_table = (uint16_t *) rom_hword_as_ptr(0x14); + return rom_table_lookup(func_table, code); +} + +void *rom_data_lookup(uint32_t code) { + rom_table_lookup_fn rom_table_lookup = (rom_table_lookup_fn) rom_hword_as_ptr(0x18); + uint16_t *data_table = (uint16_t *) rom_hword_as_ptr(0x16); + return rom_table_lookup(data_table, code); +} +/// \end::table_lookup[] + +bool rom_funcs_lookup(uint32_t *table, unsigned int count) { + bool ok = true; + for (unsigned int i = 0; i < count; i++) { + table[i] = (uintptr_t) rom_func_lookup(table[i]); + if (!table[i]) ok = false; + } + return ok; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom.h new file mode 100644 index 0000000000..1aa12973ef --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLATFORM_BOOTROM_H +#define _PLATFORM_BOOTROM_H + +#include "pico.h" + +/** \file bootrom.h + * \defgroup pico_bootrom pico_bootrom + * Access to functions and data in the RP2040 bootrom + */ + + +/*! \brief Return a bootrom lookup code based on two ASCII characters + * \ingroup pico_bootrom + * + * These codes are uses to lookup data or function addresses in the bootrom + * + * \param c1 the first character + * \param c2 the second character + * \return the 'code' to use in rom_func_lookup() or rom_data_lookup() + */ +static inline uint32_t rom_table_code(char c1, char c2) { + return (c2 << 8u) | c1; +} + +/*! + * \brief Lookup a bootrom function by code + * \ingroup pico_bootrom + * \param code the code + * \return a pointer to the function, or NULL if the code does not match any bootrom function + */ +void *rom_func_lookup(uint32_t code); + +/*! + * \brief Lookup a bootrom address by code + * \ingroup pico_bootrom + * \param code the code + * \return a pointer to the data, or NULL if the code does not match any bootrom function + */ +void *rom_data_lookup(uint32_t code); + +/*! + * \brief Helper function to lookup the addresses of multiple bootrom functions + * \ingroup pico_bootrom + * + * This method looks up the 'codes' in the table, and convert each table entry to the looked up + * function pointer, if there is a function for that code in the bootrom. + * + * \param table an IN/OUT array, elements are codes on input, function pointers on success. + * \param count the number of elements in the table + * \return true if all the codes were found, and converted to function pointers, false otherwise + */ +bool rom_funcs_lookup(uint32_t *table, unsigned int count); + +typedef void __attribute__((noreturn)) (*reset_usb_boot_fn)(uint32_t, uint32_t); + +/*! + * \brief Reboot the device into BOOTSEL mode + * \ingroup pico_bootrom + * + * This function reboots the device into the BOOTSEL mode ('usb boot"). + * + * Facilities are provided to enable an "activity light" via GPIO attached LED for the USB Mass Storage Device, + * and to limit the USB interfaces exposed. + * + * \param usb_activity_gpio_pin_mask 0 No pins are used as per a cold boot. Otherwise a single bit set indicating which + * GPIO pin should be set to output and raised whenever there is mass storage activity + * from the host. + * \param disable_interface_mask value to control exposed interfaces + * - 0 To enable both interfaces (as per a cold boot) + * - 1 To disable the USB Mass Storage Interface + * - 2 To disable the USB PICOBOOT Interface + */ +static inline void __attribute__((noreturn)) reset_usb_boot(uint32_t usb_activity_gpio_pin_mask, + uint32_t disable_interface_mask) { + reset_usb_boot_fn func = (reset_usb_boot_fn) rom_func_lookup(rom_table_code('U', 'B')); + func(usb_activity_gpio_pin_mask, disable_interface_mask); +} + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom/sf_table.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom/sf_table.h new file mode 100644 index 0000000000..4eb4b1c890 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_bootrom/include/pico/bootrom/sf_table.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_SF_TABLE_H +#define _PICO_SF_TABLE_H + +// NOTE THESE FUNCTION IMPLEMENTATIONS MATCH THE BEHAVIOR DESCRIBED IN THE BOOTROM SECTION OF THE RP2040 DATASHEET + +#define SF_TABLE_FADD 0x00 +#define SF_TABLE_FSUB 0x04 +#define SF_TABLE_FMUL 0x08 +#define SF_TABLE_FDIV 0x0c +#define SF_TABLE_FCMP_FAST 0x10 +#define SF_TABLE_FCMP_FAST_FLAGS 0x14 +#define SF_TABLE_FSQRT 0x18 +#define SF_TABLE_FLOAT2INT 0x1c +#define SF_TABLE_FLOAT2FIX 0x20 +#define SF_TABLE_FLOAT2UINT 0x24 +#define SF_TABLE_FLOAT2UFIX 0x28 +#define SF_TABLE_INT2FLOAT 0x2c +#define SF_TABLE_FIX2FLOAT 0x30 +#define SF_TABLE_UINT2FLOAT 0x34 +#define SF_TABLE_UFIX2FLOAT 0x38 +#define SF_TABLE_FCOS 0x3c +#define SF_TABLE_FSIN 0x40 +#define SF_TABLE_FTAN 0x44 +#define SF_TABLE_V3_FSINCOS 0x48 +#define SF_TABLE_FEXP 0x4c +#define SF_TABLE_FLN 0x50 + +#define SF_TABLE_V1_SIZE 0x54 + +#define SF_TABLE_FCMP_BASIC 0x54 +#define SF_TABLE_FATAN2 0x58 +#define SF_TABLE_INT642FLOAT 0x5c +#define SF_TABLE_FIX642FLOAT 0x60 +#define SF_TABLE_UINT642FLOAT 0x64 +#define SF_TABLE_UFIX642FLOAT 0x68 +#define SF_TABLE_FLOAT2INT64 0x6c +#define SF_TABLE_FLOAT2FIX64 0x70 +#define SF_TABLE_FLOAT2UINT64 0x74 +#define SF_TABLE_FLOAT2UFIX64 0x78 +#define SF_TABLE_FLOAT2DOUBLE 0x7c + +#define SF_TABLE_V2_SIZE 0x80 + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/CMakeLists.txt new file mode 100644 index 0000000000..4b20e3ab2c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/CMakeLists.txt @@ -0,0 +1,23 @@ +if (NOT TARGET pico_cxx_options) + add_library(pico_cxx_options INTERFACE) + + # PICO_CMAKE_CONFIG: PICO_CXX_ENABLE_EXCEPTIONS, Enabled CXX exception handling, type=bool, default=0, group=pico_cxx_options + # PICO_BUILD_DEFINE: PICO_CXX_ENABLE_EXCEPTIONS, value of CMake var PICO_CXX_ENABLE_EXCEPTIONS, type=string, default=0, group=pico_cxx_options + if (NOT PICO_CXX_ENABLE_EXCEPTIONS) + target_compile_definitions( pico_cxx_options INTERFACE PICO_CXX_ENABLE_EXCEPTIONS=0) + target_compile_options( pico_cxx_options INTERFACE $<$:-fno-exceptions>) + target_compile_options( pico_cxx_options INTERFACE $<$:-fno-unwind-tables>) + else() + target_compile_definitions( pico_cxx_options INTERFACE PICO_CXX_ENABLE_EXCEPTIONS=1) + endif() + + # PICO_CMAKE_CONFIG: PICO_CXX_ENABLE_RTTI, Enabled CXX rtti, type=bool, default=0, group=pico_cxx_options + if (NOT PICO_CXX_ENABLE_RTTI) + target_compile_options( pico_cxx_options INTERFACE $<$:-fno-rtti>) + endif() + + # PICO_CMAKE_CONFIG: PICO_CXX_ENABLE_CXA_ATEXIT, Enabled cxa-atexit, type=bool, default=0, group=pico_cxx_options + if (NOT PICO_CXX_ENABLE_CXA_ATEXIT) + target_compile_options( pico_cxx_options INTERFACE $<$:-fno-use-cxa-atexit>) + endif() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/doc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/doc.h new file mode 100644 index 0000000000..5d84e22549 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_cxx_options/doc.h @@ -0,0 +1,4 @@ +/** + * \defgroup pico_cxx_options pico_cxx_options + * \brief non-code library controlling C++ related compile options + */ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/CMakeLists.txt new file mode 100644 index 0000000000..9eda235563 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/CMakeLists.txt @@ -0,0 +1,52 @@ +if (NOT TARGET pico_divider) + # library to be depended on - we make this depend on particular implementations using per target generator expressions + add_library(pico_divider INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_divider_compiler INTERFACE) + target_compile_definitions(pico_divider_compiler INTERFACE + PICO_DIVIDER_COMPILER=1 + ) + + # add alias "default" which is just hardware. + add_library(pico_divider_default INTERFACE) + target_link_libraries(pico_divider_default INTERFACE pico_divider_hardware) + + set(PICO_DEFAULT_DIVIDER_IMPL pico_divider_default) + + target_link_libraries(pico_divider INTERFACE + $>,$,${PICO_DEFAULT_DIVIDER_IMPL}>) + + add_library(pico_divider_hardware_explicit INTERFACE) + target_sources(pico_divider_hardware_explicit INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/divider.S + ) + + target_link_libraries(pico_divider_hardware_explicit INTERFACE + pico_divider_headers + hardware_regs + ) + + add_library(pico_divider_hardware INTERFACE) + target_compile_definitions(pico_divider_hardware INTERFACE + PICO_DIVIDER_HARDWARE=1 + ) + + target_link_libraries(pico_divider_hardware INTERFACE pico_divider_hardware_explicit) + + pico_wrap_function(pico_divider_hardware __aeabi_idiv) + pico_wrap_function(pico_divider_hardware __aeabi_idivmod) + pico_wrap_function(pico_divider_hardware __aeabi_ldivmod) + pico_wrap_function(pico_divider_hardware __aeabi_uidiv) + pico_wrap_function(pico_divider_hardware __aeabi_uidivmod) + pico_wrap_function(pico_divider_hardware __aeabi_uldivmod) + + macro(pico_set_divider_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_DIVIDER_IMPL "pico_divider_${IMPL}") + else() + message(FATAL_ERROR "divider implementation must be set on executable not library") + endif() + endmacro() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/divider.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/divider.S new file mode 100644 index 0000000000..12eae38995 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_divider/divider.S @@ -0,0 +1,863 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/regs/sio.h" +#include "hardware/regs/addressmap.h" + +.syntax unified +.cpu cortex-m0plus +.thumb + +#include "pico/asm_helper.S" + +#ifndef PICO_DIVIDER_CALL_IDIV0 +#define PICO_DIVIDER_CALL_IDIV0 1 +#endif + +#ifndef PICO_DIVIDER_CALL_LDIV0 +#define PICO_DIVIDER_CALL_LDIV0 1 +#endif + +.macro div_section name +#if PICO_DIVIDER_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +#if SIO_DIV_CSR_READY_LSB == 0 +.equ SIO_DIV_CSR_READY_SHIFT_FOR_CARRY, 1 +#else +need to change SHIFT above +#endif +#if SIO_DIV_CSR_DIRTY_LSB == 1 +.equ SIO_DIV_CSR_DIRTY_SHIFT_FOR_CARRY, 2 +#else +need to change SHIFT above +#endif + +@ wait 8-n cycles for the hardware divider +.macro wait_div n +.rept (8-\n) / 2 + b 9f +9: +.endr +.if (8-\n) % 2 + nop +.endif +.endm + + +#if (SIO_DIV_SDIVISOR_OFFSET != SIO_DIV_SDIVIDEND_OFFSET + 4) || (SIO_DIV_QUOTIENT_OFFSET != SIO_DIV_SDIVISOR_OFFSET + 4) || (SIO_DIV_REMAINDER_OFFSET != SIO_DIV_QUOTIENT_OFFSET + 4) +#error register layout has changed - we rely on this order to make sure we save/restore in the right order +#endif + +# SIO_BASE ptr in r2 +.macro save_div_state_and_lr + ldr r3, [r2, #SIO_DIV_CSR_OFFSET] + # wait for results as we can't save signed-ness of operation +1: + lsrs r3, #SIO_DIV_CSR_READY_SHIFT_FOR_CARRY + bcc 1b + push {r4, r5, r6, r7, lr} + // note we must read quotient last, and since it isn't the last reg, we'll not use ldmia! + ldr r4, [r2, #SIO_DIV_SDIVIDEND_OFFSET] + ldr r5, [r2, #SIO_DIV_SDIVISOR_OFFSET] + ldr r7, [r2, #SIO_DIV_REMAINDER_OFFSET] + ldr r6, [r2, #SIO_DIV_QUOTIENT_OFFSET] +.endm + +.macro restore_div_state_and_return + // writing sdividend (r4), sdivisor (r5), quotient (r6), remainder (r7) in that order + // + // it is worth considering what happens if we are interrupted + // + // after writing r4: we are DIRTY and !READY + // ... interruptor using div will complete based on incorrect inputs, but dividend at least will be + // saved/restored correctly and we'll restore the rest ourselves + // after writing r4, r5: we are DIRTY and !READY + // ... interruptor using div will complete based on possibly wrongly signed inputs, but dividend, divisor + // at least will be saved/restored correctly and and we'll restore the rest ourselves + // after writing r4, r5, r6: we are DIRTY and READY + // ... interruptor using div will dividend, divisor, quotient registers as is (what we just restored ourselves), + // and we'll restore the remainder after the fact + + // note we are not use STM not because it can be restarted due to interrupt which is harmless, more because this is 1 cycle IO space + // and so 4 reads is cheaper (and we don't have to adjust r2) + str r4, [r2, #SIO_DIV_SDIVIDEND_OFFSET] + str r5, [r2, #SIO_DIV_SDIVISOR_OFFSET] + str r7, [r2, #SIO_DIV_REMAINDER_OFFSET] + str r6, [r2, #SIO_DIV_QUOTIENT_OFFSET] + pop {r4, r5, r6, r7, pc} +.endm + +.macro save_div_state_and_lr_64 + push {r4, r5, r6, r7, lr} + ldr r6, =SIO_BASE +1: + ldr r5, [r6, #SIO_DIV_CSR_OFFSET] + # wait for results as we can't save signed-ness of operation + lsrs r5, #SIO_DIV_CSR_READY_SHIFT_FOR_CARRY + bcc 1b + // note we must read quotient last, and since it isn't the last reg, we'll not use ldmia! + ldr r4, [r6, #SIO_DIV_UDIVIDEND_OFFSET] + ldr r5, [r6, #SIO_DIV_UDIVISOR_OFFSET] + ldr r7, [r6, #SIO_DIV_REMAINDER_OFFSET] + ldr r6, [r6, #SIO_DIV_QUOTIENT_OFFSET] +.endm + +.macro restore_div_state_and_return_64 + // writing sdividend (r4), sdivisor (r5), quotient (r6), remainder (r7) in that order + // + // it is worth considering what happens if we are interrupted + // + // after writing r4: we are DIRTY and !READY + // ... interruptor using div will complete based on incorrect inputs, but dividend at least will be + // saved/restored correctly and we'll restore the rest ourselves + // after writing r4, r5: we are DIRTY and !READY + // ... interruptor using div will complete based on possibly wrongly signed inputs, but dividend, divisor + // at least will be saved/restored correctly and and we'll restore the rest ourselves + // after writing r4, r5, r6: we are DIRTY and READY + // ... interruptor using div will dividend, divisor, quotient registers as is (what we just restored ourselves), + // and we'll restore the remainder after the fact + + mov ip, r2 + ldr r2, =SIO_BASE + // note we are not use STM not because it can be restarted due to interrupt which is harmless, more because this is 1 cycle IO space + // and so 4 reads is cheaper (and we don't have to adjust r2) + str r4, [r2, #SIO_DIV_UDIVIDEND_OFFSET] + str r5, [r2, #SIO_DIV_UDIVISOR_OFFSET] + str r7, [r2, #SIO_DIV_REMAINDER_OFFSET] + str r6, [r2, #SIO_DIV_QUOTIENT_OFFSET] + mov r2, ip + pop {r4, r5, r6, r7, pc} +.endm + + +// since idiv and idivmod only differ by a cycle, we'll make them the same! +div_section WRAPPER_FUNC_NAME(__aeabi_idiv) +.align 2 +wrapper_func __aeabi_idiv +wrapper_func __aeabi_idivmod +regular_func div_s32s32 +regular_func divmod_s32s32 + ldr r2, =(SIO_BASE) + # to support IRQ usage we must save/restore + ldr r3, [r2, #SIO_DIV_CSR_OFFSET] + lsrs r3, #SIO_DIV_CSR_DIRTY_SHIFT_FOR_CARRY + bcs divmod_s32s32_savestate +regular_func divmod_s32s32_unsafe + str r0, [r2, #SIO_DIV_SDIVIDEND_OFFSET] + str r1, [r2, #SIO_DIV_SDIVISOR_OFFSET] + cmp r1, #0 + beq 1f + wait_div 2 + // return 64 bit value so we can efficiently return both (note read order is important since QUOTIENT must be read last) + ldr r1, [r2, #SIO_DIV_REMAINDER_OFFSET] + ldr r0, [r2, #SIO_DIV_QUOTIENT_OFFSET] + bx lr +1: + push {r2, lr} + movs r1, #0x80 + lsls r1, #24 + asrs r2, r0, #31 + eors r1, r2 + cmp r0, #0 + beq 1f + mvns r0, r1 +1: +#if PICO_DIVIDER_CALL_IDIV0 + bl __aeabi_idiv0 +#endif + movs r1, #0 // remainder 0 + // need to restore saved r2 as it hold SIO ptr + pop {r2, pc} +.align 2 +regular_func divmod_s32s32_savestate + save_div_state_and_lr + bl divmod_s32s32_unsafe + restore_div_state_and_return + +// since uidiv and uidivmod only differ by a cycle, we'll make them the same! +div_section WRAPPER_FUNC_NAME(__aeabi_uidiv) +regular_func div_u32u32 +regular_func divmod_u32u32 +wrapper_func __aeabi_uidiv +wrapper_func __aeabi_uidivmod + ldr r2, =(SIO_BASE) + # to support IRQ usage we must save/restore + ldr r3, [r2, #SIO_DIV_CSR_OFFSET] + lsrs r3, #SIO_DIV_CSR_DIRTY_SHIFT_FOR_CARRY + bcs divmod_u32u32_savestate +regular_func divmod_u32u32_unsafe + str r0, [r2, #SIO_DIV_UDIVIDEND_OFFSET] + str r1, [r2, #SIO_DIV_UDIVISOR_OFFSET] + cmp r1, #0 + beq 1f + wait_div 2 + // return 64 bit value so we can efficiently return both (note read order is important since QUOTIENT must be read last) + ldr r1, [r2, #SIO_DIV_REMAINDER_OFFSET] + ldr r0, [r2, #SIO_DIV_QUOTIENT_OFFSET] + bx lr +1: + push {r2, lr} + cmp r0, #0 + beq 1f + movs r0, #0 + mvns r0, r0 +1: +#if PICO_DIVIDER_CALL_IDIV0 + bl __aeabi_idiv0 +#endif + movs r1, #0 // remainder 0 + // need to restore saved r2 as it hold SIO ptr + pop {r2, pc} +.align 2 +regular_func divmod_u32u32_savestate + save_div_state_and_lr + bl divmod_u32u32_unsafe + restore_div_state_and_return + +div_section WRAPPER_FUNC_NAME(__aeabi_ldiv) + +.align 2 +wrapper_func __aeabi_ldivmod +regular_func div_s64s64 +regular_func divmod_s64s64 + mov ip, r2 + ldr r2, =(SIO_BASE) + # to support IRQ usage we must save/restore + ldr r2, [r2, #SIO_DIV_CSR_OFFSET] + lsrs r2, #SIO_DIV_CSR_DIRTY_SHIFT_FOR_CARRY + mov r2, ip + bcs divmod_s64s64_savestate + b divmod_s64s64_unsafe +.align 2 +divmod_s64s64_savestate: + save_div_state_and_lr_64 + bl divmod_s64s64_unsafe + restore_div_state_and_return_64 + +.align 2 +wrapper_func __aeabi_uldivmod +regular_func div_u64u64 +regular_func divmod_u64u64 + mov ip, r2 + ldr r2, =(SIO_BASE) + # to support IRQ usage we must save/restore + ldr r2, [r2, #SIO_DIV_CSR_OFFSET] + lsrs r2, #SIO_DIV_CSR_DIRTY_SHIFT_FOR_CARRY + mov r2, ip + bcs divmod_u64u64_savestate + b divmod_u64u64_unsafe +.align 2 +regular_func divmod_u64u64_savestate + save_div_state_and_lr_64 + bl divmod_u64u64_unsafe + restore_div_state_and_return_64 +.macro dneg lo,hi + mvns \hi,\hi + rsbs \lo,#0 + bne l\@_1 + adds \hi,#1 +l\@_1: +.endm + +.align 2 +regular_func divmod_s64s64_unsafe + cmp r3,#0 + blt 1f +@ here x +ve + beq 2f @ could x be zero? +3: + cmp r1,#0 + bge divmod_u64u64_unsafe @ both positive +@ y -ve, x +ve + push {r14} + dneg r0,r1 + bl divmod_u64u64_unsafe + dneg r0,r1 + dneg r2,r3 + pop {r15} + +2: + cmp r2,#0 + bne 3b @ back if x not zero + + cmp r0,#0 @ y==0? + bne 4f + cmp r1,#0 + beq 5f @ then pass 0 to __aeabi_ldiv0 +4: + movs r0,#0 + lsrs r1,#31 + lsls r1,#31 @ get sign bit + bne 5f @ y -ve? pass -2^63 to __aeabi_ldiv0 + mvns r0,r0 + lsrs r1,r0,#1 @ y +ve: pass 2^63-1 to __aeabi_ldiv0 +5: + push {r14} +#if PICO_DIVIDER_CALL_LDIV0 + bl __aeabi_ldiv0 +#endif + movs r2,#0 @ and return 0 for the remainder + movs r3,#0 + pop {r15} + +1: +@ here x -ve + push {r14} + cmp r1,#0 + blt 1f +@ y +ve, x -ve + dneg r2,r3 + bl divmod_u64u64_unsafe + dneg r0,r1 + pop {r15} + +1: +@ y -ve, x -ve + dneg r0,r1 + dneg r2,r3 + bl divmod_u64u64_unsafe + dneg r2,r3 + pop {r15} + +regular_func divmod_u64u64_unsafe + cmp r1,#0 + bne y64 @ y fits in 32 bits? + cmp r3,#0 @ yes; and x? + bne 1f + cmp r2,#0 + beq 2f @ x==0? + mov r12,r7 + ldr r7,=#SIO_BASE + str r0,[r7,#SIO_DIV_UDIVIDEND_OFFSET] + str r2,[r7,#SIO_DIV_UDIVISOR_OFFSET] + movs r1,#0 + movs r3,#0 + wait_div 2 + ldr r2,[r7,#SIO_DIV_REMAINDER_OFFSET] + ldr r0,[r7,#SIO_DIV_QUOTIENT_OFFSET] + mov r7,r12 + bx r14 + +2: @ divide by 0 with y<2^32 + cmp r0,#0 @ y==0? + beq 3f @ then pass 0 to __aeabi_ldiv0 +udiv0: + ldr r0,=#0xffffffff + movs r1,r0 @ pass 2^64-1 to __aeabi_ldiv0 +3: + push {r14} +#if PICO_DIVIDER_CALL_LDIV0 + bl __aeabi_ldiv0 +#endif + movs r2,#0 @ and return 0 for the remainder + movs r3,#0 + pop {r15} + +1: + movs r2,r0 @ x>y, so result is 0 remainder y + movs r3,r1 + movs r0,#0 + movs r1,#0 + bx r14 + +.ltorg + +@ here y occupies more than 32 bits +@ split into cases acccording to the size of x +y64: + cmp r3,#0 + beq 1f + b y64_x48 @ if x does not fit in 32 bits, go to 48- and 64-bit cases +1: + lsrs r3,r2,#16 + bne y64_x32 @ jump if x is 17..32 bits + +@ here x is at most 16 bits + + cmp r2,#0 + beq udiv0 @ x==0? exit as with y!=0 case above + push {r7} + ldr r7,=#SIO_BASE + str r1,[r7,#SIO_DIV_UDIVIDEND_OFFSET] + str r2,[r7,#SIO_DIV_UDIVISOR_OFFSET] + wait_div 4 + push {r4, r5} + lsrs r4,r0,#16 + ldr r3,[r7,#SIO_DIV_REMAINDER_OFFSET] @ r0=y0-q0*x; 0<=r0>16); + wait_div 1 + uxth r4,r0 + ldr r3,[r7,#SIO_DIV_REMAINDER_OFFSET] @ r1=y1-q1*x; 0<=r1>16); + wait_div 3 + movs r3,#0 + lsls r4,r5,#16 @ quotient=(q0<<32)+(q1<<16)+q2 + lsrs r5,#16 + ldr r2,[r7,#SIO_DIV_REMAINDER_OFFSET] @ r2=y2-q2*x; 0<=r2>15)+1; 2^16>48)*r)>>16; + lsls r7,r6,#13 + mov r14,r7 @ quh=q0<<13 + + muls r3,r6 @ x0l*q + lsrs r7,r3,#15 + lsls r3,#17 @ r3:r7 is (x0l*q)<<17 + subs r0,r3 + sbcs r1,r7 @ y-=(x0l*q)<<17 + + lsrs r3,r2,#16 @ x0h + muls r3,r6 @ q*x0h + adds r3,r3 + subs r1,r3 @ y-=(x0h*q)<<17 + + lsrs r6,r1,#3 + muls r6,r4 + lsrs r6,#16 @ q=((ui32)(y>>35)*r)>>16; + add r14,r6 @ quh+=q1 + + uxth r3,r2 @ x0l + muls r3,r6 @ x0l*q + lsrs r7,r3,#28 + lsls r3,#4 @ r3:r7 is (x0l*q)<<4 + subs r0,r3 + sbcs r1,r7 @ y-=(x0l*q)<<4 + + lsrs r3,r2,#16 @ x0h + muls r3,r6 @ x0h*q + lsrs r7,r3,#12 + lsls r3,#20 @ r3:r7 is (x0h*q)<<4 + subs r0,r3 + sbcs r1,r7 @ y-=(x0h*q)<<4 + + lsrs r6,r0,#22 + lsls r7,r1,#10 + orrs r6,r7 @ y>>22 + muls r6,r4 + lsrs r6,#16 @ q=((ui32)(y>>22)*r)>>16; + + cmp r5,#9 + blt last0 @ if(xsh<9) goto last0; + +@ on this path xsh>=9, which means x<2^23 + lsrs r2,#9 @ x0>>9: this shift loses no bits +@ the remainder y-x0*q is guaranteed less than a very small multiple of the remaining quotient +@ bits (at most 6 bits) times x, and so fits in one word + muls r2,r6 @ x0*q + subs r0,r2 @ y-x0*q + lsls r7,r6,#13 @ qul=q<<13 +1: + lsrs r6,r0,#9 + muls r6,r4 + lsrs r6,#16 @ q=((ui32)(y>>9)*r)>>16; + +@ here +@ r0 y +@ r2 x0>>9 +@ r5 xsh +@ r6 q +@ r7 qul +@ r12 x +@ r14 quh + + movs r3,#22 + subs r3,r5 @ 22-xsh + lsrs r6,r3 @ q>>=22-xsh + lsrs r7,r3 @ qul>>=22-xsh + adds r7,r6 @ qul+=q + mov r4,r12 + muls r6,r4 @ x*q + subs r2,r0,r6 @ y-=x*q + mov r0,r14 @ quh + adds r5,#4 @ xsh+4 + adds r3,#6 @ 28-xsh + movs r1,r0 + lsrs r1,r3 + lsls r0,r5 @ r0:r1 is quh<<(4+xsh) + adds r0,r7 + bcc 1f +2: + adds r1,#1 +1: @ qu=((ui64)quh<<(4+xsh))+qul + cmp r2,r4 + bhs 3f + movs r3,#0 + pop {r4-r7,r15} + +.ltorg + +3: + subs r2,r4 + adds r0,#1 + bcc 1b + b 2b @ while(y>=x) y-=x,qu++; + +@ here: +@ r0:r1 y +@ r2 x0 +@ r4 r +@ r5 xsh; xsh<9 +@ r6 q + +last0: + movs r7,#9 + subs r7,r5 @ 9-xsh + lsrs r6,r7 + mov r4,r12 @ x + uxth r2,r4 + muls r2,r6 @ q*xlo + subs r0,r2 + bcs 1f + subs r1,#1 @ y-=q*xlo +1: + lsrs r2,r4,#16 @ xhi + muls r2,r6 @ q*xhi + lsrs r3,r2,#16 + lsls r2,#16 + subs r2,r0,r2 + sbcs r1,r3 @ y-q*xhi + movs r3,r1 @ y now in r2:r3 + mov r0,r14 @ quh + adds r5,#4 @ xsh+4 + adds r7,#19 @ 28-xsh + movs r1,r0 + lsrs r1,r7 + lsls r0,r5 @ r0:r1 is quh<<(4+xsh) + adds r0,r6 + bcc 1f + adds r1,#1 @ quh<<(xsh+4))+q +1: + cmp r3,#0 @ y>=2^32? + bne 3f + cmp r2,r4 @ y>=x? + bhs 4f + pop {r4-r7,r15} + +3: + adds r0,#1 @ qu++ + bcc 2f + adds r1,#1 +2: + subs r2,r4 @ y-=x + bcs 3b + subs r3,#1 + bne 3b + +1: + cmp r2,r4 + bhs 4f + pop {r4-r7,r15} + +4: + adds r0,#1 @ qu++ + bcc 2f + adds r1,#1 +2: + subs r2,r4 @ y-=x + b 1b + +y64_x48: +@ here x is 33..64 bits + push {r4-r7,r14} @ save a copy of x + lsrs r4,r3,#16 + beq 1f + b y64_x64 @ jump if x is 49..64 bits +1: + push {r2-r3} @ save a copy of x +@ here x is 33..48 bits + movs r5,#0 @ xsh=0 + lsrs r4,r3,#8 + bne 1f + lsls r3,#8 + lsrs r6,r2,#24 + orrs r3,r6 + lsls r2,#8 @ if(x0<1U<<40) x0<<=8,xsh =8; + adds r5,#8 +1: + lsrs r4,r3,#12 + bne 1f + lsls r3,#4 + lsrs r6,r2,#28 + orrs r3,r6 + lsls r2,#4 @ if(x0<1U<<44) x0<<=4,xsh+=4; + adds r5,#4 +1: + lsrs r4,r3,#14 + bne 1f + lsls r3,#2 + lsrs r6,r2,#30 + orrs r3,r6 + lsls r2,#2 @ if(x0<1U<<46) x0<<=2,xsh+=2; + adds r5,#2 +1: + lsrs r4,r3,#15 + bne 1f + adds r2,r2 + adcs r3,r3 @ if(x0<1U<<47) x0<<=1,xsh+=1; + adds r5,#1 +1: +@ now 2^47<=x0<2^48, 0<=xsh<16 (amount x is shifted in x0); number of quotient bits to be calculated qb=xsh+17 17<=qb<33 + movs r4,r3 + adds r7,r2,r2 + adcs r4,r4 + adds r4,#1 @ x1=(ui32)(x0>>31)+1; // 2^16>48)*r)>>16; + lsls r7,r6,#13 + mov r14,r7 @ save q<<13 + uxth r7,r2 @ x0l + muls r7,r6 + subs r0,r7 + bcs 1f + subs r1,#1 +1: + subs r0,r7 + bcs 1f + subs r1,#1 +1: + uxth r7,r3 @ x0h + muls r7,r6 + subs r1,r7 + subs r1,r7 + lsrs r7,r2,#16 @ x0m + muls r7,r6 + lsls r6,r7,#17 + lsrs r7,#15 + subs r0,r6 + sbcs r1,r7 @ y-=((ui64)q*x0)<<1; + + lsrs r6,r1,#3 @ y>>35 + muls r6,r4 + lsrs r6,#16 @ q=((ui32)(y>>35)*r)>>16; + + cmp r5,#12 + blt last1 @ if(xsh<12) goto last1; + + add r14,r6 @ qu<<13+q + lsrs r2,#12 + lsls r7,r3,#20 + orrs r2,r7 + lsrs r3,#12 @ x0>>12 + + uxth r7,r2 @ x0l + muls r7,r6 + subs r0,r7 + bcs 1f + subs r1,#1 +1: + uxth r7,r3 @ x0h + muls r7,r6 + subs r1,r7 + lsrs r7,r2,#16 @ x0m + muls r7,r6 + lsls r6,r7,#16 + lsrs r7,#16 + subs r0,r6 + sbcs r1,r7 @ y-=((ui64)q*x0)>>12 + + lsrs r6,r0,#22 + lsls r7,r1,#10 + orrs r6,r7 @ y>>22 + muls r6,r4 + movs r7,#41 + subs r7,r5 + lsrs r6,r7 @ q=((ui32)(y>>22)*r)>>(16+25-xsh) + + subs r5,#12 + mov r7,r14 + lsls r7,r5 +2: + adds r7,r6 @ qu=(qu<<(xsh-12))+q + pop {r4,r5} @ recall x + +@ here +@ r0:r1 y +@ r4:r5 x +@ r6 q +@ r7 qu + + uxth r2,r4 + uxth r3,r5 + muls r2,r6 @ xlo*q + muls r3,r6 @ xhi*q + subs r0,r2 + sbcs r1,r3 + lsrs r2,r4,#16 + muls r2,r6 + lsrs r3,r2,#16 + lsls r2,#16 @ xm*q + subs r0,r2 + sbcs r1,r3 @ y-=(ui64)q*x + +1: + movs r2,r0 + movs r3,r1 + adds r7,#1 + subs r0,r4 + sbcs r1,r5 @ while(y>=x) y-=x,qu++; + bhs 1b + subs r0,r7,#1 @ correction to qu + movs r1,#0 + pop {r4-r7,r15} + +last1: +@ r0:r1 y +@ r2:r3 x0 +@ r5 xsh +@ r6 q + + movs r7,#12 + subs r7,r5 + lsrs r6,r7 @ q>>=12-xsh + mov r7,r14 + lsrs r7,#13 + lsls r7,r5 + adds r7,r7 @ qu<<(xsh+1) + b 2b + +y64_x64: +@ here x is 49..64 bits + movs r4,#0 @ q=0 if x>>32==0xffffffff + adds r5,r3,#1 + beq 1f + + ldr r7,=#SIO_BASE + str r5,[r7,#SIO_DIV_UDIVISOR_OFFSET] + str r1,[r7,#SIO_DIV_UDIVIDEND_OFFSET] + wait_div 0 + ldr r4,[r7,#SIO_DIV_QUOTIENT_OFFSET] @ q=(ui32)(y>>32)/((x>>32)+1) +1: + uxth r5,r2 + uxth r6,r3 + muls r5,r4 + muls r6,r4 + subs r0,r5 + sbcs r1,r6 + lsrs r5,r2,#16 + lsrs r6,r3,#16 + muls r5,r4 + muls r6,r4 + lsls r6,#16 + lsrs r7,r5,#16 + orrs r6,r7 + lsls r5,#16 + subs r0,r5 + sbcs r1,r6 @ y-=(ui64)q*x + + cmp r1,r3 @ while(y>=x) y-=x,q++ + bhs 1f +3: + movs r2,r0 + movs r3,r1 + movs r0,r4 + movs r1,#0 + pop {r4-r7,r15} + +1: + bne 2f + cmp r0,r2 + blo 3b +2: + subs r0,r2 + sbcs r1,r3 + adds r4,#1 + cmp r1,r3 + blo 3b + b 1b + +div_section divmod_s64s64_rem +regular_func divmod_s64s64_rem + push {r4, lr} + bl divmod_s64s64 + ldr r4, [sp, #8] + stmia r4!, {r2,r3} + pop {r4, pc} + +div_section divmod_u64u64_rem +regular_func divmod_u64u64_rem + push {r4, lr} + bl divmod_u64u64 + ldr r4, [sp, #8] + stmia r4!, {r2,r3} + pop {r4, pc} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/CMakeLists.txt new file mode 100644 index 0000000000..a707385aa4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/CMakeLists.txt @@ -0,0 +1,127 @@ +if (NOT TARGET pico_double) + # library to be depended on - we make this depend on particular implementations using per target generator expressions + add_library(pico_double INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_double_compiler INTERFACE) + # PICO_BUILD_DEFINE: PICO_DOUBLE_COMPILER, whether compiler provided double support is being used, type=bool, default=0, but dependent on CMake options, group=pico_double + target_compile_definitions(pico_double_compiler INTERFACE + PICO_DOUBLE_COMPILER=1 + ) + + add_library(pico_double_headers INTERFACE) + target_include_directories(pico_double_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + # add alias "default" which is just pico. + add_library(pico_double_default INTERFACE) + target_link_libraries(pico_double_default INTERFACE pico_double_pico) + + set(PICO_DEFAULT_DOUBLE_IMPL pico_double_default) + + target_link_libraries(pico_double INTERFACE + $>,$,${PICO_DEFAULT_DOUBLE_IMPL}>) + + add_library(pico_double_pico INTERFACE) + target_sources(pico_double_pico INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/double_aeabi.S + ${CMAKE_CURRENT_LIST_DIR}/double_init_rom.c + ${CMAKE_CURRENT_LIST_DIR}/double_math.c + ${CMAKE_CURRENT_LIST_DIR}/double_v1_rom_shim.S + ) + # PICO_BUILD_DEFINE: PICO_DOUBLE_PICO, whether optimized pico/bootrom provided double support is being used, type=bool, default=1, but dependent on CMake options, group=pico_double + target_compile_definitions(pico_double_pico INTERFACE + PICO_DOUBLE_PICO=1 + ) + + target_link_libraries(pico_double_pico INTERFACE pico_bootrom pico_double_headers) + + add_library(pico_double_none INTERFACE) + target_sources(pico_double_none INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/double_none.S + ) + + target_link_libraries(pico_double_none INTERFACE pico_double_headers) + + # PICO_BUILD_DEFINE: PICO_DOUBLE_NONE, whether double support is disabled and functions will panic, type=bool, default=0, but dependent on CMake options, group=pico_double + target_compile_definitions(pico_double_none INTERFACE + PICO_DOUBLE_NONE=1 + PICO_PRINTF_SUPPORT_FLOAT=0 # printing floats/doubles won't work, so we can save space by removing it + ) + + function(wrap_double_functions TARGET) + pico_wrap_function(${TARGET} __aeabi_dadd) + pico_wrap_function(${TARGET} __aeabi_ddiv) + pico_wrap_function(${TARGET} __aeabi_dmul) + pico_wrap_function(${TARGET} __aeabi_drsub) + pico_wrap_function(${TARGET} __aeabi_dsub) + pico_wrap_function(${TARGET} __aeabi_cdcmpeq) + pico_wrap_function(${TARGET} __aeabi_cdrcmple) + pico_wrap_function(${TARGET} __aeabi_cdcmple) + pico_wrap_function(${TARGET} __aeabi_dcmpeq) + pico_wrap_function(${TARGET} __aeabi_dcmplt) + pico_wrap_function(${TARGET} __aeabi_dcmple) + pico_wrap_function(${TARGET} __aeabi_dcmpge) + pico_wrap_function(${TARGET} __aeabi_dcmpgt) + pico_wrap_function(${TARGET} __aeabi_dcmpun) + pico_wrap_function(${TARGET} __aeabi_i2d) + pico_wrap_function(${TARGET} __aeabi_l2d) + pico_wrap_function(${TARGET} __aeabi_ui2d) + pico_wrap_function(${TARGET} __aeabi_ul2d) + pico_wrap_function(${TARGET} __aeabi_d2iz) + pico_wrap_function(${TARGET} __aeabi_d2lz) + pico_wrap_function(${TARGET} __aeabi_d2uiz) + pico_wrap_function(${TARGET} __aeabi_d2ulz) + pico_wrap_function(${TARGET} __aeabi_d2f) + pico_wrap_function(${TARGET} sqrt) + pico_wrap_function(${TARGET} cos) + pico_wrap_function(${TARGET} sin) + pico_wrap_function(${TARGET} tan) + pico_wrap_function(${TARGET} atan2) + pico_wrap_function(${TARGET} exp) + pico_wrap_function(${TARGET} log) + + pico_wrap_function(${TARGET} ldexp) + pico_wrap_function(${TARGET} copysign) + pico_wrap_function(${TARGET} trunc) + pico_wrap_function(${TARGET} floor) + pico_wrap_function(${TARGET} ceil) + pico_wrap_function(${TARGET} round) + pico_wrap_function(${TARGET} sincos) # gnu + pico_wrap_function(${TARGET} asin) + pico_wrap_function(${TARGET} acos) + pico_wrap_function(${TARGET} atan) + pico_wrap_function(${TARGET} sinh) + pico_wrap_function(${TARGET} cosh) + pico_wrap_function(${TARGET} tanh) + pico_wrap_function(${TARGET} asinh) + pico_wrap_function(${TARGET} acosh) + pico_wrap_function(${TARGET} atanh) + pico_wrap_function(${TARGET} exp2) + pico_wrap_function(${TARGET} log2) + pico_wrap_function(${TARGET} exp10) + pico_wrap_function(${TARGET} log10) + pico_wrap_function(${TARGET} pow) + pico_wrap_function(${TARGET} powint) #gnu + pico_wrap_function(${TARGET} hypot) + pico_wrap_function(${TARGET} cbrt) + pico_wrap_function(${TARGET} fmod) + pico_wrap_function(${TARGET} drem) + pico_wrap_function(${TARGET} remainder) + pico_wrap_function(${TARGET} remquo) + pico_wrap_function(${TARGET} expm1) + pico_wrap_function(${TARGET} log1p) + pico_wrap_function(${TARGET} fma) + endfunction() + + wrap_double_functions(pico_double_pico) + wrap_double_functions(pico_double_none) + + macro(pico_set_double_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_DOUBLE_IMPL "pico_double_${IMPL}") + else() + message(FATAL_ERROR "double implementation must be set on executable not library") + endif() + endmacro() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_aeabi.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_aeabi.S new file mode 100644 index 0000000000..4ef7748e9a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_aeabi.S @@ -0,0 +1,801 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/asm_helper.S" +#include "pico/bootrom/sf_table.h" + +__pre_init __aeabi_double_init, 00020 + +.syntax unified +.cpu cortex-m0plus +.thumb + +.macro double_section name +#if PICO_DOUBLE_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +.macro _double_wrapper_func x + wrapper_func \x +.endm + +.macro wrapper_func_d1 x + _double_wrapper_func \x +#if PICO_DOUBLE_PROPAGATE_NANS + mov ip, lr + bl __check_nan_d1 + mov lr, ip +#endif +.endm + +.macro wrapper_func_d2 x + _double_wrapper_func \x +#if PICO_DOUBLE_PROPAGATE_NANS + mov ip, lr + bl __check_nan_d2 + mov lr, ip +#endif +.endm + +.section .text + +#if PICO_DOUBLE_PROPAGATE_NANS +.thumb_func +__check_nan_d1: + movs r3, #1 + lsls r3, #21 + lsls r2, r1, #1 + adds r2, r3 + bhi 1f + bx lr +1: + bx ip + +.thumb_func +__check_nan_d2: + push {r0, r2} + movs r2, #1 + lsls r2, #21 + lsls r0, r1, #1 + adds r0, r2 + bhi 1f + lsls r0, r3, #1 + adds r0, r2 + bhi 2f + pop {r0, r2} + bx lr +2: + pop {r0, r2} + mov r0, r2 + mov r1, r3 + bx ip +1: + pop {r0, r2} + bx ip +#endif + +.macro table_tail_call SF_TABLE_OFFSET + push {r3, r4} +#if PICO_DOUBLE_SUPPORT_ROM_V1 +#ifndef NDEBUG + movs r3, #0 + mov ip, r3 +#endif +#endif + ldr r3, =sd_table + ldr r3, [r3, #\SF_TABLE_OFFSET] + str r3, [sp, #4] + pop {r3, pc} +.endm + +.macro shimmable_table_tail_call SF_TABLE_OFFSET shim + push {r3, r4} + ldr r3, =sd_table + ldr r3, [r3, #\SF_TABLE_OFFSET] +#if PICO_DOUBLE_SUPPORT_ROM_V1 + mov ip, pc +#endif + str r3, [sp, #4] + pop {r3, pc} +#if PICO_DOUBLE_SUPPORT_ROM_V1 +.byte \SF_TABLE_OFFSET, 0xdf +.word \shim +#endif +.endm + +.macro double_wrapper_section func +double_section WRAPPER_FUNC_NAME(\func) +.endm + +double_section push_r8_r11 +regular_func push_r8_r11 + mov r4,r8 + mov r5,r9 + mov r6,r10 + mov r7,r11 + push {r4-r7} + bx r14 + +double_section pop_r8_r11 +regular_func pop_r8_r11 + pop {r4-r7} + mov r8,r4 + mov r9,r5 + mov r10,r6 + mov r11,r7 + bx r14 + +# note generally each function is in a separate section unless there is fall thru or branching between them +# note fadd, fsub, fmul, fdiv are so tiny and just defer to rom so are lumped together so they can share constant pool + +# note functions are word aligned except where they are an odd number of linear instructions + +// double FUNC_NAME(__aeabi_dadd)(double, double) double-precision addition +double_wrapper_section __aeabi_darithmetic +// double FUNC_NAME(__aeabi_drsub)(double x, double y) double-precision reverse subtraction, y - x + +# frsub first because it is the only one that needs alignment +.align 2 +wrapper_func __aeabi_drsub + eors r0, r1 + eors r1, r0 + eors r0, r1 + // fall thru + +// double FUNC_NAME(__aeabi_dsub)(double x, double y) double-precision subtraction, x - y +wrapper_func_d2 __aeabi_dsub +#if PICO_DOUBLE_PROPAGATE_NANS + // we want to return nan for inf-inf or -inf - -inf, but without too much upfront cost + mov ip, r0 + mov r0, r1 + eors r0, r3 + bmi 1f // different signs + mov r0, ip + push {r0-r3, lr} + bl 2f + b ddiv_dsub_nan_helper +1: + mov r0, ip +2: +#endif + shimmable_table_tail_call SF_TABLE_FSUB dsub_shim + +wrapper_func_d2 __aeabi_dadd + shimmable_table_tail_call SF_TABLE_FADD dadd_shim + +// double FUNC_NAME(__aeabi_ddiv)(double n, double d) double-precision division, n / d +wrapper_func_d2 __aeabi_ddiv +#if PICO_DOUBLE_PROPAGATE_NANS + push {r0-r3, lr} + bl 1f + b ddiv_dsub_nan_helper +1: +#endif + shimmable_table_tail_call SF_TABLE_FDIV ddiv_shim + +ddiv_dsub_nan_helper: +#if PICO_DOUBLE_PROPAGATE_NANS + // check for infinite op infinite (or rather check for infinite result with both + // operands being infinite) + lsls r2, r1, #1 + asrs r2, r2, #21 + adds r2, #1 + beq 2f + add sp, #16 + pop {pc} +2: + ldr r2, [sp, #4] + ldr r3, [sp, #12] + lsls r2, #1 + asrs r2, r2, #21 + lsls r3, #1 + asrs r3, r3, #24 + ands r2, r3 + adds r2, #1 + bne 3f + // infinite to nan + movs r2, #1 + lsls r2, #19 + orrs r1, r2 +3: + add sp, #16 + pop {pc} +#endif + +// double FUNC_NAME(__aeabi_dmul)(double, double) double-precision multiplication +wrapper_func_d2 __aeabi_dmul +#if PICO_DOUBLE_PROPAGATE_NANS + push {r0-r3, lr} + bl 1f + + // check for multiplication of infinite by zero (or rather check for infinite result with either + // operand 0) + lsls r3, r1, #1 + asrs r3, r3, #21 + adds r3, #1 + beq 2f + add sp, #16 + pop {pc} +2: + ldr r2, [sp, #4] + ldr r3, [sp, #12] + ands r2, r3 + bne 3f + // infinite to nan + movs r2, #1 + lsls r2, #19 + orrs r1, r2 +3: + add sp, #16 + pop {pc} +1: +#endif + shimmable_table_tail_call SF_TABLE_FMUL dmul_shim + +// void FUNC_NAME(__aeabi_cdrcmple)(double, double) reversed 3-way (<, =, ?>) compare [1], result in PSR ZC flags +double_wrapper_section __aeabi_cdcmple + +wrapper_func __aeabi_cdrcmple + push {r0-r7,r14} + eors r0, r2 + eors r2, r0 + eors r0, r2 + eors r1, r3 + eors r3, r1 + eors r1, r3 + b __aeabi_dfcmple_guts + +// NOTE these share an implementation as we have no excepting NaNs. +// void FUNC_NAME(__aeabi_cdcmple)(double, double) 3-way (<, =, ?>) compare [1], result in PSR ZC flags +// void FUNC_NAME(__aeabi_cdcmpeq)(double, double) non-excepting equality comparison [1], result in PSR ZC flags +@ compare r0:r1 against r2:r3, returning -1/0/1 for <, =, > +@ also set flags accordingly +.align 2 +wrapper_func __aeabi_cdcmple +wrapper_func __aeabi_cdcmpeq + push {r0-r7,r14} +__aeabi_dfcmple_guts: + ldr r7,=#0x7ff @ flush NaNs and denormals + lsls r4,r1,#1 + lsrs r4,#21 + beq 1f + cmp r4,r7 + bne 2f + lsls r4, r1, #12 + bhi 7f +1: + movs r0,#0 + lsrs r1,#20 + lsls r1,#20 +2: + lsls r4,r3,#1 + lsrs r4,#21 + beq 1f + cmp r4,r7 + bne 2f + lsls r4, r3, #12 + bhi 7f +1: + movs r2,#0 + lsrs r3,#20 + lsls r3,#20 +2: + movs r6,#1 + eors r3,r1 + bmi 4f @ opposite signs? then can proceed on basis of sign of x + eors r3,r1 @ restore r3 + bpl 2f + cmp r3,r1 + bne 7f +1: + cmp r2,r0 +7: + pop {r0-r7,r15} +2: + cmp r1,r3 + bne 7b +1: + cmp r0,r2 + pop {r0-r7,r15} +4: + orrs r3,r1 @ make -0==+0 + adds r3,r3 + orrs r3,r0 + orrs r3,r2 + beq 7b + mvns r1, r1 @ carry inverse of r1 sign + adds r1, r1 + pop {r0-r7,r15} + + +// int FUNC_NAME(__aeabi_dcmpeq)(double, double) result (1, 0) denotes (=, ?<>) [2], use for C == and != +double_wrapper_section __aeabi_dcmpeq +.align 2 +wrapper_func __aeabi_dcmpeq + push {lr} + bl __aeabi_cdcmpeq + beq 1f + movs r0, #0 + pop {pc} +1: + movs r0, #1 + pop {pc} + +// int FUNC_NAME(__aeabi_dcmplt)(double, double) result (1, 0) denotes (<, ?>=) [2], use for C < +double_wrapper_section __aeabi_dcmplt +.align 2 +wrapper_func __aeabi_dcmplt + push {lr} + bl __aeabi_cdcmple + sbcs r0, r0 + pop {pc} + +// int FUNC_NAME(__aeabi_dcmple)(double, double) result (1, 0) denotes (<=, ?>) [2], use for C <= +double_wrapper_section __aeabi_dcmple +.align 2 +wrapper_func __aeabi_dcmple + push {lr} + bl __aeabi_cdcmple + bls 1f + movs r0, #0 + pop {pc} +1: + movs r0, #1 + pop {pc} + +// int FUNC_NAME(__aeabi_dcmpge)(double, double) result (1, 0) denotes (>=, ?<) [2], use for C >= +double_wrapper_section __aeabi_dcmpge +.align 2 +wrapper_func __aeabi_dcmpge + push {lr} + // because of NaNs it is better to reverse the args than the result + bl __aeabi_cdrcmple + bls 1f + movs r0, #0 + pop {pc} +1: + movs r0, #1 + pop {pc} + +// int FUNC_NAME(__aeabi_dcmpgt)(double, double) result (1, 0) denotes (>, ?<=) [2], use for C > +double_wrapper_section __aeabi_dcmpgt +wrapper_func __aeabi_dcmpgt + push {lr} + // because of NaNs it is better to reverse the args than the result + bl __aeabi_cdrcmple + sbcs r0, r0 + pop {pc} + +// int FUNC_NAME(__aeabi_dcmpun)(double, double) result (1, 0) denotes (?, <=>) [2], use for C99 isunordered() +double_wrapper_section __aeabi_dcmpun +wrapper_func __aeabi_dcmpun + movs r0, #1 + lsls r0, #21 + lsls r2, r1, #1 + adds r2, r0 + bhi 1f + lsls r2, r3, #1 + adds r2, r0 + bhi 1f + movs r0, #0 + bx lr +1: + movs r0, #1 + bx lr + + movs r0, #0 + bx lr + +// double FUNC_NAME(__aeabi_ui2d)(unsigned) unsigned to double (double precision) conversion +double_wrapper_section __aeabi_ui2d + shimmable_table_tail_call SF_TABLE_UINT2FLOAT uint2double_shim + +double_wrapper_section __aeabi_i2d + +wrapper_func __aeabi_ui2d + movs r1, #0 + cmp r0, #0 + bne 2f +1: + bx lr +// double FUNC_NAME(__aeabi_i2d)(int) integer to double (double precision) conversion +wrapper_func __aeabi_i2d + asrs r1, r0, #31 + eors r0, r1 + subs r0, r1 + beq 1b + lsls r1, #31 +2: + push {r0, r1, r4, lr} + ldr r3, =sf_clz_func + ldr r3, [r3] + blx r3 + pop {r2, r3} + adds r4, r0, #1 + lsls r2, r4 + lsls r0, r2, #20 + lsrs r2, #12 + ldr r1,=#1055 + subs r1, r4 + lsls r1, #20 + orrs r1, r3 + orrs r1, r2 + pop {r4, pc} + +// int FUNC_NAME(__aeabi_d2iz)(double) double (double precision) to integer C-style conversion [3] +double_wrapper_section __aeabi_d2iz +wrapper_func __aeabi_d2iz +regular_func double2int_z + push {r4, lr} + lsls r4, r1, #1 + lsrs r2, r4, #21 + movs r3, #0x80 + adds r2, r3 + lsls r3, #3 + subs r2, r3 + lsls r3, #21 + cmp r2, #126 + ble 1f + subs r2, #158 + bge 2f + asrs r4, r1, #31 + lsls r1, #12 + lsrs r1, #1 + orrs r1, r3 + negs r2, r2 + lsrs r1, r2 + lsls r4, #1 + adds r4, #1 + adds r2, #21 + cmp r2, #32 + bge 3f + lsrs r0, r2 + orrs r0, r1 + muls r0, r4 + pop {r4, pc} +1: + movs r0, #0 + pop {r4, pc} +3: + mov r0, r1 + muls r0, r4 + pop {r4, pc} +2: + // overflow + lsrs r0, r1, #31 + adds r0, r3 + subs r0, #1 + pop {r4, pc} + +double_section double2int +regular_func double2int + shimmable_table_tail_call SF_TABLE_FLOAT2INT double2int_shim + +// unsigned FUNC_NAME(__aeabi_d2uiz)(double) double (double precision) to unsigned C-style conversion [3] +double_wrapper_section __aeabi_d2uiz +wrapper_func __aeabi_d2uiz +regular_func double2uint + shimmable_table_tail_call SF_TABLE_FLOAT2UINT double2uint_shim + +double_section fix2double +regular_func fix2double + shimmable_table_tail_call SF_TABLE_FIX2FLOAT fix2double_shim + +double_section ufix2double +regular_func ufix2double + shimmable_table_tail_call SF_TABLE_UFIX2FLOAT ufix2double_shim + +double_section fix642double +regular_func fix642double + shimmable_table_tail_call SF_TABLE_FIX642FLOAT fix642double_shim + +double_section ufix2double +regular_func ufix642double + shimmable_table_tail_call SF_TABLE_UFIX642FLOAT ufix642double_shim + +// double FUNC_NAME(__aeabi_l2d)(long long) long long to double (double precision) conversion +double_wrapper_section __aeabi_l2d +wrapper_func __aeabi_l2d + shimmable_table_tail_call SF_TABLE_INT642FLOAT int642double_shim + +// double FUNC_NAME(__aeabi_l2f)(long long) long long to double (double precision) conversion +double_wrapper_section __aeabi_ul2d +wrapper_func __aeabi_ul2d + shimmable_table_tail_call SF_TABLE_UINT642FLOAT uint642double_shim + +// long long FUNC_NAME(__aeabi_d2lz)(double) double (double precision) to long long C-style conversion [3] +double_wrapper_section __aeabi_d2lz +wrapper_func __aeabi_d2lz +regular_func double2int64_z + cmn r1, r1 + bcc double2int64 + push {lr} + lsls r1, #1 + lsrs r1, #1 + movs r2, #0 + bl double2ufix64 + cmp r1, #0 + bmi 1f + movs r2, #0 + rsbs r0, #0 + sbcs r2, r1 + mov r1, r2 + pop {pc} +1: + movs r1, #128 + lsls r1, #24 + movs r0, #0 + pop {pc} + +double_section double2int64 +regular_func double2int64 + shimmable_table_tail_call SF_TABLE_FLOAT2INT64 double2int64_shim + +// unsigned long long FUNC_NAME(__aeabi_d2ulz)(double) double to unsigned long long C-style conversion [3] +double_wrapper_section __aeabi_d2ulz +wrapper_func __aeabi_d2ulz + shimmable_table_tail_call SF_TABLE_FLOAT2UINT64 double2uint64_shim + +double_section double2fix64 +regular_func double2fix64 + shimmable_table_tail_call SF_TABLE_FLOAT2FIX64 double2fix64_shim + +double_section double2ufix64 +regular_func double2ufix64 + shimmable_table_tail_call SF_TABLE_FLOAT2UFIX64 double2ufix64_shim + +double_section double2fix +regular_func double2fix + shimmable_table_tail_call SF_TABLE_FLOAT2FIX double2fix_shim + +double_section double2ufix +regular_func double2ufix + shimmable_table_tail_call SF_TABLE_FLOAT2UFIX double2ufix_shim + +double_wrapper_section __aeabi_d2f +1: +#if PICO_DOUBLE_PROPAGATE_NANS + // copy sign bit and 23 NAN id bits into sign bit and significant id bits, also set high id bit + + lsrs r0, #30 + lsls r2, r1, #12 + lsrs r2, #9 + asrs r1, #22 + lsls r1, #22 + orrs r0, r1 + orrs r0, r2 + bx lr +#endif +wrapper_func __aeabi_d2f +#if PICO_DOUBLE_PROPAGATE_NANS + movs r3, #1 + lsls r3, #21 + lsls r2, r1, #1 + adds r2, r3 + bhi 1b +#endif + // note double->float in double table at same index as float->double in double table + shimmable_table_tail_call SF_TABLE_FLOAT2DOUBLE double2float_shim + +double_wrapper_section srqt +wrapper_func_d1 sqrt + shimmable_table_tail_call SF_TABLE_FSQRT dsqrt_shim + +double_wrapper_section sincostan_remainder +regular_func sincostan_remainder + ldr r2, =0x54442D18 // 2 * M_PI + ldr r3, =0x401921FB + push {lr} + bl remainder + pop {pc} + +double_wrapper_section cos +#don't use _d1 as we're doing a range check anyway and infinites/nans are bigger than 1024 +wrapper_func cos + // rom version only works for -1024 < angle < 1024 + lsls r2, r1, #2 + bcc 1f + lsrs r2, #22 + cmp r2, #9 + bge 2f +1: + shimmable_table_tail_call SF_TABLE_FCOS dcos_shim +2: +#if PICO_DOUBLE_PROPAGATE_NANS + lsls r2, r1, #1 + asrs r2, #21 + adds r2, #1 + bne 3f + // infinite to nan + movs r2, #1 + lsls r2, #19 + orrs r1, r2 + bx lr +3: +#endif + push {lr} + bl sincostan_remainder + pop {r2} + mov lr, r2 + b 1b + +double_wrapper_section sin +#don't use _d1 as we're doing a range check anyway and infinites/nans are bigger than 1024 +wrapper_func sin + // rom version only works for -1024 < angle < 1024 + lsls r2, r1, #2 + bcc 1f + lsrs r2, #22 + cmp r2, #9 + bge 2f +1: + shimmable_table_tail_call SF_TABLE_FSIN dsin_shim +2: +#if PICO_DOUBLE_PROPAGATE_NANS + lsls r2, r1, #1 + asrs r2, #21 + adds r2, #1 + bne 3f + // infinite to nan + movs r2, #1 + lsls r2, #19 + orrs r1, r2 + bx lr +3: +#endif + push {lr} + bl sincostan_remainder + pop {r2} + mov lr, r2 + b 1b + +double_wrapper_section sincos + // out of line remainder code for abs(angle)>=1024 +2: +#if PICO_DOUBLE_PROPAGATE_NANS + lsls r2, r1, #1 + asrs r2, #21 + adds r2, #1 + bne 3f + // infinite to nan + movs r2, #1 + lsls r2, #19 + orrs r1, r2 + pop {r4-r5} + stmia r4!, {r0, r1} + stmia r5!, {r0, r1} + pop {r4, r5, pc} +3: +#endif + push {lr} + bl sincostan_remainder + pop {r2} + mov lr, r2 + b 1f + +wrapper_func sincos + push {r2-r5, lr} + // rom version only works for -1024 < angle < 1024 + lsls r2, r1, #2 + bcc 1f + lsrs r2, #22 + cmp r2, #9 + bge 2b +1: + + bl 2f + pop {r4-r5} + stmia r4!, {r0, r1} + stmia r5!, {r2, r3} + pop {r4, r5, pc} + +2: + shimmable_table_tail_call SF_TABLE_V3_FSINCOS sincos_shim_bootstrap +#if PICO_DOUBLE_PROPAGATE_NANS +.align 2 +1: + pop {r2, r3} + stmia r2!, {r0, r1} + mov lr, r3 + pop {r3} + stmia r3!, {r0, r1} + bx lr +#endif +.thumb_func +sincos_shim_bootstrap: + push {r2, r3, r4} + movs r3, #0x13 + ldrb r3, [r3] +#if PICO_DOUBLE_SUPPORT_ROM_V1 + cmp r3, #1 + bne 1f + ldr r3, =dsincos_shim + b 2f +#endif +1: + ldr r3, =dsincos_shim_v2 +2: + ldr r2, =sd_table + str r3, [r2, #SF_TABLE_V3_FSINCOS] + str r3, [sp, #8] + pop {r2, r3, pc} +.thumb_func +dsincos_shim_v2: + push {r4-r7,r14} + bl push_r8_r11 + bl v2_rom_dsincos_internal + mov r12,r0 @ save ε + bl v2_rom_dcos_finish + push {r0,r1} + mov r0,r12 + bl v2_rom_dsin_finish + pop {r2,r3} + bl pop_r8_r11 + pop {r4-r7,r15} +.thumb_func +v2_rom_dsincos_internal: + push {r0, lr} + ldr r0, =0x3855 + str r0, [sp, #4] + pop {r0, pc} +.thumb_func +v2_rom_dcos_finish: + push {r0, r1} + ldr r0, =0x389d + str r0, [sp, #4] + pop {r0, pc} +.thumb_func +v2_rom_dsin_finish: + push {r0, r1} + ldr r0, =0x38d9 + str r0, [sp, #4] + pop {r0, pc} + +double_wrapper_section tan +#don't use _d1 as we're doing a range check anyway and infinites/nans are bigger than 1024 +wrapper_func tan + // rom version only works for -1024 < angle < 1024 + lsls r2, r1, #2 + bcc 1f + lsrs r2, #22 + cmp r2, #9 + bge 2f +1: + shimmable_table_tail_call SF_TABLE_FTAN dtan_shim +2: +#if PICO_DOUBLE_PROPAGATE_NANS + lsls r2, r1, #1 + asrs r2, #21 + adds r2, #1 + bne 3f + // infinite to nan + movs r2, #1 + lsls r2, #19 + orrs r1, r2 + bx lr +3: +#endif + push {lr} + bl sincostan_remainder + pop {r2} + mov lr, r2 + b 1b + +double_wrapper_section atan2 +wrapper_func_d2 atan2 + shimmable_table_tail_call SF_TABLE_FATAN2 datan2_shim + +double_wrapper_section exp +wrapper_func_d1 exp + shimmable_table_tail_call SF_TABLE_FEXP dexp_shim + +double_wrapper_section log +wrapper_func_d1 log + shimmable_table_tail_call SF_TABLE_FLN dln_shim + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_init_rom.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_init_rom.c new file mode 100644 index 0000000000..82950b4150 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_init_rom.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "pico/bootrom.h" +#include "pico/bootrom/sf_table.h" + +// NOTE THIS FUNCTION TABLE IS NOT PUBLIC OR NECESSARILY COMPLETE... +// IT IS ***NOT*** SAFE TO CALL THESE FUNCTION POINTERS FROM ARBITRARY CODE +uint32_t sd_table[SF_TABLE_V2_SIZE / 2]; + +#if !PICO_DOUBLE_SUPPORT_ROM_V1 +static __attribute__((noreturn)) void missing_double_func_shim() { + panic("missing double function"); +} +#endif +extern void double_table_shim_on_use_helper(); + +void __aeabi_double_init() { + int rom_version = rp2040_rom_version(); +#if PICO_DOUBLE_SUPPORT_ROM_V1 + if (rom_version == 1) { + + // this is a little tricky.. we only want to pull in a shim if the corresponding function + // is called. to that end we include a SVC instruction with the table offset as the call number + // followed by the shim function pointer inside the actual wrapper function. that way if the wrapper + // function is garbage collected, so is the shim function. + // + // double_table_shim_on_use_helper expects this SVC instruction in the calling code soon after the address + // pointed to by IP and patches the double_table entry with the real shim the first time the function is called. + for(uint i=0; i= 2) { + void *rom_table = rom_data_lookup(rom_table_code('S', 'D')); + assert(*((uint8_t *)(((void *)rom_data_lookup(rom_table_code('S', 'F')))-2)) * 4 >= SF_TABLE_V2_SIZE); + memcpy(&sd_table, rom_table, SF_TABLE_V2_SIZE); + if (rom_version == 2) { +#ifndef NDEBUG + if (*(uint16_t *)0x3854 != 0xb500 || // this is dsincos(_internal) + + *(uint16_t *)0x38d8 != 0x4649 || // this is dsin_finish + *(uint16_t *)0x389c != 0x4659 // this is dcos_finish + ) { + panic(NULL); + } +#endif + } + } + if (rom_version < 3) { + // we use the unused entry for SINCOS + sd_table[SF_TABLE_V3_FSINCOS / 4] = (uintptr_t) double_table_shim_on_use_helper; + } +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_math.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_math.c new file mode 100644 index 0000000000..41d4380e7c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_math.c @@ -0,0 +1,607 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "pico/types.h" +#include "pico/double.h" +#include "pico/platform.h" + +typedef uint64_t ui64; +typedef uint32_t ui32; +typedef int64_t i64; + +#define PINF ( HUGE_VAL) +#define MINF (-HUGE_VAL) +#define PZERO (+0.0) +#define MZERO (-0.0) + + +#define PI 3.14159265358979323846 +#define LOG2 0.69314718055994530941 +// Unfortunately in double precision ln(10) is very close to half-way between to representable numbers +#define LOG10 2.30258509299404568401 +#define LOG2E 1.44269504088896340737 +#define LOG10E 0.43429448190325182765 +#define ONETHIRD 0.33333333333333333333 + +#define PIf 3.14159265358979323846f +#define LOG2f 0.69314718055994530941f +#define LOG2Ef 1.44269504088896340737f +#define LOG10Ef 0.43429448190325182765f +#define ONETHIRDf 0.33333333333333333333f + +#define DUNPACK(x,e,m) e=((x)>>52)&0x7ff,m=((x)&0x000fffffffffffffULL)|0x0010000000000000ULL +#define DUNPACKS(x,s,e,m) s=((x)>>63),DUNPACK((x),(e),(m)) + +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Wstrict-aliasing\"") + +static inline bool disnan(double x) { + ui64 ix=*(i64*)&x; + // checks the top bit of the low 32 bit of the NAN, but it I think that is ok + return ((uint32_t)(ix >> 31)) > 0xffe00000u; +} + +#if PICO_DOUBLE_PROPAGATE_NANS +#define check_nan_d1(x) if (disnan((x))) return (x) +#define check_nan_d2(x,y) if (disnan((x))) return (x); else if (disnan((y))) return (y); +#else +#define check_nan_d1(x) ((void)0) +#define check_nan_d2(x,y) ((void)0) +#endif + +static inline int dgetsignexp(double x) { + ui64 ix=*(ui64*)&x; + return (ix>>52)&0xfff; +} + +static inline int dgetexp(double x) { + ui64 ix=*(ui64*)&x; + return (ix>>52)&0x7ff; +} + +static inline double dldexp(double x,int de) { + ui64 ix=*(ui64*)&x,iy; + int e; + e=dgetexp(x); + if(e==0||e==0x7ff) return x; + e+=de; + if(e<=0) iy=ix&0x8000000000000000ULL; // signed zero for underflow + else if(e>=0x7ff) iy=(ix&0x8000000000000000ULL)|0x7ff0000000000000ULL; // signed infinity on overflow + else iy=ix+((ui64)de<<52); + return *(double*)&iy; +} + +double WRAPPER_FUNC(ldexp)(double x, int de) { + check_nan_d1(x); + return dldexp(x, de); +} + + +static inline double dcopysign(double x,double y) { + ui64 ix=*(ui64*)&x,iy=*(ui64*)&y; + ix=((ix&0x7fffffffffffffffULL)|(iy&0x8000000000000000ULL)); + return *(double*)&ix; +} + +double WRAPPER_FUNC(copysign)(double x, double y) { + check_nan_d2(x,y); + return dcopysign(x, y); +} +static inline int diszero(double x) { return dgetexp (x)==0; } +static inline int dispzero(double x) { return dgetsignexp(x)==0; } +static inline int dismzero(double x) { return dgetsignexp(x)==0x800; } +static inline int disinf(double x) { return dgetexp (x)==0x7ff; } +static inline int dispinf(double x) { return dgetsignexp(x)==0x7ff; } +static inline int disminf(double x) { return dgetsignexp(x)==0xfff; } + +static inline int disint(double x) { + ui64 ix=*(ui64*)&x,m; + int e=dgetexp(x); + if(e==0) return 1; // 0 is an integer + e-=0x3ff; // remove exponent bias + if(e<0) return 0; // |x|<1 + e=52-e; // bit position in mantissa with significance 1 + if(e<=0) return 1; // |x| large, so must be an integer + m=(1ULL<>e)&1; +} + +static inline int disstrictneg(double x) { + ui64 ix=*(ui64*)&x; + if(diszero(x)) return 0; + return ix>>63; +} + +static inline int disneg(double x) { + ui64 ix=*(ui64*)&x; + return ix>>63; +} + +static inline double dneg(double x) { + ui64 ix=*(ui64*)&x; + ix^=0x8000000000000000ULL; + return *(double*)&ix; +} + +static inline int dispo2(double x) { + ui64 ix=*(ui64*)&x; + if(diszero(x)) return 0; + if(disinf(x)) return 0; + ix&=0x000fffffffffffffULL; + return ix==0; +} + +static inline double dnan_or(double x) { +#if PICO_DOUBLE_PROPAGATE_NANS + return NAN; +#else + return x; +#endif +} + +double WRAPPER_FUNC(trunc)(double x) { + check_nan_d1(x); + ui64 ix=*(ui64*)&x,m; + int e=dgetexp(x); + e-=0x3ff; // remove exponent bias + if(e<0) { // |x|<1 + ix&=0x8000000000000000ULL; + return *(double*)&ix; + } + e=52-e; // bit position in mantissa with significance 1 + if(e<=0) return x; // |x| large, so must be an integer + m=(1ULL<=5+0x3ff) { // |x|>=32? + if(!disneg(x)) return 1; // 1 << exp 2x; avoid generating infinities later + else return -1; // 1 >> exp 2x + } + u=exp(dldexp(x,1)); + return (u-1)/(u+1); +} + +double WRAPPER_FUNC(asinh)(double x) { + check_nan_d1(x); + int e; + e=dgetexp(x); + if(e>=32+0x3ff) { // |x|>=2^32? + if(!disneg(x)) return log( x )+LOG2; // 1/x^2 << 1 + else return dneg(log(dneg(x))+LOG2); // 1/x^2 << 1 + } + if(x>0) return log(sqrt(x*x+1)+x); + else return dneg(log(sqrt(x*x+1)-x)); +} + +double WRAPPER_FUNC(acosh)(double x) { + check_nan_d1(x); + int e; + if(disneg(x)) x=dneg(x); + e=dgetexp(x); + if(e>=32+0x3ff) return log(x)+LOG2; // |x|>=2^32? + return log(sqrt((x-1)*(x+1))+x); +} + +double WRAPPER_FUNC(atanh)(double x) { + check_nan_d1(x); + return dldexp(log((1+x)/(1-x)),-1); +} + +double WRAPPER_FUNC(exp2)(double x) { + check_nan_d1(x); + int e; + // extra check for disminf as this catches -Nan, and x<=-4096 doesn't. + if (disminf(x) || x<=-4096) return 0; // easily underflows + else if (x>=4096) return PINF; // easily overflows + e=(int)round(x); + x-=e; + return dldexp(exp(x*LOG2),e); +} +double WRAPPER_FUNC(log2)(double x) { check_nan_d1(x); return log(x)*LOG2E; } +double WRAPPER_FUNC(exp10)(double x) { check_nan_d1(x); return pow(10,x); } +double WRAPPER_FUNC(log10)(double x) { check_nan_d1(x); return log(x)*LOG10E; } + +// todo these are marked as lofi +double WRAPPER_FUNC(expm1(double x) { check_nan_d1(x); return exp)(x)-1; } +double WRAPPER_FUNC(log1p(double x) { check_nan_d1(x); return log)(1+x); } +double WRAPPER_FUNC(fma)(double x,double y,double z) { check_nan_d1(x); return x*y+z; } + +// general power, x>0, finite +static double dpow_1(double x,double y) { + int a,b,c; + double t,rt,u,v,v0,v1,w,ry; + a=dgetexp(x)-0x3ff; + u=log2(dldexp(x,-a)); // now log_2 x = a+u + if(u>0.5) u-=1,a++; // |u|<=~0.5 + if(a==0) return exp2(u*y); + // here |log_2 x| >~0.5 + if(y>= 4096) { // then easily over/underflows + if(a<0) return 0; + return PINF; + } + if(y<=-4096) { // then easily over/underflows + if(a<0) return PINF; + return 0; + } + ry=round(y); + v=y-ry; + v0=dldexp(round(ldexp(v,26)),-26); + v1=v-v0; + b=(int)ry; // guaranteed to fit in an int; y=b+v0+v1 + // now the result is exp2( (a+u) * (b+v0+v1) ) + c=a*b; // integer + t=a*v0; + rt=round(t); + c+=(int)rt; + w=t-rt; + t=a*v1; + w+=t; + t=u*b; + rt=round(t); + c+=(int)rt; + w+=t-rt; + w+=u*v; + return dldexp(exp2(w),c); +} + +static double dpow_int2(double x,int y) { + double u; + if(y==1) return x; + u=dpow_int2(x,y/2); + u*=u; + if(y&1) u*=x; + return u; +} + +// for the case where x not zero or infinity, y small and not zero +static inline double dpowint_1(double x,int y) { + if(y<0) x=1/x,y=-y; + return dpow_int2(x,y); +} + +// for the case where x not zero or infinity +static double dpowint_0(double x,int y) { + int e; + if(disneg(x)) { + if(disoddint(y)) return dneg(dpowint_0(dneg(x),y)); + else return dpowint_0(dneg(x),y); + } + if(dispo2(x)) { + e=dgetexp(x)-0x3ff; + if(y>=2048) y= 2047; // avoid overflow + if(y<-2048) y=-2048; + y*=e; + return dldexp(1,y); + } + if(y==0) return 1; + if(y>=-32&&y<=32) return dpowint_1(x,y); + return dpow_1(x,y); +} + +double WRAPPER_FUNC(powint)(double x,int y) { + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") + if(x==1.0||y==0) return 1; + _Pragma("GCC diagnostic pop") + check_nan_d1(x); + if(diszero(x)) { + if(y>0) { + if(y&1) return x; + else return 0; + } + if((y&1)) return dcopysign(PINF,x); + return PINF; + } + if(dispinf(x)) { + if(y<0) return 0; + else return PINF; + } + if(disminf(x)) { + if(y>0) { + if((y&1)) return MINF; + else return PINF; + } + if((y&1)) return MZERO; + else return PZERO; + } + return dpowint_0(x,y); +} + +// for the case where y is guaranteed a finite integer, x not zero or infinity +static double dpow_0(double x,double y) { + int e,p; + if(disneg(x)) { + if(disoddint(y)) return dneg(dpow_0(dneg(x),y)); + else return dpow_0(dneg(x),y); + } + p=(int)y; + if(dispo2(x)) { + e=dgetexp(x)-0x3ff; + if(p>=2048) p= 2047; // avoid overflow + if(p<-2048) p=-2048; + p*=e; + return dldexp(1,p); + } + if(p==0) return 1; + if(p>=-32&&p<=32) return dpowint_1(x,p); + return dpow_1(x,y); +} + +double WRAPPER_FUNC(pow)(double x,double y) { + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") + + if(x==1.0||diszero(y)) return 1; + check_nan_d2(x, y); + if(x==-1.0&&disinf(y)) return 1; + _Pragma("GCC diagnostic pop") + + if(diszero(x)) { + if(!disneg(y)) { + if(disoddint(y)) return x; + else return 0; + } + if(disoddint(y)) return dcopysign(PINF,x); + return PINF; + } + if(dispinf(x)) { + if(disneg(y)) return 0; + else return PINF; + } + if(disminf(x)) { + if(!disneg(y)) { + if(disoddint(y)) return MINF; + else return PINF; + } + if(disoddint(y)) return MZERO; + else return PZERO; + } + if(dispinf(y)) { + if(dgetexp(x)<0x3ff) return PZERO; + else return PINF; + } + if(disminf(y)) { + if(dgetexp(x)<0x3ff) return PINF; + else return PZERO; + } + if(disint(y)) return dpow_0(x,y); + if(disneg(x)) return PINF; + return dpow_1(x,y); +} + +double WRAPPER_FUNC(hypot)(double x,double y) { + check_nan_d2(x, y); + int ex,ey; + ex=dgetexp(x); ey=dgetexp(y); + if(ex>=0x3ff+400||ey>=0x3ff+400) { // overflow, or nearly so + x=dldexp(x,-600),y=dldexp(y,-600); + return dldexp(sqrt(x*x+y*y), 600); + } + else if(ex<=0x3ff-400&&ey<=0x3ff-400) { // underflow, or nearly so + x=dldexp(x, 600),y=dldexp(y, 600); + return dldexp(sqrt(x*x+y*y),-600); + } + return sqrt(x*x+y*y); +} + +double WRAPPER_FUNC(cbrt)(double x) { + check_nan_d1(x); + int e; + if(disneg(x)) return dneg(cbrt(dneg(x))); + if(diszero(x)) return dcopysign(PZERO,x); + e=dgetexp(x)-0x3ff; + e=(e*0x5555+0x8000)>>16; // ~e/3, rounded + x=dldexp(x,-e*3); + x=exp(log(x)*ONETHIRD); + return dldexp(x,e); +} + +// reduces mx*2^e modulo my, returning bottom bits of quotient at *pquo +// 2^52<=|mx|,my<2^53, e>=0; 0<=result0) { + r=0xffffffffU/(ui32)(my>>36); // reciprocal estimate Q16 + } + while(e>0) { + s=e; if(s>12) s=12; // gain up to 12 bits on each iteration + q=(mx>>38)*r; // Q30 + q=((q>>(29-s))+1)>>1; // Q(s), rounded + mx=(mx<=my) mx-=my,quo++; // when e==0 mx can be nearly as big as 2my + if(mx>=my) mx-=my,quo++; + if(mx<0) mx+=my,quo--; + if(mx<0) mx+=my,quo--; + if(pquo) *pquo=quo; + return mx; +} + +double WRAPPER_FUNC(fmod)(double x,double y) { + check_nan_d2(x, y); + ui64 ix=*(ui64*)&x,iy=*(ui64*)&y; + int sx,ex,ey; + i64 mx,my; + DUNPACKS(ix,sx,ex,mx); + DUNPACK(iy,ey,my); + if(ex==0x7ff) return dnan_or(PINF); + if(ey==0) return PINF; + if(ex==0) { + if(!disneg(x)) return PZERO; + return MZERO; + } + if(ex|y|/2 + mx-=my+my; + ey--; + q=1; + } else { // x<-|y|/2 + mx=my+my-mx; + ey--; + q=-1; + } + } + else { + if(sx) mx=-mx; + mx=drem_0(mx,my,ex-ey,&q); + if(mx+mx>my || (mx+mx==my&&(q&1)) ) { // |x|>|y|/2, or equality and an odd quotient? + mx-=my; + q++; + } + } + if(sy) q=-q; + if(quo) *quo=q; + return fix642double(mx,0x3ff-ey+52); +} + +double WRAPPER_FUNC(drem)(double x,double y) { check_nan_d2(x, y); return remquo(x,y,0); } + +double WRAPPER_FUNC(remainder)(double x,double y) { check_nan_d2(x, y); return remquo(x,y,0); } + +_Pragma("GCC diagnostic pop") // strict-aliasing \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_none.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_none.S new file mode 100644 index 0000000000..feded31cb6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_none.S @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/asm_helper.S" +#include "pico/bootrom/sf_table.h" + +.syntax unified +.cpu cortex-m0plus +.thumb + + wrapper_func __aeabi_dadd + wrapper_func __aeabi_ddiv + wrapper_func __aeabi_dmul + wrapper_func __aeabi_drsub + wrapper_func __aeabi_dsub + wrapper_func __aeabi_cdcmpeq + wrapper_func __aeabi_cdrcmple + wrapper_func __aeabi_cdcmple + wrapper_func __aeabi_dcmpeq + wrapper_func __aeabi_dcmplt + wrapper_func __aeabi_dcmple + wrapper_func __aeabi_dcmpge + wrapper_func __aeabi_dcmpgt + wrapper_func __aeabi_dcmpun + wrapper_func __aeabi_i2d + wrapper_func __aeabi_l2d + wrapper_func __aeabi_ui2d + wrapper_func __aeabi_ul2d + wrapper_func __aeabi_d2iz + wrapper_func __aeabi_d2lz + wrapper_func __aeabi_d2uiz + wrapper_func __aeabi_d2ulz + wrapper_func __aeabi_d2f + wrapper_func sqrt + wrapper_func cos + wrapper_func sin + wrapper_func tan + wrapper_func atan2 + wrapper_func exp + wrapper_func log + + wrapper_func ldexp + wrapper_func copysign + wrapper_func trunc + wrapper_func floor + wrapper_func ceil + wrapper_func round + wrapper_func sincos + wrapper_func asin + wrapper_func acos + wrapper_func atan + wrapper_func sinh + wrapper_func cosh + wrapper_func tanh + wrapper_func asinh + wrapper_func acosh + wrapper_func atanh + wrapper_func exp2 + wrapper_func log2 + wrapper_func exp10 + wrapper_func log10 + wrapper_func pow + wrapper_func powint + wrapper_func hypot + wrapper_func cbrt + wrapper_func fmod + wrapper_func drem + wrapper_func remainder + wrapper_func remquo + wrapper_func expm1 + wrapper_func log1p + wrapper_func fma + + push {lr} // keep stack trace sane + ldr r0, =str + bl panic + +str: + .asciz "double support is disabled" \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S new file mode 100644 index 0000000000..63e7be32dc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S @@ -0,0 +1,2184 @@ +/** + * Copyright (c) 2020 Mark Owen https://www.quinapalus.com . + * + * Raspberry Pi (Trading) Ltd (Licensor) hereby grants to you a non-exclusive license to use the software solely on a + * Raspberry Pi Pico device. No other use is permitted under the terms of this license. + * + * This software is also available from the copyright owner under GPLv2 licence. + * + * THIS SOFTWARE IS PROVIDED BY THE LICENSOR AND COPYRIGHT OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE LICENSOR OR COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "pico/asm_helper.S" + +.syntax unified +.cpu cortex-m0plus +.thumb + +.macro double_section name +// todo separate flag for shims? +#if PICO_DOUBLE_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +double_section double_table_shim_on_use_helper +regular_func double_table_shim_on_use_helper + push {r0-r2, lr} + mov r0, ip +#ifndef NDEBUG + // sanity check to make sure we weren't called by non (shimmable_) table_tail_call macro + cmp r0, #0 + bne 1f + bkpt #0 +#endif +1: + ldrh r1, [r0] + lsrs r2, r1, #8 + adds r0, #2 + cmp r2, #0xdf + bne 1b + uxtb r1, r1 // r1 holds table offset + lsrs r2, r0, #2 + bcc 1f + // unaligned + ldrh r2, [r0, #0] + ldrh r0, [r0, #2] + lsls r0, #16 + orrs r0, r2 + b 2f +1: + ldr r0, [r0] +2: + ldr r2, =sd_table + str r0, [r2, r1] + str r0, [sp, #12] + pop {r0-r2, pc} + +#if PICO_DOUBLE_SUPPORT_ROM_V1 +// Note that the V1 ROM has no double support, so this is basically the identical +// library, and shim inter-function calls do not bother to redirect back thru the +// wrapper functions + +.equ use_hw_div,1 +.equ IOPORT ,0xd0000000 +.equ DIV_UDIVIDEND,0x00000060 +.equ DIV_UDIVISOR ,0x00000064 +.equ DIV_QUOTIENT ,0x00000070 +.equ DIV_CSR ,0x00000078 + +@ Notation: +@ rx:ry means the concatenation of rx and ry with rx having the less significant bits + +.equ debug,0 +.macro mdump k +.if debug + push {r0-r3} + push {r14} + push {r0-r3} + bl osp + movs r0,#\k + bl o1ch + pop {r0-r3} + bl dump + bl osp + bl osp + ldr r0,[r13] + bl o8hex @ r14 + bl onl + pop {r0} + mov r14,r0 + pop {r0-r3} +.endif +.endm + + +@ IEEE double in ra:rb -> +@ mantissa in ra:rb 12Q52 (53 significant bits) with implied 1 set +@ exponent in re +@ sign in rs +@ trashes rt +.macro mdunpack ra,rb,re,rs,rt + lsrs \re,\rb,#20 @ extract sign and exponent + subs \rs,\re,#1 + lsls \rs,#20 + subs \rb,\rs @ clear sign and exponent in mantissa; insert implied 1 + lsrs \rs,\re,#11 @ sign + lsls \re,#21 + lsrs \re,#21 @ exponent + beq l\@_1 @ zero exponent? + adds \rt,\re,#1 + lsrs \rt,#11 + beq l\@_2 @ exponent != 0x7ff? then done +l\@_1: + movs \ra,#0 + movs \rb,#1 + lsls \rb,#20 + subs \re,#128 + lsls \re,#12 +l\@_2: +.endm + +@ IEEE double in ra:rb -> +@ signed mantissa in ra:rb 12Q52 (53 significant bits) with implied 1 +@ exponent in re +@ trashes rt0 and rt1 +@ +zero, +denormal -> exponent=-0x80000 +@ -zero, -denormal -> exponent=-0x80000 +@ +Inf, +NaN -> exponent=+0x77f000 +@ -Inf, -NaN -> exponent=+0x77e000 +.macro mdunpacks ra,rb,re,rt0,rt1 + lsrs \re,\rb,#20 @ extract sign and exponent + lsrs \rt1,\rb,#31 @ sign only + subs \rt0,\re,#1 + lsls \rt0,#20 + subs \rb,\rt0 @ clear sign and exponent in mantissa; insert implied 1 + lsls \re,#21 + bcc l\@_1 @ skip on positive + mvns \rb,\rb @ negate mantissa + rsbs \ra,#0 + bcc l\@_1 + adds \rb,#1 +l\@_1: + lsrs \re,#21 + beq l\@_2 @ zero exponent? + adds \rt0,\re,#1 + lsrs \rt0,#11 + beq l\@_3 @ exponent != 0x7ff? then done + subs \re,\rt1 +l\@_2: + movs \ra,#0 + lsls \rt1,#1 @ +ve: 0 -ve: 2 + adds \rb,\rt1,#1 @ +ve: 1 -ve: 3 + lsls \rb,#30 @ create +/-1 mantissa + asrs \rb,#10 + subs \re,#128 + lsls \re,#12 +l\@_3: +.endm + +double_section WRAPPER_FUNC_NAME(__aeabi_dsub) + +# frsub first because it is the only one that needs alignment +regular_func drsub_shim + push {r0-r3} + pop {r0-r1} + pop {r2-r3} + // fall thru + +regular_func dsub_shim + push {r4-r7,r14} + movs r4,#1 + lsls r4,#31 + eors r3,r4 @ flip sign on second argument + b da_entry @ continue in dadd + +.align 2 +double_section dadd_shim +regular_func dadd_shim + push {r4-r7,r14} +da_entry: + mdunpacks r0,r1,r4,r6,r7 + mdunpacks r2,r3,r5,r6,r7 + subs r7,r5,r4 @ ye-xe + subs r6,r4,r5 @ xe-ye + bmi da_ygtx +@ here xe>=ye: need to shift y down r6 places + mov r12,r4 @ save exponent + cmp r6,#32 + bge da_xrgty @ xe rather greater than ye? + adds r7,#32 + movs r4,r2 + lsls r4,r4,r7 @ rounding bit + sticky bits +da_xgty0: + movs r5,r3 + lsls r5,r5,r7 + lsrs r2,r6 + asrs r3,r6 + orrs r2,r5 +da_add: + adds r0,r2 + adcs r1,r3 +da_pack: +@ here unnormalised signed result (possibly 0) is in r0:r1 with exponent r12, rounding + sticky bits in r4 +@ Note that if a large normalisation shift is required then the arguments were close in magnitude and so we +@ cannot have not gone via the xrgty/yrgtx paths. There will therefore always be enough high bits in r4 +@ to provide a correct continuation of the exact result. +@ now pack result back up + lsrs r3,r1,#31 @ get sign bit + beq 1f @ skip on positive + mvns r1,r1 @ negate mantissa + mvns r0,r0 + movs r2,#0 + rsbs r4,#0 + adcs r0,r2 + adcs r1,r2 +1: + mov r2,r12 @ get exponent + lsrs r5,r1,#21 + bne da_0 @ shift down required? + lsrs r5,r1,#20 + bne da_1 @ normalised? + cmp r0,#0 + beq da_5 @ could mantissa be zero? +da_2: + adds r4,r4 + adcs r0,r0 + adcs r1,r1 + subs r2,#1 @ adjust exponent + lsrs r5,r1,#20 + beq da_2 +da_1: + lsls r4,#1 @ check rounding bit + bcc da_3 +da_4: + adds r0,#1 @ round up + bcc 2f + adds r1,#1 +2: + cmp r4,#0 @ sticky bits zero? + bne da_3 + lsrs r0,#1 @ round to even + lsls r0,#1 +da_3: + subs r2,#1 + bmi da_6 + adds r4,r2,#2 @ check if exponent is overflowing + lsrs r4,#11 + bne da_7 + lsls r2,#20 @ pack exponent and sign + add r1,r2 + lsls r3,#31 + add r1,r3 + pop {r4-r7,r15} + +da_7: +@ here exponent overflow: return signed infinity + lsls r1,r3,#31 + ldr r3,=#0x7ff00000 + orrs r1,r3 + b 1f +da_6: +@ here exponent underflow: return signed zero + lsls r1,r3,#31 +1: + movs r0,#0 + pop {r4-r7,r15} + +da_5: +@ here mantissa could be zero + cmp r1,#0 + bne da_2 + cmp r4,#0 + bne da_2 +@ inputs must have been of identical magnitude and opposite sign, so return +0 + pop {r4-r7,r15} + +da_0: +@ here a shift down by one place is required for normalisation + adds r2,#1 @ adjust exponent + lsls r6,r0,#31 @ save rounding bit + lsrs r0,#1 + lsls r5,r1,#31 + orrs r0,r5 + lsrs r1,#1 + cmp r6,#0 + beq da_3 + b da_4 + +da_xrgty: @ xe>ye and shift>=32 places + cmp r6,#60 + bge da_xmgty @ xe much greater than ye? + subs r6,#32 + adds r7,#64 + + movs r4,r2 + lsls r4,r4,r7 @ these would be shifted off the bottom of the sticky bits + beq 1f + movs r4,#1 +1: + lsrs r2,r2,r6 + orrs r4,r2 + movs r2,r3 + lsls r3,r3,r7 + orrs r4,r3 + asrs r3,r2,#31 @ propagate sign bit + b da_xgty0 + +da_ygtx: +@ here ye>xe: need to shift x down r7 places + mov r12,r5 @ save exponent + cmp r7,#32 + bge da_yrgtx @ ye rather greater than xe? + adds r6,#32 + movs r4,r0 + lsls r4,r4,r6 @ rounding bit + sticky bits +da_ygtx0: + movs r5,r1 + lsls r5,r5,r6 + lsrs r0,r7 + asrs r1,r7 + orrs r0,r5 + b da_add + +da_yrgtx: + cmp r7,#60 + bge da_ymgtx @ ye much greater than xe? + subs r7,#32 + adds r6,#64 + + movs r4,r0 + lsls r4,r4,r6 @ these would be shifted off the bottom of the sticky bits + beq 1f + movs r4,#1 +1: + lsrs r0,r0,r7 + orrs r4,r0 + movs r0,r1 + lsls r1,r1,r6 + orrs r4,r1 + asrs r1,r0,#31 @ propagate sign bit + b da_ygtx0 + +da_ymgtx: @ result is just y + movs r0,r2 + movs r1,r3 +da_xmgty: @ result is just x + movs r4,#0 @ clear sticky bits + b da_pack + +.ltorg + +@ equivalent of UMULL +@ needs five temporary registers +@ can have rt3==rx, in which case rx trashed +@ can have rt4==ry, in which case ry trashed +@ can have rzl==rx +@ can have rzh==ry +@ can have rzl,rzh==rt3,rt4 +.macro mul32_32_64 rx,ry,rzl,rzh,rt0,rt1,rt2,rt3,rt4 + @ t0 t1 t2 t3 t4 + @ (x) (y) + uxth \rt0,\rx @ xl + uxth \rt1,\ry @ yl + muls \rt0,\rt1 @ xlyl=L + lsrs \rt2,\rx,#16 @ xh + muls \rt1,\rt2 @ xhyl=M0 + lsrs \rt4,\ry,#16 @ yh + muls \rt2,\rt4 @ xhyh=H + uxth \rt3,\rx @ xl + muls \rt3,\rt4 @ xlyh=M1 + adds \rt1,\rt3 @ M0+M1=M + bcc l\@_1 @ addition of the two cross terms can overflow, so add carry into H + movs \rt3,#1 @ 1 + lsls \rt3,#16 @ 0x10000 + adds \rt2,\rt3 @ H' +l\@_1: + @ t0 t1 t2 t3 t4 + @ (zl) (zh) + lsls \rzl,\rt1,#16 @ ML + lsrs \rzh,\rt1,#16 @ MH + adds \rzl,\rt0 @ ZL + adcs \rzh,\rt2 @ ZH +.endm + +@ SUMULL: x signed, y unsigned +@ in table below ¯ means signed variable +@ needs five temporary registers +@ can have rt3==rx, in which case rx trashed +@ can have rt4==ry, in which case ry trashed +@ can have rzl==rx +@ can have rzh==ry +@ can have rzl,rzh==rt3,rt4 +.macro muls32_32_64 rx,ry,rzl,rzh,rt0,rt1,rt2,rt3,rt4 + @ t0 t1 t2 t3 t4 + @ ¯(x) (y) + uxth \rt0,\rx @ xl + uxth \rt1,\ry @ yl + muls \rt0,\rt1 @ xlyl=L + asrs \rt2,\rx,#16 @ ¯xh + muls \rt1,\rt2 @ ¯xhyl=M0 + lsrs \rt4,\ry,#16 @ yh + muls \rt2,\rt4 @ ¯xhyh=H + uxth \rt3,\rx @ xl + muls \rt3,\rt4 @ xlyh=M1 + asrs \rt4,\rt1,#31 @ M0sx (M1 sign extension is zero) + adds \rt1,\rt3 @ M0+M1=M + movs \rt3,#0 @ 0 + adcs \rt4,\rt3 @ ¯Msx + lsls \rt4,#16 @ ¯Msx<<16 + adds \rt2,\rt4 @ H' + + @ t0 t1 t2 t3 t4 + @ (zl) (zh) + lsls \rzl,\rt1,#16 @ M~ + lsrs \rzh,\rt1,#16 @ M~ + adds \rzl,\rt0 @ ZL + adcs \rzh,\rt2 @ ¯ZH +.endm + +@ SSMULL: x signed, y signed +@ in table below ¯ means signed variable +@ needs five temporary registers +@ can have rt3==rx, in which case rx trashed +@ can have rt4==ry, in which case ry trashed +@ can have rzl==rx +@ can have rzh==ry +@ can have rzl,rzh==rt3,rt4 +.macro muls32_s32_64 rx,ry,rzl,rzh,rt0,rt1,rt2,rt3,rt4 + @ t0 t1 t2 t3 t4 + @ ¯(x) (y) + uxth \rt0,\rx @ xl + uxth \rt1,\ry @ yl + muls \rt0,\rt1 @ xlyl=L + asrs \rt2,\rx,#16 @ ¯xh + muls \rt1,\rt2 @ ¯xhyl=M0 + asrs \rt4,\ry,#16 @ ¯yh + muls \rt2,\rt4 @ ¯xhyh=H + uxth \rt3,\rx @ xl + muls \rt3,\rt4 @ ¯xlyh=M1 + adds \rt1,\rt3 @ ¯M0+M1=M + asrs \rt3,\rt1,#31 @ Msx + bvc l\@_1 @ + mvns \rt3,\rt3 @ ¯Msx flip sign extension bits if overflow +l\@_1: + lsls \rt3,#16 @ ¯Msx<<16 + adds \rt2,\rt3 @ H' + + @ t0 t1 t2 t3 t4 + @ (zl) (zh) + lsls \rzl,\rt1,#16 @ M~ + lsrs \rzh,\rt1,#16 @ M~ + adds \rzl,\rt0 @ ZL + adcs \rzh,\rt2 @ ¯ZH +.endm + +@ can have rt2==rx, in which case rx trashed +@ can have rzl==rx +@ can have rzh==rt1 +.macro square32_64 rx,rzl,rzh,rt0,rt1,rt2 + @ t0 t1 t2 zl zh + uxth \rt0,\rx @ xl + muls \rt0,\rt0 @ xlxl=L + uxth \rt1,\rx @ xl + lsrs \rt2,\rx,#16 @ xh + muls \rt1,\rt2 @ xlxh=M + muls \rt2,\rt2 @ xhxh=H + lsls \rzl,\rt1,#17 @ ML + lsrs \rzh,\rt1,#15 @ MH + adds \rzl,\rt0 @ ZL + adcs \rzh,\rt2 @ ZH +.endm + +double_section dmul_shim + regular_func dmul_shim + push {r4-r7,r14} + mdunpack r0,r1,r4,r6,r5 + mov r12,r4 + mdunpack r2,r3,r4,r7,r5 + eors r7,r6 @ sign of result + add r4,r12 @ exponent of result + push {r0-r2,r4,r7} + +@ accumulate full product in r12:r5:r6:r7 + mul32_32_64 r0,r2, r0,r5, r4,r6,r7,r0,r5 @ XL*YL + mov r12,r0 @ save LL bits + + mul32_32_64 r1,r3, r6,r7, r0,r2,r4,r6,r7 @ XH*YH + + pop {r0} @ XL + mul32_32_64 r0,r3, r0,r3, r1,r2,r4,r0,r3 @ XL*YH + adds r5,r0 + adcs r6,r3 + movs r0,#0 + adcs r7,r0 + + pop {r1,r2} @ XH,YL + mul32_32_64 r1,r2, r1,r2, r0,r3,r4, r1,r2 @ XH*YL + adds r5,r1 + adcs r6,r2 + movs r0,#0 + adcs r7,r0 + +@ here r5:r6:r7 holds the product [1..4) in Q(104-32)=Q72, with extra LSBs in r12 + pop {r3,r4} @ exponent in r3, sign in r4 + lsls r1,r7,#11 + lsrs r2,r6,#21 + orrs r1,r2 + lsls r0,r6,#11 + lsrs r2,r5,#21 + orrs r0,r2 + lsls r5,#11 @ now r5:r0:r1 Q83=Q(51+32), extra LSBs in r12 + lsrs r2,r1,#20 + bne 1f @ skip if in range [2..4) + adds r5,r5 @ shift up so always [2..4) Q83, i.e. [1..2) Q84=Q(52+32) + adcs r0,r0 + adcs r1,r1 + subs r3,#1 @ correct exponent +1: + ldr r6,=#0x3ff + subs r3,r6 @ correct for exponent bias + lsls r6,#1 @ 0x7fe + cmp r3,r6 + bhs dm_0 @ exponent over- or underflow + lsls r5,#1 @ rounding bit to carry + bcc 1f @ result is correctly rounded + adds r0,#1 + movs r6,#0 + adcs r1,r6 @ round up + mov r6,r12 @ remaining sticky bits + orrs r5,r6 + bne 1f @ some sticky bits set? + lsrs r0,#1 + lsls r0,#1 @ round to even +1: + lsls r3,#20 + adds r1,r3 +dm_2: + lsls r4,#31 + add r1,r4 + pop {r4-r7,r15} + +@ here for exponent over- or underflow +dm_0: + bge dm_1 @ overflow? + adds r3,#1 @ would-be zero exponent? + bne 1f + adds r0,#1 + bne 1f @ all-ones mantissa? + adds r1,#1 + lsrs r7,r1,#21 + beq 1f + lsrs r1,#1 + b dm_2 +1: + lsls r1,r4,#31 + movs r0,#0 + pop {r4-r7,r15} + +@ here for exponent overflow +dm_1: + adds r6,#1 @ 0x7ff + lsls r1,r6,#20 + movs r0,#0 + b dm_2 + +.ltorg + +@ Approach to division y/x is as follows. +@ +@ First generate u1, an approximation to 1/x to about 29 bits. Multiply this by the top +@ 32 bits of y to generate a0, a first approximation to the result (good to 28 bits or so). +@ Calculate the exact remainder r0=y-a0*x, which will be about 0. Calculate a correction +@ d0=r0*u1, and then write a1=a0+d0. If near a rounding boundary, compute the exact +@ remainder r1=y-a1*x (which can be done using r0 as a basis) to determine whether to +@ round up or down. +@ +@ The calculation of 1/x is as given in dreciptest.c. That code verifies exhaustively +@ that | u1*x-1 | < 10*2^-32. +@ +@ More precisely: +@ +@ x0=(q16)x; +@ x1=(q30)x; +@ y0=(q31)y; +@ u0=(q15~)"(0xffffffffU/(unsigned int)roundq(x/x_ulp))/powq(2,16)"(x0); // q15 approximation to 1/x; "~" denotes rounding rather than truncation +@ v=(q30)(u0*x1-1); +@ u1=(q30)u0-(q30~)(u0*v); +@ +@ a0=(q30)(u1*y0); +@ r0=(q82)y-a0*x; +@ r0x=(q57)r0; +@ d0=r0x*u1; +@ a1=d0+a0; +@ +@ Error analysis +@ +@ Use Greek letters to represent the errors introduced by rounding and truncation. +@ +@ r₀ = y - a₀x +@ = y - [ u₁ ( y - α ) - β ] x where 0 ≤ α < 2^-31, 0 ≤ β < 2^-30 +@ = y ( 1 - u₁x ) + ( u₁α + β ) x +@ +@ Hence +@ +@ | r₀ / x | < 2 * 10*2^-32 + 2^-31 + 2^-30 +@ = 26*2^-32 +@ +@ r₁ = y - a₁x +@ = y - a₀x - d₀x +@ = r₀ - d₀x +@ = r₀ - u₁ ( r₀ - γ ) x where 0 ≤ γ < 2^-57 +@ = r₀ ( 1 - u₁x ) + u₁γx +@ +@ Hence +@ +@ | r₁ / x | < 26*2^-32 * 10*2^-32 + 2^-57 +@ = (260+128)*2^-64 +@ < 2^-55 +@ +@ Empirically it seems to be nearly twice as good as this. +@ +@ To determine correctly whether the exact remainder calculation can be skipped we need a result +@ accurate to < 0.25ulp. In the case where x>y the quotient will be shifted up one place for normalisation +@ and so 1ulp is 2^-53 and so the calculation above suffices. + +double_section ddiv_shim + regular_func ddiv_shim + push {r4-r7,r14} +ddiv0: @ entry point from dtan + mdunpack r2,r3,r4,r7,r6 @ unpack divisor + +.if use_hw_div + + movs r5,#IOPORT>>24 + lsls r5,#24 + movs r6,#0 + mvns r6,r6 + str r6,[r5,#DIV_UDIVIDEND] + lsrs r6,r3,#4 @ x0=(q16)x + str r6,[r5,#DIV_UDIVISOR] +@ if there are not enough cycles from now to the read of the quotient for +@ the divider to do its stuff we need a busy-wait here + +.endif + +@ unpack dividend by hand to save on register use + lsrs r6,r1,#31 + adds r6,r7 + mov r12,r6 @ result sign in r12b0; r12b1 trashed + lsls r1,#1 + lsrs r7,r1,#21 @ exponent + beq 1f @ zero exponent? + adds r6,r7,#1 + lsrs r6,#11 + beq 2f @ exponent != 0x7ff? then done +1: + movs r0,#0 + movs r1,#0 + subs r7,#64 @ less drastic fiddling of exponents to get 0/0, Inf/Inf correct + lsls r7,#12 +2: + subs r6,r7,r4 + lsls r6,#2 + add r12,r12,r6 @ (signed) exponent in r12[31..8] + subs r7,#1 @ implied 1 + lsls r7,#21 + subs r1,r7 + lsrs r1,#1 + +.if use_hw_div + + ldr r6,[r5,#DIV_QUOTIENT] + adds r6,#1 + lsrs r6,#1 + +.else + +@ this is not beautiful; could be replaced by better code that uses knowledge of divisor range + push {r0-r3} + movs r0,#0 + mvns r0,r0 + lsrs r1,r3,#4 @ x0=(q16)x + bl __aeabi_uidiv @ !!! this could (but apparently does not) trash R12 + adds r6,r0,#1 + lsrs r6,#1 + pop {r0-r3} + +.endif + +@ here +@ r0:r1 y mantissa +@ r2:r3 x mantissa +@ r6 u0, first approximation to 1/x Q15 +@ r12: result sign, exponent + + lsls r4,r3,#10 + lsrs r5,r2,#22 + orrs r5,r4 @ x1=(q30)x + muls r5,r6 @ u0*x1 Q45 + asrs r5,#15 @ v=u0*x1-1 Q30 + muls r5,r6 @ u0*v Q45 + asrs r5,#14 + adds r5,#1 + asrs r5,#1 @ round u0*v to Q30 + lsls r6,#15 + subs r6,r5 @ u1 Q30 + +@ here +@ r0:r1 y mantissa +@ r2:r3 x mantissa +@ r6 u1, second approximation to 1/x Q30 +@ r12: result sign, exponent + + push {r2,r3} + lsls r4,r1,#11 + lsrs r5,r0,#21 + orrs r4,r5 @ y0=(q31)y + mul32_32_64 r4,r6, r4,r5, r2,r3,r7,r4,r5 @ y0*u1 Q61 + adds r4,r4 + adcs r5,r5 @ a0=(q30)(y0*u1) + +@ here +@ r0:r1 y mantissa +@ r5 a0, first approximation to y/x Q30 +@ r6 u1, second approximation to 1/x Q30 +@ r12 result sign, exponent + + ldr r2,[r13,#0] @ xL + mul32_32_64 r2,r5, r2,r3, r1,r4,r7,r2,r3 @ xL*a0 + ldr r4,[r13,#4] @ xH + muls r4,r5 @ xH*a0 + adds r3,r4 @ r2:r3 now x*a0 Q82 + lsrs r2,#25 + lsls r1,r3,#7 + orrs r2,r1 @ r2 now x*a0 Q57; r7:r2 is x*a0 Q89 + lsls r4,r0,#5 @ y Q57 + subs r0,r4,r2 @ r0x=y-x*a0 Q57 (signed) + +@ here +@ r0 r0x Q57 +@ r5 a0, first approximation to y/x Q30 +@ r4 yL Q57 +@ r6 u1 Q30 +@ r12 result sign, exponent + + muls32_32_64 r0,r6, r7,r6, r1,r2,r3, r7,r6 @ r7:r6 r0x*u1 Q87 + asrs r3,r6,#25 + adds r5,r3 + lsls r3,r6,#7 @ r3:r5 a1 Q62 (but bottom 7 bits are zero so 55 bits of precision after binary point) +@ here we could recover another 7 bits of precision (but not accuracy) from the top of r7 +@ but these bits are thrown away in the rounding and conversion to Q52 below + +@ here +@ r3:r5 a1 Q62 candidate quotient [0.5,2) or so +@ r4 yL Q57 +@ r12 result sign, exponent + + movs r6,#0 + adds r3,#128 @ for initial rounding to Q53 + adcs r5,r5,r6 + lsrs r1,r5,#30 + bne dd_0 +@ here candidate quotient a1 is in range [0.5,1) +@ so 30 significant bits in r5 + + lsls r4,#1 @ y now Q58 + lsrs r1,r5,#9 @ to Q52 + lsls r0,r5,#23 + lsrs r3,#9 @ 0.5ulp-significance bit in carry: if this is 1 we may need to correct result + orrs r0,r3 + bcs dd_1 + b dd_2 +dd_0: +@ here candidate quotient a1 is in range [1,2) +@ so 31 significant bits in r5 + + movs r2,#4 + add r12,r12,r2 @ fix exponent; r3:r5 now effectively Q61 + adds r3,#128 @ complete rounding to Q53 + adcs r5,r5,r6 + lsrs r1,r5,#10 + lsls r0,r5,#22 + lsrs r3,#10 @ 0.5ulp-significance bit in carry: if this is 1 we may need to correct result + orrs r0,r3 + bcc dd_2 +dd_1: + +@ here +@ r0:r1 rounded result Q53 [0.5,1) or Q52 [1,2), but may not be correctly rounded-to-nearest +@ r4 yL Q58 or Q57 +@ r12 result sign, exponent +@ carry set + + adcs r0,r0,r0 + adcs r1,r1,r1 @ z Q53 with 1 in LSB + lsls r4,#16 @ Q105-32=Q73 + ldr r2,[r13,#0] @ xL Q52 + ldr r3,[r13,#4] @ xH Q20 + + movs r5,r1 @ zH Q21 + muls r5,r2 @ zH*xL Q73 + subs r4,r5 + muls r3,r0 @ zL*xH Q73 + subs r4,r3 + mul32_32_64 r2,r0, r2,r3, r5,r6,r7,r2,r3 @ xL*zL + rsbs r2,#0 @ borrow from low half? + sbcs r4,r3 @ y-xz Q73 (remainder bits 52..73) + + cmp r4,#0 + + bmi 1f + movs r2,#0 @ round up + adds r0,#1 + adcs r1,r2 +1: + lsrs r0,#1 @ shift back down to Q52 + lsls r2,r1,#31 + orrs r0,r2 + lsrs r1,#1 +dd_2: + add r13,#8 + mov r2,r12 + lsls r7,r2,#31 @ result sign + asrs r2,#2 @ result exponent + ldr r3,=#0x3fd + adds r2,r3 + ldr r3,=#0x7fe + cmp r2,r3 + bhs dd_3 @ over- or underflow? + lsls r2,#20 + adds r1,r2 @ pack exponent +dd_5: + adds r1,r7 @ pack sign + pop {r4-r7,r15} + +dd_3: + movs r0,#0 + cmp r2,#0 + bgt dd_4 @ overflow? + movs r1,r7 + pop {r4-r7,r15} + +dd_4: + adds r3,#1 @ 0x7ff + lsls r1,r3,#20 + b dd_5 + +.section SECTION_NAME(dsqrt_shim) +/* +Approach to square root x=sqrt(y) is as follows. + +First generate a3, an approximation to 1/sqrt(y) to about 30 bits. Multiply this by y +to give a4~sqrt(y) to about 28 bits and a remainder r4=y-a4^2. Then, because +d sqrt(y) / dy = 1 / (2 sqrt(y)) let d4=r4*a3/2 and then the value a5=a4+d4 is +a better approximation to sqrt(y). If this is near a rounding boundary we +compute an exact remainder y-a5*a5 to decide whether to round up or down. + +The calculation of a3 and a4 is as given in dsqrttest.c. That code verifies exhaustively +that | 1 - a3a4 | < 10*2^-32, | r4 | < 40*2^-32 and | r4/y | < 20*2^-32. + +More precisely, with "y" representing y truncated to 30 binary places: + +u=(q3)y; // 24-entry table +a0=(q8~)"1/sqrtq(x+x_ulp/2)"(u); // first approximation from table +p0=(q16)(a0*a0) * (q16)y; +r0=(q20)(p0-1); +dy0=(q15)(r0*a0); // Newton-Raphson correction term +a1=(q16)a0-dy0/2; // good to ~9 bits + +p1=(q19)(a1*a1)*(q19)y; +r1=(q23)(p1-1); +dy1=(q15~)(r1*a1); // second Newton-Raphson correction +a2x=(q16)a1-dy1/2; // good to ~16 bits +a2=a2x-a2x/1t16; // prevent overflow of a2*a2 in 32 bits + +p2=(a2*a2)*(q30)y; // Q62 +r2=(q36)(p2-1+1t-31); +dy2=(q30)(r2*a2); // Q52->Q30 +a3=(q31)a2-dy2/2; // good to about 30 bits +a4=(q30)(a3*(q30)y+1t-31); // good to about 28 bits + +Error analysis + + r₄ = y - a₄² + d₄ = 1/2 a₃r₄ + a₅ = a₄ + d₄ + r₅ = y - a₅² + = y - ( a₄ + d₄ )² + = y - a₄² - a₃a₄r₄ - 1/4 a₃²r₄² + = r₄ - a₃a₄r₄ - 1/4 a₃²r₄² + + | r₅ | < | r₄ | | 1 - a₃a₄ | + 1/4 r₄² + + a₅ = √y √( 1 - r₅/y ) + = √y ( 1 - 1/2 r₅/y + ... ) + +So to first order (second order being very tiny) + + √y - a₅ = 1/2 r₅/y + +and + + | √y - a₅ | < 1/2 ( | r₄/y | | 1 - a₃a₄ | + 1/4 r₄²/y ) + +From dsqrttest.c (conservatively): + + < 1/2 ( 20*2^-32 * 10*2^-32 + 1/4 * 40*2^-32*20*2^-32 ) + = 1/2 ( 200 + 200 ) * 2^-64 + < 2^-56 + +Empirically we see about 1ulp worst-case error including rounding at Q57. + +To determine correctly whether the exact remainder calculation can be skipped we need a result +accurate to < 0.25ulp at Q52, or 2^-54. +*/ + +dq_2: + bge dq_3 @ +Inf? + movs r1,#0 + b dq_4 + +dq_0: + lsrs r1,#31 + lsls r1,#31 @ preserve sign bit + lsrs r2,#21 @ extract exponent + beq dq_4 @ -0? return it + asrs r1,#11 @ make -Inf + b dq_4 + +dq_3: + ldr r1,=#0x7ff + lsls r1,#20 @ return +Inf +dq_4: + movs r0,#0 +dq_1: + bx r14 + +.align 2 +regular_func dsqrt_shim + lsls r2,r1,#1 + bcs dq_0 @ negative? + lsrs r2,#21 @ extract exponent + subs r2,#1 + ldr r3,=#0x7fe + cmp r2,r3 + bhs dq_2 @ catches 0 and +Inf + push {r4-r7,r14} + lsls r4,r2,#20 + subs r1,r4 @ insert implied 1 + lsrs r2,#1 + bcc 1f @ even exponent? skip + adds r0,r0,r0 @ odd exponent: shift up mantissa + adcs r1,r1,r1 +1: + lsrs r3,#2 + adds r2,r3 + lsls r2,#20 + mov r12,r2 @ save result exponent + +@ here +@ r0:r1 y mantissa Q52 [1,4) +@ r12 result exponent + + adr r4,drsqrtapp-8 @ first eight table entries are never accessed because of the mantissa's leading 1 + lsrs r2,r1,#17 @ y Q3 + ldrb r2,[r4,r2] @ initial approximation to reciprocal square root a0 Q8 + lsrs r3,r1,#4 @ first Newton-Raphson iteration + muls r3,r2 + muls r3,r2 @ i32 p0=a0*a0*(y>>14); // Q32 + asrs r3,r3,#12 @ i32 r0=p0>>12; // Q20 + muls r3,r2 + asrs r3,#13 @ i32 dy0=(r0*a0)>>13; // Q15 + lsls r2,#8 + subs r2,r3 @ i32 a1=(a0<<8)-dy0; // Q16 + + movs r3,r2 + muls r3,r3 + lsrs r3,#13 + lsrs r4,r1,#1 + muls r3,r4 @ i32 p1=((a1*a1)>>11)*(y>>11); // Q19*Q19=Q38 + asrs r3,#15 @ i32 r1=p1>>15; // Q23 + muls r3,r2 + asrs r3,#23 + adds r3,#1 + asrs r3,#1 @ i32 dy1=(r1*a1+(1<<23))>>24; // Q23*Q16=Q39; Q15 + subs r2,r3 @ i32 a2=a1-dy1; // Q16 + lsrs r3,r2,#16 + subs r2,r3 @ if(a2>=0x10000) a2=0xffff; to prevent overflow of a2*a2 + +@ here +@ r0:r1 y mantissa +@ r2 a2 ~ 1/sqrt(y) Q16 +@ r12 result exponent + + movs r3,r2 + muls r3,r3 + lsls r1,#10 + lsrs r4,r0,#22 + orrs r1,r4 @ y Q30 + mul32_32_64 r1,r3, r4,r3, r5,r6,r7,r4,r3 @ i64 p2=(ui64)(a2*a2)*(ui64)y; // Q62 r4:r3 + lsls r5,r3,#6 + lsrs r4,#26 + orrs r4,r5 + adds r4,#0x20 @ i32 r2=(p2>>26)+0x20; // Q36 r4 + uxth r5,r4 + muls r5,r2 + asrs r4,#16 + muls r4,r2 + lsrs r5,#16 + adds r4,r5 + asrs r4,#6 @ i32 dy2=((i64)r2*(i64)a2)>>22; // Q36*Q16=Q52; Q30 + lsls r2,#15 + subs r2,r4 + +@ here +@ r0 y low bits +@ r1 y Q30 +@ r2 a3 ~ 1/sqrt(y) Q31 +@ r12 result exponent + + mul32_32_64 r2,r1, r3,r4, r5,r6,r7,r3,r4 + adds r3,r3,r3 + adcs r4,r4,r4 + adds r3,r3,r3 + movs r3,#0 + adcs r3,r4 @ ui32 a4=((ui64)a3*(ui64)y+(1U<<31))>>31; // Q30 + +@ here +@ r0 y low bits +@ r1 y Q30 +@ r2 a3 Q31 ~ 1/sqrt(y) +@ r3 a4 Q30 ~ sqrt(y) +@ r12 result exponent + + square32_64 r3, r4,r5, r6,r5,r7 + lsls r6,r0,#8 + lsrs r7,r1,#2 + subs r6,r4 + sbcs r7,r5 @ r4=(q60)y-a4*a4 + +@ by exhaustive testing, r4 = fffffffc0e134fdc .. 00000003c2bf539c Q60 + + lsls r5,r7,#29 + lsrs r6,#3 + adcs r6,r5 @ r4 Q57 with rounding + muls32_32_64 r6,r2, r6,r2, r4,r5,r7,r6,r2 @ d4=a3*r4/2 Q89 +@ r4+d4 is correct to 1ULP at Q57, tested on ~9bn cases including all extreme values of r4 for each possible y Q30 + + adds r2,#8 + asrs r2,#5 @ d4 Q52, rounded to Q53 with spare bit in carry + +@ here +@ r0 y low bits +@ r1 y Q30 +@ r2 d4 Q52, rounded to Q53 +@ C flag contains d4_b53 +@ r3 a4 Q30 + + bcs dq_5 + + lsrs r5,r3,#10 @ a4 Q52 + lsls r4,r3,#22 + + asrs r1,r2,#31 + adds r0,r2,r4 + adcs r1,r5 @ a4+d4 + + add r1,r12 @ pack exponent + pop {r4-r7,r15} + +.ltorg + + +@ round(sqrt(2^22./[68:8:252])) +drsqrtapp: +.byte 0xf8,0xeb,0xdf,0xd6,0xcd,0xc5,0xbe,0xb8 +.byte 0xb2,0xad,0xa8,0xa4,0xa0,0x9c,0x99,0x95 +.byte 0x92,0x8f,0x8d,0x8a,0x88,0x85,0x83,0x81 + +dq_5: +@ here we are near a rounding boundary, C is set + adcs r2,r2,r2 @ d4 Q53+1ulp + lsrs r5,r3,#9 + lsls r4,r3,#23 @ r4:r5 a4 Q53 + asrs r1,r2,#31 + adds r4,r2,r4 + adcs r5,r1 @ r4:r5 a5=a4+d4 Q53+1ulp + movs r3,r5 + muls r3,r4 + square32_64 r4,r1,r2,r6,r2,r7 + adds r2,r3 + adds r2,r3 @ r1:r2 a5^2 Q106 + lsls r0,#22 @ y Q84 + + rsbs r1,#0 + sbcs r0,r2 @ remainder y-a5^2 + bmi 1f @ y=0 +@ ω+=dω +@ x+=y>>i, y-=x>>i + adds r0,r3 + adcs r1,r4 + + mov r3,r11 + asrs r3,r7 + mov r4,r11 + lsls r4,r6 + mov r2,r10 + lsrs r2,r7 + orrs r2,r4 @ r2:r3 y>>i, rounding in carry + mov r4,r8 + mov r5,r9 @ r4:r5 x + adcs r2,r4 + adcs r3,r5 @ r2:r3 x+(y>>i) + mov r8,r2 + mov r9,r3 + + mov r3,r5 + lsls r3,r6 + asrs r5,r7 + lsrs r4,r7 + orrs r4,r3 @ r4:r5 x>>i, rounding in carry + mov r2,r10 + mov r3,r11 + sbcs r2,r4 + sbcs r3,r5 @ r2:r3 y-(x>>i) + mov r10,r2 + mov r11,r3 + bx r14 + + +@ ω>0 / y<0 +@ ω-=dω +@ x-=y>>i, y+=x>>i +1: + subs r0,r3 + sbcs r1,r4 + + mov r3,r9 + asrs r3,r7 + mov r4,r9 + lsls r4,r6 + mov r2,r8 + lsrs r2,r7 + orrs r2,r4 @ r2:r3 x>>i, rounding in carry + mov r4,r10 + mov r5,r11 @ r4:r5 y + adcs r2,r4 + adcs r3,r5 @ r2:r3 y+(x>>i) + mov r10,r2 + mov r11,r3 + + mov r3,r5 + lsls r3,r6 + asrs r5,r7 + lsrs r4,r7 + orrs r4,r3 @ r4:r5 y>>i, rounding in carry + mov r2,r8 + mov r3,r9 + sbcs r2,r4 + sbcs r3,r5 @ r2:r3 x-(y>>i) + mov r8,r2 + mov r9,r3 + bx r14 + +ret_dzero: + movs r0,#0 + movs r1,#0 + bx r14 + +@ convert packed double in r0:r1 to signed/unsigned 32/64-bit integer/fixed-point value in r0:r1 [with r2 places after point], with rounding towards -Inf +@ fixed-point versions only work with reasonable values in r2 because of the way dunpacks works + +double_section double2int_shim + regular_func double2int_shim + movs r2,#0 @ and fall through +regular_func double2fix_shim + push {r14} + adds r2,#32 + bl double2fix64_shim + movs r0,r1 + pop {r15} + +double_section double2uint_shim + regular_func double2uint_shim + movs r2,#0 @ and fall through +regular_func double2ufix_shim + push {r14} + adds r2,#32 + bl double2ufix64_shim + movs r0,r1 + pop {r15} + +double_section double2int64_shim + regular_func double2int64_shim + movs r2,#0 @ and fall through +regular_func double2fix64_shim + push {r14} + bl d2fix + + asrs r2,r1,#31 + cmp r2,r3 + bne 1f @ sign extension bits fail to match sign of result? + pop {r15} +1: + mvns r0,r3 + movs r1,#1 + lsls r1,#31 + eors r1,r1,r0 @ generate extreme fixed-point values + pop {r15} + +double_section double2uint64_shim + regular_func double2uint64_shim + movs r2,#0 @ and fall through +regular_func double2ufix64_shim + asrs r3,r1,#20 @ negative? return 0 + bmi ret_dzero +@ and fall through + +@ convert double in r0:r1 to signed fixed point in r0:r1:r3, r2 places after point, rounding towards -Inf +@ result clamped so that r3 can only be 0 or -1 +@ trashes r12 +.thumb_func +d2fix: + push {r4,r14} + mov r12,r2 + bl dunpacks + asrs r4,r2,#16 + adds r4,#1 + bge 1f + movs r1,#0 @ -0 -> +0 +1: + asrs r3,r1,#31 + ldr r4, =d2fix_a + bx r4 + +.weak d2fix_a // weak because it exists in float code too +regular_func d2fix_a +@ here +@ r0:r1 two's complement mantissa +@ r2 unbaised exponent +@ r3 mantissa sign extension bits + add r2,r12 @ exponent plus offset for required binary point position + subs r2,#52 @ required shift + bmi 1f @ shift down? +@ here a shift up by r2 places + cmp r2,#12 @ will clamp? + bge 2f + movs r4,r0 + lsls r1,r2 + lsls r0,r2 + rsbs r2,#0 + adds r2,#32 @ complementary shift + lsrs r4,r2 + orrs r1,r4 + pop {r4,r15} +2: + mvns r0,r3 + mvns r1,r3 @ overflow: clamp to extreme fixed-point values + pop {r4,r15} +1: +@ here a shift down by -r2 places + adds r2,#32 + bmi 1f @ long shift? + mov r4,r1 + lsls r4,r2 + rsbs r2,#0 + adds r2,#32 @ complementary shift + asrs r1,r2 + lsrs r0,r2 + orrs r0,r4 + pop {r4,r15} +1: +@ here a long shift down + movs r0,r1 + asrs r1,#31 @ shift down 32 places + adds r2,#32 + bmi 1f @ very long shift? + rsbs r2,#0 + adds r2,#32 + asrs r0,r2 + pop {r4,r15} +1: + movs r0,r3 @ result very near zero: use sign extension bits + movs r1,r3 + pop {r4,r15} + +double_section double2float_shim + regular_func double2float_shim + lsls r2,r1,#1 + lsrs r2,#21 @ exponent + ldr r3,=#0x3ff-0x7f + subs r2,r3 @ fix exponent bias + ble 1f @ underflow or zero + cmp r2,#0xff + bge 2f @ overflow or infinity + lsls r2,#23 @ position exponent of result + lsrs r3,r1,#31 + lsls r3,#31 + orrs r2,r3 @ insert sign + lsls r3,r0,#3 @ rounding bits + lsrs r0,#29 + lsls r1,#12 + lsrs r1,#9 + orrs r0,r1 @ assemble mantissa + orrs r0,r2 @ insert exponent and sign + lsls r3,#1 + bcc 3f @ no rounding + beq 4f @ all sticky bits 0? +5: + adds r0,#1 +3: + bx r14 +4: + lsrs r3,r0,#1 @ odd? then round up + bcs 5b + bx r14 +1: + beq 6f @ check case where value is just less than smallest normal +7: + lsrs r0,r1,#31 + lsls r0,#31 + bx r14 +6: + lsls r2,r1,#12 @ 20 1:s at top of mantissa? + asrs r2,#12 + adds r2,#1 + bne 7b + lsrs r2,r0,#29 @ and 3 more 1:s? + cmp r2,#7 + bne 7b + movs r2,#1 @ return smallest normal with correct sign + b 8f +2: + movs r2,#0xff +8: + lsrs r0,r1,#31 @ return signed infinity + lsls r0,#8 + adds r0,r2 + lsls r0,#23 + bx r14 + +double_section x2double_shims +@ convert signed/unsigned 32/64-bit integer/fixed-point value in r0:r1 [with r2 places after point] to packed double in r0:r1, with rounding + +.align 2 +regular_func uint2double_shim + movs r1,#0 @ and fall through +regular_func ufix2double_shim + movs r2,r1 + movs r1,#0 + b ufix642double_shim + +.align 2 +regular_func int2double_shim + movs r1,#0 @ and fall through +regular_func fix2double_shim + movs r2,r1 + asrs r1,r0,#31 @ sign extend + b fix642double_shim + +.align 2 +regular_func uint642double_shim + movs r2,#0 @ and fall through +regular_func ufix642double_shim + movs r3,#0 + b uf2d + +.align 2 +regular_func int642double_shim + movs r2,#0 @ and fall through +regular_func fix642double_shim + asrs r3,r1,#31 @ sign bit across all bits + eors r0,r3 + eors r1,r3 + subs r0,r3 + sbcs r1,r3 +uf2d: + push {r4,r5,r14} + ldr r4,=#0x432 + subs r2,r4,r2 @ form biased exponent +@ here +@ r0:r1 unnormalised mantissa +@ r2 -Q (will become exponent) +@ r3 sign across all bits + cmp r1,#0 + bne 1f @ short normalising shift? + movs r1,r0 + beq 2f @ zero? return it + movs r0,#0 + subs r2,#32 @ fix exponent +1: + asrs r4,r1,#21 + bne 3f @ will need shift down (and rounding?) + bcs 4f @ normalised already? +5: + subs r2,#1 + adds r0,r0 @ shift up + adcs r1,r1 + lsrs r4,r1,#21 + bcc 5b +4: + ldr r4,=#0x7fe + cmp r2,r4 + bhs 6f @ over/underflow? return signed zero/infinity +7: + lsls r2,#20 @ pack and return + adds r1,r2 + lsls r3,#31 + adds r1,r3 +2: + pop {r4,r5,r15} +6: @ return signed zero/infinity according to unclamped exponent in r2 + mvns r2,r2 + lsrs r2,#21 + movs r0,#0 + movs r1,#0 + b 7b + +3: +@ here we need to shift down to normalise and possibly round + bmi 1f @ already normalised to Q63? +2: + subs r2,#1 + adds r0,r0 @ shift up + adcs r1,r1 + bpl 2b +1: +@ here we have a 1 in b63 of r0:r1 + adds r2,#11 @ correct exponent for subsequent shift down + lsls r4,r0,#21 @ save bits for rounding + lsrs r0,#11 + lsls r5,r1,#21 + orrs r0,r5 + lsrs r1,#11 + lsls r4,#1 + beq 1f @ sticky bits are zero? +8: + movs r4,#0 + adcs r0,r4 + adcs r1,r4 + b 4b +1: + bcc 4b @ sticky bits are zero but not on rounding boundary + lsrs r4,r0,#1 @ increment if odd (force round to even) + b 8b + + +.ltorg + +double_section dunpacks + regular_func dunpacks + mdunpacks r0,r1,r2,r3,r4 + ldr r3,=#0x3ff + subs r2,r3 @ exponent without offset + bx r14 + +@ r0:r1 signed mantissa Q52 +@ r2 unbiased exponent < 10 (i.e., |x|<2^10) +@ r4 pointer to: +@ - divisor reciprocal approximation r=1/d Q15 +@ - divisor d Q62 0..20 +@ - divisor d Q62 21..41 +@ - divisor d Q62 42..62 +@ returns: +@ r0:r1 reduced result y Q62, -0.6 d < y < 0.6 d (better in practice) +@ r2 quotient q (number of reductions) +@ if exponent >=10, returns r0:r1=0, r2=1024*mantissa sign +@ designed to work for 0.5=0: in quadrant 0 + cmp r1,r3 + ble 2f @ y<~x so 0≤θ<~π/4: skip + adds r6,#1 + eors r1,r5 @ negate x + b 3f @ and exchange x and y = rotate by -π/2 +1: + cmp r3,r7 + bge 2f @ -y<~x so -π/4<~θ≤0: skip + subs r6,#1 + eors r3,r5 @ negate y and ... +3: + movs r7,r0 @ exchange x and y + movs r0,r2 + movs r2,r7 + movs r7,r1 + movs r1,r3 + movs r3,r7 +2: +@ here -π/4<~θ<~π/4 +@ r6 has quadrant offset + push {r6} + cmp r2,#0 + bne 1f + cmp r3,#0 + beq 10f @ x==0 going into division? + lsls r4,r3,#1 + asrs r4,#21 + adds r4,#1 + bne 1f @ x==Inf going into division? + lsls r4,r1,#1 + asrs r4,#21 + adds r4,#1 @ y also ±Inf? + bne 10f + subs r1,#1 @ make them both just finite + subs r3,#1 + b 1f + +10: + movs r0,#0 + movs r1,#0 + b 12f + +1: + bl ddiv_shim + movs r2,#62 + bl double2fix64_shim +@ r0:r1 y/x + mov r10,r0 + mov r11,r1 + movs r0,#0 @ ω=0 + movs r1,#0 + mov r8,r0 + movs r2,#1 + lsls r2,#30 + mov r9,r2 @ x=1 + + adr r4,dtab_cc + mov r12,r4 + movs r7,#1 + movs r6,#31 +1: + bl dcordic_vec_step + adds r7,#1 + subs r6,#1 + cmp r7,#33 + bne 1b +@ r0:r1 atan(y/x) Q62 +@ r8:r9 x residual Q62 +@ r10:r11 y residual Q62 + mov r2,r9 + mov r3,r10 + subs r2,#12 @ this makes atan(0)==0 +@ the following is basically a division residual y/x ~ atan(residual y/x) + movs r4,#1 + lsls r4,#29 + movs r7,#0 +2: + lsrs r2,#1 + movs r3,r3 @ preserve carry + bmi 1f + sbcs r3,r2 + adds r0,r4 + adcs r1,r7 + lsrs r4,#1 + bne 2b + b 3f +1: + adcs r3,r2 + subs r0,r4 + sbcs r1,r7 + lsrs r4,#1 + bne 2b +3: + lsls r6,r1,#31 + asrs r1,#1 + lsrs r0,#1 + orrs r0,r6 @ Q61 + +12: + pop {r6} + + cmp r6,#0 + beq 1f + ldr r4,=#0x885A308D @ π/2 Q61 + ldr r5,=#0x3243F6A8 + bpl 2f + mvns r4,r4 @ negative quadrant offset + mvns r5,r5 +2: + lsls r6,#31 + bne 2f @ skip if quadrant offset is ±1 + adds r0,r4 + adcs r1,r5 +2: + adds r0,r4 + adcs r1,r5 +1: + movs r2,#61 + bl fix642double_shim + + bl pop_r8_r11 + pop {r4-r7,r15} + +.ltorg + +dtab_cc: +.word 0x61bb4f69, 0x1dac6705 @ atan 2^-1 Q62 +.word 0x96406eb1, 0x0fadbafc @ atan 2^-2 Q62 +.word 0xab0bdb72, 0x07f56ea6 @ atan 2^-3 Q62 +.word 0xe59fbd39, 0x03feab76 @ atan 2^-4 Q62 +.word 0xba97624b, 0x01ffd55b @ atan 2^-5 Q62 +.word 0xdddb94d6, 0x00fffaaa @ atan 2^-6 Q62 +.word 0x56eeea5d, 0x007fff55 @ atan 2^-7 Q62 +.word 0xaab7776e, 0x003fffea @ atan 2^-8 Q62 +.word 0x5555bbbc, 0x001ffffd @ atan 2^-9 Q62 +.word 0xaaaaadde, 0x000fffff @ atan 2^-10 Q62 +.word 0xf555556f, 0x0007ffff @ atan 2^-11 Q62 +.word 0xfeaaaaab, 0x0003ffff @ atan 2^-12 Q62 +.word 0xffd55555, 0x0001ffff @ atan 2^-13 Q62 +.word 0xfffaaaab, 0x0000ffff @ atan 2^-14 Q62 +.word 0xffff5555, 0x00007fff @ atan 2^-15 Q62 +.word 0xffffeaab, 0x00003fff @ atan 2^-16 Q62 +.word 0xfffffd55, 0x00001fff @ atan 2^-17 Q62 +.word 0xffffffab, 0x00000fff @ atan 2^-18 Q62 +.word 0xfffffff5, 0x000007ff @ atan 2^-19 Q62 +.word 0xffffffff, 0x000003ff @ atan 2^-20 Q62 +.word 0x00000000, 0x00000200 @ atan 2^-21 Q62 @ consider optimising these +.word 0x00000000, 0x00000100 @ atan 2^-22 Q62 +.word 0x00000000, 0x00000080 @ atan 2^-23 Q62 +.word 0x00000000, 0x00000040 @ atan 2^-24 Q62 +.word 0x00000000, 0x00000020 @ atan 2^-25 Q62 +.word 0x00000000, 0x00000010 @ atan 2^-26 Q62 +.word 0x00000000, 0x00000008 @ atan 2^-27 Q62 +.word 0x00000000, 0x00000004 @ atan 2^-28 Q62 +.word 0x00000000, 0x00000002 @ atan 2^-29 Q62 +.word 0x00000000, 0x00000001 @ atan 2^-30 Q62 +.word 0x80000000, 0x00000000 @ atan 2^-31 Q62 +.word 0x40000000, 0x00000000 @ atan 2^-32 Q62 + +double_section dexp_guts +regular_func dexp_shim + push {r4-r7,r14} + bl dunpacks + adr r4,dreddata1 + bl dreduce + cmp r1,#0 + bge 1f + ldr r4,=#0xF473DE6B + ldr r5,=#0x2C5C85FD @ ln2 Q62 + adds r0,r4 + adcs r1,r5 + subs r2,#1 +1: + push {r2} + movs r7,#1 @ shift + adr r6,dtab_exp + movs r2,#0 + movs r3,#1 + lsls r3,#30 @ x=1 Q62 + +3: + ldmia r6!,{r4,r5} + mov r12,r6 + subs r0,r4 + sbcs r1,r5 + bmi 1f + + rsbs r6,r7,#0 + adds r6,#32 @ complementary shift + movs r5,r3 + asrs r5,r7 + movs r4,r3 + lsls r4,r6 + movs r6,r2 + lsrs r6,r7 @ rounding bit in carry + orrs r4,r6 + adcs r2,r4 + adcs r3,r5 @ x+=x>>i + b 2f + +1: + adds r0,r4 @ restore argument + adcs r1,r5 +2: + mov r6,r12 + adds r7,#1 + cmp r7,#33 + bne 3b + +@ here +@ r0:r1 ε (residual x, where x=a+ε) Q62, |ε|≤2^-32 (so fits in r0) +@ r2:r3 exp a Q62 +@ and we wish to calculate exp x=exp a exp ε~(exp a)(1+ε) + muls32_32_64 r0,r3, r4,r1, r5,r6,r7,r4,r1 +@ r4:r1 ε exp a Q(62+62-32)=Q92 + lsrs r4,#30 + lsls r0,r1,#2 + orrs r0,r4 + asrs r1,#30 + adds r0,r2 + adcs r1,r3 + + pop {r2} + rsbs r2,#0 + adds r2,#62 + bl fix642double_shim @ in principle we can pack faster than this because we know the exponent + pop {r4-r7,r15} + +.ltorg + +.align 2 +regular_func dln_shim + push {r4-r7,r14} + lsls r7,r1,#1 + bcs 5f @ <0 ... + asrs r7,#21 + beq 5f @ ... or =0? return -Inf + adds r7,#1 + beq 6f @ Inf/NaN? return +Inf + bl dunpacks + push {r2} + lsls r1,#9 + lsrs r2,r0,#23 + orrs r1,r2 + lsls r0,#9 +@ r0:r1 m Q61 = m/2 Q62 0.5≤m/2<1 + + movs r7,#1 @ shift + adr r6,dtab_exp + mov r12,r6 + movs r2,#0 + movs r3,#0 @ y=0 Q62 + +3: + rsbs r6,r7,#0 + adds r6,#32 @ complementary shift + movs r5,r1 + asrs r5,r7 + movs r4,r1 + lsls r4,r6 + movs r6,r0 + lsrs r6,r7 + orrs r4,r6 @ x>>i, rounding bit in carry + adcs r4,r0 + adcs r5,r1 @ x+(x>>i) + + lsrs r6,r5,#30 + bne 1f @ x+(x>>i)>1? + movs r0,r4 + movs r1,r5 @ x+=x>>i + mov r6,r12 + ldmia r6!,{r4,r5} + subs r2,r4 + sbcs r3,r5 + +1: + movs r4,#8 + add r12,r4 + adds r7,#1 + cmp r7,#33 + bne 3b +@ here: +@ r0:r1 residual x, nearly 1 Q62 +@ r2:r3 y ~ ln m/2 = ln m - ln2 Q62 +@ result is y + ln2 + ln x ~ y + ln2 + (x-1) + lsls r1,#2 + asrs r1,#2 @ x-1 + adds r2,r0 + adcs r3,r1 + + pop {r7} +@ here: +@ r2:r3 ln m/2 = ln m - ln2 Q62 +@ r7 unbiased exponent + + adr r4,dreddata1+4 + ldmia r4,{r0,r1,r4} + adds r7,#1 + muls r0,r7 @ Q62 + muls r1,r7 @ Q41 + muls r4,r7 @ Q20 + lsls r7,r1,#21 + asrs r1,#11 + asrs r5,r1,#31 + adds r0,r7 + adcs r1,r5 + lsls r7,r4,#10 + asrs r4,#22 + asrs r5,r1,#31 + adds r1,r7 + adcs r4,r5 +@ r0:r1:r4 exponent*ln2 Q62 + asrs r5,r3,#31 + adds r0,r2 + adcs r1,r3 + adcs r4,r5 +@ r0:r1:r4 result Q62 + movs r2,#62 +1: + asrs r5,r1,#31 + cmp r4,r5 + beq 2f @ r4 a sign extension of r1? + lsrs r0,#4 @ no: shift down 4 places and try again + lsls r6,r1,#28 + orrs r0,r6 + lsrs r1,#4 + lsls r6,r4,#28 + orrs r1,r6 + asrs r4,#4 + subs r2,#4 + b 1b +2: + bl fix642double_shim + pop {r4-r7,r15} + +5: + ldr r1,=#0xfff00000 + movs r0,#0 + pop {r4-r7,r15} + +6: + ldr r1,=#0x7ff00000 + movs r0,#0 + pop {r4-r7,r15} + +.ltorg + +.align 2 +dreddata1: +.word 0x0000B8AA @ 1/ln2 Q15 +.word 0x0013DE6B @ ln2 Q62 Q62=2C5C85FDF473DE6B split into 21-bit pieces +.word 0x000FEFA3 +.word 0x000B1721 + +dtab_exp: +.word 0xbf984bf3, 0x19f323ec @ log 1+2^-1 Q62 +.word 0xcd4d10d6, 0x0e47fbe3 @ log 1+2^-2 Q62 +.word 0x8abcb97a, 0x0789c1db @ log 1+2^-3 Q62 +.word 0x022c54cc, 0x03e14618 @ log 1+2^-4 Q62 +.word 0xe7833005, 0x01f829b0 @ log 1+2^-5 Q62 +.word 0x87e01f1e, 0x00fe0545 @ log 1+2^-6 Q62 +.word 0xac419e24, 0x007f80a9 @ log 1+2^-7 Q62 +.word 0x45621781, 0x003fe015 @ log 1+2^-8 Q62 +.word 0xa9ab10e6, 0x001ff802 @ log 1+2^-9 Q62 +.word 0x55455888, 0x000ffe00 @ log 1+2^-10 Q62 +.word 0x0aa9aac4, 0x0007ff80 @ log 1+2^-11 Q62 +.word 0x01554556, 0x0003ffe0 @ log 1+2^-12 Q62 +.word 0x002aa9ab, 0x0001fff8 @ log 1+2^-13 Q62 +.word 0x00055545, 0x0000fffe @ log 1+2^-14 Q62 +.word 0x8000aaaa, 0x00007fff @ log 1+2^-15 Q62 +.word 0xe0001555, 0x00003fff @ log 1+2^-16 Q62 +.word 0xf80002ab, 0x00001fff @ log 1+2^-17 Q62 +.word 0xfe000055, 0x00000fff @ log 1+2^-18 Q62 +.word 0xff80000b, 0x000007ff @ log 1+2^-19 Q62 +.word 0xffe00001, 0x000003ff @ log 1+2^-20 Q62 +.word 0xfff80000, 0x000001ff @ log 1+2^-21 Q62 +.word 0xfffe0000, 0x000000ff @ log 1+2^-22 Q62 +.word 0xffff8000, 0x0000007f @ log 1+2^-23 Q62 +.word 0xffffe000, 0x0000003f @ log 1+2^-24 Q62 +.word 0xfffff800, 0x0000001f @ log 1+2^-25 Q62 +.word 0xfffffe00, 0x0000000f @ log 1+2^-26 Q62 +.word 0xffffff80, 0x00000007 @ log 1+2^-27 Q62 +.word 0xffffffe0, 0x00000003 @ log 1+2^-28 Q62 +.word 0xfffffff8, 0x00000001 @ log 1+2^-29 Q62 +.word 0xfffffffe, 0x00000000 @ log 1+2^-30 Q62 +.word 0x80000000, 0x00000000 @ log 1+2^-31 Q62 +.word 0x40000000, 0x00000000 @ log 1+2^-32 Q62 + + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/include/pico/double.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/include/pico/double.h new file mode 100644 index 0000000000..0893233fee --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_double/include/pico/double.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_DOUBLE_H +#define _PICO_DOUBLE_H + +#include +#include "pico/types.h" +#include "pico/bootrom/sf_table.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file double.h +* \defgroup pico_double pico_double +* +* Optimized double-precision floating point functions +* +* (Replacement) optimized implementations are provided of the following compiler built-ins +* and math library functions: +* +* - __aeabi_dadd, __aeabi_ddiv, __aeabi_dmul, __aeabi_drsub, __aeabi_dsub, __aeabi_cdcmpeq, __aeabi_cdrcmple, __aeabi_cdcmple, __aeabi_dcmpeq, __aeabi_dcmplt, __aeabi_dcmple, __aeabi_dcmpge, __aeabi_dcmpgt, __aeabi_dcmpun, __aeabi_i2d, __aeabi_l2d, __aeabi_ui2d, __aeabi_ul2d, __aeabi_d2iz, __aeabi_d2lz, __aeabi_d2uiz, __aeabi_d2ulz, __aeabi_d2f +* - sqrt, cos, sin, tan, atan2, exp, log, ldexp, copysign, trunc, floor, ceil, round, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, exp2, log2, exp10, log10, pow,, hypot, cbrt, fmod, drem, remainder, remquo, expm1, log1p, fma +* - powint, sincos (GNU extensions) +* +* The following additional optimized functions are also provided: +* +* - fix2double, ufix2double, fix642double, ufix642double, double2fix, double2ufix, double2fix64, double2ufix64, double2int, double2int64, double2int_z, double2int64_z +*/ + +double fix2double(int32_t m, int e); +double ufix2double(uint32_t m, int e); +double fix642double(int64_t m, int e); +double ufix642double(uint64_t m, int e); + +// These methods round towards -Infinity. +int32_t double2fix(double f, int e); +uint32_t double2ufix(double f, int e); +int64_t double2fix64(double f, int e); +uint64_t double2ufix64(double f, int e); +int32_t double2int(double f); +int64_t double2int64(double f); + +// These methods round towards 0. +int32_t double2int_z(double f); +int64_t double2int64_z(double f); + +double exp10(double x); +void sincos(double x, double *sinx, double *cosx); +double powint(double x, int y); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/CMakeLists.txt new file mode 100644 index 0000000000..81a9eaafb9 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/CMakeLists.txt @@ -0,0 +1 @@ +pico_add_subdirectory(rp2040_usb_device_enumeration) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/CMakeLists.txt new file mode 100644 index 0000000000..0d682ab4ec --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/CMakeLists.txt @@ -0,0 +1,9 @@ +add_library(pico_fix_rp2040_usb_device_enumeration INTERFACE) + +target_sources(pico_fix_rp2040_usb_device_enumeration INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/rp2040_usb_device_enumeration.c + ) + +target_include_directories(pico_fix_rp2040_usb_device_enumeration INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + +target_link_libraries(pico_fix_rp2040_usb_device_enumeration INTERFACE hardware_structs pico_time) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include/pico/fix/rp2040_usb_device_enumeration.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include/pico/fix/rp2040_usb_device_enumeration.h new file mode 100644 index 0000000000..49f115e907 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include/pico/fix/rp2040_usb_device_enumeration.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_FIX_RP2040_USB_DEVICE_ENUMERATION_H +#define _PICO_FIX_RP2040_USB_DEVICE_ENUMERATION_H + +/*! \brief Perform a brute force workaround for USB device enumeration issue + * \ingroup pico_fix + * + * This method should be called during the IRQ handler for a bus reset + */ +void rp2040_usb_device_enumeration_fix(void); + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c new file mode 100644 index 0000000000..8319e36cb7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" +#include "pico/time.h" +#include "hardware/structs/usb.h" +#include "hardware/gpio.h" +#include "pico/fix/rp2040_usb_device_enumeration.h" + +#define LS_SE0 0b00 +#define LS_J 0b01 +#define LS_K 0b10 +#define LS_SE1 0b11 + +static void hw_enumeration_fix_wait_se0(void); +static void hw_enumeration_fix_force_ls_j(void); +static void hw_enumeration_fix_finish(void); + +void rp2040_usb_device_enumeration_fix(void) { + // After coming out of reset, the hardware expects 800us of LS_J (linestate J) time + // before it will move to the connected state. However on a hub that broadcasts packets + // for other devices this isn't the case. The plan here is to wait for the end of the bus + // reset, force an LS_J for 1ms and then switch control back to the USB phy. Unfortunately + // this requires us to use GPIO15 as there is no other way to force the input path. + // We only need to force DP as DM can be left at zero. It will be gated off by GPIO + // logic if it isn't func selected. + + // Wait SE0 phase will call force ls_j phase which will call finish phase + hw_enumeration_fix_wait_se0(); +} + +static inline uint8_t hw_line_state(void) { + return (usb_hw->sie_status & USB_SIE_STATUS_LINE_STATE_BITS) >> USB_SIE_STATUS_LINE_STATE_LSB; +} + +int64_t hw_enumeration_fix_wait_se0_callback(alarm_id_t id, void *user_data) { + if (hw_line_state() == LS_SE0) { + // Come back in 1ms and check again + return 1000; + } else { + // Now force LS_J (next stage of fix) + hw_enumeration_fix_force_ls_j(); + // No more repeats + return 0; + } +} + +static inline void hw_enumeration_fix_busy_wait_se0(void) { + while (hw_line_state() == LS_SE0) tight_loop_contents(); + // Now force LS_J (next stage of fix) + hw_enumeration_fix_force_ls_j(); +} + +static void hw_enumeration_fix_wait_se0(void) { + // Wait for SE0 to end (i.e. the host to stop resetting). This reset can last quite long. + // 10-15ms so we are going to set a timer callback. + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + if (add_alarm_in_ms(1, hw_enumeration_fix_wait_se0_callback, NULL, true) >= 0) { + // hw_enumeration_fix_wait_se0_callback will be called in 1ms to check if se0 has finished + // (and will poll every 1ms from there) + return; + } +#endif + // if timer pool disabled, or no timer available, have to busy wait. + hw_enumeration_fix_busy_wait_se0(); +} + +int64_t hw_enumeration_fix_force_ls_j_done(alarm_id_t id, void *user_data) { + hw_enumeration_fix_finish(); + return 0; +} + +static void hw_enumeration_fix_force_ls_j(void) { + // Force LS_J + const uint dp = 15; + //const uint dm = 16; + gpio_set_function(dp, 8); + // TODO: assert dm is not funcseld to usb + + // J state is a differential 1 for a full speed device so + // DP = 1 and DM = 0. Don't actually need to set DM low as it + // is already gated assuming it isn't funcseld. + gpio_set_inover(dp, GPIO_OVERRIDE_HIGH); + + // TODO: What to do about existing DP state here? + + // Force PHY pull up to stay before switching away from the phy + hw_set_alias(usb_hw)->phy_direct = USB_USBPHY_DIRECT_DP_PULLUP_EN_BITS; + hw_set_alias(usb_hw)->phy_direct_override = USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_BITS; + + // Switch to GPIO phy with LS_J forced + usb_hw->muxing = USB_USB_MUXING_TO_DIGITAL_PAD_BITS | USB_USB_MUXING_SOFTCON_BITS; + + // LS_J is now forced but while loop here just to check + hard_assert(hw_line_state() == LS_J); // "LS_J not forced!" + +#if !PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + if (add_alarm_in_ms(1, hw_enumeration_fix_force_ls_j_done, NULL, true) >= 0) { + // hw_enumeration_fix_force_ls_j_done will be called in 1ms + return; + } +#endif + // if timer pool disabled, or no timer available, have to busy wait. + busy_wait_us(1000); + hw_enumeration_fix_finish(); +} + +static void hw_enumeration_fix_finish(void) { + // Should think we are connected now + while (!(usb_hw->sie_status & USB_SIE_STATUS_CONNECTED_BITS)) tight_loop_contents(); + + // Switch back to USB phy + usb_hw->muxing = USB_USB_MUXING_TO_PHY_BITS | USB_USB_MUXING_SOFTCON_BITS; + + // Get rid of DP pullup override + hw_clear_alias(usb_hw)->phy_direct_override = USB_USBPHY_DIRECT_OVERRIDE_DP_PULLUP_EN_OVERRIDE_EN_BITS; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/CMakeLists.txt new file mode 100644 index 0000000000..a6e7895704 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/CMakeLists.txt @@ -0,0 +1,126 @@ +if (NOT TARGET pico_float) + # library to be depended on - we make this depend on particular implementations using per target generator expressions + add_library(pico_float INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_float_compiler INTERFACE) + # PICO_BUILD_DEFINE: PICO_FLOAT_COMPILER, whether compiler provided float support is being used, type=bool, default=0, but dependent on CMake options, group=pico_float + target_compile_definitions(pico_float_compiler INTERFACE + PICO_FLOAT_COMPILER=1 + ) + + add_library(pico_float_headers INTERFACE) + target_include_directories(pico_float_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + # add alias "default" which is just rom. + add_library(pico_float_default INTERFACE) + target_link_libraries(pico_float_default INTERFACE pico_float_pico) + + set(PICO_DEFAULT_FLOAT_IMPL pico_float_default) + + target_link_libraries(pico_float INTERFACE + $>,$,${PICO_DEFAULT_FLOAT_IMPL}>) + + add_library(pico_float_pico INTERFACE) + target_sources(pico_float_pico INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/float_aeabi.S + ${CMAKE_CURRENT_LIST_DIR}/float_init_rom.c + ${CMAKE_CURRENT_LIST_DIR}/float_math.c + ${CMAKE_CURRENT_LIST_DIR}/float_v1_rom_shim.S + ) + # PICO_BUILD_DEFINE: PICO_FLOAT_PICO, whether optimized pico/bootrom provided float support is being used, type=bool, default=1, but dependent on CMake options, group=pico_float + target_compile_definitions(pico_float_pico INTERFACE + PICO_FLOAT_PICO=1 + ) + + target_link_libraries(pico_float_pico INTERFACE pico_bootrom pico_float_headers) + + add_library(pico_float_none INTERFACE) + target_sources(pico_float_none INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/float_none.S + ) + + target_link_libraries(pico_float_none INTERFACE pico_float_headers) + + # PICO_BUILD_DEFINE: PICO_FLOAT_NONE, whether float support is disabled and functions will panic, type=bool, default=0, but dependent on CMake options, group=pico_float + target_compile_definitions(pico_float_none INTERFACE + PICO_FLOAT_NONE=1 + ) + + function(wrap_float_functions TARGET) + pico_wrap_function(${TARGET} __aeabi_fadd) + pico_wrap_function(${TARGET} __aeabi_fdiv) + pico_wrap_function(${TARGET} __aeabi_fmul) + pico_wrap_function(${TARGET} __aeabi_frsub) + pico_wrap_function(${TARGET} __aeabi_fsub) + pico_wrap_function(${TARGET} __aeabi_cfcmpeq) + pico_wrap_function(${TARGET} __aeabi_cfrcmple) + pico_wrap_function(${TARGET} __aeabi_cfcmple) + pico_wrap_function(${TARGET} __aeabi_fcmpeq) + pico_wrap_function(${TARGET} __aeabi_fcmplt) + pico_wrap_function(${TARGET} __aeabi_fcmple) + pico_wrap_function(${TARGET} __aeabi_fcmpge) + pico_wrap_function(${TARGET} __aeabi_fcmpgt) + pico_wrap_function(${TARGET} __aeabi_fcmpun) + pico_wrap_function(${TARGET} __aeabi_i2f) + pico_wrap_function(${TARGET} __aeabi_l2f) + pico_wrap_function(${TARGET} __aeabi_ui2f) + pico_wrap_function(${TARGET} __aeabi_ul2f) + pico_wrap_function(${TARGET} __aeabi_f2iz) + pico_wrap_function(${TARGET} __aeabi_f2lz) + pico_wrap_function(${TARGET} __aeabi_f2uiz) + pico_wrap_function(${TARGET} __aeabi_f2ulz) + pico_wrap_function(${TARGET} __aeabi_f2d) + pico_wrap_function(${TARGET} sqrtf) + pico_wrap_function(${TARGET} cosf) + pico_wrap_function(${TARGET} sinf) + pico_wrap_function(${TARGET} tanf) + pico_wrap_function(${TARGET} atan2f) + pico_wrap_function(${TARGET} expf) + pico_wrap_function(${TARGET} logf) + + pico_wrap_function(${TARGET} ldexpf) + pico_wrap_function(${TARGET} copysignf) + pico_wrap_function(${TARGET} truncf) + pico_wrap_function(${TARGET} floorf) + pico_wrap_function(${TARGET} ceilf) + pico_wrap_function(${TARGET} roundf) + pico_wrap_function(${TARGET} sincosf) # gnu + pico_wrap_function(${TARGET} asinf) + pico_wrap_function(${TARGET} acosf) + pico_wrap_function(${TARGET} atanf) + pico_wrap_function(${TARGET} sinhf) + pico_wrap_function(${TARGET} coshf) + pico_wrap_function(${TARGET} tanhf) + pico_wrap_function(${TARGET} asinhf) + pico_wrap_function(${TARGET} acoshf) + pico_wrap_function(${TARGET} atanhf) + pico_wrap_function(${TARGET} exp2f) + pico_wrap_function(${TARGET} log2f) + pico_wrap_function(${TARGET} exp10f) + pico_wrap_function(${TARGET} log10f) + pico_wrap_function(${TARGET} powf) + pico_wrap_function(${TARGET} powintf) #gnu + pico_wrap_function(${TARGET} hypotf) + pico_wrap_function(${TARGET} cbrtf) + pico_wrap_function(${TARGET} fmodf) + pico_wrap_function(${TARGET} dremf) + pico_wrap_function(${TARGET} remainderf) + pico_wrap_function(${TARGET} remquof) + pico_wrap_function(${TARGET} expm1f) + pico_wrap_function(${TARGET} log1pf) + pico_wrap_function(${TARGET} fmaf) + endfunction() + + wrap_float_functions(pico_float_pico) + wrap_float_functions(pico_float_none) + + macro(pico_set_float_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_FLOAT_IMPL "pico_float_${IMPL}") + else() + message(FATAL_ERROR "float implementation must be set on executable not library") + endif() + endmacro() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_aeabi.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_aeabi.S new file mode 100644 index 0000000000..2aee5f250a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_aeabi.S @@ -0,0 +1,724 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/asm_helper.S" +#include "pico/bootrom/sf_table.h" + +__pre_init __aeabi_float_init, 00020 + +.syntax unified +.cpu cortex-m0plus +.thumb + +.macro float_section name +#if PICO_FLOAT_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +.macro float_wrapper_section func +float_section WRAPPER_FUNC_NAME(\func) +.endm + +.macro _float_wrapper_func x + wrapper_func \x +.endm + +.macro wrapper_func_f1 x + _float_wrapper_func \x +#if PICO_FLOAT_PROPAGATE_NANS + mov ip, lr + bl __check_nan_f1 + mov lr, ip +#endif +.endm + +.macro wrapper_func_f2 x + _float_wrapper_func \x +#if PICO_FLOAT_PROPAGATE_NANS + mov ip, lr + bl __check_nan_f2 + mov lr, ip +#endif +.endm + +.section .text + +#if PICO_FLOAT_PROPAGATE_NANS +.thumb_func +__check_nan_f1: + movs r3, #1 + lsls r3, #24 + lsls r2, r0, #1 + adds r2, r3 + bhi 1f + bx lr +1: + bx ip + +.thumb_func +__check_nan_f2: + movs r3, #1 + lsls r3, #24 + lsls r2, r0, #1 + adds r2, r3 + bhi 1f + lsls r2, r1, #1 + adds r2, r3 + bhi 2f + bx lr +2: + mov r0, r1 +1: + bx ip +#endif + +.macro table_tail_call SF_TABLE_OFFSET +#if PICO_FLOAT_SUPPORT_ROM_V1 +#ifndef NDEBUG + movs r3, #0 + mov ip, r3 +#endif +#endif + ldr r3, =sf_table + ldr r3, [r3, #\SF_TABLE_OFFSET] + bx r3 +.endm + +.macro shimmable_table_tail_call SF_TABLE_OFFSET shim + ldr r3, =sf_table + ldr r3, [r3, #\SF_TABLE_OFFSET] +#if PICO_FLOAT_SUPPORT_ROM_V1 + mov ip, pc +#endif + bx r3 +#if PICO_FLOAT_SUPPORT_ROM_V1 +.byte \SF_TABLE_OFFSET, 0xdf +.word \shim +#endif +.endm + + +# note generally each function is in a separate section unless there is fall thru or branching between them +# note fadd, fsub, fmul, fdiv are so tiny and just defer to rom so are lumped together so they can share constant pool + +# note functions are word aligned except where they are an odd number of linear instructions + +// float FUNC_NAME(__aeabi_fadd)(float, float) single-precision addition +float_wrapper_section __aeabi_farithmetic +// float FUNC_NAME(__aeabi_frsub)(float x, float y) single-precision reverse subtraction, y - x + +# frsub first because it is the only one that needs alignment +.align 2 +wrapper_func __aeabi_frsub + eors r0, r1 + eors r1, r0 + eors r0, r1 + // fall thru + +// float FUNC_NAME(__aeabi_fsub)(float x, float y) single-precision subtraction, x - y +wrapper_func_f2 __aeabi_fsub +#if PICO_FLOAT_PROPAGATE_NANS + // we want to return nan for inf-inf or -inf - -inf, but without too much upfront cost + mov r2, r0 + eors r2, r1 + bmi 1f // different signs + push {r0, r1, lr} + bl 1f + b fdiv_fsub_nan_helper +1: +#endif + table_tail_call SF_TABLE_FSUB + +wrapper_func_f2 __aeabi_fadd + table_tail_call SF_TABLE_FADD + +// float FUNC_NAME(__aeabi_fdiv)(float n, float d) single-precision division, n / d +wrapper_func_f2 __aeabi_fdiv +#if PICO_FLOAT_PROPAGATE_NANS + push {r0, r1, lr} + bl 1f + b fdiv_fsub_nan_helper +1: +#endif + table_tail_call SF_TABLE_FDIV + +fdiv_fsub_nan_helper: +#if PICO_FLOAT_PROPAGATE_NANS + pop {r1, r2} + + // check for infinite op infinite (or rather check for infinite result with both + // operands being infinite) + lsls r3, r0, #1 + asrs r3, r3, #24 + adds r3, #1 + beq 2f + pop {pc} +2: + lsls r1, #1 + asrs r1, r1, #24 + lsls r2, #1 + asrs r2, r2, #24 + ands r1, r2 + adds r1, #1 + bne 3f + // infinite to nan + movs r1, #1 + lsls r1, #22 + orrs r0, r1 +3: + pop {pc} +#endif + +// float FUNC_NAME(__aeabi_fmul)(float, float) single-precision multiplication +wrapper_func_f2 __aeabi_fmul +#if PICO_FLOAT_PROPAGATE_NANS + push {r0, r1, lr} + bl 1f + pop {r1, r2} + + // check for multiplication of infinite by zero (or rather check for infinite result with either + // operand 0) + lsls r3, r0, #1 + asrs r3, r3, #24 + adds r3, #1 + beq 2f + pop {pc} +2: + ands r1, r2 + bne 3f + // infinite to nan + movs r1, #1 + lsls r1, #22 + orrs r0, r1 +3: + pop {pc} +1: +#endif + table_tail_call SF_TABLE_FMUL + +// void FUNC_NAME(__aeabi_cfrcmple)(float, float) reversed 3-way (<, =, ?>) compare [1], result in PSR ZC flags +float_wrapper_section __aeabi_cfcmple +.align 2 +wrapper_func __aeabi_cfrcmple + push {r0-r2, lr} + eors r0, r1 + eors r1, r0 + eors r0, r1 + b __aeabi_cfcmple_guts + +// NOTE these share an implementation as we have no excepting NaNs. +// void FUNC_NAME(__aeabi_cfcmple)(float, float) 3-way (<, =, ?>) compare [1], result in PSR ZC flags +// void FUNC_NAME(__aeabi_cfcmpeq)(float, float) non-excepting equality comparison [1], result in PSR ZC flags +.align 2 +wrapper_func __aeabi_cfcmple +wrapper_func __aeabi_cfcmpeq + push {r0-r2, lr} + +__aeabi_cfcmple_guts: + lsls r2,r0,#1 + lsrs r2,#24 + beq 1f + cmp r2,#0xff + bne 2f + lsls r2, r0, #9 + bhi 3f +1: + lsrs r0,#23 @ clear mantissa if denormal or infinite + lsls r0,#23 +2: + lsls r2,r1,#1 + lsrs r2,#24 + beq 1f + cmp r2,#0xff + bne 2f + lsls r2, r1, #9 + bhi 3f +1: + lsrs r1,#23 @ clear mantissa if denormal or infinite + lsls r1,#23 +2: + movs r2,#1 @ initialise result + eors r1,r0 + bmi 2f @ opposite signs? then can proceed on basis of sign of x + eors r1,r0 @ restore y + bpl 1f + cmp r1,r0 + pop {r0-r2, pc} +1: + cmp r0,r1 + pop {r0-r2, pc} +2: + orrs r1, r0 @ handle 0/-0 + adds r1, r1 @ note this always sets C + beq 3f + mvns r0, r0 @ carry inverse of r0 sign + adds r0, r0 +3: + pop {r0-r2, pc} + + +// int FUNC_NAME(__aeabi_fcmpeq)(float, float) result (1, 0) denotes (=, ?<>) [2], use for C == and != +float_wrapper_section __aeabi_fcmpeq +.align 2 +wrapper_func __aeabi_fcmpeq + push {lr} + bl __aeabi_cfcmpeq + beq 1f + movs r0, #0 + pop {pc} +1: + movs r0, #1 + pop {pc} + +// int FUNC_NAME(__aeabi_fcmplt)(float, float) result (1, 0) denotes (<, ?>=) [2], use for C < +float_wrapper_section __aeabi_fcmplt +.align 2 +wrapper_func __aeabi_fcmplt + push {lr} + bl __aeabi_cfcmple + sbcs r0, r0 + pop {pc} + +// int FUNC_NAME(__aeabi_fcmple)(float, float) result (1, 0) denotes (<=, ?>) [2], use for C <= +float_wrapper_section __aeabi_fcmple +.align 2 +wrapper_func __aeabi_fcmple + push {lr} + bl __aeabi_cfcmple + bls 1f + movs r0, #0 + pop {pc} +1: + movs r0, #1 + pop {pc} + +// int FUNC_NAME(__aeabi_fcmpge)(float, float) result (1, 0) denotes (>=, ?<) [2], use for C >= +float_wrapper_section __aeabi_fcmpge +.align 2 +wrapper_func __aeabi_fcmpge + push {lr} + // because of NaNs it is better to reverse the args than the result + bl __aeabi_cfrcmple + bls 1f + movs r0, #0 + pop {pc} +1: + movs r0, #1 + pop {pc} + +// int FUNC_NAME(__aeabi_fcmpgt)(float, float) result (1, 0) denotes (>, ?<=) [2], use for C > +float_wrapper_section __aeabi_fcmpgt +wrapper_func __aeabi_fcmpgt + push {lr} + // because of NaNs it is better to reverse the args than the result + bl __aeabi_cfrcmple + sbcs r0, r0 + pop {pc} + +// int FUNC_NAME(__aeabi_fcmpun)(float, float) result (1, 0) denotes (?, <=>) [2], use for C99 isunordered() +float_wrapper_section __aeabi_fcmpun +wrapper_func __aeabi_fcmpun + movs r3, #1 + lsls r3, #24 + lsls r2, r0, #1 + adds r2, r3 + bhi 1f + lsls r2, r1, #1 + adds r2, r3 + bhi 1f + movs r0, #0 + bx lr +1: + movs r0, #1 + bx lr + + +// float FUNC_NAME(__aeabi_ui2f)(unsigned) unsigned to float (single precision) conversion +float_wrapper_section __aeabi_ui2f +wrapper_func __aeabi_ui2f + subs r1, r1 + cmp r0, #0 + bne __aeabi_i2f_main + mov r0, r1 + bx lr + +float_wrapper_section __aeabi_i2f +// float FUNC_NAME(__aeabi_i2f)(int) integer to float (single precision) conversion +wrapper_func __aeabi_i2f + lsrs r1, r0, #31 + lsls r1, #31 + bpl 1f + rsbs r0, #0 +1: + cmp r0, #0 + beq 7f +__aeabi_i2f_main: + + mov ip, lr + push {r0, r1} + ldr r3, =sf_clz_func + ldr r3, [r3] + blx r3 + pop {r1, r2} + lsls r1, r0 + subs r0, #158 + rsbs r0, #0 + + adds r1,#0x80 @ rounding + bcs 5f @ tripped carry? then have leading 1 in C as required (and result is even so can ignore sticky bits) + + lsls r3,r1,#24 @ check bottom 8 bits of r1 + beq 6f @ in rounding-tie case? + lsls r1,#1 @ remove leading 1 +3: + lsrs r1,#9 @ align mantissa + lsls r0,#23 @ align exponent + orrs r0,r2 @ assemble exponent and mantissa +4: + orrs r0,r1 @ apply sign +1: + bx ip +5: + adds r0,#1 @ correct exponent offset + b 3b +6: + lsrs r1,#9 @ ensure even result + lsls r1,#10 + b 3b +7: + bx lr + + +// int FUNC_NAME(__aeabi_f2iz)(float) float (single precision) to integer C-style conversion [3] +float_wrapper_section __aeabi_f2iz +wrapper_func __aeabi_f2iz +regular_func float2int_z + lsls r1, r0, #1 + lsrs r2, r1, #24 + movs r3, #0x80 + lsls r3, #24 + cmp r2, #126 + ble 1f + subs r2, #158 + bge 2f + asrs r1, r0, #31 + lsls r0, #9 + lsrs r0, #1 + orrs r0, r3 + negs r2, r2 + lsrs r0, r2 + lsls r1, #1 + adds r1, #1 + muls r0, r1 + bx lr +1: + movs r0, #0 + bx lr +2: + lsrs r0, #31 + adds r0, r3 + subs r0, #1 + bx lr + + cmn r0, r0 + bcc float2int + push {lr} + lsls r0, #1 + lsrs r0, #1 + movs r1, #0 + bl __aeabi_f2uiz + cmp r0, #0 + bmi 1f + rsbs r0, #0 + pop {pc} +1: + movs r0, #128 + lsls r0, #24 + pop {pc} + +float_section float2int +regular_func float2int + shimmable_table_tail_call SF_TABLE_FLOAT2INT float2int_shim + +float_section float2fix +regular_func float2fix + shimmable_table_tail_call SF_TABLE_FLOAT2FIX float2fix_shim + +float_section float2ufix +regular_func float2ufix + table_tail_call SF_TABLE_FLOAT2UFIX + +// unsigned FUNC_NAME(__aeabi_f2uiz)(float) float (single precision) to unsigned C-style conversion [3] +float_wrapper_section __aeabi_f2uiz +wrapper_func __aeabi_f2uiz + table_tail_call SF_TABLE_FLOAT2UINT + +float_section fix2float +regular_func fix2float + table_tail_call SF_TABLE_FIX2FLOAT + +float_section ufix2float +regular_func ufix2float + table_tail_call SF_TABLE_UFIX2FLOAT + +float_section fix642float +regular_func fix642float + shimmable_table_tail_call SF_TABLE_FIX642FLOAT fix642float_shim + +float_section ufix642float +regular_func ufix642float + shimmable_table_tail_call SF_TABLE_UFIX642FLOAT ufix642float_shim + +// float FUNC_NAME(__aeabi_l2f)(long long) long long to float (single precision) conversion +float_wrapper_section __aeabi_l2f +1: + ldr r2, =__aeabi_i2f + bx r2 +wrapper_func __aeabi_l2f + asrs r2, r0, #31 + cmp r1, r2 + beq 1b + shimmable_table_tail_call SF_TABLE_INT642FLOAT int642float_shim + +// float FUNC_NAME(__aeabi_l2f)(long long) long long to float (single precision) conversion +float_wrapper_section __aeabi_ul2f +1: + ldr r2, =__aeabi_ui2f + bx r2 +wrapper_func __aeabi_ul2f + cmp r1, #0 + beq 1b + shimmable_table_tail_call SF_TABLE_UINT642FLOAT uint642float_shim + +// long long FUNC_NAME(__aeabi_f2lz)(float) float (single precision) to long long C-style conversion [3] +float_wrapper_section __aeabi_f2lz +wrapper_func __aeabi_f2lz +regular_func float2int64_z + cmn r0, r0 + bcc float2int64 + push {lr} + lsls r0, #1 + lsrs r0, #1 + movs r1, #0 + bl float2ufix64 + cmp r1, #0 + bmi 1f + movs r2, #0 + rsbs r0, #0 + sbcs r2, r1 + mov r1, r2 + pop {pc} +1: + movs r1, #128 + lsls r1, #24 + movs r0, #0 + pop {pc} + +float_section float2int64 +regular_func float2int64 + shimmable_table_tail_call SF_TABLE_FLOAT2INT64 float2int64_shim + +float_section float2fix64 +regular_func float2fix64 + shimmable_table_tail_call SF_TABLE_FLOAT2FIX64 float2fix64_shim + +// unsigned long long FUNC_NAME(__aeabi_f2ulz)(float) float to unsigned long long C-style conversion [3] +float_wrapper_section __aeabi_f2ulz +wrapper_func __aeabi_f2ulz + shimmable_table_tail_call SF_TABLE_FLOAT2UINT64 float2uint64_shim + +float_section float2ufix64 +regular_func float2ufix64 + shimmable_table_tail_call SF_TABLE_FLOAT2UFIX64 float2ufix64_shim + +float_wrapper_section __aeabi_f2d +1: +#if PICO_FLOAT_PROPAGATE_NANS + // copy sign bit and 25 NAN id bits into sign bit and significant ID bits, also setting the high id bit + asrs r1, r0, #3 + movs r2, #0xf + lsls r2, #27 + orrs r1, r2 + lsls r0, #25 + bx lr +#endif +wrapper_func __aeabi_f2d +#if PICO_FLOAT_PROPAGATE_NANS + movs r3, #1 + lsls r3, #24 + lsls r2, r0, #1 + adds r2, r3 + bhi 1b +#endif + shimmable_table_tail_call SF_TABLE_FLOAT2DOUBLE float2double_shim + +float_wrapper_section srqtf +wrapper_func_f1 sqrtf +#if PICO_FLOAT_SUPPORT_ROM_V1 + // check for negative + asrs r1, r0, #23 + bmi 1f +#endif + table_tail_call SF_TABLE_FSQRT +#if PICO_FLOAT_SUPPORT_ROM_V1 +1: + mvns r0, r1 + cmp r0, #255 + bne 2f + // -0 or -Denormal return -0 (0x80000000) + lsls r0, #31 + bx lr +2: + // return -Inf (0xff800000) + asrs r0, r1, #31 + lsls r0, #23 + bx lr +#endif + +float_wrapper_section cosf +// note we don't use _f1 since we do an infinity/nan check for outside of range +wrapper_func cosf + // rom version only works for -128 < angle < 128 + lsls r1, r0, #1 + lsrs r1, #24 + cmp r1, #127 + 7 + bge 1f +2: + table_tail_call SF_TABLE_FCOS +1: +#if PICO_FLOAT_PROPAGATE_NANS + // also check for infinites + cmp r1, #255 + bne 3f + // infinite to nan + movs r1, #1 + lsls r1, #22 + orrs r0, r1 + bx lr +3: +#endif + ldr r1, =0x40c90fdb // 2 * M_PI + push {lr} + bl remainderf + pop {r1} + mov lr, r1 + b 2b + +float_wrapper_section sinf +// note we don't use _f1 since we do an infinity/nan check for outside of range +wrapper_func sinf + // rom version only works for -128 < angle < 128 + lsls r1, r0, #1 + lsrs r1, #24 + cmp r1, #127 + 7 + bge 1f +2: + table_tail_call SF_TABLE_FSIN +1: +#if PICO_FLOAT_PROPAGATE_NANS + // also check for infinites + cmp r1, #255 + bne 3f + // infinite to nan + movs r1, #1 + lsls r1, #22 + orrs r0, r1 + bx lr +3: +#endif + ldr r1, =0x40c90fdb // 2 * M_PI + push {lr} + bl remainderf + pop {r1} + mov lr, r1 + b 2b + +float_wrapper_section sincosf +// note we don't use _f1 since we do an infinity/nan check for outside of range +wrapper_func sincosf + push {r1, r2, lr} + // rom version only works for -128 < angle < 128 + lsls r3, r0, #1 + lsrs r3, #24 + cmp r3, #127 + 7 + bge 3f +2: + ldr r3, =sf_table + ldr r3, [r3, #SF_TABLE_FSIN] + blx r3 + pop {r2, r3} + str r0, [r2] + str r1, [r3] + pop {pc} +#if PICO_FLOAT_PROPAGATE_NANS +.align 2 + pop {pc} +#endif +3: +#if PICO_FLOAT_PROPAGATE_NANS + // also check for infinites + cmp r3, #255 + bne 4f + // infinite to nan + movs r3, #1 + lsls r3, #22 + orrs r0, r3 + str r0, [r1] + str r0, [r2] + add sp, #12 + bx lr +4: +#endif + ldr r1, =0x40c90fdb // 2 * M_PI + push {lr} + bl remainderf + pop {r1} + mov lr, r1 + b 2b + +float_wrapper_section tanf +// note we don't use _f1 since we do an infinity/nan check for outside of range +wrapper_func tanf + // rom version only works for -128 < angle < 128 + lsls r1, r0, #1 + lsrs r1, #24 + cmp r1, #127 + 7 + bge 1f +2: + table_tail_call SF_TABLE_FTAN +1: +#if PICO_FLOAT_PROPAGATE_NANS + // also check for infinites + cmp r1, #255 + bne 3f + // infinite to nan + movs r1, #1 + lsls r1, #22 + orrs r0, r1 + bx lr +3: +#endif + ldr r1, =0x40c90fdb // 2 * M_PI + push {lr} + bl remainderf + pop {r1} + mov lr, r1 + b 2b + +float_wrapper_section atan2f +wrapper_func_f2 atan2f + shimmable_table_tail_call SF_TABLE_FATAN2 fatan2_shim + +float_wrapper_section expf +wrapper_func_f1 expf + table_tail_call SF_TABLE_FEXP + +float_wrapper_section logf +wrapper_func_f1 logf + table_tail_call SF_TABLE_FLN diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_init_rom.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_init_rom.c new file mode 100644 index 0000000000..3dbefa6746 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_init_rom.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "pico/bootrom.h" +#include "pico/bootrom/sf_table.h" + +// NOTE THIS FUNCTION TABLE IS NOT PUBLIC OR NECESSARILY COMPLETE... +// IT IS ***NOT*** SAFE TO CALL THESE FUNCTION POINTERS FROM ARBITRARY CODE +uint32_t sf_table[SF_TABLE_V2_SIZE / 2]; +void *sf_clz_func; + +#if !PICO_FLOAT_SUPPORT_ROM_V1 +static __attribute__((noreturn)) void missing_float_func_shim() { + panic(""); +} +#endif + +void __aeabi_float_init() { + int rom_version = rp2040_rom_version(); + void *rom_table = rom_data_lookup(rom_table_code('S', 'F')); +#if PICO_FLOAT_SUPPORT_ROM_V1 + if (rom_version == 1) { + memcpy(&sf_table, rom_table, SF_TABLE_V1_SIZE); + extern void float_table_shim_on_use_helper(); + // todo replace NDEBUG with a more exclusive assertion guard +#ifndef NDEBUG + if (*(uint16_t *)0x29ee != 0x0fc4 || // this is packx + *(uint16_t *)0x29c0 != 0x0dc2 || // this is upackx + *(uint16_t *)0x2b96 != 0xb5c0 || // this is cordic_vec + *(uint16_t *)0x2b18 != 0x2500 || // this is packretns + *(uint16_t *)0x2acc != 0xb510 || // this is float2fix + *(uint32_t *)0x2cfc != 0x6487ed51 // pi_q29 + ) { + panic(""); + } +#endif + + // this is a little tricky.. we only want to pull in a shim if the corresponding function + // is called. to that end we include a SVC instruction with the table offset as the call number + // followed by the shim function pointer inside the actual wrapper function. that way if the wrapper + // function is garbage collected, so is the shim function. + // + // float_table_shim_on_use_helper expects this SVC instruction in the calling code soon after the address + // pointed to by IP and patches the float_table entry with the real shim the first time the function is called. + + for(uint i=SF_TABLE_V1_SIZE/4; i= 2) { + assert(*((uint8_t *)(rom_table-2)) * 4 >= SF_TABLE_V2_SIZE); + memcpy(&sf_table, rom_table, SF_TABLE_V2_SIZE); + } + sf_clz_func = rom_func_lookup(rom_table_code('L', '3')); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_math.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_math.c new file mode 100644 index 0000000000..e54c868803 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_math.c @@ -0,0 +1,565 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/types.h" +#include "pico/float.h" +#include "pico/platform.h" + +typedef uint32_t ui32; +typedef int32_t i32; + +#define PINF ( HUGE_VAL) +#define MINF (-HUGE_VAL) +#define NANF ((float)NAN) +#define PZERO (+0.0) +#define MZERO (-0.0) + +#define PI 3.14159265358979323846 +#define LOG2 0.69314718055994530941 +// Unfortunately in double precision ln(10) is very close to half-way between to representable numbers +#define LOG10 2.30258509299404568401 +#define LOG2E 1.44269504088896340737 +#define LOG10E 0.43429448190325182765 +#define ONETHIRD 0.33333333333333333333 + +#define PIf 3.14159265358979323846f +#define LOG2f 0.69314718055994530941f +#define LOG2Ef 1.44269504088896340737f +#define LOG10Ef 0.43429448190325182765f +#define ONETHIRDf 0.33333333333333333333f + +#define FUNPACK(x,e,m) e=((x)>>23)&0xff,m=((x)&0x007fffff)|0x00800000 +#define FUNPACKS(x,s,e,m) s=((x)>>31),FUNPACK((x),(e),(m)) + +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Wstrict-aliasing\"") + +static inline bool fisnan(float x) { + ui32 ix=*(i32*)&x; + return ix * 2 > 0xff000000u; +} + +#if PICO_FLOAT_PROPAGATE_NANS +#define check_nan_f1(x) if (fisnan((x))) return (x) +#define check_nan_f2(x,y) if (fisnan((x))) return (x); else if (fisnan((y))) return (y); +#else +#define check_nan_f1(x) ((void)0) +#define check_nan_f2(x,y) ((void)0) +#endif + +static inline int fgetsignexp(float x) { + ui32 ix=*(ui32*)&x; + return (ix>>23)&0x1ff; +} + +static inline int fgetexp(float x) { + ui32 ix=*(ui32*)&x; + return (ix>>23)&0xff; +} + +static inline float fldexp(float x,int de) { + ui32 ix=*(ui32*)&x,iy; + int e; + e=fgetexp(x); + if(e==0||e==0xff) return x; + e+=de; + if(e<=0) iy=ix&0x80000000; // signed zero for underflow + else if(e>=0xff) iy=(ix&0x80000000)|0x7f800000ULL; // signed infinity on overflow + else iy=ix+((ui32)de<<23); + return *(float*)&iy; +} + +float WRAPPER_FUNC(ldexpf)(float x, int de) { + check_nan_f1(x); + return fldexp(x, de); +} + +static inline float fcopysign(float x,float y) { + ui32 ix=*(ui32*)&x,iy=*(ui32*)&y; + ix=((ix&0x7fffffff)|(iy&0x80000000)); + return *(float*)&ix; +} + +float WRAPPER_FUNC(copysignf)(float x, float y) { + check_nan_f2(x,y); + return fcopysign(x, y); +} + +static inline int fiszero(float x) { return fgetexp (x)==0; } +static inline int fispzero(float x) { return fgetsignexp(x)==0; } +static inline int fismzero(float x) { return fgetsignexp(x)==0x100; } +static inline int fisinf(float x) { return fgetexp (x)==0xff; } +static inline int fispinf(float x) { return fgetsignexp(x)==0xff; } +static inline int fisminf(float x) { return fgetsignexp(x)==0x1ff; } + +static inline int fisint(float x) { + ui32 ix=*(ui32*)&x,m; + int e=fgetexp(x); + if(e==0) return 1; // 0 is an integer + e-=0x7f; // remove exponent bias + if(e<0) return 0; // |x|<1 + e=23-e; // bit position in mantissa with significance 1 + if(e<=0) return 1; // |x| large, so must be an integer + m=(1<>e)&1; +} + +static inline int fisstrictneg(float x) { + ui32 ix=*(ui32*)&x; + if(fiszero(x)) return 0; + return ix>>31; +} + +static inline int fisneg(float x) { + ui32 ix=*(ui32*)&x; + return ix>>31; +} + +static inline float fneg(float x) { + ui32 ix=*(ui32*)&x; + ix^=0x80000000; + return *(float*)&ix; +} + +static inline int fispo2(float x) { + ui32 ix=*(ui32*)&x; + if(fiszero(x)) return 0; + if(fisinf(x)) return 0; + ix&=0x007fffff; + return ix==0; +} + +static inline float fnan_or(float x) { +#if PICO_FLOAT_PROPAGATE_NANS + return NANF; +#else + return x; +#endif +} + +float WRAPPER_FUNC(truncf)(float x) { + check_nan_f1(x); + ui32 ix=*(ui32*)&x,m; + int e=fgetexp(x); + e-=0x7f; // remove exponent bias + if(e<0) { // |x|<1 + ix&=0x80000000; + return *(float*)&ix; + } + e=23-e; // bit position in mantissa with significance 1 + if(e<=0) return x; // |x| large, so must be an integer + m=(1<=4+0x7f) { // |x|>=16? + if(!fisneg(x)) return 1; // 1 << exp 2x; avoid generating infinities later + else return -1; // 1 >> exp 2x + } + u=expf(fldexp(x,1)); + return (u-1.0f)/(u+1.0f); +} + +float WRAPPER_FUNC(asinhf)(float x) { + check_nan_f1(x); + int e; + e=fgetexp(x); + if(e>=16+0x7f) { // |x|>=2^16? + if(!fisneg(x)) return logf( x )+LOG2f; // 1/x^2 << 1 + else return fneg(logf(fneg(x))+LOG2f); // 1/x^2 << 1 + } + if(x>0) return (float)log(sqrt((double)x*(double)x+1.0)+(double)x); + else return fneg((float)log(sqrt((double)x*(double)x+1.0)-(double)x)); +} + +float WRAPPER_FUNC(acoshf)(float x) { + check_nan_f1(x); + int e; + if(fisneg(x)) x=fneg(x); + e=fgetexp(x); + if(e>=16+0x7f) return logf(x)+LOG2f; // |x|>=2^16? + return (float)log(sqrt(((double)x+1.0)*((double)x-1.0))+(double)x); +} + +float WRAPPER_FUNC(atanhf)(float x) { + check_nan_f1(x); + return fldexp(logf((1.0f+x)/(1.0f-x)),-1); +} + +float WRAPPER_FUNC(exp2f)(float x) { check_nan_f1(x); return (float)exp((double)x*LOG2); } +float WRAPPER_FUNC(log2f)(float x) { check_nan_f1(x); return logf(x)*LOG2Ef; } +float WRAPPER_FUNC(exp10f)(float x) { check_nan_f1(x); return (float)exp((double)x*LOG10); } +float WRAPPER_FUNC(log10f)(float x) { check_nan_f1(x); return logf(x)*LOG10Ef; } + +float WRAPPER_FUNC(expm1f)(float x) { check_nan_f1(x); return (float)(exp((double)x)-1); } +float WRAPPER_FUNC(log1pf)(float x) { check_nan_f1(x); return (float)(log(1+(double)x)); } +float WRAPPER_FUNC(fmaf)(float x,float y,float z) { + check_nan_f2(x,y); + check_nan_f1(z); + return (float)((double)x*(double)y+(double)z); +} // has double rounding so not exact + +// general power, x>0 +static inline float fpow_1(float x,float y) { + return (float)exp(log((double)x)*(double)y); // using double-precision intermediates for better accuracy +} + +static float fpow_int2(float x,int y) { + float u; + if(y==1) return x; + u=fpow_int2(x,y/2); + u*=u; + if(y&1) u*=x; + return u; +} + +// for the case where x not zero or infinity, y small and not zero +static inline float fpowint_1(float x,int y) { + if(y<0) x=1.0f/x,y=-y; + return fpow_int2(x,y); +} + +// for the case where x not zero or infinity +static float fpowint_0(float x,int y) { + int e; + if(fisneg(x)) { + if(fisoddint(y)) return fneg(fpowint_0(fneg(x),y)); + else return fpowint_0(fneg(x),y); + } + if(fispo2(x)) { + e=fgetexp(x)-0x7f; + if(y>=256) y= 255; // avoid overflow + if(y<-256) y=-256; + y*=e; + return fldexp(1,y); + } + if(y==0) return 1; + if(y>=-32&&y<=32) return fpowint_1(x,y); + return fpow_1(x,y); +} + +float WRAPPER_FUNC(powintf)(float x,int y) { + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") + if(x==1.0f||y==0) return 1; + if(x==0.0f) { + if(y>0) { + if(y&1) return x; + else return 0; + } + if((y&1)) return fcopysign(PINF,x); + return PINF; + } + _Pragma("GCC diagnostic pop") + check_nan_f1(x); + if(fispinf(x)) { + if(y<0) return 0; + else return PINF; + } + if(fisminf(x)) { + if(y>0) { + if((y&1)) return MINF; + else return PINF; + } + if((y&1)) return MZERO; + else return PZERO; + } + return fpowint_0(x,y); +} + +// for the case where y is guaranteed a finite integer, x not zero or infinity +static float fpow_0(float x,float y) { + int e,p; + if(fisneg(x)) { + if(fisoddint(y)) return fneg(fpow_0(fneg(x),y)); + else return fpow_0(fneg(x),y); + } + p=(int)y; + if(fispo2(x)) { + e=fgetexp(x)-0x7f; + if(p>=256) p= 255; // avoid overflow + if(p<-256) p=-256; + p*=e; + return fldexp(1,p); + } + if(p==0) return 1; + if(p>=-32&&p<=32) return fpowint_1(x,p); + return fpow_1(x,y); +} + +float WRAPPER_FUNC(powf)(float x,float y) { + _Pragma("GCC diagnostic push") + _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"") + if(x==1.0f||fiszero(y)) return 1; + check_nan_f2(x,y); + if(x==-1.0f&&fisinf(y)) return 1; + _Pragma("GCC diagnostic pop") + if(fiszero(x)) { + if(!fisneg(y)) { + if(fisoddint(y)) return x; + else return 0; + } + if(fisoddint(y)) return fcopysign(PINF,x); + return PINF; + } + if(fispinf(x)) { + if(fisneg(y)) return 0; + else return PINF; + } + if(fisminf(x)) { + if(!fisneg(y)) { + if(fisoddint(y)) return MINF; + else return PINF; + } + if(fisoddint(y)) return MZERO; + else return PZERO; + } + if(fispinf(y)) { + if(fgetexp(x)<0x7f) return PZERO; + else return PINF; + } + if(fisminf(y)) { + if(fgetexp(x)<0x7f) return PINF; + else return PZERO; + } + if(fisint(y)) return fpow_0(x,y); + if(fisneg(x)) return PINF; + return fpow_1(x,y); +} + +float WRAPPER_FUNC(hypotf)(float x,float y) { + check_nan_f2(x,y); + int ex,ey; + ex=fgetexp(x); ey=fgetexp(y); + if(ex>=0x7f+50||ey>=0x7f+50) { // overflow, or nearly so + x=fldexp(x,-70),y=fldexp(y,-70); + return fldexp(sqrtf(x*x+y*y), 70); + } + else if(ex<=0x7f-50&&ey<=0x7f-50) { // underflow, or nearly so + x=fldexp(x, 70),y=fldexp(y, 70); + return fldexp(sqrtf(x*x+y*y),-70); + } + return sqrtf(x*x+y*y); +} + +float WRAPPER_FUNC(cbrtf)(float x) { + check_nan_f1(x); + int e; + if(fisneg(x)) return fneg(cbrtf(fneg(x))); + if(fiszero(x)) return fcopysign(PZERO,x); + e=fgetexp(x)-0x7f; + e=(e*0x5555+0x8000)>>16; // ~e/3, rounded + x=fldexp(x,-e*3); + x=expf(logf(x)*ONETHIRDf); + return fldexp(x,e); +} + +// reduces mx*2^e modulo my, returning bottom bits of quotient at *pquo +// 2^23<=|mx|,my<2^24, e>=0; 0<=result0) { + r=0xffffffffU/(ui32)(my>>7); // reciprocal estimate Q16 + } + while(e>0) { + s=e; if(s>12) s=12; // gain up to 12 bits on each iteration + q=(mx>>9)*r; // Q30 + q=((q>>(29-s))+1)>>1; // Q(s), rounded + mx=(mx<=my) mx-=my,quo++; // when e==0 mx can be nearly as big as 2my + if(mx>=my) mx-=my,quo++; + if(mx<0) mx+=my,quo--; + if(mx<0) mx+=my,quo--; + if(pquo) *pquo=quo; + return mx; +} + +float WRAPPER_FUNC(fmodf)(float x,float y) { + check_nan_f2(x,y); + ui32 ix=*(ui32*)&x,iy=*(ui32*)&y; + int sx,ex,ey; + i32 mx,my; + FUNPACKS(ix,sx,ex,mx); + FUNPACK(iy,ey,my); + if(ex==0xff) { + return fnan_or(PINF); + } + if(ey==0) return PINF; + if(ex==0) { + if(!fisneg(x)) return PZERO; + return MZERO; + } + if(ex|y|/2 + mx-=my+my; + ey--; + q=1; + } else { // x<-|y|/2 + mx=my+my-mx; + ey--; + q=-1; + } + } + else { + if(sx) mx=-mx; + mx=frem_0(mx,my,ex-ey,&q); + if(mx+mx>my || (mx+mx==my&&(q&1)) ) { // |x|>|y|/2, or equality and an odd quotient? + mx-=my; + q++; + } + } + if(sy) q=-q; + if(quo) *quo=q; + return fix2float(mx,0x7f-ey+23); +} + +float WRAPPER_FUNC(dremf)(float x,float y) { check_nan_f2(x,y); return remquof(x,y,0); } + +float WRAPPER_FUNC(remainderf)(float x,float y) { check_nan_f2(x,y); return remquof(x,y,0); } + +_Pragma("GCC diagnostic pop") // strict-aliasing diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_none.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_none.S new file mode 100644 index 0000000000..743a75e390 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_none.S @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/asm_helper.S" +#include "pico/bootrom/sf_table.h" + +.syntax unified +.cpu cortex-m0plus +.thumb + +wrapper_func __aeabi_fadd +wrapper_func __aeabi_fdiv +wrapper_func __aeabi_fmul +wrapper_func __aeabi_frsub +wrapper_func __aeabi_fsub +wrapper_func __aeabi_cfcmpeq +wrapper_func __aeabi_cfrcmple +wrapper_func __aeabi_cfcmple +wrapper_func __aeabi_fcmpeq +wrapper_func __aeabi_fcmplt +wrapper_func __aeabi_fcmple +wrapper_func __aeabi_fcmpge +wrapper_func __aeabi_fcmpgt +wrapper_func __aeabi_fcmpun +wrapper_func __aeabi_i2f +wrapper_func __aeabi_l2f +wrapper_func __aeabi_ui2f +wrapper_func __aeabi_ul2f +wrapper_func __aeabi_i2f +wrapper_func __aeabi_f2iz +wrapper_func __aeabi_f2lz +wrapper_func __aeabi_f2uiz +wrapper_func __aeabi_f2ulz +wrapper_func sqrtf +wrapper_func cosf +wrapper_func sinf +wrapper_func tanf +wrapper_func atan2f +wrapper_func expf +wrapper_func logf +wrapper_func ldexpf +wrapper_func copysignf +wrapper_func truncf +wrapper_func floorf +wrapper_func ceilf +wrapper_func roundf +wrapper_func sincosf +wrapper_func asinf +wrapper_func acosf +wrapper_func atanf +wrapper_func sinhf +wrapper_func coshf +wrapper_func tanhf +wrapper_func asinhf +wrapper_func acoshf +wrapper_func atanhf +wrapper_func exp2f +wrapper_func log2f +wrapper_func exp10f +wrapper_func log10f +wrapper_func powf +wrapper_func powintf +wrapper_func hypotf +wrapper_func cbrtf +wrapper_func fmodf +wrapper_func dremf +wrapper_func remainderf +wrapper_func remquof +wrapper_func expm1f +wrapper_func log1pf +wrapper_func fmaf + push {lr} // keep stack trace sane + ldr r0, =str + bl panic + +str: + .asciz "float support is disabled" \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S new file mode 100644 index 0000000000..a29925ed37 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S @@ -0,0 +1,347 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/asm_helper.S" + +#if PICO_FLOAT_SUPPORT_ROM_V1 +.syntax unified +.cpu cortex-m0plus +.thumb + +#ifndef PICO_FLOAT_IN_RAM +#define PICO_FLOAT_IN_RAM 0 +#endif + +.macro float_section name +// todo separate flag for shims? +#if PICO_FLOAT_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +float_section float_table_shim_on_use_helper +regular_func float_table_shim_on_use_helper + push {r0-r2, lr} + mov r0, ip +#ifndef NDEBUG + // sanity check to make sure we weren't called by non (shimmable_) table_tail_call macro + cmp r0, #0 + bne 1f + bkpt #0 +#endif +1: + ldrh r1, [r0] + lsrs r2, r1, #8 + adds r0, #2 + cmp r2, #0xdf + bne 1b + uxtb r1, r1 // r1 holds table offset + lsrs r2, r0, #2 + bcc 1f + // unaligned + ldrh r2, [r0, #0] + ldrh r0, [r0, #2] + lsls r0, #16 + orrs r0, r2 + b 2f +1: + ldr r0, [r0] +2: + ldr r2, =sf_table + str r0, [r2, r1] + str r0, [sp, #12] + pop {r0-r2, pc} + +float_section 642float_shims + +@ convert uint64 to float, rounding +regular_func uint642float_shim + movs r2,#0 @ fall through + +@ convert unsigned 64-bit fix to float, rounding; number of r0:r1 bits after point in r2 +regular_func ufix642float_shim + push {r4,r5,r14} + cmp r1,#0 + bpl 3f @ positive? we can use signed code + lsls r5,r1,#31 @ contribution to sticky bits + orrs r5,r0 + lsrs r0,r1,#1 + subs r2,#1 + b 4f + +@ convert int64 to float, rounding +regular_func int642float_shim + movs r2,#0 @ fall through + +@ convert signed 64-bit fix to float, rounding; number of r0:r1 bits after point in r2 +regular_func fix642float_shim + push {r4,r5,r14} +3: + movs r5,r0 + orrs r5,r1 + beq ret_pop45 @ zero? return +0 + asrs r5,r1,#31 @ sign bits +2: + asrs r4,r1,#24 @ try shifting 7 bits at a time + cmp r4,r5 + bne 1f @ next shift will overflow? + lsls r1,#7 + lsrs r4,r0,#25 + orrs r1,r4 + lsls r0,#7 + adds r2,#7 + b 2b +1: + movs r5,r0 + movs r0,r1 +4: + rsbs r2,#0 + adds r2,#32+29 + + // bl packx + ldr r1, =0x29ef // packx + blx r1 +ret_pop45: + pop {r4,r5,r15} + +float_section fatan2_shim +regular_func fatan2_shim + push {r4,r5,r14} + + ldr r4, =0x29c1 // unpackx + mov ip, r4 +@ unpack arguments and shift one down to have common exponent + blx ip + mov r4,r0 + mov r0,r1 + mov r1,r4 + mov r4,r2 + mov r2,r3 + mov r3,r4 + blx ip + lsls r0,r0,#5 @ Q28 + lsls r1,r1,#5 @ Q28 + adds r4,r2,r3 @ this is -760 if both arguments are 0 and at least -380-126=-506 otherwise + asrs r4,#9 + adds r4,#1 + bmi 2f @ force y to 0 proper, so result will be zero + subs r4,r2,r3 @ calculate shift + bge 1f @ ex>=ey? + rsbs r4,#0 @ make shift positive + asrs r0,r4 + cmp r4,#28 + blo 3f + asrs r0,#31 + b 3f +1: + asrs r1,r4 + cmp r4,#28 + blo 3f +2: +@ here |x|>>|y| or both x and y are ±0 + cmp r0,#0 + bge 4f @ x positive, return signed 0 + ldr r3, =0x2cfc @ &pi_q29, circular coefficients + ldr r0,[r3] @ x negative, return +/- pi + asrs r1,#31 + eors r0,r1 + b 7f +4: + asrs r0,r1,#31 + b 7f +3: + movs r2,#0 @ initial angle + ldr r3, =0x2cfc @ &pi_q29, circular coefficients + cmp r0,#0 @ x negative + bge 5f + rsbs r0,#0 @ rotate to 1st/4th quadrants + rsbs r1,#0 + ldr r2,[r3] @ pi Q29 +5: + movs r4,#1 @ m=1 + ldr r5, =0x2b97 @ cordic_vec + blx r5 @ also produces magnitude (with scaling factor 1.646760119), which is discarded + mov r0,r2 @ result here is -pi/2..3pi/2 Q29 +@ asrs r2,#29 +@ subs r0,r2 + ldr r3, =0x2cfc @ &pi_q29, circular coefficients + ldr r2,[r3] @ pi Q29 + adds r4,r0,r2 @ attempt to fix -3pi/2..-pi case + bcs 6f @ -pi/2..0? leave result as is + subs r4,r0,r2 @ pi: take off 2pi +6: + subs r0,#1 @ fiddle factor so atan2(0,1)==0 +7: + movs r2,#0 @ exponent for pack + ldr r3, =0x2b19 + bx r3 + +float_section float232_shims + +regular_func float2int_shim + movs r1,#0 @ fall through +regular_func float2fix_shim + // check for -0 or -denormal upfront + asrs r2, r0, #23 + adds r2, #128 + adds r2, #128 + beq 1f + // call original + ldr r2, =0x2acd + bx r2 + 1: + movs r0, #0 + bx lr + +float_section float264_shims + +regular_func float2int64_shim + movs r1,#0 @ and fall through +regular_func float2fix64_shim + push {r14} + bl f2fix + b d2f64_a + +regular_func float2uint64_shim + movs r1,#0 @ and fall through +regular_func float2ufix64_shim + asrs r3,r0,#23 @ negative? return 0 + bmi ret_dzero +@ and fall through + +@ convert float in r0 to signed fixed point in r0:r1:r3, r1 places after point, rounding towards -Inf +@ result clamped so that r3 can only be 0 or -1 +@ trashes r12 +.thumb_func +f2fix: + push {r4,r14} + mov r12,r1 + asrs r3,r0,#31 + lsls r0,#1 + lsrs r2,r0,#24 + beq 1f @ zero? + cmp r2,#0xff @ Inf? + beq 2f + subs r1,r2,#1 + subs r2,#0x7f @ remove exponent bias + lsls r1,#24 + subs r0,r1 @ insert implied 1 + eors r0,r3 + subs r0,r3 @ top two's complement + asrs r1,r0,#4 @ convert to double format + lsls r0,#28 + ldr r4, =d2fix_a + bx r4 +1: + movs r0,#0 + movs r1,r0 + movs r3,r0 + pop {r4,r15} +2: + mvns r0,r3 @ return max/min value + mvns r1,r3 + pop {r4,r15} + +ret_dzero: + movs r0,#0 + movs r1,#0 + bx r14 + +float_section d2fix_a_float + +.weak d2fix_a // weak because it exists in float shims too +.thumb_func +d2fix_a: +@ here +@ r0:r1 two's complement mantissa +@ r2 unbaised exponent +@ r3 mantissa sign extension bits + add r2,r12 @ exponent plus offset for required binary point position + subs r2,#52 @ required shift + bmi 1f @ shift down? +@ here a shift up by r2 places + cmp r2,#12 @ will clamp? + bge 2f + movs r4,r0 + lsls r1,r2 + lsls r0,r2 + rsbs r2,#0 + adds r2,#32 @ complementary shift + lsrs r4,r2 + orrs r1,r4 + pop {r4,r15} +2: + mvns r0,r3 + mvns r1,r3 @ overflow: clamp to extreme fixed-point values + pop {r4,r15} +1: +@ here a shift down by -r2 places + adds r2,#32 + bmi 1f @ long shift? + mov r4,r1 + lsls r4,r2 + rsbs r2,#0 + adds r2,#32 @ complementary shift + asrs r1,r2 + lsrs r0,r2 + orrs r0,r4 + pop {r4,r15} +1: +@ here a long shift down + movs r0,r1 + asrs r1,#31 @ shift down 32 places + adds r2,#32 + bmi 1f @ very long shift? + rsbs r2,#0 + adds r2,#32 + asrs r0,r2 + pop {r4,r15} +1: + movs r0,r3 @ result very near zero: use sign extension bits + movs r1,r3 + pop {r4,r15} +d2f64_a: + asrs r2,r1,#31 + cmp r2,r3 + bne 1f @ sign extension bits fail to match sign of result? + pop {r15} +1: + mvns r0,r3 + movs r1,#1 + lsls r1,#31 + eors r1,r1,r0 @ generate extreme fixed-point values + pop {r15} + +float_section float2double_shim +regular_func float2double_shim + lsrs r3,r0,#31 @ sign bit + lsls r3,#31 + lsls r1,r0,#1 + lsrs r2,r1,#24 @ exponent + beq 1f @ zero? + cmp r2,#0xff @ Inf? + beq 2f + lsrs r1,#4 @ exponent and top 20 bits of mantissa + ldr r2,=#(0x3ff-0x7f)<<20 @ difference in exponent offsets + adds r1,r2 + orrs r1,r3 + lsls r0,#29 @ bottom 3 bits of mantissa + bx r14 +1: + movs r1,r3 @ return signed zero +3: + movs r0,#0 + bx r14 +2: + ldr r1,=#0x7ff00000 @ return signed infinity + adds r1,r3 + b 3b + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/include/pico/float.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/include/pico/float.h new file mode 100644 index 0000000000..8b06ea8c02 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_float/include/pico/float.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_FLOAT_H +#define _PICO_FLOAT_H + +#include +#include +#include "pico/types.h" +#include "pico/bootrom/sf_table.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file float.h +* \defgroup pico_float pico_float +* +* Optimized single-precision floating point functions +* +* (Replacement) optimized implementations are provided of the following compiler built-ins +* and math library functions: +* +* - __aeabi_fadd, __aeabi_fdiv, __aeabi_fmul, __aeabi_frsub, __aeabi_fsub, __aeabi_cfcmpeq, __aeabi_cfrcmple, __aeabi_cfcmple, __aeabi_fcmpeq, __aeabi_fcmplt, __aeabi_fcmple, __aeabi_fcmpge, __aeabi_fcmpgt, __aeabi_fcmpun, __aeabi_i2f, __aeabi_l2f, __aeabi_ui2f, __aeabi_ul2f, __aeabi_f2iz, __aeabi_f2lz, __aeabi_f2uiz, __aeabi_f2ulz, __aeabi_f2d, sqrtf, cosf, sinf, tanf, atan2f, expf, logf +* - ldexpf, copysignf, truncf, floorf, ceilf, roundf, asinf, acosf, atanf, sinhf, coshf, tanhf, asinhf, acoshf, atanhf, exp2f, log2f, exp10f, log10f, powf, hypotf, cbrtf, fmodf, dremf, remainderf, remquof, expm1f, log1pf, fmaf +* - powintf, sincosf (GNU extensions) +* +* The following additional optimized functions are also provided: +* +* - fix2float, ufix2float, fix642float, ufix642float, float2fix, float2ufix, float2fix64, float2ufix64, float2int, float2int64, float2int_z, float2int64_z +*/ + +float fix2float(int32_t m, int e); +float ufix2float(uint32_t m, int e); +float fix642float(int64_t m, int e); +float ufix642float(uint64_t m, int e); + +// These methods round towards -Infinity. +int32_t float2fix(float f, int e); +uint32_t float2ufix(float f, int e); +int64_t float2fix64(float f, int e); +uint64_t float2ufix64(float f, int e); +int32_t float2int(float f); +int64_t float2int64(float f); + +// These methods round towards 0. +int32_t float2int_z(float f); +int64_t float2int64_z(float f); + +float exp10f(float x); +void sincosf(float x, float *sinx, float *cosx); +float powintf(float x, int y); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/CMakeLists.txt new file mode 100644 index 0000000000..b589bed22a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/CMakeLists.txt @@ -0,0 +1,44 @@ +if (NOT TARGET pico_int64_ops) + + #shims for ROM functions for -lgcc functions (listed below) + add_library(pico_int64_ops INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_int64_ops_compiler INTERFACE) + # PICO_BUILD_DEFINE: PICO_INT64_OPS_COMPILER, whether compiler provided int64_ops multiplication support is being used, type=bool, default=0, but dependent on CMake options, group=pico_int64_ops + target_compile_definitions(pico_int64_ops_compiler INTERFACE + PICO_INT64_OPS_COMPILER=1 + ) + + # add alias "default" which is just pico. + add_library(pico_int64_ops_default INTERFACE) + target_link_libraries(pico_int64_ops_default INTERFACE pico_int64_ops_pico) + + set(PICO_DEFAULT_INT64_OPS_IMPL pico_int64_ops_default) + + target_link_libraries(pico_int64_ops INTERFACE + $>,$,${PICO_DEFAULT_INT64_OPS_IMPL}>) + + add_library(pico_int64_ops_pico INTERFACE) + target_include_directories(pico_int64_ops_pico INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + target_sources(pico_int64_ops_pico INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/pico_int64_ops_aeabi.S + ) + + # PICO_BUILD_DEFINE: PICO_INT64_OPS_PICO, whether optimized pico/bootrom provided int64_ops multiplication support is being used, type=bool, default=1, but dependent on CMake options, group=pico_int64_ops + target_compile_definitions(pico_int64_ops_pico INTERFACE + PICO_INT64_OPS_PICO=1 + ) + + pico_wrap_function(pico_int64_ops_pico __aeabi_lmul) + + macro(pico_set_int64_ops_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_INT64_OPS_IMPL "pico_int64_ops_${IMPL}") + else() + message(FATAL_ERROR "int64_ops implementation must be set on executable not library") + endif() + endmacro() +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/include/pico/int64_ops.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/include/pico/int64_ops.h new file mode 100644 index 0000000000..db3213ef92 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/include/pico/int64_ops.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_INT64_H +#define _PICO_INT64_H + +#include "pico/types.h" + +/** \file int64_ops.h + * \defgroup pico_int64_ops pico_int64_ops + * + * Optimized replacement implementations of the compiler built-in 64 bit multiplication + * + * This library does not provide any additional functions +*/ + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S new file mode 100644 index 0000000000..903820bff3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +.syntax unified +.cpu cortex-m0plus +.thumb + +#include "pico/asm_helper.S" + +.section SECTION_NAME(__aeabi_lmul) +wrapper_func __aeabi_lmul + muls r1, r2 + muls r3, r0 + adds r1, r3 + mov r12, r1 + lsrs r1, r2, #16 + uxth r3, r0 + muls r3, r1 + push {r4} + lsrs r4, r0, #16 + muls r1, r4 + uxth r2, r2 + uxth r0, r0 + muls r0, r2 + muls r2, r4 + lsls r4, r3, #16 + lsrs r3, #16 + adds r0, r4 + pop {r4} + adcs r1, r3 + lsls r3, r2, #16 + lsrs r2, #16 + adds r0, r3 + adcs r1, r2 + add r1, r12 + bx lr + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/CMakeLists.txt new file mode 100644 index 0000000000..fddacc90c7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/CMakeLists.txt @@ -0,0 +1,14 @@ +if (NOT TARGET pico_malloc) + #shims for ROM functions for -lgcc functions (listed below) + add_library(pico_malloc INTERFACE) + + target_sources(pico_malloc INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/pico_malloc.c + ) + + pico_wrap_function(pico_malloc malloc) + pico_wrap_function(pico_malloc calloc) + pico_wrap_function(pico_malloc free) + + target_link_libraries(pico_malloc INTERFACE pico_sync) +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/include/pico/malloc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/include/pico/malloc.h new file mode 100644 index 0000000000..e84dd4d16c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/include/pico/malloc.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_MALLOC_H +#define _PICO_MALLOC_H + +/** \file malloc.h +* \defgroup pico_malloc pico_malloc +* +* Multi-core safety for malloc, calloc and free +* +* This library does not provide any additional functions +*/ + +// PICO_CONFIG: PICO_USE_MALLOC_MUTEX, Whether to protect malloc etc with a mutex, type=bool, default=1 with pico_multicore, 0 otherwise, group=pico_malloc +#if PICO_MULTICORE && !defined(PICO_USE_MALLOC_MUTEX) +#define PICO_USE_MALLOC_MUTEX 1 +#endif + +// PICO_CONFIG: PICO_MALLOC_PANIC, Enable/disable panic when an allocation failure occurs, type=bool, default=1, group=pico_malloc +#ifndef PICO_MALLOC_PANIC +#define PICO_MALLOC_PANIC 1 +#endif + +// PICO_CONFIG: PICO_DEBUG_MALLOC, Enable/disable debug printf from malloc, type=bool, default=0, group=pico_malloc +#ifndef PICO_DEBUG_MALLOC +#define PICO_DEBUG_MALLOC 0 +#endif + +// PICO_CONFIG: PICO_DEBUG_MALLOC_LOW_WATER, Define the lower bound for allocation addresses to be printed by PICO_DEBUG_MALLOC, min=0, default=0, group=pico_malloc +#ifndef PICO_DEBUG_MALLOC_LOW_WATER +#define PICO_DEBUG_MALLOC_LOW_WATER 0 +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c new file mode 100644 index 0000000000..548a48b9e0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "pico.h" + +#if PICO_USE_MALLOC_MUTEX +#include "pico/mutex.h" +auto_init_mutex(malloc_mutex); +#endif + +extern void *__real_malloc(size_t size); +extern void *__real_calloc(size_t count, size_t size); +extern void __real_free(void *mem); + +extern char __StackLimit; /* Set by linker. */ + +static inline void check_alloc(void *mem, uint8_t size) { +#if PICO_MALLOC_PANIC + if (!mem || (((char *)mem) + size) > &__StackLimit) { + panic("Out of memory"); + } +#endif +} + +void *__wrap_malloc(size_t size) { +#if PICO_USE_MALLOC_MUTEX + mutex_enter_blocking(&malloc_mutex); +#endif + void *rc = __real_malloc(size); +#if PICO_USE_MALLOC_MUTEX + mutex_exit(&malloc_mutex); +#endif +#ifdef PICO_DEBUG_MALLOC + if (!rc || ((uint8_t *)rc) + size > (uint8_t*)PICO_DEBUG_MALLOC_LOW_WATER) { + printf("malloc %d %p->%p\n", (uint) size, rc, ((uint8_t *) rc) + size); + } +#endif + check_alloc(rc, size); + return rc; +} + +void *__wrap_calloc(size_t count, size_t size) { +#if PICO_USE_MALLOC_MUTEX + mutex_enter_blocking(&malloc_mutex); +#endif + void *rc = __real_calloc(count, size); +#if PICO_USE_MALLOC_MUTEX + mutex_exit(&malloc_mutex); +#endif +#ifdef PICO_DEBUG_MALLOC + if (!rc || ((uint8_t *)rc) + size > (uint8_t*)PICO_DEBUG_MALLOC_LOW_WATER) { + printf("calloc %d %p->%p\n", (uint) (count * size), rc, ((uint8_t *) rc) + size); + } +#endif + check_alloc(rc, size); + return rc; +} + +void __wrap_free(void *mem) { +#if PICO_USE_MALLOC_MUTEX + mutex_enter_blocking(&malloc_mutex); +#endif + __real_free(mem); +#if PICO_USE_MALLOC_MUTEX + mutex_exit(&malloc_mutex); +#endif +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/CMakeLists.txt new file mode 100644 index 0000000000..20d410a361 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/CMakeLists.txt @@ -0,0 +1,52 @@ +if (NOT TARGET pico_mem_ops) + #shims for ROM functions for -lgcc functions (listed below) + add_library(pico_mem_ops INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_mem_ops_compiler INTERFACE) + # PICO_BUILD_DEFINE: PICO_MEM_OPS_COMPILER, whether compiler provided mem_ops memcpy etc. support is being used, type=bool, default=0, but dependent on CMake options, group=pico_mem_ops + target_compile_definitions(pico_mem_ops_compiler INTERFACE + PICO_MEM_OPS_COMPILER=1 + ) + + # add alias "default" which is just pico. + add_library(pico_mem_ops_default INTERFACE) + target_link_libraries(pico_mem_ops_default INTERFACE pico_mem_ops_pico) + + set(PICO_DEFAULT_MEM_OPS_IMPL pico_mem_ops_default) + + add_library(pico_mem_ops_pico INTERFACE) + target_link_libraries(pico_mem_ops INTERFACE + $>,$,${PICO_DEFAULT_MEM_OPS_IMPL}>) + + # PICO_BUILD_DEFINE: PICO_MEM_OPS_PICO, whether optimized pico/bootrom provided mem_ops memcpy etc. support is being used, type=bool, default=1, but dependent on CMake options, group=pico_mem_ops + target_compile_definitions(pico_mem_ops_pico INTERFACE + PICO_MEM_OPS_PICO=1 + ) + + + target_sources(pico_mem_ops_pico INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/mem_ops_aeabi.S + ) + + + target_link_libraries(pico_mem_ops INTERFACE pico_bootrom) + + pico_wrap_function(pico_mem_ops_pico memcpy) + pico_wrap_function(pico_mem_ops_pico memset) + pico_wrap_function(pico_mem_ops_pico __aeabi_memcpy) + pico_wrap_function(pico_mem_ops_pico __aeabi_memset) + pico_wrap_function(pico_mem_ops_pico __aeabi_memcpy4) + pico_wrap_function(pico_mem_ops_pico __aeabi_memset4) + pico_wrap_function(pico_mem_ops_pico __aeabi_memcpy8) + pico_wrap_function(pico_mem_ops_pico __aeabi_memset8) + + macro(pico_set_mem_ops_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_MEM_OPS_IMPL "pico_mem_ops_${IMPL}") + else() + message(FATAL_ERROR "mem_ops implementation must be set on executable not library") + endif() + endmacro() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/include/pico/mem_ops.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/include/pico/mem_ops.h new file mode 100644 index 0000000000..0c224fb7f7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/include/pico/mem_ops.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_MEMORY_H +#define _PICO_MEMORY_H + +#include "pico/types.h" + +/** \file mem_ops.h + * \defgroup pico_mem_ops pico_mem_ops + * + * Provides optimized replacement implementations of the compiler built-in memcpy, memset and related functions: + * + * - memset, memcpy + * - __aeabi_memset, __aeabi_memset4, __aeabi_memset8, __aeabi_memcpy, __aeabi_memcpy4, __aeabi_memcpy8 + * + * This library does not provide any additional functions + */ +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops.c new file mode 100644 index 0000000000..4047d231bc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops.c @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/mem_ops.h" diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S new file mode 100644 index 0000000000..e07a9feeec --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +.syntax unified +.cpu cortex-m0plus +.thumb + +#include "pico/asm_helper.S" + +__pre_init __aeabi_mem_init, 00001 + +.macro mem_section name +#if PICO_MEM_IN_RAM +.section RAM_SECTION_NAME(\name), "ax" +#else +.section SECTION_NAME(\name), "ax" +#endif +.endm + +.equ MEMSET, 0 +.equ MEMCPY, 4 +.equ MEMSET4, 8 +.equ MEMCPY4, 12 +.equ MEM_FUNC_COUNT, 4 + +# NOTE: All code sections are placed in RAM (at the expense of some veneer cost for calls from flash) because +# otherwise code using basic c division operators will require XIP flash access. + +.section .data.aeabi_mem_funcs +.global aeabi_mem_funcs, aeabi_mem_funcs_end + +.align 2 +aeabi_mem_funcs: + .word rom_table_code('M','S') + .word rom_table_code('M','C') + .word rom_table_code('S','4') + .word rom_table_code('C','4') +aeabi_mem_funcs_end: + +.section .text +regular_func __aeabi_mem_init + ldr r0, =aeabi_mem_funcs + movs r1, #MEM_FUNC_COUNT + ldr r3, =rom_funcs_lookup + bx r3 + +# lump them both together because likely both to be used, in which case doing so saves 1 word +# and it only costs 1 word if not + +// Note from Run-time ABI for the ARM architecture 4.3.4: +// If there is an attached device with efficient memory copying or clearing operations +// (such as a DMA engine), its device supplement specifies whether it may be used in +// implementations of these functions and what effect such use has on the device’s state. + +mem_section aeabi_memset_memcpy + +wrapper_func __aeabi_memset + // args are backwards + eors r0, r1 + eors r1, r0 + eors r0, r1 + ldr r3, =aeabi_mem_funcs + ldr r3, [r3, #MEMSET] + bx r3 + +wrapper_func __aeabi_memset4 +wrapper_func __aeabi_memset8 + // args are backwards + eors r0, r1 + eors r1, r0 + eors r0, r1 + ldr r3, =aeabi_mem_funcs + ldr r3, [r3, #MEMSET4] + bx r3 + +wrapper_func __aeabi_memcpy4 +wrapper_func __aeabi_memcpy8 + ldr r3, =aeabi_mem_funcs + ldr r3, [r3, #MEMCPY4] + bx r3 + +mem_section memset + +wrapper_func memset + ldr r3, =aeabi_mem_funcs + ldr r3, [r3, #MEMSET] + bx r3 + +mem_section memcpy +wrapper_func __aeabi_memcpy +wrapper_func memcpy + ldr r3, =aeabi_mem_funcs + ldr r3, [r3, #MEMCPY] + bx r3 + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/CMakeLists.txt new file mode 100644 index 0000000000..06f378230c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/CMakeLists.txt @@ -0,0 +1,17 @@ +if (NOT TARGET pico_multicore) + add_library(pico_multicore INTERFACE) + + target_sources(pico_multicore INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/multicore.c) + + target_include_directories(pico_multicore INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + target_compile_definitions(pico_multicore INTERFACE + PICO_MULTICORE=1 + ) + + target_link_libraries(pico_multicore INTERFACE pico_sync) +endif() + + + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/include/pico/multicore.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/include/pico/multicore.h new file mode 100644 index 0000000000..bc0c64d21f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/include/pico/multicore.h @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_MULTICORE_H +#define _PICO_MULTICORE_H + +#include "pico/types.h" +#include "pico/sync.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file multicore.h + * \defgroup pico_multicore pico_multicore + * Adds support for running code on the second processor core (core1) + * + * \subsection multicore_example Example + * \addtogroup pico_multicore + * \include multicore.c +*/ + +// PICO_CONFIG: PICO_CORE1_STACK_SIZE, Stack size for core 1, min=0x100, max=0x10000, default=PICO_STACK_SIZE/0x800, group=pico_multicore +#ifndef PICO_CORE1_STACK_SIZE +#ifdef PICO_STACK_SIZE +#define PICO_CORE1_STACK_SIZE PICO_STACK_SIZE +#else +#define PICO_CORE1_STACK_SIZE 0x800 +#endif +#endif + +/*! \brief Reset Core 1 + * \ingroup pico_multicore + * + */ +void multicore_reset_core1(); + +/*! \brief Run code on core 1 + * \ingroup pico_multicore + * + * Reset core1 and enter the given function on core 1 using the default core 1 stack (below core 0 stack) + * + * \param entry Function entry point, this function should not return. + */ +void multicore_launch_core1(void (*entry)(void)); + +/*! \brief Launch code on core 1 with stack + * \ingroup pico_multicore + * + * Reset core1 and enter the given function on core 1 using the passed stack for core 1 + */ +void multicore_launch_core1_with_stack(void (*entry)(void), uint32_t *stack_bottom, size_t stack_size_bytes); + +/*! \brief Send core 1 to sleep. + * \ingroup pico_multicore + * + */ +void multicore_sleep_core1(); + +/*! \brief Launch code on core 1 with no stack protection + * \ingroup pico_multicore + * + * Reset core1 and enter the given function using the passed sp as the initial stack pointer. + * This is a bare bones functions that does not provide a stack guard even if USE_STACK_GUARDS is defined + * + */ +void multicore_launch_core1_raw(void (*entry)(void), uint32_t *sp, uint32_t vector_table); + +/*! + * \defgroup multicore_fifo fifo + * \ingroup pico_multicore + * \brief Functions for inter-core FIFO + * + * The RP2040 contains two FIFOs for passing data, messages or ordered events between the two cores. Each FIFO is 32 bits + * wide, and 8 entries deep. One of the FIFOs can only be written by core 0, and read by core 1. The other can only be written + * by core 1, and read by core 0. + */ + + +/*! \brief Check the read FIFO to see if there is data waiting + * \ingroup multicore_fifo + * + * \return true if the FIFO has data in it, false otherwise + */ +static inline bool multicore_fifo_rvalid() { + return !!(sio_hw->fifo_st & SIO_FIFO_ST_VLD_BITS); +} + +/*! \brief Check the FIFO to see if the write FIFO is full + * \ingroup multicore_fifo + * + * @return true if the FIFO is full, false otherwise + */ +static inline bool multicore_fifo_wready() { + return !!(sio_hw->fifo_st & SIO_FIFO_ST_RDY_BITS); +} + +/*! \brief Push data on to the FIFO. + * \ingroup multicore_fifo + * + * This function will block until there is space for the data to be sent. + * Use multicore_fifo_wready() to check if it is possible to write to the + * FIFO if you don't want to block. + * + * \param data A 32 bit value to push on to the FIFO + */ +void multicore_fifo_push_blocking(uint32_t data); + +bool multicore_fifo_push_timeout_us(uint32_t data, uint64_t timeout_us); + +/*! \brief Pop data from the FIFO. + * \ingroup multicore_fifo + * + * This function will block until there is data ready to be read + * Use multicore_fifo_rvalid() to check if data is ready to be read if you don't + * want to block. + * + * \return 32 bit unsigned data from the FIFO. + */ +uint32_t multicore_fifo_pop_blocking(); + +bool multicore_fifo_pop_timeout_us(uint64_t timeout_us, uint32_t *out); + +/*! \brief Flush any data in the outgoing FIFO + * \ingroup multicore_fifo + * + */ +static inline void multicore_fifo_drain() { + while (multicore_fifo_rvalid()) + (void) sio_hw->fifo_rd; +} + +/*! \brief Clear FIFO interrupt + * \ingroup multicore_fifo +*/ +static inline void multicore_fifo_clear_irq() { + // Write any value to clear any interrupts + sio_hw->fifo_st = 0xff; +} + +/*! \brief Get FIFO status + * \ingroup multicore_fifo + * + * \return The status as a bitfield + * + * Bit | Description + * ----|------------ + * 3 | Sticky flag indicating the RX FIFO was read when empty. This read was ignored by the FIFO. + * 2 | Sticky flag indicating the TX FIFO was written when full. This write was ignored by the FIFO. + * 1 | Value is 1 if this core’s TX FIFO is not full (i.e. if FIFO_WR is ready for more data) + * 0 | Value is 1 if this core’s RX FIFO is not empty (i.e. if FIFO_RD is valid) +*/ +static inline int32_t multicore_fifo_get_status() { + return sio_hw->fifo_st; +} + +// call this from the lockout victim thread +void multicore_lockout_victim_init(); + +// start locking out the other core (it will be +bool multicore_lockout_start_timeout_us(uint64_t timeout_us); +void multicore_lockout_start_blocking(); + +bool multicore_lockout_end_timeout_us(uint64_t timeout_us); +void multicore_lockout_end_blocking(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/multicore.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/multicore.c new file mode 100644 index 0000000000..0ceea4def8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_multicore/multicore.c @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/stdlib.h" +#include "pico/multicore.h" +#include "hardware/sync.h" +#include "hardware/irq.h" +#include "hardware/structs/scb.h" +#include "hardware/structs/sio.h" +#include "hardware/regs/psm.h" +#include "hardware/claim.h" +#if PICO_USE_STACK_GUARDS +#include "pico/runtime.h" +#endif + +static inline void multicore_fifo_push_blocking_inline(uint32_t data) { + // We wait for the fifo to have some space + while (!multicore_fifo_wready()) + tight_loop_contents(); + + sio_hw->fifo_wr = data; + + // Fire off an event to the other core + __sev(); +} + +void multicore_fifo_push_blocking(uint32_t data) { + multicore_fifo_push_blocking_inline(data); +} + +bool multicore_fifo_push_timeout_us(uint32_t data, uint64_t timeout_us) { + absolute_time_t end_time = make_timeout_time_us(timeout_us); + // We wait for the fifo to have some space + while (!multicore_fifo_wready()) { + tight_loop_contents(); + if (time_reached(end_time)) return false; + } + + sio_hw->fifo_wr = data; + + // Fire off an event to the other core + __sev(); + return true; +} + +static inline uint32_t multicore_fifo_pop_blocking_inline() { + // If nothing there yet, we wait for an event first, + // to try and avoid too much busy waiting + while (!multicore_fifo_rvalid()) + __wfe(); + + return sio_hw->fifo_rd; +} + +uint32_t multicore_fifo_pop_blocking() { + return multicore_fifo_pop_blocking_inline(); +} + +bool multicore_fifo_pop_timeout_us(uint64_t timeout_us, uint32_t *out) { + absolute_time_t end_time = make_timeout_time_us(timeout_us); + // If nothing there yet, we wait for an event first, + // to try and avoid too much busy waiting + while (!multicore_fifo_rvalid()) { + __wfe(); + if (time_reached(end_time)) return false; + } + + *out = sio_hw->fifo_rd; + return true; +} + +// Default stack for core1 ... if multicore_launch_core1 is not included then .stack1 section will be garbage collected +static uint32_t __attribute__((section(".stack1"))) core1_stack[PICO_CORE1_STACK_SIZE / sizeof(uint32_t)]; + +static void __attribute__ ((naked)) core1_trampoline() { + __asm("pop {r0, r1, pc}"); +} + +int core1_wrapper(int (*entry)(void), void *stack_base) { +#if PICO_USE_STACK_GUARDS + // install core1 stack guard + runtime_install_stack_guard(stack_base); +#endif + irq_init_priorities(); + return (*entry)(); +} + +void multicore_reset_core1() { + // Use atomic aliases just in case core 1 is also manipulating some posm state + io_rw_32 *power_off = (io_rw_32 *) (PSM_BASE + PSM_FRCE_OFF_OFFSET); + io_rw_32 *power_off_set = hw_set_alias(power_off); + io_rw_32 *power_off_clr = hw_clear_alias(power_off); + + // Hard-reset core 1. + // Reading back confirms the core 1 reset is in the correct state, but also + // forces APB IO bridges to fence on any internal store buffering + *power_off_set = PSM_FRCE_OFF_PROC1_BITS; + while (!(*power_off & PSM_FRCE_OFF_PROC1_BITS)) tight_loop_contents(); + + // Bring core 1 back out of reset. It will drain its own mailbox FIFO, then push + // a 0 to our mailbox to tell us it has done this. + *power_off_clr = PSM_FRCE_OFF_PROC1_BITS; +} + +void multicore_sleep_core1() { + multicore_reset_core1(); + // note we give core1 an invalid stack pointer, as it should not be used + // note also if we ge simply passed a function that returned immediately, we'd end up in core1_hang anyway + // however that would waste 2 bytes for that function (the horror!) + extern void core1_hang(); // in crt0.S + multicore_launch_core1_raw(core1_hang, (uint32_t *) -1, scb_hw->vtor); +} + +void multicore_launch_core1_with_stack(void (*entry)(void), uint32_t *stack_bottom, size_t stack_size_bytes) { + assert(!(stack_size_bytes & 3u)); + uint32_t *stack_ptr = stack_bottom + stack_size_bytes / sizeof(uint32_t); + // push 2 values onto top of stack for core1_trampoline + stack_ptr -= 3; + stack_ptr[0] = (uintptr_t) entry; + stack_ptr[1] = (uintptr_t) stack_bottom; + stack_ptr[2] = (uintptr_t) core1_wrapper; + multicore_launch_core1_raw(core1_trampoline, stack_ptr, scb_hw->vtor); +} + +void multicore_launch_core1(void (*entry)(void)) { + extern char __StackOneBottom; + uint32_t *stack_limit = (uint32_t *) &__StackOneBottom; + // hack to reference core1_stack although that pointer is wrong.... core1_stack should always be <= stack_limit, if not boom! + uint32_t *stack = core1_stack <= stack_limit ? stack_limit : (uint32_t *) -1; + multicore_launch_core1_with_stack(entry, stack, sizeof(core1_stack)); +} + +void multicore_launch_core1_raw(void (*entry)(void), uint32_t *sp, uint32_t vector_table) { + uint32_t cmd_sequence[] = {0, 0, 1, (uintptr_t) vector_table, (uintptr_t) sp, (uintptr_t) entry}; + + uint seq = 0; + do { + uint cmd = cmd_sequence[seq]; + // we drain before sending a 0 + if (!cmd) { + multicore_fifo_drain(); + __sev(); // core 1 may be waiting for fifo space + } + multicore_fifo_push_blocking(cmd); + uint32_t response = multicore_fifo_pop_blocking(); + // move to next state on correct response otherwise start over + seq = cmd == response ? seq + 1 : 0; + } while (seq < count_of(cmd_sequence)); +} + +#define LOCKOUT_MAGIC_START 0x73a8831e +#define LOCKOUT_MAGIC_END (LOCKOUT_MAGIC_START ^ -1) + +static_assert(SIO_IRQ_PROC1 == SIO_IRQ_PROC0 + 1, ""); + +static mutex_t lockout_mutex; +static bool lockout_in_progress; + +// note this method is in RAM because lockout is used when writing to flash +// it only makes inline calls +static void __isr __not_in_flash_func(multicore_lockout_handler)() { + multicore_fifo_clear_irq(); + while (multicore_fifo_rvalid()) { + if (sio_hw->fifo_rd == LOCKOUT_MAGIC_START) { + uint32_t save = save_and_disable_interrupts(); + multicore_fifo_push_blocking_inline(LOCKOUT_MAGIC_START); + while (multicore_fifo_pop_blocking_inline() != LOCKOUT_MAGIC_END) { + tight_loop_contents(); // not tight but endless potentially + } + restore_interrupts(save); + multicore_fifo_push_blocking_inline(LOCKOUT_MAGIC_END); + } + } +} + +static void check_lockout_mutex_init() { + // use known available lock - we only need it briefly + uint32_t save = hw_claim_lock(); + if (!mutex_is_initialzed(&lockout_mutex)) { + mutex_init(&lockout_mutex); + } + hw_claim_unlock(save); +} + +void multicore_lockout_victim_init() { + check_lockout_mutex_init(); + uint core_num = get_core_num(); + irq_set_exclusive_handler(SIO_IRQ_PROC0 + core_num, multicore_lockout_handler); + irq_set_enabled(SIO_IRQ_PROC0 + core_num, true); +} + +static bool multicore_lockout_handshake(uint32_t magic, absolute_time_t until) { + uint irq_num = SIO_IRQ_PROC0 + get_core_num(); + bool enabled = irq_is_enabled(irq_num); + if (enabled) irq_set_enabled(irq_num, false); + bool rc = false; + do { + int64_t next_timeout_us = absolute_time_diff_us(get_absolute_time(), until); + if (next_timeout_us < 0) { + break; + } + multicore_fifo_push_timeout_us(magic, next_timeout_us); + next_timeout_us = absolute_time_diff_us(get_absolute_time(), until); + if (next_timeout_us < 0) { + break; + } + uint32_t word = 0; + if (!multicore_fifo_pop_timeout_us(next_timeout_us, &word)) { + break; + } + if (word == magic) { + rc = true; + } + } while (!rc); + if (enabled) irq_set_enabled(irq_num, true); + return rc; +} + +static bool multicore_lockout_start_block_until(absolute_time_t until) { + check_lockout_mutex_init(); + if (!mutex_enter_block_until(&lockout_mutex, until)) { + return false; + } + hard_assert(!lockout_in_progress); + bool rc = multicore_lockout_handshake(LOCKOUT_MAGIC_START, until); + lockout_in_progress = rc; + mutex_exit(&lockout_mutex); + return rc; +} + +bool multicore_lockout_start_timeout_us(uint64_t timeout_us) { + return multicore_lockout_start_block_until(make_timeout_time_us(timeout_us)); +} + +void multicore_lockout_start_blocking() { + multicore_lockout_start_block_until(at_the_end_of_time); +} + +static bool multicore_lockout_end_block_until(absolute_time_t until) { + assert(mutex_is_initialzed(&lockout_mutex)); + if (!mutex_enter_block_until(&lockout_mutex, until)) { + return false; + } + assert(lockout_in_progress); + bool rc = multicore_lockout_handshake(LOCKOUT_MAGIC_END, until); + if (rc) { + lockout_in_progress = false; + } + mutex_exit(&lockout_mutex); + return rc; +} + +bool multicore_lockout_end_timeout_us(uint64_t timeout_us) { + return multicore_lockout_end_block_until(make_timeout_time_us(timeout_us)); +} + +void multicore_lockout_end_blocking() { + multicore_lockout_end_block_until(at_the_end_of_time); +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/CMakeLists.txt new file mode 100644 index 0000000000..00000f38cf --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/CMakeLists.txt @@ -0,0 +1,25 @@ +if (NOT TARGET pico_platform_headers) + add_library(pico_platform_headers INTERFACE) + + target_compile_definitions(pico_platform_headers INTERFACE + PICO_NO_HARDWARE=0 + PICO_ON_DEVICE=1 + PICO_BUILD=1 + ) + + target_include_directories(pico_platform_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + target_link_libraries(pico_platform_headers INTERFACE hardware_regs) +endif() + +if (NOT TARGET pico_platform) + add_library(pico_platform INTERFACE) + target_sources(pico_platform INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/platform.c) + + target_link_libraries(pico_platform INTERFACE pico_platform_headers) +endif() + +function(pico_add_platform_library TARGET) + target_link_libraries(pico_platform INTERFACE ${TARGET}) +endfunction() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/asm_helper.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/asm_helper.S new file mode 100644 index 0000000000..050e6a5fb5 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/asm_helper.S @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/platform_defs.h" +#include "pico/config.h" + +#define WRAPPER_FUNC_NAME(x) __wrap_##x +#define SECTION_NAME(x) .text.##x +#define RAM_SECTION_NAME(x) .time_critical.##x +#define rom_table_code(c1, c2) ((c1) | ((c2) << 8)) + +// do not put align in here as it is used mid function sometimes +.macro regular_func x +.global \x +.type \x,%function +.thumb_func +\x: +.endm + +.macro regular_func_with_section x +.section .text.\x +regular_func \x +.endm + +// do not put align in here as it is used mid function sometimes +.macro wrapper_func x +regular_func WRAPPER_FUNC_NAME(\x) +.endm + +.macro __pre_init func, priority_string +.section .preinit_array.\priority_string +.align 2 +.word \func +.endm + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/platform.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/platform.h new file mode 100644 index 0000000000..718a5ecab2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/include/pico/platform.h @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_PLATFORM_H_ +#define _PICO_PLATFORM_H_ + +#include +#include "pico/types.h" +#include "hardware/platform_defs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file platform.h +* \defgroup pico_platform pico_platform +* Compiler definitions for the selected PICO_PLATFORM +*/ + +#define __isr + +#define __not_in_flash(group) __attribute__((section(".time_critical." group))) +#define __not_in_flash_func(x) __not_in_flash(__STRING(x)) x +#define __no_inline_not_in_flash_func(x) __attribute__((noinline)) __not_in_flash_func(x) + +// For use with PICO_COPY_TO_RAM: +#define __in_flash(group) __attribute__((section(".flashdata" group))) + +#define __scratch_x(group) __attribute__((section(".scratch_x." group))) +#define __scratch_y(group) __attribute__((section(".scratch_y." group))) + +#define __time_critical_func(x) __not_in_flash_func(x) +#define __after_data(group) __attribute__((section(".after_data." group))) +#define __packed_aligned __packed __aligned(4) + +#ifndef count_of +#define count_of(a) (sizeof(a)/sizeof((a)[0])) +#endif + +#ifndef MAX +#define MAX(a, b) ((a)>(b)?(a):(b)) +#endif + +#ifndef MIN +#define MIN(a, b) ((b)>(a)?(a):(b)) +#endif + +#define __uninitialized_ram(group) __attribute__((section(".uninitialized_ram." #group))) group + +inline static void __breakpoint() { + __asm__("bkpt #0"); +} + +// return a 32 bit handle for a raw ptr; DMA chaining for example embeds pointers in 32 bit values +// which of course does not work if we're running the code natively on a 64 bit platforms. Therefore +// we provide this macro which allows that code to provide a 64->32 bit mapping in host mode +#define host_safe_hw_ptr(x) ((uintptr_t)(x)) + +void __attribute__((noreturn)) panic_unsupported(); + +void __attribute__((noreturn)) panic(const char *fmt, ...); + +bool running_on_fpga(); +uint8_t rp2040_chip_version(); + +static inline uint8_t rp2040_rom_version() { + return *(uint8_t*)0x13; +} + +// called by any tight hardware polling loop... nominally empty, but can be modified for debugging +static inline void tight_loop_contents() {} + +// return a 32 bit handle for a raw ptr; DMA chaining for example embeds pointers in 32 bit values +// which of course does not work if we're running the code natively on a 64 bit platform for testing. +// Therefore we provide this function which allows the host runtime to provide a mapping +#define native_safe_hw_ptr(x) ((uintptr_t)(x)) + +// multiplies a by b using multiply instruction using the ARM mul instruction regardless of values +inline static int32_t __mul_instruction(int32_t a, int32_t b) { +asm ("mul %0, %1" : "+l" (a) : "l" (b) : ); +return a; +} + +#define WRAPPER_FUNC(x) __wrap_ ## x +#define REAL_FUNC(x) __real_ ## x + +// macro to multiply value a by possibly constant value b +// if b is known to be constant and not zero or a power of 2, then a mul instruction is used rather than gcc's default +#define __fast_mul(a, b) __builtin_choose_expr(__builtin_constant_p(b) && !__builtin_constant_p(a), \ +(__builtin_popcount(b) >= 2 ? __mul_instruction(a,b) : (a)*(b)), \ +(a)*(b)) + +#define __check_type_compatible(type_a, type_b) static_assert(__builtin_types_compatible_p(type_a, type_b), __STRING(type_a) " is not compatible with " __STRING(type_b)); +#ifdef __cplusplus +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/platform.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/platform.c new file mode 100644 index 0000000000..86167ab2df --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_platform/platform.c @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico.h" +#include "hardware/address_mapped.h" +#include "hardware/regs/tbman.h" +#include "hardware/regs/sysinfo.h" + +bool running_on_fpga() { + return !!((*(io_ro_32 *)TBMAN_BASE) & TBMAN_PLATFORM_FPGA_BITS); +} + +#define MANUFACTURER_RPI 0x927 +#define PART_RP2 0x2 + +uint8_t rp2040_chip_version() { + // First register of sysinfo is chip id + uint32_t chip_id = *((io_ro_32*)(SYSINFO_BASE + SYSINFO_CHIP_ID_OFFSET)); + uint32_t __unused manufacturer = chip_id & SYSINFO_CHIP_ID_MANUFACTURER_BITS; + uint32_t __unused part = (chip_id & SYSINFO_CHIP_ID_PART_BITS) >> SYSINFO_CHIP_ID_PART_LSB; + assert(manufacturer == MANUFACTURER_RPI); + assert(part == PART_RP2); + // Version 1 == B0/B1 + int version = (chip_id & SYSINFO_CHIP_ID_REVISION_BITS) >> SYSINFO_CHIP_ID_REVISION_LSB; + return version; +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/CMakeLists.txt new file mode 100644 index 0000000000..cf2082e81b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/CMakeLists.txt @@ -0,0 +1,63 @@ +if (NOT TARGET pico_printf) + # library to be depended on - we make this depend on particular implementations using per target generator expressions + add_library(pico_printf INTERFACE) + + # no custom implementation; falls thru to compiler + add_library(pico_printf_compiler INTERFACE) + target_compile_definitions(pico_printf_compiler INTERFACE + PICO_PRINTF_COMPILER=1 + ) + + add_library(pico_printf_headers INTERFACE) + target_include_directories(pico_printf_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + # add alias "default" which is just pico. + add_library(pico_printf_default INTERFACE) + target_link_libraries(pico_printf_default INTERFACE pico_printf_pico) + + set(PICO_DEFAULT_PRINTF_IMPL pico_printf_default) + + target_link_libraries(pico_printf INTERFACE + $>,$,${PICO_DEFAULT_PRINTF_IMPL}>) + + add_library(pico_printf_pico INTERFACE) + target_sources(pico_printf_pico INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/printf.c + ) + + target_compile_definitions(pico_printf_pico INTERFACE + PICO_PRINTF_PICO=1 + ) + + target_link_libraries(pico_printf_pico INTERFACE pico_printf_headers) + + add_library(pico_printf_none INTERFACE) + target_sources(pico_printf_none INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/printf_none.S + ) + + target_link_libraries(pico_printf_none INTERFACE pico_printf_headers) + + target_compile_definitions(pico_printf_none INTERFACE + PICO_PRINTF_NONE=1 + ) + + function(wrap_printf_functions TARGET) + # note that printf and vprintf are in pico_stdio so we can provide thread safety + pico_wrap_function(${TARGET} sprintf) + pico_wrap_function(${TARGET} snprintf) + pico_wrap_function(${TARGET} vsnprintf) + endfunction() + + wrap_printf_functions(pico_printf_pico) + wrap_printf_functions(pico_printf_none) + + macro(pico_set_printf_implementation TARGET IMPL) + get_target_property(target_type ${TARGET} TYPE) + if ("EXECUTABLE" STREQUAL "${target_type}") + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_PRINTF_IMPL "pico_printf_${IMPL}") + else() + message(FATAL_ERROR "printf implementation must be set on executable not library") + endif() + endmacro() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/include/pico/printf.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/include/pico/printf.h new file mode 100644 index 0000000000..6a82b8db4a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/include/pico/printf.h @@ -0,0 +1,93 @@ +/////////////////////////////////////////////////////////////////////////////// +// \author (c) Marco Paland (info@paland.com) +// 2014-2019, PALANDesign Hannover, Germany +// +// \license The MIT License (MIT) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// \brief Tiny printf, sprintf and snprintf implementation, optimized for speed on +// embedded systems with a very limited resources. +// Use this instead of bloated standard/newlib printf. +// These routines are thread safe and reentrant. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef PICO_PRINTF_H_ +#define PICO_PRINTF_H_ + +/** \file printf.h + * \defgroup pico_printf pico_printf + * + * Compact replacement for printf by Marco Paland (info@paland.com) + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "pico.h" +#include +#include + +// PICO_CONFIG: PICO_PRINTF_ALWAYS_INCLUDED, Whether to always include printf code even if only called weakly (by panic), type=bool, default=1 in debug build 0 otherwise, group=pico_printf +#ifndef PICO_PRINTF_ALWAYS_INCLUDED +#ifndef NDEBUG +#define PICO_PRINTF_ALWAYS_INCLUDED 1 +#else +#define PICO_PRINTF_ALWAYS_INCLUDED 0 +#endif +#endif + +#if PICO_PRINTF_PICO +// weak raw printf may be a puts if printf has not been called, +// so that we can support gc of printf when it isn't called +// +// it is called raw to distinguish it from the regular printf which +// is in stdio.c and does mutex protection +#if !PICO_PRINTF_ALWAYS_INCLUDED +bool __printflike(1, 0) weak_raw_printf(const char *fmt, ...); +bool weak_raw_vprintf(const char *fmt, va_list args); +#else +#define weak_raw_printf(...) ({printf(__VA_ARGS__); true;}) +#define weak_raw_vprintf(fmt,va) ({vprintf(fmt,va); true;}) +#endif + +/** + * printf with output function + * You may use this as dynamic alternative to printf() with its fixed _putchar() output + * \param out An output function which takes one character and an argument pointer + * \param arg An argument pointer for user data passed to output function + * \param format A string that specifies the format of the output + * \return The number of characters that are sent to the output function, not counting the terminating null character + */ +int vfctprintf(void (*out)(char character, void *arg), void *arg, const char *format, va_list va); + +#else + +#define weak_raw_printf(...) ({printf(__VA_ARGS__); true;}) +#define weak_raw_vprintf(fmt,va) ({vprintf(fmt,va); true;}) + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // _PRINTF_H_ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf.c new file mode 100644 index 0000000000..833bd7fcf1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf.c @@ -0,0 +1,937 @@ +/////////////////////////////////////////////////////////////////////////////// +// \author (c) Marco Paland (info@paland.com) +// 2014-2019, PALANDesign Hannover, Germany +// +// \license The MIT License (MIT) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// \brief Tiny printf, sprintf and (v)snprintf implementation, optimized for speed on +// embedded systems with a very limited resources. These routines are thread +// safe and reentrant! +// Use this instead of the bloated standard/newlib printf cause these use +// malloc for printf (and may not be thread safe). +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +#include "pico/platform.h" +#include "pico/printf.h" + +// PICO_CONFIG: PICO_PRINTF_NTOA_BUFFER_SIZE, Define printf ntoa buffer size, min=0, max=128, default=32, group=pico_printf +// 'ntoa' conversion buffer size, this must be big enough to hold one converted +// numeric number including padded zeros (dynamically created on stack) +#ifndef PICO_PRINTF_NTOA_BUFFER_SIZE +#define PICO_PRINTF_NTOA_BUFFER_SIZE 32U +#endif + +// PICO_CONFIG: PICO_PRINTF_FTOA_BUFFER_SIZE, Define printf ftoa buffer size, min=0, max=128, default=32, group=pico_printf +// 'ftoa' conversion buffer size, this must be big enough to hold one converted +// float number including padded zeros (dynamically created on stack) +#ifndef PICO_PRINTF_FTOA_BUFFER_SIZE +#define PICO_PRINTF_FTOA_BUFFER_SIZE 32U +#endif + +// PICO_CONFIG: PICO_PRINTF_SUPPORT_FLOAT, Enable floating point printing, default=1, group=pico_printf +// support for the floating point type (%f) +#ifndef PICO_PRINTF_SUPPORT_FLOAT +#define PICO_PRINTF_SUPPORT_FLOAT 1 +#endif + +// PICO_CONFIG: PICO_PRINTF_SUPPORT_EXPONENTIAL, Enable exponential floating point printing, default=1, group=pico_printf +// support for exponential floating point notation (%e/%g) +#ifndef PICO_PRINTF_SUPPORT_EXPONENTIAL +#define PICO_PRINTF_SUPPORT_EXPONENTIAL 1 +#endif + +// PICO_CONFIG: PICO_PRINTF_DEFAULT_FLOAT_PRECISION, Define default floating point precision, min=1, max=16, default=6, group=pico_printf +#ifndef PICO_PRINTF_DEFAULT_FLOAT_PRECISION +#define PICO_PRINTF_DEFAULT_FLOAT_PRECISION 6U +#endif + +// PICO_CONFIG: PICO_PRINTF_MAX_FLOAT, Define the largest float suitable to print with %f, min=1, max=1e9, default=1e9, group=pico_printf +#ifndef PICO_PRINTF_MAX_FLOAT +#define PICO_PRINTF_MAX_FLOAT 1e9 +#endif + +// PICO_CONFIG: PICO_PRINTF_SUPPORT_LONG_LONG, Enable support for long long types (%llu or %p), default=1, group=pico_printf +#ifndef PICO_PRINTF_SUPPORT_LONG_LONG +#define PICO_PRINTF_SUPPORT_LONG_LONG 1 +#endif + +// PICO_CONFIG: PICO_PRINTF_SUPPORT_PTRDIFF_T, Enable support for the ptrdiff_t type (%t), default=1, group=pico_printf +// ptrdiff_t is normally defined in as long or long long type +#ifndef PICO_PRINTF_SUPPORT_PTRDIFF_T +#define PICO_PRINTF_SUPPORT_PTRDIFF_T 1 +#endif + +/////////////////////////////////////////////////////////////////////////////// + +// internal flag definitions +#define FLAGS_ZEROPAD (1U << 0U) +#define FLAGS_LEFT (1U << 1U) +#define FLAGS_PLUS (1U << 2U) +#define FLAGS_SPACE (1U << 3U) +#define FLAGS_HASH (1U << 4U) +#define FLAGS_UPPERCASE (1U << 5U) +#define FLAGS_CHAR (1U << 6U) +#define FLAGS_SHORT (1U << 7U) +#define FLAGS_LONG (1U << 8U) +#define FLAGS_LONG_LONG (1U << 9U) +#define FLAGS_PRECISION (1U << 10U) +#define FLAGS_ADAPT_EXP (1U << 11U) + +// import float.h for DBL_MAX +#if PICO_PRINTF_SUPPORT_FLOAT + +#include + +#endif + +/** + * Output a character to a custom device like UART, used by the printf() function + * This function is declared here only. You have to write your custom implementation somewhere + * \param character Character to output + */ +static void _putchar(char character) { + putchar(character); +} + +// output function type +typedef void (*out_fct_type)(char character, void *buffer, size_t idx, size_t maxlen); + +#if !PICO_PRINTF_ALWAYS_INCLUDED +// we don't have a way to specify a truly weak symbol reference (the linker will always include targets in a single link step, +// so we make a function pointer that is initialized on the first printf called... if printf is not included in the binary +// (or has never been called - we can't tell) then this will be null. the assumption is that if you are using printf +// you are likely to have printed something. +static int (*lazy_vsnprintf)(out_fct_type out, char *buffer, const size_t maxlen, const char *format, va_list va); +#endif + +// wrapper (used as buffer) for output function type +typedef struct { + void (*fct)(char character, void *arg); + void *arg; +} out_fct_wrap_type; + +// internal buffer output +static inline void _out_buffer(char character, void *buffer, size_t idx, size_t maxlen) { + if (idx < maxlen) { + ((char *) buffer)[idx] = character; + } +} + +// internal null output +static inline void _out_null(char character, void *buffer, size_t idx, size_t maxlen) { + (void) character; + (void) buffer; + (void) idx; + (void) maxlen; +} + +// internal _putchar wrapper +static inline void _out_char(char character, void *buffer, size_t idx, size_t maxlen) { + (void) buffer; + (void) idx; + (void) maxlen; + if (character) { + _putchar(character); + } +} + + +// internal output function wrapper +static inline void _out_fct(char character, void *buffer, size_t idx, size_t maxlen) { + (void) idx; + (void) maxlen; + if (character) { + // buffer is the output fct pointer + ((out_fct_wrap_type *) buffer)->fct(character, ((out_fct_wrap_type *) buffer)->arg); + } +} + + +// internal secure strlen +// \return The length of the string (excluding the terminating 0) limited by 'maxsize' +static inline unsigned int _strnlen_s(const char *str, size_t maxsize) { + const char *s; + for (s = str; *s && maxsize--; ++s); + return (unsigned int) (s - str); +} + + +// internal test if char is a digit (0-9) +// \return true if char is a digit +static inline bool _is_digit(char ch) { + return (ch >= '0') && (ch <= '9'); +} + + +// internal ASCII string to unsigned int conversion +static unsigned int _atoi(const char **str) { + unsigned int i = 0U; + while (_is_digit(**str)) { + i = i * 10U + (unsigned int) (*((*str)++) - '0'); + } + return i; +} + + +// output the specified string in reverse, taking care of any zero-padding +static size_t _out_rev(out_fct_type out, char *buffer, size_t idx, size_t maxlen, const char *buf, size_t len, + unsigned int width, unsigned int flags) { + const size_t start_idx = idx; + + // pad spaces up to given width + if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) { + for (size_t i = len; i < width; i++) { + out(' ', buffer, idx++, maxlen); + } + } + + // reverse string + while (len) { + out(buf[--len], buffer, idx++, maxlen); + } + + // append pad spaces up to given width + if (flags & FLAGS_LEFT) { + while (idx - start_idx < width) { + out(' ', buffer, idx++, maxlen); + } + } + + return idx; +} + + +// internal itoa format +static size_t _ntoa_format(out_fct_type out, char *buffer, size_t idx, size_t maxlen, char *buf, size_t len, + bool negative, unsigned int base, unsigned int prec, unsigned int width, + unsigned int flags) { + // pad leading zeros + if (!(flags & FLAGS_LEFT)) { + if (width && (flags & FLAGS_ZEROPAD) && (negative || (flags & (FLAGS_PLUS | FLAGS_SPACE)))) { + width--; + } + while ((len < prec) && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = '0'; + } + while ((flags & FLAGS_ZEROPAD) && (len < width) && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = '0'; + } + } + + // handle hash + if (flags & FLAGS_HASH) { + if (!(flags & FLAGS_PRECISION) && len && ((len == prec) || (len == width))) { + len--; + if (len && (base == 16U)) { + len--; + } + } + if ((base == 16U) && !(flags & FLAGS_UPPERCASE) && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = 'x'; + } else if ((base == 16U) && (flags & FLAGS_UPPERCASE) && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = 'X'; + } else if ((base == 2U) && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = 'b'; + } + if (len < PICO_PRINTF_NTOA_BUFFER_SIZE) { + buf[len++] = '0'; + } + } + + if (len < PICO_PRINTF_NTOA_BUFFER_SIZE) { + if (negative) { + buf[len++] = '-'; + } else if (flags & FLAGS_PLUS) { + buf[len++] = '+'; // ignore the space if the '+' exists + } else if (flags & FLAGS_SPACE) { + buf[len++] = ' '; + } + } + + return _out_rev(out, buffer, idx, maxlen, buf, len, width, flags); +} + + +// internal itoa for 'long' type +static size_t _ntoa_long(out_fct_type out, char *buffer, size_t idx, size_t maxlen, unsigned long value, bool negative, + unsigned long base, unsigned int prec, unsigned int width, unsigned int flags) { + char buf[PICO_PRINTF_NTOA_BUFFER_SIZE]; + size_t len = 0U; + + // no hash for 0 values + if (!value) { + flags &= ~FLAGS_HASH; + } + + // write if precision != 0 and value is != 0 + if (!(flags & FLAGS_PRECISION) || value) { + do { + const char digit = (char) (value % base); + buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; + value /= base; + } while (value && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)); + } + + return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int) base, prec, width, flags); +} + + +// internal itoa for 'long long' type +#if PICO_PRINTF_SUPPORT_LONG_LONG + +static size_t _ntoa_long_long(out_fct_type out, char *buffer, size_t idx, size_t maxlen, unsigned long long value, + bool negative, unsigned long long base, unsigned int prec, unsigned int width, + unsigned int flags) { + char buf[PICO_PRINTF_NTOA_BUFFER_SIZE]; + size_t len = 0U; + + // no hash for 0 values + if (!value) { + flags &= ~FLAGS_HASH; + } + + // write if precision != 0 and value is != 0 + if (!(flags & FLAGS_PRECISION) || value) { + do { + const char digit = (char) (value % base); + buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; + value /= base; + } while (value && (len < PICO_PRINTF_NTOA_BUFFER_SIZE)); + } + + return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int) base, prec, width, flags); +} + +#endif // PICO_PRINTF_SUPPORT_LONG_LONG + + +#if PICO_PRINTF_SUPPORT_FLOAT + +#if PICO_PRINTF_SUPPORT_EXPONENTIAL +// forward declaration so that _ftoa can switch to exp notation for values > PICO_PRINTF_MAX_FLOAT +static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, double value, unsigned int prec, + unsigned int width, unsigned int flags); +#endif + +#define is_nan __builtin_isnan + +// internal ftoa for fixed decimal floating point +static size_t _ftoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, double value, unsigned int prec, + unsigned int width, unsigned int flags) { + char buf[PICO_PRINTF_FTOA_BUFFER_SIZE]; + size_t len = 0U; + double diff = 0.0; + + // powers of 10 + static const double pow10[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000}; + + // test for special values + if (is_nan(value)) + return _out_rev(out, buffer, idx, maxlen, "nan", 3, width, flags); + if (value < -DBL_MAX) + return _out_rev(out, buffer, idx, maxlen, "fni-", 4, width, flags); + if (value > DBL_MAX) + return _out_rev(out, buffer, idx, maxlen, (flags & FLAGS_PLUS) ? "fni+" : "fni", (flags & FLAGS_PLUS) ? 4U : 3U, + width, flags); + + // test for very large values + // standard printf behavior is to print EVERY whole number digit -- which could be 100s of characters overflowing your buffers == bad + if ((value > PICO_PRINTF_MAX_FLOAT) || (value < -PICO_PRINTF_MAX_FLOAT)) { +#if PICO_PRINTF_SUPPORT_EXPONENTIAL + return _etoa(out, buffer, idx, maxlen, value, prec, width, flags); +#else + return 0U; +#endif + } + + // test for negative + bool negative = false; + if (value < 0) { + negative = true; + value = 0 - value; + } + + // set default precision, if not set explicitly + if (!(flags & FLAGS_PRECISION)) { + prec = PICO_PRINTF_DEFAULT_FLOAT_PRECISION; + } + // limit precision to 9, cause a prec >= 10 can lead to overflow errors + while ((len < PICO_PRINTF_FTOA_BUFFER_SIZE) && (prec > 9U)) { + buf[len++] = '0'; + prec--; + } + + int whole = (int) value; + double tmp = (value - whole) * pow10[prec]; + unsigned long frac = (unsigned long) tmp; + diff = tmp - frac; + + if (diff > 0.5) { + ++frac; + // handle rollover, e.g. case 0.99 with prec 1 is 1.0 + if (frac >= pow10[prec]) { + frac = 0; + ++whole; + } + } else if (diff < 0.5) { + } else if ((frac == 0U) || (frac & 1U)) { + // if halfway, round up if odd OR if last digit is 0 + ++frac; + } + + if (prec == 0U) { + diff = value - (double) whole; + if (!((diff < 0.5) || (diff > 0.5)) && (whole & 1)) { + // exactly 0.5 and ODD, then round up + // 1.5 -> 2, but 2.5 -> 2 + ++whole; + } + } else { + unsigned int count = prec; + // now do fractional part, as an unsigned number + while (len < PICO_PRINTF_FTOA_BUFFER_SIZE) { + --count; + buf[len++] = (char) (48U + (frac % 10U)); + if (!(frac /= 10U)) { + break; + } + } + // add extra 0s + while ((len < PICO_PRINTF_FTOA_BUFFER_SIZE) && (count-- > 0U)) { + buf[len++] = '0'; + } + if (len < PICO_PRINTF_FTOA_BUFFER_SIZE) { + // add decimal + buf[len++] = '.'; + } + } + + // do whole part, number is reversed + while (len < PICO_PRINTF_FTOA_BUFFER_SIZE) { + buf[len++] = (char) (48 + (whole % 10)); + if (!(whole /= 10)) { + break; + } + } + + // pad leading zeros + if (!(flags & FLAGS_LEFT) && (flags & FLAGS_ZEROPAD)) { + if (width && (negative || (flags & (FLAGS_PLUS | FLAGS_SPACE)))) { + width--; + } + while ((len < width) && (len < PICO_PRINTF_FTOA_BUFFER_SIZE)) { + buf[len++] = '0'; + } + } + + if (len < PICO_PRINTF_FTOA_BUFFER_SIZE) { + if (negative) { + buf[len++] = '-'; + } else if (flags & FLAGS_PLUS) { + buf[len++] = '+'; // ignore the space if the '+' exists + } else if (flags & FLAGS_SPACE) { + buf[len++] = ' '; + } + } + + return _out_rev(out, buffer, idx, maxlen, buf, len, width, flags); +} + + +#if PICO_PRINTF_SUPPORT_EXPONENTIAL + +// internal ftoa variant for exponential floating-point type, contributed by Martijn Jasperse +static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, double value, unsigned int prec, + unsigned int width, unsigned int flags) { + // check for NaN and special values + if (is_nan(value) || (value > DBL_MAX) || (value < -DBL_MAX)) { + return _ftoa(out, buffer, idx, maxlen, value, prec, width, flags); + } + + // determine the sign + const bool negative = value < 0; + if (negative) { + value = -value; + } + + // default precision + if (!(flags & FLAGS_PRECISION)) { + prec = PICO_PRINTF_DEFAULT_FLOAT_PRECISION; + } + + // determine the decimal exponent + // based on the algorithm by David Gay (https://www.ampl.com/netlib/fp/dtoa.c) + union { + uint64_t U; + double F; + } conv; + + conv.F = value; + int exp2 = (int) ((conv.U >> 52U) & 0x07FFU) - 1023; // effectively log2 + conv.U = (conv.U & ((1ULL << 52U) - 1U)) | (1023ULL << 52U); // drop the exponent so conv.F is now in [1,2) + // now approximate log10 from the log2 integer part and an expansion of ln around 1.5 + int expval = (int) (0.1760912590558 + exp2 * 0.301029995663981 + (conv.F - 1.5) * 0.289529654602168); + // now we want to compute 10^expval but we want to be sure it won't overflow + exp2 = (int) (expval * 3.321928094887362 + 0.5); + const double z = expval * 2.302585092994046 - exp2 * 0.6931471805599453; + const double z2 = z * z; + conv.U = (uint64_t) (exp2 + 1023) << 52U; + // compute exp(z) using continued fractions, see https://en.wikipedia.org/wiki/Exponential_function#Continued_fractions_for_ex + conv.F *= 1 + 2 * z / (2 - z + (z2 / (6 + (z2 / (10 + z2 / 14))))); + // correct for rounding errors + if (value < conv.F) { + expval--; + conv.F /= 10; + } + + // the exponent format is "%+03d" and largest value is "307", so set aside 4-5 characters + unsigned int minwidth = ((expval < 100) && (expval > -100)) ? 4U : 5U; + + // in "%g" mode, "prec" is the number of *significant figures* not decimals + if (flags & FLAGS_ADAPT_EXP) { + // do we want to fall-back to "%f" mode? + if ((value >= 1e-4) && (value < 1e6)) { + if ((int) prec > expval) { + prec = (unsigned) ((int) prec - expval - 1); + } else { + prec = 0; + } + flags |= FLAGS_PRECISION; // make sure _ftoa respects precision + // no characters in exponent + minwidth = 0U; + expval = 0; + } else { + // we use one sigfig for the whole part + if ((prec > 0) && (flags & FLAGS_PRECISION)) { + --prec; + } + } + } + + // will everything fit? + unsigned int fwidth = width; + if (width > minwidth) { + // we didn't fall-back so subtract the characters required for the exponent + fwidth -= minwidth; + } else { + // not enough characters, so go back to default sizing + fwidth = 0U; + } + if ((flags & FLAGS_LEFT) && minwidth) { + // if we're padding on the right, DON'T pad the floating part + fwidth = 0U; + } + + // rescale the float value + if (expval) { + value /= conv.F; + } + + // output the floating part + const size_t start_idx = idx; + idx = _ftoa(out, buffer, idx, maxlen, negative ? -value : value, prec, fwidth, flags & ~FLAGS_ADAPT_EXP); + + // output the exponent part + if (minwidth) { + // output the exponential symbol + out((flags & FLAGS_UPPERCASE) ? 'E' : 'e', buffer, idx++, maxlen); + // output the exponent value + idx = _ntoa_long(out, buffer, idx, maxlen, (expval < 0) ? -expval : expval, expval < 0, 10, 0, minwidth - 1, + FLAGS_ZEROPAD | FLAGS_PLUS); + // might need to right-pad spaces + if (flags & FLAGS_LEFT) { + while (idx - start_idx < width) out(' ', buffer, idx++, maxlen); + } + } + return idx; +} + +#endif // PICO_PRINTF_SUPPORT_EXPONENTIAL +#endif // PICO_PRINTF_SUPPORT_FLOAT + +// internal vsnprintf +static int _vsnprintf(out_fct_type out, char *buffer, const size_t maxlen, const char *format, va_list va) { +#if !PICO_PRINTF_ALWAYS_INCLUDED + lazy_vsnprintf = _vsnprintf; +#endif + unsigned int flags, width, precision, n; + size_t idx = 0U; + + if (!buffer) { + // use null output function + out = _out_null; + } + + while (*format) { + // format specifier? %[flags][width][.precision][length] + if (*format != '%') { + // no + out(*format, buffer, idx++, maxlen); + format++; + continue; + } else { + // yes, evaluate it + format++; + } + + // evaluate flags + flags = 0U; + do { + switch (*format) { + case '0': + flags |= FLAGS_ZEROPAD; + format++; + n = 1U; + break; + case '-': + flags |= FLAGS_LEFT; + format++; + n = 1U; + break; + case '+': + flags |= FLAGS_PLUS; + format++; + n = 1U; + break; + case ' ': + flags |= FLAGS_SPACE; + format++; + n = 1U; + break; + case '#': + flags |= FLAGS_HASH; + format++; + n = 1U; + break; + default : + n = 0U; + break; + } + } while (n); + + // evaluate width field + width = 0U; + if (_is_digit(*format)) { + width = _atoi(&format); + } else if (*format == '*') { + const int w = va_arg(va, int); + if (w < 0) { + flags |= FLAGS_LEFT; // reverse padding + width = (unsigned int) -w; + } else { + width = (unsigned int) w; + } + format++; + } + + // evaluate precision field + precision = 0U; + if (*format == '.') { + flags |= FLAGS_PRECISION; + format++; + if (_is_digit(*format)) { + precision = _atoi(&format); + } else if (*format == '*') { + const int prec = (int) va_arg(va, int); + precision = prec > 0 ? (unsigned int) prec : 0U; + format++; + } + } + + // evaluate length field + switch (*format) { + case 'l' : + flags |= FLAGS_LONG; + format++; + if (*format == 'l') { + flags |= FLAGS_LONG_LONG; + format++; + } + break; + case 'h' : + flags |= FLAGS_SHORT; + format++; + if (*format == 'h') { + flags |= FLAGS_CHAR; + format++; + } + break; +#if PICO_PRINTF_SUPPORT_PTRDIFF_T + case 't' : + flags |= (sizeof(ptrdiff_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; + break; +#endif + case 'j' : + flags |= (sizeof(intmax_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; + break; + case 'z' : + flags |= (sizeof(size_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; + break; + default : + break; + } + + // evaluate specifier + switch (*format) { + case 'd' : + case 'i' : + case 'u' : + case 'x' : + case 'X' : + case 'o' : + case 'b' : { + // set the base + unsigned int base; + if (*format == 'x' || *format == 'X') { + base = 16U; + } else if (*format == 'o') { + base = 8U; + } else if (*format == 'b') { + base = 2U; + } else { + base = 10U; + flags &= ~FLAGS_HASH; // no hash for dec format + } + // uppercase + if (*format == 'X') { + flags |= FLAGS_UPPERCASE; + } + + // no plus or space flag for u, x, X, o, b + if ((*format != 'i') && (*format != 'd')) { + flags &= ~(FLAGS_PLUS | FLAGS_SPACE); + } + + // ignore '0' flag when precision is given + if (flags & FLAGS_PRECISION) { + flags &= ~FLAGS_ZEROPAD; + } + + // convert the integer + if ((*format == 'i') || (*format == 'd')) { + // signed + if (flags & FLAGS_LONG_LONG) { +#if PICO_PRINTF_SUPPORT_LONG_LONG + const long long value = va_arg(va, long long); + idx = _ntoa_long_long(out, buffer, idx, maxlen, + (unsigned long long) (value > 0 ? value : 0 - value), value < 0, base, + precision, width, flags); +#endif + } else if (flags & FLAGS_LONG) { + const long value = va_arg(va, long); + idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned long) (value > 0 ? value : 0 - value), + value < 0, base, precision, width, flags); + } else { + const int value = (flags & FLAGS_CHAR) ? (char) va_arg(va, int) : (flags & FLAGS_SHORT) + ? (short int) va_arg(va, int) + : va_arg(va, int); + idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned int) (value > 0 ? value : 0 - value), + value < 0, base, precision, width, flags); + } + } else { + // unsigned + if (flags & FLAGS_LONG_LONG) { +#if PICO_PRINTF_SUPPORT_LONG_LONG + idx = _ntoa_long_long(out, buffer, idx, maxlen, va_arg(va, unsigned long long), false, base, + precision, width, flags); +#endif + } else if (flags & FLAGS_LONG) { + idx = _ntoa_long(out, buffer, idx, maxlen, va_arg(va, unsigned long), false, base, precision, + width, flags); + } else { + const unsigned int value = (flags & FLAGS_CHAR) ? (unsigned char) va_arg(va, unsigned int) + : (flags & FLAGS_SHORT) + ? (unsigned short int) va_arg(va, + unsigned int) + : va_arg(va, unsigned int); + idx = _ntoa_long(out, buffer, idx, maxlen, value, false, base, precision, width, flags); + } + } + format++; + break; + } + case 'f' : + case 'F' : +#if PICO_PRINTF_SUPPORT_FLOAT + if (*format == 'F') flags |= FLAGS_UPPERCASE; + idx = _ftoa(out, buffer, idx, maxlen, va_arg(va, double), precision, width, flags); +#else + for(int i=0;i<2;i++) out('?', buffer, idx++, maxlen); + va_arg(va, double); +#endif + format++; + break; + case 'e': + case 'E': + case 'g': + case 'G': +#if PICO_PRINTF_SUPPORT_FLOAT && PICO_PRINTF_SUPPORT_EXPONENTIAL + if ((*format == 'g') || (*format == 'G')) flags |= FLAGS_ADAPT_EXP; + if ((*format == 'E') || (*format == 'G')) flags |= FLAGS_UPPERCASE; + idx = _etoa(out, buffer, idx, maxlen, va_arg(va, double), precision, width, flags); +#else + for(int i=0;i<2;i++) out('?', buffer, idx++, maxlen); + va_arg(va, double); +#endif + format++; + break; + case 'c' : { + unsigned int l = 1U; + // pre padding + if (!(flags & FLAGS_LEFT)) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + // char output + out((char) va_arg(va, int), buffer, idx++, maxlen); + // post padding + if (flags & FLAGS_LEFT) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + format++; + break; + } + + case 's' : { + const char *p = va_arg(va, char*); + unsigned int l = _strnlen_s(p, precision ? precision : (size_t) -1); + // pre padding + if (flags & FLAGS_PRECISION) { + l = (l < precision ? l : precision); + } + if (!(flags & FLAGS_LEFT)) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + // string output + while ((*p != 0) && (!(flags & FLAGS_PRECISION) || precision--)) { + out(*(p++), buffer, idx++, maxlen); + } + // post padding + if (flags & FLAGS_LEFT) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + format++; + break; + } + + case 'p' : { + width = sizeof(void *) * 2U; + flags |= FLAGS_ZEROPAD | FLAGS_UPPERCASE; +#if PICO_PRINTF_SUPPORT_LONG_LONG + const bool is_ll = sizeof(uintptr_t) == sizeof(long long); + if (is_ll) { + idx = _ntoa_long_long(out, buffer, idx, maxlen, (uintptr_t) va_arg(va, void*), false, 16U, + precision, width, flags); + } else { +#endif + idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned long) ((uintptr_t) va_arg(va, void*)), false, + 16U, precision, width, flags); +#if PICO_PRINTF_SUPPORT_LONG_LONG + } +#endif + format++; + break; + } + + case '%' : + out('%', buffer, idx++, maxlen); + format++; + break; + + default : + out(*format, buffer, idx++, maxlen); + format++; + break; + } + } + + // termination + out((char) 0, buffer, idx < maxlen ? idx : maxlen - 1U, maxlen); + + // return written chars without terminating \0 + return (int) idx; +} + + +/////////////////////////////////////////////////////////////////////////////// + +int WRAPPER_FUNC(sprintf)(char *buffer, const char *format, ...) { + va_list va; + va_start(va, format); + const int ret = _vsnprintf(_out_buffer, buffer, (size_t) -1, format, va); + va_end(va); + return ret; +} + +int WRAPPER_FUNC(snprintf)(char *buffer, size_t count, const char *format, ...) { + va_list va; + va_start(va, format); + const int ret = _vsnprintf(_out_buffer, buffer, count, format, va); + va_end(va); + return ret; +} + +int WRAPPER_FUNC(vsnprintf)(char *buffer, size_t count, const char *format, va_list va) { + return _vsnprintf(_out_buffer, buffer, count, format, va); +} + +int vfctprintf(void (*out)(char character, void *arg), void *arg, const char *format, va_list va) { + const out_fct_wrap_type out_fct_wrap = {out, arg}; + return _vsnprintf(_out_fct, (char *) (uintptr_t) &out_fct_wrap, (size_t) -1, format, va); +} + +#if PICO_PRINTF_PICO +#if !PICO_PRINTF_ALWAYS_INCLUDED +bool weak_raw_printf(const char *fmt, ...) { + va_list va; + va_start(va, fmt); + bool rc = weak_raw_vprintf(fmt, va); + va_end(va); + return rc; +} + +bool weak_raw_vprintf(const char *fmt, va_list args) { + if (lazy_vsnprintf) { + char buffer[1]; + lazy_vsnprintf(_out_char, buffer, (size_t) -1, fmt, args); + return true; + } else { + puts(fmt); + return false; + } +} +#endif +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf_none.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf_none.S new file mode 100644 index 0000000000..adc00ee54a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_printf/printf_none.S @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/asm_helper.S" +#include "pico/bootrom/sf_table.h" + +.syntax unified +.cpu cortex-m0plus +.thumb + +wrapper_func sprintf +wrapper_func snprintf +wrapper_func vsnprintf +regular_func printf_none_assert + push {lr} // keep stack trace sane + ldr r0, =str + bl panic + +str: + .asciz "printf support is disabled" \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/CMakeLists.txt new file mode 100644 index 0000000000..83c08f61e0 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/CMakeLists.txt @@ -0,0 +1,44 @@ +add_library(pico_runtime INTERFACE) + +target_sources(pico_runtime INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/runtime.c +) + +target_include_directories(pico_runtime INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + +target_link_libraries(pico_runtime INTERFACE + hardware_uart + hardware_clocks + hardware_irq + pico_printf + pico_sync + ) + +if (TARGET pico_bit_ops) + target_link_libraries(pico_runtime INTERFACE pico_bit_ops) +endif() +if (TARGET pico_divider) + target_link_libraries(pico_runtime INTERFACE pico_divider) +endif() +if (TARGET pico_double) + target_link_libraries(pico_runtime INTERFACE pico_double) +endif() +if (TARGET pico_int64_ops) + target_link_libraries(pico_runtime INTERFACE pico_int64_ops) +endif() +if (TARGET pico_float) + target_link_libraries(pico_runtime INTERFACE pico_float) +endif() +if (TARGET pico_malloc) + target_link_libraries(pico_runtime INTERFACE pico_malloc) +endif() +if (TARGET pico_mem_ops) + target_link_libraries(pico_runtime INTERFACE pico_mem_ops) +endif() +if (TARGET pico_standard_link) + target_link_libraries(pico_runtime INTERFACE pico_standard_link) +endif() + +# todo is this correct/needed? +target_link_options(pico_runtime INTERFACE "--specs=nosys.specs") + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/include/pico/runtime.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/include/pico/runtime.h new file mode 100644 index 0000000000..752ec6cdef --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/include/pico/runtime.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_RUNTIME_H +#define _PICO_RUNTIME_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** \file runtime.h +* \defgroup pico_runtime pico_runtime +* Aggregate runtime support including @ref pico_bit_ops, @ref pico_divider, @ref pico_double, @ref pico_int64_ops, @ref pico_float, @ref pico_malloc, @ref pico_mem_ops and @ref pico_standard_link +*/ + + +void runtime_install_stack_guard(void *stack_bottom); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/runtime.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/runtime.c new file mode 100644 index 0000000000..98104db73a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_runtime/runtime.c @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "pico.h" + +#include "hardware/regs/m0plus.h" +#include "hardware/regs/resets.h" +#include "hardware/structs/mpu.h" +#include "hardware/structs/scb.h" +#include "hardware/structs/padsbank0.h" + +#include "hardware/clocks.h" +#include "hardware/irq.h" +#include "hardware/resets.h" + +#include "pico/mutex.h" +#include "pico/time.h" +#include "pico/printf.h" + +#ifndef PICO_NO_RAM_VECTOR_TABLE +#define PICO_NO_RAM_VECTOR_TABLE 0 +#endif + +extern char __StackLimit; /* Set by linker. */ + +uint32_t __attribute__((section(".ram_vector_table"))) ram_vector_table[48]; + +// this is called for each thread since they have their own MPU +void runtime_install_stack_guard(void *stack_bottom) { + // this is called b4 runtime_init is complete, so beware printf or assert + + // make sure no one is using the MPU yet + if (mpu_hw->ctrl) { + // Note that it would be tempting to change this to a panic, but it happens so early, printing is not a good idea + __breakpoint(); + } + + uintptr_t addr = (uintptr_t) stack_bottom; + // the minimum we can protect is 32 bytes on a 32 byte boundary, so round up which will + // just shorten the valid stack range a tad + addr = (addr + 31u) & ~31u; + + // mask is 1 bit per 32 bytes of the 256 byte range... clear the bit for the segment we want + uint32_t subregion_select = 0xffu ^ (1u << ((addr >> 5u) & 7u)); + mpu_hw->ctrl = 5; // enable mpu with background default map + mpu_hw->rbar = (addr & ~0xff) | 0x8 | 0; + mpu_hw->rasr = 1 // enable region + | (0x7 << 1) // size 2^(7 + 1) = 256 + | (subregion_select << 8) + | 0x10000000; // XN = disable instruction fetch; no other bits means no permissions +} + +void runtime_init(void) { + // Reset all peripherals to put system into a known state, + // - except for QSPI pads and the XIP IO bank, as this is fatal if running from flash + // - and the PLLs, as this is fatal if clock muxing has not been reset on this boot + reset_block(~( + RESETS_RESET_IO_QSPI_BITS | + RESETS_RESET_PADS_QSPI_BITS | + RESETS_RESET_PLL_USB_BITS | + RESETS_RESET_PLL_SYS_BITS + )); + + // Remove reset from peripherals which are clocked only by clk_sys and + // clk_ref. Other peripherals stay in reset until we've configured clocks. + unreset_block_wait(RESETS_RESET_BITS & ~( + RESETS_RESET_ADC_BITS | + RESETS_RESET_RTC_BITS | + RESETS_RESET_SPI0_BITS | + RESETS_RESET_SPI1_BITS | + RESETS_RESET_UART0_BITS | + RESETS_RESET_UART1_BITS | + RESETS_RESET_USBCTRL_BITS + )); + + // pre-init runs really early since we need it even for memcpy and divide! + // (basically anything in aeabi that uses bootrom) + + // Start and end points of the constructor list, + // defined by the linker script. + extern void (*__preinit_array_start)(); + extern void (*__preinit_array_end)(); + + // Call each function in the list. + // We have to take the address of the symbols, as __preinit_array_start *is* + // the first function pointer, not the address of it. + for (void (**p)() = &__preinit_array_start; p < &__preinit_array_end; ++p) { + (*p)(); + } + + // After calling preinit we have enough runtime to do the exciting maths + // in clocks_init + clocks_init(); + + // Peripheral clocks should now all be running + unreset_block_wait(RESETS_RESET_BITS); + +#if !PICO_IE_26_29_UNCHANGED_ON_RESET + // after resetting BANK0 we should disable IE on 26-29 + hw_clear_alias(padsbank0_hw)->io[26] = hw_clear_alias(padsbank0_hw)->io[27] = + hw_clear_alias(padsbank0_hw)->io[28] = hw_clear_alias(padsbank0_hw)->io[29] = PADS_BANK0_GPIO0_IE_BITS; +#endif + + extern mutex_t __mutex_array_start; + extern mutex_t __mutex_array_end; + + // the first function pointer, not the address of it. + for (mutex_t *m = &__mutex_array_start; m < &__mutex_array_end; m++) { + mutex_init(m); + } + +#if !(PICO_NO_RAM_VECTOR_TABLE || PICO_NO_FLASH) + __builtin_memcpy(ram_vector_table, (uint32_t *) scb_hw->vtor, sizeof(ram_vector_table)); + scb_hw->vtor = (intptr_t) ram_vector_table; +#endif + +#ifndef NDEBUG + uint32_t xpsr; + __asm volatile ("mrs %0, XPSR" : "=r" (xpsr)::); + if (xpsr & 0xffu) { + // crap; started in exception handler + __asm ("bkpt #0"); + } +#endif + +#if PICO_USE_STACK_GUARDS + // install core0 stack guard + extern char __StackBottom; + runtime_install_stack_guard(&__StackBottom); +#endif + + spin_locks_reset(); + irq_init_priorities(); + alarm_pool_init_default(); + + // Start and end points of the constructor list, + // defined by the linker script. + extern void (*__init_array_start)(); + extern void (*__init_array_end)(); + + // Call each function in the list. + // We have to take the address of the symbols, as __init_array_start *is* + // the first function pointer, not the address of it. + for (void (**p)() = &__init_array_start; p < &__init_array_end; ++p) { + (*p)(); + } + +} + +void _exit(int status) { +#if PICO_ENTER_USB_BOOT_ON_EXIT + reset_usb_boot(0,0); +#else + while (1) { + __breakpoint(); + } +#endif +} + +void *_sbrk(int incr) { + extern char end; /* Set by linker. */ + static char *heap_end; + char *prev_heap_end; + + if (heap_end == 0) + heap_end = &end; + + prev_heap_end = heap_end; + char *next_heap_end = heap_end + incr; + + if (__builtin_expect(next_heap_end >= (&__StackLimit), false)) { +#if PICO_USE_OPTIMISTIC_SBRK + if (next_heap_end == &__StackLimit) { +// errno = ENOMEM; + return (char *) -1; + } + next_heap_end = &__StackLimit; +#else + return (char *) -1; +#endif + } + + heap_end = next_heap_end; + return (void *) prev_heap_end; +} + +// exit is not useful... no desire to pull in __call_exitprocs +// void exit(int status) { +// _exit(status); +// } + +// incorrect warning from GCC 6 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" +void __assert_func(const char *file, int line, const char *func, const char *failedexpr) { + weak_raw_printf("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", + failedexpr, file, line, func ? ", function: " : "", + func ? func : ""); + + _exit(1); +} + +#pragma GCC diagnostic pop + +void __attribute__((noreturn)) panic_unsupported() { + panic("not supported"); +} + +// todo consider making this try harder to output if we panic early +// right now, print mutex may be uninitialised (in which case it deadlocks - although after printing "PANIC") +// more importantly there may be no stdout/UART initialized yet +// todo we may want to think about where we print panic messages to; writing to USB appears to work +// though it doesn't seem like we can expect it to... fine for now +// +void __attribute__((noreturn)) __printflike(1, 0) panic(const char *fmt, ...) { + puts("\n*** PANIC ***\n"); + if (fmt) { +#if PICO_PRINTF_NONE + puts(fmt); +#else + va_list args; + va_start(args, fmt); +#if PICO_PRINTF_ALWAYS_INCLUDED + vprintf(fmt, args); +#else + weak_raw_vprintf(fmt, args); +#endif + va_end(args); + puts("\n"); +#endif + } + + _exit(1); +} + +void hard_assertion_failure(void) { + panic("Hard assert"); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/CMakeLists.txt new file mode 100644 index 0000000000..8dc8ab8c3a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/CMakeLists.txt @@ -0,0 +1,93 @@ +if (NOT TARGET pico_standard_link) + add_library(pico_standard_link INTERFACE) + + target_sources(pico_standard_link INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/crt0.S + ${CMAKE_CURRENT_LIST_DIR}/new_delete.cpp + ${CMAKE_CURRENT_LIST_DIR}/binary_info.c + ) + + pico_add_map_output(pico_standard_link) + + # todo revisit when we do Clang + if (CMAKE_C_COMPILER_ID STREQUAL "Clang") + target_link_options(pico_standard_link INTERFACE "LINKER:-nostdlib") + endif () + + target_link_libraries(pico_standard_link INTERFACE hardware_regs pico_bootrom pico_binary_info pico_cxx_options) + + function(pico_add_link_depend TARGET dependency) + get_target_property(target_type ${TARGET} TYPE) + if (${target_type} STREQUAL "INTERFACE_LIBRARY") + set(PROP "INTERFACE_LINK_DEPENDS") + else() + set(PROP "LINK_DEPENDS") + endif() + get_target_property(_LINK_DEPENDS ${TARGET} ${PROP}) + if (NOT _LINK_DEPENDS) + set(_LINK_DEPENDS ${dependency}) + else() + list(APPEND _LINK_DEPENDS ${dependency}) + endif() + set_target_properties(${TARGET} PROPERTIES ${PROP} "${_LINK_DEPENDS}") + endfunction() + + # need this because cmake does not appear to have a way to override an INTERFACE variable + function(pico_set_linker_script TARGET LDSCRIPT) + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_LINKER_SCRIPT ${LDSCRIPT}) + pico_add_link_depend(${TARGET} ${LDSCRIPT}) + endfunction() + + function(pico_set_binary_type TARGET TYPE) + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_BINARY_TYPE ${TYPE}) + endfunction() + + if (PICO_NO_FLASH) + set(PICO_DEFAULT_BINARY_TYPE no_flash) + elseif (PICO_USE_BLOCKED_RAM) + set(PICO_DEFAULT_BINARY_TYPE blocked_ram) + elseif (PICO_COPY_TO_RAM) + set(PICO_DEFAULT_BINARY_TYPE copy_to_ram) + else() + set(PICO_DEFAULT_BINARY_TYPE default) + endif() + + # LINKER script will be PICO_TARGET_LINKER_SCRIPT if set on target, or ${CMAKE_CURRENT_LIST_DIR}/memmap_foo.ld + # if PICO_TARGET_BINARY_TYPE is set to foo on the target, otherwise ${CMAKE_CURRENT_LIST_DIR}/memmap_${PICO_DEFAULT_BINARY_TYPE).ld + target_link_options(pico_standard_link INTERFACE + "LINKER:--script=$>,$,${CMAKE_CURRENT_LIST_DIR}/memmap_$,>,${PICO_DEFAULT_BINARY_TYPE},$>.ld>" + ) + + # PICO_NO_FLASH will be set based on PICO_TARGET_BUILD_TYPE target property being equal to no_flash if set, otherwise to the value of the PICO_NO_FLASH cmake variable unless PICO_TARGET_TYPE is set to something else + # PICO_BUILD_DEFINE: PICO_NO_FLASH, whether this is a 'no_flash' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link + target_compile_definitions(pico_standard_link INTERFACE PICO_NO_FLASH=$,no_flash>,1,$,$>>>) + # PICO_USE_BLOCKED_RAM will be set based on PICO_TARGET_BUILD_TYPE target property being equal to use_blocked_ram if set, otherwise to the value of the PICO_USE_BLOCKED_RAM cmake variable unless PICO_TARGET_TYPE is set to something else + # PICO_BUILD_DEFINE: PICO_USE_BLOCKS_RAM, whether this is a 'blocked_ram' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link + target_compile_definitions(pico_standard_link INTERFACE PICO_USE_BLOCKED_RAM=$,use_blocked_ram>,1,$,$>>>) + # PICO_COPY_TO_RAM will be set based on PICO_TARGET_BUILD_TYPE target property being equal to copy_to_ram if set, otherwise to the value of the PICO_COPY_TO_RAM cmake variable unless PICO_TARGET_TYPE is set to something else + # PICO_BUILD_DEFINE: PICO_COPY_TO_RAM, whether this is a 'copy_to_ram' build, type=bool, default=0, but dependent on CMake options, group=pico_standard_link + target_compile_definitions(pico_standard_link INTERFACE PICO_COPY_TO_RAM=$,copy_to_ram>,1,$,$>>>) + + target_compile_definitions(pico_standard_link INTERFACE PICO_CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}") + if (PICO_DEOPTIMIZED_DEBUG AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + target_compile_definitions(pico_standard_link INTERFACE PICO_DEOPTIMIZED_DEBUG=1) + endif() + + # todo revisit/recall reasoning for why not -nostartfiles always? + # -nostartfiles will be added if PICO_NO_FLASH would be defined to 1 + target_link_options(pico_standard_link INTERFACE $<$,no_flash>,1,$,$>>>:-nostartfiles>) + # boot_stage2 will be linked if PICO_NO_FLASH would be defined to 0 + target_link_libraries(pico_standard_link INTERFACE $<$,no_flash>,1,$,$>>>>:$>,$,bs2_default>_library>) + + # done in compiler now + #target_link_options(pico_standard_link INTERFACE "LINKER:--build-id=none") + + # this line occasionally useful for debugging ... todo maybe make a PICO_ var +# target_compile_options(pico_standard_link INTERFACE --save-temps) #debugging only + + # PICO_CMAKE_CONFIG: PICO_NO_GC_SECTIONS, Disable -ffunction-sections -fdata-sections, and --gc-sections, type=bool, default=0, advanced=true, group=pico_standard_link + if (NOT PICO_NO_GC_SECTIONS) + target_compile_options(pico_standard_link INTERFACE -ffunction-sections -fdata-sections) + target_link_options(pico_standard_link INTERFACE "LINKER:--gc-sections") + endif() +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c new file mode 100644 index 0000000000..9a879c7bff --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#if !PICO_NO_BINARY_INFO && !PICO_NO_PROGRAM_INFO +#include "pico/binary_info.h" + +// Note we put at most 4 pieces of binary info in the reset section because that's how much spare space we had +// (picked the most common ones)... if there is a link failure because of .reset section overflow then move +// more out. +#define reset_section_attr __attribute__((section(".reset"))) + +#if !PICO_NO_FLASH +#ifndef PICO_NO_BI_BINARY_SIZE +extern char __flash_binary_end; +bi_decl_with_attr(bi_binary_end((uintptr_t)&__flash_binary_end), reset_section_attr) +#endif +#endif + +#if !PICO_NO_BI_PROGRAM_BUILD_DATE +#ifndef PICO_PROGRAM_BUILD_DATE +#define PICO_PROGRAM_BUILD_DATE __DATE__ +#endif +bi_decl_with_attr(bi_program_build_date_string(PICO_PROGRAM_BUILD_DATE), reset_section_attr); +#endif + +#if !PICO_NO_BI_PROGRAM_NAME +#if !defined(PICO_PROGRAM_NAME) && defined(PICO_TARGET_NAME) +#define PICO_PROGRAM_NAME PICO_TARGET_NAME +#endif +#ifdef PICO_PROGRAM_NAME +bi_decl_with_attr(bi_program_name(PICO_PROGRAM_NAME), reset_section_attr) +#endif +#endif + +#if !PICO_NO_BI_PICO_BOARD +#ifdef PICO_BOARD +bi_decl(bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_PICO_BOARD, PICO_BOARD)) +#endif +#endif + +#if !PICO_NO_BI_SDK_VERSION +#ifdef PICO_SDK_VERSION_STRING +bi_decl_with_attr(bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_SDK_VERSION, PICO_SDK_VERSION_STRING),reset_section_attr) +#endif +#endif + +#if !PICO_NO_BI_PROGRAM_VERSION_STRING +#ifdef PICO_PROGRAM_VERSION_STRING +bi_decl(bi_program_version_string(PICO_PROGRAM_VERSION_STRING)) +#endif +#endif + + +#if !PICO_NO_BI_PROGRAM_DESCRIPTION +#ifdef PICO_PROGRAM_DESCRIPTION +bi_decl(bi_program_description(PICO_PROGRAM_DESCRIPTION)) +#endif +#endif + +#if !PICO_NO_BI_PROGRAM_URL +#ifdef PICO_PROGRAM_URL +bi_decl(bi_program_url(PICO_PROGRAM_URL)) +#endif +#endif + +#if !PICO_NO_BUILD_TYPE_FEATURE +#ifdef PICO_CMAKE_BUILD_TYPE +bi_decl(bi_program_build_attribute(PICO_CMAKE_BUILD_TYPE)) +#else +#ifndef NDEBUG +bi_decl(bi_program_build_attribute("Debug")) +#else +bi_decl(bi_program_build_attribute("Release")) +#endif +#endif + +#if PICO_DEOPTIMIZED_DEBUG +bi_decl(bi_program_build_attribute("All optimization disabled")) +#endif +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/crt0.S b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/crt0.S new file mode 100644 index 0000000000..c76ed4150a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/crt0.S @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "hardware/regs/m0plus.h" +#include "hardware/platform_defs.h" +#include "hardware/regs/addressmap.h" +#include "hardware/regs/sio.h" +#include "pico/binary_info/defs.h" + +#ifdef NDEBUG +#ifndef COLLAPSE_IRQS +#define COLLAPSE_IRQS +#endif +#endif + +.syntax unified +.cpu cortex-m0plus +.thumb + +.section .vectors, "ax" +.align 2 + +.global __vectors +__vectors: +.word __StackTop +.word _reset_handler +.word isr_nmi +.word HardFault_Handler +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word isr_svcall +.word isr_invalid // Reserved, should never fire +.word isr_invalid // Reserved, should never fire +.word PendSV_Handler +.word isr_systick +.word isr_irq0 +.word isr_irq1 +.word isr_irq2 +.word isr_irq3 +.word isr_irq4 +.word isr_irq5 +.word isr_irq6 +.word isr_irq7 +.word isr_irq8 +.word isr_irq9 +.word isr_irq10 +.word isr_irq11 +.word isr_irq12 +.word isr_irq13 +.word isr_irq14 +.word isr_irq15 +.word isr_irq16 +.word isr_irq17 +.word isr_irq18 +.word isr_irq19 +.word isr_irq20 +.word isr_irq21 +.word isr_irq22 +.word isr_irq23 +.word isr_irq24 +.word isr_irq25 +.word isr_irq26 +.word isr_irq27 +.word isr_irq28 +.word isr_irq29 +.word isr_irq30 +.word isr_irq31 + +// Declare a weak symbol for each ISR. +// By default, they will fall through to the undefined IRQ handler below (breakpoint), +// but can be overridden by C functions with correct name. + +.macro decl_isr_bkpt name +.weak \name +.type \name,%function +.thumb_func +\name: + bkpt #0 +.endm + +// these are separated out for clarity +decl_isr_bkpt isr_invalid +decl_isr_bkpt isr_nmi +decl_isr_bkpt isr_hardfault +decl_isr_bkpt isr_svcall +decl_isr_bkpt isr_pendsv +decl_isr_bkpt isr_systick + +.macro decl_isr name +.weak \name +.type \name,%function +.thumb_func +\name: +.endm + +decl_isr isr_irq0 +decl_isr isr_irq1 +decl_isr isr_irq2 +decl_isr isr_irq3 +decl_isr isr_irq4 +decl_isr isr_irq5 +decl_isr isr_irq6 +decl_isr isr_irq7 +decl_isr isr_irq8 +decl_isr isr_irq9 +decl_isr isr_irq10 +decl_isr isr_irq11 +decl_isr isr_irq12 +decl_isr isr_irq13 +decl_isr isr_irq14 +decl_isr isr_irq15 +decl_isr isr_irq16 +decl_isr isr_irq17 +decl_isr isr_irq18 +decl_isr isr_irq19 +decl_isr isr_irq20 +decl_isr isr_irq21 +decl_isr isr_irq22 +decl_isr isr_irq23 +decl_isr isr_irq24 +decl_isr isr_irq25 +decl_isr isr_irq26 +decl_isr isr_irq27 +decl_isr isr_irq28 +decl_isr isr_irq29 +decl_isr isr_irq30 +decl_isr isr_irq31 + +// All unhandled USER IRQs fall through to here +.global __unhandled_user_irq +.thumb_func +__unhandled_user_irq: + bl __get_current_exception + subs r0, #16 +.global unhandled_user_irq_num_in_r0 +unhandled_user_irq_num_in_r0: + bkpt #0 + +.section .reset, "ax" + +// This is the beginning of the image, which is entered from stage2 or bootrom USB MSD watchdog reboot + +// note if we are NO_FLASH then start: below is currently identical anyway, so save 4 bytes +#if !PICO_NO_FLASH + // We simply install our own vector table and redirect through it + ldr r0, =__vectors + b __vector_entry +#endif + +// ELF entry point generally called when we load an ELF via debugger +.type _entry_point,%function +.thumb_func +.global _entry_point +_entry_point: + +#if PICO_NO_FLASH + // non flash + ldr r0, =__vectors +#else + // todo clear watchdog? + // When using flash, we install and use the ROM vector table to go thru regular bootrom/stage2 flash sequence + movs r0, #0 +#endif + +__vector_entry: + ldr r1, =(PPB_BASE + M0PLUS_CPUID_OFFSET) + str r0, [r1, #8] + ldmia r0!, {r1, r2} + msr msp, r1 + bx r2 + +// ---------------------------------------------------------------------------- +// Reset handler: +// - initialises .data +// - clears .bss +// - calls runtime_init +// - calls main +// - calls exit (which should eventually hang the processor via _exit) + +.type _reset_handler,%function +.thumb_func +_reset_handler: + // Hang all cores except core 0 + ldr r0, =(SIO_BASE + SIO_CPUID_OFFSET) + ldr r0, [r0] + cmp r0, #0 + bne wait_for_vector + + adr r4, data_cpy_table + + // assume there is at least one entry +1: + ldmia r4!, {r1-r3} + cmp r1, #0 + beq 2f + bl data_cpy + b 1b +2: + + // Zero out the BSS + ldr r1, =__bss_start__ + ldr r2, =__bss_end__ + movs r0, #0 + b bss_fill_test +bss_fill_loop: + stm r1!, {r0} +bss_fill_test: + cmp r1, r2 + bne bss_fill_loop + +platform_entry: // symbol for stack traces + // Use 32-bit jumps, in case these symbols are moved out of branch range + // (e.g. if main is in SRAM and crt0 in flash) + ldr r1, =runtime_init + blx r1 + ldr r1, =entry + blx r1 + ldr r1, =exit + blx r1 + // exit should not return. If it does, hang the core. + // (fall thru into our hang _exit impl +.weak _exit +.type _exit,%function +.thumb_func +_exit: +1: // separate label because _exit can be moved out of branch range + bkpt #0 + b 1b + +data_cpy_loop: + ldm r1!, {r0} + stm r2!, {r0} +data_cpy: + cmp r2, r3 + blo data_cpy_loop + bx lr + +#if !PICO_NO_BINARY_INFO +binary_info_header: +.word BINARY_INFO_MARKER_START +.word __binary_info_start +.word __binary_info_end +.word data_cpy_table // we may need to decode pointers that are in RAM at runtime. +.word BINARY_INFO_MARKER_END +#endif + +.align 2 +data_cpy_table: +#if PICO_COPY_TO_RAM +.word __ram_text_source__ +.word __ram_text_start__ +.word __ram_text_end__ +#endif +.word __etext +.word __data_start__ +.word __data_end__ + +.word __scratch_x_source__ +.word __scratch_x_start__ +.word __scratch_x_end__ + +.word __scratch_y_source__ +.word __scratch_y_start__ +.word __scratch_y_end__ + +.word 0 // null terminator + +// ---------------------------------------------------------------------------- +// Provide safe defaults for _exit and runtime_init +// Full implementations usually provided by platform.c + +.weak runtime_init +.type runtime_init,%function +.thumb_func +runtime_init: + bx lr + +// ---------------------------------------------------------------------------- +// In case core 1's VTOR has already been moved into flash, we need to handle +// core 1 reset. However, we do so by just jumping back into bootrom version of +// wait_for_vector + +wait_for_vector: + ldr r0, = 'W' | ('V' << 8) + bl rom_func_lookup + bx r0 + +.global __get_current_exception +.thumb_func +__get_current_exception: + mrs r0, ipsr + uxtb r0, r0 + bx lr + +// ---------------------------------------------------------------------------- +// Stack/heap dummies to set size + +.section .stack +// align to allow for memory protection (although this alignment is pretty much ignored by linker script) +.align 5 + .equ StackSize, PICO_STACK_SIZE +.space StackSize + +.section .heap +.align 2 + .equ HeapSize, PICO_HEAP_SIZE +.space HeapSize \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/doc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/doc.h new file mode 100644 index 0000000000..d8ce3d4900 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/doc.h @@ -0,0 +1,10 @@ +/** + * \defgroup pico_standard_link pico_standard_link + * \brief Standard link step providing the basics for creating a runnable binary + * + * This includes + * - C runtime initialization + * - Linker scripts for 'default', 'no_flash', 'blocked_ram' and 'copy_to_ram' binaries + * - 'Binary Information' support + * - Linker option control + */ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld new file mode 100644 index 0000000000..18035911fd --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld @@ -0,0 +1,251 @@ +/* Based on GCC ARM embedded samples. + Defines the following symbols for use by code: + __exidx_start + __exidx_end + __etext + __data_start__ + __preinit_array_start + __preinit_array_end + __init_array_start + __init_array_end + __fini_array_start + __fini_array_end + __data_end__ + __bss_start__ + __bss_end__ + __end__ + end + __HeapLimit + __StackLimit + __StackTop + __stack (== StackTop) +*/ + +MEMORY +{ + FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k + RAM(rwx) : ORIGIN = 0x21000000, LENGTH = 256k + SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k + SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k +} + +ENTRY(_entry_point) + +SECTIONS +{ + /* Second stage bootloader is prepended to the image. It must be 256 bytes big + and checksummed. It is usually built by the boot_stage2 target + in the Pico SDK + */ + + .flash_begin : { + __flash_binary_start = .; + } > FLASH + + .boot2 : { + __boot2_start__ = .; + KEEP (*(.boot2)) + __boot2_end__ = .; + } > FLASH + + ASSERT(__boot2_end__ - __boot2_start__ == 256, + "ERROR: Pico second stage bootloader must be 256 bytes in size") + + /* The second stage will always enter the image at the start of .text. + The debugger will use the ELF entry point, which is the _entry_point + symbol if present, otherwise defaults to start of .text. + This can be used to transfer control back to the bootrom on debugger + launches only, to perform proper flash setup. + */ + + .text : { + __reset_start = .; + KEEP (*(.reset)) + . = ALIGN(256); + __reset_end = .; + ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes"); + KEEP (*(.vectors)) + /* TODO revisit this now memset/memcpy/float in ROM */ + /* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from + * FLASH ... we will include any thing excluded here in .data below by default */ + *(.init) + *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .text*) + *(.fini) + /* Pull all c'tors into .text */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + /* Followed by destructors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.eh_frame*) + . = ALIGN(4); + } > FLASH + + .rodata : { + *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .rodata*) + . = ALIGN(4); + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.flashdata*))) + . = ALIGN(4); + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* Machine inspectable binary information */ + . = ALIGN(4); + __binary_info_start = .; + .binary_info : + { + KEEP(*(.binary_info.keep.*)) + *(.binary_info.*) + } > FLASH + __binary_info_end = .; + . = ALIGN(4); + + /* End of .text-like segments */ + __etext = .; + + .ram_vector_table (COPY): { + *(.ram_vector_table) + } > RAM + + .data : { + __data_start__ = .; + *(vtable) + + *(.time_critical*) + + /* remaining .text and .rodata; i.e. stuff we exclude above because we want it in RAM */ + *(.text*) + . = ALIGN(4); + *(.rodata*) + . = ALIGN(4); + + *(.data*) + + . = ALIGN(4); + *(.after_data.*) + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__mutex_array_start = .); + KEEP(*(SORT(.mutex_array.*))) + KEEP(*(.mutex_array)) + PROVIDE_HIDDEN (__mutex_array_end = .); + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(SORT(.preinit_array.*))) + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + *(SORT(.fini_array.*)) + *(.fini_array) + PROVIDE_HIDDEN (__fini_array_end = .); + + *(.jcr) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + } > RAM AT> FLASH + + .uninitialized_data (COPY): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + + /* Start and end symbols must be word-aligned */ + .scratch_x : { + __scratch_x_start__ = .; + *(.scratch_x.*) + . = ALIGN(4); + __scratch_x_end__ = .; + } > SCRATCH_X AT > FLASH + __scratch_x_source__ = LOADADDR(.scratch_x); + + .scratch_y : { + __scratch_y_start__ = .; + *(.scratch_y.*) + . = ALIGN(4); + __scratch_y_end__ = .; + } > SCRATCH_Y AT > FLASH + __scratch_y_source__ = LOADADDR(.scratch_y); + + .bss : { + . = ALIGN(4); + __bss_start__ = .; + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + end = __end__; + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack*_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later + * + * stack1 section may be empty/missing if platform_launch_core1 is not used */ + + /* by default we put core 0 stack at the end of scratch Y, so that if core 1 + * stack is not used then all of SCRATCH_X is free. + */ + .stack1_dummy (COPY): + { + *(.stack1*) + } > SCRATCH_X + .stack_dummy (COPY): + { + *(.stack*) + } > SCRATCH_Y + + .flash_end : { + __flash_binary_end = .; + } > FLASH + + /* stack limit is poorly named, but historically is maximum heap ptr */ + __StackLimit = ORIGIN(RAM) + LENGTH(RAM); + __StackOneTop = ORIGIN(SCRATCH_X) + LENGTH(SCRATCH_X); + __StackTop = ORIGIN(SCRATCH_Y) + LENGTH(SCRATCH_Y); + __StackOneBottom = __StackOneTop - SIZEOF(.stack1_dummy); + __StackBottom = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed") + /* todo assert on extra code */ +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld new file mode 100644 index 0000000000..8bd40091cf --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld @@ -0,0 +1,252 @@ +/* Based on GCC ARM embedded samples. + Defines the following symbols for use by code: + __exidx_start + __exidx_end + __etext + __data_start__ + __preinit_array_start + __preinit_array_end + __init_array_start + __init_array_end + __fini_array_start + __fini_array_end + __data_end__ + __bss_start__ + __bss_end__ + __end__ + end + __HeapLimit + __StackLimit + __StackTop + __stack (== StackTop) +*/ + +MEMORY +{ + FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k + RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k + SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k + SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k +} + +ENTRY(_entry_point) + +SECTIONS +{ + /* Second stage bootloader is prepended to the image. It must be 256 bytes big + and checksummed. It is usually built by the boot_stage2 target + in the Pico SDK + */ + + .flash_begin : { + __flash_binary_start = .; + } > FLASH + + .boot2 : { + __boot2_start__ = .; + KEEP (*(.boot2)) + __boot2_end__ = .; + } > FLASH + + ASSERT(__boot2_end__ - __boot2_start__ == 256, + "ERROR: Pico second stage bootloader must be 256 bytes in size") + + /* The second stage will always enter the image at the start of .text. + The debugger will use the ELF entry point, which is the _entry_point + symbol if present, otherwise defaults to start of .text. + This can be used to transfer control back to the bootrom on debugger + launches only, to perform proper flash setup. + */ + + .flashtext : { + __reset_start = .; + KEEP (*(.reset)) + . = ALIGN(256); + __reset_end = .; + ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes"); + KEEP (*(.vectors)) + } + + .rodata : { + /* segments not marked as .flashdata are instead pulled into .data (in RAM) to avoid accidental flash accesses */ + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.flashdata*))) + . = ALIGN(4); + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* Machine inspectable binary information */ + . = ALIGN(4); + __binary_info_start = .; + .binary_info : + { + KEEP(*(.binary_info.keep.*)) + *(.binary_info.*) + } > FLASH + __binary_info_end = .; + . = ALIGN(4); + + /* Vector table goes first in RAM, to avoid large alignment hole */ + .ram_vector_table (COPY): { + *(.ram_vector_table) + } > RAM + + .text : { + __ram_text_start__ = .; + *(.init) + *(.text*) + *(.fini) + /* Pull all c'tors into .text */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + /* Followed by destructors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.eh_frame*) + . = ALIGN(4); + __ram_text_end__ = .; + } > RAM AT> FLASH + __ram_text_source__ = LOADADDR(.text); + + + .data : { + __data_start__ = .; + *(vtable) + + *(.time_critical*) + + . = ALIGN(4); + *(.rodata*) + . = ALIGN(4); + + *(.data*) + + . = ALIGN(4); + *(.after_data.*) + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__mutex_array_start = .); + KEEP(*(SORT(.mutex_array.*))) + KEEP(*(.mutex_array)) + PROVIDE_HIDDEN (__mutex_array_end = .); + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(SORT(.preinit_array.*))) + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + *(SORT(.fini_array.*)) + *(.fini_array) + PROVIDE_HIDDEN (__fini_array_end = .); + + *(.jcr) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + } > RAM AT> FLASH + /* __etext is the name of the .data init source pointer (...) */ + __etext = LOADADDR(.data); + + .uninitialized_data (COPY): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + + /* Start and end symbols must be word-aligned */ + .scratch_x : { + __scratch_x_start__ = .; + *(.scratch_x.*) + . = ALIGN(4); + __scratch_x_end__ = .; + } > SCRATCH_X AT > FLASH + __scratch_x_source__ = LOADADDR(.scratch_x); + + .scratch_y : { + __scratch_y_start__ = .; + *(.scratch_y.*) + . = ALIGN(4); + __scratch_y_end__ = .; + } > SCRATCH_Y AT > FLASH + __scratch_y_source__ = LOADADDR(.scratch_y); + + .bss : { + . = ALIGN(4); + __bss_start__ = .; + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + end = __end__; + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack*_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later + * + * stack1 section may be empty/missing if platform_launch_core1 is not used */ + + /* by default we put core 0 stack at the end of scratch Y, so that if core 1 + * stack is not used then all of SCRATCH_X is free. + */ + .stack1_dummy (COPY): + { + *(.stack1*) + } > SCRATCH_X + .stack_dummy (COPY): + { + *(.stack*) + } > SCRATCH_Y + + .flash_end : { + __flash_binary_end = .; + } > FLASH + + /* stack limit is poorly named, but historically is maximum heap ptr */ + __StackLimit = ORIGIN(RAM) + LENGTH(RAM); + __StackOneTop = ORIGIN(SCRATCH_X) + LENGTH(SCRATCH_X); + __StackTop = ORIGIN(SCRATCH_Y) + LENGTH(SCRATCH_Y); + __StackOneBottom = __StackOneTop - SIZEOF(.stack1_dummy); + __StackBottom = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed") + /* todo assert on extra code */ +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld new file mode 100644 index 0000000000..5a927fec28 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld @@ -0,0 +1,251 @@ +/* Based on GCC ARM embedded samples. + Defines the following symbols for use by code: + __exidx_start + __exidx_end + __etext + __data_start__ + __preinit_array_start + __preinit_array_end + __init_array_start + __init_array_end + __fini_array_start + __fini_array_end + __data_end__ + __bss_start__ + __bss_end__ + __end__ + end + __HeapLimit + __StackLimit + __StackTop + __stack (== StackTop) +*/ + +MEMORY +{ + FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k + RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k + SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k + SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k +} + +ENTRY(_entry_point) + +SECTIONS +{ + /* Second stage bootloader is prepended to the image. It must be 256 bytes big + and checksummed. It is usually built by the boot_stage2 target + in the Pico SDK + */ + + .flash_begin : { + __flash_binary_start = .; + } > FLASH + + .boot2 : { + __boot2_start__ = .; + KEEP (*(.boot2)) + __boot2_end__ = .; + } > FLASH + + ASSERT(__boot2_end__ - __boot2_start__ == 256, + "ERROR: Pico second stage bootloader must be 256 bytes in size") + + /* The second stage will always enter the image at the start of .text. + The debugger will use the ELF entry point, which is the _entry_point + symbol if present, otherwise defaults to start of .text. + This can be used to transfer control back to the bootrom on debugger + launches only, to perform proper flash setup. + */ + + .text : { + __reset_start = .; + KEEP (*(.reset)) + . = ALIGN(256); + __reset_end = .; + ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes"); + KEEP (*(.vectors)) + /* TODO revisit this now memset/memcpy/float in ROM */ + /* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from + * FLASH ... we will include any thing excluded here in .data below by default */ + *(.init) + *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .text*) + *(.fini) + /* Pull all c'tors into .text */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + /* Followed by destructors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.eh_frame*) + . = ALIGN(4); + } > FLASH + + .rodata : { + *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .rodata*) + . = ALIGN(4); + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.flashdata*))) + . = ALIGN(4); + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* Machine inspectable binary information */ + . = ALIGN(4); + __binary_info_start = .; + .binary_info : + { + KEEP(*(.binary_info.keep.*)) + *(.binary_info.*) + } > FLASH + __binary_info_end = .; + . = ALIGN(4); + + /* End of .text-like segments */ + __etext = .; + + .ram_vector_table (COPY): { + *(.ram_vector_table) + } > RAM + + .data : { + __data_start__ = .; + *(vtable) + + *(.time_critical*) + + /* remaining .text and .rodata; i.e. stuff we exclude above because we want it in RAM */ + *(.text*) + . = ALIGN(4); + *(.rodata*) + . = ALIGN(4); + + *(.data*) + + . = ALIGN(4); + *(.after_data.*) + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__mutex_array_start = .); + KEEP(*(SORT(.mutex_array.*))) + KEEP(*(.mutex_array)) + PROVIDE_HIDDEN (__mutex_array_end = .); + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(SORT(.preinit_array.*))) + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + *(SORT(.fini_array.*)) + *(.fini_array) + PROVIDE_HIDDEN (__fini_array_end = .); + + *(.jcr) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + } > RAM AT> FLASH + + .uninitialized_data (COPY): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + + /* Start and end symbols must be word-aligned */ + .scratch_x : { + __scratch_x_start__ = .; + *(.scratch_x.*) + . = ALIGN(4); + __scratch_x_end__ = .; + } > SCRATCH_X AT > FLASH + __scratch_x_source__ = LOADADDR(.scratch_x); + + .scratch_y : { + __scratch_y_start__ = .; + *(.scratch_y.*) + . = ALIGN(4); + __scratch_y_end__ = .; + } > SCRATCH_Y AT > FLASH + __scratch_y_source__ = LOADADDR(.scratch_y); + + .bss : { + . = ALIGN(4); + __bss_start__ = .; + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + end = __end__; + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack*_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later + * + * stack1 section may be empty/missing if platform_launch_core1 is not used */ + + /* by default we put core 0 stack at the end of scratch Y, so that if core 1 + * stack is not used then all of SCRATCH_X is free. + */ + .stack1_dummy (COPY): + { + *(.stack1*) + } > SCRATCH_X + .stack_dummy (COPY): + { + *(.stack*) + } > SCRATCH_Y + + .flash_end : { + __flash_binary_end = .; + } > FLASH + + /* stack limit is poorly named, but historically is maximum heap ptr */ + __StackLimit = ORIGIN(RAM) + LENGTH(RAM); + __StackOneTop = ORIGIN(SCRATCH_X) + LENGTH(SCRATCH_X); + __StackTop = ORIGIN(SCRATCH_Y) + LENGTH(SCRATCH_Y); + __StackOneBottom = __StackOneTop - SIZEOF(.stack1_dummy); + __StackBottom = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed") + /* todo assert on extra code */ +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_no_flash.ld b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_no_flash.ld new file mode 100644 index 0000000000..a3f972ae64 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/memmap_no_flash.ld @@ -0,0 +1,213 @@ +/* Based on GCC ARM embedded samples. + Defines the following symbols for use by code: + __exidx_start + __exidx_end + __etext + __data_start__ + __preinit_array_start + __preinit_array_end + __init_array_start + __init_array_end + __fini_array_start + __fini_array_end + __data_end__ + __bss_start__ + __bss_end__ + __end__ + end + __HeapLimit + __StackLimit + __StackTop + __stack (== StackTop) +*/ + +MEMORY +{ + RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k + SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k + SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k +} + +ENTRY(_entry_point) + +SECTIONS +{ + /* Watchdog reboot into RAM (via USB MSD will enter) image at the start of .text + The debugger will use the ELF entry point, which is the _entry_point + symbol if present, otherwise defaults to start of .text. + */ + + .text : { + __reset_start = .; + KEEP (*(.reset)) + /* reset should come first */ + KEEP (*(.reset)) + . = ALIGN(256); + __reset_end = .; + ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes"); + KEEP (*(.vectors)) + *(.time_critical*) + *(.text*) + . = ALIGN(4); + *(.init) + *(.fini) + /* Pull all c'tors into .text */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + /* Followed by destructors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.eh_frame*) + } > RAM + + .rodata : { + *(.rodata*) + . = ALIGN(4); + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.flashdata*))) + . = ALIGN(4); + } > RAM + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > RAM + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > RAM + __exidx_end = .; + + /* Machine inspectable binary information */ + . = ALIGN(4); + __binary_info_start = .; + .binary_info : + { + KEEP(*(.binary_info.keep.*)) + *(.binary_info.*) + } > RAM + __binary_info_end = .; + . = ALIGN(4); + + .data : { + /* End of .text-like segments */ + __etext = .; + __data_start__ = .; + *(vtable) + *(.data*) + + . = ALIGN(4); + *(.after_data.*) + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__mutex_array_start = .); + KEEP(*(SORT(.mutex_array.*))) + KEEP(*(.mutex_array)) + PROVIDE_HIDDEN (__mutex_array_end = .); + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(SORT(.preinit_array.*))) + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + *(SORT(.fini_array.*)) + *(.fini_array) + PROVIDE_HIDDEN (__fini_array_end = .); + + *(.jcr) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + } > RAM + + .uninitialized_data (COPY): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + + /* Start and end symbols must be word-aligned */ + .scratch_x : { + __scratch_x_start__ = .; + *(.scratch_x.*) + . = ALIGN(4); + __scratch_x_end__ = .; + } > SCRATCH_X + __scratch_x_source__ = LOADADDR(.scratch_x); + + .scratch_y : { + __scratch_y_start__ = .; + *(.scratch_y.*) + . = ALIGN(4); + __scratch_y_end__ = .; + } > SCRATCH_Y + __scratch_y_source__ = LOADADDR(.scratch_y); + + .bss : { + . = ALIGN(4); + __bss_start__ = .; + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + end = __end__; + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack*_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later + * + * stack1 section may be empty/missing if platform_launch_core1 is not used */ + + /* by default we put core 0 stack at the end of scratch Y, so that if core 1 + * stack is not used then all of SCRATCH_X is free. + */ + .stack1_dummy (COPY): + { + *(.stack1*) + } > SCRATCH_X + .stack_dummy (COPY): + { + *(.stack*) + } > SCRATCH_Y + + /* stack limit is poorly named, but historically is maximum heap ptr */ + __StackLimit = ORIGIN(RAM) + LENGTH(RAM); + __StackOneTop = ORIGIN(SCRATCH_X) + LENGTH(SCRATCH_X); + __StackTop = ORIGIN(SCRATCH_Y) + LENGTH(SCRATCH_Y); + __StackOneBottom = __StackOneTop - SIZEOF(.stack1_dummy); + __StackBottom = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed") + /* todo assert on extra code */ +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp new file mode 100644 index 0000000000..ecb04b4e6c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#if !PICO_CXX_ENABLE_EXCEPTIONS +// Override the standard allocators to use regular malloc/free + +#include + +void *operator new(std::size_t n) { + return std::malloc(n); +} + +void *operator new[](std::size_t n) { + return std::malloc(n); +} + +void operator delete(void *p, std::size_t n) noexcept { std::free(p); } + +void operator delete(void *p) { std::free(p); } + +void operator delete[](void *p) noexcept { std::free(p); } + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/CMakeLists.txt new file mode 100644 index 0000000000..15ca07ba4a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/CMakeLists.txt @@ -0,0 +1,18 @@ +if (NOT TARGET pico_stdio) + add_library(pico_stdio INTERFACE) + + target_include_directories(pico_stdio INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + + target_sources(pico_stdio INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/stdio.c + ) + + pico_wrap_function(pico_stdio printf) + pico_wrap_function(pico_stdio vprintf) + pico_wrap_function(pico_stdio puts) + pico_wrap_function(pico_stdio putchar) + + if (TARGET pico_printf) + target_link_libraries(pico_stdio INTERFACE pico_printf) + endif() +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/LICENSE b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/LICENSE new file mode 100644 index 0000000000..8f7ebd0b98 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Marco Paland + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio.h new file mode 100644 index 0000000000..aec49dfb35 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio.h @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_STDIO_H +#define _PICO_STDIO_H + +/** \file stdio.h +* \defgroup pico_stdio pico_stdio +* Customized stdio support allowing for input and output from UART, USB, semi-hosting etc. +* +* Note the API for adding additional input output devices is not yet considered stable +*/ + +#include "pico.h" + +// PICO_CONFIG: PICO_STDOUT_MUTEX, Enable/disable mutex around stdout, type=bool, default=1, group=pico_stdio +#ifndef PICO_STDOUT_MUTEX +#define PICO_STDOUT_MUTEX 1 +#endif + +// PICO_CONFIG: PICO_STDIO_ENABLE_CRLF_SUPPORT, Enable/disable CR/LF output conversion support, type=bool, default=1, group=pico_stdio +#ifndef PICO_STDIO_ENABLE_CRLF_SUPPORT +#define PICO_STDIO_ENABLE_CRLF_SUPPORT 1 +#endif + +// PICO_CONFIG: PICO_STDIO_DEFAULT_CRLF, Default for CR/LF conversion enabled on all stdio outputs, type=bool, default=1, depends=PICO_STDIO_ENABLE_CRLF_SUPPORT, group=pico_stdio +#ifndef PICO_STDIO_DEFAULT_CRLF +#define PICO_STDIO_DEFAULT_CRLF 1 +#endif + +// PICO_CONFIG: PICO_STDIO_STACK_BUFFER_SIZE, Define printf buffer size (on stack)... this is just a working buffer not a max output size, min=0, max=512, default=128, group=pico_stdio +#ifndef PICO_STDIO_STACK_BUFFER_SIZE +#define PICO_STDIO_STACK_BUFFER_SIZE 128 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct stdio_driver stdio_driver_t; + +/*! \brief Initialize all of the present standard stdio types that are linked into the binary. + * \ingroup pico_stdio + * + * Call this method once you have set up your clocks to enable the stdio support for UART, USB + * and semihosting based on the presence of the respective librariess in the binary. + * + * \see stdio_uart, stdio_usb, stdio_semihosting + */ +void stdio_init_all(); + +/*! \brief Initialize all of the present standard stdio types that are linked into the binary. + * \ingroup pico_stdio + * + * Call this method once you have set up your clocks to enable the stdio support for UART, USB + * and semihosting based on the presence of the respective librariess in the binary. + * + * \see stdio_uart, stdio_usb, stdio_semihosting + */ +void stdio_flush(); + +/*! \brief Return a character from stdin if there is one available within a timeout + * \ingroup pico_stdio + * + * \param timeout_us the timeout in microseconds, or 0 to not wait for a character if none available. + * \return the character from 0-255 or PICO_ERROR_TIMEOUT if timeout occurs + */ +int getchar_timeout_us(uint32_t timeout_us); + +/*! \brief Adds or removes a driver from the list of active drivers used for input/output + * \ingroup pico_stdio + * + * \note this method should always be called on an initialized driver + * \param driver the driver + * \param enabled true to add, false to remove + */ +void stdio_set_driver_enabled(stdio_driver_t *driver, bool enabled); + +/*! \brief Control limiting of output to a single driver + * \ingroup pico_stdio + * + * \note this method should always be called on an initialized driver + * + * \param driver if non-null then output only that driver will be used for input/output (assuming it is in the list of enabled drivers). + * if NULL then all enabled drivers will be used + */ +void stdio_filter_driver(stdio_driver_t *driver); + +/*! \brief control conversion of line feeds to carriage return on transmissions + * \ingroup pico_stdio + * + * \note this method should always be called on an initialized driver + * + * \param driver the driver + * \param translate If true, convert line feeds to carriage return on transmissions + */ +void stdio_set_translate_crlf(stdio_driver_t *driver, bool translate); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio/driver.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio/driver.h new file mode 100644 index 0000000000..017206d3cd --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/include/pico/stdio/driver.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_STDIO_DRIVER_H +#define _PICO_STDIO_DRIVER_H + +#include "pico/stdio.h" +#include "pico/platform.h" + +struct stdio_driver { + void (*out_chars)(const char *buf, int len); + void (*out_flush)(); + int (*in_chars)(char *buf, int len); + stdio_driver_t *next; +#if PICO_STDIO_ENABLE_CRLF_SUPPORT + bool last_ended_with_cr; + bool crlf_enabled; +#endif +}; + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/stdio.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/stdio.c new file mode 100644 index 0000000000..aecc488891 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio/stdio.c @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include + +#include "pico.h" +#include "pico/mutex.h" +#include "pico/printf.h" +#include "pico/stdio.h" +#include "pico/stdio/driver.h" +#include "pico/time.h" + +#if PICO_STDIO_UART +#include "pico/stdio_uart.h" +#endif + +#if PICO_STDIO_USB +#include "pico/stdio_usb.h" +#endif + +#if PICO_STDIO_SEMIHOSTING +#include "pico/stdio_semihosting.h" +#endif + +static stdio_driver_t *drivers; +static stdio_driver_t *filter; + +#if PICO_STDOUT_MUTEX +auto_init_mutex(print_mutex); + +bool stdout_serialize_begin() { + int core_num = get_core_num(); + uint32_t owner; + if (!mutex_try_enter(&print_mutex, &owner)) { + if (owner == core_num) { + return false; + } + // other core owns the mutex, so lets wait + mutex_enter_blocking(&print_mutex); + } + return true; +} + +void stdout_serialize_end() { + mutex_exit(&print_mutex); +} + +#else +static bool print_serialize_begin() { + return true; +} +static void print_serialize_end() { +} +#endif + +static void stdio_out_chars_crlf(stdio_driver_t *driver, const char *s, int len) { +#if PICO_STDIO_ENABLE_CRLF_SUPPORT + if (!driver->crlf_enabled) { + driver->out_chars(s, len); + return; + } + int first_of_chunk = 0; + static const char crlf_str[] = {'\r', '\n'}; + for (int i = 0; i < len; i++) { + bool prev_char_was_cr = i > 0 ? s[i - 1] == '\r' : driver->last_ended_with_cr; + if (s[i] == '\n' && !prev_char_was_cr) { + if (i > first_of_chunk) { + driver->out_chars(&s[first_of_chunk], i - first_of_chunk); + } + driver->out_chars(crlf_str, 2); + first_of_chunk = i + 1; + } + } + if (first_of_chunk < len) { + driver->out_chars(&s[first_of_chunk], len - first_of_chunk); + } + if (len > 0) { + driver->last_ended_with_cr = s[len - 1] == '\r'; + } +#else + driver->out_chars(s, len); +#endif +} + +static bool stdio_put_string(const char *s, int len, bool newline) { + bool serialzed = stdout_serialize_begin(); + if (!serialzed) { +#if PICO_STDIO_IGNORE_NESTED_STDOUT + return false; +#endif + } + if (len == -1) len = strlen(s); + for (stdio_driver_t *driver = drivers; driver; driver = driver->next) { + if (!driver->out_chars) continue; + if (filter && filter != driver) continue; + stdio_out_chars_crlf(driver, s, len); + if (newline) { + const char c = '\n'; + stdio_out_chars_crlf(driver, &c, 1); + } + } + if (serialzed) { + stdout_serialize_end(); + } + return len; +} + +static int stdio_get_until(char *buf, int len, absolute_time_t until) { + do { + // todo round robin might be nice on each call, but then again hopefully + // no source will starve the others + for (stdio_driver_t *driver = drivers; driver; driver = driver->next) { + if (filter && filter != driver) continue; + if (driver->in_chars) { + int read = driver->in_chars(buf, len); + if (read > 0) { + return read; + } + } + } + // todo maybe a little sleep here? + } while (!time_reached(until)); + return PICO_ERROR_TIMEOUT; +} + +int WRAPPER_FUNC(putchar)(int c) { + char cc = c; + stdio_put_string(&cc, 1, false); + return c; +} + +int WRAPPER_FUNC(puts)(const char *s) { + int len = strlen(s); + stdio_put_string(s, len, true); + stdio_flush(); + return len; +} + +int _read(int handle, char *buffer, int length) { + if (handle == 0) { + return stdio_get_until(buffer, length, at_the_end_of_time); + } + return -1; +} + +int _write(int handle, char *buffer, int length) { + if (handle == 1) { + stdio_put_string(buffer, length, false); + return length; + } + return -1; +} + +void stdio_set_driver_enabled(stdio_driver_t *driver, bool enable) { + stdio_driver_t *prev = drivers; + for (stdio_driver_t *d = drivers; d; d = d->next) { + if (d == driver) { + if (!enable) { + prev->next = d->next; + driver->next = NULL; + } + return; + } + prev = d; + } + if (enable) { + if (prev) prev->next = driver; + else drivers = driver; + } +} + +void stdio_flush() { + for (stdio_driver_t *d = drivers; d; d = d->next) { + if (d->out_flush) d->out_flush(); + } +} + +typedef struct stdio_stack_buffer { + uint used; + char buf[PICO_STDIO_STACK_BUFFER_SIZE]; +} stdio_stack_buffer_t; + +static void stdio_stack_buffer_flush(stdio_stack_buffer_t *buffer) { + if (buffer->used) { + for (stdio_driver_t *d = drivers; d; d = d->next) { + if (!d->out_chars) continue; + if (filter && filter != d) continue; + stdio_out_chars_crlf(d, buffer->buf, buffer->used); + } + buffer->used = 0; + } +} + +static void stdio_buffered_printer(char c, void *arg) { + stdio_stack_buffer_t *buffer = (stdio_stack_buffer_t *)arg; + if (buffer->used == PICO_STDIO_STACK_BUFFER_SIZE) { + stdio_stack_buffer_flush(buffer); + } + buffer->buf[buffer->used++] = c; +} + +int WRAPPER_FUNC(vprintf)(const char *format, va_list va) { + bool serialzed = stdout_serialize_begin(); + if (!serialzed) { +#if PICO_STDIO_IGNORE_NESTED_STDOUT + return 0; +#endif + } + int ret; +#if PICO_PRINTF_PICO + struct stdio_stack_buffer buffer = {.used = 0}; + ret = vfctprintf(stdio_buffered_printer, &buffer, format, va); + stdio_stack_buffer_flush(&buffer); + stdio_flush(); +#elif PICO_PRINTF_NONE + extern void printf_none_assert(); + printf_none_assert(); +#else + extern int REAL_FUNC(vprintf)(const char *format, va_list va); + ret = REAL_FUNC(vprintf)(format, va); +#endif + if (serialzed) { + stdout_serialize_end(); + } + return ret; +} + +int __printflike(1, 0) WRAPPER_FUNC(printf)(const char* format, ...) +{ + va_list va; + va_start(va, format); + int ret = vprintf(format, va); + va_end(va); + return ret; +} + +void stdio_init_all() { + // todo add explicit custom, or registered although you can call stdio_enable_driver explicitly anyway + // These are well known ones +#if PICO_STDIO_UART + stdio_uart_init(); +#endif + +#if PICO_STDIO_SEMIHOSTING + stdio_semihosting_init(); +#endif + +#if PICO_STDIO_USB + stdio_usb_init(); +#endif +} + +int WRAPPER_FUNC(getchar)() { + char buf[1]; + if (0 == stdio_get_until(buf, sizeof(buf), at_the_end_of_time)) { + return PICO_ERROR_TIMEOUT; + } + return (uint8_t)buf[0]; +} + +int getchar_timeout_us(uint32_t timeout_us) { + char buf[1]; + int rc = stdio_get_until(buf, sizeof(buf), make_timeout_time_us(timeout_us)); + if (rc < 0) return rc; + assert(rc); + return (uint8_t)buf[0]; +} + +void stdio_filter_driver(stdio_driver_t *driver) { + filter = driver; +} + +void stdio_set_translate_crlf(stdio_driver_t *driver, bool enabled) { +#if PICO_STDIO_ENABLE_CRLF_SUPPORT + if (enabled && !driver->crlf_enabled) { + driver->last_ended_with_cr = false; + } + driver->crlf_enabled = enabled; +#else + panic_unsupported(); +#endif +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/CMakeLists.txt new file mode 100644 index 0000000000..c65aa91d55 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/CMakeLists.txt @@ -0,0 +1,13 @@ +add_library(pico_stdio_semihosting INTERFACE) + +target_sources(pico_stdio_semihosting INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/stdio_semihosting.c +) + +target_include_directories(pico_stdio_semihosting INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) + +target_compile_definitions(pico_stdio_semihosting INTERFACE + PICO_STDIO_SEMIHOSTING=1 +) + +target_link_libraries(pico_stdio_semihosting INTERFACE pico_stdio) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/include/pico/stdio_semihosting.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/include/pico/stdio_semihosting.h new file mode 100644 index 0000000000..0c2f00639b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/include/pico/stdio_semihosting.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_STDIO_SEMIHOSTING_H +#define _PICO_STDIO_SEMIHOSTING_H + +#include "pico/stdio.h" + +/** \brief Experimental support for stdout using RAM semihosting + * \defgroup pico_stdio_semihosting pico_stdio_semihosting + * \ingroup pico_stdio + * + * Linking this library or calling `pico_enable_stdio_semihosting(TARGET)` in the CMake (which + * achieves the same thing) will add semihosting to the drivers used for standard output + */ + +// PICO_CONFIG: PICO_STDIO_SEMIHOSTING_DEFAULT_CRLF, Default state of CR/LF translation for semihosting output, type=bool, default=PICO_STDIO_DEFAULT_CRLF, group=pico_stdio_semihosting +#ifndef PICO_STDIO_SEMIHOSTING_DEFAULT_CRLF +#define PICO_STDIO_SEMIHOSTING_DEFAULT_CRLF PICO_STDIO_DEFAULT_CRLF +#endif + +extern stdio_driver_t stdio_semihosting; + +/*! \brief Explicitly initialize stdout over semihosting and add it to the current set of stdout targets + * \ingroup pico_stdio_semihosting + * + * \note this method is automatically called by \ref stdio_init_all() if `pico_stdio_semihosting` is included in the build + */ +void stdio_semihosting_init(); + +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/stdio_semihosting.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/stdio_semihosting.c new file mode 100644 index 0000000000..89367702e4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_semihosting/stdio_semihosting.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/stdio/driver.h" +#include "pico/stdio_semihosting.h" +#include "pico/binary_info.h" + +//static void __attribute__((naked)) semihosting_puts(const char *s) { +// __asm ( +// +// "mov r1, r0\n" +// "mov r0, #4\n" +// "bkpt 0xab\n" +// "bx lr\n" +// ); +//} + +static void __attribute__((naked)) semihosting_putc(char c) { + __asm ( + + "mov r1, r0\n" + "mov r0, #3\n" + "bkpt 0xab\n" + "bx lr\n" + ); +} + + +static void stdio_semihosting_out_chars(const char *buf, int length) { + for (uint i = 0; i RTC_IRQ, ""); // note RTC_IRQ is currently the last one +static mutex_t stdio_usb_mutex; + +static void low_priority_worker_irq() { + // if the mutex is already owned, then we are in user code + // in this file which will do a tud_task itself, so we'll just do nothing + // until the next tick; we won't starve + if (mutex_try_enter(&stdio_usb_mutex, NULL)) { + tud_task(); + mutex_exit(&stdio_usb_mutex); + } +} + +static int64_t timer_task(__unused alarm_id_t id, __unused void *user_data) { + irq_set_pending(PICO_STDIO_USB_LOW_PRIORITY_IRQ); + return PICO_STDIO_USB_TASK_INTERVAL_US; +} + +static void stdio_usb_out_chars(const char *buf, int length) { + static uint64_t last_avail_time; + uint32_t owner; + if (!mutex_try_enter(&stdio_usb_mutex, &owner)) { + if (owner == get_core_num()) return; // would deadlock otherwise + mutex_enter_blocking(&stdio_usb_mutex); + } + if (tud_cdc_connected()) { + for (int i = 0; i < length;) { + int n = length - i; + int avail = tud_cdc_write_available(); + if (n > avail) n = avail; + if (n) { + int n2 = tud_cdc_write(buf + i, n); + tud_task(); + tud_cdc_write_flush(); + i += n2; + last_avail_time = time_us_64(); + } else { + tud_task(); + tud_cdc_write_flush(); + if (!tud_cdc_connected() || + (!tud_cdc_write_available() && time_us_64() > last_avail_time + PICO_STDIO_USB_STDOUT_TIMEOUT_US)) { + break; + } + } + } + } else { + // reset our timeout + last_avail_time = 0; + } + mutex_exit(&stdio_usb_mutex); +} + +int stdio_usb_in_chars(char *buf, int length) { + uint32_t owner; + if (!mutex_try_enter(&stdio_usb_mutex, &owner)) { + if (owner == get_core_num()) return PICO_ERROR_NO_DATA; // would deadlock otherwise + mutex_enter_blocking(&stdio_usb_mutex); + } + int rc = PICO_ERROR_NO_DATA; + if (tud_cdc_connected() && tud_cdc_available()) { + int count = tud_cdc_read(buf, length); + rc = count ? count : PICO_ERROR_NO_DATA; + } + mutex_exit(&stdio_usb_mutex); + return rc; +} + +stdio_driver_t stdio_usb = { + .out_chars = stdio_usb_out_chars, + .in_chars = stdio_usb_in_chars, +#if PICO_STDIO_ENABLE_CRLF_SUPPORT + .crlf_enabled = PICO_STDIO_USB_DEFAULT_CRLF +#endif +}; + +bool stdio_usb_init(void) { +#if !PICO_NO_BI_STDIO_USB + bi_decl_if_func_used(bi_program_feature("USB stdin / stdout")); +#endif + + // initialize TinyUSB + tusb_init(); + + irq_set_exclusive_handler(PICO_STDIO_USB_LOW_PRIORITY_IRQ, low_priority_worker_irq); + irq_set_enabled(PICO_STDIO_USB_LOW_PRIORITY_IRQ, true); + + mutex_init(&stdio_usb_mutex); + bool rc = add_alarm_in_us(PICO_STDIO_USB_TASK_INTERVAL_US, timer_task, NULL, true); + if (rc) { + stdio_set_driver_enabled(&stdio_usb, true); + } + return rc; +} +#else +#include "pico/stdio_usb.h" +#warning stdio USB was configured, but is being disabled as TinyUSB is explicitly linked +bool stdio_usb_init(void) { + return false; +} +#endif diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb_descriptors.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb_descriptors.c new file mode 100644 index 0000000000..49e48ac7fb --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb_descriptors.c @@ -0,0 +1,121 @@ +/* + * This file is based on a file originally part of the + * MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * Copyright (c) 2019 Damien P. George + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#if !defined(TINYUSB_HOST_LINKED) && !defined(TINYUSB_DEVICE_LINKED) + +#include "tusb.h" + +#define USBD_VID (0x2E8A) // Raspberry Pi +#define USBD_PID (0x000a) // Pico SDK CDC + +#define USBD_DESC_LEN (TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN) +#define USBD_MAX_POWER_MA (250) + +#define USBD_ITF_CDC (0) // needs 2 interfaces +#define USBD_ITF_MAX (2) + +#define USBD_CDC_EP_CMD (0x81) +#define USBD_CDC_EP_OUT (0x02) +#define USBD_CDC_EP_IN (0x82) +#define USBD_CDC_CMD_MAX_SIZE (8) +#define USBD_CDC_IN_OUT_MAX_SIZE (64) + +#define USBD_STR_0 (0x00) +#define USBD_STR_MANUF (0x01) +#define USBD_STR_PRODUCT (0x02) +#define USBD_STR_SERIAL (0x03) +#define USBD_STR_CDC (0x04) + +// Note: descriptors returned from callbacks must exist long enough for transfer to complete + +static const tusb_desc_device_t usbd_desc_device = { + .bLength = sizeof(tusb_desc_device_t), + .bDescriptorType = TUSB_DESC_DEVICE, + .bcdUSB = 0x0200, + .bDeviceClass = TUSB_CLASS_MISC, + .bDeviceSubClass = MISC_SUBCLASS_COMMON, + .bDeviceProtocol = MISC_PROTOCOL_IAD, + .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE, + .idVendor = USBD_VID, + .idProduct = USBD_PID, + .bcdDevice = 0x0100, + .iManufacturer = USBD_STR_MANUF, + .iProduct = USBD_STR_PRODUCT, + .iSerialNumber = USBD_STR_SERIAL, + .bNumConfigurations = 1, +}; + +static const uint8_t usbd_desc_cfg[USBD_DESC_LEN] = { + TUD_CONFIG_DESCRIPTOR(1, USBD_ITF_MAX, USBD_STR_0, USBD_DESC_LEN, + TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, USBD_MAX_POWER_MA), + + TUD_CDC_DESCRIPTOR(USBD_ITF_CDC, USBD_STR_CDC, USBD_CDC_EP_CMD, + USBD_CDC_CMD_MAX_SIZE, USBD_CDC_EP_OUT, USBD_CDC_EP_IN, USBD_CDC_IN_OUT_MAX_SIZE), +}; + +static const char *const usbd_desc_str[] = { + [USBD_STR_MANUF] = "Raspberry Pi", + [USBD_STR_PRODUCT] = "Pico", + [USBD_STR_SERIAL] = "000000000000", // TODO + [USBD_STR_CDC] = "Board CDC", +}; + +const uint8_t *tud_descriptor_device_cb(void) { + return (const uint8_t *)&usbd_desc_device; +} + +const uint8_t *tud_descriptor_configuration_cb(uint8_t index) { + (void)index; + return usbd_desc_cfg; +} + +const uint16_t *tud_descriptor_string_cb(uint8_t index, uint16_t langid) { + #define DESC_STR_MAX (20) + static uint16_t desc_str[DESC_STR_MAX]; + + uint8_t len; + if (index == 0) { + desc_str[1] = 0x0409; // supported language is English + len = 1; + } else { + if (index >= sizeof(usbd_desc_str) / sizeof(usbd_desc_str[0])) { + return NULL; + } + const char *str = usbd_desc_str[index]; + for (len = 0; len < DESC_STR_MAX - 1 && str[len]; ++len) { + desc_str[1 + len] = str[len]; + } + } + + // first byte is length (including header), second byte is string type + desc_str[0] = (TUSB_DESC_STRING << 8) | (2 * len + 2); + + return desc_str; +} + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/CMakeLists.txt new file mode 100644 index 0000000000..900ae09fe7 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/CMakeLists.txt @@ -0,0 +1,45 @@ +# PICO_CMAKE_CONFIG: PICO_STDIO_UART, OPTION: Globally enable stdio UART, default=1, group=pico_stdlib +option(PICO_STDIO_UART "Globablly enable stdio UART" 1) +# PICO_CMAKE_CONFIG: PICO_STDIO_USB, OPTION: Globally enable stdio USB, default=0, group=pico_stdlib +option(PICO_STDIO_USB "Globablly enable stdio USB" 0) +# PICO_CMAKE_CONFIG: PICO_STDIO_USB, OPTIONS: Globally enable stdio semihosting, default=0, group=pico_stdlib +option(PICO_STDIO_USB "Globablly enable stdio semihosting " 0) + +if (NOT TARGET pico_stdlib) + add_library(pico_stdlib INTERFACE) + target_sources(pico_stdlib INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/stdlib.c + ) + target_link_libraries(pico_stdlib INTERFACE + pico_stdlib_headers + pico_platform + pico_runtime + pico_stdio + pico_time + ) + + function(pico_enable_stdio_uart TARGET ENABLED) + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_STDIO_UART ${ENABLED}) + endfunction() + + function(pico_enable_stdio_usb TARGET ENABLED) + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_STDIO_USB ${ENABLED}) + endfunction() + + function(pico_enable_stdio_semihosting TARGET ENABLED) + set_target_properties(${TARGET} PROPERTIES PICO_TARGET_STDIO_SEMIHOSTING ${ENABLED}) + endfunction() + + if (TARGET pico_stdio_uart) + target_link_libraries(pico_stdlib INTERFACE $,>,${PICO_STDIO_UART},$>>,pico_stdio_uart,>) + endif() + + if (TARGET pico_stdio_usb) + target_link_libraries(pico_stdlib INTERFACE $,>,${PICO_STDIO_USB},$>>,pico_stdio_usb,>) + endif() + + if (TARGET pico_stdio_semihosting) + target_link_libraries(pico_stdlib INTERFACE $,>,${PICO_STDIO_SEMIHOSTING},$>>,pico_stdio_semihosting,>) + endif() + +endif() diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c new file mode 100644 index 0000000000..28d5d386af --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "pico/stdlib.h" +#include "hardware/pll.h" +#include "hardware/clocks.h" +#if PICO_STDIO_UART +#include "pico/stdio_uart.h" +#else +#include "pico/binary_info.h" +#endif + +// everything running off the USB oscillator +void set_sys_clock_48mhz() { + if (!running_on_fpga()) { + // Change clk_sys to be 48MHz. The simplest way is to take this from PLL_USB + // which has a source frequency of 48MHz + clock_configure(clk_sys, + CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX, + CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB, + 48 * MHZ, + 48 * MHZ); + + // Turn off PLL sys for good measure + pll_deinit(pll_sys); + + // CLK peri is clocked from clk_sys so need to change clk_peri's freq + clock_configure(clk_peri, + 0, + CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS, + 48 * MHZ, + 48 * MHZ); + } +} + +void set_sys_clock_pll(uint32_t vco_freq, uint post_div1, uint post_div2) { + if (!running_on_fpga()) { + clock_configure(clk_sys, + CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX, + CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB, + 48 * MHZ, + 48 * MHZ); + + pll_init(pll_sys, 1, vco_freq, post_div1, post_div2); + uint32_t freq = vco_freq / (post_div1 * post_div2); + + // Configure clocks + // CLK_REF = XOSC (12MHz) / 1 = 12MHz + clock_configure(clk_ref, + CLOCKS_CLK_REF_CTRL_SRC_VALUE_XOSC_CLKSRC, + 0, // No aux mux + 12 * MHZ, + 12 * MHZ); + + // CLK SYS = PLL SYS (125MHz) / 1 = 125MHz + clock_configure(clk_sys, + CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX, + CLOCKS_CLK_SYS_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, + freq, freq); + + clock_configure(clk_peri, + 0, // Only AUX mux on ADC + CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_USB, + 48 * MHZ, + 48 * MHZ); + } +} + +bool check_sys_clock_khz(uint32_t freq_khz, uint *vco_out, uint *postdiv1_out, uint *postdiv_out) { + uint crystal_freq_khz = clock_get_hz(clk_ref) / 1000; + for (uint fbdiv = 320; fbdiv >= 16; fbdiv--) { + uint vco = fbdiv * crystal_freq_khz; + if (vco < 400000 || vco > 1600000) continue; + for (uint postdiv1 = 7; postdiv1 >= 1; postdiv1--) { + for (uint postdiv2 = postdiv1; postdiv2 >= 1; postdiv2--) { + uint out = vco / (postdiv1 * postdiv2); + if (out == freq_khz && !(vco % (postdiv1 * postdiv2))) { + *vco_out = vco * 1000; + *postdiv1_out = postdiv1; + *postdiv_out = postdiv2; + return true; + } + } + } + } + return false; +} + +void setup_default_uart() { +#if PICO_STDIO_UART + stdio_uart_init(); +#elif defined(PICO_DEFAULT_UART_BAUD_RATE) && defined(PICO_DEFAULT_UART_TX_PIN) && defined(PICO_DEFAULT_UART_RX_PIN) + // this is mostly for backwards compatibility - stdio_uart_init is a bit more nuanced, and usually likely to be present + uart_init(uart_default, PICO_DEFAULT_UART_BAUD_RATE); + if (PICO_DEFAULT_UART_TX_PIN >= 0) + gpio_set_function(PICO_DEFAULT_UART_TX_PIN, GPIO_FUNC_UART); + if (PICO_DEFAULT_UART_RX_PIN >= 0) + gpio_set_function(PICO_DEFAULT_UART_RX_PIN, GPIO_FUNC_UART); + bi_decl_if_func_used(bi_2pins_with_func(PICO_DEFAULT_UART_RX_PIN, PICO_DEFAULT_UART_TX_PIN, GPIO_FUNC_UART)); +#endif +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt new file mode 100644 index 0000000000..a48c65475a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt @@ -0,0 +1,111 @@ +if (DEFINED ENV{PICO_TINYUSB_PATH} AND (NOT PICO_TINYUSB_PATH)) + set(PICO_TINYUSB_PATH $ENV{PICO_TINYUSB_PATH}) + message("Using PICO_TINYUSB_PATH from environment ('${PICO_TINYUSB_PATH}')") +endif () + +set(TINYUSB_TEST_PATH "src/portable/raspberrypi/rp2040") +if (NOT PICO_TINYUSB_PATH) + set(PICO_TINYUSB_PATH ${PROJECT_SOURCE_DIR}/lib/tinyusb) + if (NOT EXISTS ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH}) + message(WARNING "TinyUSB submodule has not been initialized; USB support will be unavailable + hint: try 'git submodule update --init'.") + endif() +elseif (NOT EXISTS ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH}) + message(WARNING "PICO_TINYUSB_PATH specified but content not present.") +endif() + +if (EXISTS ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH}) + message("TinyUSB available at ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH}; adding USB support.") + + add_library(tinyusb_common INTERFACE) + target_link_libraries(tinyusb_common INTERFACE + hardware_structs + hardware_irq + hardware_resets + pico_sync + ) + + target_sources(tinyusb_common INTERFACE + ${PICO_TINYUSB_PATH}/src/tusb.c + ${PICO_TINYUSB_PATH}/src/common/tusb_fifo.c + ) + + set(TINYUSB_DEBUG_LEVEL 0) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + message("Compiling TinyUSB with CFG_TUSB_DEBUG=1") + set(TINYUSB_DEBUG_LEVEL 1) + endif () + + target_compile_definitions(tinyusb_common INTERFACE + CFG_TUSB_MCU=OPT_MCU_RP2040 + CFG_TUSB_OS=OPT_OS_PICO #seems examples are hard coded to OPT_OS_NONE + CFG_TUSB_DEBUG=${TINYUSB_DEBUG_LEVEL} + ) + + target_include_directories(tinyusb_common INTERFACE + ${PICO_TINYUSB_PATH}/src + ${PICO_TINYUSB_PATH}/src/common + ${PICO_TINYUSB_PATH}/hw + ) + + add_library(tinyusb_device_unmarked INTERFACE) + target_sources(tinyusb_device_unmarked INTERFACE + ${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/dcd_rp2040.c + ${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/rp2040_usb.c + ${PICO_TINYUSB_PATH}/src/device/usbd.c + ${PICO_TINYUSB_PATH}/src/device/usbd_control.c + ${PICO_TINYUSB_PATH}/src/class/audio/audio_device.c + ${PICO_TINYUSB_PATH}/src/class/cdc/cdc_device.c + ${PICO_TINYUSB_PATH}/src/class/dfu/dfu_rt_device.c + ${PICO_TINYUSB_PATH}/src/class/hid/hid_device.c + ${PICO_TINYUSB_PATH}/src/class/midi/midi_device.c + ${PICO_TINYUSB_PATH}/src/class/msc/msc_device.c + ${PICO_TINYUSB_PATH}/src/class/net/net_device.c + ${PICO_TINYUSB_PATH}/src/class/usbtmc/usbtmc_device.c + ${PICO_TINYUSB_PATH}/src/class/vendor/vendor_device.c + ) + + target_compile_definitions(tinyusb_device_unmarked INTERFACE + # off by default note TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX defaults from PICO_RP2040_USB_DEVICE_ENUMERATION_FIX +# TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX=1 + ) + + # unmarked version used by stdio USB + target_link_libraries(tinyusb_device_unmarked INTERFACE tinyusb_common pico_fix_rp2040_usb_device_enumeration) + + add_library(tinyusb_device INTERFACE) + target_link_libraries(tinyusb_device INTERFACE tinyusb_device_unmarked) + target_compile_definitions(tinyusb_device INTERFACE + RP2040_USB_DEVICE_MODE=1 + TINYUSB_DEVICE_LINKED=1 + ) + + add_library(tinyusb_host INTERFACE) + target_sources(tinyusb_host INTERFACE + ${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/hcd_rp2040.c + ${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/rp2040_usb.c + ${PICO_TINYUSB_PATH}/src/host/usbh.c + ${PICO_TINYUSB_PATH}/src/host/usbh_control.c + ${PICO_TINYUSB_PATH}/src/host/hub.c + ${PICO_TINYUSB_PATH}/src/class/cdc/cdc_host.c + ${PICO_TINYUSB_PATH}/src/class/hid/hid_host.c + ${PICO_TINYUSB_PATH}/src/class/msc/msc_host.c + ${PICO_TINYUSB_PATH}/src/class/vendor/vendor_host.c + ) + + # Sometimes have to do host specific actions in mostly + # common functions + target_compile_definitions(tinyusb_host INTERFACE + RP2040_USB_HOST_MODE=1 + TINYUSB_HOST_LINKED=1 + ) + + target_link_libraries(tinyusb_host INTERFACE tinyusb_common) + + add_library(tinyusb_board INTERFACE) + target_sources(tinyusb_board INTERFACE + ${PICO_TINYUSB_PATH}/hw/bsp/raspberry_pi_pico/board_raspberry_pi_pico.c + ) + +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/doc.h b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/doc.h new file mode 100644 index 0000000000..6c361e0002 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/src/rp2_common/tinyusb/doc.h @@ -0,0 +1,7 @@ +/** + * \defgroup tinyusb_device tinyusb_device + * \brief TinyUSB Device-mode support for the RP2040 + * + * \defgroup tinyusb_host tinyusb_host + * \brief TinyUSB Host-mode support for the RP2040 + */ diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/CMakeLists.txt new file mode 100644 index 0000000000..22852e73e6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/CMakeLists.txt @@ -0,0 +1,10 @@ +add_subdirectory(pico_test) + +add_subdirectory(pico_stdlib_test) +add_subdirectory(pico_time_test) +add_subdirectory(pico_divider_test) +if (PICO_ON_DEVICE) + add_subdirectory(pico_float_test) + add_subdirectory(kitchen_sink) + add_subdirectory(hardware_pwm_test) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/CMakeLists.txt new file mode 100644 index 0000000000..c0e08a4647 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/CMakeLists.txt @@ -0,0 +1,4 @@ +add_executable(hardware_pwm_test hardware_pwm_test.c) + +target_link_libraries(hardware_pwm_test PRIVATE pico_test hardware_pwm) +pico_add_extra_outputs(hardware_pwm_test) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/hardware_pwm_test.c b/bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/hardware_pwm_test.c new file mode 100644 index 0000000000..ecd2c4d595 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/hardware_pwm_test/hardware_pwm_test.c @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "pico/stdlib.h" +#include "pico/test.h" +#include "pico/time.h" +#include "hardware/irq.h" +#include "hardware/resets.h" +#include "hardware/pwm.h" + +PICOTEST_MODULE_NAME("PWM", "PWM SDK Test harness"); + +/* In a struct for future expansion of the interrupt testv */ +struct interrupt_state { + int count; +} interrupt_states[NUM_PWM_SLICES] = {0}; + +void on_pwm_wrap() { + for (int pwm = 0; pwm < NUM_PWM_SLICES; pwm++) { + // See if this pwm, is the one that fired. + if (pwm_get_irq_status_mask() & (1 << pwm)) { + // Clear the interrupt flag that brought us here + pwm_clear_irq(pwm); + + interrupt_states[pwm].count++; + } + } +} + +int main() { + reset_block(RESETS_RESET_PWM_BITS); + unreset_block_wait(RESETS_RESET_PWM_BITS); + + setup_default_uart(); + + PICOTEST_START(); + + pwm_config config = pwm_get_default_config(); + + + // Test that config sets works on all PWMs by comparing what we pass in + // via the API with what the registers contains afterwards + + pwm_config_set_phase_correct(&config, true); + pwm_config_set_clkdiv(&config, 42.5); + pwm_config_set_clkdiv_mode(&config, PWM_DIV_B_HIGH); + pwm_config_set_output_polarity(&config, false, true); + pwm_config_set_wrap(&config, 0x1234); + + PICOTEST_START_SECTION("PWM config init tests"); + for (int pwm = 0; pwm < NUM_PWM_SLICES; pwm++) { + pwm_slice_hw_t *slice = &pwm_hw->slice[pwm]; + + pwm_init(pwm, &config, false); + + uint div = (uint)(42.5f * (float)(1 << PWM_CH0_DIV_INT_LSB)); + + PICOTEST_CHECK_CHANNEL(pwm, slice->top == config.top, "HW top does not match requested config"); + //PICOTEST_CHECK_CHANNEL(pwm, slice->ctr == 0x1234, "HW counter does not match config"); + PICOTEST_CHECK_CHANNEL(pwm, slice->cc == PWM_CH0_CC_RESET, "HW compares does not match config"); + PICOTEST_CHECK_CHANNEL(pwm, slice->div == div, "HW divider does not match config"); + PICOTEST_CHECK_CHANNEL(pwm, slice->csr == + (1 << PWM_CH0_CSR_PH_CORRECT_LSB | 0 << PWM_CH0_CSR_A_INV_LSB | 1 << PWM_CH0_CSR_B_INV_LSB | + PWM_CH0_CSR_DIVMODE_VALUE_LEVEL << PWM_CH0_CSR_DIVMODE_LSB), "HW CSR does not match config"); + } + PICOTEST_END_SECTION(); + + + // Need to test the SDK APIs do the right thing + + PICOTEST_START_SECTION("PWM SDK API tests"); + for (int pwm = 0; pwm < NUM_PWM_SLICES; pwm++) { + pwm_slice_hw_t *slice = &pwm_hw->slice[pwm]; + int v = 100 + pwm * 10; + + pwm_set_wrap(pwm, v); + PICOTEST_CHECK_CHANNEL(pwm, slice->top == v, "pwm_set_wrap() failed to set register"); + + pwm_set_both_levels(pwm, v + 1, v); + PICOTEST_CHECK_CHANNEL(pwm, slice->cc == (((v) << PWM_CH0_CC_B_LSB) | ((v + 1) << PWM_CH0_CC_A_LSB)), + "pwm_set_compare() failed to set register"); + + float divider = 100.5; + int i = (int16_t) divider; + int f = (int8_t) ((divider - i) * 16); + pwm_set_clkdiv(pwm, divider); + PICOTEST_CHECK_CHANNEL(pwm, slice->div == (i << 4 | f), "pwm_set_divider_fract() failed to set register"); + + i++; + pwm_set_clkdiv_int_frac(pwm, i, f); + PICOTEST_CHECK_CHANNEL(pwm, slice->div == (i << 4 | f), + "pwm_set_divider_int_fract() failed to set register"); + + int c = 1234; + pwm_set_counter(pwm, c); + PICOTEST_CHECK_CHANNEL(pwm, slice->ctr == c, "pwm_set_count() failed to set register"); + + int cc = pwm_get_counter(pwm); + PICOTEST_CHECK_CHANNEL(pwm, slice->ctr == cc && cc == c, "pwm_get_count() failed to get register"); + + pwm_set_output_polarity(pwm, false, false); + PICOTEST_CHECK_CHANNEL(pwm, + !(slice->csr & PWM_CH0_CSR_A_INV_BITS) && !(slice->csr & PWM_CH0_CSR_B_INV_BITS), + "pwm_set_output_polarity() (F/F)"); + + pwm_set_output_polarity(pwm, true, false); + PICOTEST_CHECK_CHANNEL(pwm, (slice->csr & PWM_CH0_CSR_A_INV_BITS) && !(slice->csr & PWM_CH0_CSR_B_INV_BITS), + "pwm_set_output_polarity() (T/F)"); + + pwm_set_output_polarity(pwm, false, true); + PICOTEST_CHECK_CHANNEL(pwm, !(slice->csr & PWM_CH0_CSR_A_INV_BITS) && (slice->csr & PWM_CH0_CSR_B_INV_BITS), + "pwm_set_output_polarity() (F/T)"); + + pwm_set_output_polarity(pwm, true, true); + PICOTEST_CHECK_CHANNEL(pwm, (slice->csr & PWM_CH0_CSR_A_INV_BITS) && (slice->csr & PWM_CH0_CSR_B_INV_BITS), + "pwm_set_output_polarity() (T/T)"); + + pwm_set_phase_correct(pwm, true); + PICOTEST_CHECK_CHANNEL(pwm, (slice->csr & PWM_CH0_CSR_PH_CORRECT_BITS), "pwm_set_phase_correction(T)"); + + pwm_set_phase_correct(pwm, false); + PICOTEST_CHECK_CHANNEL(pwm, !(slice->csr & PWM_CH0_CSR_PH_CORRECT_BITS), "pwm_set_phase_correction(F)"); + + for (int m = PWM_DIV_FREE_RUNNING; m <= PWM_DIV_B_FALLING; m++) { + pwm_set_clkdiv_mode(pwm, m); + PICOTEST_CHECK_CHANNEL(pwm, ((slice->csr & PWM_CH0_CSR_DIVMODE_BITS) >> PWM_CH0_CSR_DIVMODE_LSB) == m, + "pwm_set_divider_mode"); + } + } + PICOTEST_END_SECTION(); + + PICOTEST_START_SECTION("PWM IRQ tests"); + + irq_set_exclusive_handler(PWM_IRQ_WRAP, on_pwm_wrap); + irq_set_enabled(PWM_IRQ_WRAP, true); + + config = pwm_get_default_config(); + + // Slow down the interrupt rate a load, don't need it high. + // This give about 40 per second on Picoboard + pwm_config_set_clkdiv(&config, 50); + + for (int pwm = 0; pwm < NUM_PWM_SLICES; pwm++) { + pwm_init(pwm, &config, false); + pwm_clear_irq(pwm); + pwm_set_irq_enabled(pwm, true); + } + + // Now enable all the PWM at the same time. + pwm_set_mask_enabled(0xff); + + sleep_ms(1000); + + int err = 0; + + for (int p = 0; p < NUM_PWM_SLICES; p++) { + PICOTEST_CHECK_CHANNEL(p, interrupt_states[p].count != 0, "No interrupts detected from PWM %d\n"); + } + + PICOTEST_END_SECTION(); + + PICOTEST_END_TEST(); +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/CMakeLists.txt new file mode 100644 index 0000000000..18ed84c2b4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/CMakeLists.txt @@ -0,0 +1,101 @@ +add_library(kitchen_sink_libs INTERFACE) +target_sources(kitchen_sink_libs INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c +) +target_link_libraries(kitchen_sink_libs INTERFACE + hardware_adc + hardware_clocks + hardware_divider + hardware_dma + hardware_flash + hardware_gpio + hardware_i2c + hardware_interp + hardware_irq + hardware_pio + hardware_pll + hardware_pwm + hardware_resets + hardware_rtc + hardware_uart + hardware_spi + hardware_sync + hardware_timer + hardware_uart + hardware_vreg + hardware_watchdog + hardware_xosc + pico_bit_ops + pico_bootrom + pico_divider + pico_double + pico_fix_rp2040_usb_device_enumeration + pico_float + pico_int64_ops + pico_malloc + pico_mem_ops + pico_multicore + pico_platform + pico_stdlib + pico_sync + pico_time + pico_util +) + +add_library(kitchen_sink_options INTERFACE) + +target_compile_options(kitchen_sink_options INTERFACE + -Werror + -Wall + -Wextra + -Wno-unused-parameter + -Wno-inline + -Wnull-dereference +# -pedantic + -Wall + -Wcast-qual + -Wno-deprecated-declarations + -Wfloat-equal + -Wmissing-format-attribute + -Wno-long-long + + # todo not sure these are true, but investigate + #-Wpacked + + # todo we have some of these in usb_device_tiny to try to make it more readable.. perhaps doxygen would help here instead + #-Wredundant-decls + -Wno-shadow + -Wno-missing-field-initializers + -Wno-missing-braces + -Wno-sign-compare + -Wno-multichar + + # todo useful but fix later + #-Wundef + ) + +target_compile_definitions(kitchen_sink_libs INTERFACE + NDEBUG + PICO_AUDIO_DMA_IRQ=1 +) + +add_executable(kitchen_sink) +target_link_libraries(kitchen_sink kitchen_sink_libs kitchen_sink_options) +pico_set_program_name(kitchen_sink "Wombat tenticles") +pico_add_extra_outputs(kitchen_sink) + +add_executable(kitchen_sink_extra_stdio) +target_link_libraries(kitchen_sink_extra_stdio kitchen_sink_libs) # no kitchen_sink_options as TinyUSB has warnings +pico_add_extra_outputs(kitchen_sink_extra_stdio) +pico_enable_stdio_usb(kitchen_sink_extra_stdio 1) +pico_enable_stdio_semihosting(kitchen_sink_extra_stdio 1) + +add_executable(kitchen_sink_copy_to_ram) +pico_set_binary_type(kitchen_sink_copy_to_ram copy_to_ram) +target_link_libraries(kitchen_sink_copy_to_ram kitchen_sink_libs kitchen_sink_options) +pico_add_extra_outputs(kitchen_sink_copy_to_ram) + +add_executable(kitchen_sink_no_flash) +pico_set_binary_type(kitchen_sink_no_flash no_flash) +target_link_libraries(kitchen_sink_no_flash kitchen_sink_libs kitchen_sink_options) +pico_add_extra_outputs(kitchen_sink_no_flash) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/kitchen_sink.c b/bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/kitchen_sink.c new file mode 100644 index 0000000000..2bb8b03d41 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/kitchen_sink/kitchen_sink.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "pico/stdlib.h" +#include "pico/time.h" +#include "hardware/dma.h" +#include "pico/bit_ops.h" +#include "hardware/i2c.h" +#include "hardware/pwm.h" +#include "hardware/pio.h" +#include "hardware/irq.h" +#include "hardware/timer.h" +#include "pico/divider.h" +#include "pico/critical_section.h" +#include "pico/binary_info.h" + +bi_decl(bi_block_device( + BINARY_INFO_MAKE_TAG('K', 'S'), + "foo", + 0x80000, + 0x40000, + NULL, + BINARY_INFO_BLOCK_DEV_FLAG_READ | BINARY_INFO_BLOCK_DEV_FLAG_WRITE | + BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN)); + +void my_timer(uint i) { + puts("XXXX timer"); +} + +//#pragma GCC push_options +//#pragma GCC optimize ("O3") + +uint32_t *foo = (uint32_t *) 200; + +uint32_t dma_to = 0; +uint32_t dma_from = 0xaaaa5555; + +void spiggle() { + dma_channel_config c = dma_channel_get_default_config(1); + channel_config_set_bswap(&c, true); + channel_config_set_transfer_data_size(&c, DMA_SIZE_16); + channel_config_set_ring(&c, true, 13); + dma_channel_set_config(1, &c, false); + dma_channel_transfer_from_buffer_now(1, foo, 23); +} + +void __isr dma_handler_a() { + printf("HELLO A\n"); + if (dma_hw->ints1 & 1) { + dma_hw->ints1 = 1; + printf("A WINS DMA_TO %08x\n", (uint) dma_to); + irq_remove_handler(DMA_IRQ_1, dma_handler_a); + } +} + +void __isr dma_handler_b() { + printf("HELLO B\n"); + if (dma_hw->ints1 & 1) { + dma_hw->ints1 = 1; + printf("B WINS DNA_TO %08x\n", (uint) dma_to); +// irq_remove_handler(DMA_IRQ_1, dma_handler_b); + } +} + +//#pragma GCC pop_options + +int main() { + spiggle(); + + stdio_init_all(); + + printf("HI %d\n", (int)time_us_32()); + puts("Hello Everything!"); + puts("Hello Everything2!"); + + irq_add_shared_handler(DMA_IRQ_1, dma_handler_a, 0x80); + irq_add_shared_handler(DMA_IRQ_1, dma_handler_b, 0xC0); + + dma_channel_config config = dma_channel_get_default_config(0); +// set_exclusive_irq_handler(DMA_IRQ_1, dma_handler_a); + dma_channel_set_irq1_enabled(0, true); + irq_set_enabled(DMA_IRQ_1, true); + dma_channel_configure(0, &config, &dma_to, &dma_from, 1, true); + dma_channel_set_config(0, &config, false); + +// timer_start_ms(2, 2000, my_timer); + for (int i = 0; i < 20; i++) { + puts("sleepy"); + sleep_ms(1000); + dma_channel_configure(0, &config, &dma_to, &dma_from, 1, true); + if (i==3) { + irq_remove_handler(DMA_IRQ_1, dma_handler_a); + } + if (i==2) { + irq_remove_handler(DMA_IRQ_1, dma_handler_b); + } + } +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/CMakeLists.txt new file mode 100644 index 0000000000..4e922a45b4 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/CMakeLists.txt @@ -0,0 +1,17 @@ +PROJECT(pico_divider_test) + +if (PICO_ON_DEVICE) + add_executable(pico_divider_test + pico_divider_test.c + ) + + target_link_libraries(pico_divider_test pico_stdlib) + + pico_set_divider_implementation(pico_divider_test hardware_explicit) # want to compare against compiler impl + + pico_add_extra_outputs(pico_divider_test) + + target_compile_definitions(pico_divider_test PRIVATE +# TURBO + ) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/pico_divider_test.c b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/pico_divider_test.c new file mode 100644 index 0000000000..06a5d02197 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_divider_test/pico_divider_test.c @@ -0,0 +1,376 @@ +// make test-div64_64.bin && qemu-system-arm -M lm3s6965evb -cpu cortex-m3 -nographic -serial null -monitor null -semihosting -kernel test-div64_64.bin +#include +#include +#include "pico/divider.h" +#include "pico/stdlib.h" + +#ifdef TURBO +#include "hardware/vreg.h" +#endif + +typedef uint64_t ui64; +typedef int64_t i64; +typedef uint32_t ui32; +typedef int32_t i32; + +void test_mulib_divu64u64(ui64*y,ui64*x,ui64*q,ui64*r) { + *q = divmod_u64u64_rem(*y, *x, r); +} +void test_mulib_divs64s64( i64*y, i64*x, i64*q, i64*r) { + *q = divmod_s64s64_rem(*y, *x, r); +} + +ui32 hwdiv_data[4]; + +void hwdiv_sim() { + hwdiv_data[2]=hwdiv_data[0]/hwdiv_data[1]; + hwdiv_data[3]=hwdiv_data[0]%hwdiv_data[1]; +// ostr("HWS: "); +// o8hex(hwdiv_data[0]); osp(); +// o8hex(hwdiv_data[1]); osp(); +// o8hex(hwdiv_data[2]); osp(); +// o8hex(hwdiv_data[3]); onl(); + } + +ui64 ntests=0; + + +void o1ch(int c) { + uart_putc(uart_default, c); +} + +void ostr(char*p) { while(*p) o1ch(*p++); } +void onl() {ostr("\r\n");} +void osp() {o1ch(' ');} +void ostrnl(char*p) { ostr(p); onl();} +void o1hex(int u) {u&=0x0f; if(u>=10) o1ch(u-10+'A'); else o1ch(u+'0');} +void o2hex(int u) {o1hex(u>> 4); o1hex(u);} +void o4hex(int u) {o2hex(u>> 8); o2hex(u);} +void o8hex(int u) {o4hex(u>>16); o4hex(u);} +void o16hex(ui64 u) {o8hex(u>>32); o8hex(u);} +unsigned int odig(unsigned int*pv,unsigned int d,int zf) { + char c='0'; + unsigned int v=*pv; + while(v>=d) v-=d,c++; + if(zf==1&&c=='0') osp(); + else o1ch(c),zf=0; + *pv=v; + return zf; +} + +void odec(int u) { + unsigned int v=u; + int zf=1; + if(u<0) o1ch('-'),v=-v; + zf=odig(&v,1000000000,zf); + zf=odig(&v,100000000,zf); + zf=odig(&v,10000000,zf); + zf=odig(&v,1000000,zf); + zf=odig(&v,100000,zf); + zf=odig(&v,10000,zf); + zf=odig(&v,1000,zf); + zf=odig(&v,100,zf); + zf=odig(&v,10,zf); + zf=odig(&v,1,0); +} + + +int xdigval(int c) { + if(c>='0'&&c<='9') return c-'0'; + if(c>='A'&&c<='F') return c-'A'+10; + if(c>='a'&&c<='f') return c-'a'+10; + return -1; + } + +ui64 seed; + +ui64 rnd64() { + if(seed&1) seed=(seed>>1)^0x800000000000000dULL; + else seed= seed>>1; + return seed; +} + +unsigned int rnd32() { + return rnd64(); + } + +//#define RANDOMISE +//#define rfn "/dev/random" + +void test_divu64u64(ui64 y,ui64 x) { + ui64 q,r; + test_mulib_divu64u64(&y,&x,&q,&r); +#if !PICO_ON_DEVICE + if (!x) return; +#endif + if(q==y/x&&r==y%x) ; + else { + ostr("U "); + o16hex(y); osp(); + o16hex(x); osp(); + o16hex(q); osp(); + o16hex(r); + ostr(" : "); + o16hex(y/x); osp(); + o16hex(y%x); onl(); + } + ntests++; + } + +void test_divs64s64(i64 y,i64 x) { + i64 q,r; +#if !PICO_ON_DEVICE + if (y == INT64_MIN) return; +#endif + test_mulib_divs64s64(&y,&x,&q,&r); +#if !PICO_ON_DEVICE + if (!x) return; +#endif + if(q==y/x&&r==y%x) ; + else { + ostr("S "); + o16hex(y); osp(); + o16hex(x); osp(); + o16hex(q); osp(); + o16hex(r); + ostr(" : "); + o16hex(y/x); osp(); + o16hex(y%x); onl(); + } + ntests++; + } + + +// for all x and y consisting of a single run of 1:s, test a region around (x,y) +void test_special() { + int i0,j0,i1,j1,dy,dx; + ui64 y,x; + for(i0=0;i0<64;i0++) { + y=0; + for(i1=i0;i1<65;i1++) { + for(j0=0;j0<64;j0++) { + x=0; + for(j1=j0;j1<65;j1++) { +#define A 2 + for(dy=-A;dy<=A;dy++) { + for(dx=-A;dx<=A;dx++) { + test_divu64u64( y+dy, x+dx); + test_divs64s64( y+dy, x+dx); + test_divs64s64( y+dy,-x-dx); + test_divs64s64(-y-dy, x+dx); + test_divs64s64(-y-dy,-x-dx); + } + } + x|=1ULL<=0; bit--) { + int div = 1u << (31-bit); + const int N = 1000; + int tc = 0, tp = 0; + for (int i = 0; i < N; i++) { + int a = rnd32(); + int b; + do { + b = rnd32() / div; + } while (b == 0); + tc += time_32(a, b, compiler_div_s32); + tp += time_32(a, b, pico_div_s32); + } + printf(" S32 %d %f\t%f\n", bit, tc / 1000.0, tp / 1000.0); + } + + for(int bit = 30; bit>=0; bit--) { + int div = 1u << (31-bit); + const int N = 1000; + int tc = 0, tp = 0; + for (int i = 0; i < N; i++) { + int a = rnd32(); + int b; + do { + b = rnd32() / div; + } while (b == 0); + tc += time_32(a, b, compiler_div_u32); + tp += time_32(a, b, pico_div_u32); + } + printf(" U32 %d %f\t%f\n", bit, tc / 1000.0, tp / 1000.0); + } + + for(int extra = 0; extra <= 48; extra+=16) + { + for(int bit = 62; bit>=0; bit--) { + int64_t div = 1ull << (62-bit); + const int N = 1000; + int tc = 0, tp = 0; + for (int i = 0; i < N; i++) { + int64_t a = rnd64() / (1u << extra); + int64_t b; + do { + b = ((int64_t)rnd64()) / div; + } while (b == 0); + tc += time_64(a, b, compiler_div_s64); + tp += time_64(a, b, pico_div_s64); + } + printf(" S64 %d %d %f\t%f\n", extra, bit, tc / 1000.0, tp / 1000.0); + } + + for(int bit = 62; bit>=0; bit--) { + int64_t div = 1ull << (62-bit); + const int N = 1000; + int tc = 0, tp = 0; + for (int i = 0; i < N; i++) { + uint64_t a = rnd64(); + uint64_t b; + do { + b = rnd64() / div; + } while (b == 0); + tc += time_64(a, b, compiler_div_u64); + tp += time_64(a, b, pico_div_u64); + } + printf(" U64 %d %d %f\t%f\n", extra, bit, tc / 1000.0, tp / 1000.0); + } + } +} + +int main() { +#ifdef TURBO + vreg_set_voltage(VREG_VOLTAGE_MAX); + set_sys_clock_khz(48000*8, true); +#endif + setup_default_uart(); +#ifdef RANDOMISE + int u; + ifh=sys_host(SYS_OPEN,(int)rfn,0,strlen(rfn)); + u=sys_host(SYS_READ,ifh,(int)&seed,sizeof(seed)); + if(u) {ostrnl("Error reading random stream"); return 16;} + sys_host(SYS_CLOSE,ifh,0,0); +#else + seed=12233524287791987605ULL; +#endif + perf_test(); + ostr("begin\n"); + test_divu64u64( 38, 6); + test_divs64s64( 38, 6); + test_divs64s64( 38,-6); + test_divs64s64(-38, 6); + test_divs64s64(-38,-6); + test_divu64u64(1234567890123ULL,6); + test_divu64u64(0x0000000100000000ULL,6); + test_divu64u64(0xffffffffffffffffULL,6); + test_special(); + o16hex(ntests); + ostr(" special tests done; starting random tests\n"); + test_divu64u64(0xf123456789abcdefULL,0x0000000100000000ULL); + test_divu64u64(0xf123456789abcdefULL,0x00000001ffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x00000003ffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x00000007ffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x0000000fffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x0000001fffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x0000003fffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x0000007fffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x000000ffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x000001ffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x000003ffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x000007ffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x00000fffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x00001fffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x00003fffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x00007fffffffffffULL); + test_divu64u64(0xf123456789abcdefULL,0x0000ffffffffffffULL); + + test_random(); + + ostr("END\n"); + return 0; + } + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/CMakeLists.txt new file mode 100644 index 0000000000..0ff1f6092d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/CMakeLists.txt @@ -0,0 +1,38 @@ +PROJECT(pico_float_test) + +add_executable(pico_float_test + pico_float_test.c + llvm/call_apsr.S + ) + +add_executable(pico_double_test + pico_double_test.c + llvm/call_apsr.S + ) + + +target_compile_definitions(pico_float_test PRIVATE + PICO_USE_CRT_PRINTF=1 # want full precision output +# PICO_FLOAT_PROPAGATE_NANS=1 +) + +target_compile_definitions(pico_double_test PRIVATE + PICO_USE_CRT_PRINTF=1 # want full precision output + PICO_FLOAT_PROPAGATE_NANS=1 + PICO_DOUBLE_PROPAGATE_NANS=1 + ) + +# handy for testing we aren't pulling in extra stuff +#target_link_options(pico_float_test PRIVATE -nodefaultlibs) + +target_include_directories(pico_float_test PRIVATE ${CMAKE_CURRENT_LIST_DIR}/llvm) +target_link_libraries(pico_float_test pico_float pico_stdlib) +pico_add_extra_outputs(pico_float_test) +#pico_set_float_implementation(pico_float_test compiler) +#pico_set_double_implementation(pico_float_test compiler) + +target_include_directories(pico_double_test PRIVATE ${CMAKE_CURRENT_LIST_DIR}/llvm) +target_link_libraries(pico_double_test pico_double pico_stdlib) +pico_add_extra_outputs(pico_double_test) +#pico_set_float_implementation(pico_double_test compiler) +#pico_set_double_implementation(pico_double_test compiler) \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/LICENSE.TXT b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/LICENSE.TXT new file mode 100644 index 0000000000..ff63f2b6aa --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/LICENSE.TXT @@ -0,0 +1,68 @@ +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +Google Test llvm/utils/unittest/googletest +OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} +pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} +ARM contributions llvm/lib/Target/ARM/LICENSE.TXT +md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.S b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.S new file mode 100644 index 0000000000..6c7d36166a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.S @@ -0,0 +1,38 @@ +//===-- call_apsr.S - Helpers for ARM EABI floating point tests -----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements helpers for ARM EABI floating point tests for the +// compiler_rt library. +// +//===- + +.syntax unified +.cpu cortex-m0plus +.thumb + +.align 2 + +.global call_apsr_f +.type call_apsr_f,%function +.thumb_func +call_apsr_f: + push {lr} + blx r2 + mrs r0, apsr + pop {pc} + +.global call_apsr_d +.type call_apsr_d,%function +.thumb_func +call_apsr_d: + push {r4, lr} + ldr r4, [sp, #8] + blx r4 + mrs r0, apsr + pop {r4, pc} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.h b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.h new file mode 100644 index 0000000000..36a7489752 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/llvm/call_apsr.h @@ -0,0 +1,40 @@ +//todo check license +//===-- call_apsr.h - Helpers for ARM EABI floating point tests -----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file declares helpers for ARM EABI floating point tests for the +// compiler_rt library. +// +//===----------------------------------------------------------------------===// + +#ifndef CALL_APSR_H +#define CALL_APSR_H + +#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ +#error big endian support not implemented +#endif + +union cpsr { + struct { + uint32_t filler: 28; + uint32_t v: 1; + uint32_t c: 1; + uint32_t z: 1; + uint32_t n: 1; + } flags; + uint32_t value; +}; + +extern __attribute__((pcs("aapcs"))) +uint32_t call_apsr_f(float a, float b, __attribute__((pcs("aapcs"))) void (*fn)(float, float)); + +extern __attribute__((pcs("aapcs"))) +uint32_t call_apsr_d(double a, double b, __attribute__((pcs("aapcs"))) void (*fn)(double, double)); + +#endif // CALL_APSR_H diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_double_test.c b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_double_test.c new file mode 100644 index 0000000000..afcb91654b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_double_test.c @@ -0,0 +1,434 @@ +//===-- aeabi_cdcmpeq.c - Test __aeabi_cdcmpeq ----------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file tests __aeabi_cdcmpeq for the compiler_rt library. +// +//===----------------------------------------------------------------------===// + +#include +#include +#include +#include +#include +#include "pico/stdlib.h" +#include "inttypes.h" + +extern int __aeabi_dcmpun(double a, double b); + +#if __arm__ + +#include "call_apsr.h" + +extern __attribute__((pcs("aapcs"))) void __aeabi_cdcmpeq(double a, double b); + +int test__aeabi_cdcmpeq(double a, double b, int expected) { + uint32_t cpsr_value = call_apsr_d(a, b, __aeabi_cdcmpeq); + union cpsr cpsr = {.value = cpsr_value}; + if (expected != cpsr.flags.z) { + printf("error in __aeabi_cdcmpeq(%f, %f) => Z = %08x, expected %08x\n", + a, b, cpsr.flags.z, expected); + return 1; + } + return 0; +} + +#endif + +int test_cdcmpeq() { +#if __arm__ + if (test__aeabi_cdcmpeq(1.0, 1.0, 1)) + return 1; + if (test__aeabi_cdcmpeq(1234.567, 765.4321, 0)) + return 1; + if (test__aeabi_cdcmpeq(-123.0, -678.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(0.0, -0.0, 1)) + return 1; + if (test__aeabi_cdcmpeq(0.0, 0.0, 1)) + return 1; + if (test__aeabi_cdcmpeq(-0.0, -0.0, 1)) + return 1; + if (test__aeabi_cdcmpeq(-0.0, 0.0, 1)) + return 1; + if (test__aeabi_cdcmpeq(0.0, -1.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(-0.0, -1.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(-1.0, 0.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(-1.0, -0.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(1.0, NAN, 0)) + return 1; + if (test__aeabi_cdcmpeq(NAN, 1.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(NAN, NAN, 0)) + return 1; + if (test__aeabi_cdcmpeq(INFINITY, 1.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(0.0, INFINITY, 0)) + return 1; + if (test__aeabi_cdcmpeq(-INFINITY, 0.0, 0)) + return 1; + if (test__aeabi_cdcmpeq(0.0, -INFINITY, 0)) + return 1; + if (test__aeabi_cdcmpeq(INFINITY, INFINITY, 1)) + return 1; + if (test__aeabi_cdcmpeq(-INFINITY, -INFINITY, 1)) + return 1; +#else + printf("skipped\n"); +#endif + return 0; +} + +#if __arm__ + +extern __attribute__((pcs("aapcs"))) void __aeabi_cdcmple(double a, double b); + +extern __attribute__((pcs("aapcs"))) void __aeabi_cdrcmple(double a, double b); + +int test_dcmple_gt(double a, double b, int expected) { + if ((a <= b) != expected) { + printf("error in dcmple(%f, %f) => %d, expected %d\n", + a, b, a <= b, expected); + return 1; + } + if ((a > b) == expected && !isnan(a) && !isnan(b)) { + printf("error in dcmpgt(%f, %f) => %d, expected %d\n", + a, b, a > b, !expected); + return 1; + } + return 0; +} + +int test_dcmplt_ge(double a, double b, int expected) { + if ((a < b) != expected) { + printf("error in dcmplt(%f, %f) => %d, expected %d\n", + a, b, a < b, expected); + return 1; + } + if ((a >= b) == expected && !isnan(a) && !isnan(b)) { + printf("error in dcmpge(%f, %f) => %d, expected %d\n", + a, b, a >= b, !expected); + return 1; + } + return 0; +} + +int test__aeabi_cdcmple(double a, double b, int expected) { + int32_t cpsr_value = call_apsr_d(a, b, __aeabi_cdcmple); + int32_t r_cpsr_value = call_apsr_d(b, a, __aeabi_cdrcmple); + int32_t cpsr_value2 = call_apsr_d(b, a, __aeabi_cdcmple); + int32_t r_cpsr_value2 = call_apsr_d(a, b, __aeabi_cdrcmple); + + if (cpsr_value != r_cpsr_value) { + printf("error: __aeabi_cdcmple(%f, %f) != __aeabi_cdrcmple(%f, %f)\n", a, b, b, a); + return 1; + } + + int expected_z, expected_c; + if (expected == -1) { + expected_z = 0; + expected_c = 0; + } else if (expected == 0) { + expected_z = 1; + expected_c = 1; + } else { + // a or b is NaN, or a > b + expected_z = 0; + expected_c = 1; + } +#if PICO_DOUBLE_COMPILER + // gcc has this backwards it seems - not a good thing, but I guess it doesn't ever call them + expected_c ^= 1; +#endif + + union cpsr cpsr = {.value = cpsr_value}; + if (expected_z != cpsr.flags.z || expected_c != cpsr.flags.c) { + printf("error in __aeabi_cdcmple(%f, %f) => (Z = %d, C = %d), expected (Z = %d, C = %d)\n", + a, b, cpsr.flags.z, cpsr.flags.c, expected_z, expected_c); + return 1; + } + + cpsr.value = r_cpsr_value; + if (expected_z != cpsr.flags.z || expected_c != cpsr.flags.c) { + printf("error in __aeabi_cfrcmple(%f, %f) => (Z = %d, C = %d), expected (Z = %d, C = %d)\n", + a, b, cpsr.flags.z, cpsr.flags.c, expected_z, expected_c); + return 1; + } + return 0; +} + +#endif + +int test_cdcmple() { +#if __arm__ + if (test__aeabi_cdcmple(1.0, 1.0, 0)) + return 1; + if (test__aeabi_cdcmple(1234.567, 765.4321, 1)) + return 1; + if (test__aeabi_cdcmple(765.4321, 1234.567, -1)) + return 1; + if (test__aeabi_cdcmple(-123.0, -678.0, 1)) + return 1; + if (test__aeabi_cdcmple(-678.0, -123.0, -1)) + return 1; + if (test__aeabi_cdcmple(-123.0, 678.0, -1)) + return 1; + if (test__aeabi_cdcmple(678.0, -123.0, 1)) + return 1; + if (test__aeabi_cdcmple(0.0, -0.0, 0)) + return 1; + if (test__aeabi_cdcmple(1.0, NAN, 1)) + return 1; + if (test__aeabi_cdcmple(NAN, 1.0, 1)) + return 1; + if (test__aeabi_cdcmple(NAN, NAN, 1)) + return 1; +#else + printf("skipped\n"); +#endif + return 0; +} + +int test_cmple_gt() { + if (test_dcmple_gt(1.0, 1.0, 1)) + return 1; + if (test_dcmple_gt(1234.567, 765.4321, 0)) + return 1; + if (test_dcmple_gt(765.4321, 1234.567, 1)) + return 1; + if (test_dcmple_gt(-123.0, -678.0, 0)) + return 1; + if (test_dcmple_gt(-678.0, -123.0, 1)) + return 1; + if (test_dcmple_gt(-123.0, 678.0, 1)) + return 1; + if (test_dcmple_gt(678.0, -123.0, 0)) + return 1; + if (test_dcmple_gt(0.0, -0.0, 1)) + return 1; + if (test_dcmple_gt(-0.0, 0.0, 1)) + return 1; + if (test_dcmple_gt(1.0, NAN, 0)) + return 1; + if (test_dcmple_gt(NAN, 1.0, 0)) + return 1; + if (test_dcmple_gt(NAN, NAN, 0)) + return 1; + return 0; +} + +int test_cmplt_ge() { + if (test_dcmplt_ge(1.0, 1.0, 0)) + return 1; + if (test_dcmplt_ge(1234.567, 765.4321, 0)) + return 1; + if (test_dcmplt_ge(765.4321, 1234.567, 1)) + return 1; + if (test_dcmplt_ge(-123.0, -678.0, 0)) + return 1; + if (test_dcmplt_ge(-678.0, -123.0, 1)) + return 1; + if (test_dcmplt_ge(-123.0, 678.0, 1)) + return 1; + if (test_dcmplt_ge(678.0, -123.0, 0)) + return 1; + if (test_dcmplt_ge(0.0, -0.0, 0)) + return 1; + if (test_dcmplt_ge(-0.0, 0.0, 0)) + return 1; + if (test_dcmplt_ge(1.0, NAN, 0)) + return 1; + if (test_dcmplt_ge(NAN, 1.0, 0)) + return 1; + if (test_dcmplt_ge(NAN, NAN, 0)) + return 1; + return 0; +} + +int check_dcmpun(double a, double b, bool expected, bool expect_equal) { + if (__aeabi_dcmpun(a, b) != expected) { + printf("Failed dcmpun(%f, %f)\n", a, b); + return 1; + } + if ((a == b) != expect_equal) { + printf("Failed equality check %f %f\n", a, b); + __breakpoint(); + if (b == a) { + printf("SAS\n"); + } + return 1; + } + return 0; +} + +int test_dcmpun() { + if (check_dcmpun(0, 0, false, true) || + check_dcmpun(-INFINITY, INFINITY, false, false) || + check_dcmpun(NAN, 0, true, false) || + check_dcmpun(0, NAN, true, false) || + check_dcmpun(NAN, NAN, true, false) || + check_dcmpun(-NAN, NAN, true, false)) { + return 1; + } + return 0; +} + +double aa = 0.5; +double bb = 1; + +int main() { + setup_default_uart(); + + printf("%d\n", aa < bb); + for(double a = -1; a <= 1; a++) { + for(double b = -1; b <= 1; b++) { + printf("%f < %f ? %d\n", a, b, a < b); + } + } + for(double a = -1; a <=1; a++) { + for(double b = -1; b <= 1; b++) { + printf("%f > %f ? %d\n", a, b, a > b); + } + } + +#if 1 + for (double x = 0; x < 3; x++) { + printf("\n ----- %g\n", x); + printf("SQRT %10.18g\n", sqrt(x)); + printf("COS %10.18g\n", cos(x)); + printf("SIN %10.18g\n", sin(x)); + printf("TAN %10.18g\n", tan(x)); + printf("ATAN2 %10.18g\n", atan2(x, 10)); + printf("ATAN2 %10.18g\n", atan2(10, x)); + printf("EXP %10.18g\n", exp(x)); + printf("LN %10.18g\n", log(x)); + double s, c; + sincos(x, &s, &c); + printf("SINCOS %10.18f %10.18f\n", s, c); + } + +#if PICO_DOUBLE_PROPAGATE_NANS + { + float x = NAN; + printf("NANO %10.18f\n", x); + printf("SQRT %10.18f\n", sqrt(x)); + printf("COS %10.18f\n", cos(x)); + printf("SIN %10.18f\n", sin(x)); + printf("TAN %10.18f\n", tan(x)); + printf("ATAN2 %10.18f\n", atan2(x, 10)); + printf("ATAN2 %10.18f\n", atan2(10, x)); + printf("EXP %10.18f\n", exp(x)); + printf("LN %10.18f\n", log(x)); + printf("POW %10.18f\n", pow(x, x)); + printf("TRUNC %10.18f\n", trunc(x)); + printf("LDEXP %10.18f\n", ldexp(x, x)); + printf("FMOD %10.18f\n", fmod(x, 3.0f)); + double s, c; + sincos(x, &s, &c); + printf("SINCOS %10.18f %10.18f\n", s, c); + + for(int j=0;j<2;j++) { + for (int i = 1; i < 4; i++) { + char buf[4]; + sprintf(buf, "%d", i); + float f0 = -nanf(buf); + double d0 = -nan(buf); + // hmm nanf/nan seem to ignore payload + *(uint64_t *) &d0 |= i; + *(uint32_t *) &f0 |= i; + if (j) { + // try without top bit set + *(uint64_t *) &d0 &= ~0x0008000000000000ull; + *(uint32_t *) &f0 &= ~0x00400000u; + } + float f = (float) d0; + double d = (double) f0; + printf("f2d %f %08"PRIx32" -> %g %016"PRIx64"\n", f0, *(uint32_t *) &f0, d, *(uint64_t *) &d); + printf("d2f %f %016"PRIx64" -> %f %08"PRIx32"\n", d0, *(uint64_t *) &d0, f, *(uint32_t *) &f); + } + } + } +#endif + + { + int32_t y; +// for (int32_t x = 0; x>-512; x--) { +// printf("i %d->%f\n", (int)x, (float) x); +// } + for (int32_t x = -1; x; x <<= 1) { + printf("i %d->%f\n", x, (double) x); + } + for (int32_t x = 1; x; x <<= 1) { + printf("i %d->%f\n", x, (double) x); + y = x << 1; + } + for (int64_t x = 1; x; x <<= 1) { + printf("i %lld->%f\n", x, (double) x); + y = x << 1; + } + for (int64_t x = -1; x; x <<= 1) { + printf("i %lld->%f\n", x, (double) x); + y = x << 1; + } + printf("d %d->%f\n", y, (float) y); + } + + { + uint32_t y; + for(uint32_t x = 1; x; x <<= 1) { + printf("u %u->%f\n", x, (double)x); + y = x << 1; + } + printf("u %u->%f\n", y, (double)y); + } + for(int64_t x = 1; x !=0; x <<= 1u) { + printf("%lld->%f\n", x, (double)x); + } + for(double x = -4294967296.f * 4294967296.f; x<=-0.5f; x/=2.f) { + printf("d2i64 %f->%lld\n", x, (int64_t)x); + } + for(double x = 4294967296.f * 4294967296.f; x>=0.5f; x/=2.f) { + printf("d2i64 %f->%lld\n", x, (int64_t)x); + } + for(double x = -4294967296.f * 4294967296.f; x<=-0.5f; x/=2.f) { + printf("d2i32 %f->%d\n", x, (int32_t)x); + } + for(double x = 4294967296.f * 4294967296.f; x>=0.5f; x/=2.f) { + printf("d2i32 %f->%d\n", x, (int32_t)x); + } + + for (double x = 1; x < 11; x += 2) { + double f = x * x; + double g = 1.0 / x; + printf("%g %10.18g %10.18g, %10.18g, %10.18g %10.18g\n", x, f, x + 0.37777777777777777777777777777, + x - 0.377777777777777777777777777777, g, 123456789.0 / x); + } + if (test_cdcmpeq() || test_cdcmple() || + test_dcmpun() || test_cmple_gt() || test_cmplt_ge()) { + printf("FAILED\n"); + return 1; + } else { + printf("PASSED\n"); + return 0; + } + + if (test_cdcmpeq() || test_cdcmple() || + test_dcmpun() || test_cmple_gt() || test_cmplt_ge()) { + printf("FAILED\n"); + return 1; + } else { + printf("PASSED\n"); + return 0; + } + +#endif +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_float_test.c b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_float_test.c new file mode 100644 index 0000000000..75a37a8d3d --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_float_test/pico_float_test.c @@ -0,0 +1,538 @@ +//===-- aeabi_cfcmpeq.c - Test __aeabi_cfcmpeq ----------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file tests __aeabi_cfcmpeq for the compiler_rt library. +// +//===----------------------------------------------------------------------===// + +#include +#include +#include +#include +#include +//#include +#include "pico/stdlib.h" +#include "inttypes.h" + +extern int __aeabi_fcmpun(float a, float b); + +#if __arm__ + +#include "call_apsr.h" + +extern __attribute__((pcs("aapcs"))) void __aeabi_cfcmpeq(float a, float b); + +int test__aeabi_cfcmpeq(float a, float b, int expected) { + uint32_t cpsr_value = call_apsr_f(a, b, __aeabi_cfcmpeq); + union cpsr cpsr = {.value = cpsr_value}; + if (expected != cpsr.flags.z) { + printf("error in __aeabi_cfcmpeq(%f, %f) => Z = %08x, expected %08x\n", + a, b, cpsr.flags.z, expected); + return 1; + } + return 0; +} + +#endif + +int test_cfcmpeq() { +#if __arm__ + if (test__aeabi_cfcmpeq(1.0, 1.0, 1)) + return 1; + if (test__aeabi_cfcmpeq(1234.567, 765.4321, 0)) + return 1; + if (test__aeabi_cfcmpeq(-123.0, -678.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(0.0, -0.0, 1)) + return 1; + if (test__aeabi_cfcmpeq(0.0, 0.0, 1)) + return 1; + if (test__aeabi_cfcmpeq(-0.0, -0.0, 1)) + return 1; + if (test__aeabi_cfcmpeq(-0.0, 0.0, 1)) + return 1; + if (test__aeabi_cfcmpeq(0.0, -1.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(-0.0, -1.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(-1.0, 0.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(-1.0, -0.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(1.0, NAN, 0)) + return 1; + if (test__aeabi_cfcmpeq(NAN, 1.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(NAN, NAN, 0)) + return 1; + if (test__aeabi_cfcmpeq(INFINITY, 1.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(0.0, INFINITY, 0)) + return 1; + if (test__aeabi_cfcmpeq(-INFINITY, 0.0, 0)) + return 1; + if (test__aeabi_cfcmpeq(0.0, -INFINITY, 0)) + return 1; + if (test__aeabi_cfcmpeq(INFINITY, INFINITY, 1)) + return 1; + if (test__aeabi_cfcmpeq(-INFINITY, -INFINITY, 1)) + return 1; +#else + printf("skipped\n"); +#endif + return 0; +} + +#if __arm__ + +extern __attribute__((pcs("aapcs"))) void __aeabi_cfcmple(float a, float b); + +extern __attribute__((pcs("aapcs"))) void __aeabi_cfrcmple(float a, float b); + +int test_fcmple_gt(float a, float b, int expected) { + if ((a <= b) != expected) { + printf("error in fcmple(%f, %f) => %d, expected %d\n", + a, b, a <= b, expected); + return 1; + } + if ((a > b) == expected && !isnanf(a) && !isnanf(b)) { + printf("error in fcmpgt(%f, %f) => %d, expected %d\n", + a, b, a > b, !expected); + return 1; + } + return 0; +} + +int test_fcmplt_ge(float a, float b, int expected) { + if ((a < b) != expected) { + printf("error in fcmplt(%f, %f) => %d, expected %d\n", + a, b, a < b, expected); + return 1; + } + if ((a >= b) == expected && !isnanf(a) && !isnanf(b)) { + printf("error in fcmpge(%f, %f) => %d, expected %d\n", + a, b, a >= b, !expected); + return 1; + } + return 0; +} + +int test__aeabi_cfcmple(float a, float b, int expected) { + int32_t cpsr_value = call_apsr_f(a, b, __aeabi_cfcmple); + int32_t r_cpsr_value = call_apsr_f(b, a, __aeabi_cfrcmple); + int32_t cpsr_value2 = call_apsr_f(b, a, __aeabi_cfcmple); + int32_t r_cpsr_value2 = call_apsr_f(a, b, __aeabi_cfrcmple); + + if (cpsr_value != r_cpsr_value) { + printf("error: __aeabi_cfcmple(%f, %f) != __aeabi_cfrcmple(%f, %f)\n", a, b, b, a); + return 1; + } + + int expected_z, expected_c; + if (expected == -1) { + expected_z = 0; + expected_c = 0; + } else if (expected == 0) { + expected_z = 1; + expected_c = 1; + } else { + // a or b is NaN, or a > b + expected_z = 0; + expected_c = 1; + } +#if PICO_FLOAT_COMPILER + // gcc has this backwards it seems - not a good thing, but I guess it doesn't ever call them + expected_c ^= 1; +#endif + + union cpsr cpsr = {.value = cpsr_value}; + if (expected_z != cpsr.flags.z || expected_c != cpsr.flags.c) { + printf("error in __aeabi_cfcmple(%f, %f) => (Z = %d, C = %d), expected (Z = %d, C = %d)\n", + a, b, cpsr.flags.z, cpsr.flags.c, expected_z, expected_c); + return 1; + } + + cpsr.value = r_cpsr_value; + if (expected_z != cpsr.flags.z || expected_c != cpsr.flags.c) { + printf("error in __aeabi_cfrcmple(%f, %f) => (Z = %d, C = %d), expected (Z = %d, C = %d)\n", + a, b, cpsr.flags.z, cpsr.flags.c, expected_z, expected_c); + return 1; + } + return 0; +} + +#endif + +int test_cfcmple() { +#if __arm__ + if (test__aeabi_cfcmple(1.0, 1.0, 0)) + return 1; + if (test__aeabi_cfcmple(1234.567, 765.4321, 1)) + return 1; + if (test__aeabi_cfcmple(765.4321, 1234.567, -1)) + return 1; + if (test__aeabi_cfcmple(-123.0, -678.0, 1)) + return 1; + if (test__aeabi_cfcmple(-678.0, -123.0, -1)) + return 1; + if (test__aeabi_cfcmple(-123.0, 678.0, -1)) + return 1; + if (test__aeabi_cfcmple(678.0, -123.0, 1)) + return 1; + if (test__aeabi_cfcmple(0.0, -0.0, 0)) + return 1; + if (test__aeabi_cfcmple(1.0, NAN, 1)) + return 1; + if (test__aeabi_cfcmple(NAN, 1.0, 1)) + return 1; + if (test__aeabi_cfcmple(NAN, NAN, 1)) + return 1; +#else + printf("skipped\n"); +#endif + return 0; +} + +int test_cmple_gt() { + if (test_fcmple_gt(1.0, 1.0, 1)) + return 1; + if (test_fcmple_gt(1234.567, 765.4321, 0)) + return 1; + if (test_fcmple_gt(765.4321, 1234.567, 1)) + return 1; + if (test_fcmple_gt(-123.0, -678.0, 0)) + return 1; + if (test_fcmple_gt(-678.0, -123.0, 1)) + return 1; + if (test_fcmple_gt(-123.0, 678.0, 1)) + return 1; + if (test_fcmple_gt(678.0, -123.0, 0)) + return 1; + if (test_fcmple_gt(0.0, -0.0, 1)) + return 1; + if (test_fcmple_gt(-0.0, 0.0, 1)) + return 1; + if (test_fcmple_gt(1.0, NAN, 0)) + return 1; + if (test_fcmple_gt(NAN, 1.0, 0)) + return 1; + if (test_fcmple_gt(NAN, NAN, 0)) + return 1; + return 0; +} + +int test_cmplt_ge() { + if (test_fcmplt_ge(1.0, 1.0, 0)) + return 1; + if (test_fcmplt_ge(1234.567, 765.4321, 0)) + return 1; + if (test_fcmplt_ge(765.4321, 1234.567, 1)) + return 1; + if (test_fcmplt_ge(-123.0, -678.0, 0)) + return 1; + if (test_fcmplt_ge(-678.0, -123.0, 1)) + return 1; + if (test_fcmplt_ge(-123.0, 678.0, 1)) + return 1; + if (test_fcmplt_ge(678.0, -123.0, 0)) + return 1; + if (test_fcmplt_ge(0.0, -0.0, 0)) + return 1; + if (test_fcmplt_ge(-0.0, 0.0, 0)) + return 1; + if (test_fcmplt_ge(1.0, NAN, 0)) + return 1; + if (test_fcmplt_ge(NAN, 1.0, 0)) + return 1; + if (test_fcmplt_ge(NAN, NAN, 0)) + return 1; + return 0; +} + +int check_fcmpun(float a, float b, bool expected, bool expect_equal) { + if (__aeabi_fcmpun(a, b) != expected) { + printf("Failed fcmpun(%f, %f)\n", a, b); + return 1; + } + if ((a == b) != expect_equal) { + printf("Failed equality check %f %f\n", a, b); + __breakpoint(); + if (b == a) { + printf("SAS\n"); + } + return 1; + } + return 0; +} + +int test_fcmpun() { + if (check_fcmpun(0, 0, false, true) || + check_fcmpun(-INFINITY, INFINITY, false, false) || + check_fcmpun(NAN, 0, true, false) || + check_fcmpun(0, NAN, true, false) || + check_fcmpun(NAN, NAN, true, false) || + check_fcmpun(-NAN, NAN, true, false)) { + return 1; + } + return 0; +} + +double aa = 0.5; +double bb = 1; + +int main() { + setup_default_uart(); + + printf("%d\n", aa < bb); + for(float a = -1; a <= 1; a++) { + for(float b = -1; b <= 1; b++) { + printf("%f < %f ? %d\n", a, b, a < b); + } + } + for(float a = -1; a <=1; a++) { + for(float b = -1; b <= 1; b++) { + printf("%f > %f ? %d\n", a, b, a > b); + } + } + printf("F\n"); + for(float f = -1.0; f<=1.f; f+=0.25f) { + printf("%d\n", (int)f); + } + printf("D\n"); + for(double d = -1.0; d<=1.0; d+=0.25) { + printf("%d\n", (int)d); + } + printf("LD\n"); + for(double d = -1.0; d<=1.0; d+=0.25) { + printf("%lld\n", (int64_t)d); + } + + for(float d = -0.125; d>=-65536.0*65536.0*65536.0*65536.0*2; d*=2) { + printf("%g %d, %lld, %u, %llu\n", d, (int32_t)d, (int64_t)d, (uint32_t)d, (uint64_t)d); + } + for(float d = 0.125; d<=65536.0*65536.0*65536.0*65536.0*2; d*=2) { + printf("%g %d, %lld, %u, %llu\n", d, (int32_t)d, (int64_t)d, (uint32_t)d, (uint64_t)d); + } + + for(double d = -0.125; d>=-65536.0*65536.0*65536.0*65536.0*2; d*=2) { + printf("%g %d, %lld, %u, %llu\n", d, (int32_t)d, (int64_t)d, (uint32_t)d, (uint64_t)d); + } + for(double d = 0.125; d<=65536.0*65536.0*65536.0*65536.0*2; d*=2) { + printf("%g %d, %lld, %u, %llu\n", d, (int32_t)d, (int64_t)d, (uint32_t)d, (uint64_t)d); + } + + for(int i = (int32_t)0x80000000; i <0; i /= 2) { + printf("%d %f\n", i, (double)i); + } + for(int i = (1<<30); i >0; i /= 2) { + printf("%d %f\n", i, (double)i); + } + + printf("%f\n", 0.5); + printf("SQRT %10.18g\n", 0.5); + printf("SQRT %10.18g\n", 0.333333333333333333333333); + +#if 1 + for (float x = 0; x < 3; x++) { + printf("\n ----- %f\n", x); + printf("FSQRT %10.18f\n", sqrtf(x)); + printf("FCOS %10.18f\n", cosf(x)); + printf("FSIN %10.18f\n", sinf(x)); + float s, c; + sincosf(x, &s, &c); + printf("FSINCOS %10.18f %10.18f\n", s, c); + printf("FTAN %10.18f\n", tanf(x)); + printf("FATAN2 %10.18f\n", atan2f(x, 10)); + printf("FATAN2 %10.18f\n", atan2f(10, x)); + printf("FEXP %10.18f\n", expf(x)); + printf("FLN %10.18f\n", logf(x)); + printf("POWF %10.18f\n", powf(x, x)); + printf("TRUNCF %10.18f\n", truncf(x)); + printf("LDEXPF %10.18f\n", ldexpf(x, x)); + printf("FMODF %10.18f\n", fmodf(x, 3.0f)); + } + + for (double x = 0; x < 3; x++) { + printf("\n ----- %g\n", x); + printf("SQRT %10.18g\n", sqrt(x)); + printf("COS %10.18g\n", cos(x)); + printf("SIN %10.18g\n", sin(x)); + printf("TAN %10.18g\n", tan(x)); + printf("ATAN2 %10.18g\n", atan2(x, 10)); + printf("ATAN2 %10.18g\n", atan2(10, x)); + printf("EXP %10.18g\n", exp(x)); + printf("LN %10.18g\n", log(x)); + } + +#if PICO_FLOAT_PROPAGATE_NANS + { + float x = NAN; + printf("NANO %10.18f\n", x); + printf("FSQRT %10.18f\n", sqrtf(x)); + printf("FCOS %10.18f\n", cosf(x)); + printf("FSIN %10.18f\n", sinf(x)); + printf("FTAN %10.18f\n", tanf(x)); + printf("FATAN2 %10.18f\n", atan2f(x, 10)); + printf("FATAN2 %10.18f\n", atan2f(10, x)); + printf("FEXP %10.18f\n", expf(x)); + printf("FLN %10.18f\n", logf(x)); + printf("POWF %10.18f\n", powf(x, x)); + printf("TRUNCF %10.18f\n", truncf(x)); + printf("LDEXPF %10.18f\n", ldexpf(x, x)); + printf("FMODF %10.18f\n", fmodf(x, 3.0f)); + float s, c; +// sincosf(x, &s, &c); + printf("FSINCOS %10.18f %10.18f\n", s, c); + + for(int i=1; i<4; i++) { + char buf[4]; + sprintf(buf, "%d", i); + float f0 = -nanf(buf); + double d0 = -nan(buf); + // hmm + *(uint64_t *)&d0 |= i; + *(uint32_t *)&f0 |= i; + float f = (float)d0; + double d = (double)f0; + printf("f2d %08"PRIx32" -> %g %016"PRIx64"\n", *(uint32_t*)&f0, d, *(uint64_t*)&d); + printf("d2f %016"PRIx64" -> %f %08"PRIx32"\n", *(uint64_t*)&d0, f, *(uint32_t*)&f); + } + } +#endif + + { + int32_t y; +// for (int32_t x = 0; x>-512; x--) { +// printf("i %d->%f\n", (int)x, (float) x); +// } + for (int32_t x = -1; x; x <<= 1) { + printf("i %d->%f\n", x, (float) x); + } + for (int32_t x = 1; x; x <<= 1) { + printf("i %d->%f\n", x, (float) x); + y = x << 1; + } + for (int64_t x = 1; x; x <<= 1) { + printf("i %lld->%f\n", x, (float) x); + y = x << 1; + } + for (int64_t x = -1; x; x <<= 1) { + printf("i %lld->%f\n", x, (float) x); + y = x << 1; + } + printf("d %d->%f\n", y, (float) y); + } + + { + uint32_t y; + for(uint32_t x = 1; x; x <<= 1) { + printf("u %u->%f\n", x, (float)x); + y = x << 1; + } + printf("u %u->%f\n", y, (float)y); + } + for(int64_t x = 1; x !=0; x <<= 1u) { + printf("%lld->%f\n", x, (float)x); + } + for(float x = 4294967296.f * 4294967296.f; x>=0.5f; x/=2.f) { + printf("f %f->%lld\n", x, (int64_t)x); + } + for (double x = 1; x < 11; x += 2) { + double f = x * x; + double g = 1.0 / x; + printf("%g %10.18g %10.18g, %10.18g, %10.18g %10.18g\n", x, f, x + 0.37777777777777777777777777777, + x - 0.377777777777777777777777777777, g, 123456789.0 / x); + } + if (test_cfcmpeq() || test_cfcmple() || + test_fcmpun() || test_cmple_gt() || test_cmplt_ge()) { + printf("FAILED\n"); + return 1; + } else { + printf("PASSED\n"); + return 0; + } + + if (test_cfcmpeq() || test_cfcmple() || + test_fcmpun() || test_cmple_gt() || test_cmplt_ge()) { + printf("FAILED\n"); + return 1; + } else { + printf("PASSED\n"); + return 0; + } + +#endif +} + +#if 0 +// todo need to add tests like these + +bool __noinline check(float x, float y) { + return x > y; +} + +bool __noinline checkd(double x, double y) { + return x >= y; +} + +int main() { + stdio_init_all(); +#if 0 + printf("0 op nan %d\n", check(0, nanf("sd"))); + printf("nan op 0 %d\n", check(nanf("sd"), 0)); + printf("0 op -nan %d\n", check(0, -nanf("sd"))); + printf("-nan op 0 %d\n", check(-nanf("sd"), 0)); + printf("-nan op nan %d\n", check(-nanf("xx"), nanf("xx"))); + printf("-nan op -nan %d\n", check(-nanf("xx"), -nanf("xx"))); + printf("nan op -nan %d\n", check(nanf("xx"), -nanf("xx"))); + printf("nan op nan %d\n", check(nanf("xx"), nanf("xx"))); + printf("0 op inf %d\n", check(0, infinityf())); + printf("inf op 0 %d\n", check(infinityf(), 0)); + printf("0 op -inf %d\n", check(0, -infinityf())); + printf("-inf op 0 %d\n", check(-infinityf(), 0)); + printf("-inf op inf %d\n", check(-infinityf(), infinityf())); + printf("-inf op -inf %d\n", check(-infinityf(), -infinityf())); + printf("inf op -inf %d\n", check(infinityf(), -infinityf())); + printf("inf op inf %d\n", check(infinityf(), infinityf())); + printf("1 op 1 %d\n", check(1, 1)); + printf("-1 op 1 %d\n", check(-1, 1)); + printf("1 op -1 %d\n", check(1, -1)); + printf("-1 op -1 %d\n", check(-1, -1)); + printf("1 op 2 %d\n", check(1, 2)); + printf("2 op 1 %d\n", check(2, 1)); + printf("-1 op -2 %d\n", check(-1, -2)); + printf("-2 op -1 %d\n", check(-2, -1)); +#else + printf("0 op nan %d\n", checkd(0, nan("sd"))); + printf("nan op 0 %d\n", checkd(nan("sd"), 0)); + printf("0 op -nan %d\n", checkd(0, -nan("sd"))); + printf("-nan op 0 %d\n", checkd(-nan("sd"), 0)); + printf("-nan op nan %d\n", checkd(-nan("xx"), nan("xx"))); + printf("-nan op -nan %d\n", checkd(-nan("xx"), -nan("xx"))); + printf("nan op -nan %d\n", checkd(nan("xx"), -nan("xx"))); + printf("nan op nan %d\n", checkd(nan("xx"), nan("xx"))); + printf("0 op inf %d\n", checkd(0, infinity())); + printf("inf op 0 %d\n", checkd(infinity(), 0)); + printf("0 op -inf %d\n", checkd(0, -infinity())); + printf("-inf op 0 %d\n", checkd(-infinity(), 0)); + printf("-inf op inf %d\n", checkd(-infinity(), infinity())); + printf("-inf op -inf %d\n", checkd(-infinity(), -infinity())); + printf("inf op -inf %d\n", checkd(infinity(), -infinity())); + printf("inf op inf %d\n", checkd(infinity(), infinity())); + printf("1 op 1 %d\n", checkd(1, 1)); + printf("-1 op 1 %d\n", checkd(-1, 1)); + printf("1 op -1 %d\n", checkd(1, -1)); + printf("-1 op -1 %d\n", checkd(-1, -1)); + printf("1 op 2 %d\n", checkd(1, 2)); + printf("2 op 1 %d\n", checkd(2, 1)); + printf("-1 op -2 %d\n", checkd(-1, -2)); + printf("-2 op -1 %d\n", checkd(-2, -1)); +#endif +} +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/CMakeLists.txt new file mode 100644 index 0000000000..8de6a4519b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(pico_stdlib_test pico_stdlib_test.c) + +target_compile_definitions(pico_stdlib_test PRIVATE + #PICO_ENTER_USB_BOOT_ON_EXIT=1 +) + +target_link_libraries(pico_stdlib_test PRIVATE pico_stdlib) +pico_add_extra_outputs(pico_stdlib_test) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/pico_stdlib_test.c b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/pico_stdlib_test.c new file mode 100644 index 0000000000..0adef83bc8 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_stdlib_test/pico_stdlib_test.c @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "pico/stdlib.h" +#include "pico/bit_ops.h" + +int main() { + setup_default_uart(); + + puts("Hellox, worlxxcd!"); + printf("Hello world %d\n", 2); +#if PICO_NO_HARDWARE + puts("This is native"); +#endif +#if PICO_NO_FLASH + puts("This is no flash"); +#endif + + for (int i = 0; i < 64; i++) { + uint32_t x = 1 << i; + uint64_t xl = 1ull << i; +// printf("%d %u %u %u %u \n", i, (uint)(x%10u), (uint)(x%16u), (uint)(xl %10u), (uint)(xl%16u)); + printf("%08x %08x %016llx %016llx\n", (uint) x, (uint) __rev(x), (unsigned long long) xl, + (unsigned long long) __revll(xl)); + } + + for (int i = 0; i < 8; i++) { + sleep_ms(500); + printf( "%" PRIu64 "\n", to_us_since_boot(get_absolute_time())); + } + absolute_time_t until = delayed_by_us(get_absolute_time(), 500000); + printf("\n"); + for (int i = 0; i < 8; i++) { + sleep_until(until); + printf("%" PRIu64 "\n", to_us_since_boot(get_absolute_time())); + until = delayed_by_us(until, 500000); + } + puts("DONE"); +} + +void test1() { + uint32_t x = 0; + for (int i = 0; i < 1000; i++) { + x += __builtin_popcount(i); + x += __builtin_popcountl(i); + x += __builtin_popcountll(i * 1234567ll); + x += __builtin_clz(i); + x += __builtin_clzl(i); + x += __builtin_clzll(i * 1234567ll); + x += __builtin_ctz(i); + x += __builtin_ctzl(i); + x += __builtin_ctzll(i * 1234567ll); + } + if (x > 12345677) { + puts("ok"); + } +} + +#if 0 +struct event { + +}; + +// something might be asyncrhonous.. it communicates the result via the event +void do_something(struct event *e, int a, unsigned int b, char *c) { + if (a == b) puts(c); +} + +int32_t event_result_timeout_ms(struct event *e, int32_t timeout_ms); +int32_t event_result_timeout_us(struct event *e, int32_t timeout_us); +bool is_event_done(struct event *e); +// asserts if not done +int32_t event_result(struct event *e); +void event_set_callback(struct event *e, void (*callback)(struct event *e)); +void init_multi_event(struct event *target, struct event **events, uint event_count); + +#define timeout_ms_result(f, timeout) ({ \ + struct event __event; \ + struct event *event = &__event; \ + (f); \ + event_result_timeout_ms(event, timeout); \ + }) + +#define blocking_result(f) timeout_ms_result(f, -1) +#define on_complete(f, cb) ({ \ + static struct event __event; \ + struct event *event = &__event; \ + (f); \ + event_set_callback(event, my_callback); \ + }) + +void test2() { + // just playing with blocking syntax + struct event e; + do_something(&e, 1, 1, "Hello"); + uint32_t result = event_result_timeout_ms(&e, -1); +} + +void test3() { + uint32_t result = blocking_result(do_something(event, 1, 1, "Hello")); +} + +void test4() { + struct event e; + do_something(&e, 1, 1, "Hello"); + // this would poll (down to hardware if there is no asynchronous mechanism) + while (!is_event_done(&e)) { + puts("waiting"); + } + int32_t result = event_result(&e); +} + +void my_callback(struct event *event) { + puts("Its done"); + int32_t result = event_result(event); +} + +void test5() { + static struct event e; + do_something(&e, 1, 1, "Hello"); + event_set_callback(&e, my_callback); +} + +void test6() { + on_complete(do_something(event, 1, 1, "Hello"), my_callback); +} + +static struct event e1; +static struct event e2; +static struct event *events[2] = {&e1, &e2}; +static struct event multi; + +void test7() { + init_multi_event(&multi,events, count_of(events)); + do_something(&e1, 1, 1, "Hello"); + do_something(&e2, 1, 3, "Hello"); + // something like this +} + +struct dimpl { + uint8_t type; +}; + +struct doodad { + struct dimpl *type; + uint32_t param; +}; + +struct dimpl indefinite_waiter = { + .type = 1 +}; + +extern struct dimpl INDEFINITE_WAIT; + +struct dimpl ms_waiter = { + .type = 1 +}; + +struct doodad blocking_with_timeout_ms(uint32_t ms) { + struct doodad rc = { + .type = &ms_waiter, + .param = ms + }; + return rc; +} + +struct result { + +}; + +struct result my_api_call(int arg, float x, struct doodad behavior) { + +} +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/CMakeLists.txt new file mode 100644 index 0000000000..ed0bfcb437 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(pico_test INTERFACE) + +target_include_directories(pico_test INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include) +target_link_libraries(pico_test INTERFACE pico_stdlib) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/include/pico/test.h b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/include/pico/test.h new file mode 100644 index 0000000000..07ad53d3e2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_test/include/pico/test.h @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PICO_TEST_H +#define _PICO_TEST_H + +#include "pico.h" + +/* Various macros to help with test harnesses + +Note: really need to change the returns to exit() +but not sure that is implemented yet. +*/ + +#define PICOTEST_MODULE_NAME(n,d) const char *picotest_module=n; const char *picotest_description=d; int picotest_error_code; + +#define PICOTEST_START() printf("Starting Picotest for %s\n", picotest_description); + +#define PICOTEST_START_SECTION(NAME) if (1) {const char *picotest_section_name=NAME; picotest_error_code = 0; + +#define PICOTEST_END_SECTION() if (picotest_error_code != 0) { \ + printf("Module %s: Section %s : Failed test\n", picotest_module, picotest_section_name);\ + return -1; \ + } else \ + printf("Module %s: Section %s : Passed\n", picotest_module, picotest_section_name); \ + } + +#define PICOTEST_CHECK(COND, MESSAGE) if (!(COND)) { \ + printf("Module %s: %s\n", picotest_module, MESSAGE); \ + picotest_error_code = -1; \ + } +#define PICOTEST_CHECK_CHANNEL(CHANNEL, COND, MESSAGE) if (!(COND)) { \ + printf("Module %s, channel %d: %s\n", picotest_module, CHANNEL, MESSAGE); \ + picotest_error_code = -1; \ + } + +#define PICOTEST_CHECK_AND_ABORT(COND, MESSAGE) if (!(COND)) { \ + printf("Module %s: %s\n", picotest_module, MESSAGE); \ + return -1; \ + } + +#define PICOTEST_CHECK_CHANNEL_AND_ABORT(CHANNEL, COND, MESSAGE) if (!(COND)) { \ + printf("Module %s, channel %d: %s\n", picotest_module, CHANNEL, MESSAGE); \ + return -1; \ + } + +#define PICOTEST_ABORT_IF_FAILED() if (picotest_error_code != 0) { \ + printf("Module %s: Aborting\n", picotest_module); \ + return -1; \ + } + +#define PICOTEST_END_TEST() if (picotest_error_code != 0) \ + {printf("%s: Failed\n", picotest_description); return -1;} \ + else \ + {printf("%s: Success\n", picotest_description); return 0;} + + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/CMakeLists.txt new file mode 100644 index 0000000000..d36a3da072 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/CMakeLists.txt @@ -0,0 +1,8 @@ +if (NOT PICO_TIME_NO_ALARM_SUPPORT) + add_executable(pico_time_test pico_time_test.c) + target_compile_definitions(pico_time_test PRIVATE + PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS=250 + ) + target_link_libraries(pico_time_test PRIVATE pico_test) + pico_add_extra_outputs(pico_time_test) +endif() \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/pico_time_test.c b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/pico_time_test.c new file mode 100644 index 0000000000..d9795e21a2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/test/pico_time_test/pico_time_test.c @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include "pico/stdlib.h" +#include "pico/test.h" +#include +PICOTEST_MODULE_NAME("pico_time_test", "pico_time test harness"); + +#define NUM_TIMEOUTS 500 +#define MAX_TIMERS_PER_POOL 250 +static_assert(PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS >= MAX_TIMERS_PER_POOL, ""); +#define TEST_LENGTH_US 2000000 + +#define NUM_REPEATING_TIMERS 50 +static struct repeating_timer repeating_timers[NUM_REPEATING_TIMERS]; +static uint repeating_timer_callback_count[NUM_REPEATING_TIMERS]; + +static struct timeout { + alarm_id_t alarm_id; + absolute_time_t target; + absolute_time_t fired_at; + uint pool; + uint fired_count; + bool cancelled; + bool not_cancelled; // tried to cancel but it was done +} timeouts[NUM_TIMEOUTS]; + +int64_t timer_callback1(alarm_id_t id, void *user_data) { + struct timeout *timeout = (struct timeout *)user_data; + assert(timeout >= timeouts && timeout < (timeouts + NUM_TIMEOUTS)); + timeout->fired_at = get_absolute_time(); + timeout->fired_count++; +// printf("%d %d %ld\n", timeout->pool, id, to_us_since_boot(timeout->target)); + return 0; +} + +int sort_by_target(const void *a, const void *b) { + const struct timeout *ta = (const struct timeout *)a; + const struct timeout *tb = (const struct timeout *)b; + int64_t delta = absolute_time_diff_us(tb->target, ta->target); + if (delta < 0) return -1; + else if (delta > 0) return 1; + return 0; +} + +static bool repeating_timer_callback(struct repeating_timer *t) { + // check we get the right timer structure + uint i = (uintptr_t)t->user_data; + hard_assert(i == (t - repeating_timers)); + repeating_timer_callback_count[i]++; + return true; +} + +#ifndef PICO_HARDWARE_TIMER_RESOLUTION_US +#define RESOLUTION_ALLOWANCE 0 +#else +#define RESOLUTION_ALLOWANCE PICO_HARDWARE_TIMER_RESOLUTION_US +#endif + +int main() { + setup_default_uart(); + alarm_pool_init_default(); + + PICOTEST_START(); + + struct alarm_pool *pools[NUM_TIMERS]; + for(uint i=0; i=0, "Failed to add timer"); + } + PICOTEST_CHECK(absolute_time_diff_us(time_base, get_absolute_time()) < init_ms * 1000, "This is a flaky test :-("); + + uint64_t last_fired_at[NUM_TIMERS]; + uint64_t last_target[NUM_TIMERS]; + memset(&last_fired_at, 0, sizeof(last_fired_at)); + printf("Sleeping...\n"); + sleep_us(TEST_LENGTH_US + 250000); + printf(" ...done\n"); + + qsort(timeouts, NUM_TIMEOUTS, sizeof(struct timeout), sort_by_target); + + uint64_t max_jitter = 0; + for(uint i = 0; i < NUM_TIMEOUTS; i++) { + printf("%d %d %"PRIi64" : %"PRIi64"\n", timeouts[i].pool, timeouts[i].fired_count, to_us_since_boot(timeouts[i].fired_at), to_us_since_boot(timeouts[i].target)); + PICOTEST_CHECK(timeouts[i].fired_count, "Timer should have fired"); + PICOTEST_CHECK(timeouts[i].fired_count < 2, "Timer should only have fired once"); + uint64_t fired_at = to_us_since_boot(timeouts[i].fired_at); + PICOTEST_CHECK(timeouts[i].fired_count != 1 || fired_at >= MAX(RESOLUTION_ALLOWANCE, + to_us_since_boot(timeouts[i].target)) - RESOLUTION_ALLOWANCE, "Timer fired early"); + // we need to be in order unless the targets are the same in which case order is arbitrary + PICOTEST_CHECK(timeouts[i].fired_count != 1 || fired_at > MAX(RESOLUTION_ALLOWANCE, last_fired_at[timeouts[i].pool]) - RESOLUTION_ALLOWANCE || + to_us_since_boot(timeouts[i].target) == last_target[timeouts[i].pool], "Timer fired out of order"); + last_fired_at[timeouts[i].pool] = fired_at; + last_target[timeouts[i].pool] = to_us_since_boot(timeouts[i].target); + if (timeouts[i].fired_count == 1) { + uint64_t jitter = absolute_time_diff_us(timeouts[i].target, timeouts[i].fired_at); + if (jitter > max_jitter) { + max_jitter = jitter; + } + } + } + printf("MAX JITTER: %dus\n", (uint)max_jitter); + + PICOTEST_END_SECTION(); + + PICOTEST_START_SECTION("Alarm completion or canceled"); + memset(timeouts, 0, sizeof(timeouts)); + + absolute_time_t time_base = get_absolute_time(); + // this runs concurrently with the firing, so some are in the past + uint approx_past_timeouts = 0; +// uint32_t save = save_and_disable_interrupts(); + for(uint i = 0; i < NUM_TIMEOUTS; i++) { +// printf("%d %p\n", i); + absolute_time_t target = delayed_by_us(time_base, (rand() % TEST_LENGTH_US)); + if (absolute_time_diff_us(target, get_absolute_time()) >= 0) { + approx_past_timeouts++; + } + uint pool = rand() % 4; + timeouts[i].target = target; + timeouts[i].pool = pool; + alarm_id_t id = alarm_pool_add_alarm_at(pools[pool], target, timer_callback1, timeouts + i, true); + timeouts[i].alarm_id = id; + PICOTEST_CHECK_AND_ABORT(id >=0, "Failed to add timer"); + if (id && !(rand() & 6)) { + uint j = rand() % (i + 1); + if (timeouts[j].alarm_id && !timeouts[j].cancelled && !timeouts[j].not_cancelled) { +// alarm_pool_dump(pools[pool]); +// printf("removing %d\n", timeouts[j].alarm_id); + if (alarm_pool_cancel_alarm(pools[timeouts[j].pool], timeouts[j].alarm_id)) { + timeouts[j].cancelled = true; + } else { + timeouts[j].not_cancelled = true; + } +// printf("removed %d\n", timeouts[j].alarm_id); +// alarm_pool_dump(pools[pool]); + } + } + busy_wait_us_32(2000); // we want to overlap with the firing + } + printf("approx past timeouts %d/%d\n", approx_past_timeouts, NUM_TIMEOUTS); + sleep_us(TEST_LENGTH_US - 2000 * NUM_TIMEOUTS / 4 + 250000); + for(uint i = 0; i < NUM_TIMEOUTS/4; i++) { + printf("%d %d %d/%d/%d %"PRIi64" : %"PRIi64"\n", timeouts[i].pool, (int)timeouts[i].alarm_id, timeouts[i].fired_count, timeouts[i].cancelled, + timeouts[i].not_cancelled, to_us_since_boot(timeouts[i].fired_at), to_us_since_boot(timeouts[i].target)); + uint total = timeouts[i].fired_count + timeouts[i].cancelled; + PICOTEST_CHECK( timeouts[i].not_cancelled ? timeouts[i].fired_count : true, "Timer that failed to cancel should have fired"); + PICOTEST_CHECK(total == 1, "Timer should have fired or been cancelled"); + } + + PICOTEST_END_SECTION(); + + PICOTEST_START_SECTION("Repeating timertest"); + for(uint i=0;i 1, "Each repeating timer should have been called back multiple times"); + callbacks += repeating_timer_callback_count[i]; + } + uint callbacks2 = 0; + for(uint i=0;i + +#define ELF_MAGIC 0x464c457fu + +#define EM_ARM 0x28u + +#define EF_ARM_ABI_FLOAT_HARD 0x00000400u + +#define PT_LOAD 0x00000001u + +#pragma pack(push, 1) +struct elf_header { + uint32_t magic; + uint8_t arch_class; + uint8_t endianness; + uint8_t version; + uint8_t abi; + uint8_t abi_version; + uint8_t _pad[7]; + uint16_t type; + uint16_t machine; + uint32_t version2; +}; + +struct elf32_header { + struct elf_header common; + uint32_t entry; + uint32_t ph_offset; + uint32_t sh_offset; + uint32_t flags; + uint16_t eh_size; + uint16_t ph_entry_size; + uint16_t ph_num; + uint16_t sh_entry_size; + uint16_t sh_num; + uint16_t sh_str_index; +}; + +struct elf32_ph_entry { + uint32_t type; + uint32_t offset; + uint32_t vaddr; + uint32_t paddr; + uint32_t filez; + uint32_t memsz; + uint32_t flags; + uint32_t align; +}; +#pragma pack(pop) + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/elf2uf2/main.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/elf2uf2/main.cpp new file mode 100644 index 0000000000..93fdfd2afd --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/elf2uf2/main.cpp @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include +#include "boot/uf2.h" +#include "elf.h" + +typedef unsigned int uint; + +#define ERROR_ARGS -1 +#define ERROR_FORMAT -2 +#define ERROR_INCOMPATIBLE -3 +#define ERROR_READ_FAILED -4 +#define ERROR_WRITE_FAILED -5 + +static char error_msg[512]; +static bool verbose; + +static int fail(int code, const char *format, ...) { + va_list args; + va_start(args, format); + vsnprintf(error_msg, sizeof(error_msg), format, args); + va_end(args); + return code; +} + +static int fail_read_error() { + return fail(ERROR_READ_FAILED, "Failed to read input file"); +} + +static int fail_write_error() { + return fail(ERROR_WRITE_FAILED, "Failed to write output file"); +} + +// we require 256 (as this is the page size supported by the device) +#define LOG2_PAGE_SIZE 8u +#define PAGE_SIZE (1u << LOG2_PAGE_SIZE) + +struct address_range { + enum type { + CONTENTS, // may have contents + NO_CONTENTS, // must be uninitialized + IGNORE // will be ignored + }; + address_range(uint32_t from, uint32_t to, type type) : from(from), to(to), type(type) {} + address_range() : address_range(0, 0, IGNORE) {} + type type; + uint32_t to; + uint32_t from; +}; + +typedef std::vector address_ranges; + +#define MAIN_RAM_START 0x20000000u +#define MAIN_RAM_END 0x20042000u +#define FLASH_START 0x10000000u +#define FLASH_END 0x15000000u + +const address_ranges rp2040_address_ranges_flash { + address_range(FLASH_START, FLASH_END, address_range::type::CONTENTS), + address_range(MAIN_RAM_START, MAIN_RAM_END, address_range::type::NO_CONTENTS) +}; + +const address_ranges rp2040_address_ranges_ram { + address_range(MAIN_RAM_START, MAIN_RAM_END, address_range::type::CONTENTS), + address_range(0x00000000u, 0x00002000u, address_range::type::IGNORE) // for now we ignore the bootrom if present +}; + +struct page_fragment { + page_fragment(uint32_t file_offset, uint32_t page_offset, uint32_t bytes) : file_offset(file_offset), page_offset(page_offset), bytes(bytes) {} + uint32_t file_offset; + uint32_t page_offset; + uint32_t bytes; +}; + +static int usage() { + fprintf(stderr, "Usage: elf2uf2 (-v) \n"); + return ERROR_ARGS; +} + +static int read_and_check_elf32_header(FILE *in, elf32_header& eh_out) { + if (1 != fread(&eh_out, sizeof(eh_out), 1, in)) { + return fail(ERROR_READ_FAILED, "Unable to read ELF header"); + } + if (eh_out.common.magic != ELF_MAGIC) { + return fail(ERROR_FORMAT, "Not an ELF file"); + } + if (eh_out.common.version != 1 || eh_out.common.version2 != 1) { + return fail(ERROR_FORMAT, "Unrecognized ELF version"); + } + if (eh_out.common.arch_class != 1 || eh_out.common.endianness != 1) { + return fail(ERROR_INCOMPATIBLE, "Require 32 bit little-endian ELF"); + } + if (eh_out.eh_size != sizeof(struct elf32_header)) { + return fail(ERROR_FORMAT, "Invalid ELF32 format"); + } + if (eh_out.common.machine != EM_ARM) { + return fail(ERROR_FORMAT, "Not an ARM executable"); + } + if (eh_out.common.abi != 0) { + return fail(ERROR_INCOMPATIBLE, "Unrecognized ABI"); + } + if (eh_out.flags & EF_ARM_ABI_FLOAT_HARD) { + return fail(ERROR_INCOMPATIBLE, "HARD-FLOAT not supported"); + } + return 0; +} + +int check_address_range(const address_ranges& valid_ranges, uint32_t addr, uint32_t vaddr, uint32_t size, bool uninitialized, address_range &ar) { + for(const auto& range : valid_ranges) { + if (range.from <= addr && range.to >= addr + size) { + if (range.type == address_range::type::NO_CONTENTS && !uninitialized) { + return fail(ERROR_INCOMPATIBLE, "ELF contains memory contents for uninitialized memory"); + } + ar = range; + if (verbose) { + printf("%s segment %08x->%08x (%08x->%08x)\n", uninitialized ? "Uninitialized" : "Mapped", addr, + addr + size, vaddr, vaddr+size); + } + return 0; + } + } + return fail(ERROR_INCOMPATIBLE, "Memory segment %08x->%08x is outside of valid address range for device", addr, addr+size); +} + +int read_and_check_elf32_ph_entries(FILE *in, const elf32_header &eh, const address_ranges& valid_ranges, std::map>& pages) { + if (eh.ph_entry_size != sizeof(elf32_ph_entry)) { + return fail(ERROR_FORMAT, "Invalid ELF32 program header"); + } + if (eh.ph_num) { + std::vector entries(eh.ph_num); + if (eh.ph_num != fread(&entries[0], sizeof(struct elf32_ph_entry), eh.ph_num, in)) { + return fail_read_error(); + } + for(uint i=0;i entry.filez) { + // we have some uninitialized data too + rc = check_address_range(valid_ranges, entry.paddr + entry.filez, entry.vaddr + entry.filez, entry.memsz - entry.filez, true, + ar); + if (rc) return rc; + } + } + } + } + return 0; +} + +int realize_page(FILE *in, const std::vector &fragments, uint8_t *buf, uint buf_len) { + assert(buf_len >= PAGE_SIZE); + for(auto& frag : fragments) { + assert(frag.page_offset >= 0 && frag.page_offset < PAGE_SIZE && frag.page_offset + frag.bytes <= PAGE_SIZE); + if (fseek(in, frag.file_offset, SEEK_SET)) { + return fail_read_error(); + } + if (1 != fread(buf + frag.page_offset, frag.bytes, 1, in)) { + return fail_read_error(); + } + } + return 0; +} + +static bool is_address_valid(const address_ranges& valid_ranges, uint32_t addr) { + for(const auto& range : valid_ranges) { + if (range.from <= addr && range.to > addr) { + return true; + } + } + return false; +} + +static bool is_address_mapped(const std::map>& pages, uint32_t addr) { + uint32_t page = addr & ~(PAGE_SIZE - 1); + if (!pages.count(page)) return false; + // todo check actual address within page + return true; +} + +int elf2uf2(FILE *in, FILE *out) { + elf32_header eh; + std::map> pages; + int rc = read_and_check_elf32_header(in, eh); + bool ram_style = false; + address_ranges valid_ranges = {}; + if (!rc) { + ram_style = 0x2 == eh.entry >> 28u; + if (verbose) { + if (ram_style) { + printf("Detected RAM binary\n"); + } else { + printf("Detected FLASH binary\n"); + } + } + valid_ranges = ram_style ? rp2040_address_ranges_ram : rp2040_address_ranges_flash; + rc = read_and_check_elf32_ph_entries(in, eh, valid_ranges, pages); + } + if (rc) return rc; + if (pages.empty()) { + return fail(ERROR_INCOMPATIBLE, "The input file has no memory pages"); + } + uint page_num = 0; + if (ram_style) { + uint32_t expected_ep = pages.begin()->first | 0x1; + if (eh.entry != expected_ep) { + return fail(ERROR_INCOMPATIBLE, "A RAM binary should have an entry point at the beginning: %08x (not %08x)\n", expected_ep, eh.entry); + } + static_assert(0 == (MAIN_RAM_START & (PAGE_SIZE - 1)), ""); + // currently don't require this as entry point is now at the start, we don't know where reset vector is +#if 0 + uint8_t buf[PAGE_SIZE]; + rc = realize_page(in, pages[MAIN_RAM_START], buf, sizeof(buf)); + if (rc) return rc; + uint32_t sp = ((uint32_t *)buf)[0]; + uint32_t ip = ((uint32_t *)buf)[1]; + if (!is_address_mapped(pages, ip)) { + return fail(ERROR_INCOMPATIBLE, "Vector table at %08x is invalid: reset vector %08x is not in mapped memory", + MAIN_RAM_START, ip); + } + if (!is_address_valid(valid_ranges, sp - 4)) { + return fail(ERROR_INCOMPATIBLE, "Vector table at %08x is invalid: stack pointer %08x is not in RAM", + MAIN_RAM_START, sp); + } +#endif + } + uf2_block block; + block.magic_start0 = UF2_MAGIC_START0; + block.magic_start1 = UF2_MAGIC_START1; + block.flags = UF2_FLAG_FAMILY_ID_PRESENT; + block.payload_size = PAGE_SIZE; + block.num_blocks = (uint32_t)pages.size(); + block.file_size = RP2040_FAMILY_ID; + block.magic_end = UF2_MAGIC_END; + for(auto& page_entry : pages) { + block.target_addr = page_entry.first; + block.block_no = page_num++; + if (verbose) { + printf("Page %d / %d %08x\n", block.block_no, block.num_blocks, block.target_addr); + } + memset(block.data, 0, sizeof(block.data)); + rc = realize_page(in, page_entry.second, block.data, sizeof(block.data)); + if (rc) return rc; + if (1 != fwrite(&block, sizeof(uf2_block), 1, out)) { + return fail_write_error(); + } + } + return 0; +} + +int main(int argc, char **argv) { + int arg = 1; + if (arg < argc && !strcmp(argv[arg], "-v")) { + verbose = true; + arg++; + } + if (argc < arg + 2) { + return usage(); + } + const char *in_filename = argv[arg++]; + FILE *in = fopen(in_filename, "rb"); + if (!in) { + fprintf(stderr, "Can't open input file '%s'\n", in_filename); + return ERROR_ARGS; + } + const char *out_filename = argv[arg++]; + FILE *out = fopen(out_filename, "wb"); + if (!out) { + fprintf(stderr, "Can't open output file '%s'\n", out_filename); + return ERROR_ARGS; + } + + int rc = elf2uf2(in, out); + fclose(in); + fclose(out); + if (rc) { + remove(out_filename); + if (error_msg[0]) { + fprintf(stderr, "ERROR: %s\n", error_msg); + } + } + return rc; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/extract_configs.py b/bsp/raspberry-pico/libraries/pico-sdk/tools/extract_configs.py new file mode 100644 index 0000000000..a3769204eb --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/extract_configs.py @@ -0,0 +1,201 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2021 Raspberry Pi (Trading) Ltd. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# +# Script to scan the Raspberry Pi PICO SDK tree searching for configuration items +# Outputs a tab separated file of the configuration item: +# name location description type advanced default depends enumvalues group max min +# +# Usage: +# +# ./extract_configs.py [output file] +# +# If not specified, output file will be `pico_configs.tsv` + + +import os +import sys +import re +import csv +import logging + +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO) + +scandir = sys.argv[1] +outfile = sys.argv[2] if len(sys.argv) > 2 else 'pico_configs.tsv' + +CONFIG_RE = re.compile(r'//\s+PICO_CONFIG:\s+(\w+),\s+([^,]+)(?:,\s+(.*))?$') +DEFINE_RE = re.compile(r'#define\s+(\w+)\s+(\w+)$') + +all_configs = {} +all_attrs = set() +all_descriptions = {} +all_defines = {} + + + +def ValidateAttrs(config_attrs): + _type = config_attrs.get('type', 'int') + + # Validate attrs + if _type == 'int': + assert 'enumvalues' not in config_attrs + _min = _max = _default = None + if config_attrs.get('min', None) is not None: + value = config_attrs['min'] + m = re.match(r'^(\d+)e(\d+)$', value.lower()) + if m: + _min = int(m.group(1)) * 10**int(m.group(2)) + else: + _min = int(value, 0) + if config_attrs.get('max', None) is not None: + value = config_attrs['max'] + m = re.match(r'^(\d+)e(\d+)$', value.lower()) + if m: + _max = int(m.group(1)) * 10**int(m.group(2)) + else: + _max = int(value, 0) + if config_attrs.get('default', None) is not None: + if '/' not in config_attrs['default']: + try: + value = config_attrs['default'] + m = re.match(r'^(\d+)e(\d+)$', value.lower()) + if m: + _default = int(m.group(1)) * 10**int(m.group(2)) + else: + _default = int(value, 0) + except ValueError: + pass + if _min is not None and _max is not None: + if _min > _max: + raise Exception('{} at {}:{} has min {} > max {}'.format(config_name, file_path, linenum, config_attrs['min'], config_attrs['max'])) + if _min is not None and _default is not None: + if _min > _default: + raise Exception('{} at {}:{} has min {} > default {}'.format(config_name, file_path, linenum, config_attrs['min'], config_attrs['default'])) + if _default is not None and _max is not None: + if _default > _max: + raise Exception('{} at {}:{} has default {} > max {}'.format(config_name, file_path, linenum, config_attrs['default'], config_attrs['max'])) + elif _type == 'bool': + + assert 'min' not in config_attrs + assert 'max' not in config_attrs + assert 'enumvalues' not in config_attrs + + _default = config_attrs.get('default', None) + if _default is not None: + if '/' not in _default: + if (_default.lower() != '0') and (config_attrs['default'].lower() != '1') and ( _default not in all_configs): + logger.info('{} at {}:{} has non-integer default value "{}"'.format(config_name, file_path, linenum, config_attrs['default'])) + + elif _type == 'enum': + + assert 'min' not in config_attrs + assert 'max' not in config_attrs + assert 'enumvalues' in config_attrs + + _enumvalues = tuple(config_attrs['enumvalues'].split('|')) + _default = None + if config_attrs.get('default', None) is not None: + _default = config_attrs['default'] + if _default is not None: + if _default not in _enumvalues: + raise Exception('{} at {}:{} has default value {} which isn\'t in list of enumvalues {}'.format(config_name, file_path, linenum, config_attrs['default'], config_attrs['enumvalues'])) + else: + raise Exception("Found unknown PICO_CONFIG type {} at {}:{}".format(_type, file_path, linenum)) + + + + +# Scan all .c and .h files in the specific path, recursively. + +for dirpath, dirnames, filenames in os.walk(scandir): + for filename in filenames: + file_ext = os.path.splitext(filename)[1] + if file_ext in ('.c', '.h'): + file_path = os.path.join(dirpath, filename) + + with open(file_path, encoding="ISO-8859-1") as fh: + linenum = 0 + for line in fh.readlines(): + linenum += 1 + line = line.strip() + m = CONFIG_RE.match(line) + if m: + config_name = m.group(1) + config_description = m.group(2) + _attrs = m.group(3) + # allow commas to appear inside brackets by converting them to and from NULL chars + _attrs = re.sub(r'(\(.+\))', lambda m: m.group(1).replace(',', '\0'), _attrs) + + if '=' in config_description: + raise Exception("For {} at {}:{} the description was set to '{}' - has the description field been omitted?".format(config_name, file_path, linenum, config_description)) + if config_description in all_descriptions: + raise Exception("Found description {} at {}:{} but it was already used at {}:{}".format(config_description, file_path, linenum, os.path.join(scandir, all_descriptions[config_description]['filename']), all_descriptions[config_description]['line_number'])) + else: + all_descriptions[config_description] = {'config_name': config_name, 'filename': os.path.relpath(file_path, scandir), 'line_number': linenum} + + config_attrs = {} + prev = None + # Handle case where attr value contains a comma + for item in _attrs.split(','): + if "=" not in item: + assert(prev) + item = prev + "," + item + try: + k, v = (i.strip() for i in item.split('=')) + except ValueError: + raise Exception('{} at {}:{} has malformed value {}'.format(config_name, file_path, linenum, item)) + config_attrs[k] = v.replace('\0', ',') if v != 'undefined' else None + all_attrs.add(k) + prev = item + #print(file_path, config_name, config_attrs) + + if 'group' not in config_attrs: + raise Exception('{} at {}:{} has no group attribute'.format(config_name, file_path, linenum)) + + #print(file_path, config_name, config_attrs) + if config_name in all_configs: + raise Exception("Found {} at {}:{} but it was already declared at {}:{}".format(config_name, file_path, linenum, os.path.join(scandir, all_configs[config_name]['filename']), all_configs[config_name]['line_number'])) + else: + all_configs[config_name] = {'attrs': config_attrs, 'filename': os.path.relpath(file_path, scandir), 'line_number': linenum, 'description': config_description} + else: + m = DEFINE_RE.match(line) + if m: + name = m.group(1) + value = m.group(2) + # discard any 'u' qualifier + m = re.match(r'^((0x)?\d+)u$', value.lower()) + if m: + value = m.group(1) + if name not in all_defines: + all_defines[name] = dict() + if value not in all_defines[name]: + all_defines[name][value] = set() + all_defines[name][value] = (file_path, linenum) + +# Check for defines with missing PICO_CONFIG entries +for d in all_defines: + if d not in all_configs and d.startswith("PICO_"): + logger.warning("Potential unmarked PICO define {}".format(d)) + +for config_name in all_configs: + + ValidateAttrs(all_configs[config_name]['attrs']) + + if 'default' in all_configs[config_name]['attrs'] and config_name in all_defines: + if all_configs[config_name]['attrs']['default'] not in all_defines[config_name] and (all_configs[config_name]['attrs'].get('type', 'int') != 'bool'): + if config_name in ['USB_DPRAM_MAX'] or '/' in all_configs[config_name]['attrs']['default']: + continue + raise Exception('Found {} at {}:{} with a default of {}, but #define says {}'.format(config_name, all_configs[config_name]['filename'], all_configs[config_name]['line_number'], all_configs[config_name]['attrs']['default'], all_defines[config_name])) + +with open(outfile, 'w', newline='') as csvfile: + fieldnames = ('name', 'location', 'description', 'type') + tuple(sorted(all_attrs - set(['type']))) + writer = csv.DictWriter(csvfile, fieldnames=fieldnames, extrasaction='ignore', dialect='excel-tab') + + writer.writeheader() + for config_name in sorted(all_configs): + writer.writerow({'name': config_name, 'location': '{}:{}'.format(all_configs[config_name]['filename'], all_configs[config_name]['line_number']), 'description': all_configs[config_name]['description'], **all_configs[config_name]['attrs']}) diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/CMakeLists.txt b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/CMakeLists.txt new file mode 100644 index 0000000000..3e6122db5b --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.4) +project(pioasm CXX) + +set(CMAKE_CXX_STANDARD 11) + +if (PIOASM_GENERATE_PARSER) + find_package(BISON 3.4.2) + find_package(FLEX 2.5.13) # no idea about the version + + FLEX_TARGET(pioasm_lexer lexer.ll ${CMAKE_CURRENT_SOURCE_DIR}/gen/lexer.cpp) + BISON_TARGET(pioasm_parser parser.yy ${CMAKE_CURRENT_SOURCE_DIR}/gen/parser.cpp COMPILE_FLAGS "-Wcounterexamples") + ADD_FLEX_BISON_DEPENDENCY(pioasm_lexer pioasm_parser) +endif() + +add_executable(pioasm + main.cpp + pio_assembler.cpp + pio_disassembler.cpp + gen/lexer.cpp + gen/parser.cpp +) + +target_sources(pioasm PRIVATE c_sdk_output.cpp) +target_sources(pioasm PRIVATE python_output.cpp) +target_sources(pioasm PRIVATE hex_output.cpp) +target_sources(pioasm PRIVATE ${PIOASM_EXTRA_SOURCE_FILES}) + +if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND + (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "7") AND + (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9") AND + (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm.*$")) + # disable GCC ARM info notice about ABI change + target_compile_options(pioasm PRIVATE -Wno-psabi) +endif() + +target_include_directories(pioasm PRIVATE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/gen) + +if (MSVC) + target_compile_definitions(pioasm PRIVATE YY_NO_UNISTD_H) + target_compile_options(pioasm PRIVATE "/std:c++latest") +endif() + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/c_sdk_output.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/c_sdk_output.cpp new file mode 100644 index 0000000000..6c9131aced --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/c_sdk_output.cpp @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "output_format.h" +#include "pio_disassembler.h" + +struct c_sdk_output : public output_format { + struct factory { + factory() { + output_format::add(new c_sdk_output()); + } + }; + + c_sdk_output() : output_format("c-sdk") {} + + std::string get_description() override { + return "C header suitable for use with the Pico SDK"; + } + + void output_symbols(FILE *out, std::string prefix, const std::vector &symbols) { + int count = 0; + for (const auto &s : symbols) { + if (!s.is_label) { + fprintf(out, "#define %s%s %d\n", prefix.c_str(), s.name.c_str(), s.value); + count++; + } + } + if (count) { + fprintf(out, "\n"); + count = 0; + } + for (const auto &s : symbols) { + if (s.is_label) { + fprintf(out, "#define %soffset_%s %du\n", prefix.c_str(), s.name.c_str(), s.value); + count++; + } + } + if (count) { + fprintf(out, "\n"); + } + } + + void header(FILE *out, std::string msg) { + std::string dashes = std::string(msg.length(), '-'); + fprintf(out, "// %s //\n", dashes.c_str()); + fprintf(out, "// %s //\n", msg.c_str()); + fprintf(out, "// %s //\n", dashes.c_str()); + fprintf(out, "\n"); + } + + int output(std::string destination, std::vector output_options, + const compiled_source &source) override { + + for (const auto &program : source.programs) { + for(const auto &p : program.lang_opts) { + if (p.first.size() >= name.size() && p.first.compare(0, name.size(), name) == 0) { + std::cerr << "warning: " << name << " does not support output options; " << p.first << " lang_opt ignored.\n"; + } + } + } + FILE *out = open_single_output(destination); + if (!out) return 1; + + header(out, "This file is autogenerated by pioasm; do not edit!"); + + fprintf(out, "#if !PICO_NO_HARDWARE\n"); + fprintf(out, "#include \"hardware/pio.h\"\n"); + fprintf(out, "#endif\n"); + fprintf(out, "\n"); + + output_symbols(out, "", source.global_symbols); + + for (const auto &program : source.programs) { + header(out, program.name); + + std::string prefix = program.name + "_"; + + fprintf(out, "#define %swrap_target %d\n", prefix.c_str(), program.wrap_target); + fprintf(out, "#define %swrap %d\n", prefix.c_str(), program.wrap); + fprintf(out, "\n"); + + output_symbols(out, prefix, program.symbols); + + fprintf(out, "static const uint16_t %sprogram_instructions[] = {\n", prefix.c_str()); + for (int i = 0; i < (int)program.instructions.size(); i++) { + const auto &inst = program.instructions[i]; + if (i == program.wrap_target) { + fprintf(out, " // .wrap_target\n"); + } + fprintf(out, " 0x%04x, // %2d: %s\n", inst, i, + disassemble(inst, program.sideset_bits_including_opt.get(), program.sideset_opt).c_str()); + if (i == program.wrap) { + fprintf(out, " // .wrap\n"); + } + } + fprintf(out, "};\n"); + fprintf(out, "\n"); + + fprintf(out, "#if !PICO_NO_HARDWARE\n"); + fprintf(out, "static const struct pio_program %sprogram = {\n", prefix.c_str()); + fprintf(out, " .instructions = %sprogram_instructions,\n", prefix.c_str()); + fprintf(out, " .length = %d,\n", (int) program.instructions.size()); + fprintf(out, " .origin = %d,\n", program.origin.get()); + fprintf(out, "};\n"); + fprintf(out, "\n"); + fprintf(out, "static inline pio_sm_config %sprogram_get_default_config(uint offset) {\n", prefix.c_str()); + fprintf(out, " pio_sm_config c = pio_get_default_sm_config();\n"); + fprintf(out, " sm_config_set_wrap(&c, offset + %swrap_target, offset + %swrap);\n", prefix.c_str(), + prefix.c_str()); + if (program.sideset_bits_including_opt.is_specified()) { + fprintf(out, " sm_config_set_sideset(&c, %d, %s, %s);\n", program.sideset_bits_including_opt.get(), + program.sideset_opt ? "true" : "false", + program.sideset_pindirs ? "true" : "false"); + } + fprintf(out, " return c;\n"); + fprintf(out, "}\n"); + + // todo maybe have some code blocks inside or outside here? + for(const auto& o : program.code_blocks) { + fprintf(out, "\n"); + if (o.first == name) { + for(const auto &contents : o.second) { + fprintf(out, "%s", contents.c_str()); + fprintf(out, "\n"); + } + } + } + + fprintf(out, "#endif\n"); + fprintf(out, "\n"); + } + if (out != stdout) { fclose(out); } + return 0; + } +}; + +static c_sdk_output::factory creator; diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/lexer.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/lexer.cpp new file mode 100644 index 0000000000..5de6626fd6 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/lexer.cpp @@ -0,0 +1,2697 @@ + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +/* %not-for-header */ +/* %if-c-only */ +/* %if-not-reentrant */ + +/* %endif */ +/* %endif */ +/* %ok-for-header */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* %if-c++-only */ +/* %endif */ + +/* %if-c-only */ + +/* %endif */ + +/* %if-c-only */ + +/* %endif */ + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +/* %if-c-only */ + +#include +#include +#include +#include +/* %endif */ + +/* %if-tables-serialization */ +/* %endif */ +/* end standard C headers. */ + +/* begin standard C++ headers. */ +/* %if-c++-only */ +/* %endif */ + +/* %if-c-or-c++ */ +/* flex integer type definitions */ + +#ifndef YYFLEX_INTTYPES_DEFINED +#define YYFLEX_INTTYPES_DEFINED + +/* Prefer C99 integer types if available. */ +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +/* Include and not because Solaris 2.6 has the former + * and not the latter. + */ +#include +# define YYFLEX_USE_STDINT +# else +# if defined(_MSC_VER) && _MSC_VER >= 1600 +/* Visual C++ 2010 does not define __STDC_VERSION__ and has but not + * . + */ +#include +# define YYFLEX_USE_STDINT +# endif +# endif +# ifdef YYFLEX_USE_STDINT +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +# else +typedef unsigned char flex_uint8_t; +typedef short int flex_int16_t; +typedef unsigned short int flex_uint16_t; +# ifdef __STDC__ +typedef signed char flex_int8_t; +/* ISO C only requires at least 16 bits for int. */ +#include +# if UINT_MAX >= 4294967295 +# define YYFLEX_INT32_DEFINED +typedef int flex_int32_t; +typedef unsigned int flex_uint32_t; +# endif +# else +typedef char flex_int8_t; +# endif +# ifndef YYFLEX_INT32_DEFINED +typedef long int flex_int32_t; +typedef unsigned long int flex_uint32_t; +# endif +# endif +#endif /* YYFLEX_INTTYPES_DEFINED */ + +/* %endif */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* %not-for-header */ +/* Returned upon end-of-file. */ +#define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +/* %if-not-reentrant */ +extern int yyleng; +/* %endif */ + +/* %if-c-only */ +/* %if-not-reentrant */ +extern FILE *yyin, *yyout; +/* %endif */ +/* %endif */ + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { +/* %if-c-only */ + FILE *yy_input_file; +/* %endif */ + +/* %if-c++-only */ +/* %endif */ + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +/* %if-not-reentrant */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* %if-c-only Standard (non-C++) definition */ + +/* %if-not-reentrant */ +/* %not-for-header */ +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; +/* %ok-for-header */ + +/* %endif */ + +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); + +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); + +/* %endif */ + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ +/* Begin user sect3 */ + +#define yywrap() (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP + +#define FLEX_DEBUG +typedef flex_uint8_t YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + +typedef int yy_state_type; + +extern int yylineno; +int yylineno = 1; + +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext + +/* %% [1.5] DFA */ + +/* %if-c-only Standard (non-C++) definition */ + +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); + +/* %endif */ + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ + (yy_c_buf_p) = yy_cp; +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ +#define YY_NUM_RULES 95 +#define YY_END_OF_BUFFER 96 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[263] = + { 0, + 0, 0, 7, 7, 11, 11, 0, 0, 96, 94, + 1, 2, 40, 94, 37, 28, 29, 34, 30, 23, + 33, 94, 35, 89, 89, 25, 93, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 73, 74, 92, 26, 27, 38, 36, 41, 94, + 7, 4, 5, 7, 11, 8, 12, 10, 19, 14, + 20, 21, 16, 16, 15, 1, 2, 39, 0, 0, + 31, 50, 50, 50, 50, 50, 50, 50, 22, 93, + 89, 0, 0, 24, 93, 92, 92, 92, 92, 92, + 92, 53, 92, 92, 92, 92, 92, 92, 92, 92, + + 92, 92, 75, 92, 92, 92, 92, 92, 92, 92, + 92, 0, 7, 4, 5, 6, 11, 8, 12, 9, + 19, 14, 20, 0, 13, 16, 19, 19, 0, 3, + 0, 50, 50, 50, 50, 50, 50, 50, 50, 91, + 90, 92, 92, 92, 92, 92, 92, 58, 77, 51, + 57, 92, 60, 92, 92, 87, 63, 78, 54, 67, + 92, 92, 92, 84, 59, 92, 92, 92, 92, 0, + 18, 17, 50, 50, 50, 50, 50, 50, 50, 92, + 92, 76, 68, 92, 92, 92, 92, 71, 92, 69, + 92, 70, 92, 56, 55, 64, 92, 52, 88, 0, + + 50, 50, 50, 50, 50, 45, 44, 80, 85, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, + 50, 50, 50, 50, 50, 50, 92, 82, 92, 86, + 92, 92, 61, 92, 92, 79, 32, 46, 50, 48, + 50, 50, 50, 83, 81, 92, 72, 65, 92, 50, + 42, 50, 50, 62, 66, 49, 47, 50, 50, 50, + 43, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 1, 6, 7, 1, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 18, 18, 18, 18, 18, 18, 18, 19, 20, 1, + 21, 1, 1, 1, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 1, 49, 50, 51, 1, 52, 53, 54, 55, + + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 82, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 83, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 84, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[85] = + { 0, + 1, 2, 3, 1, 2, 4, 1, 1, 1, 5, + 1, 1, 1, 1, 1, 6, 6, 6, 1, 1, + 2, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, + 8, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, + 1, 1, 1, 1 + } ; + +static const flex_int16_t yy_base[276] = + { 0, + 0, 0, 83, 85, 90, 92, 94, 101, 516, 605, + 513, 511, 492, 510, 605, 605, 605, 605, 605, 605, + 498, 88, 99, 118, 113, 490, 0, 0, 57, 74, + 63, 79, 113, 92, 91, 103, 107, 143, 124, 135, + 137, 0, 0, 134, 605, 605, 605, 605, 605, 420, + 0, 499, 497, 419, 0, 496, 494, 481, 0, 493, + 491, 488, 182, 170, 605, 399, 364, 605, 103, 131, + 605, 0, 138, 144, 145, 153, 171, 168, 605, 0, + 194, 200, 0, 605, 0, 0, 166, 182, 187, 188, + 193, 0, 183, 184, 187, 182, 203, 195, 203, 189, + + 194, 195, 0, 204, 238, 209, 203, 220, 224, 222, + 223, 283, 0, 363, 361, 0, 0, 360, 355, 605, + 0, 355, 353, 308, 285, 263, 248, 293, 265, 266, + 281, 0, 246, 249, 263, 258, 270, 257, 275, 269, + 0, 274, 277, 276, 266, 270, 263, 0, 0, 0, + 0, 273, 0, 285, 279, 0, 291, 296, 0, 313, + 298, 300, 310, 0, 0, 314, 300, 313, 319, 205, + 271, 370, 330, 344, 345, 346, 349, 351, 340, 346, + 340, 0, 0, 343, 348, 346, 359, 0, 355, 0, + 368, 0, 369, 0, 0, 380, 358, 0, 0, 159, + + 378, 117, 384, 376, 72, 0, 50, 0, 0, 375, + 384, 394, 391, 398, 395, 411, 410, 397, 398, 15, + 413, 404, 406, 420, 409, 410, 406, 0, 421, 0, + 432, 415, 0, 415, 431, 0, 605, 0, 421, 0, + 425, 434, 439, 0, 0, 440, 0, 0, 433, 434, + 0, 435, 438, 0, 0, 0, 0, 450, 454, 451, + 0, 605, 522, 530, 538, 546, 548, 556, 559, 567, + 575, 583, 591, 594, 597 + } ; + +static const flex_int16_t yy_def[276] = + { 0, + 262, 1, 263, 263, 264, 264, 265, 265, 262, 262, + 262, 262, 262, 266, 262, 262, 262, 262, 262, 262, + 262, 267, 262, 262, 262, 262, 268, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 262, 262, 262, 262, 262, 262, + 270, 270, 262, 270, 271, 271, 262, 262, 272, 262, + 262, 273, 272, 272, 262, 262, 262, 262, 266, 266, + 262, 274, 274, 274, 274, 274, 274, 274, 262, 268, + 262, 262, 275, 262, 268, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, + + 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, + 269, 262, 270, 270, 262, 270, 271, 271, 262, 262, + 272, 262, 262, 273, 273, 272, 272, 272, 266, 266, + 266, 274, 274, 274, 274, 274, 274, 274, 274, 262, + 275, 269, 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 262, + 272, 272, 274, 274, 274, 274, 274, 274, 274, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 262, + + 274, 274, 274, 274, 274, 274, 274, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 269, 269, 269, 262, + 274, 274, 274, 274, 274, 274, 269, 269, 269, 269, + 269, 269, 269, 269, 269, 269, 262, 274, 274, 274, + 274, 274, 274, 269, 269, 269, 269, 269, 269, 274, + 274, 274, 274, 269, 269, 274, 274, 274, 274, 274, + 274, 0, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262 + } ; + +static const flex_int16_t yy_nxt[690] = + { 0, + 10, 11, 12, 13, 10, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 25, 26, 27, + 10, 28, 29, 30, 28, 31, 28, 32, 28, 33, + 34, 28, 28, 35, 36, 37, 38, 28, 39, 40, + 28, 28, 28, 41, 42, 43, 44, 45, 46, 47, + 28, 28, 29, 30, 28, 31, 28, 32, 28, 33, + 34, 28, 28, 35, 36, 37, 38, 28, 39, 40, + 28, 28, 28, 41, 42, 43, 44, 10, 48, 10, + 49, 10, 10, 50, 52, 53, 52, 53, 54, 87, + 54, 56, 57, 56, 57, 60, 61, 237, 62, 58, + + 226, 58, 60, 61, 129, 62, 88, 89, 79, 63, + 64, 64, 73, 80, 65, 90, 63, 64, 64, 87, + 74, 65, 225, 75, 76, 95, 96, 77, 81, 81, + 81, 78, 131, 81, 81, 81, 88, 89, 97, 91, + 82, 99, 73, 100, 98, 90, 101, 92, 102, 106, + 74, 93, 94, 75, 76, 95, 96, 77, 110, 111, + 107, 78, 83, 133, 108, 134, 103, 222, 97, 91, + 82, 99, 104, 100, 98, 109, 101, 92, 102, 106, + 130, 93, 94, 135, 105, 126, 126, 126, 110, 111, + 107, 136, 83, 133, 108, 134, 103, 126, 126, 126, + + 137, 142, 104, 138, 127, 109, 139, 143, 130, 81, + 81, 81, 144, 135, 105, 140, 140, 145, 146, 147, + 148, 136, 149, 150, 151, 152, 128, 155, 156, 157, + 137, 142, 158, 138, 127, 159, 139, 143, 160, 153, + 220, 164, 144, 165, 166, 167, 154, 145, 146, 147, + 148, 168, 149, 150, 151, 152, 128, 155, 156, 157, + 161, 169, 158, 171, 171, 159, 129, 129, 160, 153, + 162, 164, 173, 165, 166, 167, 154, 163, 126, 126, + 126, 168, 131, 174, 140, 140, 171, 171, 200, 125, + 161, 169, 175, 176, 177, 178, 179, 180, 181, 182, + + 162, 183, 173, 184, 185, 186, 187, 163, 172, 172, + 172, 188, 125, 174, 172, 172, 172, 172, 172, 172, + 189, 190, 175, 176, 177, 178, 179, 180, 181, 182, + 193, 183, 194, 184, 185, 186, 187, 191, 195, 196, + 197, 188, 130, 130, 172, 172, 172, 172, 172, 172, + 189, 190, 192, 198, 199, 123, 122, 119, 130, 201, + 193, 118, 194, 115, 114, 170, 67, 191, 195, 196, + 197, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 192, 198, 199, 172, 172, 172, 213, 201, + 214, 172, 172, 172, 172, 172, 172, 215, 216, 219, + + 66, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 221, 223, 224, 227, 228, 229, 213, 217, + 214, 172, 172, 172, 172, 172, 172, 215, 216, 219, + 218, 230, 231, 232, 233, 234, 235, 236, 238, 239, + 240, 241, 221, 223, 224, 227, 228, 229, 242, 217, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 230, 231, 232, 233, 234, 235, 236, 238, 239, + 240, 241, 254, 255, 256, 257, 258, 259, 242, 260, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 261, 125, 123, 122, 120, 119, 118, 116, 115, + + 114, 112, 254, 255, 256, 257, 258, 259, 84, 260, + 71, 70, 68, 67, 66, 262, 262, 262, 262, 262, + 262, 261, 51, 51, 51, 51, 51, 51, 51, 51, + 55, 55, 55, 55, 55, 55, 55, 55, 59, 59, + 59, 59, 59, 59, 59, 59, 69, 69, 262, 262, + 69, 69, 69, 69, 72, 72, 85, 85, 262, 85, + 85, 85, 85, 85, 86, 86, 86, 113, 113, 262, + 113, 113, 113, 113, 113, 117, 117, 262, 117, 262, + 117, 117, 117, 121, 262, 262, 121, 121, 121, 121, + 121, 124, 124, 262, 124, 124, 124, 124, 124, 132, + + 132, 132, 141, 141, 9, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262 + } ; + +static const flex_int16_t yy_chk[690] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 3, 4, 4, 3, 29, + 4, 5, 5, 6, 6, 7, 7, 220, 7, 5, + + 207, 6, 8, 8, 69, 8, 30, 31, 23, 7, + 7, 7, 22, 23, 7, 32, 8, 8, 8, 29, + 22, 8, 205, 22, 22, 34, 35, 22, 25, 25, + 25, 22, 70, 24, 24, 24, 30, 31, 36, 33, + 24, 37, 22, 37, 36, 32, 37, 33, 37, 39, + 22, 33, 33, 22, 22, 34, 35, 22, 41, 44, + 40, 22, 24, 73, 40, 74, 38, 202, 36, 33, + 24, 37, 38, 37, 36, 40, 37, 33, 37, 39, + 69, 33, 33, 75, 38, 64, 64, 64, 41, 44, + 40, 76, 24, 73, 40, 74, 38, 63, 63, 63, + + 77, 87, 38, 78, 63, 40, 78, 88, 70, 81, + 81, 81, 89, 75, 38, 82, 82, 90, 91, 91, + 93, 76, 94, 95, 96, 97, 63, 98, 99, 100, + 77, 87, 101, 78, 63, 102, 78, 88, 104, 97, + 200, 106, 89, 107, 108, 109, 97, 90, 91, 91, + 93, 110, 94, 95, 96, 97, 63, 98, 99, 100, + 105, 111, 101, 127, 127, 102, 129, 130, 104, 97, + 105, 106, 133, 107, 108, 109, 97, 105, 126, 126, + 126, 110, 131, 134, 140, 140, 171, 171, 170, 125, + 105, 111, 135, 136, 137, 138, 139, 142, 143, 144, + + 105, 145, 133, 146, 147, 152, 154, 105, 128, 128, + 128, 155, 124, 134, 128, 128, 128, 128, 128, 128, + 157, 158, 135, 136, 137, 138, 139, 142, 143, 144, + 161, 145, 162, 146, 147, 152, 154, 160, 163, 166, + 167, 155, 129, 130, 128, 128, 128, 128, 128, 128, + 157, 158, 160, 168, 169, 123, 122, 119, 131, 173, + 161, 118, 162, 115, 114, 112, 67, 160, 163, 166, + 167, 174, 175, 176, 177, 178, 179, 180, 181, 184, + 185, 186, 160, 168, 169, 172, 172, 172, 187, 173, + 189, 172, 172, 172, 172, 172, 172, 191, 193, 197, + + 66, 174, 175, 176, 177, 178, 179, 180, 181, 184, + 185, 186, 201, 203, 204, 210, 211, 212, 187, 196, + 189, 172, 172, 172, 172, 172, 172, 191, 193, 197, + 196, 213, 214, 215, 216, 217, 218, 219, 221, 222, + 223, 224, 201, 203, 204, 210, 211, 212, 225, 196, + 226, 227, 229, 231, 232, 234, 235, 239, 241, 242, + 243, 213, 214, 215, 216, 217, 218, 219, 221, 222, + 223, 224, 246, 249, 250, 252, 253, 258, 225, 259, + 226, 227, 229, 231, 232, 234, 235, 239, 241, 242, + 243, 260, 62, 61, 60, 58, 57, 56, 54, 53, + + 52, 50, 246, 249, 250, 252, 253, 258, 26, 259, + 21, 14, 13, 12, 11, 9, 0, 0, 0, 0, + 0, 260, 263, 263, 263, 263, 263, 263, 263, 263, + 264, 264, 264, 264, 264, 264, 264, 264, 265, 265, + 265, 265, 265, 265, 265, 265, 266, 266, 0, 0, + 266, 266, 266, 266, 267, 267, 268, 268, 0, 268, + 268, 268, 268, 268, 269, 269, 269, 270, 270, 0, + 270, 270, 270, 270, 270, 271, 271, 0, 271, 0, + 271, 271, 271, 272, 0, 0, 272, 272, 272, 272, + 272, 273, 273, 0, 273, 273, 273, 273, 273, 274, + + 274, 274, 275, 275, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + 262, 262, 262, 262, 262, 262, 262, 262, 262 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 1; + +static const flex_int16_t yy_rule_linenum[95] = + { 0, + 65, 66, 68, 79, 80, 81, 82, 86, 87, 88, + 89, 90, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 147, 149, 150, 151, 152, 153, 154, 155, 156, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 169, + 170, 171, 172, 173, 175, 176, 178, 179, 183, 184, + 185, 187, 189, 191 + + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "lexer.ll" +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#line 8 "lexer.ll" +# include +# include +# include +# include +# include +# include "pio_assembler.h" +# include "parser.hpp" + +#ifdef _MSC_VER +#pragma warning(disable : 4996) // fopen +#endif + +#define YY_NO_INPUT 1 + yy::parser::symbol_type make_INT(const std::string &s, const yy::parser::location_type& loc); + yy::parser::symbol_type make_HEX(const std::string &s, const yy::parser::location_type& loc); + yy::parser::symbol_type make_BINARY(const std::string &s, const yy::parser::location_type& loc); + // Code run each time a pattern is matched. + # define YY_USER_ACTION loc.columns (yyleng); + +#define INITIAL 0 +#define code_block 1 +#define c_comment 2 +#define lang_opt 3 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +/* %if-c-only */ +#include +/* %endif */ +/* %if-c++-only */ +/* %endif */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ + +static int yy_init_globals ( void ); + +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif End reentrant structures and macros. */ + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( void ); + +int yyget_debug ( void ); + +void yyset_debug ( int debug_flag ); + +YY_EXTRA_TYPE yyget_extra ( void ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in ( void ); + +void yyset_in ( FILE * _in_str ); + +FILE *yyget_out ( void ); + +void yyset_out ( FILE * _out_str ); + + int yyget_leng ( void ); + +char *yyget_text ( void ); + +int yyget_lineno ( void ); + +void yyset_lineno ( int _line_number ); + +/* %if-bison-bridge */ +/* %endif */ + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap ( void ); +#else +extern int yywrap ( void ); +#endif +#endif + +/* %not-for-header */ +#ifndef YY_NO_UNPUT + +#endif +/* %ok-for-header */ + +/* %endif */ + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ +#ifdef __cplusplus +static int yyinput ( void ); +#else +static int input ( void ); +#endif +/* %ok-for-header */ + +/* %endif */ +#endif + +/* %if-c-only */ + +/* %endif */ + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +/* %endif */ +/* %if-c++-only C++ definition */ +/* %endif */ +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ +/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ +/* %if-c++-only C++ definition \ */\ +/* %endif */ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +/* %if-c-only */ +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +#endif + +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %not-for-header */ +/* %tables-yydmap generated elements */ +/* %endif */ +/* end tables serialization structures and prototypes */ + +/* %ok-for-header */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ + +extern int yylex (void); + +#define YY_DECL int yylex (void) +/* %endif */ +/* %if-c++-only C++ definition */ +/* %endif */ +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +/* %% [6.0] YY_RULE_SETUP definition goes here */ +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/* %not-for-header */ +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) +/* %if-c-only */ + yyin = stdin; +/* %endif */ +/* %if-c++-only */ +/* %endif */ + + if ( ! yyout ) +/* %if-c-only */ + yyout = stdout; +/* %endif */ +/* %if-c++-only */ +/* %endif */ + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +/* %% [7.0] user's declarations go here */ + + std::string code_block_contents; + yy::location code_block_start; + + // A handy shortcut to the location held by the pio_assembler. + yy::location& loc = pioasm.location; + // Code run each time yylex is called. + loc.step(); + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { +/* %% [8.0] yymore()-related code goes here */ + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + +/* %% [9.0] code to set up and find next match goes here */ + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 263 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 262 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: +/* %% [10.0] code to find the action number goes here */ + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +/* %% [11.0] code for yylineno update goes here */ + +do_action: /* This label is used only to access EOF actions. */ + +/* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) + { + if ( yy_act == 0 ) + fprintf( stderr, "--scanner backing up\n" ); + else if ( yy_act < 95 ) + fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", + (long)yy_rule_linenum[yy_act], yytext ); + else if ( yy_act == 95 ) + fprintf( stderr, "--accepting default rule (\"%s\")\n", + yytext ); + else if ( yy_act == 96 ) + fprintf( stderr, "--(end of buffer or a NUL)\n" ); + else + fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); + } + + switch ( yy_act ) + { /* beginning of action switch */ +/* %% [13.0] actions go here */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +loc.step(); + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +{ auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); return yy::parser::make_NEWLINE(loc_newline); } + YY_BREAK +case 3: +YY_RULE_SETUP +{ + BEGIN(code_block); + code_block_contents = ""; + code_block_start = loc; + std::string tmp(yytext); + tmp = tmp.substr(1, tmp.length() - 2); + tmp = tmp.erase(0, tmp.find_first_not_of(" \t")); + tmp = tmp.erase(tmp.find_last_not_of(" \t") + 1); + return yy::parser::make_CODE_BLOCK_START( tmp, loc); + } + YY_BREAK + +case 4: +YY_RULE_SETUP +loc.step(); + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +{ auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); } + YY_BREAK +case 6: +YY_RULE_SETUP +{ BEGIN(INITIAL); auto loc2 = loc; loc2.begin = code_block_start.begin; return yy::parser::make_CODE_BLOCK_CONTENTS(code_block_contents, loc2); } + YY_BREAK +case 7: +YY_RULE_SETUP +{ code_block_contents += std::string(yytext) + "\n"; } + YY_BREAK + +case 8: +YY_RULE_SETUP +loc.step(); + YY_BREAK +case 9: +YY_RULE_SETUP +{ BEGIN(INITIAL); } + YY_BREAK +case 10: +YY_RULE_SETUP +{ } + YY_BREAK +case 11: +YY_RULE_SETUP +{ } + YY_BREAK +case 12: +/* rule 12 can match eol */ +YY_RULE_SETUP +{ auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); } + YY_BREAK + +case 13: +YY_RULE_SETUP +return yy::parser::make_STRING(yytext, loc); + YY_BREAK +case 14: +YY_RULE_SETUP +loc.step(); + YY_BREAK +case 15: +YY_RULE_SETUP +return yy::parser::make_EQUAL(loc); + YY_BREAK +case 16: +YY_RULE_SETUP +return make_INT(yytext, loc); + YY_BREAK +case 17: +YY_RULE_SETUP +return make_HEX(yytext, loc); + YY_BREAK +case 18: +YY_RULE_SETUP +return make_BINARY(yytext, loc); + YY_BREAK +case 19: +YY_RULE_SETUP +return yy::parser::make_NON_WS(yytext, loc); + YY_BREAK +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP +{ BEGIN(INITIAL); auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); return yy::parser::make_NEWLINE(loc_newline); } + YY_BREAK +case 21: +YY_RULE_SETUP +{ throw yy::parser::syntax_error(loc, "invalid character: " + std::string(yytext)); } + YY_BREAK + +case 22: +YY_RULE_SETUP +{ BEGIN(c_comment); } + YY_BREAK +case 23: +YY_RULE_SETUP +return yy::parser::make_COMMA(loc); + YY_BREAK +case 24: +YY_RULE_SETUP +return yy::parser::make_REVERSE(loc); + YY_BREAK +case 25: +YY_RULE_SETUP +return yy::parser::make_COLON(loc); + YY_BREAK +case 26: +YY_RULE_SETUP +return yy::parser::make_LBRACKET(loc); + YY_BREAK +case 27: +YY_RULE_SETUP +return yy::parser::make_RBRACKET(loc); + YY_BREAK +case 28: +YY_RULE_SETUP +return yy::parser::make_LPAREN(loc); + YY_BREAK +case 29: +YY_RULE_SETUP +return yy::parser::make_RPAREN(loc); + YY_BREAK +case 30: +YY_RULE_SETUP +return yy::parser::make_PLUS(loc); + YY_BREAK +case 31: +YY_RULE_SETUP +return yy::parser::make_POST_DECREMENT(loc); + YY_BREAK +case 32: +YY_RULE_SETUP +return yy::parser::make_POST_DECREMENT(loc); + YY_BREAK +case 33: +YY_RULE_SETUP +return yy::parser::make_MINUS(loc); + YY_BREAK +case 34: +YY_RULE_SETUP +return yy::parser::make_MULTIPLY(loc); + YY_BREAK +case 35: +YY_RULE_SETUP +return yy::parser::make_DIVIDE(loc); + YY_BREAK +case 36: +YY_RULE_SETUP +return yy::parser::make_OR(loc); + YY_BREAK +case 37: +YY_RULE_SETUP +return yy::parser::make_AND(loc); + YY_BREAK +case 38: +YY_RULE_SETUP +return yy::parser::make_XOR(loc); + YY_BREAK +case 39: +YY_RULE_SETUP +return yy::parser::make_NOT_EQUAL(loc); + YY_BREAK +case 40: +YY_RULE_SETUP +return yy::parser::make_NOT(loc); + YY_BREAK +case 41: +YY_RULE_SETUP +return yy::parser::make_NOT(loc); + YY_BREAK +case 42: +YY_RULE_SETUP +return yy::parser::make_PROGRAM(loc); + YY_BREAK +case 43: +YY_RULE_SETUP +return yy::parser::make_WRAP_TARGET(loc); + YY_BREAK +case 44: +YY_RULE_SETUP +return yy::parser::make_WRAP(loc); + YY_BREAK +case 45: +YY_RULE_SETUP +return yy::parser::make_WORD(loc); + YY_BREAK +case 46: +YY_RULE_SETUP +return yy::parser::make_DEFINE(loc); + YY_BREAK +case 47: +YY_RULE_SETUP +return yy::parser::make_SIDE_SET(loc); + YY_BREAK +case 48: +YY_RULE_SETUP +return yy::parser::make_ORIGIN(loc); + YY_BREAK +case 49: +YY_RULE_SETUP +{ BEGIN(lang_opt); return yy::parser::make_LANG_OPT(loc); } + YY_BREAK +case 50: +YY_RULE_SETUP +return yy::parser::make_UNKNOWN_DIRECTIVE(yytext, loc); + YY_BREAK +case 51: +YY_RULE_SETUP +return yy::parser::make_JMP(loc); + YY_BREAK +case 52: +YY_RULE_SETUP +return yy::parser::make_WAIT(loc); + YY_BREAK +case 53: +YY_RULE_SETUP +return yy::parser::make_IN(loc); + YY_BREAK +case 54: +YY_RULE_SETUP +return yy::parser::make_OUT(loc); + YY_BREAK +case 55: +YY_RULE_SETUP +return yy::parser::make_PUSH(loc); + YY_BREAK +case 56: +YY_RULE_SETUP +return yy::parser::make_PULL(loc); + YY_BREAK +case 57: +YY_RULE_SETUP +return yy::parser::make_MOV(loc); + YY_BREAK +case 58: +YY_RULE_SETUP +return yy::parser::make_IRQ(loc); + YY_BREAK +case 59: +YY_RULE_SETUP +return yy::parser::make_SET(loc); + YY_BREAK +case 60: +YY_RULE_SETUP +return yy::parser::make_NOP(loc); + YY_BREAK +case 61: +YY_RULE_SETUP +return yy::parser::make_PUBLIC(loc); + YY_BREAK +case 62: +YY_RULE_SETUP +return yy::parser::make_OPTIONAL(loc); + YY_BREAK +case 63: +YY_RULE_SETUP +return yy::parser::make_OPTIONAL(loc); + YY_BREAK +case 64: +YY_RULE_SETUP +return yy::parser::make_SIDE(loc); + YY_BREAK +case 65: +YY_RULE_SETUP +return yy::parser::make_SIDE(loc); + YY_BREAK +case 66: +YY_RULE_SETUP +return yy::parser::make_SIDE(loc); + YY_BREAK +case 67: +YY_RULE_SETUP +return yy::parser::make_PIN(loc); + YY_BREAK +case 68: +YY_RULE_SETUP +return yy::parser::make_GPIO(loc); + YY_BREAK +case 69: +YY_RULE_SETUP +return yy::parser::make_OSRE(loc); + YY_BREAK +case 70: +YY_RULE_SETUP +return yy::parser::make_PINS(loc); + YY_BREAK +case 71: +YY_RULE_SETUP +return yy::parser::make_NULL(loc); + YY_BREAK +case 72: +YY_RULE_SETUP +return yy::parser::make_PINDIRS(loc); + YY_BREAK +case 73: +YY_RULE_SETUP +return yy::parser::make_X(loc); + YY_BREAK +case 74: +YY_RULE_SETUP +return yy::parser::make_Y(loc); + YY_BREAK +case 75: +YY_RULE_SETUP +return yy::parser::make_PC(loc); + YY_BREAK +case 76: +YY_RULE_SETUP +return yy::parser::make_EXEC(loc); + YY_BREAK +case 77: +YY_RULE_SETUP +return yy::parser::make_ISR(loc); + YY_BREAK +case 78: +YY_RULE_SETUP +return yy::parser::make_OSR(loc); + YY_BREAK +case 79: +YY_RULE_SETUP +return yy::parser::make_STATUS(loc); + YY_BREAK +case 80: +YY_RULE_SETUP +return yy::parser::make_BLOCK(loc); + YY_BREAK +case 81: +YY_RULE_SETUP +return yy::parser::make_NOBLOCK(loc); + YY_BREAK +case 82: +YY_RULE_SETUP +return yy::parser::make_IFFULL(loc); + YY_BREAK +case 83: +YY_RULE_SETUP +return yy::parser::make_IFEMPTY(loc); + YY_BREAK +case 84: +YY_RULE_SETUP +return yy::parser::make_REL(loc); + YY_BREAK +case 85: +YY_RULE_SETUP +return yy::parser::make_CLEAR(loc); + YY_BREAK +case 86: +YY_RULE_SETUP +return yy::parser::make_NOWAIT(loc); + YY_BREAK +case 87: +YY_RULE_SETUP +return yy::parser::make_INT(1, loc); + YY_BREAK +case 88: +YY_RULE_SETUP +return yy::parser::make_INT(0, loc); + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(code_block): +case YY_STATE_EOF(c_comment): +case YY_STATE_EOF(lang_opt): +return yy::parser::make_END(loc); + YY_BREAK +case 89: +YY_RULE_SETUP +return make_INT(yytext, loc); + YY_BREAK +case 90: +YY_RULE_SETUP +return make_HEX(yytext, loc); + YY_BREAK +case 91: +YY_RULE_SETUP +return make_BINARY(yytext, loc); + YY_BREAK +case 92: +YY_RULE_SETUP +return yy::parser::make_ID(yytext, loc); + YY_BREAK +case 93: +YY_RULE_SETUP +{ } + YY_BREAK +case 94: +YY_RULE_SETUP +{ throw yy::parser::syntax_error(loc, "invalid character: " + std::string(yytext)); } + YY_BREAK +case 95: +YY_RULE_SETUP +ECHO; + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; +/* %if-c-only */ + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; +/* %endif */ +/* %if-c++-only */ +/* %endif */ + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ +/* %ok-for-header */ + +/* %endif */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +/* %if-c-only */ +static int yy_get_next_buffer (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +/* %if-c-only */ +/* %not-for-header */ + static yy_state_type yy_get_previous_state (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + yy_state_type yy_current_state; + char *yy_cp; + +/* %% [15.0] code to get the start state into yy_current_state goes here */ + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { +/* %% [16.0] code to find the next state goes here */ + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 263 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ +/* %if-c-only */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + int yy_is_jam; + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 263 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 262); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT +/* %if-c-only */ + +/* %endif */ +#endif + +/* %if-c-only */ +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + +/* %% [19.0] update BOL and yylineno */ + + return c; +} +/* %if-c-only */ +#endif /* ifndef YY_NO_INPUT */ +/* %endif */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +/* %if-c-only */ + void yyrestart (FILE * input_file ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/* %if-c++-only */ +/* %endif */ + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ +/* %if-c-only */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +/* %if-c-only */ +static void yy_load_buffer_state (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; +/* %if-c-only */ + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; +/* %endif */ +/* %if-c++-only */ +/* %endif */ + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ +/* %if-c-only */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/* %if-c++-only */ +/* %endif */ + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ +/* %if-c-only */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +/* %if-c-only */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + +/* %if-c-only */ + b->yy_input_file = file; +/* %endif */ +/* %if-c++-only */ +/* %endif */ + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + +/* %if-c-only */ + + b->yy_is_interactive = 0; + +/* %endif */ +/* %if-c++-only */ +/* %endif */ + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ +/* %if-c-only */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/* %if-c-or-c++ */ +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +/* %if-c-only */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} +/* %endif */ + +/* %if-c-or-c++ */ +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +/* %if-c-only */ +void yypop_buffer_state (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} +/* %endif */ + +/* %if-c-or-c++ */ +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +/* %if-c-only */ +static void yyensure_buffer_stack (void) +/* %endif */ +/* %if-c++-only */ +/* %endif */ +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/* %endif */ + +/* %if-c-only */ +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; +} +/* %endif */ + +/* %if-c-only */ +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); +} +/* %endif */ + +/* %if-c-only */ +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} +/* %endif */ + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +/* %if-c-only */ +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} +/* %endif */ +/* %if-c++-only */ +/* %endif */ + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/* %if-reentrant */ +/* %endif */ + +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} + +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif if-c-only */ + +/* %if-c-only */ +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} +/* %endif */ + +/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + +/* %if-reentrant */ +/* %endif */ + return 0; +} +/* %endif */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ +/* %endif */ + +/* %ok-for-header */ + +yy::parser::symbol_type make_INT(const std::string &s, const yy::parser::location_type& loc) +{ + errno = 0; + long n = strtol (s.c_str(), NULL, 10); + if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) + throw yy::parser::syntax_error (loc, "integer is out of range: " + s); + return yy::parser::make_INT((int) n, loc); +} + +yy::parser::symbol_type make_HEX(const std::string &s, const yy::parser::location_type& loc) +{ + errno = 0; + long n = strtol (s.c_str() + 2, NULL, 16); + if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) + throw yy::parser::syntax_error (loc, "hex is out of range: " + s); + return yy::parser::make_INT((int) n, loc); +} + +yy::parser::symbol_type make_BINARY(const std::string &s, const yy::parser::location_type& loc) +{ + errno = 0; + long n = strtol (s.c_str()+2, NULL, 2); + if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) + throw yy::parser::syntax_error (loc, "binary is out of range: " + s); + return yy::parser::make_INT((int) n, loc); +} + +void pio_assembler::scan_begin () +{ + yy_flex_debug = false; + if (source.empty () || source == "-") + yyin = stdin; + else if (!(yyin = fopen (source.c_str (), "r"))) + { + std::cerr << "cannot open " << source << ": " << strerror(errno) << '\n'; + exit (EXIT_FAILURE); + } +} + +void pio_assembler::scan_end () +{ + fclose (yyin); +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/location.h b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/location.h new file mode 100644 index 0000000000..4965682b0f --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/location.h @@ -0,0 +1,302 @@ +// A Bison parser, made by GNU Bison 3.7.2. + +// Locations for Bison parsers in C++ + +// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + +/** + ** \file pico_sdk/tools/pioasm/gen/location.h + ** Define the yy::location class. + */ + +#ifndef YY_YY_HOME_GRAHAM_DEV_MU_PICO_SDK_TOOLS_PIOASM_GEN_LOCATION_H_INCLUDED +# define YY_YY_HOME_GRAHAM_DEV_MU_PICO_SDK_TOOLS_PIOASM_GEN_LOCATION_H_INCLUDED + +# include +# include + +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +namespace yy { + + /// A point in a source file. + class position + { + public: + /// Type for file name. + typedef const std::string filename_type; + /// Type for line and column numbers. + typedef int counter_type; + + /// Construct a position. + explicit position (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) + : filename (f) + , line (l) + , column (c) + {} + + + /// Initialization. + void initialize (filename_type* fn = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) + { + filename = fn; + line = l; + column = c; + } + + /** \name Line and Column related manipulators + ** \{ */ + /// (line related) Advance to the COUNT next lines. + void lines (counter_type count = 1) + { + if (count) + { + column = 1; + line = add_ (line, count, 1); + } + } + + /// (column related) Advance to the COUNT next columns. + void columns (counter_type count = 1) + { + column = add_ (column, count, 1); + } + /** \} */ + + /// File name to which this position refers. + filename_type* filename; + /// Current line number. + counter_type line; + /// Current column number. + counter_type column; + + private: + /// Compute max (min, lhs+rhs). + static counter_type add_ (counter_type lhs, counter_type rhs, counter_type min) + { + return lhs + rhs < min ? min : lhs + rhs; + } + }; + + /// Add \a width columns, in place. + inline position& + operator+= (position& res, position::counter_type width) + { + res.columns (width); + return res; + } + + /// Add \a width columns. + inline position + operator+ (position res, position::counter_type width) + { + return res += width; + } + + /// Subtract \a width columns, in place. + inline position& + operator-= (position& res, position::counter_type width) + { + return res += -width; + } + + /// Subtract \a width columns. + inline position + operator- (position res, position::counter_type width) + { + return res -= width; + } + + /** \brief Intercept output stream redirection. + ** \param ostr the destination output stream + ** \param pos a reference to the position to redirect + */ + template + std::basic_ostream& + operator<< (std::basic_ostream& ostr, const position& pos) + { + if (pos.filename) + ostr << *pos.filename << ':'; + return ostr << pos.line << '.' << pos.column; + } + + /// Two points in a source file. + class location + { + public: + /// Type for file name. + typedef position::filename_type filename_type; + /// Type for line and column numbers. + typedef position::counter_type counter_type; + + /// Construct a location from \a b to \a e. + location (const position& b, const position& e) + : begin (b) + , end (e) + {} + + /// Construct a 0-width location in \a p. + explicit location (const position& p = position ()) + : begin (p) + , end (p) + {} + + /// Construct a 0-width location in \a f, \a l, \a c. + explicit location (filename_type* f, + counter_type l = 1, + counter_type c = 1) + : begin (f, l, c) + , end (f, l, c) + {} + + + /// Initialization. + void initialize (filename_type* f = YY_NULLPTR, + counter_type l = 1, + counter_type c = 1) + { + begin.initialize (f, l, c); + end = begin; + } + + /** \name Line and Column related manipulators + ** \{ */ + public: + /// Reset initial location to final location. + void step () + { + begin = end; + } + + /// Extend the current location to the COUNT next columns. + void columns (counter_type count = 1) + { + end += count; + } + + /// Extend the current location to the COUNT next lines. + void lines (counter_type count = 1) + { + end.lines (count); + } + /** \} */ + + + public: + /// Beginning of the located region. + position begin; + /// End of the located region. + position end; + }; + + /// Join two locations, in place. + inline location& + operator+= (location& res, const location& end) + { + res.end = end.end; + return res; + } + + /// Join two locations. + inline location + operator+ (location res, const location& end) + { + return res += end; + } + + /// Add \a width columns to the end position, in place. + inline location& + operator+= (location& res, location::counter_type width) + { + res.columns (width); + return res; + } + + /// Add \a width columns to the end position. + inline location + operator+ (location res, location::counter_type width) + { + return res += width; + } + + /// Subtract \a width columns to the end position, in place. + inline location& + operator-= (location& res, location::counter_type width) + { + return res += -width; + } + + /// Subtract \a width columns to the end position. + inline location + operator- (location res, location::counter_type width) + { + return res -= width; + } + + /** \brief Intercept output stream redirection. + ** \param ostr the destination output stream + ** \param loc a reference to the location to redirect + ** + ** Avoid duplicate information. + */ + template + std::basic_ostream& + operator<< (std::basic_ostream& ostr, const location& loc) + { + location::counter_type end_col + = 0 < loc.end.column ? loc.end.column - 1 : 0; + ostr << loc.begin; + if (loc.end.filename + && (!loc.begin.filename + || *loc.begin.filename != *loc.end.filename)) + ostr << '-' << loc.end.filename << ':' << loc.end.line << '.' << end_col; + else if (loc.begin.line < loc.end.line) + ostr << '-' << loc.end.line << '.' << end_col; + else if (loc.begin.column < end_col) + ostr << '-' << end_col; + return ostr; + } + +} // yy + +#endif // !YY_YY_HOME_GRAHAM_DEV_MU_PICO_SDK_TOOLS_PIOASM_GEN_LOCATION_H_INCLUDED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.cpp new file mode 100644 index 0000000000..1e41a0979e --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.cpp @@ -0,0 +1,2208 @@ +// A Bison parser, made by GNU Bison 3.7.2. + +// Skeleton implementation for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + + + + + +#include "parser.hpp" + + +// Unqualified %code blocks. + + #include "pio_assembler.h" + #ifdef _MSC_VER + #pragma warning(disable : 4244) // possible loss of data (valid warning, but there is a software check / missing cast) + #endif + + + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include // FIXME: INFRINGES ON USER NAME SPACE. +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + + +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + +#define YYRHSLOC(Rhs, K) ((Rhs)[K].location) +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +# ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).begin = YYRHSLOC (Rhs, 1).begin; \ + (Current).end = YYRHSLOC (Rhs, N).end; \ + } \ + else \ + { \ + (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ + } \ + while (false) +# endif + + +// Enable debugging if requested. +#if YYDEBUG + +// A pseudo ostream that takes yydebug_ into account. +# define YYCDEBUG if (yydebug_) (*yycdebug_) + +# define YY_SYMBOL_PRINT(Title, Symbol) \ + do { \ + if (yydebug_) \ + { \ + *yycdebug_ << Title << ' '; \ + yy_print_ (*yycdebug_, Symbol); \ + *yycdebug_ << '\n'; \ + } \ + } while (false) + +# define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug_) \ + yy_reduce_print_ (Rule); \ + } while (false) + +# define YY_STACK_PRINT() \ + do { \ + if (yydebug_) \ + yy_stack_print_ (); \ + } while (false) + +#else // !YYDEBUG + +# define YYCDEBUG if (false) std::cerr +# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) + +#endif // !YYDEBUG + +#define yyerrok (yyerrstatus_ = 0) +#define yyclearin (yyla.clear ()) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYRECOVERING() (!!yyerrstatus_) + +namespace yy { + + /// Build a parser object. + parser::parser (pio_assembler& pioasm_yyarg) +#if YYDEBUG + : yydebug_ (false), + yycdebug_ (&std::cerr), +#else + : +#endif + yy_lac_established_ (false), + pioasm (pioasm_yyarg) + {} + + parser::~parser () + {} + + parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} + + /*---------------. + | symbol kinds. | + `---------------*/ + + + + // by_state. + parser::by_state::by_state () YY_NOEXCEPT + : state (empty_state) + {} + + parser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) + {} + + void + parser::by_state::clear () YY_NOEXCEPT + { + state = empty_state; + } + + void + parser::by_state::move (by_state& that) + { + state = that.state; + that.clear (); + } + + parser::by_state::by_state (state_type s) YY_NOEXCEPT + : state (s) + {} + + parser::symbol_kind_type + parser::by_state::kind () const YY_NOEXCEPT + { + if (state == empty_state) + return symbol_kind::S_YYEMPTY; + else + return YY_CAST (symbol_kind_type, yystos_[+state]); + } + + parser::stack_symbol_type::stack_symbol_type () + {} + + parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) + { + switch (that.kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.YY_MOVE_OR_COPY< bool > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_condition: // condition + value.YY_MOVE_OR_COPY< enum condition > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.YY_MOVE_OR_COPY< enum in_out_set > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.YY_MOVE_OR_COPY< enum irq > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.YY_MOVE_OR_COPY< enum mov > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_mov_op: // mov_op + value.YY_MOVE_OR_COPY< enum mov_op > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // "integer" + value.YY_MOVE_OR_COPY< int > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.YY_MOVE_OR_COPY< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.YY_MOVE_OR_COPY< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.YY_MOVE_OR_COPY< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_wait_source: // wait_source + value.YY_MOVE_OR_COPY< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } + + parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s, YY_MOVE (that.location)) + { + switch (that.kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.move< bool > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_condition: // condition + value.move< enum condition > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.move< enum in_out_set > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.move< enum irq > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.move< enum mov > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_mov_op: // mov_op + value.move< enum mov_op > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // "integer" + value.move< int > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.move< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.move< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.move< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_wait_source: // wait_source + value.move< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.move< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + + // that is emptied. + that.kind_ = symbol_kind::S_YYEMPTY; + } + +#if YY_CPLUSPLUS < 201103L + parser::stack_symbol_type& + parser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.copy< bool > (that.value); + break; + + case symbol_kind::S_condition: // condition + value.copy< enum condition > (that.value); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.copy< enum in_out_set > (that.value); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.copy< enum irq > (that.value); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.copy< enum mov > (that.value); + break; + + case symbol_kind::S_mov_op: // mov_op + value.copy< enum mov_op > (that.value); + break; + + case symbol_kind::S_INT: // "integer" + value.copy< int > (that.value); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.copy< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.copy< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.copy< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_wait_source: // wait_source + value.copy< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.copy< std::string > (that.value); + break; + + default: + break; + } + + location = that.location; + return *this; + } + + parser::stack_symbol_type& + parser::stack_symbol_type::operator= (stack_symbol_type& that) + { + state = that.state; + switch (that.kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.move< bool > (that.value); + break; + + case symbol_kind::S_condition: // condition + value.move< enum condition > (that.value); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.move< enum in_out_set > (that.value); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.move< enum irq > (that.value); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.move< enum mov > (that.value); + break; + + case symbol_kind::S_mov_op: // mov_op + value.move< enum mov_op > (that.value); + break; + + case symbol_kind::S_INT: // "integer" + value.move< int > (that.value); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.move< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.move< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.move< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_wait_source: // wait_source + value.move< std::shared_ptr > (that.value); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.move< std::string > (that.value); + break; + + default: + break; + } + + location = that.location; + // that is emptied. + that.state = empty_state; + return *this; + } +#endif + + template + void + parser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const + { + if (yymsg) + YY_SYMBOL_PRINT (yymsg, yysym); + } + +#if YYDEBUG + template + void + parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const + { + std::ostream& yyoutput = yyo; + YYUSE (yyoutput); + if (yysym.empty ()) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " (" + << yysym.location << ": "; + switch (yykind) + { + case symbol_kind::S_ID: // "identifier" + { yyo << "..."; } + break; + + case symbol_kind::S_STRING: // "string" + { yyo << "..."; } + break; + + case symbol_kind::S_NON_WS: // "text" + { yyo << "..."; } + break; + + case symbol_kind::S_CODE_BLOCK_START: // "code block" + { yyo << "..."; } + break; + + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + { yyo << "..."; } + break; + + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + { yyo << "..."; } + break; + + case symbol_kind::S_INT: // "integer" + { yyo << "..."; } + break; + + case symbol_kind::S_label_decl: // label_decl + { yyo << "..."; } + break; + + case symbol_kind::S_value: // value + { yyo << "..."; } + break; + + case symbol_kind::S_expression: // expression + { yyo << "..."; } + break; + + case symbol_kind::S_instruction: // instruction + { yyo << "..."; } + break; + + case symbol_kind::S_base_instruction: // base_instruction + { yyo << "..."; } + break; + + case symbol_kind::S_delay: // delay + { yyo << "..."; } + break; + + case symbol_kind::S_sideset: // sideset + { yyo << "..."; } + break; + + case symbol_kind::S_condition: // condition + { yyo << "..."; } + break; + + case symbol_kind::S_wait_source: // wait_source + { yyo << "..."; } + break; + + case symbol_kind::S_in_source: // in_source + { yyo << "..."; } + break; + + case symbol_kind::S_out_target: // out_target + { yyo << "..."; } + break; + + case symbol_kind::S_mov_target: // mov_target + { yyo << "..."; } + break; + + case symbol_kind::S_mov_source: // mov_source + { yyo << "..."; } + break; + + case symbol_kind::S_mov_op: // mov_op + { yyo << "..."; } + break; + + case symbol_kind::S_set_target: // set_target + { yyo << "..."; } + break; + + case symbol_kind::S_if_full: // if_full + { yyo << "..."; } + break; + + case symbol_kind::S_if_empty: // if_empty + { yyo << "..."; } + break; + + case symbol_kind::S_blocking: // blocking + { yyo << "..."; } + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + { yyo << "..."; } + break; + + case symbol_kind::S_symbol_def: // symbol_def + { yyo << "..."; } + break; + + default: + break; + } + yyo << ')'; + } + } +#endif + + void + parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) + { + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); + } + + void + parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) + { +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif + } + + void + parser::yypop_ (int n) + { + yystack_.pop (n); + } + +#if YYDEBUG + std::ostream& + parser::debug_stream () const + { + return *yycdebug_; + } + + void + parser::set_debug_stream (std::ostream& o) + { + yycdebug_ = &o; + } + + + parser::debug_level_type + parser::debug_level () const + { + return yydebug_; + } + + void + parser::set_debug_level (debug_level_type l) + { + yydebug_ = l; + } +#endif // YYDEBUG + + parser::state_type + parser::yy_lr_goto_state_ (state_type yystate, int yysym) + { + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; + if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) + return yytable_[yyr]; + else + return yydefgoto_[yysym - YYNTOKENS]; + } + + bool + parser::yy_pact_value_is_default_ (int yyvalue) + { + return yyvalue == yypact_ninf_; + } + + bool + parser::yy_table_value_is_error_ (int yyvalue) + { + return yyvalue == yytable_ninf_; + } + + int + parser::operator() () + { + return parse (); + } + + int + parser::parse () + { + int yyn; + /// Length of the RHS of the rule being reduced. + int yylen = 0; + + // Error handling. + int yynerrs_ = 0; + int yyerrstatus_ = 0; + + /// The lookahead symbol. + symbol_type yyla; + + /// The locations where the error started and ended. + stack_symbol_type yyerror_range[3]; + + /// The return value of parse (). + int yyresult; + + /// Discard the LAC context in case there still is one left from a + /// previous invocation. + yy_lac_discard_ ("init"); + +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + YYCDEBUG << "Starting parse\n"; + + + /* Initialize the stack. The initial state will be set in + yynewstate, since the latter expects the semantical and the + location values to have been already stored, initialize these + stacks with a primary value. */ + yystack_.clear (); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); + + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ + yynewstate: + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); + + // Accept? + if (yystack_[0].state == yyfinal_) + YYACCEPT; + + goto yybackup; + + + /*-----------. + | yybackup. | + `-----------*/ + yybackup: + // Try to take a decision without lookahead. + yyn = yypact_[+yystack_[0].state]; + if (yy_pact_value_is_default_ (yyn)) + goto yydefault; + + // Read a lookahead token. + if (yyla.empty ()) + { + YYCDEBUG << "Reading a token\n"; +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + symbol_type yylookahead (yylex (pioasm)); + yyla.move (yylookahead); + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + goto yyerrlab1; + } +#endif // YY_EXCEPTIONS + } + YY_SYMBOL_PRINT ("Next token is", yyla); + + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + + /* If the proper action on seeing token YYLA.TYPE is to reduce or + to detect an error, take that action. */ + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + if (!yy_lac_establish_ (yyla.kind ())) + goto yyerrlab; + goto yydefault; + } + + // Reduce or error. + yyn = yytable_[yyn]; + if (yyn <= 0) + { + if (yy_table_value_is_error_ (yyn)) + goto yyerrlab; + if (!yy_lac_establish_ (yyla.kind ())) + goto yyerrlab; + + yyn = -yyn; + goto yyreduce; + } + + // Count tokens shifted since error; after three, turn off error status. + if (yyerrstatus_) + --yyerrstatus_; + + // Shift the lookahead token. + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); + yy_lac_discard_ ("shift"); + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ + yydefault: + yyn = yydefact_[+yystack_[0].state]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + + /*-----------------------------. + | yyreduce -- do a reduction. | + `-----------------------------*/ + yyreduce: + yylen = yyr2_[yyn]; + { + stack_symbol_type yylhs; + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); + /* Variants are always initialized to an empty instance of the + correct type. The default '$$ = $1' action is NOT applied + when using variants. */ + switch (yyr1_[yyn]) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + yylhs.value.emplace< bool > (); + break; + + case symbol_kind::S_condition: // condition + yylhs.value.emplace< enum condition > (); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + yylhs.value.emplace< enum in_out_set > (); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + yylhs.value.emplace< enum irq > (); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + yylhs.value.emplace< enum mov > (); + break; + + case symbol_kind::S_mov_op: // mov_op + yylhs.value.emplace< enum mov_op > (); + break; + + case symbol_kind::S_INT: // "integer" + yylhs.value.emplace< int > (); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + yylhs.value.emplace< std::shared_ptr > (); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + yylhs.value.emplace< std::shared_ptr > (); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + yylhs.value.emplace< std::shared_ptr > (); + break; + + case symbol_kind::S_wait_source: // wait_source + yylhs.value.emplace< std::shared_ptr > (); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + yylhs.value.emplace< std::string > (); + break; + + default: + break; + } + + + // Default location. + { + stack_type::slice range (yystack_, yylen); + YYLLOC_DEFAULT (yylhs.location, range, yylen); + yyerror_range[1].location = yylhs.location; + } + + // Perform the reduction. + YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + switch (yyn) + { + case 2: // file: lines "end of file" + { if (pioasm.error_count || pioasm.write_output()) YYABORT; } + break; + + case 5: // line: ".program" "identifier" + { if (!pioasm.add_program(yylhs.location, yystack_[0].value.as < std::string > ())) { std::stringstream msg; msg << "program " << yystack_[0].value.as < std::string > () << " already exists"; error(yylhs.location, msg.str()); abort(); } } + break; + + case 7: // line: instruction + { pioasm.get_current_program(yystack_[0].location, "instruction").add_instruction(yystack_[0].value.as < std::shared_ptr > ()); } + break; + + case 8: // line: label_decl instruction + { auto &p = pioasm.get_current_program(yystack_[0].location, "instruction"); p.add_label(yystack_[1].value.as < std::shared_ptr > ()); p.add_instruction(yystack_[0].value.as < std::shared_ptr > ()); } + break; + + case 9: // line: label_decl + { pioasm.get_current_program(yystack_[0].location, "label").add_label(yystack_[0].value.as < std::shared_ptr > ()); } + break; + + case 12: // line: error + { if (pioasm.error_count > 6) { std::cerr << "\ntoo many errors; aborting.\n"; YYABORT; } } + break; + + case 13: // code_block: "code block" "%}" + { std::string of = yystack_[1].value.as < std::string > (); if (of.empty()) of = output_format::default_name; pioasm.get_current_program(yylhs.location, "code block", false, false).add_code_block( code_block(yylhs.location, of, yystack_[0].value.as < std::string > ())); } + break; + + case 14: // label_decl: symbol_def ":" + { yystack_[1].value.as < std::shared_ptr > ()->is_label = true; yylhs.value.as < std::shared_ptr > () = yystack_[1].value.as < std::shared_ptr > (); } + break; + + case 15: // directive: ".define" symbol_def expression + { yystack_[1].value.as < std::shared_ptr > ()->is_label = false; yystack_[1].value.as < std::shared_ptr > ()->value = yystack_[0].value.as < std::shared_ptr > (); pioasm.get_current_program(yystack_[2].location, ".define", false, false).add_symbol(yystack_[1].value.as < std::shared_ptr > ()); } + break; + + case 16: // directive: ".origin" value + { pioasm.get_current_program(yystack_[1].location, ".origin", true).set_origin(yylhs.location, yystack_[0].value.as < std::shared_ptr > ()); } + break; + + case 17: // directive: ".side_set" value "opt" "pindirs" + { pioasm.get_current_program(yystack_[3].location, ".side_set", true).set_sideset(yylhs.location, yystack_[2].value.as < std::shared_ptr > (), true, true); } + break; + + case 18: // directive: ".side_set" value "opt" + { pioasm.get_current_program(yystack_[2].location, ".side_set", true).set_sideset(yylhs.location, yystack_[1].value.as < std::shared_ptr > (), true, false); } + break; + + case 19: // directive: ".side_set" value "pindirs" + { pioasm.get_current_program(yystack_[2].location, ".side_set", true).set_sideset(yylhs.location, yystack_[1].value.as < std::shared_ptr > (), false, true); } + break; + + case 20: // directive: ".side_set" value + { pioasm.get_current_program(yystack_[1].location, ".side_set", true).set_sideset(yylhs.location, yystack_[0].value.as < std::shared_ptr > (), false, false); } + break; + + case 21: // directive: ".wrap_target" + { pioasm.get_current_program(yystack_[0].location, ".wrap_target").set_wrap_target(yylhs.location); } + break; + + case 22: // directive: ".wrap" + { pioasm.get_current_program(yystack_[0].location, ".wrap").set_wrap(yylhs.location); } + break; + + case 23: // directive: ".word" value + { pioasm.get_current_program(yystack_[1].location, "instruction").add_instruction(std::shared_ptr(new instr_word(yylhs.location, yystack_[0].value.as < std::shared_ptr > ()))); } + break; + + case 24: // directive: ".lang_opt" "text" "text" "=" "integer" + { pioasm.get_current_program(yystack_[4].location, ".lang_opt").add_lang_opt(yystack_[3].value.as < std::string > (), yystack_[2].value.as < std::string > (), std::to_string(yystack_[0].value.as < int > ())); } + break; + + case 25: // directive: ".lang_opt" "text" "text" "=" "string" + { pioasm.get_current_program(yystack_[4].location, ".lang_opt").add_lang_opt(yystack_[3].value.as < std::string > (), yystack_[2].value.as < std::string > (), yystack_[0].value.as < std::string > ()); } + break; + + case 26: // directive: ".lang_opt" "text" "text" "=" "text" + { pioasm.get_current_program(yystack_[4].location, ".lang_opt").add_lang_opt(yystack_[3].value.as < std::string > (), yystack_[2].value.as < std::string > (), yystack_[0].value.as < std::string > ()); } + break; + + case 27: // directive: ".lang_opt" error + { error(yylhs.location, "expected format is .lang_opt language option_name = option_value"); } + break; + + case 28: // directive: UNKNOWN_DIRECTIVE + { std::stringstream msg; msg << "unknown directive " << yystack_[0].value.as < std::string > (); throw syntax_error(yylhs.location, msg.str()); } + break; + + case 29: // value: "integer" + { yylhs.value.as < std::shared_ptr > () = resolvable_int(yylhs.location, yystack_[0].value.as < int > ()); } + break; + + case 30: // value: "identifier" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new name_ref(yylhs.location, yystack_[0].value.as < std::string > ())); } + break; + + case 31: // value: "(" expression ")" + { yylhs.value.as < std::shared_ptr > () = yystack_[1].value.as < std::shared_ptr > (); } + break; + + case 32: // expression: value + { yylhs.value.as < std::shared_ptr > () = yystack_[0].value.as < std::shared_ptr > (); } + break; + + case 33: // expression: expression "+" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::add, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 34: // expression: expression "-" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::subtract, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 35: // expression: expression "*" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::multiply, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 36: // expression: expression "/" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::divide, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 37: // expression: expression "|" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::or_, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 38: // expression: expression "&" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::and_, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 39: // expression: expression "^" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new binary_operation(yylhs.location, binary_operation::xor_, yystack_[2].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 40: // expression: "-" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new unary_operation(yylhs.location, unary_operation::negate, yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 41: // expression: "::" expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new unary_operation(yylhs.location, unary_operation::reverse, yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 42: // instruction: base_instruction sideset delay + { yylhs.value.as < std::shared_ptr > () = yystack_[2].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->sideset = yystack_[1].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->delay = yystack_[0].value.as < std::shared_ptr > (); } + break; + + case 43: // instruction: base_instruction delay sideset + { yylhs.value.as < std::shared_ptr > () = yystack_[2].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->delay = yystack_[1].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->sideset = yystack_[0].value.as < std::shared_ptr > (); } + break; + + case 44: // instruction: base_instruction sideset + { yylhs.value.as < std::shared_ptr > () = yystack_[1].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->sideset = yystack_[0].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->delay = resolvable_int(yylhs.location, 0); } + break; + + case 45: // instruction: base_instruction delay + { yylhs.value.as < std::shared_ptr > () = yystack_[1].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->delay = yystack_[0].value.as < std::shared_ptr > (); } + break; + + case 46: // instruction: base_instruction + { yylhs.value.as < std::shared_ptr > () = yystack_[0].value.as < std::shared_ptr > (); yylhs.value.as < std::shared_ptr > ()->delay = resolvable_int(yylhs.location, 0); } + break; + + case 47: // base_instruction: "nop" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_nop(yylhs.location)); } + break; + + case 48: // base_instruction: "jmp" condition comma expression + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_jmp(yylhs.location, yystack_[2].value.as < enum condition > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 49: // base_instruction: "wait" value wait_source + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_wait(yylhs.location, yystack_[1].value.as < std::shared_ptr > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 50: // base_instruction: "wait" value "," value + { std::stringstream msg; location l; l.begin = yystack_[2].location.end; l.end = yystack_[1].location.end; msg << "expected irq, gpio or pin after the polarity value and before the \",\""; throw yy::parser::syntax_error(l, msg.str()); } + break; + + case 51: // base_instruction: "wait" wait_source + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_wait(yylhs.location, resolvable_int(yylhs.location, 1), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 52: // base_instruction: "in" in_source comma value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_in(yylhs.location, yystack_[2].value.as < enum in_out_set > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 53: // base_instruction: "out" out_target comma value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_out(yylhs.location, yystack_[2].value.as < enum in_out_set > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 54: // base_instruction: "push" if_full blocking + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_push(yylhs.location, yystack_[1].value.as < bool > (), yystack_[0].value.as < bool > ())); } + break; + + case 55: // base_instruction: "pull" if_empty blocking + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_pull(yylhs.location, yystack_[1].value.as < bool > (), yystack_[0].value.as < bool > ())); } + break; + + case 56: // base_instruction: "mov" mov_target comma mov_op mov_source + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_mov(yylhs.location, yystack_[3].value.as < enum mov > (), yystack_[0].value.as < enum mov > (), yystack_[1].value.as < enum mov_op > ())); } + break; + + case 57: // base_instruction: "irq" irq_modifiers value "rel" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_irq(yylhs.location, yystack_[2].value.as < enum irq > (), yystack_[1].value.as < std::shared_ptr > (), true)); } + break; + + case 58: // base_instruction: "irq" irq_modifiers value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_irq(yylhs.location, yystack_[1].value.as < enum irq > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 59: // base_instruction: "set" set_target comma value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new instr_set(yylhs.location, yystack_[2].value.as < enum in_out_set > (), yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 60: // delay: "[" expression "]" + { yylhs.value.as < std::shared_ptr > () = yystack_[1].value.as < std::shared_ptr > (); } + break; + + case 61: // sideset: "side" value + { yylhs.value.as < std::shared_ptr > () = yystack_[0].value.as < std::shared_ptr > (); } + break; + + case 62: // condition: "!" "x" + { yylhs.value.as < enum condition > () = condition::xz; } + break; + + case 63: // condition: "x" "--" + { yylhs.value.as < enum condition > () = condition::xnz__; } + break; + + case 64: // condition: "!" "y" + { yylhs.value.as < enum condition > () = condition::yz; } + break; + + case 65: // condition: "y" "--" + { yylhs.value.as < enum condition > () = condition::ynz__; } + break; + + case 66: // condition: "x" "!=" "y" + { yylhs.value.as < enum condition > () = condition::xney; } + break; + + case 67: // condition: "pin" + { yylhs.value.as < enum condition > () = condition::pin; } + break; + + case 68: // condition: "!" "osre" + { yylhs.value.as < enum condition > () = condition::osrez; } + break; + + case 69: // condition: %empty + { yylhs.value.as < enum condition > () = condition::al; } + break; + + case 70: // wait_source: "irq" comma value "rel" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new wait_source(wait_source::irq, yystack_[1].value.as < std::shared_ptr > (), true)); } + break; + + case 71: // wait_source: "irq" comma value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new wait_source(wait_source::irq, yystack_[0].value.as < std::shared_ptr > (), false)); } + break; + + case 72: // wait_source: "gpio" comma value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new wait_source(wait_source::gpio, yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 73: // wait_source: "pin" comma value + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new wait_source(wait_source::pin, yystack_[0].value.as < std::shared_ptr > ())); } + break; + + case 76: // in_source: "pins" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_pins; } + break; + + case 77: // in_source: "x" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_x; } + break; + + case 78: // in_source: "y" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_y; } + break; + + case 79: // in_source: "null" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_null; } + break; + + case 80: // in_source: "isr" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_isr; } + break; + + case 81: // in_source: "osr" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_osr; } + break; + + case 82: // in_source: "status" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_status; } + break; + + case 83: // out_target: "pins" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_pins; } + break; + + case 84: // out_target: "x" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_x; } + break; + + case 85: // out_target: "y" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_y; } + break; + + case 86: // out_target: "null" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_null; } + break; + + case 87: // out_target: "pindirs" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_pindirs; } + break; + + case 88: // out_target: "isr" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_isr; } + break; + + case 89: // out_target: "pc" + { yylhs.value.as < enum in_out_set > () = in_out_set::out_set_pc; } + break; + + case 90: // out_target: "exec" + { yylhs.value.as < enum in_out_set > () = in_out_set::out_exec; } + break; + + case 91: // mov_target: "pins" + { yylhs.value.as < enum mov > () = mov::pins; } + break; + + case 92: // mov_target: "x" + { yylhs.value.as < enum mov > () = mov::x; } + break; + + case 93: // mov_target: "y" + { yylhs.value.as < enum mov > () = mov::y; } + break; + + case 94: // mov_target: "exec" + { yylhs.value.as < enum mov > () = mov::exec; } + break; + + case 95: // mov_target: "pc" + { yylhs.value.as < enum mov > () = mov::pc; } + break; + + case 96: // mov_target: "isr" + { yylhs.value.as < enum mov > () = mov::isr; } + break; + + case 97: // mov_target: "osr" + { yylhs.value.as < enum mov > () = mov::osr; } + break; + + case 98: // mov_source: "pins" + { yylhs.value.as < enum mov > () = mov::pins; } + break; + + case 99: // mov_source: "x" + { yylhs.value.as < enum mov > () = mov::x; } + break; + + case 100: // mov_source: "y" + { yylhs.value.as < enum mov > () = mov::y; } + break; + + case 101: // mov_source: "null" + { yylhs.value.as < enum mov > () = mov::null; } + break; + + case 102: // mov_source: "status" + { yylhs.value.as < enum mov > () = mov::status; } + break; + + case 103: // mov_source: "isr" + { yylhs.value.as < enum mov > () = mov::isr; } + break; + + case 104: // mov_source: "osr" + { yylhs.value.as < enum mov > () = mov::osr; } + break; + + case 105: // mov_op: "!" + { yylhs.value.as < enum mov_op > () = mov_op::invert; } + break; + + case 106: // mov_op: "::" + { yylhs.value.as < enum mov_op > () = mov_op::bit_reverse; } + break; + + case 107: // mov_op: %empty + { yylhs.value.as < enum mov_op > () = mov_op::none; } + break; + + case 108: // set_target: "pins" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_pins; } + break; + + case 109: // set_target: "x" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_x; } + break; + + case 110: // set_target: "y" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_y; } + break; + + case 111: // set_target: "pindirs" + { yylhs.value.as < enum in_out_set > () = in_out_set::in_out_set_pindirs; } + break; + + case 112: // if_full: "iffull" + { yylhs.value.as < bool > () = true; } + break; + + case 113: // if_full: %empty + { yylhs.value.as < bool > () = false; } + break; + + case 114: // if_empty: "ifempty" + { yylhs.value.as < bool > () = true; } + break; + + case 115: // if_empty: %empty + { yylhs.value.as < bool > () = false; } + break; + + case 116: // blocking: "block" + { yylhs.value.as < bool > () = true; } + break; + + case 117: // blocking: "noblock" + { yylhs.value.as < bool > () = false; } + break; + + case 118: // blocking: %empty + { yylhs.value.as < bool > () = true; } + break; + + case 119: // irq_modifiers: "clear" + { yylhs.value.as < enum irq > () = irq::clear; } + break; + + case 120: // irq_modifiers: "wait" + { yylhs.value.as < enum irq > () = irq::set_wait; } + break; + + case 121: // irq_modifiers: "nowait" + { yylhs.value.as < enum irq > () = irq::set; } + break; + + case 122: // irq_modifiers: "set" + { yylhs.value.as < enum irq > () = irq::set; } + break; + + case 123: // irq_modifiers: %empty + { yylhs.value.as < enum irq > () = irq::set; } + break; + + case 124: // symbol_def: "identifier" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new symbol(yylhs.location, yystack_[0].value.as < std::string > ())); } + break; + + case 125: // symbol_def: "public" "identifier" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new symbol(yylhs.location, yystack_[0].value.as < std::string > (), true)); } + break; + + case 126: // symbol_def: "*" "identifier" + { yylhs.value.as < std::shared_ptr > () = std::shared_ptr(new symbol(yylhs.location, yystack_[0].value.as < std::string > (), true)); } + break; + + + + default: + break; + } + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + YYERROR; + } +#endif // YY_EXCEPTIONS + YY_SYMBOL_PRINT ("-> $$ =", yylhs); + yypop_ (yylen); + yylen = 0; + + // Shift the result of the reduction. + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); + } + goto yynewstate; + + + /*--------------------------------------. + | yyerrlab -- here on detecting error. | + `--------------------------------------*/ + yyerrlab: + // If not already recovering from an error, report this error. + if (!yyerrstatus_) + { + ++yynerrs_; + context yyctx (*this, yyla); + std::string msg = yysyntax_error_ (yyctx); + error (yyla.location, YY_MOVE (msg)); + } + + + yyerror_range[1].location = yyla.location; + if (yyerrstatus_ == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + // Return failure if at end of input. + if (yyla.kind () == symbol_kind::S_YYEOF) + YYABORT; + else if (!yyla.empty ()) + { + yy_destroy_ ("Error: discarding", yyla); + yyla.clear (); + } + } + + // Else will try to reuse lookahead token after shifting the error token. + goto yyerrlab1; + + + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ + yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ + if (false) + YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + yypop_ (yylen); + yylen = 0; + YY_STACK_PRINT (); + goto yyerrlab1; + + + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: + yyerrstatus_ = 3; // Each real token shifted decrements this. + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } + + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; + + yyerror_range[1].location = yystack_[0].location; + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; + + yyerror_range[2].location = yyla.location; + YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); + + // Shift the error token. + yy_lac_discard_ ("error recovery"); + error_token.state = state_type (yyn); + yypush_ ("Shifting", YY_MOVE (error_token)); + } + goto yynewstate; + + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ + yyacceptlab: + yyresult = 0; + goto yyreturn; + + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ + yyabortlab: + yyresult = 1; + goto yyreturn; + + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ + yyreturn: + if (!yyla.empty ()) + yy_destroy_ ("Cleanup: discarding lookahead", yyla); + + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + yypop_ (yylen); + YY_STACK_PRINT (); + while (1 < yystack_.size ()) + { + yy_destroy_ ("Cleanup: popping", yystack_[0]); + yypop_ (); + } + + return yyresult; + } +#if YY_EXCEPTIONS + catch (...) + { + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; + // Do not try to display the values of the reclaimed symbols, + // as their printers might throw an exception. + if (!yyla.empty ()) + yy_destroy_ (YY_NULLPTR, yyla); + + while (1 < yystack_.size ()) + { + yy_destroy_ (YY_NULLPTR, yystack_[0]); + yypop_ (); + } + throw; + } +#endif // YY_EXCEPTIONS + } + + void + parser::error (const syntax_error& yyexc) + { + error (yyexc.location, yyexc.what ()); + } + + /* Return YYSTR after stripping away unnecessary quotes and + backslashes, so that it's suitable for yyerror. The heuristic is + that double-quoting is unnecessary unless the string contains an + apostrophe, a comma, or backslash (other than backslash-backslash). + YYSTR is taken from yytname. */ + std::string + parser::yytnamerr_ (const char *yystr) + { + if (*yystr == '"') + { + std::string yyr; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; + + append: + default: + yyr += *yyp; + break; + + case '"': + return yyr; + } + do_not_strip_quotes: ; + } + + return yystr; + } + + std::string + parser::symbol_name (symbol_kind_type yysymbol) + { + return yytnamerr_ (yytname_[yysymbol]); + } + + + + // parser::context. + parser::context::context (const parser& yyparser, const symbol_type& yyla) + : yyparser_ (yyparser) + , yyla_ (yyla) + {} + + int + parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const + { + // Actual number of expected tokens + int yycount = 0; + +#if YYDEBUG + // Execute LAC once. We don't care if it is successful, we + // only do it for the sake of debugging output. + if (!yyparser_.yy_lac_established_) + yyparser_.yy_lac_check_ (yyla_.kind ()); +#endif + + for (int yyx = 0; yyx < YYNTOKENS; ++yyx) + { + symbol_kind_type yysym = YY_CAST (symbol_kind_type, yyx); + if (yysym != symbol_kind::S_YYerror + && yysym != symbol_kind::S_YYUNDEF + && yyparser_.yy_lac_check_ (yysym)) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = yysym; + } + } + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = symbol_kind::S_YYEMPTY; + return yycount; + } + + + bool + parser::yy_lac_check_ (symbol_kind_type yytoken) const + { + // Logically, the yylac_stack's lifetime is confined to this function. + // Clear it, to get rid of potential left-overs from previous call. + yylac_stack_.clear (); + // Reduce until we encounter a shift and thereby accept the token. +#if YYDEBUG + YYCDEBUG << "LAC: checking lookahead " << symbol_name (yytoken) << ':'; +#endif + std::ptrdiff_t lac_top = 0; + while (true) + { + state_type top_state = (yylac_stack_.empty () + ? yystack_[lac_top].state + : yylac_stack_.back ()); + int yyrule = yypact_[+top_state]; + if (yy_pact_value_is_default_ (yyrule) + || (yyrule += yytoken) < 0 || yylast_ < yyrule + || yycheck_[yyrule] != yytoken) + { + // Use the default action. + yyrule = yydefact_[+top_state]; + if (yyrule == 0) + { + YYCDEBUG << " Err\n"; + return false; + } + } + else + { + // Use the action from yytable. + yyrule = yytable_[yyrule]; + if (yy_table_value_is_error_ (yyrule)) + { + YYCDEBUG << " Err\n"; + return false; + } + if (0 < yyrule) + { + YYCDEBUG << " S" << yyrule << '\n'; + return true; + } + yyrule = -yyrule; + } + // By now we know we have to simulate a reduce. + YYCDEBUG << " R" << yyrule - 1; + // Pop the corresponding number of values from the stack. + { + std::ptrdiff_t yylen = yyr2_[yyrule]; + // First pop from the LAC stack as many tokens as possible. + std::ptrdiff_t lac_size = std::ptrdiff_t (yylac_stack_.size ()); + if (yylen < lac_size) + { + yylac_stack_.resize (std::size_t (lac_size - yylen)); + yylen = 0; + } + else if (lac_size) + { + yylac_stack_.clear (); + yylen -= lac_size; + } + // Only afterwards look at the main stack. + // We simulate popping elements by incrementing lac_top. + lac_top += yylen; + } + // Keep top_state in sync with the updated stack. + top_state = (yylac_stack_.empty () + ? yystack_[lac_top].state + : yylac_stack_.back ()); + // Push the resulting state of the reduction. + state_type state = yy_lr_goto_state_ (top_state, yyr1_[yyrule]); + YYCDEBUG << " G" << int (state); + yylac_stack_.push_back (state); + } + } + + // Establish the initial context if no initial context currently exists. + bool + parser::yy_lac_establish_ (symbol_kind_type yytoken) + { + /* Establish the initial context for the current lookahead if no initial + context is currently established. + + We define a context as a snapshot of the parser stacks. We define + the initial context for a lookahead as the context in which the + parser initially examines that lookahead in order to select a + syntactic action. Thus, if the lookahead eventually proves + syntactically unacceptable (possibly in a later context reached via a + series of reductions), the initial context can be used to determine + the exact set of tokens that would be syntactically acceptable in the + lookahead's place. Moreover, it is the context after which any + further semantic actions would be erroneous because they would be + determined by a syntactically unacceptable token. + + yy_lac_establish_ should be invoked when a reduction is about to be + performed in an inconsistent state (which, for the purposes of LAC, + includes consistent states that don't know they're consistent because + their default reductions have been disabled). + + For parse.lac=full, the implementation of yy_lac_establish_ is as + follows. If no initial context is currently established for the + current lookahead, then check if that lookahead can eventually be + shifted if syntactic actions continue from the current context. */ + if (!yy_lac_established_) + { +#if YYDEBUG + YYCDEBUG << "LAC: initial context established for " + << symbol_name (yytoken) << '\n'; +#endif + yy_lac_established_ = true; + return yy_lac_check_ (yytoken); + } + return true; + } + + // Discard any previous initial lookahead context. + void + parser::yy_lac_discard_ (const char* evt) + { + /* Discard any previous initial lookahead context because of Event, + which may be a lookahead change or an invalidation of the currently + established initial context for the current lookahead. + + The most common example of a lookahead change is a shift. An example + of both cases is syntax error recovery. That is, a syntax error + occurs when the lookahead is syntactically erroneous for the + currently established initial context, so error recovery manipulates + the parser stacks to try to find a new initial context in which the + current lookahead is syntactically acceptable. If it fails to find + such a context, it discards the lookahead. */ + if (yy_lac_established_) + { + YYCDEBUG << "LAC: initial context discarded due to " + << evt << '\n'; + yy_lac_established_ = false; + } + } + + int + parser::yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const + { + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yyla) is + if this state is a consistent state with a default action. + Thus, detecting the absence of a lookahead is sufficient to + determine that there is no unexpected or expected token to + report. In that case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is + a consistent state with a default action. There might have + been a previous inconsistent state, consistent state with a + non-default action, or user semantic action that manipulated + yyla. (However, yyla is currently not documented for users.) + In the first two cases, it might appear that the current syntax + error should have been detected in the previous state when + yy_lac_check was invoked. However, at that time, there might + have been a different syntax error that discarded a different + initial context during error recovery, leaving behind the + current lookahead. + */ + + if (!yyctx.lookahead ().empty ()) + { + if (yyarg) + yyarg[0] = yyctx.token (); + int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); + return yyn + 1; + } + return 0; + } + + // Generate an error message. + std::string + parser::yysyntax_error_ (const context& yyctx) const + { + // Its maximum. + enum { YYARGS_MAX = 5 }; + // Arguments of yyformat. + symbol_kind_type yyarg[YYARGS_MAX]; + int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); + + char const* yyformat = YY_NULLPTR; + switch (yycount) + { +#define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + default: // Avoid compiler warnings. + YYCASE_ (0, YY_("syntax error")); + YYCASE_ (1, YY_("syntax error, unexpected %s")); + YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +#undef YYCASE_ + } + + std::string yyres; + // Argument number. + std::ptrdiff_t yyi = 0; + for (char const* yyp = yyformat; *yyp; ++yyp) + if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) + { + yyres += symbol_name (yyarg[yyi++]); + ++yyp; + } + else + yyres += *yyp; + return yyres; + } + + + const signed char parser::yypact_ninf_ = -52; + + const signed char parser::yytable_ninf_ = -12; + + const short + parser::yypact_[] = + { + 3, -52, -41, -39, -52, -52, -3, 5, 5, 5, + 7, 44, 10, 0, 101, 18, 30, 94, 51, 50, + -52, 20, -52, 13, -52, 88, 17, -52, -52, 129, + -52, -52, 2, 85, -52, -52, 1, 1, -52, -52, + 40, -52, -52, -52, 42, 58, -52, 28, 96, 120, + 120, 120, 120, 15, -52, -52, -52, -52, -52, -52, + -52, -52, 120, -52, -52, -52, -52, -52, -52, -52, + -52, 120, -52, 63, -52, 63, -52, -52, -52, -52, + -52, -52, -52, 120, -52, -52, -52, -52, 5, -52, + -52, -52, -52, 120, -52, -52, -52, -52, 3, -52, + 1, 5, 45, 130, -52, 1, 1, -52, 177, 162, + -52, 97, 132, -52, -52, -52, -52, 87, -52, -52, + 1, 5, 5, 5, 5, -52, 5, 5, -52, -52, + -52, -52, 29, 118, 5, -52, 170, -52, -52, -52, + 107, 177, 1, 1, 1, 1, 1, 1, 1, -52, + -52, -51, -52, 177, 119, -52, -52, -52, -52, -52, + -52, -52, 82, -52, -52, -52, 107, 107, 184, 184, + -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52 + }; + + const signed char + parser::yydefact_[] = + { + 0, 12, 0, 0, 21, 22, 0, 0, 0, 0, + 0, 69, 0, 0, 0, 113, 115, 0, 123, 0, + 47, 0, 124, 0, 28, 0, 0, 3, 10, 9, + 6, 7, 46, 0, 126, 5, 0, 0, 30, 29, + 20, 23, 16, 27, 0, 0, 67, 0, 0, 75, + 75, 75, 75, 0, 51, 76, 79, 77, 78, 80, + 81, 82, 75, 83, 86, 87, 84, 85, 90, 89, + 88, 75, 112, 118, 114, 118, 91, 92, 93, 94, + 95, 96, 97, 75, 120, 122, 121, 119, 0, 108, + 111, 109, 110, 75, 125, 13, 1, 2, 0, 8, + 0, 0, 45, 44, 14, 0, 0, 32, 15, 0, + 19, 18, 0, 68, 62, 64, 63, 0, 65, 74, + 0, 0, 0, 0, 0, 49, 0, 0, 116, 117, + 54, 55, 107, 58, 0, 4, 0, 61, 43, 42, + 40, 41, 0, 0, 0, 0, 0, 0, 0, 31, + 17, 0, 66, 48, 71, 73, 72, 50, 52, 53, + 105, 106, 0, 57, 59, 60, 33, 34, 35, 36, + 37, 38, 39, 25, 26, 24, 70, 98, 101, 99, + 100, 103, 104, 102, 56 + }; + + const short + parser::yypgoto_[] = + { + -52, -52, -52, 98, -52, -52, -52, -7, -14, 168, + -52, 99, 102, -52, 148, 25, -52, -52, -52, -52, + -52, -52, -52, -52, 128, -52, 199 + }; + + const short + parser::yydefgoto_[] = + { + -1, 25, 26, 27, 28, 29, 30, 107, 108, 31, + 32, 102, 103, 49, 54, 120, 62, 71, 83, 184, + 162, 93, 73, 75, 130, 88, 33 + }; + + const short + parser::yytable_[] = + { + 40, 41, 42, -11, 1, 53, -11, 37, 43, 2, + 100, 37, 105, 173, 174, 2, 37, 97, 175, 124, + 98, 106, 34, 109, 35, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 55, 56, 116, 117, 50, 160, 161, + 51, 52, 50, 57, 58, 51, 52, 59, 60, 21, + 22, 61, 101, 45, 38, 21, 22, 72, 38, 23, + 39, 24, 44, 38, 39, 121, 122, 123, 74, 39, + 95, 133, 84, 94, 46, 110, 136, 126, 96, 85, + 104, 140, 141, 89, 137, 90, 127, 47, 48, 111, + 113, 86, 87, 91, 92, 101, 153, 112, 132, 128, + 129, 114, 115, 118, 154, 155, 156, 157, 134, 158, + 159, 146, 147, 148, 119, 177, 178, 164, 166, 167, + 168, 169, 170, 171, 172, 179, 180, 76, 100, 181, + 182, 152, 150, 183, 63, 64, 65, 77, 78, 79, + 80, 81, 82, 151, 66, 67, 68, 69, 70, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 149, + 163, 176, 142, 143, 144, 145, 146, 147, 148, 165, + 142, 143, 144, 145, 146, 147, 148, 142, 143, 144, + 145, 146, 147, 148, 142, 143, 135, 99, 146, 147, + 148, 125, 139, 131, 138, 36 + }; + + const unsigned char + parser::yycheck_[] = + { + 7, 8, 9, 0, 1, 12, 3, 6, 1, 12, + 8, 6, 11, 64, 65, 12, 6, 0, 69, 4, + 3, 20, 63, 37, 63, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 43, 44, 17, 18, 37, 19, 20, + 40, 41, 37, 53, 54, 40, 41, 57, 58, 62, + 63, 61, 60, 19, 63, 62, 63, 49, 63, 66, + 69, 68, 65, 63, 69, 50, 51, 52, 48, 69, + 67, 88, 31, 63, 40, 45, 100, 62, 0, 38, + 5, 105, 106, 43, 101, 45, 71, 53, 54, 59, + 42, 50, 51, 53, 54, 60, 120, 65, 83, 46, + 47, 53, 54, 17, 121, 122, 123, 124, 93, 126, + 127, 14, 15, 16, 4, 43, 44, 134, 142, 143, + 144, 145, 146, 147, 148, 53, 54, 43, 8, 57, + 58, 54, 45, 61, 43, 44, 45, 53, 54, 55, + 56, 57, 58, 21, 53, 54, 55, 56, 57, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 7, + 52, 52, 10, 11, 12, 13, 14, 15, 16, 9, + 10, 11, 12, 13, 14, 15, 16, 10, 11, 12, + 13, 14, 15, 16, 10, 11, 98, 29, 14, 15, + 16, 53, 103, 75, 102, 6 + }; + + const signed char + parser::yystos_[] = + { + 0, 1, 12, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 62, 63, 66, 68, 71, 72, 73, 74, 75, + 76, 79, 80, 96, 63, 63, 96, 6, 63, 69, + 77, 77, 77, 1, 65, 19, 40, 53, 54, 83, + 37, 40, 41, 77, 84, 43, 44, 53, 54, 57, + 58, 61, 86, 43, 44, 45, 53, 54, 55, 56, + 57, 87, 49, 92, 48, 93, 43, 53, 54, 55, + 56, 57, 58, 88, 31, 38, 50, 51, 95, 43, + 45, 53, 54, 91, 63, 67, 0, 0, 3, 79, + 8, 60, 81, 82, 5, 11, 20, 77, 78, 78, + 45, 59, 65, 42, 53, 54, 17, 18, 17, 4, + 85, 85, 85, 85, 4, 84, 85, 85, 46, 47, + 94, 94, 85, 77, 85, 73, 78, 77, 82, 81, + 78, 78, 10, 11, 12, 13, 14, 15, 16, 7, + 45, 21, 54, 78, 77, 77, 77, 77, 77, 77, + 19, 20, 90, 52, 77, 9, 78, 78, 78, 78, + 78, 78, 78, 64, 65, 69, 52, 43, 44, 53, + 54, 57, 58, 61, 89 + }; + + const signed char + parser::yyr1_[] = + { + 0, 70, 71, 72, 72, 73, 73, 73, 73, 73, + 73, 73, 73, 74, 75, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, + 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 79, 79, 79, 79, 79, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 81, 82, 83, 83, 83, 83, 83, 83, 83, 83, + 84, 84, 84, 84, 85, 85, 86, 86, 86, 86, + 86, 86, 86, 87, 87, 87, 87, 87, 87, 87, + 87, 88, 88, 88, 88, 88, 88, 88, 89, 89, + 89, 89, 89, 89, 89, 90, 90, 90, 91, 91, + 91, 91, 92, 92, 93, 93, 94, 94, 94, 95, + 95, 95, 95, 95, 96, 96, 96 + }; + + const signed char + parser::yyr2_[] = + { + 0, 2, 2, 1, 3, 2, 1, 1, 2, 1, + 1, 0, 1, 2, 2, 3, 2, 4, 3, 3, + 2, 1, 1, 2, 5, 5, 5, 2, 1, 1, + 1, 3, 1, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 3, 3, 2, 2, 1, 1, 4, 3, + 4, 2, 4, 4, 3, 3, 5, 4, 3, 4, + 3, 2, 2, 2, 2, 2, 3, 1, 2, 0, + 4, 3, 3, 3, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, + 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, + 1, 1, 1, 0, 1, 2, 2 + }; + + +#if YYDEBUG || 1 + // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. + const char* + const parser::yytname_[] = + { + "\"end of file\"", "error", "\"invalid token\"", "\"end of line\"", + "\",\"", "\":\"", "\"(\"", "\")\"", "\"[\"", "\"]\"", "\"+\"", "\"-\"", + "\"*\"", "\"/\"", "\"|\"", "\"&\"", "\"^\"", "\"--\"", "\"!=\"", "\"!\"", + "\"::\"", "\"=\"", "\".program\"", "\".wrap_target\"", "\".wrap\"", + "\".define\"", "\".side_set\"", "\".word\"", "\".origin\"", + "\".lang_opt\"", "\"jmp\"", "\"wait\"", "\"in\"", "\"out\"", "\"push\"", + "\"pull\"", "\"mov\"", "\"irq\"", "\"set\"", "\"nop\"", "\"pin\"", + "\"gpio\"", "\"osre\"", "\"pins\"", "\"null\"", "\"pindirs\"", + "\"block\"", "\"noblock\"", "\"ifempty\"", "\"iffull\"", "\"nowait\"", + "\"clear\"", "\"rel\"", "\"x\"", "\"y\"", "\"exec\"", "\"pc\"", + "\"isr\"", "\"osr\"", "\"opt\"", "\"side\"", "\"status\"", "\"public\"", + "\"identifier\"", "\"string\"", "\"text\"", "\"code block\"", "\"%}\"", + "UNKNOWN_DIRECTIVE", "\"integer\"", "$accept", "file", "lines", "line", + "code_block", "label_decl", "directive", "value", "expression", + "instruction", "base_instruction", "delay", "sideset", "condition", + "wait_source", "comma", "in_source", "out_target", "mov_target", + "mov_source", "mov_op", "set_target", "if_full", "if_empty", "blocking", + "irq_modifiers", "symbol_def", YY_NULLPTR + }; +#endif + + +#if YYDEBUG + const short + parser::yyrline_[] = + { + 0, 136, 136, 140, 141, 144, 145, 146, 147, 148, + 149, 150, 151, 155, 159, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 180, + 181, 182, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 199, 200, 201, 202, 203, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 224, 228, 232, 233, 234, 235, 236, 237, 238, 239, + 243, 244, 245, 246, 248, 248, 251, 252, 253, 254, + 255, 256, 257, 260, 261, 262, 263, 264, 265, 266, + 267, 270, 271, 272, 273, 274, 275, 276, 279, 280, + 281, 282, 283, 284, 285, 289, 290, 291, 295, 296, + 297, 298, 302, 303, 307, 308, 312, 313, 314, 318, + 319, 320, 321, 322, 326, 327, 328 + }; + + void + parser::yy_stack_print_ () const + { + *yycdebug_ << "Stack now"; + for (stack_type::const_iterator + i = yystack_.begin (), + i_end = yystack_.end (); + i != i_end; ++i) + *yycdebug_ << ' ' << int (i->state); + *yycdebug_ << '\n'; + } + + void + parser::yy_reduce_print_ (int yyrule) const + { + int yylno = yyrline_[yyrule]; + int yynrhs = yyr2_[yyrule]; + // Print the symbols being reduced, and their result. + *yycdebug_ << "Reducing stack by rule " << yyrule - 1 + << " (line " << yylno << "):\n"; + // The symbols being reduced. + for (int yyi = 0; yyi < yynrhs; yyi++) + YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", + yystack_[(yynrhs) - (yyi + 1)]); + } +#endif // YYDEBUG + + +} // yy + + +void yy::parser::error(const location_type& l, const std::string& m) +{ + if (l.begin.filename) { + std::cerr << l << ": " << m << '\n'; + pioasm.error_count++; + if (l.begin.line == l.end.line && *l.begin.filename == *l.end.filename) { + std::ifstream file(l.begin.filename->c_str()); + std::string line; + for(int i = 0; i < l.begin.line; ++i) { + std::getline(file, line); + } + fprintf(stderr, "%5d | %s\n", l.begin.line, line.c_str()); + fprintf(stderr, "%5s | %*s", "", l.begin.column, "^"); + for (int i = l.begin.column; i < l.end.column - 1; i++) { + putc ('~', stderr); + } + putc ('\n', stderr); + } + } else { + std::cerr << m << '\n'; + } +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.hpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.hpp new file mode 100644 index 0000000000..11d83931a2 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/gen/parser.hpp @@ -0,0 +1,2894 @@ +// A Bison parser, made by GNU Bison 3.7.2. + +// Skeleton interface for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + + +/** + ** \file pico_sdk/tools/pioasm/gen/parser.hpp + ** Define the yy::parser class. + */ + +// C++ LALR(1) parser skeleton written by Akim Demaille. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + +#ifndef YY_YY_HOME_GRAHAM_DEV_MU_PICO_SDK_TOOLS_PIOASM_GEN_PARSER_HPP_INCLUDED +# define YY_YY_HOME_GRAHAM_DEV_MU_PICO_SDK_TOOLS_PIOASM_GEN_PARSER_HPP_INCLUDED +// "%code requires" blocks. + + #include + #include + #include + #include "pio_types.h" + struct pio_assembler; + + #ifdef _MSC_VER + #pragma warning(disable : 4065) // default only switch statement + #endif + + + +# include // std::abort +# include +# include +# include +# include + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif +# include "location.h" + +#ifndef YY_ASSERT +# include +# define YY_ASSERT assert +#endif + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +namespace yy { + + + + + /// A Bison parser. + class parser + { + public: +#ifndef YYSTYPE + /// A buffer to store and retrieve objects. + /// + /// Sort of a variant, but does not keep track of the nature + /// of the stored data, since that knowledge is available + /// via the current parser state. + class semantic_type + { + public: + /// Type of *this. + typedef semantic_type self_type; + + /// Empty construction. + semantic_type () YY_NOEXCEPT + : yybuffer_ () + {} + + /// Construct and fill. + template + semantic_type (YY_RVREF (T) t) + { + YY_ASSERT (sizeof (T) <= size); + new (yyas_ ()) T (YY_MOVE (t)); + } + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + semantic_type (const self_type&) = delete; + /// Non copyable. + self_type& operator= (const self_type&) = delete; +#endif + + /// Destruction, allowed only if empty. + ~semantic_type () YY_NOEXCEPT + {} + +# if 201103L <= YY_CPLUSPLUS + /// Instantiate a \a T in here from \a t. + template + T& + emplace (U&&... u) + { + return *new (yyas_ ()) T (std::forward (u)...); + } +# else + /// Instantiate an empty \a T in here. + template + T& + emplace () + { + return *new (yyas_ ()) T (); + } + + /// Instantiate a \a T in here from \a t. + template + T& + emplace (const T& t) + { + return *new (yyas_ ()) T (t); + } +# endif + + /// Instantiate an empty \a T in here. + /// Obsolete, use emplace. + template + T& + build () + { + return emplace (); + } + + /// Instantiate a \a T in here from \a t. + /// Obsolete, use emplace. + template + T& + build (const T& t) + { + return emplace (t); + } + + /// Accessor to a built \a T. + template + T& + as () YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Const accessor to a built \a T (for %printer). + template + const T& + as () const YY_NOEXCEPT + { + return *yyas_ (); + } + + /// Swap the content with \a that, of same type. + /// + /// Both variants must be built beforehand, because swapping the actual + /// data requires reading it (with as()), and this is not possible on + /// unconstructed variants: it would require some dynamic testing, which + /// should not be the variant's responsibility. + /// Swapping between built and (possibly) non-built is done with + /// self_type::move (). + template + void + swap (self_type& that) YY_NOEXCEPT + { + std::swap (as (), that.as ()); + } + + /// Move the content of \a that to this. + /// + /// Destroys \a that. + template + void + move (self_type& that) + { +# if 201103L <= YY_CPLUSPLUS + emplace (std::move (that.as ())); +# else + emplace (); + swap (that); +# endif + that.destroy (); + } + +# if 201103L <= YY_CPLUSPLUS + /// Move the content of \a that to this. + template + void + move (self_type&& that) + { + emplace (std::move (that.as ())); + that.destroy (); + } +#endif + + /// Copy the content of \a that to this. + template + void + copy (const self_type& that) + { + emplace (that.as ()); + } + + /// Destroy the stored \a T. + template + void + destroy () + { + as ().~T (); + } + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + semantic_type (const self_type&); + /// Non copyable. + self_type& operator= (const self_type&); +#endif + + /// Accessor to raw memory as \a T. + template + T* + yyas_ () YY_NOEXCEPT + { + void *yyp = yybuffer_.yyraw; + return static_cast (yyp); + } + + /// Const accessor to raw memory as \a T. + template + const T* + yyas_ () const YY_NOEXCEPT + { + const void *yyp = yybuffer_.yyraw; + return static_cast (yyp); + } + + /// An auxiliary type to compute the largest semantic type. + union union_type + { + // if_full + // if_empty + // blocking + char dummy1[sizeof (bool)]; + + // condition + char dummy2[sizeof (enum condition)]; + + // in_source + // out_target + // set_target + char dummy3[sizeof (enum in_out_set)]; + + // irq_modifiers + char dummy4[sizeof (enum irq)]; + + // mov_target + // mov_source + char dummy5[sizeof (enum mov)]; + + // mov_op + char dummy6[sizeof (enum mov_op)]; + + // "integer" + char dummy7[sizeof (int)]; + + // instruction + // base_instruction + char dummy8[sizeof (std::shared_ptr)]; + + // value + // expression + // delay + // sideset + char dummy9[sizeof (std::shared_ptr)]; + + // label_decl + // symbol_def + char dummy10[sizeof (std::shared_ptr)]; + + // wait_source + char dummy11[sizeof (std::shared_ptr)]; + + // "identifier" + // "string" + // "text" + // "code block" + // "%}" + // UNKNOWN_DIRECTIVE + char dummy12[sizeof (std::string)]; + }; + + /// The size of the largest semantic type. + enum { size = sizeof (union_type) }; + + /// A buffer to store semantic values. + union + { + /// Strongest alignment constraints. + long double yyalign_me; + /// A buffer large enough to store any of the semantic values. + char yyraw[size]; + } yybuffer_; + }; + +#else + typedef YYSTYPE semantic_type; +#endif + /// Symbol locations. + typedef location location_type; + + /// Syntax errors thrown from user actions. + struct syntax_error : std::runtime_error + { + syntax_error (const location_type& l, const std::string& m) + : std::runtime_error (m) + , location (l) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + , location (s.location) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + + location_type location; + }; + + /// Token kinds. + struct token + { + enum token_kind_type + { + TOK_YYEMPTY = -2, + TOK_END = 0, // "end of file" + TOK_YYerror = 256, // error + TOK_YYUNDEF = 257, // "invalid token" + TOK_NEWLINE = 258, // "end of line" + TOK_COMMA = 259, // "," + TOK_COLON = 260, // ":" + TOK_LPAREN = 261, // "(" + TOK_RPAREN = 262, // ")" + TOK_LBRACKET = 263, // "[" + TOK_RBRACKET = 264, // "]" + TOK_PLUS = 265, // "+" + TOK_MINUS = 266, // "-" + TOK_MULTIPLY = 267, // "*" + TOK_DIVIDE = 268, // "/" + TOK_OR = 269, // "|" + TOK_AND = 270, // "&" + TOK_XOR = 271, // "^" + TOK_POST_DECREMENT = 272, // "--" + TOK_NOT_EQUAL = 273, // "!=" + TOK_NOT = 274, // "!" + TOK_REVERSE = 275, // "::" + TOK_EQUAL = 276, // "=" + TOK_PROGRAM = 277, // ".program" + TOK_WRAP_TARGET = 278, // ".wrap_target" + TOK_WRAP = 279, // ".wrap" + TOK_DEFINE = 280, // ".define" + TOK_SIDE_SET = 281, // ".side_set" + TOK_WORD = 282, // ".word" + TOK_ORIGIN = 283, // ".origin" + TOK_LANG_OPT = 284, // ".lang_opt" + TOK_JMP = 285, // "jmp" + TOK_WAIT = 286, // "wait" + TOK_IN = 287, // "in" + TOK_OUT = 288, // "out" + TOK_PUSH = 289, // "push" + TOK_PULL = 290, // "pull" + TOK_MOV = 291, // "mov" + TOK_IRQ = 292, // "irq" + TOK_SET = 293, // "set" + TOK_NOP = 294, // "nop" + TOK_PIN = 295, // "pin" + TOK_GPIO = 296, // "gpio" + TOK_OSRE = 297, // "osre" + TOK_PINS = 298, // "pins" + TOK_NULL = 299, // "null" + TOK_PINDIRS = 300, // "pindirs" + TOK_BLOCK = 301, // "block" + TOK_NOBLOCK = 302, // "noblock" + TOK_IFEMPTY = 303, // "ifempty" + TOK_IFFULL = 304, // "iffull" + TOK_NOWAIT = 305, // "nowait" + TOK_CLEAR = 306, // "clear" + TOK_REL = 307, // "rel" + TOK_X = 308, // "x" + TOK_Y = 309, // "y" + TOK_EXEC = 310, // "exec" + TOK_PC = 311, // "pc" + TOK_ISR = 312, // "isr" + TOK_OSR = 313, // "osr" + TOK_OPTIONAL = 314, // "opt" + TOK_SIDE = 315, // "side" + TOK_STATUS = 316, // "status" + TOK_PUBLIC = 317, // "public" + TOK_ID = 318, // "identifier" + TOK_STRING = 319, // "string" + TOK_NON_WS = 320, // "text" + TOK_CODE_BLOCK_START = 321, // "code block" + TOK_CODE_BLOCK_CONTENTS = 322, // "%}" + TOK_UNKNOWN_DIRECTIVE = 323, // UNKNOWN_DIRECTIVE + TOK_INT = 324 // "integer" + }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; + }; + + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 70, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_NEWLINE = 3, // "end of line" + S_COMMA = 4, // "," + S_COLON = 5, // ":" + S_LPAREN = 6, // "(" + S_RPAREN = 7, // ")" + S_LBRACKET = 8, // "[" + S_RBRACKET = 9, // "]" + S_PLUS = 10, // "+" + S_MINUS = 11, // "-" + S_MULTIPLY = 12, // "*" + S_DIVIDE = 13, // "/" + S_OR = 14, // "|" + S_AND = 15, // "&" + S_XOR = 16, // "^" + S_POST_DECREMENT = 17, // "--" + S_NOT_EQUAL = 18, // "!=" + S_NOT = 19, // "!" + S_REVERSE = 20, // "::" + S_EQUAL = 21, // "=" + S_PROGRAM = 22, // ".program" + S_WRAP_TARGET = 23, // ".wrap_target" + S_WRAP = 24, // ".wrap" + S_DEFINE = 25, // ".define" + S_SIDE_SET = 26, // ".side_set" + S_WORD = 27, // ".word" + S_ORIGIN = 28, // ".origin" + S_LANG_OPT = 29, // ".lang_opt" + S_JMP = 30, // "jmp" + S_WAIT = 31, // "wait" + S_IN = 32, // "in" + S_OUT = 33, // "out" + S_PUSH = 34, // "push" + S_PULL = 35, // "pull" + S_MOV = 36, // "mov" + S_IRQ = 37, // "irq" + S_SET = 38, // "set" + S_NOP = 39, // "nop" + S_PIN = 40, // "pin" + S_GPIO = 41, // "gpio" + S_OSRE = 42, // "osre" + S_PINS = 43, // "pins" + S_NULL = 44, // "null" + S_PINDIRS = 45, // "pindirs" + S_BLOCK = 46, // "block" + S_NOBLOCK = 47, // "noblock" + S_IFEMPTY = 48, // "ifempty" + S_IFFULL = 49, // "iffull" + S_NOWAIT = 50, // "nowait" + S_CLEAR = 51, // "clear" + S_REL = 52, // "rel" + S_X = 53, // "x" + S_Y = 54, // "y" + S_EXEC = 55, // "exec" + S_PC = 56, // "pc" + S_ISR = 57, // "isr" + S_OSR = 58, // "osr" + S_OPTIONAL = 59, // "opt" + S_SIDE = 60, // "side" + S_STATUS = 61, // "status" + S_PUBLIC = 62, // "public" + S_ID = 63, // "identifier" + S_STRING = 64, // "string" + S_NON_WS = 65, // "text" + S_CODE_BLOCK_START = 66, // "code block" + S_CODE_BLOCK_CONTENTS = 67, // "%}" + S_UNKNOWN_DIRECTIVE = 68, // UNKNOWN_DIRECTIVE + S_INT = 69, // "integer" + S_YYACCEPT = 70, // $accept + S_file = 71, // file + S_lines = 72, // lines + S_line = 73, // line + S_code_block = 74, // code_block + S_label_decl = 75, // label_decl + S_directive = 76, // directive + S_value = 77, // value + S_expression = 78, // expression + S_instruction = 79, // instruction + S_base_instruction = 80, // base_instruction + S_delay = 81, // delay + S_sideset = 82, // sideset + S_condition = 83, // condition + S_wait_source = 84, // wait_source + S_comma = 85, // comma + S_in_source = 86, // in_source + S_out_target = 87, // out_target + S_mov_target = 88, // mov_target + S_mov_source = 89, // mov_source + S_mov_op = 90, // mov_op + S_set_target = 91, // set_target + S_if_full = 92, // if_full + S_if_empty = 93, // if_empty + S_blocking = 94, // blocking + S_irq_modifiers = 95, // irq_modifiers + S_symbol_def = 96 // symbol_def + }; + }; + + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; + + /// A complete symbol. + /// + /// Expects its Base type to provide access to the symbol kind + /// via kind (). + /// + /// Provide access to semantic value and location. + template + struct basic_symbol : Base + { + /// Alias to Base. + typedef Base super_type; + + /// Default constructor. + basic_symbol () + : value () + , location () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value () + , location (std::move (that.location)) + { + switch (this->kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.move< bool > (std::move (that.value)); + break; + + case symbol_kind::S_condition: // condition + value.move< enum condition > (std::move (that.value)); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.move< enum in_out_set > (std::move (that.value)); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.move< enum irq > (std::move (that.value)); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.move< enum mov > (std::move (that.value)); + break; + + case symbol_kind::S_mov_op: // mov_op + value.move< enum mov_op > (std::move (that.value)); + break; + + case symbol_kind::S_INT: // "integer" + value.move< int > (std::move (that.value)); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.move< std::shared_ptr > (std::move (that.value)); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.move< std::shared_ptr > (std::move (that.value)); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.move< std::shared_ptr > (std::move (that.value)); + break; + + case symbol_kind::S_wait_source: // wait_source + value.move< std::shared_ptr > (std::move (that.value)); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.move< std::string > (std::move (that.value)); + break; + + default: + break; + } + + } +#endif + + /// Copy constructor. + basic_symbol (const basic_symbol& that); + + /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, location_type&& l) + : Base (t) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const location_type& l) + : Base (t) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, bool&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const bool& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, enum condition&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const enum condition& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, enum in_out_set&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const enum in_out_set& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, enum irq&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const enum irq& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, enum mov&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const enum mov& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, enum mov_op&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const enum mov_op& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, int&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const int& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::shared_ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::shared_ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::shared_ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::shared_ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::shared_ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::shared_ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::shared_ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::shared_ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } + + /// Destroy contents, and record that is empty. + void clear () + { + // User destructor. + symbol_kind_type yykind = this->kind (); + basic_symbol& yysym = *this; + (void) yysym; + switch (yykind) + { + default: + break; + } + + // Value type destructor. +switch (yykind) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.template destroy< bool > (); + break; + + case symbol_kind::S_condition: // condition + value.template destroy< enum condition > (); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.template destroy< enum in_out_set > (); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.template destroy< enum irq > (); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.template destroy< enum mov > (); + break; + + case symbol_kind::S_mov_op: // mov_op + value.template destroy< enum mov_op > (); + break; + + case symbol_kind::S_INT: // "integer" + value.template destroy< int > (); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.template destroy< std::shared_ptr > (); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.template destroy< std::shared_ptr > (); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.template destroy< std::shared_ptr > (); + break; + + case symbol_kind::S_wait_source: // wait_source + value.template destroy< std::shared_ptr > (); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.template destroy< std::string > (); + break; + + default: + break; + } + + Base::clear (); + } + + /// The user-facing name of this symbol. + std::string name () const YY_NOEXCEPT + { + return parser::symbol_name (this->kind ()); + } + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// Whether empty. + bool empty () const YY_NOEXCEPT; + + /// Destructive move, \a s is emptied into this. + void move (basic_symbol& s); + + /// The semantic value. + semantic_type value; + + /// The location. + location_type location; + + private: +#if YY_CPLUSPLUS < 201103L + /// Assignment operator. + basic_symbol& operator= (const basic_symbol& that); +#endif + }; + + /// Type access provider for token (enum) based symbols. + struct by_kind + { + /// Default constructor. + by_kind (); + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_kind (by_kind&& that); +#endif + + /// Copy constructor. + by_kind (const by_kind& that); + + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; + + /// Constructor from (external) token numbers. + by_kind (kind_type t); + + /// Record that this symbol is empty. + void clear (); + + /// Steal the symbol kind from \a that. + void move (by_kind& that); + + /// The (internal) type number (corresponding to \a type). + /// \a empty when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; + }; + + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + + /// "External" symbols: returned by the scanner. + struct symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + + /// Empty symbol. + symbol_type () {} + + /// Constructor for valueless symbols, and symbols from each type. +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, location_type l) + : super_type(token_type (tok), std::move (l)) + { + YY_ASSERT (tok == token::TOK_END || tok == token::TOK_YYerror || tok == token::TOK_YYUNDEF || tok == token::TOK_NEWLINE || tok == token::TOK_COMMA || tok == token::TOK_COLON || tok == token::TOK_LPAREN || tok == token::TOK_RPAREN || tok == token::TOK_LBRACKET || tok == token::TOK_RBRACKET || tok == token::TOK_PLUS || tok == token::TOK_MINUS || tok == token::TOK_MULTIPLY || tok == token::TOK_DIVIDE || tok == token::TOK_OR || tok == token::TOK_AND || tok == token::TOK_XOR || tok == token::TOK_POST_DECREMENT || tok == token::TOK_NOT_EQUAL || tok == token::TOK_NOT || tok == token::TOK_REVERSE || tok == token::TOK_EQUAL || tok == token::TOK_PROGRAM || tok == token::TOK_WRAP_TARGET || tok == token::TOK_WRAP || tok == token::TOK_DEFINE || tok == token::TOK_SIDE_SET || tok == token::TOK_WORD || tok == token::TOK_ORIGIN || tok == token::TOK_LANG_OPT || tok == token::TOK_JMP || tok == token::TOK_WAIT || tok == token::TOK_IN || tok == token::TOK_OUT || tok == token::TOK_PUSH || tok == token::TOK_PULL || tok == token::TOK_MOV || tok == token::TOK_IRQ || tok == token::TOK_SET || tok == token::TOK_NOP || tok == token::TOK_PIN || tok == token::TOK_GPIO || tok == token::TOK_OSRE || tok == token::TOK_PINS || tok == token::TOK_NULL || tok == token::TOK_PINDIRS || tok == token::TOK_BLOCK || tok == token::TOK_NOBLOCK || tok == token::TOK_IFEMPTY || tok == token::TOK_IFFULL || tok == token::TOK_NOWAIT || tok == token::TOK_CLEAR || tok == token::TOK_REL || tok == token::TOK_X || tok == token::TOK_Y || tok == token::TOK_EXEC || tok == token::TOK_PC || tok == token::TOK_ISR || tok == token::TOK_OSR || tok == token::TOK_OPTIONAL || tok == token::TOK_SIDE || tok == token::TOK_STATUS || tok == token::TOK_PUBLIC); + } +#else + symbol_type (int tok, const location_type& l) + : super_type(token_type (tok), l) + { + YY_ASSERT (tok == token::TOK_END || tok == token::TOK_YYerror || tok == token::TOK_YYUNDEF || tok == token::TOK_NEWLINE || tok == token::TOK_COMMA || tok == token::TOK_COLON || tok == token::TOK_LPAREN || tok == token::TOK_RPAREN || tok == token::TOK_LBRACKET || tok == token::TOK_RBRACKET || tok == token::TOK_PLUS || tok == token::TOK_MINUS || tok == token::TOK_MULTIPLY || tok == token::TOK_DIVIDE || tok == token::TOK_OR || tok == token::TOK_AND || tok == token::TOK_XOR || tok == token::TOK_POST_DECREMENT || tok == token::TOK_NOT_EQUAL || tok == token::TOK_NOT || tok == token::TOK_REVERSE || tok == token::TOK_EQUAL || tok == token::TOK_PROGRAM || tok == token::TOK_WRAP_TARGET || tok == token::TOK_WRAP || tok == token::TOK_DEFINE || tok == token::TOK_SIDE_SET || tok == token::TOK_WORD || tok == token::TOK_ORIGIN || tok == token::TOK_LANG_OPT || tok == token::TOK_JMP || tok == token::TOK_WAIT || tok == token::TOK_IN || tok == token::TOK_OUT || tok == token::TOK_PUSH || tok == token::TOK_PULL || tok == token::TOK_MOV || tok == token::TOK_IRQ || tok == token::TOK_SET || tok == token::TOK_NOP || tok == token::TOK_PIN || tok == token::TOK_GPIO || tok == token::TOK_OSRE || tok == token::TOK_PINS || tok == token::TOK_NULL || tok == token::TOK_PINDIRS || tok == token::TOK_BLOCK || tok == token::TOK_NOBLOCK || tok == token::TOK_IFEMPTY || tok == token::TOK_IFFULL || tok == token::TOK_NOWAIT || tok == token::TOK_CLEAR || tok == token::TOK_REL || tok == token::TOK_X || tok == token::TOK_Y || tok == token::TOK_EXEC || tok == token::TOK_PC || tok == token::TOK_ISR || tok == token::TOK_OSR || tok == token::TOK_OPTIONAL || tok == token::TOK_SIDE || tok == token::TOK_STATUS || tok == token::TOK_PUBLIC); + } +#endif +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, int v, location_type l) + : super_type(token_type (tok), std::move (v), std::move (l)) + { + YY_ASSERT (tok == token::TOK_INT); + } +#else + symbol_type (int tok, const int& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YY_ASSERT (tok == token::TOK_INT); + } +#endif +#if 201103L <= YY_CPLUSPLUS + symbol_type (int tok, std::string v, location_type l) + : super_type(token_type (tok), std::move (v), std::move (l)) + { + YY_ASSERT (tok == token::TOK_ID || tok == token::TOK_STRING || tok == token::TOK_NON_WS || tok == token::TOK_CODE_BLOCK_START || tok == token::TOK_CODE_BLOCK_CONTENTS || tok == token::TOK_UNKNOWN_DIRECTIVE); + } +#else + symbol_type (int tok, const std::string& v, const location_type& l) + : super_type(token_type (tok), v, l) + { + YY_ASSERT (tok == token::TOK_ID || tok == token::TOK_STRING || tok == token::TOK_NON_WS || tok == token::TOK_CODE_BLOCK_START || tok == token::TOK_CODE_BLOCK_CONTENTS || tok == token::TOK_UNKNOWN_DIRECTIVE); + } +#endif + }; + + /// Build a parser object. + parser (pio_assembler& pioasm_yyarg); + virtual ~parser (); + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + parser (const parser&) = delete; + /// Non copyable. + parser& operator= (const parser&) = delete; +#endif + + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + + /// Parse. + /// \returns 0 iff parsing succeeded. + virtual int parse (); + +#if YYDEBUG + /// The current debugging stream. + std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; + /// Set the current debugging stream. + void set_debug_stream (std::ostream &); + + /// Type for debugging levels. + typedef int debug_level_type; + /// The current debugging level. + debug_level_type debug_level () const YY_ATTRIBUTE_PURE; + /// Set the current debugging level. + void set_debug_level (debug_level_type l); +#endif + + /// Report a syntax error. + /// \param loc where the syntax error is found. + /// \param msg a description of the syntax error. + virtual void error (const location_type& loc, const std::string& msg); + + /// Report a syntax error. + void error (const syntax_error& err); + + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static std::string symbol_name (symbol_kind_type yysymbol); + + // Implementation of make_symbol for each symbol type. +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_END (location_type l) + { + return symbol_type (token::TOK_END, std::move (l)); + } +#else + static + symbol_type + make_END (const location_type& l) + { + return symbol_type (token::TOK_END, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_YYerror (location_type l) + { + return symbol_type (token::TOK_YYerror, std::move (l)); + } +#else + static + symbol_type + make_YYerror (const location_type& l) + { + return symbol_type (token::TOK_YYerror, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_YYUNDEF (location_type l) + { + return symbol_type (token::TOK_YYUNDEF, std::move (l)); + } +#else + static + symbol_type + make_YYUNDEF (const location_type& l) + { + return symbol_type (token::TOK_YYUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NEWLINE (location_type l) + { + return symbol_type (token::TOK_NEWLINE, std::move (l)); + } +#else + static + symbol_type + make_NEWLINE (const location_type& l) + { + return symbol_type (token::TOK_NEWLINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COMMA (location_type l) + { + return symbol_type (token::TOK_COMMA, std::move (l)); + } +#else + static + symbol_type + make_COMMA (const location_type& l) + { + return symbol_type (token::TOK_COMMA, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_COLON (location_type l) + { + return symbol_type (token::TOK_COLON, std::move (l)); + } +#else + static + symbol_type + make_COLON (const location_type& l) + { + return symbol_type (token::TOK_COLON, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LPAREN (location_type l) + { + return symbol_type (token::TOK_LPAREN, std::move (l)); + } +#else + static + symbol_type + make_LPAREN (const location_type& l) + { + return symbol_type (token::TOK_LPAREN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RPAREN (location_type l) + { + return symbol_type (token::TOK_RPAREN, std::move (l)); + } +#else + static + symbol_type + make_RPAREN (const location_type& l) + { + return symbol_type (token::TOK_RPAREN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LBRACKET (location_type l) + { + return symbol_type (token::TOK_LBRACKET, std::move (l)); + } +#else + static + symbol_type + make_LBRACKET (const location_type& l) + { + return symbol_type (token::TOK_LBRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_RBRACKET (location_type l) + { + return symbol_type (token::TOK_RBRACKET, std::move (l)); + } +#else + static + symbol_type + make_RBRACKET (const location_type& l) + { + return symbol_type (token::TOK_RBRACKET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PLUS (location_type l) + { + return symbol_type (token::TOK_PLUS, std::move (l)); + } +#else + static + symbol_type + make_PLUS (const location_type& l) + { + return symbol_type (token::TOK_PLUS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MINUS (location_type l) + { + return symbol_type (token::TOK_MINUS, std::move (l)); + } +#else + static + symbol_type + make_MINUS (const location_type& l) + { + return symbol_type (token::TOK_MINUS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MULTIPLY (location_type l) + { + return symbol_type (token::TOK_MULTIPLY, std::move (l)); + } +#else + static + symbol_type + make_MULTIPLY (const location_type& l) + { + return symbol_type (token::TOK_MULTIPLY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DIVIDE (location_type l) + { + return symbol_type (token::TOK_DIVIDE, std::move (l)); + } +#else + static + symbol_type + make_DIVIDE (const location_type& l) + { + return symbol_type (token::TOK_DIVIDE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OR (location_type l) + { + return symbol_type (token::TOK_OR, std::move (l)); + } +#else + static + symbol_type + make_OR (const location_type& l) + { + return symbol_type (token::TOK_OR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_AND (location_type l) + { + return symbol_type (token::TOK_AND, std::move (l)); + } +#else + static + symbol_type + make_AND (const location_type& l) + { + return symbol_type (token::TOK_AND, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_XOR (location_type l) + { + return symbol_type (token::TOK_XOR, std::move (l)); + } +#else + static + symbol_type + make_XOR (const location_type& l) + { + return symbol_type (token::TOK_XOR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_POST_DECREMENT (location_type l) + { + return symbol_type (token::TOK_POST_DECREMENT, std::move (l)); + } +#else + static + symbol_type + make_POST_DECREMENT (const location_type& l) + { + return symbol_type (token::TOK_POST_DECREMENT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NOT_EQUAL (location_type l) + { + return symbol_type (token::TOK_NOT_EQUAL, std::move (l)); + } +#else + static + symbol_type + make_NOT_EQUAL (const location_type& l) + { + return symbol_type (token::TOK_NOT_EQUAL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NOT (location_type l) + { + return symbol_type (token::TOK_NOT, std::move (l)); + } +#else + static + symbol_type + make_NOT (const location_type& l) + { + return symbol_type (token::TOK_NOT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REVERSE (location_type l) + { + return symbol_type (token::TOK_REVERSE, std::move (l)); + } +#else + static + symbol_type + make_REVERSE (const location_type& l) + { + return symbol_type (token::TOK_REVERSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EQUAL (location_type l) + { + return symbol_type (token::TOK_EQUAL, std::move (l)); + } +#else + static + symbol_type + make_EQUAL (const location_type& l) + { + return symbol_type (token::TOK_EQUAL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PROGRAM (location_type l) + { + return symbol_type (token::TOK_PROGRAM, std::move (l)); + } +#else + static + symbol_type + make_PROGRAM (const location_type& l) + { + return symbol_type (token::TOK_PROGRAM, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WRAP_TARGET (location_type l) + { + return symbol_type (token::TOK_WRAP_TARGET, std::move (l)); + } +#else + static + symbol_type + make_WRAP_TARGET (const location_type& l) + { + return symbol_type (token::TOK_WRAP_TARGET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WRAP (location_type l) + { + return symbol_type (token::TOK_WRAP, std::move (l)); + } +#else + static + symbol_type + make_WRAP (const location_type& l) + { + return symbol_type (token::TOK_WRAP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_DEFINE (location_type l) + { + return symbol_type (token::TOK_DEFINE, std::move (l)); + } +#else + static + symbol_type + make_DEFINE (const location_type& l) + { + return symbol_type (token::TOK_DEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SIDE_SET (location_type l) + { + return symbol_type (token::TOK_SIDE_SET, std::move (l)); + } +#else + static + symbol_type + make_SIDE_SET (const location_type& l) + { + return symbol_type (token::TOK_SIDE_SET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WORD (location_type l) + { + return symbol_type (token::TOK_WORD, std::move (l)); + } +#else + static + symbol_type + make_WORD (const location_type& l) + { + return symbol_type (token::TOK_WORD, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ORIGIN (location_type l) + { + return symbol_type (token::TOK_ORIGIN, std::move (l)); + } +#else + static + symbol_type + make_ORIGIN (const location_type& l) + { + return symbol_type (token::TOK_ORIGIN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_LANG_OPT (location_type l) + { + return symbol_type (token::TOK_LANG_OPT, std::move (l)); + } +#else + static + symbol_type + make_LANG_OPT (const location_type& l) + { + return symbol_type (token::TOK_LANG_OPT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_JMP (location_type l) + { + return symbol_type (token::TOK_JMP, std::move (l)); + } +#else + static + symbol_type + make_JMP (const location_type& l) + { + return symbol_type (token::TOK_JMP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_WAIT (location_type l) + { + return symbol_type (token::TOK_WAIT, std::move (l)); + } +#else + static + symbol_type + make_WAIT (const location_type& l) + { + return symbol_type (token::TOK_WAIT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IN (location_type l) + { + return symbol_type (token::TOK_IN, std::move (l)); + } +#else + static + symbol_type + make_IN (const location_type& l) + { + return symbol_type (token::TOK_IN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OUT (location_type l) + { + return symbol_type (token::TOK_OUT, std::move (l)); + } +#else + static + symbol_type + make_OUT (const location_type& l) + { + return symbol_type (token::TOK_OUT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PUSH (location_type l) + { + return symbol_type (token::TOK_PUSH, std::move (l)); + } +#else + static + symbol_type + make_PUSH (const location_type& l) + { + return symbol_type (token::TOK_PUSH, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PULL (location_type l) + { + return symbol_type (token::TOK_PULL, std::move (l)); + } +#else + static + symbol_type + make_PULL (const location_type& l) + { + return symbol_type (token::TOK_PULL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_MOV (location_type l) + { + return symbol_type (token::TOK_MOV, std::move (l)); + } +#else + static + symbol_type + make_MOV (const location_type& l) + { + return symbol_type (token::TOK_MOV, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IRQ (location_type l) + { + return symbol_type (token::TOK_IRQ, std::move (l)); + } +#else + static + symbol_type + make_IRQ (const location_type& l) + { + return symbol_type (token::TOK_IRQ, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SET (location_type l) + { + return symbol_type (token::TOK_SET, std::move (l)); + } +#else + static + symbol_type + make_SET (const location_type& l) + { + return symbol_type (token::TOK_SET, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NOP (location_type l) + { + return symbol_type (token::TOK_NOP, std::move (l)); + } +#else + static + symbol_type + make_NOP (const location_type& l) + { + return symbol_type (token::TOK_NOP, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PIN (location_type l) + { + return symbol_type (token::TOK_PIN, std::move (l)); + } +#else + static + symbol_type + make_PIN (const location_type& l) + { + return symbol_type (token::TOK_PIN, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_GPIO (location_type l) + { + return symbol_type (token::TOK_GPIO, std::move (l)); + } +#else + static + symbol_type + make_GPIO (const location_type& l) + { + return symbol_type (token::TOK_GPIO, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OSRE (location_type l) + { + return symbol_type (token::TOK_OSRE, std::move (l)); + } +#else + static + symbol_type + make_OSRE (const location_type& l) + { + return symbol_type (token::TOK_OSRE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PINS (location_type l) + { + return symbol_type (token::TOK_PINS, std::move (l)); + } +#else + static + symbol_type + make_PINS (const location_type& l) + { + return symbol_type (token::TOK_PINS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NULL (location_type l) + { + return symbol_type (token::TOK_NULL, std::move (l)); + } +#else + static + symbol_type + make_NULL (const location_type& l) + { + return symbol_type (token::TOK_NULL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PINDIRS (location_type l) + { + return symbol_type (token::TOK_PINDIRS, std::move (l)); + } +#else + static + symbol_type + make_PINDIRS (const location_type& l) + { + return symbol_type (token::TOK_PINDIRS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_BLOCK (location_type l) + { + return symbol_type (token::TOK_BLOCK, std::move (l)); + } +#else + static + symbol_type + make_BLOCK (const location_type& l) + { + return symbol_type (token::TOK_BLOCK, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NOBLOCK (location_type l) + { + return symbol_type (token::TOK_NOBLOCK, std::move (l)); + } +#else + static + symbol_type + make_NOBLOCK (const location_type& l) + { + return symbol_type (token::TOK_NOBLOCK, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFEMPTY (location_type l) + { + return symbol_type (token::TOK_IFEMPTY, std::move (l)); + } +#else + static + symbol_type + make_IFEMPTY (const location_type& l) + { + return symbol_type (token::TOK_IFEMPTY, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_IFFULL (location_type l) + { + return symbol_type (token::TOK_IFFULL, std::move (l)); + } +#else + static + symbol_type + make_IFFULL (const location_type& l) + { + return symbol_type (token::TOK_IFFULL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NOWAIT (location_type l) + { + return symbol_type (token::TOK_NOWAIT, std::move (l)); + } +#else + static + symbol_type + make_NOWAIT (const location_type& l) + { + return symbol_type (token::TOK_NOWAIT, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CLEAR (location_type l) + { + return symbol_type (token::TOK_CLEAR, std::move (l)); + } +#else + static + symbol_type + make_CLEAR (const location_type& l) + { + return symbol_type (token::TOK_CLEAR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_REL (location_type l) + { + return symbol_type (token::TOK_REL, std::move (l)); + } +#else + static + symbol_type + make_REL (const location_type& l) + { + return symbol_type (token::TOK_REL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_X (location_type l) + { + return symbol_type (token::TOK_X, std::move (l)); + } +#else + static + symbol_type + make_X (const location_type& l) + { + return symbol_type (token::TOK_X, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_Y (location_type l) + { + return symbol_type (token::TOK_Y, std::move (l)); + } +#else + static + symbol_type + make_Y (const location_type& l) + { + return symbol_type (token::TOK_Y, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_EXEC (location_type l) + { + return symbol_type (token::TOK_EXEC, std::move (l)); + } +#else + static + symbol_type + make_EXEC (const location_type& l) + { + return symbol_type (token::TOK_EXEC, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PC (location_type l) + { + return symbol_type (token::TOK_PC, std::move (l)); + } +#else + static + symbol_type + make_PC (const location_type& l) + { + return symbol_type (token::TOK_PC, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ISR (location_type l) + { + return symbol_type (token::TOK_ISR, std::move (l)); + } +#else + static + symbol_type + make_ISR (const location_type& l) + { + return symbol_type (token::TOK_ISR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OSR (location_type l) + { + return symbol_type (token::TOK_OSR, std::move (l)); + } +#else + static + symbol_type + make_OSR (const location_type& l) + { + return symbol_type (token::TOK_OSR, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_OPTIONAL (location_type l) + { + return symbol_type (token::TOK_OPTIONAL, std::move (l)); + } +#else + static + symbol_type + make_OPTIONAL (const location_type& l) + { + return symbol_type (token::TOK_OPTIONAL, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_SIDE (location_type l) + { + return symbol_type (token::TOK_SIDE, std::move (l)); + } +#else + static + symbol_type + make_SIDE (const location_type& l) + { + return symbol_type (token::TOK_SIDE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STATUS (location_type l) + { + return symbol_type (token::TOK_STATUS, std::move (l)); + } +#else + static + symbol_type + make_STATUS (const location_type& l) + { + return symbol_type (token::TOK_STATUS, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_PUBLIC (location_type l) + { + return symbol_type (token::TOK_PUBLIC, std::move (l)); + } +#else + static + symbol_type + make_PUBLIC (const location_type& l) + { + return symbol_type (token::TOK_PUBLIC, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_ID (std::string v, location_type l) + { + return symbol_type (token::TOK_ID, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_ID (const std::string& v, const location_type& l) + { + return symbol_type (token::TOK_ID, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_STRING (std::string v, location_type l) + { + return symbol_type (token::TOK_STRING, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_STRING (const std::string& v, const location_type& l) + { + return symbol_type (token::TOK_STRING, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_NON_WS (std::string v, location_type l) + { + return symbol_type (token::TOK_NON_WS, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_NON_WS (const std::string& v, const location_type& l) + { + return symbol_type (token::TOK_NON_WS, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CODE_BLOCK_START (std::string v, location_type l) + { + return symbol_type (token::TOK_CODE_BLOCK_START, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_CODE_BLOCK_START (const std::string& v, const location_type& l) + { + return symbol_type (token::TOK_CODE_BLOCK_START, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_CODE_BLOCK_CONTENTS (std::string v, location_type l) + { + return symbol_type (token::TOK_CODE_BLOCK_CONTENTS, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_CODE_BLOCK_CONTENTS (const std::string& v, const location_type& l) + { + return symbol_type (token::TOK_CODE_BLOCK_CONTENTS, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_UNKNOWN_DIRECTIVE (std::string v, location_type l) + { + return symbol_type (token::TOK_UNKNOWN_DIRECTIVE, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_UNKNOWN_DIRECTIVE (const std::string& v, const location_type& l) + { + return symbol_type (token::TOK_UNKNOWN_DIRECTIVE, v, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_INT (int v, location_type l) + { + return symbol_type (token::TOK_INT, std::move (v), std::move (l)); + } +#else + static + symbol_type + make_INT (const int& v, const location_type& l) + { + return symbol_type (token::TOK_INT, v, l); + } +#endif + + + class context + { + public: + context (const parser& yyparser, const symbol_type& yyla); + const symbol_type& lookahead () const { return yyla_; } + symbol_kind_type token () const { return yyla_.kind (); } + const location_type& location () const { return yyla_.location; } + + /// Put in YYARG at most YYARGN of the expected tokens, and return the + /// number of tokens stored in YYARG. If YYARG is null, return the + /// number of expected tokens (guaranteed to be less than YYNTOKENS). + int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; + + private: + const parser& yyparser_; + const symbol_type& yyla_; + }; + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + parser (const parser&); + /// Non copyable. + parser& operator= (const parser&); +#endif + + /// Check the lookahead yytoken. + /// \returns true iff the token will be eventually shifted. + bool yy_lac_check_ (symbol_kind_type yytoken) const; + /// Establish the initial context if no initial context currently exists. + /// \returns true iff the token will be eventually shifted. + bool yy_lac_establish_ (symbol_kind_type yytoken); + /// Discard any previous initial lookahead context because of event. + /// \param event the event which caused the lookahead to be discarded. + /// Only used for debbuging output. + void yy_lac_discard_ (const char* event); + + /// Stored state numbers (used for stacks). + typedef unsigned char state_type; + + /// The arguments of the error message. + int yy_syntax_error_arguments_ (const context& yyctx, + symbol_kind_type yyarg[], int yyargn) const; + + /// Generate an error message. + /// \param yyctx the context in which the error occurred. + virtual std::string yysyntax_error_ (const context& yyctx) const; + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// Whether the given \c yypact_ value indicates a defaulted state. + /// \param yyvalue the value to check + static bool yy_pact_value_is_default_ (int yyvalue); + + /// Whether the given \c yytable_ value indicates a syntax error. + /// \param yyvalue the value to check + static bool yy_table_value_is_error_ (int yyvalue); + + static const signed char yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals + /// are valid, yet not members of the token_type enum. + static symbol_kind_type yytranslate_ (int t); + + /// Convert the symbol name \a n to a form suitable for a diagnostic. + static std::string yytnamerr_ (const char *yystr); + + /// For a symbol, its name in clear. + static const char* const yytname_[]; + + + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; + + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const signed char yydefact_[]; + + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; + + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; + + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const short yytable_[]; + + static const unsigned char yycheck_[]; + + // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // symbol of state STATE-NUM. + static const signed char yystos_[]; + + // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + static const signed char yyr1_[]; + + // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + static const signed char yyr2_[]; + + +#if YYDEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const short yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r) const; + /// Print the state stack on the debug stream. + virtual void yy_stack_print_ () const; + + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; + + /// \brief Display a symbol kind, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif + + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; + + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; + + /// The symbol kind as needed by the constructor. + typedef state_type kind_type; + + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; + + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_state& that); + + /// The symbol kind (corresponding to \a state). + /// \a symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// The state number used to denote an empty symbol. + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; + + /// The state. + /// \a empty when empty. + state_type state; + }; + + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; + typedef typename S::size_type size_type; + typedef typename std::ptrdiff_t index_type; + + stack (size_type n = 200) + : seq_ (n) + {} + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (index_type i) const + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (index_type i) + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + index_type + size () const YY_NOEXCEPT + { + return index_type (seq_.size ()); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.begin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.end (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, index_type range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (index_type i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + index_type range_; + }; + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + stack (const stack&); + /// Non copyable. + stack& operator= (const stack&); +#endif + /// The wrapped container. + S seq_; + }; + + + /// Stack type. + typedef stack stack_type; + + /// The stack. + stack_type yystack_; + /// The stack for LAC. + /// Logically, the yy_lac_stack's lifetime is confined to the function + /// yy_lac_check_. We just store it as a member of this class to hold + /// on to the memory and to avoid frequent reallocations. + /// Since yy_lac_check_ is const, this member must be mutable. + mutable std::vector yylac_stack_; + /// Whether an initial LAC context was established. + bool yy_lac_established_; + + + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); + + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); + + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); + + /// Constants. + enum + { + yylast_ = 205, ///< Last index in yytable_. + yynnts_ = 27, ///< Number of nonterminal symbols. + yyfinal_ = 96 ///< Termination state number. + }; + + + // User arguments. + pio_assembler& pioasm; + + }; + + inline + parser::symbol_kind_type + parser::yytranslate_ (int t) + { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const signed char + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69 + }; + // Last valid token kind. + const int code_max = 324; + + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return YY_CAST (symbol_kind_type, translate_table[t]); + else + return symbol_kind::S_YYUNDEF; + } + + // basic_symbol. + template + parser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value () + , location (that.location) + { + switch (this->kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.copy< bool > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_condition: // condition + value.copy< enum condition > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.copy< enum in_out_set > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.copy< enum irq > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.copy< enum mov > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_mov_op: // mov_op + value.copy< enum mov_op > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_INT: // "integer" + value.copy< int > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.copy< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.copy< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.copy< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_wait_source: // wait_source + value.copy< std::shared_ptr > (YY_MOVE (that.value)); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.copy< std::string > (YY_MOVE (that.value)); + break; + + default: + break; + } + + } + + + + template + parser::symbol_kind_type + parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + template + bool + parser::basic_symbol::empty () const YY_NOEXCEPT + { + return this->kind () == symbol_kind::S_YYEMPTY; + } + + template + void + parser::basic_symbol::move (basic_symbol& s) + { + super_type::move (s); + switch (this->kind ()) + { + case symbol_kind::S_if_full: // if_full + case symbol_kind::S_if_empty: // if_empty + case symbol_kind::S_blocking: // blocking + value.move< bool > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_condition: // condition + value.move< enum condition > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_in_source: // in_source + case symbol_kind::S_out_target: // out_target + case symbol_kind::S_set_target: // set_target + value.move< enum in_out_set > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_irq_modifiers: // irq_modifiers + value.move< enum irq > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_mov_target: // mov_target + case symbol_kind::S_mov_source: // mov_source + value.move< enum mov > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_mov_op: // mov_op + value.move< enum mov_op > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_INT: // "integer" + value.move< int > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_instruction: // instruction + case symbol_kind::S_base_instruction: // base_instruction + value.move< std::shared_ptr > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_value: // value + case symbol_kind::S_expression: // expression + case symbol_kind::S_delay: // delay + case symbol_kind::S_sideset: // sideset + value.move< std::shared_ptr > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_label_decl: // label_decl + case symbol_kind::S_symbol_def: // symbol_def + value.move< std::shared_ptr > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_wait_source: // wait_source + value.move< std::shared_ptr > (YY_MOVE (s.value)); + break; + + case symbol_kind::S_ID: // "identifier" + case symbol_kind::S_STRING: // "string" + case symbol_kind::S_NON_WS: // "text" + case symbol_kind::S_CODE_BLOCK_START: // "code block" + case symbol_kind::S_CODE_BLOCK_CONTENTS: // "%}" + case symbol_kind::S_UNKNOWN_DIRECTIVE: // UNKNOWN_DIRECTIVE + value.move< std::string > (YY_MOVE (s.value)); + break; + + default: + break; + } + + location = YY_MOVE (s.location); + } + + // by_kind. + inline + parser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) + {} + +#if 201103L <= YY_CPLUSPLUS + inline + parser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) + { + that.clear (); + } +#endif + + inline + parser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) + {} + + inline + parser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) + {} + + inline + void + parser::by_kind::clear () + { + kind_ = symbol_kind::S_YYEMPTY; + } + + inline + void + parser::by_kind::move (by_kind& that) + { + kind_ = that.kind_; + that.clear (); + } + + inline + parser::symbol_kind_type + parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + inline + parser::symbol_kind_type + parser::by_kind::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + +} // yy + + + + +#endif // !YY_YY_HOME_GRAHAM_DEV_MU_PICO_SDK_TOOLS_PIOASM_GEN_PARSER_HPP_INCLUDED diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/hex_output.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/hex_output.cpp new file mode 100644 index 0000000000..39dd0fa6a9 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/hex_output.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "output_format.h" +#include + +struct hex_output : public output_format { + struct factory { + factory() { + output_format::add(new hex_output()); + } + }; + + hex_output() : output_format("hex") {} + + std::string get_description() { + return "Raw hex output (only valid for single program inputs)"; + } + + virtual int output(std::string destination, std::vector output_options, + const compiled_source &source) { + FILE *out = open_single_output(destination); + if (!out) return 1; + + if (source.programs.size() > 1) { + // todo don't have locations any more! + std::cerr << "error: hex output only supports a single program input\n"; + return 1; + } + for (const auto &i : source.programs[0].instructions) { + fprintf(out, "%04x\n", i); + } + if (out != stdout) { fclose(out); } + return 0; + } +}; + +static hex_output::factory creator; diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/lexer.ll b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/lexer.ll new file mode 100644 index 0000000000..939b06f15a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/lexer.ll @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +%{ /* -*- C++ -*- */ +# include +# include +# include +# include +# include +# include "pio_assembler.h" +# include "parser.hpp" + +#ifdef _MSC_VER +#pragma warning(disable : 4996) // fopen +#endif + +%} + +%option noyywrap nounput noinput batch debug never-interactive case-insensitive noline + +%{ + yy::parser::symbol_type make_INT(const std::string &s, const yy::parser::location_type& loc); + yy::parser::symbol_type make_HEX(const std::string &s, const yy::parser::location_type& loc); + yy::parser::symbol_type make_BINARY(const std::string &s, const yy::parser::location_type& loc); +%} + +blank [ \t] +whitesp {blank}+ + +comment (";"|"//")[^\n]* + +digit [0-9] +id [a-zA-Z_][a-zA-Z0-9_]* + +binary "0b"[01]+ +int {digit}+ +hex "0x"[0-9a-fA-F]+ +directive \.{id} + +output_fmt [^%\n]+ + +%{ + // Code run each time a pattern is matched. + # define YY_USER_ACTION loc.columns (yyleng); +%} + +%x code_block +%x c_comment +%x lang_opt + +%% + std::string code_block_contents; + yy::location code_block_start; +%{ + // A handy shortcut to the location held by the pio_assembler. + yy::location& loc = pioasm.location; + // Code run each time yylex is called. + loc.step(); +%} + +{blank}+ loc.step(); +\n+ { auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); return yy::parser::make_NEWLINE(loc_newline); } + +"%"{blank}*{output_fmt}{blank}*"{" { + BEGIN(code_block); + code_block_contents = ""; + code_block_start = loc; + std::string tmp(yytext); + tmp = tmp.substr(1, tmp.length() - 2); + tmp = tmp.erase(0, tmp.find_first_not_of(" \t")); + tmp = tmp.erase(tmp.find_last_not_of(" \t") + 1); + return yy::parser::make_CODE_BLOCK_START( tmp, loc); + } +{ + {blank}+ loc.step(); + \n+ { auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); } + "%}" { BEGIN(INITIAL); auto loc2 = loc; loc2.begin = code_block_start.begin; return yy::parser::make_CODE_BLOCK_CONTENTS(code_block_contents, loc2); } + .* { code_block_contents += std::string(yytext) + "\n"; } +} + +{ + {blank}+ loc.step(); + "*/" { BEGIN(INITIAL); } + "*" { } + [^\n\*]* { } + \n+ { auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); } +} + +{ +\"[^\n]*\" return yy::parser::make_STRING(yytext, loc); +{blank}+ loc.step(); +"=" return yy::parser::make_EQUAL(loc); +{int} return make_INT(yytext, loc); +{hex} return make_HEX(yytext, loc); +{binary} return make_BINARY(yytext, loc); +[^ \t\n\"=]+ return yy::parser::make_NON_WS(yytext, loc); +\n+ { BEGIN(INITIAL); auto loc_newline = loc; loc_newline.end = loc_newline.begin; loc.lines(yyleng); loc.step(); return yy::parser::make_NEWLINE(loc_newline); } +. { throw yy::parser::syntax_error(loc, "invalid character: " + std::string(yytext)); } +} + +"/*" { BEGIN(c_comment); } +"," return yy::parser::make_COMMA(loc); +"::" return yy::parser::make_REVERSE(loc); +":" return yy::parser::make_COLON(loc); +"[" return yy::parser::make_LBRACKET(loc); +"]" return yy::parser::make_RBRACKET(loc); +"(" return yy::parser::make_LPAREN(loc); +")" return yy::parser::make_RPAREN(loc); +"+" return yy::parser::make_PLUS(loc); +"--" return yy::parser::make_POST_DECREMENT(loc); +"−−" return yy::parser::make_POST_DECREMENT(loc); +"-" return yy::parser::make_MINUS(loc); +"*" return yy::parser::make_MULTIPLY(loc); +"/" return yy::parser::make_DIVIDE(loc); +"|" return yy::parser::make_OR(loc); +"&" return yy::parser::make_AND(loc); +"^" return yy::parser::make_XOR(loc); +"!=" return yy::parser::make_NOT_EQUAL(loc); +"!" return yy::parser::make_NOT(loc); +"~" return yy::parser::make_NOT(loc); + +".program" return yy::parser::make_PROGRAM(loc); +".wrap_target" return yy::parser::make_WRAP_TARGET(loc); +".wrap" return yy::parser::make_WRAP(loc); +".word" return yy::parser::make_WORD(loc); +".define" return yy::parser::make_DEFINE(loc); +".side_set" return yy::parser::make_SIDE_SET(loc); +".origin" return yy::parser::make_ORIGIN(loc); +".lang_opt" { BEGIN(lang_opt); return yy::parser::make_LANG_OPT(loc); } +{directive} return yy::parser::make_UNKNOWN_DIRECTIVE(yytext, loc); + +"JMP" return yy::parser::make_JMP(loc); +"WAIT" return yy::parser::make_WAIT(loc); +"IN" return yy::parser::make_IN(loc); +"OUT" return yy::parser::make_OUT(loc); +"PUSH" return yy::parser::make_PUSH(loc); +"PULL" return yy::parser::make_PULL(loc); +"MOV" return yy::parser::make_MOV(loc); +"IRQ" return yy::parser::make_IRQ(loc); +"SET" return yy::parser::make_SET(loc); +"NOP" return yy::parser::make_NOP(loc); + +"PUBLIC" return yy::parser::make_PUBLIC(loc); + +"OPTIONAL" return yy::parser::make_OPTIONAL(loc); +"OPT" return yy::parser::make_OPTIONAL(loc); +"SIDE" return yy::parser::make_SIDE(loc); +"SIDESET" return yy::parser::make_SIDE(loc); +"SIDE_SET" return yy::parser::make_SIDE(loc); +"PIN" return yy::parser::make_PIN(loc); +"GPIO" return yy::parser::make_GPIO(loc); +"OSRE" return yy::parser::make_OSRE(loc); + +"PINS" return yy::parser::make_PINS(loc); +"NULL" return yy::parser::make_NULL(loc); +"PINDIRS" return yy::parser::make_PINDIRS(loc); +"X" return yy::parser::make_X(loc); +"Y" return yy::parser::make_Y(loc); +"PC" return yy::parser::make_PC(loc); +"EXEC" return yy::parser::make_EXEC(loc); +"ISR" return yy::parser::make_ISR(loc); +"OSR" return yy::parser::make_OSR(loc); +"STATUS" return yy::parser::make_STATUS(loc); + +"BLOCK" return yy::parser::make_BLOCK(loc); +"NOBLOCK" return yy::parser::make_NOBLOCK(loc); +"IFFULL" return yy::parser::make_IFFULL(loc); +"IFEMPTY" return yy::parser::make_IFEMPTY(loc); +"REL" return yy::parser::make_REL(loc); + +"CLEAR" return yy::parser::make_CLEAR(loc); +"NOWAIT" return yy::parser::make_NOWAIT(loc); + +"ONE" return yy::parser::make_INT(1, loc); +"ZERO" return yy::parser::make_INT(0, loc); + +<> return yy::parser::make_END(loc); + +{int} return make_INT(yytext, loc); +{hex} return make_HEX(yytext, loc); +{binary} return make_BINARY(yytext, loc); + +{id} return yy::parser::make_ID(yytext, loc); + +{comment} { } + +. { throw yy::parser::syntax_error(loc, "invalid character: " + std::string(yytext)); } + +%% + +yy::parser::symbol_type make_INT(const std::string &s, const yy::parser::location_type& loc) +{ + errno = 0; + long n = strtol (s.c_str(), NULL, 10); + if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) + throw yy::parser::syntax_error (loc, "integer is out of range: " + s); + return yy::parser::make_INT((int) n, loc); +} + +yy::parser::symbol_type make_HEX(const std::string &s, const yy::parser::location_type& loc) +{ + errno = 0; + long n = strtol (s.c_str() + 2, NULL, 16); + if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) + throw yy::parser::syntax_error (loc, "hex is out of range: " + s); + return yy::parser::make_INT((int) n, loc); +} + +yy::parser::symbol_type make_BINARY(const std::string &s, const yy::parser::location_type& loc) +{ + errno = 0; + long n = strtol (s.c_str()+2, NULL, 2); + if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) + throw yy::parser::syntax_error (loc, "binary is out of range: " + s); + return yy::parser::make_INT((int) n, loc); +} + +void pio_assembler::scan_begin () +{ + yy_flex_debug = false; + if (source.empty () || source == "-") + yyin = stdin; + else if (!(yyin = fopen (source.c_str (), "r"))) + { + std::cerr << "cannot open " << source << ": " << strerror(errno) << '\n'; + exit (EXIT_FAILURE); + } +} + +void pio_assembler::scan_end () +{ + fclose (yyin); +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/main.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/main.cpp new file mode 100644 index 0000000000..0d402cd3f3 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/main.cpp @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include "pio_assembler.h" + +#define DEFAULT_OUTPUT_FORMAT "c-sdk" + +void usage() { + std::cerr << "usage: pioasm ()\n\n"; + std::cerr << "Assemble file of PIO program(s) for use in applications.\n"; + std::cerr << " the input filename\n"; + std::cerr << " the output filename (or filename prefix if the output format produces multiple outputs).\n"; + std::cerr << " if not specified, a single output will be written to stdout\n"; + std::cerr << "\n"; + std::cerr << "options:\n"; + std::cerr << " -o select output_format (default '" << DEFAULT_OUTPUT_FORMAT << "'); available options are:\n"; + for(const auto& f : output_format::output_formats) { + std::cerr << " " << f->name << std::endl; + std::cerr << " " << f->get_description() << std::endl; + } + std::cerr << " -p add a parameter to be passed to the output format generator" << std::endl; + std::cerr << " -?, --help print this help and exit\n"; +} + +int main(int argc, char *argv[]) { + int res = 0; + pio_assembler pioasm; + std::string format(DEFAULT_OUTPUT_FORMAT); + const char *input = nullptr; + const char *output = nullptr; + std::vector options; + int i = 1; + for (; !res && i < argc; i++) { + if (argv[i][0] != '-') break; + if (argv[i] == std::string("-o")) { + if (i++ < argc) { + format = argv[i]; + } else { + std::cerr << "error: -o requires format value" << std::endl; + res = 1; + } + } else if (argv[i] == std::string("-p")) { + if (i++ < argc) { + options.emplace_back(argv[i]); + } else { + std::cerr << "error: -p requires parameter value" << std::endl; + res = 1; + } + } else if (argv[i] == std::string("-?") || argv[i] == std::string("--help")) { + usage(); + return 1; + } else { + std::cerr << "error: unknown option " << argv[i] << std::endl; + res = 1; + } + } + if (!res) { + if (i != argc) { + input = argv[i++]; + } else { + std::cerr << "error: expected input filename\n"; + res = 1; + } + } + if (!res) { + if (i != argc) { + output = argv[i++]; + } else { + output = "-"; + } + } + if (!res && i != argc) { + std::cerr << "unexpected command line argument " << argv[i] << std::endl; + res = 1; + } + std::shared_ptr oformat; + if (!res) { + const auto& e = std::find_if(output_format::output_formats.begin(), output_format::output_formats.end(), + [&](const std::shared_ptr &f) { + return f->name == format; + }); + if (e == output_format::output_formats.end()) { + std::cerr << "error: unknown output format '" << format << "'" << std::endl; + res = 1; + } else { + oformat = *e; + } + } + if (res) { + std::cerr << std::endl; + usage(); + } else { + res = pioasm.generate(oformat, input, output, options); + } + return res; +} \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/output_format.h b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/output_format.h new file mode 100644 index 0000000000..7d49a00ccc --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/output_format.h @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _OUTPUT_FORMAT_H +#define _OUTPUT_FORMAT_H + +#include +#include +#include +#include + +typedef unsigned int uint; + +// can't use optional because we want to support older compilers +template +struct simple_optional { + T value; + T default_value; + bool specified; + + simple_optional() : default_value(), specified(false) {} + + simple_optional(const T &value) : value(value), specified(true) {} + + simple_optional &operator=(const T &v) { + value = v; + specified = true; + return *this; + } + + operator bool() = delete; // confusing + const T &get() const { return specified ? value : default_value; } + + bool is_specified() const { return specified; } + + static simple_optional with_default(const T &default_value) { + simple_optional rc; + rc.default_value = default_value; + return rc; + } +}; + +typedef simple_optional optional_int; +typedef simple_optional optional_bool; + +struct compiled_source { + struct symbol { + std::string name; + int value; + bool is_label; + + symbol(std::string name, int value, bool is_label) : name(std::move(name)), value(value), is_label(is_label) {} + }; + + struct program { + std::string name; + optional_int origin = optional_int::with_default(-1); + optional_int sideset_bits_including_opt; + bool sideset_opt = false; + bool sideset_pindirs = false; + int wrap; + int wrap_target; + std::vector instructions; + std::vector symbols; // public only + std::map> code_blocks; + std::map>> lang_opts; + + // todo can't have wrap at -1 + program(std::string name) : name(std::move(name)) {} + }; + + std::vector global_symbols; // public only + std::vector programs; +}; + +struct output_format { + static std::vector> output_formats; + static std::string default_name; + + std::string name; + + static void add(output_format *lang) { + output_formats.push_back(std::shared_ptr(lang)); + } + + virtual int output(std::string destination, std::vector output_options, + const compiled_source &source) = 0; + + virtual std::string get_description() = 0; + + FILE *open_single_output(std::string destination); + virtual ~output_format() = default; +protected: + output_format(std::string name) : name(std::move(name)) {} +}; + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/parser.yy b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/parser.yy new file mode 100644 index 0000000000..f1f51dd2a1 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/parser.yy @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +%skeleton "lalr1.cc" /* -*- C++ -*- */ +%require "3.4.2" +%defines + +%define api.token.constructor +%define api.value.type variant +/*%define parse.assert*/ +%define api.location.file "location.h" +%define parse.lac full +/* define parse.trace*/ +%define parse.error verbose +%no-lines +%locations + +%code requires { + #include + #include + #include + #include "pio_types.h" + struct pio_assembler; + + #ifdef _MSC_VER + #pragma warning(disable : 4065) // default only switch statement + #endif +} + +// The parsing context. +%param { pio_assembler& pioasm } + +%code { + #include "pio_assembler.h" + #ifdef _MSC_VER + #pragma warning(disable : 4244) // possible loss of data (valid warning, but there is a software check / missing cast) + #endif +} + +%define api.token.prefix {TOK_} + +%token + END 0 "end of file" + + NEWLINE "end of line" + COMMA "," + COLON ":" + + LPAREN "(" + RPAREN ")" + LBRACKET "[" + RBRACKET "]" + PLUS "+" + MINUS "-" + MULTIPLY "*" + DIVIDE "/" + OR "|" + AND "&" + XOR "^" + POST_DECREMENT "--" + NOT_EQUAL "!=" + NOT "!" + REVERSE "::" + EQUAL "=" + + PROGRAM ".program" + WRAP_TARGET ".wrap_target" + WRAP ".wrap" + DEFINE ".define" + SIDE_SET ".side_set" + WORD ".word" + ORIGIN ".origin" + LANG_OPT ".lang_opt" + + JMP "jmp" + WAIT "wait" + IN "in" + OUT "out" + PUSH "push" + PULL "pull" + MOV "mov" + IRQ "irq" + SET "set" + NOP "nop" + + PIN "pin" + GPIO "gpio" + OSRE "osre" + + PINS "pins" + NULL "null" + PINDIRS "pindirs" + BLOCK "block" + NOBLOCK "noblock" + IFEMPTY "ifempty" + IFFULL "iffull" + NOWAIT "nowait" + CLEAR "clear" + REL "rel" + X "x" + Y "y" + EXEC "exec" + PC "pc" + ISR "isr" + OSR "osr" + OPTIONAL "opt" + SIDE "side" + STATUS "status" + PUBLIC "public" +; + +%token + ID "identifier" + STRING "string" + NON_WS "text" + CODE_BLOCK_START "code block" + CODE_BLOCK_CONTENTS "%}" // bit ugly but if there is no end this is what we will be missing + UNKNOWN_DIRECTIVE + INT "integer" +; + + +%left REVERSE +%left MULTIPLY DIVIDE +%left PLUS MINUS +%left AND OR XOR + +%printer { yyo << "..."; } <*>; + +%% + +file: + lines END { if (pioasm.error_count || pioasm.write_output()) YYABORT; } + ; + +lines: + line + | lines NEWLINE line; + +line: + PROGRAM ID { if (!pioasm.add_program(@$, $2)) { std::stringstream msg; msg << "program " << $2 << " already exists"; error(@$, msg.str()); abort(); } } + | directive + | instruction { pioasm.get_current_program(@1, "instruction").add_instruction($1); } + | label_decl instruction { auto &p = pioasm.get_current_program(@2, "instruction"); p.add_label($1); p.add_instruction($2); } + | label_decl { pioasm.get_current_program(@1, "label").add_label($1); } + | code_block + | %empty + | error { if (pioasm.error_count > 6) { std::cerr << "\ntoo many errors; aborting.\n"; YYABORT; } } + ; + +code_block: + CODE_BLOCK_START CODE_BLOCK_CONTENTS { std::string of = $1; if (of.empty()) of = output_format::default_name; pioasm.get_current_program(@$, "code block", false, false).add_code_block( code_block(@$, of, $2)); } + +%type > label_decl; +label_decl: + symbol_def COLON { $1->is_label = true; $$ = $1; } + +directive: + DEFINE symbol_def expression { $2->is_label = false; $2->value = $3; pioasm.get_current_program(@1, ".define", false, false).add_symbol($2); } + | ORIGIN value { pioasm.get_current_program(@1, ".origin", true).set_origin(@$, $2); } + | SIDE_SET value OPTIONAL PINDIRS { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, true, true); } + | SIDE_SET value OPTIONAL { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, true, false); } + | SIDE_SET value PINDIRS { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, false, true); } + | SIDE_SET value { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, false, false); } + | WRAP_TARGET { pioasm.get_current_program(@1, ".wrap_target").set_wrap_target(@$); } + | WRAP { pioasm.get_current_program(@1, ".wrap").set_wrap(@$); } + | WORD value { pioasm.get_current_program(@1, "instruction").add_instruction(std::shared_ptr(new instr_word(@$, $2))); } + | LANG_OPT NON_WS NON_WS EQUAL INT { pioasm.get_current_program(@1, ".lang_opt").add_lang_opt($2, $3, std::to_string($5)); } + | LANG_OPT NON_WS NON_WS EQUAL STRING { pioasm.get_current_program(@1, ".lang_opt").add_lang_opt($2, $3, $5); } + | LANG_OPT NON_WS NON_WS EQUAL NON_WS { pioasm.get_current_program(@1, ".lang_opt").add_lang_opt($2, $3, $5); } + | LANG_OPT error { error(@$, "expected format is .lang_opt language option_name = option_value"); } + | UNKNOWN_DIRECTIVE { std::stringstream msg; msg << "unknown directive " << $1; throw syntax_error(@$, msg.str()); } + ; + +/* value is a more limited top level expression... requiring parenthesis */ +%type > value; +value: INT { $$ = resolvable_int(@$, $1); } + | ID { $$ = std::shared_ptr(new name_ref(@$, $1)); } + | LPAREN expression RPAREN { $$ = $2; } + +%type > expression; +expression: + value + | expression PLUS expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::add, $1, $3)); } + | expression MINUS expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::subtract, $1, $3)); } + | expression MULTIPLY expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::multiply, $1, $3)); } + | expression DIVIDE expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::divide, $1, $3)); } + | expression OR expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::or_, $1, $3)); } + | expression AND expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::and_, $1, $3)); } + | expression XOR expression { $$ = std::shared_ptr(new binary_operation(@$, binary_operation::xor_, $1, $3)); } + | MINUS expression { $$ = std::shared_ptr(new unary_operation(@$, unary_operation::negate, $2)); } + | REVERSE expression { $$ = std::shared_ptr(new unary_operation(@$, unary_operation::reverse, $2)); } + +%type > instruction; +instruction: + base_instruction sideset delay { $$ = $1; $$->sideset = $2; $$->delay = $3; } + | base_instruction delay sideset { $$ = $1; $$->delay = $2; $$->sideset = $3; } + | base_instruction sideset { $$ = $1; $$->sideset = $2; $$->delay = resolvable_int(@$, 0); } + | base_instruction delay { $$ = $1; $$->delay = $2; } + | base_instruction { $$ = $1; $$->delay = resolvable_int(@$, 0); } + +%type > base_instruction; +base_instruction: + NOP { $$ = std::shared_ptr(new instr_nop(@$)); } + | JMP condition comma expression { $$ = std::shared_ptr(new instr_jmp(@$, $2, $4)); } + | WAIT value wait_source { $$ = std::shared_ptr(new instr_wait(@$, $2, $3)); } + | WAIT value COMMA value { std::stringstream msg; location l; l.begin = @2.end; l.end = @3.end; msg << "expected irq, gpio or pin after the polarity value and before the \",\""; throw yy::parser::syntax_error(l, msg.str()); } + | WAIT wait_source { $$ = std::shared_ptr(new instr_wait(@$, resolvable_int(@$, 1), $2)); } + | IN in_source comma value { $$ = std::shared_ptr(new instr_in(@$, $2, $4)); } + | OUT out_target comma value { $$ = std::shared_ptr(new instr_out(@$, $2, $4)); } + | PUSH if_full blocking { $$ = std::shared_ptr(new instr_push(@$, $2, $3)); } + | PULL if_empty blocking { $$ = std::shared_ptr(new instr_pull(@$, $2, $3)); } + | MOV mov_target comma mov_op mov_source { $$ = std::shared_ptr(new instr_mov(@$, $2, $5, $4)); } + | IRQ irq_modifiers value REL { $$ = std::shared_ptr(new instr_irq(@$, $2, $3, true)); } + | IRQ irq_modifiers value { $$ = std::shared_ptr(new instr_irq(@$, $2, $3)); } + | SET set_target comma value { $$ = std::shared_ptr(new instr_set(@$, $2, $4)); } +; + +%type > delay; +delay: + LBRACKET expression RBRACKET { $$ = $2; } + +%type > sideset; +sideset: + SIDE value { $$ = $2; } + +%type condition; +condition: + NOT X { $$ = condition::xz; } + | X POST_DECREMENT { $$ = condition::xnz__; } + | NOT Y { $$ = condition::yz; } + | Y POST_DECREMENT { $$ = condition::ynz__; } + | X NOT_EQUAL Y { $$ = condition::xney; } + | PIN { $$ = condition::pin; } + | NOT OSRE { $$ = condition::osrez; } + | %empty { $$ = condition::al; } + +%type > wait_source; +wait_source: + IRQ comma value REL { $$ = std::shared_ptr(new wait_source(wait_source::irq, $3, true)); } + | IRQ comma value { $$ = std::shared_ptr(new wait_source(wait_source::irq, $3, false)); } + | GPIO comma value { $$ = std::shared_ptr(new wait_source(wait_source::gpio, $3)); } + | PIN comma value { $$ = std::shared_ptr(new wait_source(wait_source::pin, $3)); } + +comma: COMMA | %empty /* not a huge fan of forcing commas */ + +%type in_source; +in_source: PINS { $$ = in_out_set::in_out_set_pins; } + | X { $$ = in_out_set::in_out_set_x; } + | Y { $$ = in_out_set::in_out_set_y; } + | NULL { $$ = in_out_set::in_out_null; } + | ISR { $$ = in_out_set::in_out_isr; } + | OSR { $$ = in_out_set::in_osr; } + | STATUS { $$ = in_out_set::in_status; } + +%type out_target; +out_target: PINS { $$ = in_out_set::in_out_set_pins; } + | X { $$ = in_out_set::in_out_set_x; } + | Y { $$ = in_out_set::in_out_set_y; } + | NULL { $$ = in_out_set::in_out_null; } + | PINDIRS { $$ = in_out_set::in_out_set_pindirs; } + | ISR { $$ = in_out_set::in_out_isr; } + | PC { $$ = in_out_set::out_set_pc; } + | EXEC { $$ = in_out_set::out_exec; } + +%type mov_target; +mov_target: PINS { $$ = mov::pins; } + | X { $$ = mov::x; } + | Y { $$ = mov::y; } + | EXEC { $$ = mov::exec; } + | PC { $$ = mov::pc; } + | ISR { $$ = mov::isr; } + | OSR { $$ = mov::osr; } + +%type mov_source; +mov_source: PINS { $$ = mov::pins; } + | X { $$ = mov::x; } + | Y { $$ = mov::y; } + | NULL { $$ = mov::null; } + | STATUS { $$ = mov::status; } + | ISR { $$ = mov::isr; } + | OSR { $$ = mov::osr; } + +%type mov_op; +mov_op: + NOT { $$ = mov_op::invert; } + | REVERSE { $$ = mov_op::bit_reverse; } + | %empty { $$ = mov_op::none; } + +%type set_target; +set_target: + PINS { $$ = in_out_set::in_out_set_pins; } + | X { $$ = in_out_set::in_out_set_x; } + | Y { $$ = in_out_set::in_out_set_y; } + | PINDIRS { $$ = in_out_set::in_out_set_pindirs; } + +%type if_full; +if_full: + IFFULL { $$ = true; } + | %empty { $$ = false; } + +%type if_empty; +if_empty: + IFEMPTY { $$ = true; } + | %empty { $$ = false; } + +%type blocking; +blocking: + BLOCK { $$ = true; } + | NOBLOCK { $$ = false; } + | %empty { $$ = true; } + +%type irq_modifiers; +irq_modifiers: + CLEAR { $$ = irq::clear; } + | WAIT { $$ = irq::set_wait; } + | NOWAIT { $$ = irq::set; } + | SET { $$ = irq::set; } + | %empty { $$ = irq::set; } + +%type > symbol_def; +symbol_def: + ID { $$ = std::shared_ptr(new symbol(@$, $1)); } + | PUBLIC ID { $$ = std::shared_ptr(new symbol(@$, $2, true)); } + | MULTIPLY ID { $$ = std::shared_ptr(new symbol(@$, $2, true)); } + +%% +void yy::parser::error(const location_type& l, const std::string& m) +{ + if (l.begin.filename) { + std::cerr << l << ": " << m << '\n'; + pioasm.error_count++; + if (l.begin.line == l.end.line && *l.begin.filename == *l.end.filename) { + std::ifstream file(l.begin.filename->c_str()); + std::string line; + for(int i = 0; i < l.begin.line; ++i) { + std::getline(file, line); + } + fprintf(stderr, "%5d | %s\n", l.begin.line, line.c_str()); + fprintf(stderr, "%5s | %*s", "", l.begin.column, "^"); + for (int i = l.begin.column; i < l.end.column - 1; i++) { + putc ('~', stderr); + } + putc ('\n', stderr); + } + } else { + std::cerr << m << '\n'; + } +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.cpp new file mode 100644 index 0000000000..46ea5e4253 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.cpp @@ -0,0 +1,391 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "pio_assembler.h" +#include "parser.hpp" + +#ifdef _MSC_VER +#pragma warning(disable : 4996) // fopen +#endif + +using syntax_error = yy::parser::syntax_error; + +std::vector> output_format::output_formats; +std::string output_format::default_name = "c-sdk"; + +pio_assembler::pio_assembler() { +} + +int pio_assembler::generate(std::shared_ptr _format, const std::string &_source, + const std::string &_dest, const std::vector &_options) { + format = _format; + source = _source; + dest = _dest; + options = _options; + location.initialize(&source); + scan_begin(); + yy::parser parse(*this); +// parse.set_debug_level(false); + int res = parse(); + scan_end(); + return res; +} + +void program::add_instruction(std::shared_ptr inst) { + uint limit = MAX_INSTRUCTIONS; + if (instructions.size() >= limit) { + // todo take offset into account + std::stringstream msg; + msg << "program instruction limit of " << limit << " instruction(s) exceeded"; + throw syntax_error(inst->location, msg.str()); + } + if (!sideset_opt && !inst->sideset) { + std::stringstream msg; + msg << "instruction requires 'side' to specify side set value for the instruction because non optional sideset was specified for the program at " << sideset.location; + throw syntax_error(inst->location, msg.str()); + } + instructions.push_back(inst); +} + +using syntax_error = yy::parser::syntax_error; + +void program::add_symbol(std::shared_ptr symbol) { + const auto &existing = pioasm->get_symbol(symbol->name, this); + if (existing) { + std::stringstream msg; + if (symbol->is_label != existing->is_label) { + msg << "'" << symbol->name << "' was already defined as a " << (existing->is_label ? "label" : "value") + << " at " << existing->location; + } else if (symbol->is_label) { + msg << "label '" << symbol->name << "' was already defined at " << existing->location; + } else { + msg << "'" << symbol->name << "' was already defined at " << existing->location; + } + throw syntax_error(symbol->location, msg.str()); + } + symbols.insert(std::pair>(symbol->name, symbol)); + ordered_symbols.push_back(symbol); +} + +int resolvable::resolve(const program &program) { + return resolve(program.pioasm, &program); +} + +int unary_operation::resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) { + int value = arg->resolve(pioasm, program, scope); + switch (op) { + case negate: + return -value; + case reverse: { + // slow is fine + uint result = 0; + for (uint i = 0; i < 32; i++) { + result <<= 1u; + if (value & 1u) { + result |= 1u; + } + value >>= 1u; + } + return result; + } + default: + throw syntax_error(location, "internal error"); + } +} + +int binary_operation::resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) { + int lvalue = left->resolve(pioasm, program, scope); + int rvalue = right->resolve(pioasm, program, scope); + switch (op) { + case add: + return lvalue + rvalue; + case subtract: + return lvalue - rvalue; + case multiply: + return lvalue * rvalue; + case divide: + return lvalue / rvalue; + case and_: + return lvalue & rvalue; + case or_: + return lvalue | rvalue; + case xor_: + return lvalue ^ rvalue; + default: + throw syntax_error(location, "internal error"); + } +} + +void program::set_wrap(const yy::location &l) { + if (wrap) { + std::stringstream msg; + msg << ".wrap was already specified at " << wrap->location; + throw syntax_error(l, msg.str()); + } + if (instructions.empty()) { + throw syntax_error(l, ".wrap cannot be pleaced before the first program instruction"); + } + wrap = resolvable_int(l, instructions.size() - 1); +} + +void program::set_wrap_target(const yy::location &l) { + if (wrap_target) { + std::stringstream msg; + msg << ".wrap_target was already specified at " << wrap_target->location; + throw syntax_error(l, msg.str()); + } + wrap_target = resolvable_int(l, instructions.size()); +} + +void program::add_code_block(const code_block &block) { + code_blocks[block.lang].push_back(block); +} + +void program::add_lang_opt(std::string lang, std::string name, std::string value) { + lang_opts[lang].emplace_back(name, value); +} + +void program::finalize() { + if (sideset.value) { + int bits = sideset.value->resolve(*this); + if (bits < 0) { + throw syntax_error(sideset.value->location, "number of side set bits must be positive"); + } + sideset_max = (1u << bits) - 1; + if (sideset_opt) bits++; + sideset_bits_including_opt = bits; + if (bits > 5) { + if (sideset_opt) + throw syntax_error(sideset.value->location, "maximum number of side set bits with optional is 4"); + else + throw syntax_error(sideset.value->location, "maximum number of side set bits is 5"); + } + delay_max = (1u << (5 - bits)) - 1; + } else { + sideset_max = 0; + delay_max = 31; + } +} + +int name_ref::resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) { + auto symbol = pioasm->get_symbol(name, program); + if (symbol) { + if (symbol->resolve_started) { + std::stringstream msg; + msg << "circular dependency in definition of '" << name << "'; detected at " << location << ")"; + throw syntax_error(scope.location, msg.str()); + } + try { + symbol->resolve_started++; + int rc = symbol->value->resolve(pioasm, program, scope); + symbol->resolve_started--; + return rc; + } catch (syntax_error &e) { + symbol->resolve_started--; + throw e; + } + } else { + std::stringstream msg; + msg << "undefined symbol '" << name << "'"; + throw syntax_error(location, msg.str()); + } +} + +uint instruction::encode(const program &program) { + raw_encoding raw = raw_encode(program); + int _delay = delay->resolve(program); + if (_delay < 0) { + throw syntax_error(delay->location, "instruction delay must be positive"); + } + if (_delay > program.delay_max) { + if (program.delay_max == 31) { + throw syntax_error(delay->location, "instruction delay must be <= 31"); + } else { + std::stringstream msg; + msg << "the instruction delay limit is " << program.delay_max << " because of the side set specified at " + << program.sideset.location; + throw syntax_error(delay->location, msg.str()); + } + } + int _sideset = 0; + if (sideset) { + _sideset = sideset->resolve(program); + if (_sideset < 0) { + throw syntax_error(sideset->location, "side set value must be >=0"); + } + if (_sideset > program.sideset_max) { + std::stringstream msg; + msg << "the maximum side set value is " << program.sideset_max << " based on the configuration specified at " + << program.sideset.location; + throw syntax_error(sideset->location, msg.str()); + } + _sideset <<= (5u - program.sideset_bits_including_opt); + if (program.sideset_opt) { + _sideset |= 0x10u; + } + } + return (((uint) raw.type) << 13u) | (((uint) _delay | (uint) _sideset) << 8u) | (raw.arg1 << 5u) | raw.arg2; +} + +raw_encoding instruction::raw_encode(const program &program) { + throw syntax_error(location, "internal error"); +} + +uint instr_word::encode(const program &program) { + uint value = encoding->resolve(program); + if (value > 0xffffu) { + throw syntax_error(location, ".word value must be a positive 16 bit value"); + } + return value; +} + +raw_encoding instr_jmp::raw_encode(const program &program) { + int dest = target->resolve(program); + if (dest < 0) { + throw syntax_error(target->location, "jmp target address must be positive"); + } else if (dest >= (int)program.instructions.size()) { + std::stringstream msg; + msg << "jmp target address " << dest << " is beyond the end of the program"; + throw syntax_error(target->location, msg.str()); + } + return {inst_type::jmp, (uint) cond, (uint) dest}; +} + +raw_encoding instr_in::raw_encode(const program &program) { + int v = value->resolve(program); + if (v < 1 || v > 32) { + throw syntax_error(value->location, "'in' bit count must be >= 1 and <= 32"); + } + return {inst_type::in, (uint) src, (uint) v & 0x1fu}; +} + +raw_encoding instr_out::raw_encode(const program &program) { + int v = value->resolve(program); + if (v < 1 || v > 32) { + throw syntax_error(value->location, "'out' bit count must be >= 1 and <= 32"); + } + return {inst_type::out, (uint) dest, (uint) v & 0x1fu}; +} + +raw_encoding instr_set::raw_encode(const program &program) { + int v = value->resolve(program); + if (v < 0 || v > 31) { + throw syntax_error(value->location, "'set' bit count must be >= 0 and <= 31"); + } + return {inst_type::set, (uint) dest, (uint) v}; +} + +raw_encoding instr_wait::raw_encode(const program &program) { + uint pol = polarity->resolve(program); + if (pol > 1) { + throw syntax_error(polarity->location, "'wait' polarity must be 0 or 1"); + } + uint arg2 = source->param->resolve(program); + switch (source->target) { + case wait_source::irq: + if (arg2 > 7) throw syntax_error(source->param->location, "irq number must be must be >= 0 and <= 7"); + break; + case wait_source::gpio: + if (arg2 > 31) + throw syntax_error(source->param->location, "absolute GPIO number must be must be >= 0 and <= 31"); + break; + case wait_source::pin: + if (arg2 > 31) throw syntax_error(polarity->location, "pin number must be must be >= 0 and <= 31"); + break; + } + return {inst_type::wait, (pol << 2u) | (uint) source->target, arg2 | (source->flag ? 0x10u : 0u)}; +} + +raw_encoding instr_irq::raw_encode(const program &program) { + uint arg2 = num->resolve(program); + if (arg2 > 7) throw syntax_error(num->location, "irq number must be must be >= 0 and <= 7"); + if (relative) arg2 |= 0x20u; + return {inst_type::irq, (uint)modifiers, arg2}; +} + +std::vector pio_assembler::public_symbols(program &program) { + std::vector> public_symbols; + std::remove_copy_if(program.ordered_symbols.begin(), program.ordered_symbols.end(), + std::inserter(public_symbols, public_symbols.end()), + [](const std::shared_ptr &s) { return !s->is_public; }); + + std::vector rc; + std::transform(public_symbols.begin(), public_symbols.end(), std::back_inserter(rc), + [&](const std::shared_ptr &s) { + return compiled_source::symbol(s->name, s->value->resolve(program), s->is_label); + }); + return rc; +} + +int pio_assembler::write_output() { + std::set known_output_formats; + std::transform(output_format::output_formats.begin(), output_format::output_formats.end(), + std::inserter(known_output_formats, known_output_formats.begin()), + [&](std::shared_ptr &f) { + return f->name; + }); + + compiled_source source; + source.global_symbols = public_symbols(get_dummy_global_program()); + for (auto &program : programs) { + program.finalize(); + source.programs.emplace_back(compiled_source::program(program.name)); + auto &cprogram = source.programs[source.programs.size() - 1]; + cprogram = compiled_source::program(program.name); + + // encode the instructions + std::transform(program.instructions.begin(), program.instructions.end(), + std::back_inserter(cprogram.instructions), [&](std::shared_ptr &inst) { + return inst->encode(program); + }); + + for (const auto &e : program.code_blocks) { + bool ok = false; + for(const auto &o : known_output_formats) { + if (o == e.first || 0 == e.first.find(o+"-")) { + ok = true; + break; + } + } + if (!ok) { + std::cerr << e.second[0].location << ": warning, unknown code block output type '" << e.first << "'\n"; + known_output_formats.insert(e.first); + } + } + + if (program.wrap) cprogram.wrap = program.wrap->resolve(program); else cprogram.wrap = std::max((int)program.instructions.size() - 1, 0); + if (program.wrap_target) cprogram.wrap_target = program.wrap_target->resolve(program); else cprogram.wrap_target = 0; + if (program.origin.value) cprogram.origin = program.origin.value->resolve(program); + if (program.sideset.value) { + cprogram.sideset_bits_including_opt = program.sideset_bits_including_opt; + cprogram.sideset_opt = program.sideset_opt; + cprogram.sideset_pindirs = program.sideset_pindirs; + } + std::transform(program.code_blocks.begin(), program.code_blocks.end(), std::inserter(cprogram.code_blocks, cprogram.code_blocks.begin()), [](const std::pair>&e) { + std::vector blocks; + std::transform(e.second.begin(), e.second.end(), std::back_inserter(blocks), [&](const code_block& block) { + return block.contents; + }); + return std::pair>(e.first, blocks); + }); + cprogram.lang_opts = program.lang_opts; + cprogram.symbols = public_symbols(program); + } + if (programs.empty()) { + std::cout << "warning: input contained no programs" << std::endl; + } + return format->output(dest, options, source); +} + +FILE *output_format::open_single_output(std::string destination) { + FILE *out = destination == "-" ? stdout : fopen(destination.c_str(), "w"); + if (!out) { + std::cerr << "Can't open output file '" << destination << "'" << std::endl; + } + return out; +} diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.h b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.h new file mode 100644 index 0000000000..7183800d7c --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_assembler.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PIO_ASSEMBLER_H +#define _PIO_ASSEMBLER_H + +#include +#include "parser.hpp" +#include "output_format.h" + +// Give Flex the prototype of yylex we want ... +# define YY_DECL \ + yy::parser::symbol_type yylex (pio_assembler& pioasm) +// ... and declare it for the parser's sake. +YY_DECL; + + +struct pio_assembler { +public: + using syntax_error = yy::parser::syntax_error; + using location_type = yy::parser::location_type; + + std::shared_ptr dummy_global_program; + std::vector programs; + int error_count = 0; + + pio_assembler(); + + std::shared_ptr format; + // The name of the file being parsed. + std::string source; + // name of the output file or "-" for stdout + std::string dest; + std::vector options; + + int write_output(); + + bool add_program(const yy::location &l, const std::string &name) { + if (std::find_if(programs.begin(), programs.end(), [&](const program &p) { return p.name == name; }) == + programs.end()) { + programs.emplace_back(this, l, name); + return true; + } else { + return false; + } + } + + program &get_dummy_global_program() { + if (!dummy_global_program) { + dummy_global_program = std::shared_ptr(new program(this, yy::location(&source), "")); + } + return *dummy_global_program; + } + + program &get_current_program(const location_type &l, const std::string &requiring_program, + bool before_any_instructions = false, bool disallow_global = true) { + if (programs.empty()) { + if (disallow_global) { + std::stringstream msg; + msg << requiring_program << " is invalid outside of a program"; + throw syntax_error(l, msg.str()); + } + return get_dummy_global_program(); + } + auto &p = programs[programs.size() - 1]; + if (before_any_instructions && !p.instructions.empty()) { + std::stringstream msg; + msg << requiring_program << " must preceed any program instructions"; + throw syntax_error(l, msg.str()); + } + return p; + } + + // note p may be null for global symbols only + std::shared_ptr get_symbol(const std::string &name, const program *p) { + const auto &i = get_dummy_global_program().symbols.find(name); + if (i != get_dummy_global_program().symbols.end()) + return i->second; + + if (p) { + const auto &i2 = p->symbols.find(name); + if (i2 != p->symbols.end()) + return i2->second; + } + return nullptr; + } + + std::vector public_symbols(program &program); + int generate(std::shared_ptr _format, const std::string &_source, const std::string &_dest, + const std::vector &_options = std::vector()); + + // Handling the scanner. + void scan_begin(); + void scan_end(); + + // The token's location used by the scanner. + yy::location location; +}; + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.cpp new file mode 100644 index 0000000000..23bfcf07ff --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.cpp @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include "pio_disassembler.h" + +extern "C" void disassemble(char *buf, int buf_len, uint16_t inst, uint sideset_bits, bool sideset_opt) { + if (buf_len) buf[disassemble(inst, sideset_bits, sideset_opt).copy(buf, buf_len - 1)] = 0; +} + +std::string disassemble(uint16_t inst, uint sideset_bits_including_opt, bool sideset_opt) { + std::stringstream ss; + uint major = inst >> 13u; + uint arg1 = ((uint) inst >> 5u) & 0x7u; + uint arg2 = inst & 0x1fu; + auto op = [&](const std::string &s) { + ss << std::left << std::setw(7) << s; + }; + auto op_guts = [&](const std::string &s) { + ss << std::left << std::setw(16) << s; + }; + + bool invalid = false; + switch (major) { + case 0b000: { + static std::array conditions{"", "!x, ", "x--, ", "!y, ", "y--, ", "x != y, ", "pin, ", + "!osre, "}; + op("jmp"); + op_guts(conditions[arg1] + std::to_string(arg2)); + break; + } + case 0b001: { + uint source = arg1 & 3u; + std::string guts; + switch (source) { + case 0b00: + guts = "gpio, " + std::to_string(arg2); + break; + case 0b01: + guts = "pin, " + std::to_string(arg2); + break; + case 0b10: + if (arg2 & 0x8u) { + invalid = true; + } else { + guts = "irq, " + std::to_string(arg2 & 7u); + if (arg2 & 0x10u) { + guts += " rel"; + } + } + break; + } + if (!invalid) { + guts = ((arg1 & 4u) ? "1 " : "0 ") + guts; + op("wait"); + op_guts(guts); + } + break; + } + case 0b010: { + static std::array sources { "pins", "x", "y", "null", "", "status", "isr", "osr"}; + std::string source = sources[arg1]; + if (source.empty()) { + invalid = true; + } else { + op("in"); + op_guts(source + ", " + std::to_string(arg2 ? arg2 : 32)); + } + break; + } + case 0b011: { + static std::array dests { "pins", "x", "y", "null", "pindirs", "pc", "isr", "exec"}; + op("out"); + op_guts(dests[arg1] + ", " + std::to_string(arg2 ? arg2 : 32)); + break; + } + case 0b100: { + if (arg2) { + invalid = true; + } else { + std::string guts = ""; + if (arg1 & 4u) { + op("pull"); + if (arg1 & 2u) guts = "ifempty"; + } else { + op("push"); + if (arg1 & 2u) guts = "iffull"; + } + guts += (arg1 & 0x1u) ? "block" : "noblock"; + op_guts(guts); + } + break; + } + case 0b101: { + static std::array dests { "pins", "x", "y", "", "exec", "pc", "isr", "osr"}; + static std::array sources { "pins", "x", "y", "null", "", "status", "isr", "osr"}; + std::string dest = dests[arg1]; + std::string source = sources[arg2 & 7u]; + uint operation = arg2 >> 3u; + if (source.empty() || dest.empty() || operation == 3) { + invalid = true; + } + if (dest == source && !operation && (arg1 == 1 || arg2 == 2)) { + op("nop"); + op_guts(""); + } else { + op("mov"); + std::string guts = dest + ", "; + if (operation == 1) { + guts += "!"; + } else if (operation == 2) { + guts += "::"; + } + guts += source; + op_guts(guts); + } + break; + } + case 0b110: { + if ((arg1 & 0x4u) || (arg2 & 0x8u)) { + invalid = true; + } else { + op("irq"); + std::string guts; + if (arg1 & 0x2u) { + guts += "clear "; + } else if (arg1 & 0x1u) { + guts += "wait "; + } else { + guts += "nowait "; + } + guts += std::to_string(arg2 & 7u); + if (arg2 & 0x10u) { + guts += " rel"; + } + op_guts(guts); + } + break; + } + case 0b111: { + static std::array dests{"pins", "x", "y", "", "pindirs", "", "", ""}; + std::string dest = dests[arg1]; + if (dest.empty()) { + invalid = true; + } else { + op("set"); + op_guts(dests[arg1] + ", " + std::to_string(arg2)); + } + break; + } + } + if (invalid) { + return "reserved"; + } + uint delay = ((uint) inst >> 8u) & 0x1f; + ss << std::left << std::setw(7); + if (sideset_bits_including_opt && (!sideset_opt || (delay & 0x10u))) { + ss << ("side "+ std::to_string((delay & (sideset_opt ? 0xfu : 0x1fu)) >> (5u - sideset_bits_including_opt))); + } else { + ss << ""; + } + delay &= ((1u << (5 - sideset_bits_including_opt)) - 1u); + ss << std::left << std::setw(4) << (delay ? ("[" + std::to_string(delay) + "]") : ""); + return ss.str(); +} + diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.h b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.h new file mode 100644 index 0000000000..669e08dc96 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_disassembler.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PIO_DISASSEMBLER_H +#define _PIO_DISASSEMBLER_H + +#ifdef __cplusplus + +#include + +typedef unsigned int uint; + +std::string disassemble(uint16_t inst, uint sideset_bits, bool sideset_opt); +extern "C" void disassemble(char *buf, int buf_len, uint16_t inst, uint sideset_bits, bool sideset_opt); +#else +void disassemble(char *buf, int buf_len, uint inst, uint sideset_bits, bool sideset_opt); +#endif + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_types.h b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_types.h new file mode 100644 index 0000000000..d262849641 --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/pio_types.h @@ -0,0 +1,396 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PIO_TYPES_H +#define _PIO_TYPES_H + +#include +#include +#include +#include +#include +#include + +#include "location.h" + +typedef unsigned int uint; + +enum struct inst_type { + jmp = 0x0, + wait = 0x1, + in = 0x2, + out = 0x3, + push_pull = 0x4, + mov = 0x5, + irq = 0x6, + set = 0x7, +}; + +/* condition codes */ +enum struct condition { + al = 0x0, + xz = 0x1, + xnz__ = 0x2, + yz = 0x3, + ynz__ = 0x4, + xney = 0x5, + pin = 0x6, + osrez = 0x7, +}; + +/* in source / out / set target - not all valid */ +enum struct in_out_set { + in_out_set_pins = 0x0, + in_out_set_x = 0x1, + in_out_set_y = 0x2, + in_out_null = 0x3, + in_out_set_pindirs = 0x4, + in_status = 0x5, + out_set_pc = 0x5, + in_out_isr = 0x6, + in_osr = 0x7, + out_exec = 0x7, +}; + +enum struct irq { + set = 0x0, + set_wait = 0x1, + clear = 0x2, +}; + +// mov src/dest (not all valid) +enum struct mov { + pins = 0x0, + x = 0x1, + y = 0x2, + null = 0x3, + exec = 0x4, + pc = 0x5, + status = 0x5, + isr = 0x6, + osr = 0x7, +}; + +enum struct mov_op { + none = 0x0, + invert = 0x1, + bit_reverse = 0x2, +}; + +struct src_item { + yy::location location; + + src_item() = default; + + explicit src_item(const yy::location &location) : location(location) {} +}; + +struct program; +struct pio_assembler; + +struct resolvable : public src_item { + resolvable(const yy::location &l) : src_item(l) {} + + int resolve(const program &program); + + int resolve(pio_assembler *pioasm, const program *program) { + return resolve(pioasm, program, *this); + } + + virtual int resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) = 0; +}; + +using rvalue = std::shared_ptr; + +struct wait_source { + enum type { + gpio = 0x0, + pin = 0x1, + irq = 0x2 + } target; + rvalue param; + bool flag; + + wait_source(type target, rvalue param, bool flag = false) : target(target), param(std::move(param)), flag(flag) {} +}; + +struct name_ref : public resolvable { + std::string name; + + name_ref(const yy::location &l, std::string name) : resolvable(l), name(std::move(name)) {} + + int resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) override; +}; + +struct code_block : public resolvable { + std::string lang; + std::string contents; + + code_block(const yy::location &l, std::string lang, std::string contents) : resolvable(l), lang(std::move(lang)), + contents(std::move(contents)) {} + + int resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) override { + return 0; + } +}; + +struct int_value : public resolvable { + int value; + + int_value(const yy::location &l, int value) : resolvable(l), value(value) {} + + int resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) override { + return value; + } +}; + +static inline rvalue resolvable_int(const yy::location &l, int v) { + return std::shared_ptr(new int_value(l, v)); +} + +struct binary_operation : public resolvable { + enum op_type { + add, + subtract, + multiply, + divide, + and_, // pesky C++ + or_, + xor_ + }; + + op_type op; + rvalue left, right; + + binary_operation(const yy::location &l, op_type op, rvalue left, rvalue right) : + resolvable(l), op(op), left(std::move(left)), right(std::move(right)) {} + + int resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) override; +}; + +struct unary_operation : public resolvable { + enum op_type { + negate, + reverse + }; + + op_type op; + rvalue arg; + + unary_operation(const yy::location &l, op_type op, const rvalue &arg) : + resolvable(l), op(op), arg(arg) {} + + int resolve(pio_assembler *pioasm, const program *program, const resolvable &scope) override; +}; + +struct symbol : public src_item { + std::string name; + rvalue value; + bool is_public; + bool is_label; + int resolve_started; + + symbol(const yy::location &l, std::string name, bool is_extern = false) : src_item(l), name(std::move(name)), + is_public(is_extern), is_label(false), + resolve_started(false) {} +}; + +struct raw_encoding { + enum inst_type type; + uint arg1; + uint arg2; +}; + +struct instruction : public src_item { + rvalue sideset; // possibly null + rvalue delay; + + instruction(const yy::location &l) : src_item(l) {} + + virtual uint encode(const program &program); + + virtual raw_encoding raw_encode(const program &program); +}; + +struct pio_assembler; + +// rvalue with extra encompassing location +struct rvalue_loc { + rvalue value; + yy::location location; + + rvalue_loc() = default; + + rvalue_loc(const rvalue &v, const yy::location &l) : value(v), location(l) {} +}; + +struct program : public src_item { + static const int MAX_INSTRUCTIONS = 32; + + pio_assembler *pioasm; + std::string name; + rvalue_loc origin; + rvalue_loc sideset; + bool sideset_opt; + bool sideset_pindirs; + + rvalue wrap_target; + rvalue wrap; + + std::map> symbols; + std::vector> ordered_symbols; + std::vector> instructions; + std::map> code_blocks; + std::map>> lang_opts; + + // post finalization + int delay_max; + int sideset_bits_including_opt; // specified side set bits + 1 if we need presence flag + int sideset_max; + + program(pio_assembler *pioasm, const yy::location &l, std::string name) : + src_item(l), pioasm(pioasm), name(std::move(name)), sideset_opt(true), sideset_pindirs(false) {} + + void set_origin(const yy::location &l, const rvalue &_origin) { + origin = rvalue_loc(_origin, l); + } + + void set_wrap_target(const yy::location &l); + + void set_wrap(const yy::location &l); + + void set_sideset(const yy::location &l, rvalue _sideset, bool optional, bool pindirs) { + sideset = rvalue_loc(_sideset, l); + sideset_opt = optional; + sideset_pindirs = pindirs; + } + + void add_label(std::shared_ptr label) { + label->value = resolvable_int(label->location, instructions.size()); + add_symbol(label); + } + + void add_symbol(std::shared_ptr symbol); + + void add_instruction(std::shared_ptr inst); + + void add_code_block(const code_block &block); + + void add_lang_opt(std::string lang, std::string name, std::string value); + void finalize(); +}; + +struct instr_jmp : public instruction { + condition cond; + rvalue target; + + instr_jmp(const yy::location &l, condition c, rvalue target) : instruction(l), cond(c), target(std::move(target)) { } + + raw_encoding raw_encode(const program &program) override; +}; + +struct instr_wait : public instruction { + rvalue polarity; + std::shared_ptr source; + + instr_wait(const yy::location &l, rvalue polarity, std::shared_ptr source) : instruction(l), polarity( + std::move(polarity)), source(std::move(source)) {} + + raw_encoding raw_encode(const program &program) override; +}; + +struct instr_in : public instruction { + enum in_out_set src; + rvalue value; + + instr_in(const yy::location &l, const enum in_out_set &src, rvalue value) : instruction(l), src(src), + value(std::move(value)) {} + + raw_encoding raw_encode(const program &program) override; +}; + +struct instr_out : public instruction { + enum in_out_set dest; + rvalue value; + + instr_out(const yy::location &l, const enum in_out_set &dest, rvalue value) : instruction(l), dest(dest), + value(std::move(value)) {} + + raw_encoding raw_encode(const program &program) override; +}; + +struct instr_set : public instruction { + enum in_out_set dest; + rvalue value; + + instr_set(const yy::location &l, const enum in_out_set &dest, rvalue value) : instruction(l), dest(dest), + value(std::move(value)) {} + + raw_encoding raw_encode(const program &program) override; +}; + + +struct instr_push : public instruction { + bool if_full, blocking; + + instr_push(const yy::location &l, bool if_full, bool blocking) : instruction(l), if_full(if_full), + blocking(blocking) {} + + raw_encoding raw_encode(const program &program) override { + uint arg1 = (blocking ? 1u : 0u) | (if_full ? 0x2u : 0); + return {inst_type::push_pull, arg1, 0}; + } +}; + +struct instr_pull : public instruction { + bool if_empty, blocking; + + instr_pull(const yy::location &l, bool if_empty, bool blocking) : instruction(l), if_empty(if_empty), + blocking(blocking) {} + + raw_encoding raw_encode(const program &program) override { + uint arg1 = (blocking ? 1u : 0u) | (if_empty ? 0x2u : 0) | 0x4u; + return {inst_type::push_pull, arg1, 0}; + } +}; + +struct instr_mov : public instruction { + enum mov dest, src; + mov_op op; + + instr_mov(const yy::location &l, const enum mov &dest, const enum mov &src, const mov_op& op = mov_op::none) : + instruction(l), dest(dest), src(src), op(op) {} + + raw_encoding raw_encode(const program &program) override { + return {inst_type::mov, (uint) dest, (uint)src | ((uint)op << 3u)}; + } +}; + +struct instr_irq : public instruction { + enum irq modifiers; + rvalue num; + bool relative; + + instr_irq(const yy::location &l, const enum irq &modifiers, rvalue num, bool relative = false) : + instruction(l), modifiers(modifiers), num(std::move(num)), relative(relative) {} + + raw_encoding raw_encode(const program &program) override; +}; + + +struct instr_nop : public instr_mov { + instr_nop(const yy::location &l) : instr_mov(l, mov::y, mov::y) {} +}; + +struct instr_word : public instruction { + rvalue encoding; + + instr_word(const yy::location &l, rvalue encoding) : instruction(l), encoding(std::move(encoding)) {} + + uint encode(const program &program) override; +}; + +#endif \ No newline at end of file diff --git a/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/python_output.cpp b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/python_output.cpp new file mode 100644 index 0000000000..1c702ad01a --- /dev/null +++ b/bsp/raspberry-pico/libraries/pico-sdk/tools/pioasm/python_output.cpp @@ -0,0 +1,323 @@ +/* + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include "output_format.h" +#include "pio_disassembler.h" + +struct python_output : public output_format { + struct factory { + factory() { + output_format::add(new python_output()); + } + }; + + python_output() : output_format("python") {} + + std::string get_description() override { + return "Python file suitable for use with MicroPython"; + } + + void output_symbols(FILE *out, std::string prefix, const std::vector &symbols) { + int count = 0; + for (const auto &s : symbols) { + if (!s.is_label) { + fprintf(out, "%s%s = %d\n", prefix.c_str(), s.name.c_str(), s.value); + count++; + } + } + if (count) { + fprintf(out, "\n"); + count = 0; + } + for (const auto &s : symbols) { + if (s.is_label) { + fprintf(out, "%soffset_%s = %d\n", prefix.c_str(), s.name.c_str(), s.value); + count++; + } + } + if (count) { + fprintf(out, "\n"); + } + } + + void header(FILE *out, std::string msg) { + std::string dashes = std::string(msg.length(), '-'); + fprintf(out, "# %s #\n", dashes.c_str()); + fprintf(out, "# %s #\n", msg.c_str()); + fprintf(out, "# %s #\n", dashes.c_str()); + fprintf(out, "\n"); + } + + int output(std::string destination, std::vector output_options, + const compiled_source &source) override { + FILE *out = open_single_output(destination); + if (!out) return 1; + + header(out, "This file is autogenerated by pioasm; do not edit!"); + + fprintf(out, "import rp2\n"); + fprintf(out, "from machine import Pin"); + fprintf(out, "\n"); + + output_symbols(out, "", source.global_symbols); + + for (const auto &program : source.programs) { + header(out, program.name); + + std::string prefix = program.name + "_"; + + output_symbols(out, prefix, program.symbols); + + int param_count = 0; + auto write_opt = [&] (std::string name, std::string value) { + if (param_count++) { + fprintf(out, ", "); + } + fprintf(out, "%s=%s", name.c_str(), value.c_str()); + }; + fprintf(out, "@rp2.asm_pio("); + for(const auto &p : program.lang_opts) { + if (p.first.size() >= name.size() && p.first.compare(0, name.size(), name) == 0) { + for (const auto &p2 : p.second) { + write_opt(p2.first, p2.second); + } + } + } + fprintf(out, ")\n"); + fprintf(out, "def %s():\n", program.name.c_str()); + + std::map jmp_labels; + // for now just use numeric labels + for (int i = 0; i < (int)program.instructions.size(); i++) { + const auto &inst = program.instructions[i]; + if (!(inst >> 13u)) { + // a jump + uint target = inst &0x1fu; + jmp_labels.insert(std::pair(target, std::to_string(target))); + } + } + + for (uint i = 0; i < (int)program.instructions.size(); i++) { + const auto &inst = program.instructions[i]; + if (i == program.wrap_target) { + fprintf(out, " wrap_target()\n"); + } + auto it = jmp_labels.find(i); + if (it != jmp_labels.end()) { + fprintf(out, " label(\"%s\")\n", it->second.c_str()); + } + fprintf(out, " %s # %d\n", disassemble(jmp_labels, inst, program.sideset_bits_including_opt.get(), program.sideset_opt).c_str(), i); + if (i == program.wrap) { + fprintf(out, " wrap()\n"); + } + } + fprintf(out, "\n"); + + /* + fprintf(out, "static inline pio_sm_config %sprogram_default_config(uint offset) {\n", prefix.c_str()); + fprintf(out, " pio_sm_config c = pio_sm_default_config();\n"); + fprintf(out, " sm_config_wrap(&c, offset + %swrap_target, offset + %swrap);\n", prefix.c_str(), + prefix.c_str()); + if (program.sideset_bits_including_opt.is_specified()) { + fprintf(out, " sm_config_sideset(&c, %d, %s, %s);\n", program.sideset_bits_including_opt.get(), + program.sideset_opt ? "true" : "false", + program.sideset_pindirs ? "true" : "false"); + } + fprintf(out, " return c;\n"); + fprintf(out, "}\n"); +*/ + // todo maybe have some code blocks inside or outside here? + for(const auto& o : program.code_blocks) { + fprintf(out, "\n"); + if (o.first == name) { + for(const auto &contents : o.second) { + fprintf(out, "%s", contents.c_str()); + fprintf(out, "\n"); + } + } + } + + fprintf(out, "\n"); + } + if (out != stdout) { fclose(out); } + return 0; + } + + static std::string disassemble(const std::map& jmp_labels, uint16_t inst, uint sideset_bits_including_opt, bool sideset_opt) { + std::stringstream ss; + uint major = inst >> 13u; + uint arg1 = ((uint) inst >> 5u) & 0x7u; + uint arg2 = inst & 0x1fu; + std::string op_string; + auto op = [&](const std::string &s) { + op_string = s; + }; + auto op_guts = [&](const std::string &s) { + ss << std::left << std::setw(24) << (op_string + "(" + s + ")"); + }; + + bool invalid = false; + switch (major) { + case 0b000: { + static std::array conditions{"", "not_x", "x_dec", "not_y", "y_dec", "x_not_y", "pin", + "not_osre"}; + op("jmp"); + auto it = jmp_labels.find(arg2); + std::string label = "?"; + if (it != jmp_labels.end()) { + label = it->second; + } + if (arg1) + op_guts(conditions[arg1] + ", \"" + label +"\""); + else + op_guts("\"" + label + "\""); + break; + } + case 0b001: { + uint source = arg1 & 3u; + std::string guts; + switch (source) { + case 0b00: + guts = "gpio, " + std::to_string(arg2); + break; + case 0b01: + guts = "pin, " + std::to_string(arg2); + break; + case 0b10: + if (arg2 & 0x8u) { + invalid = true; + } else { + guts = "irq, " + std::to_string(arg2 & 7u); + if (arg2 & 0x10u) { + guts += " rel"; + } + } + break; + } + if (!invalid) { + guts = ((arg1 & 4u) ? "1 " : "0 ") + guts; + op("wait"); + op_guts(guts); + } + break; + } + case 0b010: { + static std::array sources { "pins", "x", "y", "null", "", "status", "isr", "osr"}; + std::string source = sources[arg1]; + if (source.empty()) { + invalid = true; + } else { + op("in"); + op_guts(source + ", " + std::to_string(arg2 ? arg2 : 32)); + } + break; + } + case 0b011: { + static std::array dests { "pins", "x", "y", "null", "pindirs", "pc", "isr", "exec"}; + op("out"); + op_guts(dests[arg1] + ", " + std::to_string(arg2 ? arg2 : 32)); + break; + } + case 0b100: { + if (arg2) { + invalid = true; + } else { + std::string guts = ""; + if (arg1 & 4u) { + op("pull"); + if (arg1 & 2u) guts = "ifempty"; + } else { + op("push"); + if (arg1 & 2u) guts = "iffull"; + } + guts += ", "; + guts += ((arg1 & 0x1u) ? "block" : "noblock"); + op_guts(guts); + } + break; + } + case 0b101: { + static std::array dests { "pins", "x", "y", "", "exec", "pc", "isr", "osr"}; + static std::array sources { "pins", "x", "y", "null", "", "status", "isr", "osr"}; + std::string dest = dests[arg1]; + std::string source = sources[arg2 & 7u]; + uint operation = arg2 >> 3u; + if (source.empty() || dest.empty() || operation == 3) { + invalid = true; + } + if (dest == source && (arg1 == 1 || arg2 == 2)) { + op("nop"); + op_guts(""); + } else { + op("mov"); + std::string guts = dest + ", "; + if (operation == 1) { + guts += "not "; + } else if (operation == 2) { + guts += "reverse "; + } + guts += source; + op_guts(guts); + } + break; + } + case 0b110: { + if ((arg1 & 0x4u) || (arg2 & 0x8u)) { + invalid = true; + } else { + op("irq"); + std::string guts; + if (arg1 & 0x2u) { + guts += "clear "; + } else if (arg1 & 0x1u) { + guts += "wait "; + } else { + guts += "nowait "; + } + guts += std::to_string(arg2 & 7u); + if (arg2 & 0x10u) { + guts += " rel"; + } + op_guts(guts); + } + break; + } + case 0b111: { + static std::array dests{"pins", "x", "y", "", "pindirs", "", "", ""}; + std::string dest = dests[arg1]; + if (dest.empty()) { + invalid = true; + } else { + op("set"); + op_guts(dests[arg1] + ", " + std::to_string(arg2)); + } + break; + } + } + if (invalid) { + op("word"); + ss << std::hex; + op_guts(std::to_string(inst)); + } + uint delay = ((uint) inst >> 8u) & 0x1f; + ss << std::left << std::setw(9); + if (sideset_bits_including_opt && (!sideset_opt || (delay & 0x10u))) { + ss << (".side("+ std::to_string((delay & (sideset_opt ? 0xfu : 0x1fu)) >> (5u - sideset_bits_including_opt))+")"); + } else { + ss << ""; + } + delay &= ((1u << (5 - sideset_bits_including_opt)) - 1u); + ss << std::left << std::setw(4) << (delay ? ("[" + std::to_string(delay) + "]") : ""); + return ss.str(); + } +}; + +static python_output::factory creator; diff --git a/bsp/raspberry-pico/link.ld b/bsp/raspberry-pico/link.ld new file mode 100644 index 0000000000..898139432f --- /dev/null +++ b/bsp/raspberry-pico/link.ld @@ -0,0 +1,269 @@ +/* Based on GCC ARM embedded samples. + Defines the following symbols for use by code: + __exidx_start + __exidx_end + __etext + __data_start__ + __preinit_array_start + __preinit_array_end + __init_array_start + __init_array_end + __fini_array_start + __fini_array_end + __data_end__ + __bss_start__ + __bss_end__ + __end__ + end + __HeapLimit + __StackLimit + __StackTop + __stack (== StackTop) +*/ + +MEMORY +{ + FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k + RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k + SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k + SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k +} + +ENTRY(_entry_point) + +SECTIONS +{ + /* Second stage bootloader is prepended to the image. It must be 256 bytes big + and checksummed. It is usually built by the boot_stage2 target + in the Pico SDK + */ + + .flash_begin : { + __flash_binary_start = .; + } > FLASH + + .boot2 : { + __boot2_start__ = .; + KEEP (*(.boot2)) + __boot2_end__ = .; + } > FLASH + + ASSERT(__boot2_end__ - __boot2_start__ == 256, + "ERROR: Pico second stage bootloader must be 256 bytes in size") + + /* The second stage will always enter the image at the start of .text. + The debugger will use the ELF entry point, which is the _entry_point + symbol if present, otherwise defaults to start of .text. + This can be used to transfer control back to the bootrom on debugger + launches only, to perform proper flash setup. + */ + + .text : { + __reset_start = .; + KEEP (*(.reset)) + . = ALIGN(256); + __reset_end = .; + ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes"); + KEEP (*(.vectors)) + /* TODO revisit this now memset/memcpy/float in ROM */ + /* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from + * FLASH ... we will include any thing excluded here in .data below by default */ + *(.init) + *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .text*) + *(.fini) + + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + + /* section information for initial. */ + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + + /* Pull all c'tors into .text */ + *crtbegin.o(.ctors) + *crtbegin?.o(.ctors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) + *(SORT(.ctors.*)) + *(.ctors) + /* Followed by destructors */ + *crtbegin.o(.dtors) + *crtbegin?.o(.dtors) + *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) + *(SORT(.dtors.*)) + *(.dtors) + + *(.eh_frame*) + . = ALIGN(4); + } > FLASH + + .rodata : { + *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .rodata*) + . = ALIGN(4); + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.flashdata*))) + . = ALIGN(4); + } > FLASH + + .ARM.extab : + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } > FLASH + + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + } > FLASH + __exidx_end = .; + + /* Machine inspectable binary information */ + . = ALIGN(4); + __binary_info_start = .; + .binary_info : + { + KEEP(*(.binary_info.keep.*)) + *(.binary_info.*) + } > FLASH + __binary_info_end = .; + . = ALIGN(4); + + /* End of .text-like segments */ + __etext = .; + + .ram_vector_table (COPY): { + *(.ram_vector_table) + } > RAM + + .data : { + __data_start__ = .; + *(vtable) + + *(.time_critical*) + + /* remaining .text and .rodata; i.e. stuff we exclude above because we want it in RAM */ + *(.text*) + . = ALIGN(4); + *(.rodata*) + . = ALIGN(4); + + *(.data*) + + . = ALIGN(4); + *(.after_data.*) + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__mutex_array_start = .); + KEEP(*(SORT(.mutex_array.*))) + KEEP(*(.mutex_array)) + PROVIDE_HIDDEN (__mutex_array_end = .); + + . = ALIGN(4); + /* preinit data */ + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP(*(SORT(.preinit_array.*))) + KEEP(*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + + . = ALIGN(4); + /* init data */ + PROVIDE_HIDDEN (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE_HIDDEN (__init_array_end = .); + + . = ALIGN(4); + /* finit data */ + PROVIDE_HIDDEN (__fini_array_start = .); + *(SORT(.fini_array.*)) + *(.fini_array) + PROVIDE_HIDDEN (__fini_array_end = .); + + *(.jcr) + . = ALIGN(4); + /* All data end */ + __data_end__ = .; + } > RAM AT> FLASH + + .uninitialized_data (COPY): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + + /* Start and end symbols must be word-aligned */ + .scratch_x : { + __scratch_x_start__ = .; + *(.scratch_x.*) + . = ALIGN(4); + __scratch_x_end__ = .; + } > SCRATCH_X AT > FLASH + __scratch_x_source__ = LOADADDR(.scratch_x); + + .scratch_y : { + __scratch_y_start__ = .; + *(.scratch_y.*) + . = ALIGN(4); + __scratch_y_end__ = .; + } > SCRATCH_Y AT > FLASH + __scratch_y_source__ = LOADADDR(.scratch_y); + + .bss : { + . = ALIGN(4); + __bss_start__ = .; + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))) + *(COMMON) + . = ALIGN(4); + __bss_end__ = .; + } > RAM + + .heap (COPY): + { + __end__ = .; + end = __end__; + *(.heap*) + __HeapLimit = .; + } > RAM + + /* .stack*_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later + * + * stack1 section may be empty/missing if platform_launch_core1 is not used */ + + /* by default we put core 0 stack at the end of scratch Y, so that if core 1 + * stack is not used then all of SCRATCH_X is free. + */ + .stack1_dummy (COPY): + { + *(.stack1*) + } > SCRATCH_X + .stack_dummy (COPY): + { + *(.stack*) + } > SCRATCH_Y + + .flash_end : { + __flash_binary_end = .; + } > FLASH + + /* stack limit is poorly named, but historically is maximum heap ptr */ + __StackLimit = ORIGIN(RAM) + LENGTH(RAM); + __StackOneTop = ORIGIN(SCRATCH_X) + LENGTH(SCRATCH_X); + __StackTop = ORIGIN(SCRATCH_Y) + LENGTH(SCRATCH_Y); + __StackOneBottom = __StackOneTop - SIZEOF(.stack1_dummy); + __StackBottom = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed") + /* todo assert on extra code */ +} + diff --git a/bsp/raspberry-pico/rtconfig.h b/bsp/raspberry-pico/rtconfig.h new file mode 100644 index 0000000000..1875dbc457 --- /dev/null +++ b/bsp/raspberry-pico/rtconfig.h @@ -0,0 +1,164 @@ +#ifndef RT_CONFIG_H__ +#define RT_CONFIG_H__ + +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Configuration */ + +/* RT-Thread Kernel */ + +#define RT_NAME_MAX 8 +#define RT_ALIGN_SIZE 4 +#define RT_THREAD_PRIORITY_32 +#define RT_THREAD_PRIORITY_MAX 32 +#define RT_TICK_PER_SECOND 100 +#define RT_USING_OVERFLOW_CHECK +#define RT_USING_HOOK +#define RT_USING_IDLE_HOOK +#define RT_IDLE_HOOK_LIST_SIZE 4 +#define IDLE_THREAD_STACK_SIZE 256 +#define RT_DEBUG +#define RT_DEBUG_COLOR + +/* Inter-Thread communication */ + +#define RT_USING_SEMAPHORE +#define RT_USING_MUTEX +#define RT_USING_EVENT +#define RT_USING_MAILBOX +#define RT_USING_MESSAGEQUEUE + +/* Memory Management */ + +#define RT_USING_MEMPOOL +#define RT_USING_SMALL_MEM +#define RT_USING_HEAP + +/* Kernel Device Object */ + +#define RT_USING_DEVICE +#define RT_USING_CONSOLE +#define RT_CONSOLEBUF_SIZE 128 +#define RT_CONSOLE_DEVICE_NAME "uart0" +#define RT_VER_NUM 0x40003 +#define ARCH_ARM +#define ARCH_ARM_CORTEX_M +#define ARCH_ARM_CORTEX_M0 + +/* RT-Thread Components */ + +#define RT_USING_COMPONENTS_INIT +#define RT_USING_USER_MAIN +#define RT_MAIN_THREAD_STACK_SIZE 2048 +#define RT_MAIN_THREAD_PRIORITY 10 + +/* C++ features */ + + +/* Command shell */ + +#define RT_USING_FINSH +#define FINSH_THREAD_NAME "tshell" +#define FINSH_USING_HISTORY +#define FINSH_HISTORY_LINES 5 +#define FINSH_USING_SYMTAB +#define FINSH_USING_DESCRIPTION +#define FINSH_THREAD_PRIORITY 20 +#define FINSH_THREAD_STACK_SIZE 4096 +#define FINSH_CMD_SIZE 80 +#define FINSH_USING_MSH +#define FINSH_USING_MSH_DEFAULT +#define FINSH_USING_MSH_ONLY +#define FINSH_ARG_MAX 10 + +/* Device virtual file system */ + + +/* Device Drivers */ + +#define RT_USING_DEVICE_IPC +#define RT_PIPE_BUFSZ 512 +#define RT_USING_SERIAL +#define RT_SERIAL_USING_DMA +#define RT_SERIAL_RB_BUFSZ 64 + +/* Using USB */ + + +/* POSIX layer and C standard library */ + +#define RT_LIBC_USING_TIME + +/* Network */ + +/* Socket abstraction layer */ + + +/* Network interface device */ + + +/* light weight TCP/IP stack */ + + +/* AT commands */ + + +/* VBUS(Virtual Software BUS) */ + + +/* Utilities */ + + +/* RT-Thread online packages */ + +/* IoT - internet of things */ + + +/* Wi-Fi */ + +/* Marvell WiFi */ + + +/* Wiced WiFi */ + + +/* IoT Cloud */ + + +/* security packages */ + + +/* language packages */ + + +/* multimedia packages */ + + +/* tools packages */ + + +/* system packages */ + + +/* Micrium: Micrium software products porting for RT-Thread */ + + +/* peripheral libraries and drivers */ + + +/* miscellaneous packages */ + + +/* samples: kernel and components samples */ + + +/* games: games run on RT-Thread console */ + + +/* Privated Packages of RealThread */ + + +/* Network Utilities */ + +#define SOC_RP2040 + +#endif diff --git a/bsp/raspberry-pico/rtconfig.py b/bsp/raspberry-pico/rtconfig.py new file mode 100644 index 0000000000..64aeed3389 --- /dev/null +++ b/bsp/raspberry-pico/rtconfig.py @@ -0,0 +1,66 @@ +import os + +# toolchains options +ARCH='arm' +CPU='cortex-m0' +CROSS_TOOL='gcc' + +# bsp lib config +BSP_LIBRARY_TYPE = None + +if os.getenv('RTT_CC'): + CROSS_TOOL = os.getenv('RTT_CC') +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') + +# cross_tool provides the cross compiler +# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR +if CROSS_TOOL == 'gcc': + PLATFORM = 'gcc' + EXEC_PATH = r'/usr/bin' + # EXEC_PATH = r'C:\RT-ThreadStudio\repo\Extract\ToolChain_Support_Packages\ARM\GNU_Tools_for_ARM_Embedded_Processors\5.4.1\bin' +elif CROSS_TOOL == 'keil': + PLATFORM = 'armcc' + EXEC_PATH = r'C:/Keil_v5' +elif CROSS_TOOL == 'iar': + PLATFORM = 'iar' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + +if os.getenv('RTT_EXEC_PATH'): + EXEC_PATH = os.getenv('RTT_EXEC_PATH') + +BUILD = 'debug' + +if PLATFORM == 'gcc': + # toolchains + PREFIX = 'arm-none-eabi-' + CC = PREFIX + 'gcc' + AS = PREFIX + 'gcc' + AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' + LINK = PREFIX + 'gcc' + TARGET_EXT = 'elf' + SIZE = PREFIX + 'size' + OBJDUMP = PREFIX + 'objdump' + OBJCPY = PREFIX + 'objcopy' + +# /usr/bin/arm-none-eabi-g++ -march=armv6-m -mcpu=cortex-m0plus -mthumb -Og -g -Wl,--build-id=none --specs=nosys.specs -Wl,--wrap=sprintf -Wl,--wrap=snprintf -Wl,--wrap=vsnprintf -Wl,--wrap=__clzsi2 -Wl,--wrap=__clzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=__ctzdi2 -Wl,--wrap=__popcountsi2 -Wl,--wrap=__popcountdi2 -Wl,--wrap=__clz -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--wrap=__aeabi_ldivmod -Wl,--wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=__aeabi_dadd -Wl,--wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--wrap=__aeabi_dsub -Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdrcmple -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--wrap=__aeabi_dcmpun -Wl,--wrap=__aeabi_i2d -Wl,--wrap=__aeabi_l2d -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ul2d -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_d2f -Wl,--wrap=sqrt -Wl,--wrap=cos -Wl,--wrap=sin -Wl,--wrap=tan -Wl,--wrap=atan2 -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=ldexp -Wl,--wrap=copysign -Wl,--wrap=trunc -Wl,--wrap=floor -Wl,--wrap=ceil -Wl,--wrap=round -Wl,--wrap=sincos -Wl,--wrap=asin -Wl,--wrap=acos -Wl,--wrap=atan -Wl,--wrap=sinh -Wl,--wrap=cosh -Wl,--wrap=tanh -Wl,--wrap=asinh -Wl,--wrap=acosh -Wl,--wrap=atanh -Wl,--wrap=exp2 -Wl,--wrap=log2 -Wl,--wrap=exp10 -Wl,--wrap=log10 -Wl,--wrap=pow -Wl,--wrap=powint -Wl,--wrap=hypot -Wl,--wrap=cbrt -Wl,--wrap=fmod -Wl,--wrap=drem -Wl,--wrap=remainder -Wl,--wrap=remquo -Wl,--wrap=expm1 -Wl,--wrap=log1p -Wl,--wrap=fma -Wl,--wrap=__aeabi_lmul -Wl,--wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfrcmple -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmplt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmpge -Wl,--wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_i2f -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ui2f -Wl,--wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_f2iz -Wl,--wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--wrap=__aeabi_f2d -Wl,--wrap=sqrtf -Wl,--wrap=cosf -Wl,--wrap=sinf -Wl,--wrap=tanf -Wl,--wrap=atan2f -Wl,--wrap=expf -Wl,--wrap=logf -Wl,--wrap=ldexpf -Wl,--wrap=copysignf -Wl,--wrap=truncf -Wl,--wrap=floorf -Wl,--wrap=ceilf -Wl,--wrap=roundf -Wl,--wrap=sincosf -Wl,--wrap=asinf -Wl,--wrap=acosf -Wl,--wrap=atanf -Wl,--wrap=sinhf -Wl,--wrap=coshf -Wl,--wrap=tanhf -Wl,--wrap=asinhf -Wl,--wrap=acoshf -Wl,--wrap=atanhf -Wl,--wrap=exp2f -Wl,--wrap=log2f -Wl,--wrap=exp10f -Wl,--wrap=log10f -Wl,--wrap=powf -Wl,--wrap=powintf -Wl,--wrap=hypotf -Wl,--wrap=cbrtf -Wl,--wrap=fmodf -Wl,--wrap=dremf -Wl,--wrap=remainderf -Wl,--wrap=remquof -Wl,--wrap=expm1f -Wl,--wrap=log1pf -Wl,--wrap=fmaf -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memcpy4 -Wl,--wrap=__aeabi_memset4 -Wl,--wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset8 -Wl,-Map=blink.elf.map -Wl,--script=/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld -Wl,--gc-sections -Wl,--wrap=printf -Wl,--wrap=vprintf -Wl,--wrap=puts -Wl,--wrap=putchar CMakeFiles/blink.dir/blink.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_claim/claim.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_platform/platform.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_uart/uart.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_divider/divider.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_time/time.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_time/timeout_helper.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_timer/timer.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_sync/sem.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_sync/lock_core.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_sync/mutex.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_sync/critical_section.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_util/datetime.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_util/pheap.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/common/pico_util/queue.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_runtime/runtime.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_clocks/clocks.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_xosc/xosc.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_pll/pll.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_vreg/vreg.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_irq/irq.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_printf/printf.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_divider/divider.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_double/double_aeabi.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_double/double_init_rom.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_double/double_math.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_float/float_aeabi.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_float/float_init_rom.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_float/float_math.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_standard_link/crt0.S.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_stdio/stdio.c.obj CMakeFiles/blink.dir/home/henson/Documents/rasp-pico/pico/pico-sdk/src/rp2_common/pico_stdio_uart/stdio_uart.c.obj -o blink.elf ../pico_sdk/src/rp2_common/boot_stage2/bs2_default_padded_checksummed.S + +# -march=armv6-m -mcpu=cortex-m0plus -mthumb -Og -g -ffunction-sections -fdata-sections + DEVICE = ' -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections' + CFLAGS = DEVICE + ' -Dgcc' + AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -ILibraries/pico-sdk/src/common/pico_stdlib/include -ILibraries/pico-sdk/src/rp2_common/hardware_gpio/include -ILibraries/pico-sdk/src/common/pico_base/include -ILibraries/generated/pico_base -ILibraries/pico-sdk/src/boards/include -ILibraries/pico-sdk/src/rp2_common/pico_platform/include -ILibraries/pico-sdk/src/rp2040/hardware_regs/include -ILibraries/pico-sdk/src/rp2_common/hardware_base/include -ILibraries/pico-sdk/src/rp2040/hardware_structs/include -ILibraries/pico-sdk/src/rp2_common/hardware_claim/include -ILibraries/pico-sdk/src/rp2_common/hardware_sync/include -ILibraries/pico-sdk/src/rp2_common/hardware_uart/include -ILibraries/pico-sdk/src/rp2_common/hardware_divider/include -ILibraries/pico-sdk/src/common/pico_time/include -ILibraries/pico-sdk/src/rp2_common/hardware_timer/include -ILibraries/pico-sdk/src/common/pico_sync/include -ILibraries/pico-sdk/src/common/pico_util/include -ILibraries/pico-sdk/src/rp2_common/pico_runtime/include -ILibraries/pico-sdk/src/rp2_common/hardware_clocks/include -ILibraries/pico-sdk/src/rp2_common/hardware_resets/include -ILibraries/pico-sdk/src/rp2_common/hardware_watchdog/include -ILibraries/pico-sdk/src/rp2_common/hardware_xosc/include -ILibraries/pico-sdk/src/rp2_common/hardware_pll/include -ILibraries/pico-sdk/src/rp2_common/hardware_vreg/include -ILibraries/pico-sdk/src/rp2_common/hardware_irq/include -ILibraries/pico-sdk/src/rp2_common/pico_printf/include -ILibraries/pico-sdk/src/rp2_common/pico_bootrom/include -ILibraries/pico-sdk/src/common/pico_bit_ops/include -ILibraries/pico-sdk/src/common/pico_divider/include -ILibraries/pico-sdk/src/rp2_common/pico_double/include -ILibraries/pico-sdk/src/rp2_common/pico_int64_ops/include -ILibraries/pico-sdk/src/rp2_common/pico_float/include -ILibraries/pico-sdk/src/common/pico_binary_info/include -ILibraries/pico-sdk/src/rp2_common/pico_stdio/include -ILibraries/pico-sdk/src/rp2_common/pico_stdio_uart/include' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T link.ld' + ' -Wl,--build-id=none --specs=nosys.specs -Wl,--wrap=sprintf -Wl,--wrap=snprintf -Wl,--wrap=vsnprintf -Wl,--wrap=__clzsi2 -Wl,--wrap=__clzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=__ctzdi2 -Wl,--wrap=__popcountsi2 -Wl,--wrap=__popcountdi2 -Wl,--wrap=__clz -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--wrap=__aeabi_ldivmod -Wl,--wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=__aeabi_dadd -Wl,--wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--wrap=__aeabi_dsub -Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdrcmple -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--wrap=__aeabi_dcmpun -Wl,--wrap=__aeabi_i2d -Wl,--wrap=__aeabi_l2d -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ul2d -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_d2f -Wl,--wrap=sqrt -Wl,--wrap=cos -Wl,--wrap=sin -Wl,--wrap=tan -Wl,--wrap=atan2 -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=ldexp -Wl,--wrap=copysign -Wl,--wrap=trunc -Wl,--wrap=floor -Wl,--wrap=ceil -Wl,--wrap=round -Wl,--wrap=sincos -Wl,--wrap=asin -Wl,--wrap=acos -Wl,--wrap=atan -Wl,--wrap=sinh -Wl,--wrap=cosh -Wl,--wrap=tanh -Wl,--wrap=asinh -Wl,--wrap=acosh -Wl,--wrap=atanh -Wl,--wrap=exp2 -Wl,--wrap=log2 -Wl,--wrap=exp10 -Wl,--wrap=log10 -Wl,--wrap=pow -Wl,--wrap=powint -Wl,--wrap=hypot -Wl,--wrap=cbrt -Wl,--wrap=fmod -Wl,--wrap=drem -Wl,--wrap=remainder -Wl,--wrap=remquo -Wl,--wrap=expm1 -Wl,--wrap=log1p -Wl,--wrap=fma -Wl,--wrap=__aeabi_lmul -Wl,--wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfrcmple -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmplt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmpge -Wl,--wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_i2f -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ui2f -Wl,--wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_f2iz -Wl,--wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--wrap=__aeabi_f2d -Wl,--wrap=sqrtf -Wl,--wrap=cosf -Wl,--wrap=sinf -Wl,--wrap=tanf -Wl,--wrap=atan2f -Wl,--wrap=expf -Wl,--wrap=logf -Wl,--wrap=ldexpf -Wl,--wrap=copysignf -Wl,--wrap=truncf -Wl,--wrap=floorf -Wl,--wrap=ceilf -Wl,--wrap=roundf -Wl,--wrap=sincosf -Wl,--wrap=asinf -Wl,--wrap=acosf -Wl,--wrap=atanf -Wl,--wrap=sinhf -Wl,--wrap=coshf -Wl,--wrap=tanhf -Wl,--wrap=asinhf -Wl,--wrap=acoshf -Wl,--wrap=atanhf -Wl,--wrap=exp2f -Wl,--wrap=log2f -Wl,--wrap=exp10f -Wl,--wrap=log10f -Wl,--wrap=powf -Wl,--wrap=powintf -Wl,--wrap=hypotf -Wl,--wrap=cbrtf -Wl,--wrap=fmodf -Wl,--wrap=dremf -Wl,--wrap=remainderf -Wl,--wrap=remquof -Wl,--wrap=expm1f -Wl,--wrap=log1pf -Wl,--wrap=fmaf -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memcpy4 -Wl,--wrap=__aeabi_memset4 -Wl,--wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset8 -Wl,--gc-sections -Wl,--wrap=printf -Wl,--wrap=vprintf -Wl,--wrap=puts -Wl,--wrap=putchar' + + CPATH = '' + LPATH = '' + + if BUILD == 'debug': + CFLAGS += ' -O0 -gdwarf-2 -g' + AFLAGS += ' -gdwarf-2' + else: + CFLAGS += ' -O2' + + CXXFLAGS = CFLAGS #+ ' -Wl,--build-id=none --specs=nosys.specs -Wl,--wrap=sprintf -Wl,--wrap=snprintf -Wl,--wrap=vsnprintf -Wl,--wrap=__clzsi2 -Wl,--wrap=__clzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=__ctzdi2 -Wl,--wrap=__popcountsi2 -Wl,--wrap=__popcountdi2 -Wl,--wrap=__clz -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--wrap=__aeabi_ldivmod -Wl,--wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=__aeabi_dadd -Wl,--wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--wrap=__aeabi_dsub -Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdrcmple -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--wrap=__aeabi_dcmpun -Wl,--wrap=__aeabi_i2d -Wl,--wrap=__aeabi_l2d -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ul2d -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_d2f -Wl,--wrap=sqrt -Wl,--wrap=cos -Wl,--wrap=sin -Wl,--wrap=tan -Wl,--wrap=atan2 -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=ldexp -Wl,--wrap=copysign -Wl,--wrap=trunc -Wl,--wrap=floor -Wl,--wrap=ceil -Wl,--wrap=round -Wl,--wrap=sincos -Wl,--wrap=asin -Wl,--wrap=acos -Wl,--wrap=atan -Wl,--wrap=sinh -Wl,--wrap=cosh -Wl,--wrap=tanh -Wl,--wrap=asinh -Wl,--wrap=acosh -Wl,--wrap=atanh -Wl,--wrap=exp2 -Wl,--wrap=log2 -Wl,--wrap=exp10 -Wl,--wrap=log10 -Wl,--wrap=pow -Wl,--wrap=powint -Wl,--wrap=hypot -Wl,--wrap=cbrt -Wl,--wrap=fmod -Wl,--wrap=drem -Wl,--wrap=remainder -Wl,--wrap=remquo -Wl,--wrap=expm1 -Wl,--wrap=log1p -Wl,--wrap=fma -Wl,--wrap=__aeabi_lmul -Wl,--wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfrcmple -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmplt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmpge -Wl,--wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_i2f -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ui2f -Wl,--wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_f2iz -Wl,--wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--wrap=__aeabi_f2d -Wl,--wrap=sqrtf -Wl,--wrap=cosf -Wl,--wrap=sinf -Wl,--wrap=tanf -Wl,--wrap=atan2f -Wl,--wrap=expf -Wl,--wrap=logf -Wl,--wrap=ldexpf -Wl,--wrap=copysignf -Wl,--wrap=truncf -Wl,--wrap=floorf -Wl,--wrap=ceilf -Wl,--wrap=roundf -Wl,--wrap=sincosf -Wl,--wrap=asinf -Wl,--wrap=acosf -Wl,--wrap=atanf -Wl,--wrap=sinhf -Wl,--wrap=coshf -Wl,--wrap=tanhf -Wl,--wrap=asinhf -Wl,--wrap=acoshf -Wl,--wrap=atanhf -Wl,--wrap=exp2f -Wl,--wrap=log2f -Wl,--wrap=exp10f -Wl,--wrap=log10f -Wl,--wrap=powf -Wl,--wrap=powintf -Wl,--wrap=hypotf -Wl,--wrap=cbrtf -Wl,--wrap=fmodf -Wl,--wrap=dremf -Wl,--wrap=remainderf -Wl,--wrap=remquof -Wl,--wrap=expm1f -Wl,--wrap=log1pf -Wl,--wrap=fmaf -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memcpy4 -Wl,--wrap=__aeabi_memset4 -Wl,--wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset8 -Wl,--gc-sections -Wl,--wrap=printf -Wl,--wrap=vprintf -Wl,--wrap=puts -Wl,--wrap=putchar' + + POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'